#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 |
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 |
|
- |
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 |
Destroy a verticalSwitch object. The pixmap is destroyed if there is no more reference on it.
draw |
1.0 |
Called when this control object needs to be drawn.
mouse |
1.0 |
Called when there is a mouse-click inside this control object.
CControlListener
's valueChanged
method which is called when the value has changed.