#include <vstcontrols.h>
class CControl : public CView
;
Each control object (such as COnOffButton ) is derived from this class. This object manages the tag identification and the value of a control object.
In version 2.1, when an object uses the transparency for its background and draws on it (tranparency area) or the transparency area changes during different draws (CMovieBitmap ,...), the background will be false (not updated), you have to rewrite the draw function in order to redraw the background and then call the draw of the object.
CControl |
1.0 |
Creates a control with a given rect, listener and tag.
size |
The enclosing rectangle, in relative to the parent frame. |
---|---|
listener |
The object responsible for handling events in this control. |
tag |
The index of the control |
pBackground |
An optional background pixmap (only available since vesrion 2.0). |
~CControl |
1.0 |
Destroys a control object.
draw |
1.0 |
Draws the control.
update |
1.0 |
Calls draw
if the value is modified.
doIdleStuff |
1.0 |
Calls editor's doIdleStuff.
setValue |
1.0 |
Sets the current value.
getValue |
1.0 |
Returns the current value.
setMin |
1.0 |
Sets the control's minimal value.
getMin |
1.0 |
Returns the control's minimal value;
setMax |
1.0 |
Sets the control's maximal value.
getMax |
1.0 |
Returns the control's maximal value.
setOldValue |
1.0 |
Sets the old value.
getOldValue |
1.0 |
Returns the old value.
setDefaultValue |
1.0 |
Sets the default value.
getDefaultValue |
1.0 |
Returns the default value.
setTag |
2.0 |
Sets the tag of this control.
getTag |
1.0 |
Returns the tag of this control. Use to know which control object (i.e.
COnOffButton
, ...) is concerned by this control.
isDirty |
2.0 |
Returns true
if dirty (oldValue != value
).
setDirty |
2.0 |
Sets the control to dirty (the next update will redraw it).
setBackground |
1.0 |
Sets the background pixmap.
getBackground |
2.0 |
Returns the background pixmap.
setBackOffset |
2.2 |
Used to set the offset of the control's background.
copyBackOffset |
2.0 |
setWheelInc |
2.1 |
Every control has a parameter called WheelInc which defines the step at which
the control is affected by a mouse move (the control's value is modified by
distance-of-the-move * WheelInc). This method lets you set this parameter.
getWheelInc |
2.1 |
Returns the WheelInc parameter. See above.
bounceValue |
2.1 |
Used to make the control's value stay in the [vmin;vmax] range of the control.
getListener |
2.2 |
Returns the listener for the control.
isDoubleClick |
2.2 |
Checks whether the click is part of a double one.