#include <vstcontrols.h>
class CParamDisplay : public CControl;
Define a rectangle view where a text-value can be displayed with a given font and color. The user can specify its convert function (from float to char) by default the string format is "%2.2f". The text-value is centered in the given rect.
CParamDisplay |
1.0 |
Creates a paramDisplay with a given rect with or without a background pixmap.
size |
The coordinates of the rectangle enclosing the display, relative to the parent frame. |
---|---|
background |
An optional background pixmap. |
style |
An optional formating constant taken from CControlEnum
: kShadowText , k3DIn , or k3DOut . |
~CParamDisplay |
1.0 |
Destroys a paramDisplay object.
setFont |
1.0 |
Sets the font for the next drawing.
getFont |
2.2 |
Gets the actual font.
setFontColor |
1.0 |
Sets the color of the text.
getFontColor |
2.0 |
Returns the color of the text.
setBackColor |
1.0 |
Sets the color of the background.
getBackColor |
2.0 |
Returns the color of the background.
setFrameColor |
1.0 |
Sets the color of the frame.
getFrameColor |
2.0 |
Returns the color of the frame.
setShadowColor |
1.0 |
Sets the color of the text shadow.
getShadowColor |
2.0 |
Returns the color of the text shadow.
setHoriAlign |
1.0 |
Sets the type of alignment used to display the text.
setStringConvert |
1.0 |
Sets the value to text conversion routine.
void myConvert (float value, char *string)
{
sprintf (string, "val = %.3f", value);
}
...
CRect myRect (kMyDisplay_left, kMyDisplay_top, kMyDisplay_right, kMyDisplay_bottom);
myDisplay = new CParamDisplay (myRect);
myDisplay->setStringConvert (myConvert);
setStringConvert |
2.0 |
Sets the convert function used to display the value. This convertion function gets the priority over the function without userData.
stringConvert |
The value to text conversion function. |
---|---|
userData |
Can be used if the user wants to retrieve in the convert function. |
setString2FloatConvert |
2.2 |
Sets the function which will be used to make the conversion.
setStyle |
2.0 |
Sets a new style.
getStyle |
2.0 |
Returns the current style.
setTxtFace |
2.1 |
Sets a new textFace style.
getTxtFace |
2.1 |
Returns the current textFace style.
draw |
1.0 |
Called when there is a mouse-click inside this control object.
setTextTransparency |
2.0 |
Sets the transparency mode of the text.
getTextTransparency |
2.0 |
Returns the transparency mode of the text.