GClasses

GClasses::GWidgetHorizScrollBar Class Reference

Makes a horizontal scroll bar. More...

#include <GWidgets.h>

Inheritance diagram for GClasses::GWidgetHorizScrollBar:
GClasses::GWidgetGroup GClasses::GWidget

List of all members.

Public Member Functions

 GWidgetHorizScrollBar (GWidgetGroup *pParent, int x, int y, int w, int h, int nViewSize, int nModelSize)
virtual ~GWidgetHorizScrollBar ()
virtual WidgetType type ()
int viewSize ()
 Returns the current view size.
int modelSize ()
 Returns the current model size.
void setViewSize (int n)
 Sets the size of the view area that this scroll bar represents (The size of the sliding tab is determined by the ratio of the size of the view over the size of the model)
void setModelSize (int n)
 Sets the size of the model that this scroll bar represents (The size of the sliding tab is determined by the ratio of the size of the view over the size of the model)
int pos ()
 Gets the current scroll position of this scroll bar.
void setPos (int n)
 Sets the current scroll position.
virtual void draw (GImage *pCanvas, int x, int y)
 Draws this widget on pCanvas at (x,y)

Protected Member Functions

virtual void onPushVCRButton (GWidgetVCRButton *pButton)
virtual void onSlideTab (GWidgetSliderTab *pTab, int dx, int dy)
virtual void onClickTab (GWidgetSliderTab *pTab)
int buttonWidth ()

Protected Attributes

int m_nViewSize
int m_nModelSize
int m_nPos
GWidgetVCRButtonm_pLeftButton
GWidgetVCRButtonm_pRightButton
GWidgetSliderTabm_pLeftTab
GWidgetSliderTabm_pTab
GWidgetSliderTabm_pRightTab

Detailed Description

Makes a horizontal scroll bar.


Constructor & Destructor Documentation

GClasses::GWidgetHorizScrollBar::GWidgetHorizScrollBar ( GWidgetGroup pParent,
int  x,
int  y,
int  w,
int  h,
int  nViewSize,
int  nModelSize 
)
virtual GClasses::GWidgetHorizScrollBar::~GWidgetHorizScrollBar ( ) [virtual]

Member Function Documentation

int GClasses::GWidgetHorizScrollBar::buttonWidth ( ) [protected]
virtual void GClasses::GWidgetHorizScrollBar::draw ( GImage pCanvas,
int  x,
int  y 
) [virtual]

Draws this widget on pCanvas at (x,y)

Implements GClasses::GWidget.

int GClasses::GWidgetHorizScrollBar::modelSize ( ) [inline]

Returns the current model size.

virtual void GClasses::GWidgetHorizScrollBar::onClickTab ( GWidgetSliderTab pTab) [protected, virtual]

Reimplemented from GClasses::GWidgetGroup.

virtual void GClasses::GWidgetHorizScrollBar::onPushVCRButton ( GWidgetVCRButton pButton) [protected, virtual]

Reimplemented from GClasses::GWidgetGroup.

virtual void GClasses::GWidgetHorizScrollBar::onSlideTab ( GWidgetSliderTab pTab,
int  dx,
int  dy 
) [protected, virtual]

Reimplemented from GClasses::GWidgetGroup.

int GClasses::GWidgetHorizScrollBar::pos ( ) [inline]

Gets the current scroll position of this scroll bar.

void GClasses::GWidgetHorizScrollBar::setModelSize ( int  n)

Sets the size of the model that this scroll bar represents (The size of the sliding tab is determined by the ratio of the size of the view over the size of the model)

void GClasses::GWidgetHorizScrollBar::setPos ( int  n)

Sets the current scroll position.

void GClasses::GWidgetHorizScrollBar::setViewSize ( int  n)

Sets the size of the view area that this scroll bar represents (The size of the sliding tab is determined by the ratio of the size of the view over the size of the model)

virtual WidgetType GClasses::GWidgetHorizScrollBar::type ( ) [inline, virtual]

Implements GClasses::GWidget.

int GClasses::GWidgetHorizScrollBar::viewSize ( ) [inline]

Returns the current view size.


Member Data Documentation