gui2::tgrid::tchild Class Reference

Collaboration diagram for gui2::tgrid::tchild:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 tchild ()
const std::string & id () const
void set_id (const std::string &id)
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)
tpoint get_best_size () const
 Returns the best size for the cell.
tpoint get_minimum_size () const
 Returns the minimum size for the cell.
tpoint get_maximum_size () const
 Returns the maximum size for the cell.
void set_size (tpoint orig, tpoint size)

Private Member Functions

tpoint border_space () const
 Returns the space needed for the border.
void set_dirty ()
 Sets the calculations to be dirty, this means all caches are simply cleared.

Private Attributes

std::string id_
 The id of the widget if it has a widget.
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. FIXME who owns the widget....
tpoint best_size_
 The best size for this cell, determined by the best size of the widget and the border_size_ and flags_.
tpoint minimum_size_
 The minimum size for this cell, like best_size_.
tpoint maximum_size_
 The maximum size for this cell, like best_size_.
SDL_Rect clip_
 The clipping area for the widget.


Detailed Description

Definition at line 140 of file grid.hpp.


Constructor & Destructor Documentation

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

Definition at line 143 of file grid.hpp.


Member Function Documentation

const std::string& gui2::tgrid::tchild::id (  )  const [inline]

Definition at line 157 of file grid.hpp.

References id_.

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

void gui2::tgrid::tchild::set_id ( const std::string &  id  )  [inline]

Definition at line 158 of file grid.hpp.

References id_.

Referenced by gui2::tgrid::add_child(), and gui2::tgrid::remove_child().

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

Definition at line 160 of file grid.hpp.

References flags_.

void gui2::tgrid::tchild::set_flags ( const unsigned  flags  )  [inline]

Definition at line 161 of file grid.hpp.

References flags_, and set_dirty().

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

unsigned gui2::tgrid::tchild::get_border_size (  )  const [inline]

Definition at line 163 of file grid.hpp.

References border_size_.

void gui2::tgrid::tchild::set_border_size ( const unsigned  border_size  )  [inline]

Definition at line 164 of file grid.hpp.

References border_size_, and set_dirty().

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

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

Definition at line 167 of file grid.hpp.

References widget_.

Referenced by gui2::tgrid::add_child(), set_size(), and gui2::tgrid::widget().

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

Definition at line 168 of file grid.hpp.

References widget_.

void gui2::tgrid::tchild::set_widget ( twidget widget  )  [inline]

Definition at line 170 of file grid.hpp.

References set_dirty(), and widget_.

Referenced by gui2::tgrid::add_child(), and gui2::tgrid::remove_child().

tpoint gui2::tgrid::tchild::get_best_size (  )  const

Returns the best size for the cell.

Definition at line 557 of file grid.cpp.

References best_size_, border_space(), gui2::twidget::dirty(), gui2::twidget::get_best_size(), and widget_.

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

tpoint gui2::tgrid::tchild::get_minimum_size (  )  const

Returns the minimum size for the cell.

Definition at line 570 of file grid.cpp.

References border_space(), gui2::twidget::dirty(), gui2::twidget::get_minimum_size(), minimum_size_, and widget_.

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

tpoint gui2::tgrid::tchild::get_maximum_size (  )  const

Returns the maximum size for the cell.

Definition at line 583 of file grid.cpp.

References border_space(), gui2::twidget::dirty(), gui2::twidget::get_maximum_size(), maximum_size_, and widget_.

void gui2::tgrid::tchild::set_size ( tpoint  orig,
tpoint  size 
)

tpoint gui2::tgrid::tchild::border_space (  )  const [private]

void gui2::tgrid::tchild::set_dirty (  )  [inline, private]

Sets the calculations to be dirty, this means all caches are simply cleared.

Definition at line 216 of file grid.hpp.

References best_size_, maximum_size_, and minimum_size_.

Referenced by set_border_size(), set_flags(), and set_widget().


Member Data Documentation

std::string gui2::tgrid::tchild::id_ [private]

The id of the widget if it has a widget.

Definition at line 185 of file grid.hpp.

Referenced by id(), and set_id().

unsigned gui2::tgrid::tchild::flags_ [private]

The flags for the border and cell setup.

Definition at line 188 of file grid.hpp.

Referenced by border_space(), get_flags(), set_flags(), and set_size().

The size of the border, the actual configuration of the border is determined by the flags.

Definition at line 192 of file grid.hpp.

Referenced by border_space(), get_border_size(), set_border_size(), and set_size().

Pointer to the widget. FIXME who owns the widget....

Definition at line 195 of file grid.hpp.

Referenced by get_best_size(), get_maximum_size(), get_minimum_size(), set_widget(), and widget().

The best size for this cell, determined by the best size of the widget and the border_size_ and flags_.

Definition at line 199 of file grid.hpp.

Referenced by get_best_size(), and set_dirty().

The minimum size for this cell, like best_size_.

Definition at line 202 of file grid.hpp.

Referenced by get_minimum_size(), and set_dirty().

The maximum size for this cell, like best_size_.

Definition at line 205 of file grid.hpp.

Referenced by get_maximum_size(), and set_dirty().

SDL_Rect gui2::tgrid::tchild::clip_ [private]

The clipping area for the widget.

This is also the size of the container.

Definition at line 212 of file grid.hpp.


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs