(new in Rev4.00)
MQSlider class manages a slider to adjust a value. It inherits a MQWidgetBase class.
Please refer the inherited class about member functions declared in the inherited class.
Class | |
MQSlider | Constructor |
~MQSlider | Destructor |
Member functions | |
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 |
Events | |
AddChangedEvent | Add an event after finishing to change a value |
AddChangingEvent | Add an event while changing a value |
MQSlider::MQSlider();
MQSlider::MQSlider(int id);
It is a constructor.
virtual MQSlider::~MQSlider();
This method is a destructor. It is defined as a virtual function.
int MQSlider::GetPosition();
It returns a current value.
void MQSlider::SetPosition(int value);
It specifies a current value.
int MQSlider::GetMin();
It returns a minimum value.
void MQSlider::SetMin(int 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 MQSlider::GetMax();
It returns a maximum value.
void MQSlider::SetMax(int 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.
template<typename T> void MQSlider::AddChangedEvent(T *p, BOOL (T::*f)(MQWidgetBase*, MQDocument), bool prior = false)
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 MQSlider::AddChangingEvent(T *p, BOOL (T::*f)(MQWidgetBase*, MQDocument), bool prior = false)
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.