CSlider Class Reference

a slider control More...

#include <vstcontrols.h>

Inheritance diagram for CSlider:

CControl CView CReferenceCounter CHorizontalSlider CVerticalSlider List of all members.

Public Member Functions

 CSlider (const CRect &size, CControlListener *listener, long tag, long iMinPos, long iMaxPos, CBitmap *handle, CBitmap *background, CPoint &offset, const long style=kLeft|kHorizontal)
 CSlider (const CRect &rect, CControlListener *listener, long tag, CPoint &offsetHandle, long rangeHandle, CBitmap *handle, CBitmap *background, CPoint &offset, const long style=kLeft|kHorizontal)
virtual ~CSlider ()
virtual bool attached (CView *parent)
 view is attached to a parent view
virtual bool removed (CView *parent)
 view is removed from parent view
virtual void draw (CDrawContext *)
 called if the view should draw itself
virtual void mouse (CDrawContext *pContext, CPoint &where, long button=-1)
 called if a mouse click event occurs
virtual bool onWheel (CDrawContext *pContext, const CPoint &where, float distance)
 called if a mouse wheel event is happening over this view
virtual long onKeyDown (VstKeyCode &keyCode)
 called if a key down event occurs and this view has focus
virtual void setDrawTransparentHandle (bool val)
virtual void setFreeClick (bool val)
virtual bool getFreeClick () const
virtual void setOffsetHandle (CPoint &val)
virtual void setHandle (CBitmap *pHandle)
virtual CBitmap * getHandle () const
virtual void setZoomFactor (float val)
virtual float getZoomFactor () const

Protected Attributes

CPoint offset
CPoint offsetHandle
CBitmap * pHandle
COffscreenContext * pOScreen
long style
CCoord widthOfSlider
CCoord heightOfSlider
CCoord rangeHandle
CCoord minTmp
CCoord maxTmp
CCoord minPos
CCoord widthControl
CCoord heightControl
float zoomFactor
bool bDrawTransparentEnabled
bool bFreeClick

Detailed Description

a slider control

Define a slider with a given background and handle. The range of variation of the handle should be defined. By default the handler is drawn with transparency (white color). By clicking Alt+Left Mouse the default value is used.


Constructor & Destructor Documentation

CSlider::CSlider (  const CRect &  size,
CControlListener *  listener,
long  tag,
long  iMinPos,
long  iMaxPos,
CBitmap *  handle,
CBitmap *  background,
CPoint &  offset,
const long  style = kLeft|kHorizontal
) 
 

CSlider::CSlider (  const CRect &  rect,
CControlListener *  listener,
long  tag,
CPoint &  offsetHandle,
long  rangeHandle,
CBitmap *  handle,
CBitmap *  background,
CPoint &  offset,
const long  style = kLeft|kHorizontal
) 
 

CSlider::~CSlider (   )  [virtual]
 


Member Function Documentation

bool CSlider::attached (  CView *  parent  )  [virtual]
 

view is attached to a parent view

Reimplemented from CView.

void CSlider::draw (  CDrawContext *   )  [virtual]
 

called if the view should draw itself

Implements CControl.

virtual bool CSlider::getFreeClick (   )  const [inline, virtual]
 

virtual CBitmap* CSlider::getHandle (   )  const [inline, virtual]
 

virtual float CSlider::getZoomFactor (   )  const [inline, virtual]
 

void CSlider::mouse (  CDrawContext *  pContext,
CPoint &  where,
long  button = -1
)  [virtual]
 

called if a mouse click event occurs

Reimplemented from CView.

long CSlider::onKeyDown (  VstKeyCode &  keyCode  )  [virtual]
 

called if a key down event occurs and this view has focus

Reimplemented from CView.

bool CSlider::onWheel (  CDrawContext *  pContext,
const CPoint &  where,
float  distance
)  [virtual]
 

called if a mouse wheel event is happening over this view

Reimplemented from CView.

bool CSlider::removed (  CView *  parent  )  [virtual]
 

view is removed from parent view

Reimplemented from CView.

virtual void CSlider::setDrawTransparentHandle (  bool  val  )  [inline, virtual]
 

virtual void CSlider::setFreeClick (  bool  val  )  [inline, virtual]
 

void CSlider::setHandle (  CBitmap *  pHandle  )  [virtual]
 

void CSlider::setOffsetHandle (  CPoint &  val  )  [virtual]
 

virtual void CSlider::setZoomFactor (  float  val  )  [inline, virtual]
 


Member Data Documentation

bool CSlider::bDrawTransparentEnabled [protected]
 

bool CSlider::bFreeClick [protected]
 

CCoord CSlider::heightControl [protected]
 

CCoord CSlider::heightOfSlider [protected]
 

CCoord CSlider::maxTmp [protected]
 

CCoord CSlider::minPos [protected]
 

CCoord CSlider::minTmp [protected]
 

CPoint CSlider::offset [protected]
 

CPoint CSlider::offsetHandle [protected]
 

CBitmap* CSlider::pHandle [protected]
 

COffscreenContext* CSlider::pOScreen [protected]
 

CCoord CSlider::rangeHandle [protected]
 

long CSlider::style [protected]
 

CCoord CSlider::widthControl [protected]
 

CCoord CSlider::widthOfSlider [protected]
 

float CSlider::zoomFactor [protected]
 


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

Copyright ©2006 Steinberg Media Technologies. All Rights Reserved.