(new in Rev4.00)
MQColorPanel class manages a color panel to select a color. It inherits a MQWidgetBase class.
Please refer the inherited class about member functions declared in the inherited class.
Class | |
MQColorPanel | Constructor |
~MQColorPanel | Destructor |
Member functions | |
GetColor | Get a RGB color |
SetColor | Set a RGB color |
GetHSV | Get a HSV color |
SetHSV | Set a HSV color |
Events | |
AddChangedEvent | Add an event after finishing to change a value |
AddChangingEvent | Add an event while changing a value |
MQColorPanel::MQColorPanel();
MQColorPanel::MQColorPanel(int id);
It is a constructor.
virtual MQColorPanel::~MQColorPanel();
This method is a destructor. It is defined as a virtual function.
void MQColorPanel::GetColor(int& r, int& g, int& b);
It returns a color.
void MQColorPanel::SetColor(int r, int g, int b);
It specifies a color.
void MQColorPanel::GetHSV(double& h, double& s, double& v);
It returns a color by HSV.
void MQColorPanel::SetHSV(double h, double s, double v);
It specifies a color by HSV.
template<typename T> void MQColorPanel::AddChangedEvent(T *p, BOOL (T::*f)(MQWidgetBase*, MQDocument), bool prior = false)
It adds events notified when a color has been changed by user's operation.
An event by AddChangingEvent() is invoked while dragging, and an event by AddChangedEvent() is invoked when a mouse button is released.
template<typename T> void MQColorPanel::AddChangingEvent(T *p, BOOL (T::*f)(MQWidgetBase*, MQDocument), bool prior = false)
It adds events notified when a color is changing by user's operation.
An event by AddChangingEvent() is invoked while dragging, and an event by AddChangedEvent() is invoked when a mouse button is released.