MQMemo class

(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
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);

id
A widget ID created outside the plug-in

It is a constructor.


virtual MQMemo::~MQMemo();

This method is a destructor. It is defined as a virtual function.


std::wstring MQMemo::GetText();

Return value
A displayed string

It returns a text displayed in the input area.


void MQMemo::SetText(const std::wstring& text);

text
A displayed string

It specifies a text displayed in the input area.


bool MQMemo::GetReadOnly();

Return value
Read-only mode

It returns whether to input characters by keys (false) or reject key inputs (true).


void MQMemo::SetReadOnly(bool value);

value
Read-only mode

It returns whether to input characters by keys (false) or reject key inputs (true).


void MQMemo::SetFocus(bool value);

value
A focus status

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)

p
A widget to notify events
f
A member function to notify events
prior
An order to notify events
[true] Notify first
[false] Notify last

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)

p
A widget to notify events
f
A member function to notify events
prior
An order to notify events
[true] Notify first
[false] Notify last

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.