Public Member Functions | Private Member Functions | Private Attributes | Friends

gui2::tgrid::tchild Class Reference

Child item of the grid. More...

Collaboration diagram for gui2::tgrid::tchild:
Collaboration graph
[legend]

List of all members.

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

Friends

struct tgrid_implementation

Detailed Description

Child item of the grid.

Definition at line 293 of file grid.hpp.


Constructor & Destructor Documentation

gui2::tgrid::tchild::tchild (  )  [inline]

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

References gui2::twidget::can_wrap(), and widget_.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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]

Definition at line 327 of file grid.hpp.

References flags_.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tgrid::tchild::place ( tpoint  origin,
tpoint  size 
)
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().

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

twidget* gui2::tgrid::tchild::widget (  )  [inline]

Definition at line 335 of file grid.hpp.

References widget_.

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

Friends And Related Function Documentation

friend struct tgrid_implementation [friend]

Definition at line 295 of file grid.hpp.


Member Data Documentation

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

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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:22:55 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs