Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

sjgui::CSliderCtrlTmpl< Tbase > Class Template Reference

Horizontal and vertical slider. More...

#include <slider.h>

Inheritance diagram for sjgui::CSliderCtrlTmpl< Tbase >:

sjgui::classic::CSliderTmpl< Tbase > sjgui::modern::CSliderTmpl< Tbase > List of all members.

Public Member Functions

virtual void OnKeyUp (int &iKey)
 Process clicks and end of dragging.

virtual void OnKeyDown (int &iKey)
 Process start of dragging.

virtual void OnReshape ()
 Set proper position.

virtual void OnMouseMove (int iX, int iY)
 Process dragging.

void SetSliderLength (float f)
 Set size of the sliding part (in percents) [0..1].

void SetMinMax (int a, int b)
 Set minimum and maximum values.

int GetMin ()
 Get minimum setting.

int GetMax ()
 Get maximum setting.

int GetStep ()
 Get step setting.

int GetPageStep ()
 Get page step setting.

void SetOrient (CWnd::eOrient e)
 Set orientation.

CWnd::eOrient GetOrient ()
 Get orientation.

int GetSliderPos ()
 Get slider position.

void SetSliderPos (int i)
 Set slider position.


Protected Member Functions

virtual void OnUpdatePos ()
 Update sliding part position.


Protected Attributes

int m_iMin
 Minimum value.

int m_iMax
 Maximum value.

int m_iStep
 size of one step (in pixels)

int m_iPageStep
 size of one page step (in pixels)

float m_fPercent
 Controls length of the sliding part.

int m_iPosition
 Current sliding part position.

CWnd::CRect m_SliderPos
 Rectangle of the sliding part.

CWnd::CRect m_OldSliderPos
 Previous position of the sliding part.

CWnd::eOrient m_eOrient
 Orientation.

int m_iClickX
 X starting dragging position.

int m_iClickY
 Y starting dragging position.


Detailed Description

template<class Tbase>
class sjgui::CSliderCtrlTmpl< Tbase >

Horizontal and vertical slider.

Parameters:
Tbase - base class (use CWndCtrl) Horizontal and vertical slider with maximum, minimum options. Reacts on dragging (moves one step to a corresponding side) and clicks on the sides (moves one page step to a corresponding side). Minimum is always on the top or left side of the slider.
Author:
Alexander Shyrokov
Version:
Revision
1.1.1.1


Member Function Documentation

template<class Tbase>
int sjgui::CSliderCtrlTmpl< Tbase >::GetSliderPos  )  [inline]
 

Get slider position.

It should be always in between minimum and maximum.

template<class Tbase>
void sjgui::CSliderCtrlTmpl< Tbase >::SetSliderLength float  f  )  [inline]
 

Set size of the sliding part (in percents) [0..1].

This value sets what percent of the slider should occupy sliding part. Useful, when, taking text for example, you want sliding part to represent number of lines visible on the screen. Page step will be determined from this value.

template<class Tbase>
void sjgui::CSliderCtrlTmpl< Tbase >::SetSliderPos int  i  )  [inline]
 

Set slider position.

If more then maximum or less then minimum will be set to the limits.


The documentation for this class was generated from the following file:
sjgui logo
Quick Links:

 News
 Description
 Screen Shots
 Projects
 Downloads
 Source Code
 Help/FAQ
 Want to help?
 Credits
 Disclaimer


Documentation:

 Documentation
 Reference
 Lessons


Useful links:

sjcomp logo
sjcomp

opengl logo

nehe logo

SourceForge.net Logo

Last modified:


Started by Alexander Shyrokov. Generated at Wed Apr 28 12:31:06 2004 for the sjgui by doxygen 1.3.1. SourceForge.net Logo