- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# CRockerSwitch Class Reference

a switch control with 3 sub bitmaps More...

`#include <vstcontrols.h>`

Inheritance diagram for CRockerSwitch:

List of all members.

## Public Member Functions
| CRockerSwitch (const CRect &size, CControlListener *listener, long tag, CBitmap *background, CPoint &offset, const long style=kHorizontal)
| CRockerSwitch (const CRect &size, CControlListener *listener, long tag, CCoord heightOfOneImage, CBitmap *background, CPoint &offset, const long style=kHorizontal)
virtual | ~CRockerSwitch ()
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
## Protected Attributes
CPoint | offset
CCoord | heightOfOneImage
long | style

## Detailed Description

a switch control with 3 sub bitmaps

Define a rocker switch with 3 states using 3 subpixmaps. One click on its leftside, then the first subpixmap is displayed. One click on its rightside, then the third subpixmap is displayed. When the mouse button is relaxed, the second subpixmap is framed.

## Constructor & Destructor Documentation

CRockerSwitch::CRockerSwitch | ( | const CRect & | size,
|  | CControlListener * | listener,
|  | long | tag,
|  | CBitmap * | background,
|  | CPoint & | offset,
|  | const long | style = `kHorizontal`
| ) |

CRockerSwitch::CRockerSwitch | ( | const CRect & | size,
|  | CControlListener * | listener,
|  | long | tag,
|  | CCoord | heightOfOneImage,
|  | CBitmap * | background,
|  | CPoint & | offset,
|  | const long | style = `kHorizontal`
| ) |

CRockerSwitch::~CRockerSwitch | ( |  | ) | `[virtual]`

## Member Function Documentation

void CRockerSwitch::draw | ( | CDrawContext * |  | ) | `[virtual]`

| called if the view should draw itself Implements CControl.

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

| called if a mouse click event occurs Reimplemented from CView.

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

| called if a mouse wheel event is happening over this view Reimplemented from CView.

## Member Data Documentation

CCoord CRockerSwitch::heightOfOneImage`[protected]`

CPoint CRockerSwitch::offset`[protected]`

long CRockerSwitch::style`[protected]`

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

- vstcontrols.h
- vstcontrols.cpp

Empty

Copyright ©2006 Steinberg Media Technologies. All Rights Reserved.