CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csScrollBar Class Reference
[Scroll bar]

The ScrollBar component class is used to scroll left/right or up/down windows whose content does not fit into their size. More...

#include <csscrbar.h>

Inheritance diagram for csScrollBar:

csComponent List of all members.

Public Methods

 csScrollBar (csComponent *iParent, csScrollBarFrameStyle iFrameStyle=cssfsThickRect)
 Create static component object (by default - a label) linked to another. More...

virtual ~csScrollBar ()
 Destroy the scroll bar. More...

virtual bool HandleEvent (iEvent &Event)
 Handle scroll button notifications. More...

virtual bool SetRect (int xmin, int ymin, int xmax, int ymax)
 Set scroll button positions on resize. More...

virtual void SetState (int mask, bool enable)
 Override SetState method to disable scroll buttons as well. More...

csScrollBarFrameStyle GetFrameStyle ()
 Get frame style. More...

int GetActiveButton ()
 Get active button. More...

bool GetIsHorizontal ()
 Returns true if scrollbar is horizontal. More...

csButtonGetScroller ()
 Get the scroller button. More...

csButtonGetTopLeft ()
 Get the top or left arrow button. More...

csButtonGetBotRight ()
 Get the bottom or right arrow button. More...

virtual char * GetSkinName ()
 Get the name of the skip slice for this component. More...


Protected Methods

void SetValue (int iValue)
 Set scroll bar value. More...


Detailed Description

The ScrollBar component class is used to scroll left/right or up/down windows whose content does not fit into their size.

If scroll bar's width is bigger than its height, it becomes a horizontal scroll bar, otherwise it is a vertical scroll bar. A scroll bar notifies its parent with a command event when user requests (using mouse) to scroll window contents. Parent can set scroll bar's position/range using command messages.

Definition at line 110 of file csscrbar.h.


Constructor & Destructor Documentation

csScrollBar::csScrollBar csComponent   iParent,
csScrollBarFrameStyle    iFrameStyle = cssfsThickRect
 

Create static component object (by default - a label) linked to another.

virtual csScrollBar::~csScrollBar   [virtual]
 

Destroy the scroll bar.


Member Function Documentation

int csScrollBar::GetActiveButton   [inline]
 

Get active button.

Definition at line 160 of file csscrbar.h.

csButton* csScrollBar::GetBotRight   [inline]
 

Get the bottom or right arrow button.

Definition at line 176 of file csscrbar.h.

csScrollBarFrameStyle csScrollBar::GetFrameStyle   [inline]
 

Get frame style.

Definition at line 156 of file csscrbar.h.

References csScrollBarFrameStyle.

bool csScrollBar::GetIsHorizontal   [inline]
 

Returns true if scrollbar is horizontal.

Definition at line 164 of file csscrbar.h.

csButton* csScrollBar::GetScroller   [inline]
 

Get the scroller button.

Definition at line 168 of file csscrbar.h.

virtual char* csScrollBar::GetSkinName   [inline, virtual]
 

Get the name of the skip slice for this component.

Reimplemented from csComponent.

Definition at line 180 of file csscrbar.h.

csButton* csScrollBar::GetTopLeft   [inline]
 

Get the top or left arrow button.

Definition at line 172 of file csscrbar.h.

virtual bool csScrollBar::HandleEvent iEvent   Event [virtual]
 

Handle scroll button notifications.

Reimplemented from csComponent.

virtual bool csScrollBar::SetRect int    xmin,
int    ymin,
int    xmax,
int    ymax
[virtual]
 

Set scroll button positions on resize.

Reimplemented from csComponent.

virtual void csScrollBar::SetState int    mask,
bool    enable
[virtual]
 

Override SetState method to disable scroll buttons as well.

Reimplemented from csComponent.

void csScrollBar::SetValue int    iValue [protected]
 

Set scroll bar value.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14