- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# COnOffButton Class Reference

a button control with 2 states More...

`#include <vstcontrols.h>`

Inheritance diagram for COnOffButton:

List of all members.

## Public Types
enum | { kPreListenerUpdate, kPostListenerUpdate }
## Public Member Functions
| COnOffButton (const CRect &size, CControlListener *listener, long tag, CBitmap *background, long style=kPreListenerUpdate)
virtual | ~COnOffButton ()
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 long | getStyle () const
virtual void | setStyle (long newStyle)
## Protected Attributes
long | style

## Detailed Description

a button control with 2 states

Define a button with 2 positions. The pixmap includes the 2 subpixmaps (i.e the rectangle used for the display of this button is half-height of the pixmap). When its value changes, the listener is called.

## Member Enumeration Documentation

anonymous enum

  | Enumerator:
  kPreListenerUpdate | listener will be called after doIdleStuff was called
  kPostListenerUpdate | listener will be called before doIdleStuff is called

## Constructor & Destructor Documentation

COnOffButton::COnOffButton | ( | const CRect & | size,
|  | CControlListener * | listener,
|  | long | tag,
|  | CBitmap * | background,
|  | long | style = `kPreListenerUpdate`
| ) |

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

## Member Function Documentation

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

| called if the view should draw itself Implements CControl. Reimplemented in CTabButton.

virtual long COnOffButton::getStyle | ( |  | ) | const`[inline, virtual]`

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

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

virtual void COnOffButton::setStyle | ( | long | newStyle | ) | `[inline, virtual]`

## Member Data Documentation

long COnOffButton::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.