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 twidget * | widget () const |
twidget * | widget () |
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. | |
twidget * | widget_ |
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. |
Definition at line 140 of file grid.hpp.
const std::string& gui2::tgrid::tchild::id | ( | ) | const [inline] |
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] |
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] |
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] |
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_.
Definition at line 618 of file grid.cpp.
References gui2::tgrid::BORDER_BOTTOM, gui2::tgrid::BORDER_LEFT, gui2::tgrid::BORDER_RIGHT, border_size_, gui2::tgrid::BORDER_TOP, gui2::create_rect(), DBG_G, flags_, gui2::twidget::get_best_size(), gui2::twidget::get_maximum_size(), gui2::tgrid::HORIZONTAL_ALIGN_CENTER, gui2::tgrid::HORIZONTAL_ALIGN_LEFT, gui2::tgrid::HORIZONTAL_ALIGN_RIGHT, gui2::tgrid::HORIZONTAL_GROW_SEND_TO_CLIENT, gui2::twidget::set_size(), gui2::tgrid::VERTICAL_ALIGN_BOTTOM, gui2::tgrid::VERTICAL_ALIGN_CENTER, gui2::tgrid::VERTICAL_ALIGN_TOP, gui2::tgrid::VERTICAL_GROW_SEND_TO_CLIENT, widget(), gui2::tpoint::x, and gui2::tpoint::y.
Referenced by gui2::tgrid::layout().
tpoint gui2::tgrid::tchild::border_space | ( | ) | const [private] |
Returns the space needed for the border.
Definition at line 602 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 get_best_size(), get_maximum_size(), and get_minimum_size().
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().
std::string gui2::tgrid::tchild::id_ [private] |
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().
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 192 of file grid.hpp.
Referenced by border_space(), get_border_size(), set_border_size(), and set_size().
twidget* gui2::tgrid::tchild::widget_ [private] |
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().
tpoint gui2::tgrid::tchild::best_size_ [mutable, private] |
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().
tpoint gui2::tgrid::tchild::minimum_size_ [mutable, private] |
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().
tpoint gui2::tgrid::tchild::maximum_size_ [mutable, private] |
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] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |