The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
gui2::tgrid::tchild Class Reference

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::stringid () 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 twidgetwidget () const
 
twidgetwidget ()
 
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...
 
twidgetwidget_
 Pointer to the widget. More...
 

Friends

struct tgrid_implementation
 

Detailed Description

Child item of the grid.

Definition at line 309 of file grid.hpp.

Constructor & Destructor Documentation

gui2::tgrid::tchild::tchild ( )
inline

Definition at line 314 of file grid.hpp.

Member Function Documentation

tpoint gui2::tgrid::tchild::border_space ( ) const
private
bool gui2::tgrid::tchild::can_wrap ( ) const
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
unsigned gui2::tgrid::tchild::get_border_size ( ) const
inline

Definition at line 353 of file grid.hpp.

References border_size_.

unsigned gui2::tgrid::tchild::get_flags ( ) const
inline

Definition at line 344 of file grid.hpp.

References flags_.

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().

void gui2::tgrid::tchild::place ( tpoint  origin,
tpoint  size 
)
void gui2::tgrid::tchild::set_border_size ( const unsigned  border_size)
inline

Definition at line 357 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 348 of file grid.hpp.

References flags_.

Referenced by gui2::tgrid::set_child().

void gui2::tgrid::tchild::set_widget ( twidget widget)
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().

const twidget* gui2::tgrid::tchild::widget ( ) const
inline
twidget* gui2::tgrid::tchild::widget ( )
inline

Definition at line 366 of file grid.hpp.

References widget_.

Friends And Related Function Documentation

friend struct tgrid_implementation
friend

Definition at line 311 of file grid.hpp.

Member Data Documentation

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 384 of file grid.hpp.

Referenced by get_border_size(), and set_border_size().

unsigned gui2::tgrid::tchild::flags_
private

The flags for the border and cell setup.

Definition at line 378 of file grid.hpp.

Referenced by get_flags(), 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 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().


The documentation for this class was generated from the following files: