Child item of the grid. More...
Public Member Functions | |
tchild () | |
tpoint | get_best_size () const |
Returns the best size for the cell. More... | |
void | place (tpoint origin, tpoint size) |
Places the widget in the cell. More... | |
void | layout_initialise (const bool full_initialisation) |
Forwards tgrid::layout_initialise to the cell. More... | |
bool | can_wrap () const |
Returns the can_wrap for the cell. More... | |
const std::string & | id () const |
Returns the id of the widget/. More... | |
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. More... | |
Private Attributes | |
unsigned | flags_ |
The flags for the border and cell setup. More... | |
unsigned | border_size_ |
The size of the border, the actual configuration of the border is determined by the flags. More... | |
twidget * | widget_ |
Pointer to the widget. More... | |
Friends | |
struct | tgrid_implementation |
|
private |
Returns the space needed for the border.
Definition at line 866 of file grid.cpp.
References gui2::tgrid::BORDER_BOTTOM, gui2::tgrid::BORDER_LEFT, gui2::tgrid::BORDER_RIGHT, gui2::tgrid::BORDER_TOP, 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().
|
inline |
Returns the can_wrap for the cell.
Definition at line 336 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 697 of file grid.cpp.
References border_space(), DBG_GUI_L, gui2::twidget::get_best_size(), gui2::twidget::get_visible(), gui2::twidget::tvisible::invisible, 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().
|
inline |
Definition at line 353 of file grid.hpp.
References border_size_.
|
inline |
const std::string & gui2::tgrid::tchild::id | ( | ) | const |
Returns the id of the widget/.
Definition at line 860 of file grid.cpp.
Referenced by gui2::tgrid::remove_child(), gui2::tgrid::set_child(), and gui2::tgrid::swap_child().
void gui2::tgrid::tchild::layout_initialise | ( | const bool | full_initialisation | ) |
Forwards tgrid::layout_initialise to the cell.
Definition at line 851 of file grid.cpp.
References gui2::twidget::tvisible::invisible.
Referenced by gui2::tgrid::layout_initialise().
Places the widget in the cell.
origin | The origin (x, y) for the widget. |
size | The size for the widget. |
Definition at line 722 of file grid.cpp.
References gui2::tgrid::BORDER_BOTTOM, gui2::tgrid::BORDER_LEFT, gui2::tgrid::BORDER_RIGHT, gui2::tgrid::BORDER_TOP, DBG_GUI_L, ERR_GUI_L, 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::tvisible::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, gui2::tgrid::widget(), gui2::tpoint::x, and gui2::tpoint::y.
Referenced by gui2::tgrid::layout().
|
inline |
Definition at line 357 of file grid.hpp.
References border_size_.
Referenced by gui2::tgrid::set_child().
|
inline |
Definition at line 371 of file grid.hpp.
References widget(), and widget_.
Referenced by gui2::tgrid::remove_child(), gui2::tgrid::set_child(), and gui2::tgrid::swap_child().
|
inline |
Definition at line 362 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(), gui2::tgrid::remove_child(), gui2::tgrid::set_active(), gui2::tgrid::set_child(), gui2::tgrid::set_origin(), gui2::tgrid::set_visible_rectangle(), set_widget(), gui2::tgrid::swap_child(), gui2::tgrid::widget(), and gui2::tgrid::~tgrid().
|
inline |
|
friend |
|
private |
The size of the border, the actual configuration of the border is determined by the flags.
Definition at line 384 of file grid.hpp.
Referenced by get_border_size(), and set_border_size().
|
private |
The flags for the border and cell setup.
Definition at line 378 of file grid.hpp.
Referenced by get_flags(), and set_flags().
|
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 392 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(), set_widget(), and widget().