(new in Rev4.00)
MQMemo class manages a memo to input multi-line text. It inherits MQWidgetBase class.
Please refer the inherited class about member functions declared in the inherited class.
Class | |
MQMemo | Constructor |
~MQMemo | Destructor |
Member functions | |
GetText | Get a displayed text |
SetText | Set a displayed text |
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 |
GetReadOnly | Get a read-only mode |
SetReadOnly | Set a read-only mode |
SetFocus | Set a focus |
Events | |
AddChangedEvent | Add an event after finishing to change a text |
AddChangingEvent | Add an event while changing a text |
MQMemo::MQMemo();
MQMemo::MQMemo(int id);
It is a constructor.
virtual MQMemo::~MQMemo();
This method is a destructor. It is defined as a virtual function.
std::wstring MQMemo::GetText();
It returns a text displayed in the input area.
void MQMemo::SetText(const std::wstring& text);
It specifies a text displayed in the input area.
std::wstring MQMemo::GetFontName();
It returns a font name for displaying a text.
void MQMemo::SetFontName(const std::wstring& value);
It specifies a font name for displaying a text.
bool MQMemo::GetFontBold();
It returns whether a displayed font is bold or not.
void MQMemo::SetFontBold(bool value);
It specifies whether a displayed font is bold or not.
double MQMemo::GetFontScale();
It returns a font scaling ratio for a default font size.
A default value is 1.0.
void MQMemo::SetFontScale(double value);
It specifies a font scaling ratio for a default font size.
bool MQMemo::GetReadOnly();
It returns whether to input characters by keys (false) or reject key inputs (true).
void MQMemo::SetReadOnly(bool value);
It returns whether to input characters by keys (false) or reject key inputs (true).
void MQMemo::SetFocus(bool value);
It focuses this widget.
When this widget is focused, keyboard messages are notified to this widget.
When other widget has a focus and 'true' is specified, the focus will move from the widget to this.
template<typename T> void MQMemo::AddChangedEvent(T *p, BOOL (T::*f)(MQWidgetBase*, MQDocument), bool prior = false)
It adds events notified when a text has been changed by user's operation.
An event by AddChangingEvent() is invoked when characters are modified by key input, and an event by AddChangedEvent() is invoked when Enter key is pressed or a focus removed by Tab key or a mouse operation.
template<typename T> void MQMemo::AddChangingEvent(T *p, BOOL (T::*f)(MQWidgetBase*, MQDocument), bool prior = false)
It adds events notified when a text is changing by user's operation.
An event by AddChangingEvent() is invoked when characters are modified by key input, and an event by AddChangedEvent() is invoked when Enter key is pressed or a focus removed by Tab key or a mouse operation.