#include <container.hpp>
Public Member Functions | |
tcontainer_ (const unsigned canvas_count) | |
bool | dirty () const |
Inherited from twidget. | |
twidget * | find_widget (const tpoint &coordinate, const bool must_be_active) |
Inherited from tcontrol. | |
const twidget * | find_widget (const tpoint &coordinate, const bool must_be_active) const |
Inherited from tcontrol. | |
twidget * | find_widget (const std::string &id, const bool must_be_active) |
Inherited from tcontrol. | |
const twidget * | find_widget (const std::string &id, const bool must_be_active) const |
Inherited from tcontrol. | |
bool | has_widget (const twidget *widget) const |
Inherited from twidget. | |
bool | has_vertical_scrollbar () const =0 |
Inherited from twidget. | |
tpoint | get_minimum_size () const |
Inherited from tcontrol. | |
tpoint | get_best_size () const |
Inherited from tcontrol. | |
void | set_size (const SDL_Rect &rect) |
Inherited from tcontrol. | |
void | set_client_size (const SDL_Rect &rect) |
FIXME see whether needed to be exported. | |
void | draw (surface &surface) |
Inherited from tcontrol. | |
tgrid::iterator | begin () |
tgrid::iterator | end () |
unsigned | add_row (const unsigned count=1) |
void | set_rows (const unsigned rows) |
unsigned int | get_rows () const |
void | set_cols (const unsigned cols) |
unsigned int | get_cols () const |
void | set_rows_cols (const unsigned rows, const unsigned cols) |
void | add_child (twidget *widget, const unsigned row, const unsigned col, const unsigned flags, const unsigned border_size) |
void | set_row_grow_factor (const unsigned row, const unsigned factor) |
void | set_col_grow_factor (const unsigned col, const unsigned factor) |
virtual SDL_Rect | get_client_rect () const |
Protected Member Functions | |
const tgrid & | grid () const |
tgrid & | grid () |
Private Member Functions | |
virtual tpoint | border_space () const |
Returns the space used by the border. | |
Private Attributes | |
tgrid | grid_ |
A container is a class build with multiple items either acting as one widget.
Definition at line 30 of file container.hpp.
gui2::tcontainer_::tcontainer_ | ( | const unsigned | canvas_count | ) | [inline] |
bool gui2::tcontainer_::dirty | ( | ) | const [inline, virtual] |
Inherited from twidget.
Reimplemented from gui2::twidget.
Definition at line 40 of file container.hpp.
References gui2::twidget::dirty(), and grid_.
Referenced by gui2::tpanel::draw(), and gui2::twindow::show().
twidget* gui2::tcontainer_::find_widget | ( | const tpoint & | coordinate, | |
const bool | must_be_active | |||
) | [inline, virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Reimplemented in gui2::tlistbox, gui2::tpanel, and gui2::twindow.
Definition at line 43 of file container.hpp.
References gui2::tgrid::find_widget(), and grid_.
Referenced by gui2::tlistbox::finalize_setup(), gui2::tpanel::find_widget(), gui2::tlistbox::find_widget(), gui2::tlistbox::list(), gui2::tlistbox::scrollbar(), and gui2::tlistbox::set_scrollbar_button_status().
const twidget* gui2::tcontainer_::find_widget | ( | const tpoint & | coordinate, | |
const bool | must_be_active | |||
) | const [inline, virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Reimplemented in gui2::tlistbox, gui2::tpanel, and gui2::twindow.
Definition at line 47 of file container.hpp.
References gui2::tgrid::find_widget(), and grid_.
twidget* gui2::tcontainer_::find_widget | ( | const std::string & | id, | |
const bool | must_be_active | |||
) | [inline, virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Reimplemented in gui2::tpanel, and gui2::twindow.
Definition at line 52 of file container.hpp.
References gui2::tgrid::find_widget(), gui2::tcontrol::find_widget(), and grid_.
const twidget* gui2::tcontainer_::find_widget | ( | const std::string & | id, | |
const bool | must_be_active | |||
) | const [inline, virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Reimplemented in gui2::tpanel, and gui2::twindow.
Definition at line 59 of file container.hpp.
References gui2::tgrid::find_widget(), gui2::tcontrol::find_widget(), and grid_.
bool gui2::tcontainer_::has_widget | ( | const twidget * | widget | ) | const [inline, virtual] |
Inherited from twidget.
Reimplemented from gui2::twidget.
Definition at line 66 of file container.hpp.
References grid_, and gui2::tgrid::has_widget().
Referenced by gui2::tlistbox::list_item_selected().
bool gui2::tcontainer_::has_vertical_scrollbar | ( | ) | const [pure virtual] |
Inherited from twidget.
Since we can't define a good default behaviour we force the inheriting classes to define this function. So inheriting classes act as one widget others as a collection of multiple objects.
Reimplemented from gui2::twidget.
Implemented in gui2::tlistbox, and gui2::tpanel.
tpoint gui2::tcontainer_::get_minimum_size | ( | ) | const [virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Definition at line 50 of file container.cpp.
References border_space(), gui2::tgrid::get_maximum_size(), grid_, size, gui2::tpoint::x, and gui2::tpoint::y.
tpoint gui2::tcontainer_::get_best_size | ( | ) | const [virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Reimplemented in gui2::tlistbox.
Definition at line 66 of file container.cpp.
References border_space(), gui2::tgrid::get_best_size(), grid_, size, gui2::tpoint::x, and gui2::tpoint::y.
Referenced by gui2::tlistbox::get_best_size(), and gui2::twindow::recalculate_size().
void gui2::tcontainer_::set_size | ( | const SDL_Rect & | rect | ) | [inline, virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Reimplemented in gui2::tlistbox.
Definition at line 85 of file container.hpp.
References get_client_rect(), set_client_size(), and gui2::tcontrol::set_size().
Referenced by gui2::twindow::recalculate_size(), gui2::tlistbox::set_size(), and gui2::twindow::twindow().
void gui2::tcontainer_::set_client_size | ( | const SDL_Rect & | rect | ) | [inline] |
FIXME see whether needed to be exported.
Definition at line 92 of file container.hpp.
References grid_, and gui2::tgrid::set_size().
Referenced by gui2::twindow::layout(), and set_size().
void gui2::tcontainer_::draw | ( | surface & | surface | ) | [virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Reimplemented in gui2::tlistbox, gui2::tpanel, and gui2::twindow.
Definition at line 42 of file container.cpp.
References gui2::tgrid::draw(), cursor::draw(), and grid_.
tgrid::iterator gui2::tcontainer_::begin | ( | ) | [inline] |
Definition at line 99 of file container.hpp.
References gui2::tgrid::begin(), and grid_.
Referenced by gui2::twindow::draw().
tgrid::iterator gui2::tcontainer_::end | ( | ) | [inline] |
Definition at line 100 of file container.hpp.
References gui2::tgrid::end(), and grid_.
Referenced by gui2::twindow::draw().
unsigned gui2::tcontainer_::add_row | ( | const unsigned | count = 1 |
) | [inline] |
void gui2::tcontainer_::set_rows | ( | const unsigned | rows | ) | [inline] |
unsigned int gui2::tcontainer_::get_rows | ( | ) | const [inline] |
void gui2::tcontainer_::set_cols | ( | const unsigned | cols | ) | [inline] |
unsigned int gui2::tcontainer_::get_cols | ( | ) | const [inline] |
void gui2::tcontainer_::set_rows_cols | ( | const unsigned | rows, | |
const unsigned | cols | |||
) | [inline] |
Definition at line 111 of file container.hpp.
References grid_, and gui2::tgrid::set_rows_cols().
Referenced by gui2::tbuilder_panel::build(), and gui2::build().
void gui2::tcontainer_::add_child | ( | twidget * | widget, | |
const unsigned | row, | |||
const unsigned | col, | |||
const unsigned | flags, | |||
const unsigned | border_size | |||
) | [inline] |
Definition at line 114 of file container.hpp.
References gui2::tgrid::add_child(), and grid_.
Referenced by gui2::tbuilder_panel::build(), and gui2::build().
void gui2::tcontainer_::set_row_grow_factor | ( | const unsigned | row, | |
const unsigned | factor | |||
) | [inline] |
Definition at line 118 of file container.hpp.
References grid_, and gui2::tgrid::set_row_grow_factor().
Referenced by gui2::tbuilder_panel::build(), and gui2::build().
void gui2::tcontainer_::set_col_grow_factor | ( | const unsigned | col, | |
const unsigned | factor | |||
) | [inline] |
Definition at line 121 of file container.hpp.
References grid_, and gui2::tgrid::set_col_grow_factor().
Referenced by gui2::tbuilder_panel::build(), and gui2::build().
virtual SDL_Rect gui2::tcontainer_::get_client_rect | ( | ) | const [inline, virtual] |
Reimplemented in gui2::tpanel, and gui2::twindow.
Definition at line 124 of file container.hpp.
References gui2::twidget::get_rect().
Referenced by set_size().
const tgrid& gui2::tcontainer_::grid | ( | ) | const [inline, protected] |
Definition at line 126 of file container.hpp.
References grid_.
Referenced by gui2::tbuilder_listbox::build(), gui2::tlistbox::finalize_setup(), gui2::tlistbox::list_item_selected(), and gui2::tlistbox::set_row_active().
tgrid& gui2::tcontainer_::grid | ( | ) | [inline, protected] |
virtual tpoint gui2::tcontainer_::border_space | ( | ) | const [inline, private, virtual] |
Returns the space used by the border.
Reimplemented in gui2::tpanel.
Definition at line 134 of file container.hpp.
Referenced by get_best_size(), and get_minimum_size().
tgrid gui2::tcontainer_::grid_ [private] |
Definition at line 131 of file container.hpp.
Referenced by add_child(), add_row(), begin(), dirty(), draw(), end(), find_widget(), get_best_size(), get_cols(), get_minimum_size(), get_rows(), grid(), has_widget(), set_client_size(), set_col_grow_factor(), set_cols(), set_row_grow_factor(), set_rows(), set_rows_cols(), and tcontainer_().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |