MQScrollBar class

(new in Rev4.00)

MQScrollBar class manages a scroll bar. It inherits a MQWidgetBase class.

Please refer the inherited class about member functions declared in the inherited class.

Class
MQScrollBar Constructor
~MQScrollBar Destructor
Member functions
GetDirection Get a direction
SetDirection Set a direction
GetPosition Get a position value
SetPosition Set a position value
GetMin Get a minimum value
SetMin Set a minimum value
GetMax Get a maximum value
SetMax Set a maximum value
GetPage Get a page width
SetPage Set a page width
GetIncrement Get an increment value
SetIncrement Set an increment value
Events
AddChangedEvent Add an event after finishing to change a value
AddChangingEvent Add an event while changing a value

MQScrollBar::MQScrollBar();

MQScrollBar::MQScrollBar(int id);

id
A widget ID created outside the plug-in

It is a constructor.


virtual MQScrollBar::~MQScrollBar();

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


MQScrollBar::MQScrollBarDirection MQScrollBar::GetDirection();

Return value
A direction to place
[DIRECTION_HORIZONTAL] Horizontal
[DIRECTION_VERTICAL] Vertical

(new in Rev4.43)

It returns a direction to place a scroll bar.


void MQScrollBar::SetDirection(MQScrollBarDirection value);

value
A direction to place
[DIRECTION_HORIZONTAL] Horizontal
[DIRECTION_VERTICAL] Vertical

(new in Rev4.43)

It specifies a direction to place a scroll bar.


int MQScrollBar::GetPosition();

Return value
A position value

It returns a current value.


void MQScrollBar::SetPosition(int value);

value
A position value

It specifies a current value.


int MQScrollBar::GetMin();

Return value
A minimum value

It returns a minimum value.


void MQScrollBar::SetMin(int value);

value
A minimum value

It specifies a minimum value.

If the minimum value is larger than the maximum value, the values are swapped and it ensures that the minimum value is always equal or lesser than the maximum value.


int MQScrollBar::GetMax();

Return value
A maximum value

It returns a maximum value.


void MQScrollBar::SetMax(int value);

value
A maximum value

It specifies a maximum value.

If the maximum value is lesser than the minimum value, the values are swapped and it ensures that the minimum value is always equal or lesser than the maximum value.


int MQScrollBar::GetPage();

Return value
A page width

It returns how long is a draggable bar in a slot for a minimum value and a maximum one.


void MQScrollBar::SetPage(int value);

value
A page width

It specifies how long is a draggable bar in a slot for a minimum value and a maximum one.


int MQScrollBar::GetIncrement();

Return value
An increment value

It returns an increment value for clicking the side buttons.


void MQScrollBar::SetIncrement(int value);

value
An increment value

It specifies an increment value for clicking the side buttons.


template<typename T> void MQScrollBar::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 value 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 MQScrollBar::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 value 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.