Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes

gui::scrollpane Class Reference

Scrollpane. More...

#include <scrollpane.hpp>

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

List of all members.

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_

Detailed Description

Scrollpane.

Definition at line 31 of file scrollpane.hpp.


Member Typedef Documentation

typedef std::multimap<int, scrollpane_widget> gui::scrollpane::widget_map [private]

Definition at line 79 of file scrollpane.hpp.


Constructor & Destructor Documentation

gui::scrollpane::scrollpane ( CVideo video  ) 

Create a scrollpane.

Todo:
FIXME: parameterlist ??

Definition at line 44 of file scrollpane.cpp.

References content_pos_, gui::scrollarea::set_scroll_rate(), and update_content_size().

Here is the call graph for this function:


Member Function Documentation

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui::scrollpane::clear (  ) 

Definition at line 52 of file scrollpane.cpp.

References content_, and update_content_size().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui::scrollpane::remove_widget ( widget w  ) 

Definition at line 92 of file scrollpane.cpp.

References content_, and update_content_size().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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_.

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

int gui::scrollpane::border_ [private]

Definition at line 78 of file scrollpane.hpp.

Referenced by client_area(), and position_widget().

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().


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:35 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs