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.

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


Detailed Description

Scrollpane.

Definition at line 30 of file scrollpane.hpp.


Member Typedef Documentation

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

Definition at line 76 of file scrollpane.hpp.


Constructor & Destructor Documentation

gui::scrollpane::scrollpane ( CVideo video  ) 

Create a scrollpane.

Todo:
FIXME: parameterlist ??

Definition at line 41 of file scrollpane.cpp.

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


Member Function Documentation

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]

Reimplemented from gui::widget.

Definition at line 54 of file scrollpane.hpp.

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 
)

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

Definition at line 89 of file scrollpane.cpp.

References content_, and update_content_size().

void gui::scrollpane::clear ( void   ) 

Definition at line 49 of file scrollpane.cpp.

References content_, and update_content_size().

void gui::scrollpane::draw (  )  [protected, virtual]

Reimplemented from gui::widget.

Definition at line 106 of file scrollpane.cpp.

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]

void gui::scrollpane::position_widget ( scrollpane_widget spw  )  [private]

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]


Member Data Documentation

int gui::scrollpane::border_ [private]

Definition at line 75 of file scrollpane.hpp.

Referenced by client_area(), and position_widget().

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


The documentation for this class was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs