Scrollpane. More...
#include <scrollpane.hpp>


Classes | |
| struct | scrollpane_widget |
Public Member Functions | |
| scrollpane (CVideo &video) | |
| Create a scrollpane. | |
| virtual void | set_location (SDL_Rect const &rect) |
| void | set_location (int x, int y) |
| virtual void | hide (bool value=true) |
| void | add_widget (widget *w, int x, int y, int z_order=0) |
| void | remove_widget (widget *w) |
| void | clear () |
Protected Member Functions | |
| virtual void | draw () |
| virtual void | set_inner_location (SDL_Rect const &rect) |
| virtual void | scroll (unsigned int pos) |
Private Types | |
| typedef std::multimap< int, scrollpane_widget > | widget_map |
Private Member Functions | |
| void | update_widget_positions () |
| void | position_widget (scrollpane_widget &spw) |
| SDL_Rect | client_area () const |
| void | update_content_size () |
Private Attributes | |
| int | border_ |
| widget_map | content_ |
| SDL_Rect | content_pos_ |
Scrollpane.
Definition at line 31 of file scrollpane.hpp.
typedef std::multimap<int, scrollpane_widget> gui::scrollpane::widget_map [private] |
Definition at line 79 of file scrollpane.hpp.
| gui::scrollpane::scrollpane | ( | CVideo & | video | ) |
Create a scrollpane.
Definition at line 44 of file scrollpane.cpp.
References content_pos_, gui::scrollarea::set_scroll_rate(), and update_content_size().

| void gui::scrollpane::add_widget | ( | widget * | w, | |
| int | x, | |||
| int | y, | |||
| int | z_order = 0 | |||
| ) |
Definition at line 72 of file scrollpane.cpp.
References client_area(), content_, position_widget(), gui::widget::set_clip_rect(), and update_content_size().
Referenced by mp::connect::side::add_widgets_to_scrollpane().


| void gui::scrollpane::clear | ( | ) |
Definition at line 52 of file scrollpane.cpp.
References content_, and update_content_size().

| SDL_Rect gui::scrollpane::client_area | ( | ) | const [private] |
Definition at line 152 of file scrollpane.cpp.
References border_, and gui::widget::location().
Referenced by add_widget(), set_inner_location(), set_location(), and update_content_size().


| void gui::scrollpane::draw | ( | ) | [protected, virtual] |
Reimplemented from gui::widget.
Definition at line 109 of file scrollpane.cpp.
| void gui::scrollpane::hide | ( | bool | value = true |
) | [virtual] |
Reimplemented from gui::scrollarea.
Definition at line 65 of file scrollpane.cpp.
References content_.
Referenced by mp::connect::hide_children().

| void gui::scrollpane::position_widget | ( | scrollpane_widget & | spw | ) | [private] |
Definition at line 146 of file scrollpane.cpp.
References border_, content_pos_, gui::widget::set_location(), gui::scrollpane::scrollpane_widget::w, gui::scrollpane::scrollpane_widget::x, and gui::scrollpane::scrollpane_widget::y.
Referenced by add_widget(), and update_widget_positions().


| void gui::scrollpane::remove_widget | ( | widget * | w | ) |
Definition at line 92 of file scrollpane.cpp.
References content_, and update_content_size().

| void gui::scrollpane::scroll | ( | unsigned int | pos | ) | [protected, virtual] |
Implements gui::scrollarea.
Definition at line 114 of file scrollpane.cpp.
References content_pos_, and update_widget_positions().

| void gui::scrollpane::set_inner_location | ( | SDL_Rect const & | rect | ) | [protected, virtual] |
Implements gui::scrollarea.
Definition at line 102 of file scrollpane.cpp.
References client_area(), and content_.

| void gui::scrollpane::set_location | ( | SDL_Rect const & | rect | ) | [virtual] |
Reimplemented from gui::widget.
Definition at line 58 of file scrollpane.cpp.
References client_area(), h, gui::scrollarea::set_shown_size(), and update_widget_positions().
Referenced by mp::connect::layout_children(), and set_location().


| void gui::scrollpane::set_location | ( | int | x, | |
| int | y | |||
| ) | [inline] |
Reimplemented from gui::widget.
Definition at line 57 of file scrollpane.hpp.
References set_location().

| void gui::scrollpane::update_content_size | ( | ) | [private] |
Definition at line 164 of file scrollpane.cpp.
References client_area(), content_, content_pos_, h, gui::widget::set_dirty(), gui::scrollarea::set_full_size(), and gui::scrollarea::set_shown_size().
Referenced by add_widget(), clear(), remove_widget(), and scrollpane().


| void gui::scrollpane::update_widget_positions | ( | ) | [private] |
Definition at line 123 of file scrollpane.cpp.
References content_, gui::widget::hidden(), position_widget(), and gui::widget::set_dirty().
Referenced by scroll(), and set_location().


int gui::scrollpane::border_ [private] |
Definition at line 78 of file scrollpane.hpp.
Referenced by client_area(), and position_widget().
widget_map gui::scrollpane::content_ [private] |
Definition at line 80 of file scrollpane.hpp.
Referenced by add_widget(), clear(), hide(), remove_widget(), set_inner_location(), update_content_size(), and update_widget_positions().
SDL_Rect gui::scrollpane::content_pos_ [private] |
Definition at line 81 of file scrollpane.hpp.
Referenced by position_widget(), scroll(), scrollpane(), and update_content_size().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:21:35 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |