Author: mordante
Date: Thu May 21 21:12:54 2009
New Revision: 35810
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35810&view=rev
Log:
Remove the unused function twidget::has_vertical_scrollbar.
Modified:
trunk/src/gui/widgets/container.hpp
trunk/src/gui/widgets/debug.cpp
trunk/src/gui/widgets/grid.cpp
trunk/src/gui/widgets/grid.hpp
trunk/src/gui/widgets/menubar.hpp
trunk/src/gui/widgets/scrollbar_container.cpp
trunk/src/gui/widgets/scrollbar_container.hpp
trunk/src/gui/widgets/widget.hpp
Modified: trunk/src/gui/widgets/container.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/container.hpp?rev=35810&r1=35809&r2=35810&view=diff
==============================================================================
--- trunk/src/gui/widgets/container.hpp (original)
+++ trunk/src/gui/widgets/container.hpp Thu May 21 21:12:54 2009
@@ -98,16 +98,6 @@
* classes to define this function. So inheriting classes act as one
widget
* others as a collection of multiple objects.
*/
- bool has_vertical_scrollbar() const
- { return grid_.has_vertical_scrollbar(); }
-
- /**
- * Inherited from twidget.
- *
- * Since we can't define a good default behaviour we force the
inheriting
- * classes to define this function. So inheriting classes act as one
widget
- * others as a collection of multiple objects.
- */
bool has_horizontal_scrollbar() const
{ return grid_.has_horizontal_scrollbar(); }
Modified: trunk/src/gui/widgets/debug.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/debug.cpp?rev=35810&r1=35809&r2=35810&view=diff
==============================================================================
--- trunk/src/gui/widgets/debug.cpp (original)
+++ trunk/src/gui/widgets/debug.cpp Thu May 21 21:12:54 2009
@@ -345,10 +345,6 @@
<< "can wrap=" << widget->can_wrap() << '\n'
<< "</td></tr>\n"
<< "<tr><td>\n"
- << "has vertical scrollbar="
- << widget->has_vertical_scrollbar() << '\n'
- << "</td></tr>\n"
- << "<tr><td>\n"
<< "has horizontal scrollbar="
<< widget->has_horizontal_scrollbar() << '\n'
<< "</td></tr>\n"
Modified: trunk/src/gui/widgets/grid.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/grid.cpp?rev=35810&r1=35809&r2=35810&view=diff
==============================================================================
--- trunk/src/gui/widgets/grid.cpp (original)
+++ trunk/src/gui/widgets/grid.cpp Thu May 21 21:12:54 2009
@@ -496,20 +496,6 @@
}
DBG_GUI_L << "tgrid: found solution.\n";
-}
-
-bool tgrid::has_vertical_scrollbar() const
-{
- foreach(const tchild& child, children_) {
- // FIXME we should check per row and the entire row
- // should have the flag!!!!
- if(child.widget() && child.widget()->has_vertical_scrollbar()) {
- return true;
- }
- }
-
- // Inherit
- return twidget::has_vertical_scrollbar();
}
bool tgrid::has_horizontal_scrollbar() const
Modified: trunk/src/gui/widgets/grid.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/grid.hpp?rev=35810&r1=35809&r2=35810&view=diff
==============================================================================
--- trunk/src/gui/widgets/grid.hpp (original)
+++ trunk/src/gui/widgets/grid.hpp Thu May 21 21:12:54 2009
@@ -226,9 +226,6 @@
void layout_wrap(const unsigned maximum_width);
/** Inherited from twidget. */
- bool has_vertical_scrollbar() const;
-
- /** Inherited from twidget. */
bool has_horizontal_scrollbar() const;
public:
Modified: trunk/src/gui/widgets/menubar.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/menubar.hpp?rev=35810&r1=35809&r2=35810&view=diff
==============================================================================
--- trunk/src/gui/widgets/menubar.hpp (original)
+++ trunk/src/gui/widgets/menubar.hpp Thu May 21 21:12:54 2009
@@ -55,9 +55,6 @@
/** Inherited from tcontrol. */
unsigned get_state() const { return state_; }
-
- /** Inherited from tcontainer_. */
- bool has_vertical_scrollbar() const { return false; }
/**
* Update our state when a widget selected or deselected an item.
Modified: trunk/src/gui/widgets/scrollbar_container.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/scrollbar_container.cpp?rev=35810&r1=35809&r2=35810&view=diff
==============================================================================
--- trunk/src/gui/widgets/scrollbar_container.cpp (original)
+++ trunk/src/gui/widgets/scrollbar_container.cpp Thu May 21 21:12:54 2009
@@ -242,15 +242,6 @@
content_grid_->layout_wrap(maximum_width - offset);
}
-bool tscrollbar_container::has_vertical_scrollbar() const
-{
- /**
- * @todo look at cleaning the has_X_scrollbar and can_wrap to do the
- * visibility test in a more generic way, preferably in the grid.
- */
- return is_visible() && vertical_scrollbar_mode_ != always_invisible;
-}
-
bool tscrollbar_container::has_horizontal_scrollbar() const
{
return is_visible() && horizontal_scrollbar_mode_ != always_invisible;
Modified: trunk/src/gui/widgets/scrollbar_container.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/scrollbar_container.hpp?rev=35810&r1=35809&r2=35810&view=diff
==============================================================================
--- trunk/src/gui/widgets/scrollbar_container.hpp (original)
+++ trunk/src/gui/widgets/scrollbar_container.hpp Thu May 21 21:12:54 2009
@@ -95,9 +95,6 @@
void layout_wrap(const unsigned maximum_width);
/** Inherited from twidget (not tcontainer_). */
- bool has_vertical_scrollbar() const;
-
- /** Inherited from twidget (not tcontainer_). */
bool has_horizontal_scrollbar() const;
private:
Modified: trunk/src/gui/widgets/widget.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/widget.hpp?rev=35810&r1=35809&r2=35810&view=diff
==============================================================================
--- trunk/src/gui/widgets/widget.hpp (original)
+++ trunk/src/gui/widgets/widget.hpp Thu May 21 21:12:54 2009
@@ -271,19 +271,6 @@
virtual bool has_horizontal_scrollbar() const { return false; }
/**
- * Does the widget have a vertical scrollbar.
- *
- * We want to use the best size for a widget, when the best size for all
- * widgets doesn't fit inside the window some widgets need to be
reduced in
- * size. Widgets that have a scrollbar in the wanted direction are
resized
- * first. The next option is to look at the minimum size.
- *
- * @returns Whether or not the widget has a vertical
- * scrollbar.
- */
- virtual bool has_vertical_scrollbar() const { return false; }
-
- /**
* Sets the size of the widget.
*
* @param origin The position of top left of the widget.
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits