Child item of the grid. More...

Public Member Functions | |
| tchild () | |
| tpoint | get_best_size () const |
| Returns the best size for the cell. | |
| void | place (tpoint origin, tpoint size) |
| Places the widget in the cell. | |
| void | layout_init (const bool full_initialization) |
| Forwards layout_init() to the cell. | |
| bool | can_wrap () const |
| Returns the can_wrap for the cell. | |
| const std::string & | id () const |
| Returns the id of the widget/. | |
| unsigned | get_flags () const |
| void | set_flags (const unsigned flags) |
| unsigned | get_border_size () const |
| void | set_border_size (const unsigned border_size) |
| const twidget * | widget () const |
| twidget * | widget () |
| void | set_widget (twidget *widget) |
Private Member Functions | |
| tpoint | border_space () const |
| Returns the space needed for the border. | |
Private Attributes | |
| unsigned | flags_ |
| The flags for the border and cell setup. | |
| unsigned | border_size_ |
| The size of the border, the actual configuration of the border is determined by the flags. | |
| twidget * | widget_ |
| Pointer to the widget. | |
Friends | |
| struct | tgrid_implementation |
Child item of the grid.
Definition at line 293 of file grid.hpp.
| tpoint gui2::tgrid::tchild::border_space | ( | ) | const [private] |
Returns the space needed for the border.
Definition at line 888 of file grid.cpp.
References gui2::tgrid::BORDER_BOTTOM, gui2::tgrid::BORDER_LEFT, gui2::tgrid::BORDER_RIGHT, border_size_, gui2::tgrid::BORDER_TOP, flags_, gui2::tpoint::x, and gui2::tpoint::y.
Referenced by gui2::tgrid_implementation::cell_request_reduce_height(), gui2::tgrid_implementation::cell_request_reduce_width(), and get_best_size().

| bool gui2::tgrid::tchild::can_wrap | ( | ) | const [inline] |
Returns the can_wrap for the cell.
Definition at line 321 of file grid.hpp.
References gui2::twidget::can_wrap(), and widget_.
Referenced by gui2::tgrid::can_wrap().


| tpoint gui2::tgrid::tchild::get_best_size | ( | ) | const |
Returns the best size for the cell.
Definition at line 701 of file grid.cpp.
References border_space(), DBG_GUI_L, gui2::twidget::get_best_size(), gui2::twidget::get_visible(), LOG_CHILD_HEADER, LOG_CHILD_SCOPE_HEADER, gui2::log_gui_layout, log_scope2, and widget_.
Referenced by gui2::tgrid::calculate_best_size(), gui2::tgrid_implementation::column_request_reduce_width(), and gui2::tgrid_implementation::row_request_reduce_height().


| unsigned gui2::tgrid::tchild::get_border_size | ( | ) | const [inline] |
Definition at line 330 of file grid.hpp.
References border_size_.
| unsigned gui2::tgrid::tchild::get_flags | ( | ) | const [inline] |
| const std::string & gui2::tgrid::tchild::id | ( | ) | const |
Returns the id of the widget/.
Definition at line 882 of file grid.cpp.
References gui2::twidget::id(), and widget_.
Referenced by gui2::tgrid::remove_child(), gui2::tgrid::set_child(), and gui2::tgrid::swap_child().


| void gui2::tgrid::tchild::layout_init | ( | const bool | full_initialization | ) |
Forwards layout_init() to the cell.
Definition at line 873 of file grid.cpp.
References gui2::twidget::get_visible(), gui2::twidget::layout_init(), and widget_.
Referenced by gui2::tgrid::layout_init().


Places the widget in the cell.
| origin | The origin (x, y) for the widget. | |
| size | The size for the widget. |
Definition at line 732 of file grid.cpp.
References gui2::tgrid::BORDER_BOTTOM, gui2::tgrid::BORDER_LEFT, gui2::tgrid::BORDER_RIGHT, border_size_, gui2::tgrid::BORDER_TOP, DBG_GUI_L, ERR_GUI_L, flags_, gui2::twidget::get_best_size(), gui2::tcontrol::get_config_maximum_size(), gui2::twidget::get_visible(), gui2::tgrid::HORIZONTAL_ALIGN_CENTER, gui2::tgrid::HORIZONTAL_ALIGN_LEFT, gui2::tgrid::HORIZONTAL_ALIGN_RIGHT, gui2::tgrid::HORIZONTAL_GROW_SEND_TO_CLIENT, gui2::tgrid::HORIZONTAL_MASK, gui2::twidget::INVISIBLE, LOG_CHILD_HEADER, gui2::twidget::place(), gui2::tgrid::VERTICAL_ALIGN_BOTTOM, gui2::tgrid::VERTICAL_ALIGN_CENTER, gui2::tgrid::VERTICAL_ALIGN_TOP, gui2::tgrid::VERTICAL_GROW_SEND_TO_CLIENT, gui2::tgrid::VERTICAL_MASK, widget(), gui2::tpoint::x, and gui2::tpoint::y.
Referenced by gui2::tgrid::layout().


| void gui2::tgrid::tchild::set_border_size | ( | const unsigned | border_size | ) | [inline] |
Definition at line 331 of file grid.hpp.
References border_size_.
Referenced by gui2::tgrid::set_child().

| void gui2::tgrid::tchild::set_flags | ( | const unsigned | flags | ) | [inline] |
Definition at line 328 of file grid.hpp.
References flags_.
Referenced by gui2::tgrid::set_child().

| void gui2::tgrid::tchild::set_widget | ( | twidget * | widget | ) | [inline] |
Definition at line 337 of file grid.hpp.
References widget_.
Referenced by gui2::tgrid::remove_child(), gui2::tgrid::set_child(), and gui2::tgrid::swap_child().

| twidget* gui2::tgrid::tchild::widget | ( | ) | [inline] |
| const twidget* gui2::tgrid::tchild::widget | ( | ) | const [inline] |
Definition at line 334 of file grid.hpp.
References widget_.
Referenced by gui2::tgrid::child_populate_dirty_list(), gui2::tgrid::disable_click_dismiss(), gui2::tgrid::has_widget(), gui2::tgrid::impl_draw_children(), gui2::tgrid::layout_children(), place(), gui2::tgrid::remove_child(), gui2::tgrid::set_active(), gui2::tgrid::set_child(), gui2::tgrid::set_origin(), gui2::tgrid::set_visible_area(), gui2::tgrid::swap_child(), gui2::tgrid::widget(), and gui2::tgrid::~tgrid().

friend struct tgrid_implementation [friend] |
unsigned gui2::tgrid::tchild::border_size_ [private] |
The size of the border, the actual configuration of the border is determined by the flags.
Definition at line 347 of file grid.hpp.
Referenced by border_space(), get_border_size(), place(), and set_border_size().
unsigned gui2::tgrid::tchild::flags_ [private] |
The flags for the border and cell setup.
Definition at line 341 of file grid.hpp.
Referenced by border_space(), get_flags(), place(), and set_flags().
twidget* gui2::tgrid::tchild::widget_ [private] |
Pointer to the widget.
Once the widget is assigned to the grid we own the widget and are responsible for it's destruction.
Definition at line 355 of file grid.hpp.
Referenced by can_wrap(), gui2::tgrid_implementation::cell_request_reduce_height(), gui2::tgrid_implementation::cell_request_reduce_width(), get_best_size(), id(), layout_init(), set_widget(), and widget().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:22:55 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |