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

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.


std::wstring MQMemo::GetFontName();

Return value
Font name

It returns a font name for displaying a text.


void MQMemo::SetFontName(const std::wstring& value);

value
Font name

It specifies a font name for displaying a text.


bool MQMemo::GetFontBold();

Return value
Bold font

It returns whether a displayed font is bold or not.


void MQMemo::SetFontBold(bool value);

value
Bold font

It specifies whether a displayed font is bold or not.


double MQMemo::GetFontScale();

Return value
Font scaling

It returns a font scaling ratio for a default font size.

A default value is 1.0.


void MQMemo::SetFontScale(double value);

value
Font scaling

It specifies a font scaling ratio for a default font size.


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.