(new in Rev4.00)
MQLabel class manages a label to display a string. It inherites MQWidgetBase class.
Please refer the inherited class about member functions declared in the inherited class.
Class | |
MQLabel | Constructor |
~MQLabel | Destructor |
Member functions | |
GetText | Get a displayed string |
SetText | Set a displayed string |
GetFontName | Get a font name |
SetFontName | Set a font name |
GetFontBold | Get a bold font |
SetFontBold | Set a bold font |
GetFontScale | Get a font scaling |
SetFontScale | Set a font scaling |
GetFontColor | Get a font color |
SetFontColor | Set a font color |
GetAlignment | Get an alignment for a text |
SetAlignment | Set an alignment for a text |
GetVerticalText | Get a vertical text |
SetVerticalText | Set a vertical text |
GetWordWrap | Get a word wrap |
SetWordWrap | Set a word wrap |
GetFrame | Get a frame to display |
SetFrame | Set a frame to display |
GetShadowText | Get a shadow display |
SetShadowText | Set a shadow display |
MQLabel::MQLabel();
MQLabel::MQLabel(int id);
It is a constructor.
virtual MQLabel::~MQLabel();
This method is a destructor. It is defined as a virtual function.
std::wstring MQLabel::GetText();
It returns a displayed string.
void MQLabel::SetText(const std::wstring& text);
It specifies a displayed string.
std::wstring MQLabel::GetFontName();
It returns a font name for displaying a text.
void MQLabel::SetFontName(const std::wstring& value);
It specifies a font name for displaying a text.
bool MQLabel::GetFontBold();
It returns whether a displayed font is bold or not.
void MQLabel::SetFontBold(bool value);
It specifies whether a displayed font is bold or not.
double MQLabel::GetFontScale();
It returns a font scaling ratio for a default font size.
A default value is 1.0.
void MQLabel::SetFontScale(double value);
It specifies a font scaling ratio for a default font size.
void MQLabel::GetFontColor(int& r, int& g, int& b, int& a);
It returns a color of a displayed font. Each value is from 0 to 255.
When a is 0, a text is drawn with a default color.
void MQLabel::SetFontColor(int r, int g, int b, int a);
It specifies a color of a displayed font. Each value is from 0 to 255.
MQLabel::MQLabelTextAlignment MQLabel::GetAlignment();
It returns an alignment for displaying a text.
void MQLabel::SetAlignment(MQLabelTextAlignment value);
It specifies an alignment for displaying a text.
bool MQLabel::GetVerticalText();
It returns whether a text is displayed horizontally(false) or vertically(true).
void MQLabel::SetVerticalText(bool value);
It specifies whether a text is displayed horizontally(false) or vertically(true).
bool MQLabel::GetWordWrap();
It returns whether a long sentence that cannot be with in a single line is displayed in multiple lines by separating between words.
void MQLabel::SetWordWrap(bool value);
It specifies whether a long sentence that cannot be with in a single line is displayed in multiple lines by separating between words.
bool MQLabel::GetFrame();
It returns whether to display a frame outside a text.
void MQLabel::SetFrame(bool value);
It specifies whether to display a frame outside a text.
bool MQLabel::GetShadowText();
(new in Rev4.30)
It returns whether a shadow is displayed or not behide a text.
void MQLabel::SetShadowText(bool value);
(new in Rev4.30)
It specifies whether a shadow is displayed or not behide a text.