CParamDisplay

#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

CParamDisplay (CRect &size, CBitmap*background = 0, int style = 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.

[source] source


~CParamDisplay

1.0

~CParamDisplay ();

Destroys a paramDisplay object.

[source] source


setFont

1.0

void setFont (CFont fontID);

Sets the font for the next drawing.


getFont

2.2

CFont getFont ();

Gets the actual font.


setFontColor

1.0

void setFontColor (CColor color);

Sets the color of the text.

[source] source


getFontColor

2.0

CColor getFontColor ();

Returns the color of the text.


setBackColor

1.0

void setBackColor (CColor color);

Sets the color of the background.

[source] source


getBackColor

2.0

CColor getBackColor ();

Returns the color of the background.


setFrameColor

1.0

void setFrameColor (CColor color);

Sets the color of the frame.

[source] source


getFrameColor

2.0

CColor getFrameColor ();

Returns the color of the frame.


setShadowColor

1.0

void setShadowColor (CColor color);

Sets the color of the text shadow.

[source] source


getShadowColor

2.0

CColor getShadowColor ();

Returns the color of the text shadow.


setHoriAlign

1.0

void setHoriAlign (CHoriTxtAlign hAlign);

Sets the type of alignment used to display the text.

[source] source


setStringConvert

1.0

void setStringConvert (void (*stringConvert) (float value, char *string));

Sets the value to text conversion routine.

Example :

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

void setStringConvert (void (*stringConvert) (float value, char *string, void *userData), void *userData);

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.

[source] source


setString2FloatConvert

2.2

void setString2FloatConvert (void (*convert) (char *string, float &output));

Sets the function which will be used to make the conversion.


setStyle

2.0

void setStyle (int val);

Sets a new style.

[source] source


getStyle

2.0

int getStyle ();

Returns the current style.


setTxtFace

2.1

void setTxtFace (CTxtFace txtFace);

Sets a new textFace style.

[source] source


getTxtFace

2.1

CTxtFace getTxtFace ();

Returns the current textFace style.


draw

1.0

void draw (CDrawContext *context);

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

[source] source


setTextTransparency

2.0

void setTextTransparency (bool val);

Sets the transparency mode of the text.


getTextTransparency

2.0

bool getTextTransparency ();

Returns the transparency mode of the text.


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