#include <scrollpane.hpp>
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_ |
Classes | |
struct | scrollpane_widget |
Definition at line 30 of file scrollpane.hpp.
typedef std::multimap<int, scrollpane_widget> gui::scrollpane::widget_map [private] |
Definition at line 76 of file scrollpane.hpp.
gui::scrollpane::scrollpane | ( | CVideo & | video | ) |
Create a scrollpane.
Definition at line 41 of file scrollpane.cpp.
References content_pos_, gui::scrollarea::set_scroll_rate(), and update_content_size().
void gui::scrollpane::set_location | ( | SDL_Rect const & | rect | ) | [virtual] |
Reimplemented from gui::widget.
Definition at line 55 of file scrollpane.cpp.
References client_area(), gui::scrollarea::set_shown_size(), and update_widget_positions().
Referenced by mp::connect::layout_children().
void gui::scrollpane::set_location | ( | int | x, | |
int | y | |||
) | [inline] |
void gui::scrollpane::hide | ( | bool | value = true |
) | [virtual] |
Reimplemented from gui::scrollarea.
Definition at line 62 of file scrollpane.cpp.
References content_.
Referenced by mp::connect::hide_children().
void gui::scrollpane::add_widget | ( | widget * | w, | |
int | x, | |||
int | y, | |||
int | z_order = 0 | |||
) |
Definition at line 69 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::remove_widget | ( | widget * | w | ) |
void gui::scrollpane::clear | ( | void | ) |
void gui::scrollpane::draw | ( | ) | [protected, virtual] |
void gui::scrollpane::set_inner_location | ( | SDL_Rect const & | rect | ) | [protected, virtual] |
Implements gui::scrollarea.
Definition at line 99 of file scrollpane.cpp.
References client_area(), and content_.
void gui::scrollpane::scroll | ( | unsigned int | pos | ) | [protected, virtual] |
Implements gui::scrollarea.
Definition at line 111 of file scrollpane.cpp.
References content_pos_, and update_widget_positions().
void gui::scrollpane::update_widget_positions | ( | ) | [private] |
Definition at line 120 of file scrollpane.cpp.
References content_, gui::widget::HIDDEN, gui::widget::hidden(), position_widget(), and gui::widget::set_dirty().
Referenced by scroll(), and set_location().
void gui::scrollpane::position_widget | ( | scrollpane_widget & | spw | ) | [private] |
Definition at line 143 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().
SDL_Rect gui::scrollpane::client_area | ( | ) | const [private] |
Definition at line 149 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::update_content_size | ( | ) | [private] |
Definition at line 161 of file scrollpane.cpp.
References client_area(), content_, content_pos_, gui::widget::set_dirty(), gui::scrollarea::set_full_size(), and gui::scrollarea::set_shown_size().
Referenced by add_widget(), clear(), remove_widget(), and scrollpane().
int gui::scrollpane::border_ [private] |
widget_map gui::scrollpane::content_ [private] |
Definition at line 77 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 78 of file scrollpane.hpp.
Referenced by position_widget(), scroll(), scrollpane(), and update_content_size().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |