Base class for all widgets. More...
#include <widget.hpp>


Public Types | |
| enum | tvisible { VISIBLE, HIDDEN, INVISIBLE } |
Visibility settings done by the user. More... | |
| enum | tdrawing_action { DRAWN, PARTLY_DRAWN, NOT_DRAWN } |
Visibility set by the engine. More... | |
Public Member Functions | |
| twidget () | |
| twidget (const tbuilder_widget &builder) | |
| Constructor. | |
| virtual | ~twidget () |
| virtual void | layout_init (const bool full_initialization) |
| How the layout engine works. | |
| virtual void | request_reduce_width (const unsigned maximum_width)=0 |
| Tries to reduce the width of a widget. | |
| virtual void | demand_reduce_width (const unsigned) |
| Tries to reduce the width of a widget. | |
| virtual void | request_reduce_height (const unsigned) |
| Tries to reduce the height of a widget. | |
| virtual void | demand_reduce_height (const unsigned) |
| Tries to reduce the height of a widget. | |
| tpoint | get_best_size () const |
| Gets the best size for the widget. | |
| virtual bool | can_wrap () const |
| Can the widget wrap. | |
| virtual void | place (const tpoint &origin, const tpoint &size) |
| Places the widget. | |
| virtual void | set_size (const tpoint &size) |
| Sets the size of the widget. | |
| virtual twidget * | find_at (const tpoint &coordinate, const bool must_be_active) |
| Gets the widget at the wanted coordinates. | |
| virtual const twidget * | find_at (const tpoint &coordinate, const bool must_be_active) const |
| The const version of find_at. | |
| virtual twidget * | find (const std::string &id, const bool) |
| Gets a widget with the wanted id. | |
| virtual const twidget * | find (const std::string &id, const bool) const |
| The const version of find. | |
| virtual bool | has_widget (const twidget *widget) const |
| Does the widget contain the widget. | |
| twindow * | get_window () |
| Get the parent window. | |
| const twindow * | get_window () const |
| The const version of get_window(). | |
| tdialog * | dialog () |
| Returns the toplevel dialog. | |
| virtual bool | disable_click_dismiss () const =0 |
| Does the widget disable easy close? | |
| virtual iterator::twalker_ * | create_walker ()=0 |
| Creates a new walker object on the heap. | |
| twidget * | parent () |
| void | set_parent (twidget *parent) |
| const std::string & | id () const |
| void | set_id (const std::string &id) |
| unsigned | get_width () const |
| unsigned | get_height () const |
| tpoint | get_size () const |
| Returns the size of the widget. | |
| tpoint | get_origin () const |
| Returns the screen origin of the widget. | |
| SDL_Rect | get_rect () const |
| Gets the sizes in one rect structure. | |
| SDL_Rect | get_dirty_rect () const |
| Gets the dirty rect of the widget. | |
| virtual void | set_origin (const tpoint &origin) |
| Sets the origin of the widget. | |
| virtual void | move (const int x_offset, const int y_offset) |
| Moves a widget. | |
| int | get_x () const |
| int | get_y () const |
| void | set_visible (const tvisible visible) |
| tvisible | get_visible () const |
| tdrawing_action | get_drawing_action () const |
| virtual void | set_visible_area (const SDL_Rect &area) |
| Sets the visible area for a widget. | |
| void | set_dirty (const bool dirty=true) |
| Sets the widgets dirty state. | |
| bool | get_dirty () const |
| Returns the dirty state for a widget, final function. | |
| void | set_debug_border_mode (const unsigned debug_border_mode) |
| void | set_debug_border_color (const unsigned debug_border_color) |
| SDL_Rect | calculate_blitting_rectangle (const int x_offset, const int y_offset) |
| Calculates the blitting rectangle of the widget. | |
| SDL_Rect | calculate_clipping_rectangle (const int x_offset, const int y_offset) |
| Calculates the clipping rectangle of the widget. | |
| void | draw_background (surface &frame_buffer) |
| Draws the background of a widget. | |
| void | draw_background (surface &frame_buffer, int x_offset, int y_offset) |
| void | draw_children (surface &frame_buffer) |
| Draws the children of a widget. | |
| void | draw_children (surface &frame_buffer, int x_offset, int y_offset) |
| void | draw_foreground (surface &frame_buffer) |
| Draws the foreground of the widgt. | |
| void | draw_foreground (surface &frame_buffer, int x_offset, int y_offset) |
| virtual void | layout_children () |
| Allows a widget to update its children. | |
| void | populate_dirty_list (twindow &caller, std::vector< twidget * > &call_stack) |
| Adds a widget to the dirty list if it is dirty. | |
| void | set_linked_group (const std::string &linked_group) |
Protected Member Functions | |
| void | set_layout_size (const tpoint &size) |
| const tpoint & | layout_size () const |
Private Member Functions | |
| virtual tpoint | calculate_best_size () const =0 |
| Calculates the best size. | |
| virtual void | child_populate_dirty_list (twindow &, const std::vector< twidget * > &) |
| Tries to add all children of a container to the dirty list. | |
| void | draw_debug_border (surface &frame_buffer) |
| void | draw_debug_border (surface &frame_buffer, int x_offset, int y_offset) |
| virtual void | impl_draw_background (surface &) |
| See draw_background(). | |
| virtual void | impl_draw_background (surface &, int, int) |
| virtual void | impl_draw_children (surface &) |
| See draw_children. | |
| virtual void | impl_draw_children (surface &, int, int) |
| virtual void | impl_draw_foreground (surface &) |
| See draw_foreground. | |
| virtual void | impl_draw_foreground (surface &, int, int) |
| virtual bool | is_at (const tpoint &coordinate) const |
| (Will be) inherited from event::tdispatcher. | |
| bool | is_at (const tpoint &coordinate, const bool must_be_active) const |
| Is the coordinate inside our area. | |
Private Attributes | |
| std::string | id_ |
| The id is the unique name of the widget in a certain context. | |
| twidget * | parent_ |
| The parent widget, if the widget has a parent it contains a pointer to the parent, else it's set to NULL. | |
| int | x_ |
| The x coordinate of the widget in the screen. | |
| int | y_ |
| The y coordinate of the widget in the screen. | |
| unsigned | w_ |
| The width of the widget. | |
| unsigned | h_ |
| The height of the widget. | |
| bool | dirty_ |
| Is the widget dirty? When a widget is dirty it needs to be redrawn at the next drawing cycle, setting it to dirty also need to set it's parent dirty so at so point the toplevel parent knows which item to redraw. | |
| tvisible | visible_ |
| Field for the status of the visibility. | |
| tdrawing_action | drawing_action_ |
| Field for the action to do on a drawing request. | |
| SDL_Rect | clip_rect_ |
| The clip rect is a widget is partly visible. | |
| tpoint | layout_size_ |
| The best size for the control. | |
| std::string | linked_group_ |
| The linked group the widget belongs to. | |
| unsigned | debug_border_mode_ |
| Mode for drawing the debug border. | |
| unsigned | debug_border_color_ |
| The color for the debug border. | |
Friends | |
| class | tdebug_layout_graph |
| class | twindow |
Base class for all widgets.
From this abstract all other items should inherit. It contains the minimal info needed for a real widget and some pure abstract functions which need to be implemented by classes inheriting from this class.
Definition at line 49 of file widget.hpp.
Visibility set by the engine.
This state only will be used if the widget is visible, depending on this state the widget might not be visible after all.
Definition at line 109 of file widget.hpp.
Visibility settings done by the user.
Definition at line 75 of file widget.hpp.
| gui2::twidget::twidget | ( | ) |
Definition at line 25 of file widget.cpp.
References DBG_GUI_LF.
Referenced by gui2::tcontrol::create_walker().

| gui2::twidget::twidget | ( | const tbuilder_widget & | builder | ) | [explicit] |
Constructor.
| builder | The builder object with the settings for the object. |
Definition at line 49 of file widget.cpp.
References DBG_GUI_LF.
| gui2::twidget::~twidget | ( | ) | [virtual] |
Definition at line 73 of file widget.cpp.
References DBG_GUI_LF, gui2::event::tdispatcher::fire(), get_window(), id_, linked_group_, gui2::event::NOTIFY_REMOVAL, and parent().

| virtual tpoint gui2::twidget::calculate_best_size | ( | ) | const [private, pure virtual] |
Calculates the best size.
This function calculates the best size and ignores the current values in the layout phase. Note containers can call the get_best_size() of their children since it's meant to update itself.
| 0,0 | The best size is 0,0. |
Implemented in gui2::tcontainer_, gui2::tcontrol, gui2::tdrawing, gui2::tgenerator_, gui2::policy::placement::thorizontal_list, gui2::policy::placement::tvertical_list, gui2::policy::placement::tmatrix, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tpane, gui2::tscrollbar_container, gui2::tspacer, gui2::ttree_view_node, and gui2::tviewport.
Referenced by get_best_size().

| SDL_Rect gui2::twidget::calculate_blitting_rectangle | ( | const int | x_offset, | |
| const int | y_offset | |||
| ) |
Calculates the blitting rectangle of the widget.
The blitting rectangle is to entire widget rectangle, but offsetted for drawing position.
| x_offset | The x offset when drawn. | |
| y_offset | The y offset when drawn. |
Definition at line 291 of file widget.cpp.
References get_rect().
Referenced by draw_debug_border(), gui2::tcontrol::impl_draw_background(), gui2::tpanel::impl_draw_background(), gui2::tminimap::impl_draw_background(), and gui2::tpanel::impl_draw_foreground().


| SDL_Rect gui2::twidget::calculate_clipping_rectangle | ( | const int | x_offset, | |
| const int | y_offset | |||
| ) |
Calculates the clipping rectangle of the widget.
The clipping rectangle is used then the drawing_action_ is PARTLY_DRAWN. Since the drawing can be offsetted it also needs offset paramters.
| x_offset | The x offset when drawn. | |
| y_offset | The y offset when drawn. |
Definition at line 301 of file widget.cpp.
References clip_rect_.
Referenced by draw_background(), draw_children(), draw_debug_border(), and draw_foreground().

| virtual bool gui2::twidget::can_wrap | ( | ) | const [inline, virtual] |
Can the widget wrap.
When a widget can wrap it can reduce it's width by increasing it's height. When a layout is too wide it should first try to wrap and if that fails it should check the vertical scrollbar status. After wrapping the height might (probably will) change so the layout engine needs to recalculate.
Reimplemented in gui2::tcontainer_, gui2::tgrid, gui2::tlabel, and gui2::tscrollbar_container.
Definition at line 241 of file widget.hpp.
Referenced by gui2::tgrid::tchild::can_wrap(), gui2::tcontrol::get_best_text_size(), gui2::tcontrol::request_reduce_width(), gui2::tcontrol::update_canvas(), and gui2::ttext_box::update_canvas().

| virtual void gui2::twidget::child_populate_dirty_list | ( | twindow & | , | |
| const std::vector< twidget * > & | ||||
| ) | [inline, private, virtual] |
Tries to add all children of a container to the dirty list.
| caller | The parent window, if dirty it should register itself to this window. | |
| call_stack | The callstack of widgets traversed to reach this function. |
Reimplemented in gui2::tcontainer_, gui2::tgenerator_, gui2::tgrid, gui2::tlistbox, gui2::tpane, gui2::tscrollbar_container, gui2::ttree_view, and gui2::tviewport.
Definition at line 573 of file widget.hpp.
Referenced by populate_dirty_list().

| virtual iterator::twalker_* gui2::twidget::create_walker | ( | ) | [pure virtual] |
Creates a new walker object on the heap.
Implemented in gui2::tcontainer_, gui2::tcontrol, gui2::tgrid, gui2::tpane, gui2::ttree_view_node, and gui2::tviewport.
| virtual void gui2::twidget::demand_reduce_height | ( | const | unsigned | ) | [inline, virtual] |
Tries to reduce the height of a widget.
This function does it more aggressive and should only be used when using scrollbars failed.
| maximum_height | The wanted maximum height. |
Reimplemented in gui2::tcontainer_, and gui2::tgrid.
Definition at line 204 of file widget.hpp.
| virtual void gui2::twidget::demand_reduce_width | ( | const | unsigned | ) | [inline, virtual] |
Tries to reduce the width of a widget.
This function does it more aggressive and should only be used when using scrollbars and wrapping failed.
| maximum_width | The wanted maximum width. |
Reimplemented in gui2::tcontainer_, and gui2::tgrid.
Definition at line 177 of file widget.hpp.
| tdialog * gui2::twidget::dialog | ( | ) |
Returns the toplevel dialog.
A window is most of the time created by a dialog, this function returns that dialog.
| 0 | No toplevel window or the toplevel window is not owned by a dialog. |
Definition at line 218 of file widget.cpp.
References gui2::twindow::dialog(), and get_window().
Referenced by gui2::dialog_callback(), and gui2::dialog_view_callback().


| virtual bool gui2::twidget::disable_click_dismiss | ( | ) | const [pure virtual] |
Does the widget disable easy close?
Implemented in gui2::tcontainer_, gui2::tcontrol, gui2::tdrawing, gui2::tgrid, gui2::tlabel, gui2::tminimap, gui2::tpane, gui2::tprogress_bar, gui2::tscrollbar_container, gui2::tspacer, gui2::ttree_view_node, and gui2::tviewport.
Referenced by gui2::tgrid::disable_click_dismiss().

| void gui2::twidget::draw_background | ( | surface & | frame_buffer | ) |
Draws the background of a widget.
Subclasses should override impl_draw_background instead of changing this function.
| frame_buffer | The surface to draw upon. | |
| x_offset | The x offset in the frame_buffer to draw. | |
| y_offset | The y offset in the frame_buffer to draw. |
Definition at line 311 of file widget.cpp.
References clip_rect_, draw_debug_border(), drawing_action_, impl_draw_background(), PARTLY_DRAWN, VISIBLE, and visible_.
Referenced by gui2::tviewport::impl_draw_children(), and gui2::tgrid::impl_draw_children().


| void gui2::twidget::draw_background | ( | surface & | frame_buffer, | |
| int | x_offset, | |||
| int | y_offset | |||
| ) |
Definition at line 325 of file widget.cpp.
References calculate_clipping_rectangle(), draw_debug_border(), drawing_action_, impl_draw_background(), PARTLY_DRAWN, VISIBLE, and visible_.

| void gui2::twidget::draw_children | ( | surface & | frame_buffer | ) |
Draws the children of a widget.
Containers should draw their children when they get this request.
Subclasses should override impl_draw_children instead of changing this function.
| frame_buffer | The surface to draw upon. | |
| x_offset | The x offset in the frame_buffer to draw. | |
| y_offset | The y offset in the frame_buffer to draw. |
Definition at line 342 of file widget.cpp.
References clip_rect_, drawing_action_, impl_draw_children(), PARTLY_DRAWN, VISIBLE, and visible_.
Referenced by gui2::tviewport::impl_draw_children(), gui2::ttree_view_node::impl_draw_children(), gui2::tscrollbar_container::impl_draw_children(), gui2::tpane::impl_draw_children(), gui2::tgrid::impl_draw_children(), gui2::tgenerator< minimum_selection, maximum_selection, placement, select_action >::impl_draw_children(), and gui2::tcontainer_::impl_draw_children().


| void gui2::twidget::draw_children | ( | surface & | frame_buffer, | |
| int | x_offset, | |||
| int | y_offset | |||
| ) |
Definition at line 354 of file widget.cpp.
References calculate_clipping_rectangle(), drawing_action_, impl_draw_children(), PARTLY_DRAWN, VISIBLE, and visible_.

| void gui2::twidget::draw_debug_border | ( | surface & | frame_buffer | ) | [private] |
Definition at line 397 of file widget.cpp.
References clip_rect_, debug_border_color_, debug_border_mode_, draw_rectangle(), drawing_action_, get_rect(), PARTLY_DRAWN, and sdl_fill_rect().
Referenced by draw_background().


| void gui2::twidget::draw_debug_border | ( | surface & | frame_buffer, | |
| int | x_offset, | |||
| int | y_offset | |||
| ) | [private] |
Definition at line 418 of file widget.cpp.
References calculate_blitting_rectangle(), calculate_clipping_rectangle(), debug_border_color_, debug_border_mode_, draw_rectangle(), drawing_action_, PARTLY_DRAWN, and sdl_fill_rect().

| void gui2::twidget::draw_foreground | ( | surface & | frame_buffer | ) |
Draws the foreground of the widgt.
Some widgets eg panel and window have a back and foreground layer this function requests the drawing of the foreground.
Subclasses should override impl_draw_foreground instead of changing this function.
| frame_buffer | The surface to draw upon. | |
| x_offset | The x offset in the frame_buffer to draw. | |
| y_offset | The y offset in the frame_buffer to draw. |
Definition at line 369 of file widget.cpp.
References clip_rect_, drawing_action_, impl_draw_foreground(), PARTLY_DRAWN, VISIBLE, and visible_.
Referenced by gui2::tviewport::impl_draw_children(), and gui2::tgrid::impl_draw_children().


| void gui2::twidget::draw_foreground | ( | surface & | frame_buffer, | |
| int | x_offset, | |||
| int | y_offset | |||
| ) |
Definition at line 381 of file widget.cpp.
References calculate_clipping_rectangle(), drawing_action_, impl_draw_foreground(), PARTLY_DRAWN, VISIBLE, and visible_.

| virtual twidget* gui2::twidget::find | ( | const std::string & | id, | |
| const | bool | |||
| ) | [inline, virtual] |
Gets a widget with the wanted id.
| id | The id of the widget to find. | |
| must_be_active | The widget should be active, not all widgets have an active flag, those who don't ignore flag. |
| 0 | No widget with the id found (or not active if must_be_active was set). |
Reimplemented in gui2::tcontainer_, gui2::tcontrol, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tscrollbar_container, gui2::ttree_view_node, and gui2::tviewport.
Definition at line 299 of file widget.hpp.
References id_.
Referenced by gui2::tcontrol::find(), and find_widget().

| virtual const twidget* gui2::twidget::find | ( | const std::string & | id, | |
| const | bool | |||
| ) | const [inline, virtual] |
The const version of find.
Reimplemented in gui2::tcontainer_, gui2::tcontrol, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tscrollbar_container, gui2::ttree_view_node, and gui2::tviewport.
Definition at line 304 of file widget.hpp.
References id_.
Gets the widget at the wanted coordinates.
| coordinate | The coordinate which should be inside the widget. | |
| must_be_active | The widget should be active, not all widgets have an active flag, those who don't ignore flag. |
| 0 | No widget at the wanted coordinate found (or not active if must_be_active was set). |
Reimplemented in gui2::tcontainer_, gui2::tcontrol, gui2::tgenerator_, gui2::policy::placement::thorizontal_list, gui2::policy::placement::tvertical_list, gui2::policy::placement::tmatrix, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tpane, gui2::tscrollbar_container, gui2::ttree_view_node, and gui2::tviewport.
Definition at line 165 of file widget.cpp.
References is_at().
Referenced by gui2::tcontrol::find_at(), gui2::event::tmouse_button< sdl_button_down, sdl_button_up, button_down, button_up, button_click, button_double_click >::signal_handler_sdl_button_down(), and gui2::event::tmouse_button< sdl_button_down, sdl_button_up, button_down, button_up, button_click, button_double_click >::signal_handler_sdl_button_up().


| const twidget * gui2::twidget::find_at | ( | const tpoint & | coordinate, | |
| const bool | must_be_active | |||
| ) | const [virtual] |
The const version of find_at.
Reimplemented in gui2::tcontainer_, gui2::tcontrol, gui2::tgenerator_, gui2::policy::placement::thorizontal_list, gui2::policy::placement::tvertical_list, gui2::policy::placement::tmatrix, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tpane, gui2::tscrollbar_container, gui2::ttree_view_node, and gui2::tviewport.
Definition at line 171 of file widget.cpp.
References is_at().

| tpoint gui2::twidget::get_best_size | ( | ) | const |
Gets the best size for the widget.
During the layout phase a best size will be determined, several stages might change the best size. This function will return the currently best size as determined during the layout phase.
| 0,0 | The best size is 0,0. |
Definition at line 115 of file widget.cpp.
References calculate_best_size(), INVISIBLE, layout_size_, and visible_.
Referenced by gui2::ttree_view_node::calculate_best_size(), gui2::tscrollbar_container::calculate_best_size(), gui2::tcontainer_::calculate_best_size(), gui2::tgrid::tchild::get_best_size(), gui2::ttree_view_node::get_unfolded_size(), gui2::twindow_implementation::layout(), gui2::twindow::layout(), gui2::twindow::layout_linked_widgets(), gui2::tviewport::place(), gui2::ttree_view_node::place(), gui2::tscrollbar_container::place(), gui2::tgrid::tchild::place(), gui2::tpane::place_children(), gui2::tpane::place_or_set_origin_children(), gui2::tpane::prepare_placement(), gui2::tgrid::reduce_height(), gui2::tgrid::reduce_width(), gui2::tscrollbar_container::request_reduce_height(), gui2::tgrid::request_reduce_height(), gui2::tscrollbar_container::request_reduce_width(), gui2::tgrid::request_reduce_width(), gui2::tlistbox::set_content_size(), and gui2::tpane::signal_handler_request_placement().


| bool gui2::twidget::get_dirty | ( | ) | const [inline] |
Returns the dirty state for a widget, final function.
Definition at line 445 of file widget.hpp.
References dirty_.
| SDL_Rect gui2::twidget::get_dirty_rect | ( | ) | const |
Gets the dirty rect of the widget.
Depending on the drawing action it returns the rect this widget dirties while redrawing.
Definition at line 177 of file widget.cpp.
References clip_rect_, drawing_action_, DRAWN, and get_rect().

| twidget::tdrawing_action gui2::twidget::get_drawing_action | ( | ) | const |
Definition at line 271 of file widget.cpp.
References drawing_action_, h_, NOT_DRAWN, and w_.
Referenced by gui2::tgrid::impl_draw_children(), and populate_dirty_list().

| unsigned gui2::twidget::get_height | ( | ) | const [inline] |
Definition at line 367 of file widget.hpp.
References h_.
Referenced by gui2::tscrollbar_container::content_resize_height(), gui2::tvertical_scrollbar::get_length(), gui2::tcontrol::get_text_maximum_height(), gui2::tvertical_scrollbar::on_bar(), gui2::tslider::on_bar(), gui2::thorizontal_scrollbar::on_bar(), gui2::tslider::on_positioner(), gui2::thorizontal_scrollbar::on_positioner(), gui2::tscrollbar_container::place(), gui2::tlistbox::remove_row(), gui2::tscrollbar_container::show_content_rect(), and gui2::ttext_box::update_offsets().

| tpoint gui2::twidget::get_origin | ( | ) | const [inline] |
Returns the screen origin of the widget.
Definition at line 373 of file widget.hpp.
Referenced by gui2::tscrollbar_container::content_resize_request(), get_rect(), gui2::ttree_view::layout_children(), gui2::tlistbox::layout_children(), gui2::tscrollbar_container::place(), gui2::tscrollbar_container::set_origin(), and gui2::tlistbox::set_row_shown().

| SDL_Rect gui2::twidget::get_rect | ( | ) | const [inline] |
Gets the sizes in one rect structure.
Definition at line 376 of file widget.hpp.
References gui2::create_rect(), get_origin(), and get_size().
Referenced by calculate_blitting_rectangle(), gui2::twindow::draw(), draw_debug_border(), gui2::tcontainer_::get_client_rect(), gui2::ttoggle_panel::get_client_rect(), get_dirty_rect(), gui2::tlistbox::handle_key_down_arrow(), gui2::tlistbox::handle_key_left_arrow(), gui2::tlistbox::handle_key_right_arrow(), gui2::tlistbox::handle_key_up_arrow(), gui2::tcontrol::impl_draw_background(), gui2::tpanel::impl_draw_background(), gui2::tminimap::impl_draw_background(), gui2::tpanel::impl_draw_foreground(), place(), gui2::tscrollbar_container::place(), gui2::tlistbox::place(), set_visible_area(), gui2::tscrollbar_container::set_visible_area(), gui2::twindow::show(), and gui2::twindow::undraw().


| tpoint gui2::twidget::get_size | ( | ) | const [inline] |
Returns the size of the widget.
Definition at line 370 of file widget.hpp.
Referenced by gui2::ttree_view_node::add_child(), gui2::tscrollbar_container::content_resize_request(), gui2::ttree_view_node::get_folded_size(), get_rect(), gui2::ttree_view::layout_children(), gui2::tlistbox::layout_children(), gui2::tpane::place_or_set_origin_children(), gui2::ttree_view::remove_node(), gui2::ttree_view::resize_content(), gui2::tlistbox::resize_content(), gui2::ttree_view_node::set_origin(), and gui2::tlistbox::update_content_size().

| tvisible gui2::twidget::get_visible | ( | ) | const [inline] |
Definition at line 421 of file widget.hpp.
References visible_.
Referenced by gui2::ttree_view_node::calculate_best_size(), gui2::tscrollbar_container::calculate_best_size(), gui2::tgrid_implementation::cell_request_reduce_height(), gui2::tgrid_implementation::cell_request_reduce_width(), gui2::tscrollbar_container::content_resize_height(), gui2::tscrollbar_container::content_resize_request(), gui2::tscrollbar_container::content_resize_width(), gui2::tgrid::disable_click_dismiss(), gui2::tcontrol::disable_click_dismiss(), gui2::tgrid::tchild::get_best_size(), gui2::ttree_view_node::get_current_size(), gui2::ttree_view_node::get_unfolded_size(), gui2::tviewport::impl_draw_children(), gui2::tscrollbar_container::impl_draw_children(), gui2::tpane::impl_draw_children(), gui2::tgrid::impl_draw_children(), gui2::tgenerator< minimum_selection, maximum_selection, placement, select_action >::impl_draw_children(), gui2::tcontainer_::impl_draw_children(), gui2::tviewport::layout_init(), gui2::tpane::layout_init(), gui2::tgrid::tchild::layout_init(), gui2::tgenerator< minimum_selection, maximum_selection, placement, select_action >::layout_init(), gui2::tgrid::tchild::place(), gui2::tpane::place_children(), gui2::tpane::place_or_set_origin_children(), gui2::tpane::prepare_placement(), gui2::tlistbox::remove_row(), gui2::tscrollbar_container::request_reduce_height(), gui2::tscrollbar_container::request_reduce_width(), gui2::tpane::set_origin_children(), gui2::tpane::signal_handler_request_placement(), gui2::tscrollbar_container::signal_handler_sdl_wheel_down(), gui2::tscrollbar_container::signal_handler_sdl_wheel_left(), gui2::tscrollbar_container::signal_handler_sdl_wheel_right(), gui2::tscrollbar_container::signal_handler_sdl_wheel_up(), and gui2::tlistbox::update_content_size().

| unsigned gui2::twidget::get_width | ( | ) | const [inline] |
Definition at line 366 of file widget.hpp.
References w_.
Referenced by gui2::ttree_view_node::add_child(), gui2::tscrollbar_container::content_resize_width(), gui2::tslider::get_length(), gui2::thorizontal_scrollbar::get_length(), gui2::tcontrol::get_text_maximum_width(), gui2::tvertical_scrollbar::on_bar(), gui2::tslider::on_bar(), gui2::thorizontal_scrollbar::on_bar(), gui2::tvertical_scrollbar::on_positioner(), gui2::tscrollbar_container::place(), gui2::tscrollbar_container::show_content_rect(), and gui2::ttext_box::update_offsets().

| twindow * gui2::twidget::get_window | ( | ) |
Get the parent window.
| 0 | No parent window found. |
Definition at line 190 of file widget.cpp.
References parent_.
Referenced by gui2::tscrollbar_container::content_resize_height(), gui2::tscrollbar_container::content_resize_request(), gui2::tscrollbar_container::content_resize_width(), dialog(), gui2::dialog_callback(), gui2::dialog_view_callback(), layout_init(), gui2::tlistbox::list_item_clicked(), gui2::tscrollbar_::recalculate(), gui2::tlistbox::set_row_shown(), set_visible(), gui2::tbutton::signal_handler_left_button_click(), gui2::ttoggle_panel::signal_handler_left_button_double_click(), gui2::ttoggle_button::signal_handler_left_button_double_click(), gui2::tscrollbar_::signal_handler_left_button_down(), gui2::ttree_view::signal_handler_left_button_down(), gui2::ttext_box::signal_handler_left_button_down(), gui2::tscroll_label::signal_handler_left_button_down(), gui2::trepeating_button::signal_handler_left_button_down(), gui2::tbutton::signal_handler_left_button_down(), gui2::tscrollbar_::signal_handler_left_button_up(), gui2::tslider::signal_handler_left_button_up(), gui2::tpane::signal_handler_request_placement(), and ~twidget().

| const twindow * gui2::twidget::get_window | ( | ) | const |
| int gui2::twidget::get_x | ( | ) | const [inline] |
Definition at line 416 of file widget.hpp.
References x_.
Referenced by gui2::ttext_box::handle_mouse_selection(), gui2::tviewport::impl_draw_children(), place(), gui2::tscrollbar_container::scrollbar_moved(), gui2::tgrid::set_origin(), gui2::tscrollbar_container::show_content_rect(), gui2::tscrollbar_::signal_handler_left_button_down(), gui2::tscrollbar_::signal_handler_left_button_up(), and gui2::tscrollbar_::signal_handler_mouse_motion().

| int gui2::twidget::get_y | ( | ) | const [inline] |
Definition at line 418 of file widget.hpp.
References y_.
Referenced by gui2::ttext_box::handle_mouse_selection(), gui2::tviewport::impl_draw_children(), place(), gui2::tscrollbar_container::scrollbar_moved(), gui2::tgrid::set_origin(), gui2::tscrollbar_container::show_content_rect(), gui2::tscrollbar_::signal_handler_left_button_down(), gui2::tscrollbar_::signal_handler_left_button_up(), and gui2::tscrollbar_::signal_handler_mouse_motion().

| virtual bool gui2::twidget::has_widget | ( | const twidget * | widget | ) | const [inline, virtual] |
Does the widget contain the widget.
Widgets can be containers which have more widgets inside them, this function will traverse in those child widgets and tries to find the wanted widget.
| widget | Pointer to the widget to find. |
Reimplemented in gui2::tcontainer_, and gui2::tgrid.
Definition at line 318 of file widget.hpp.
Referenced by gui2::tgrid::has_widget().

| const std::string& gui2::twidget::id | ( | ) | const [inline] |
Definition at line 363 of file widget.hpp.
References id_.
Referenced by gui2::tcampaign_selection::campaign_selected(), connect_queue(), gui2::tgrid::tchild::id(), gui2::ttree_view_node::init_grid(), gui2::iterator::policy::order::ttop_down< visit_widget, visit_grid, visit_child >::next(), gui2::iterator::policy::order::tbottom_up< visit_widget, visit_grid, visit_child >::next(), place(), gui2::ttext_box::signal_handler_mouse_motion(), gui2::ttoggle_panel::signal_handler_pre_left_button_click(), gui2::iterator::policy::order::tbottom_up< visit_widget, visit_grid, visit_child >::tbottom_up(), and gui2::iterator::policy::order::ttop_down< visit_widget, visit_grid, visit_child >::up().

| virtual void gui2::twidget::impl_draw_background | ( | surface & | ) | [inline, private, virtual] |
See draw_background().
Reimplemented in gui2::tcontrol, gui2::tminimap, gui2::tmulti_page, gui2::tpanel, and gui2::tspacer.
Definition at line 693 of file widget.hpp.
Referenced by draw_background().

| virtual void gui2::twidget::impl_draw_background | ( | surface & | , | |
| int | , | |||
| int | ||||
| ) | [inline, private, virtual] |
Reimplemented in gui2::tcontrol, gui2::tminimap, gui2::tmulti_page, gui2::tpanel, and gui2::tspacer.
Definition at line 694 of file widget.hpp.
| virtual void gui2::twidget::impl_draw_children | ( | surface & | ) | [inline, private, virtual] |
See draw_children.
Reimplemented in gui2::tcontainer_, gui2::tgenerator_, gui2::tgrid, gui2::tscrollbar_container, and gui2::ttree_view_node.
Definition at line 702 of file widget.hpp.
Referenced by draw_children().

| virtual void gui2::twidget::impl_draw_children | ( | surface & | , | |
| int | , | |||
| int | ||||
| ) | [inline, private, virtual] |
Reimplemented in gui2::tcontainer_, gui2::tgenerator_, gui2::tgrid, gui2::tpane, gui2::tscrollbar_container, gui2::ttree_view_node, and gui2::tviewport.
Definition at line 703 of file widget.hpp.
| virtual void gui2::twidget::impl_draw_foreground | ( | surface & | , | |
| int | , | |||
| int | ||||
| ) | [inline, private, virtual] |
Reimplemented in gui2::tcontrol, and gui2::tpanel.
Definition at line 712 of file widget.hpp.
| virtual void gui2::twidget::impl_draw_foreground | ( | surface & | ) | [inline, private, virtual] |
See draw_foreground.
Reimplemented in gui2::tcontrol, and gui2::tpanel.
Definition at line 711 of file widget.hpp.
Referenced by draw_foreground().

| bool gui2::twidget::is_at | ( | const tpoint & | coordinate, | |
| const bool | must_be_active | |||
| ) | const [private] |
Is the coordinate inside our area.
Helper for find_at so also looks at our visibility.
| coordinate | The coordinate which should be inside the widget. | |
| must_be_active | The widget should be active, not all widgets have an active flag, those who don't ignore flag. |
Definition at line 444 of file widget.cpp.
References h_, HIDDEN, INVISIBLE, visible_, w_, gui2::tpoint::x, x_, gui2::tpoint::y, and y_.
| virtual bool gui2::twidget::is_at | ( | const tpoint & | coordinate | ) | const [inline, private, virtual] |
(Will be) inherited from event::tdispatcher.
Implements gui2::event::tdispatcher.
Definition at line 720 of file widget.hpp.
Referenced by find_at().

| virtual void gui2::twidget::layout_children | ( | ) | [inline, virtual] |
Allows a widget to update its children.
Before the window is populating the dirty list the widgets can update their content, which allows delayed initialization. This delayed initialization is only allowed if the widget resizes itself, not when being placed.
Reimplemented in gui2::tcontainer_, gui2::tgrid, gui2::tlistbox, gui2::tscrollbar_container, gui2::tstacked_widget, and gui2::ttree_view.
Definition at line 542 of file widget.hpp.
Referenced by gui2::tgrid::layout_children().

| void gui2::twidget::layout_init | ( | const bool | full_initialization | ) | [virtual] |
How the layout engine works.
Every widget has a member layout_size_ which holds the best size in the current layout phase. When the windows starts the layout phase it calls layout_init() which resets this value.
Every widget has two function to get the best size. get_best_size() tests whether layout_size_ is set and if so returns that value otherwise it calls calculate_best_size() so the size can be updated.
During the layout phase some functions can modify layout_size_ so the next call to get_best_size() returns the currently best size. This means that after the layout phase get_best_size() still returns this value. Initializes the layout phase.
Clears the initial best size for the widgets.
| full_initialization | For widgets with scrollbars it hides them unless the mode is tscrollbar_mode::always_visible. For other widgets this flag is a NOP. |
Reimplemented in gui2::tcontainer_, gui2::tcontrol, gui2::tgenerator_, gui2::tgrid, gui2::tpane, gui2::tscrollbar_container, and gui2::tviewport.
Definition at line 104 of file widget.cpp.
References gui2::twindow::add_linked_widget(), get_window(), INVISIBLE, layout_size_, linked_group_, and visible_.
Referenced by gui2::tviewport::layout_init(), and gui2::tgrid::tchild::layout_init().


| const tpoint& gui2::twidget::layout_size | ( | ) | const [inline, protected] |
Definition at line 579 of file widget.hpp.
References layout_size_.
| void gui2::twidget::move | ( | const int | x_offset, | |
| const int | y_offset | |||
| ) | [virtual] |
Moves a widget.
This function can be used to move the widget without dirtying it.
| x_offset | The amount of pixels to move the widget in the x direction. | |
| y_offset | The amount of pixels to move the widget in the y direction. |
Definition at line 184 of file widget.cpp.
| twidget* gui2::twidget::parent | ( | ) | [inline] |
Definition at line 360 of file widget.hpp.
References parent_.
Referenced by gui2::event::implementation::build_event_chain(), gui2::get_parent(), place(), and ~twidget().

Places the widget.
This function is normally called by a layout function to do the placement of a widget.
| origin | The position of top left of the widget. | |
| size | The size of the widget. |
Reimplemented in gui2::tcontainer_, gui2::tcontrol, gui2::tgenerator_, gui2::policy::placement::thorizontal_list, gui2::policy::placement::tvertical_list, gui2::policy::placement::tmatrix, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tlistbox, gui2::tpane, gui2::tscrollbar_, gui2::tscrollbar_container, gui2::ttext_box, gui2::ttree_view_node, and gui2::tviewport.
Definition at line 130 of file widget.cpp.
References get_rect(), get_x(), get_y(), h_, id(), parent(), set_dirty(), w_, gui2::tpoint::x, x_, gui2::tpoint::y, and y_.
Referenced by gui2::tviewport::place(), and gui2::tgrid::tchild::place().


Adds a widget to the dirty list if it is dirty.
See twindow::dirty_list_ for more info on the dirty list.
If the widget is not dirty and has children it should add itself to the call_stack and call child_populate_dirty_list with the new call_stack.
| caller | The parent window, if dirty it should register itself to this window. | |
| call_stack | The callstack of widgets traversed to reach this function. |
Definition at line 224 of file widget.cpp.
References gui2::twindow::add_to_dirty_list(), child_populate_dirty_list(), dirty_, get_drawing_action(), VISIBLE, and visible_.
Referenced by gui2::tviewport::child_populate_dirty_list(), gui2::tscrollbar_container::child_populate_dirty_list(), gui2::tpane::child_populate_dirty_list(), gui2::tgrid::child_populate_dirty_list(), gui2::tgenerator< minimum_selection, maximum_selection, placement, select_action >::child_populate_dirty_list(), gui2::tcontainer_::child_populate_dirty_list(), gui2::tlistbox::child_populate_dirty_list(), gui2::twindow::draw(), and gui2::ttree_view_node::impl_populate_dirty_list().


| virtual void gui2::twidget::request_reduce_height | ( | const | unsigned | ) | [inline, virtual] |
Tries to reduce the height of a widget.
This function tries to do it 'friendly' and only use scrollbars.
| maximum_height | The wanted maximum height. |
Reimplemented in gui2::tcontainer_, gui2::tgenerator_, gui2::policy::placement::thorizontal_list, gui2::policy::placement::tvertical_list, gui2::policy::placement::tmatrix, gui2::policy::placement::tindependent, gui2::tgrid, and gui2::tscrollbar_container.
Definition at line 190 of file widget.hpp.
Referenced by gui2::tgrid_implementation::cell_request_reduce_height().

| virtual void gui2::twidget::request_reduce_width | ( | const unsigned | maximum_width | ) | [pure virtual] |
Tries to reduce the width of a widget.
This function tries to do it 'friendly' and only use scrollbars or wrapping of the widget.
| maximum_width | The wanted maximum width. |
Implemented in gui2::tcontainer_, gui2::tcontrol, gui2::tgenerator_, gui2::policy::placement::thorizontal_list, gui2::policy::placement::tvertical_list, gui2::policy::placement::tmatrix, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tpane, gui2::tscrollbar_container, gui2::ttree_view_node, and gui2::tviewport.
Referenced by gui2::tgrid_implementation::cell_request_reduce_width().

| void gui2::twidget::set_debug_border_color | ( | const unsigned | debug_border_color | ) | [inline] |
Definition at line 453 of file widget.hpp.
References debug_border_color_.
Referenced by gui2::implementation::tbuilder_control::init_control().

| void gui2::twidget::set_debug_border_mode | ( | const unsigned | debug_border_mode | ) | [inline] |
Definition at line 448 of file widget.hpp.
References debug_border_mode_.
Referenced by gui2::implementation::tbuilder_control::init_control().

| void gui2::twidget::set_dirty | ( | const bool | dirty = true |
) | [inline] |
Sets the widgets dirty state.
Definition at line 439 of file widget.hpp.
References dirty_.
Referenced by gui2::animate_logo(), gui2::ttext_box::handle_mouse_selection(), gui2::tviewport::impl_draw_children(), gui2::tgrid::impl_draw_children(), gui2::ttext_::insert_char(), gui2::tlistbox::layout_children(), gui2::ttext_::paste_selection(), place(), gui2::tpassword_box::post_function(), gui2::ttree_view::resize_content(), gui2::tlistbox::resize_content(), gui2::tscrollbar_container::scrollbar_moved(), gui2::tcontainer_::set_active(), gui2::tslider::set_best_slider_length(), gui2::tgrid::set_column_grow_factor(), gui2::ttext_::set_cursor(), gui2::tcontrol::set_label(), gui2::tminimap::set_map_data(), gui2::ttext_::set_maximum_length(), gui2::tgrid::set_row_grow_factor(), gui2::tlistbox::set_row_shown(), gui2::ttext_::set_selection_length(), gui2::ttext_::set_selection_start(), set_size(), gui2::ttext_::set_state(), gui2::tscrollbar_::set_state(), gui2::ttoggle_panel::set_state(), gui2::ttoggle_button::set_state(), gui2::trepeating_button::set_state(), gui2::tlabel::set_state(), gui2::tbutton::set_state(), gui2::tcontrol::set_text_alignment(), gui2::tcontrol::set_use_markup(), gui2::ttext_::set_value(), gui2::twindow::set_variable(), set_visible(), gui2::tdebug_clock::ttime::ttime(), gui2::tscrollbar_::update_canvas(), gui2::ttoggle_button::update_canvas(), gui2::tlistbox::update_content_size(), and gui2::teditor_settings::update_tod_display().

| void gui2::twidget::set_id | ( | const std::string & | id | ) |
Definition at line 91 of file widget.cpp.
References DBG_GUI_LF, and id_.
Referenced by add_widget(), BOOST_AUTO_TEST_CASE(), gui2::tbuilder_grid::build(), gui2::implementation::tbuilder_control::init_control(), and gui2::tcontrol::set_members().

| void gui2::twidget::set_layout_size | ( | const tpoint & | size | ) | [inline, protected] |
Definition at line 578 of file widget.hpp.
References layout_size_.
Referenced by gui2::twindow::layout_linked_widgets(), gui2::tgrid::recalculate_best_size(), gui2::tscrollbar_container::request_reduce_height(), gui2::tgrid::request_reduce_height(), gui2::tscrollbar_container::request_reduce_width(), gui2::tgrid::request_reduce_width(), gui2::tcontrol::request_reduce_width(), and gui2::tcontrol::set_label().

| void gui2::twidget::set_linked_group | ( | const std::string & | linked_group | ) | [inline] |
Definition at line 583 of file widget.hpp.
References linked_group_.
Referenced by gui2::tbuilder_grid::build(), gui2::implementation::tbuilder_control::init_control(), and gui2::tcontrol::set_members().

| virtual void gui2::twidget::set_origin | ( | const tpoint & | origin | ) | [inline, virtual] |
Sets the origin of the widget.
This function can be used to move the widget without dirting it.
| origin | The new origin. |
Reimplemented in gui2::tcontainer_, gui2::tgenerator_, gui2::policy::placement::thorizontal_list, gui2::policy::placement::tvertical_list, gui2::policy::placement::tmatrix, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tscrollbar_container, and gui2::ttree_view_node.
Definition at line 396 of file widget.hpp.
References gui2::tpoint::x, x_, gui2::tpoint::y, and y_.
Referenced by gui2::tgrid::set_origin().

| void gui2::twidget::set_parent | ( | twidget * | parent | ) | [inline] |
Definition at line 361 of file widget.hpp.
References parent_.
Referenced by gui2::tpane::create_item(), gui2::tscrollbar_container::finalize_setup(), gui2::tgenerator< minimum_selection, maximum_selection, placement, select_action >::init(), gui2::tgrid::set_child(), gui2::tgrid::swap_child(), gui2::tcontainer_::tcontainer_(), gui2::ttree_view_node::ttree_view_node(), and gui2::tviewport::tviewport().

| void gui2::twidget::set_size | ( | const tpoint & | size | ) | [virtual] |
Sets the size of the widget.
This version is meant to resize a widget, since the origin isn't modified. This can be used if a widget needs to change its size and the layout will be fixed later.
| size | The size of the widget. |
Definition at line 154 of file widget.cpp.
References h_, set_dirty(), w_, gui2::tpoint::x, and gui2::tpoint::y.
Referenced by gui2::ttree_view_node::place(), gui2::ttree_view::resize_content(), and gui2::tlistbox::resize_content().


| void gui2::twidget::set_visible | ( | const tvisible | visible | ) |
Definition at line 246 of file widget.cpp.
References gui2::event::tdispatcher::fire(), get_window(), gui2::twindow::invalidate_layout(), INVISIBLE, gui2::new_widgets, gui2::event::REQUEST_PLACEMENT, set_dirty(), and visible_.
Referenced by gui2::tpane::filter(), gui2::tmessage_implementation::init_button(), gui2::twindow::layout(), gui2::tscrollbar_container::layout_init(), gui2::twml_message_::pre_show(), gui2::ttitle_screen::pre_show(), gui2::tlobby_player_info::pre_show(), gui2::tscrollbar_container::request_reduce_height(), gui2::tscrollbar_container::request_reduce_width(), gui2::policy::select_action::tshow::select(), gui2::set_scrollbar_mode(), gui2::tsub_player_list::show_toggle_callback(), and gui2::ttree_view_node::ttree_view_node().


| void gui2::twidget::set_visible_area | ( | const SDL_Rect & | area | ) | [virtual] |
Sets the visible area for a widget.
This function sets the drawing_state_ and the clip_rect_.
| area | The visible area in screen coordinates. |
Reimplemented in gui2::tcontainer_, gui2::tgenerator_, gui2::policy::placement::thorizontal_list, gui2::policy::placement::tvertical_list, gui2::policy::placement::tmatrix, gui2::policy::placement::tindependent, gui2::tgrid, gui2::tscrollbar_container, and gui2::ttree_view_node.
Definition at line 278 of file widget.cpp.
References clip_rect_, drawing_action_, get_rect(), and intersect_rects().
Referenced by gui2::tgrid::set_visible_area().


friend class tdebug_layout_graph [friend] |
Reimplemented in gui2::tcontainer_, gui2::tcontrol, gui2::tgenerator_, gui2::tgrid, gui2::tlistbox, gui2::tmulti_page, gui2::tscrollbar_container, and gui2::tstacked_widget.
Definition at line 54 of file widget.hpp.
friend class twindow [friend] |
Reimplemented in gui2::tcontrol.
Definition at line 55 of file widget.hpp.
SDL_Rect gui2::twidget::clip_rect_ [private] |
The clip rect is a widget is partly visible.
Definition at line 635 of file widget.hpp.
Referenced by calculate_clipping_rectangle(), draw_background(), draw_children(), draw_debug_border(), draw_foreground(), get_dirty_rect(), and set_visible_area().
unsigned gui2::twidget::debug_border_color_ [private] |
The color for the debug border.
Definition at line 673 of file widget.hpp.
Referenced by draw_debug_border(), and set_debug_border_color().
unsigned gui2::twidget::debug_border_mode_ [private] |
Mode for drawing the debug border.
The debug border is a helper border to determine where a widget is placed. It's only intended for debugging purposes.
Possible values:
Definition at line 670 of file widget.hpp.
Referenced by draw_debug_border(), and set_debug_border_mode().
bool gui2::twidget::dirty_ [private] |
Is the widget dirty? When a widget is dirty it needs to be redrawn at the next drawing cycle, setting it to dirty also need to set it's parent dirty so at so point the toplevel parent knows which item to redraw.
NOTE dirtying the parent might be inefficient and this behaviour might be optimized later on.
Definition at line 626 of file widget.hpp.
Referenced by get_dirty(), populate_dirty_list(), and set_dirty().
Field for the action to do on a drawing request.
Definition at line 632 of file widget.hpp.
Referenced by draw_background(), draw_children(), draw_debug_border(), draw_foreground(), get_dirty_rect(), get_drawing_action(), and set_visible_area().
unsigned gui2::twidget::h_ [private] |
The height of the widget.
Definition at line 616 of file widget.hpp.
Referenced by get_drawing_action(), get_height(), get_size(), is_at(), place(), and set_size().
std::string gui2::twidget::id_ [private] |
The id is the unique name of the widget in a certain context.
This is needed for certain widgets so the engine knows which widget is which. Eg it knows which button is pressed and thus which engine action is connected to the button. This doesn't mean that the id is unique in a window, eg a listbox can have the same id for every row.
Definition at line 598 of file widget.hpp.
Referenced by find(), id(), set_id(), and ~twidget().
tpoint gui2::twidget::layout_size_ [private] |
The best size for the control.
When 0,0 the real best size is returned, but in the layout phase a wrapping or a scrollbar might change the best size for that widget. This variable holds that best value.
Definition at line 644 of file widget.hpp.
Referenced by get_best_size(), layout_init(), layout_size(), and set_layout_size().
std::string gui2::twidget::linked_group_ [private] |
The linked group the widget belongs to.
Definition at line 656 of file widget.hpp.
Referenced by layout_init(), set_linked_group(), and ~twidget().
twidget* gui2::twidget::parent_ [private] |
The parent widget, if the widget has a parent it contains a pointer to the parent, else it's set to NULL.
Definition at line 604 of file widget.hpp.
Referenced by get_window(), parent(), and set_parent().
tvisible gui2::twidget::visible_ [private] |
Field for the status of the visibility.
Definition at line 629 of file widget.hpp.
Referenced by draw_background(), draw_children(), draw_foreground(), get_best_size(), get_visible(), is_at(), layout_init(), populate_dirty_list(), and set_visible().
unsigned gui2::twidget::w_ [private] |
The width of the widget.
Definition at line 613 of file widget.hpp.
Referenced by get_drawing_action(), get_size(), get_width(), is_at(), place(), and set_size().
int gui2::twidget::x_ [private] |
The x coordinate of the widget in the screen.
Definition at line 607 of file widget.hpp.
Referenced by get_origin(), get_x(), is_at(), move(), place(), and set_origin().
int gui2::twidget::y_ [private] |
The y coordinate of the widget in the screen.
Definition at line 610 of file widget.hpp.
Referenced by get_origin(), get_y(), is_at(), move(), place(), and set_origin().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:23:47 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |