Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

gui::scrollarea Class Reference

#include <scrollarea.hpp>

Inheritance diagram for gui::scrollarea:
Inheritance graph
[legend]
Collaboration diagram for gui::scrollarea:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 scrollarea (CVideo &video, bool auto_join=true)
 Create a zone with automatic handling of scrollbar.
virtual void hide (bool value=true)

Protected Member Functions

virtual handler_vector handler_members ()
virtual void update_location (SDL_Rect const &rect)
virtual void handle_event (const SDL_Event &event)
virtual void process_event ()
virtual void scroll (unsigned int pos)=0
virtual void set_inner_location (SDL_Rect const &rect)=0
SDL_Rect inner_location () const
unsigned scrollbar_width () const
unsigned get_position () const
unsigned get_max_position () const
void set_position (unsigned pos)
void adjust_position (unsigned pos)
void move_position (int dep)
void set_shown_size (unsigned h)
void set_full_size (unsigned h)
void set_scroll_rate (unsigned r)
bool has_scrollbar () const

Private Member Functions

void test_scrollbar ()

Private Attributes

scrollbar scrollbar_
int old_position_
bool recursive_
bool shown_scrollbar_
unsigned shown_size_
unsigned full_size_

Detailed Description

Definition at line 25 of file scrollarea.hpp.


Constructor & Destructor Documentation

gui::scrollarea::scrollarea ( CVideo video,
bool  auto_join = true 
)

Create a zone with automatic handling of scrollbar.

Todo:
FIXME: parameterlist ??

Definition at line 27 of file scrollarea.cpp.

References gui::scrollbar::hide(), and scrollbar_.

Here is the call graph for this function:


Member Function Documentation

void gui::scrollarea::adjust_position ( unsigned  pos  )  [protected]

Definition at line 100 of file scrollarea.cpp.

References gui::scrollbar::adjust_position(), and scrollbar_.

Referenced by gui::menu::adjust_viewport_to_selection(), mp::gamebrowser::handle_event(), and mp::gamebrowser::select_game().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned gui::scrollarea::get_max_position (  )  const [protected]

Definition at line 90 of file scrollarea.cpp.

References gui::scrollbar::get_max_position(), and scrollbar_.

Referenced by gui::textbox::append_text(), gui::textbox::scroll_to_bottom(), mp::gamebrowser::set_game_items(), and gui::menu::set_items().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned gui::scrollarea::get_position (  )  const [protected]
void gui::scrollarea::handle_event ( const SDL_Event &  event  )  [protected, virtual]
handler_vector gui::scrollarea::handler_members (  )  [protected, virtual]

Reimplemented from events::handler.

Reimplemented in gui::dialog_textbox.

Definition at line 40 of file scrollarea.cpp.

References h, and scrollbar_.

bool gui::scrollarea::has_scrollbar (  )  const [protected]

Definition at line 35 of file scrollarea.cpp.

References full_size_, h, gui::scrollbar::is_valid_height(), gui::widget::location(), scrollbar_, and shown_size_.

Referenced by mp::gamebrowser::set_game_items(), gui::menu::set_items(), test_scrollbar(), and update_location().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui::scrollarea::hide ( bool  value = true  )  [virtual]

Reimplemented from gui::widget.

Reimplemented in gui::scrollpane.

Definition at line 78 of file scrollarea.cpp.

References gui::scrollbar::hide(), scrollbar_, and shown_scrollbar_.

Referenced by mp::wait::hide_children(), mp::ui::hide_children(), mp::lobby::hide_children(), and mp::create::hide_children().

Here is the call graph for this function:

Here is the caller graph for this function:

SDL_Rect gui::scrollarea::inner_location (  )  const [protected]
void gui::scrollarea::move_position ( int  dep  )  [protected]

Definition at line 105 of file scrollarea.cpp.

References gui::scrollbar::move_position(), and scrollbar_.

Here is the call graph for this function:

void gui::scrollarea::process_event (  )  [protected, virtual]

Reimplemented from events::handler.

Definition at line 129 of file scrollarea.cpp.

References gui::scrollbar::get_position(), old_position_, scroll(), and scrollbar_.

Here is the call graph for this function:

virtual void gui::scrollarea::scroll ( unsigned int  pos  )  [protected, pure virtual]

Implemented in help::help_text_area, mp::gamebrowser, gui::menu, gui::scrollpane, and gui::textbox.

Referenced by process_event().

Here is the caller graph for this function:

unsigned gui::scrollarea::scrollbar_width (  )  const [protected]

Definition at line 146 of file scrollarea.cpp.

References scrollbar_, and gui::widget::width().

Referenced by gui::menu::update_size().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui::scrollarea::set_full_size ( unsigned  h  )  [protected]
virtual void gui::scrollarea::set_inner_location ( SDL_Rect const &  rect  )  [protected, pure virtual]

Implemented in help::help_text_area, mp::gamebrowser, gui::menu, gui::scrollpane, and gui::textbox.

Referenced by update_location().

Here is the caller graph for this function:

void gui::scrollarea::set_position ( unsigned  pos  )  [protected]

Definition at line 95 of file scrollarea.cpp.

References scrollbar_, and gui::scrollbar::set_position().

Referenced by gui::textbox::scroll_to_bottom(), mp::gamebrowser::set_game_items(), gui::menu::set_items(), and help::help_text_area::set_items().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui::scrollarea::set_scroll_rate ( unsigned  r  )  [protected]

Definition at line 124 of file scrollarea.cpp.

References scrollbar_, and gui::scrollbar::set_scroll_rate().

Referenced by help::help_text_area::help_text_area(), gui::scrollpane::scrollpane(), and gui::textbox::textbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui::scrollarea::set_shown_size ( unsigned  h  )  [protected]
void gui::scrollarea::test_scrollbar (  )  [private]

Definition at line 65 of file scrollarea.cpp.

References gui::widget::bg_cancel(), gui::widget::bg_restore(), has_scrollbar(), gui::widget::location(), recursive_, shown_scrollbar_, and update_location().

Referenced by set_full_size(), and set_shown_size().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui::scrollarea::update_location ( SDL_Rect const &  rect  )  [protected, virtual]

Reimplemented from gui::widget.

Definition at line 47 of file scrollarea.cpp.

References has_scrollbar(), gui::widget::hidden(), gui::scrollbar::hide(), scrollbar_, set_inner_location(), gui::widget::set_location(), shown_scrollbar_, w, and gui::widget::width().

Referenced by test_scrollbar().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

unsigned gui::scrollarea::full_size_ [private]

Definition at line 64 of file scrollarea.hpp.

Referenced by has_scrollbar(), and set_full_size().

Definition at line 61 of file scrollarea.hpp.

Referenced by process_event().

Definition at line 62 of file scrollarea.hpp.

Referenced by test_scrollbar().

Definition at line 62 of file scrollarea.hpp.

Referenced by hide(), inner_location(), test_scrollbar(), and update_location().

unsigned gui::scrollarea::shown_size_ [private]

Definition at line 63 of file scrollarea.hpp.

Referenced by has_scrollbar(), and set_shown_size().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:21:31 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs