GClasses
GClasses::GWidgetVertScrollBar Class Reference

Detailed Description

Makes a vertical scroll bar.

#include <GWidgets.h>

Inheritance diagram for GClasses::GWidgetVertScrollBar:
GClasses::GWidgetGroup GClasses::GWidget

Public Member Functions

 GWidgetVertScrollBar (GWidgetGroup *pParent, int x, int y, int w, int h, int nViewSize, int nModelSize)
 
virtual ~GWidgetVertScrollBar ()
 
virtual void draw (GImage *pCanvas, int x, int y)
 Draws this widget on pCanvas at (x,y) More...
 
int modelSize ()
 Returns the current model size. More...
 
int pos ()
 Gets the current scroll position of this scroll bar. More...
 
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) More...
 
void setPos (int n)
 Sets the current scroll position. More...
 
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) More...
 
virtual WidgetType type ()
 
int viewSize ()
 Returns the current view size. More...
 
- Public Member Functions inherited from GClasses::GWidgetGroup
 GWidgetGroup (GWidgetGroup *pParent, int x, int y, int w, int h)
 
virtual ~GWidgetGroup ()
 
GWidgetchildWidget (int n)
 
int childWidgetCount ()
 
virtual GWidgetAtomicfindAtomicWidget (int x, int y)
 
virtual bool isAtomic ()
 
virtual void onCanvasMouseDown (GWidgetCanvas *pCanvas, int button, int x, int y)
 
virtual void onCanvasMouseMove (GWidgetCanvas *pCanvas, int x, int y, bool bPressed)
 
virtual void onCanvasMouseUp (GWidgetCanvas *pCanvas, int button, int x, int y)
 
virtual void onChangeCheckBox (GWidgetCheckBox *pCheckBox)
 
virtual void onChar (char c)
 
virtual void onCheckBulletHole (GWidgetBulletHole *pBullet)
 
virtual void onClickTextLabel (GWidgetTextLabel *pLabel)
 
virtual void onCustomEvent (GWidget *pWidget)
 
virtual void onDestroyWidget (GWidget *pWidget)
 
virtual void onHorizScroll (GWidgetHorizScrollBar *pScrollBar)
 
virtual void onHorizSliderMove (GWidgetHorizSlider *pSlider)
 
virtual void onPushTextButton (GWidgetTextButton *pButton)
 
virtual void onReleaseImageButton (GWidgetImageButton *pButton)
 
virtual void onReleaseTextButton (GWidgetTextButton *pButton)
 
virtual void onSelectFilename (GWidgetFileSystemBrowser *pBrowser, const char *szFilename)
 
virtual void onSelectTextTab (GWidgetTextTab *pTab)
 
virtual void onSpecialKey (int key)
 
virtual void onTextBoxPressEnter (GWidgetTextBox *pTextBox)
 
virtual void onTextBoxTextChanged (GWidgetTextBox *pTextBox)
 
virtual void onVertScroll (GWidgetVertScrollBar *pScrollBar)
 
virtual void onVertSliderMove (GWidgetVertSlider *pSlider)
 
virtual void tattle (GWidget *pChild)
 
- Public Member Functions inherited from GClasses::GWidget
 GWidget (GWidgetGroup *m_pParent, int x, int y, int w, int h)
 
virtual ~GWidget ()
 
int id ()
 
GWidgetGroupparent ()
 
GRectrect ()
 
void setPos (int x, int y)
 

Protected Member Functions

int buttonHeight ()
 
virtual void onClickTab (GWidgetSliderTab *pTab)
 
virtual void onPushVCRButton (GWidgetVCRButton *pButton)
 
virtual void onSlideTab (GWidgetSliderTab *pTab, int dx, int dy)
 
- Protected Member Functions inherited from GClasses::GWidgetGroup
void addWidget (GWidget *pWidget)
 
bool getDirtyBit (int nBit)
 
void setClean ()
 
void setDirtyBit (int nBit, bool bValue)
 

Protected Attributes

int m_nModelSize
 
int m_nPos
 
int m_nViewSize
 
GWidgetSliderTabm_pAboveTab
 
GWidgetSliderTabm_pBelowTab
 
GWidgetVCRButtonm_pDownButton
 
GWidgetSliderTabm_pTab
 
GWidgetVCRButtonm_pUpButton
 
- Protected Attributes inherited from GClasses::GWidgetGroup
std::vector< unsigned int > m_dirtyBits
 
std::vector< GWidget * > m_dirtyChildren
 
std::vector< GWidget * > m_widgets
 
- Protected Attributes inherited from GClasses::GWidget
GWidgetCommonm_common
 
int m_nID
 
GWidgetGroupm_pParent
 
GRect m_rect
 

Additional Inherited Members

- Public Types inherited from GClasses::GWidget

Constructor & Destructor Documentation

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

Member Function Documentation

int GClasses::GWidgetVertScrollBar::buttonHeight ( )
protected
virtual void GClasses::GWidgetVertScrollBar::draw ( GImage pCanvas,
int  x,
int  y 
)
virtual

Draws this widget on pCanvas at (x,y)

Implements GClasses::GWidget.

int GClasses::GWidgetVertScrollBar::modelSize ( )
inline

Returns the current model size.

virtual void GClasses::GWidgetVertScrollBar::onClickTab ( GWidgetSliderTab pTab)
protectedvirtual

Reimplemented from GClasses::GWidgetGroup.

virtual void GClasses::GWidgetVertScrollBar::onPushVCRButton ( GWidgetVCRButton pButton)
protectedvirtual

Reimplemented from GClasses::GWidgetGroup.

virtual void GClasses::GWidgetVertScrollBar::onSlideTab ( GWidgetSliderTab pTab,
int  dx,
int  dy 
)
protectedvirtual

Reimplemented from GClasses::GWidgetGroup.

int GClasses::GWidgetVertScrollBar::pos ( )
inline

Gets the current scroll position of this scroll bar.

void GClasses::GWidgetVertScrollBar::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::GWidgetVertScrollBar::setPos ( int  n)

Sets the current scroll position.

void GClasses::GWidgetVertScrollBar::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::GWidgetVertScrollBar::type ( )
inlinevirtual

Implements GClasses::GWidget.

int GClasses::GWidgetVertScrollBar::viewSize ( )
inline

Returns the current view size.

Member Data Documentation

int GClasses::GWidgetVertScrollBar::m_nModelSize
protected
int GClasses::GWidgetVertScrollBar::m_nPos
protected
int GClasses::GWidgetVertScrollBar::m_nViewSize
protected
GWidgetSliderTab* GClasses::GWidgetVertScrollBar::m_pAboveTab
protected
GWidgetSliderTab* GClasses::GWidgetVertScrollBar::m_pBelowTab
protected
GWidgetVCRButton* GClasses::GWidgetVertScrollBar::m_pDownButton
protected
GWidgetSliderTab* GClasses::GWidgetVertScrollBar::m_pTab
protected
GWidgetVCRButton* GClasses::GWidgetVertScrollBar::m_pUpButton
protected