CVerticalSwitch

#include <vstcontrols.h>

class CVerticalSwitch : public CControl;

Define a switch with a given number of positions, the current position is defined by the position of the last click on this object (the object is divided in its height by the number of position).

Each position has its subpixmap, each subpixmap is stacked in the given handle pixmap.

By clicking Alt+Left Mouse the default value is used.


COptionMenu

1.0

CVerticalSwitch ( CRect &size, CControlListener *listener, long tag, long subpixmaps, long heightOfOneImage, long iMaxPositions, CBitmap *handle, CPoint &offset);

Creates a vertical switch with a given number of positions.

size
The coordinates of the enclosing rectangle, relative to the parent frame.
listener
The object responsible for handling events in this control.
tag
The index of the control.
subpixmaps
The number of subpixmaps.
heightOfOneImage
The height of one subpixmap in pixel.
iMaxPositions

handle
The pixmap containing all the images.
offset
-

[CVerticalSwitch]

[source] source

Example :

myPixmap = new CPixmap (kMyPixmapID);
CRect size (
kMySwitch_left,
kMySwitch_top,
kMySwitch_left + myPixmap->getWidth (),
kMySwitch_top + myPixmap->getHeight ()
/ kNumSubPixmaps
);
CPoint offset (0,0);
mySwitch = new CVerticalSwitch (
size,
this,
kMyParameter,
kNumSubPixmaps,
myPixmap->getHeight () / kNumSubPixmaps,
kNumSubPixmaps,
myPixmap,
offset
);
frame->addView (mySwitch);

~CVerticalSwitch

1.0

~CVerticalSwitch ();

Destroy a verticalSwitch object. The pixmap is destroyed if there is no more reference on it.

[source] source


draw

1.0

void draw (CDrawContext*);

Called when this control object needs to be drawn.

[source] source


mouse

1.0

void mouse (CDrawContext *context, CPoint &where);

Called when there is a mouse-click inside this control object.

[source] source

See also :


Copyright ©2003 Steinberg Media Technologies GmbH. All Rights Reserved.