Inheritance diagram for Exponent::GUI::Controls::CRolloverButton:
A rollover button has 3 states:
Mouse off (mouse not inside the area)
Mover over (mouse inside area but not down)
Mouse down (mouse inside area and down)
And event is fired when the mouse has been down then released ie - It is a momentary button
Definition at line 38 of file CRolloverButton.hpp.
Rollover state enumerator.
e_mouseOff | Mouse is not within control |
e_mouseOver | Mouse is over area |
e_mouseDown | Mouse is clicked in area |
Definition at line 54 of file CRolloverButton.hpp.
Exponent::GUI::Controls::CRolloverButton::CRolloverButton | ( | IControlRoot * | root, | |
const long | uniqueId, | |||
const CRect & | area, | |||
IActionListener * | listener = NULL | |||
) |
Construction
root | The root control that this control is being added to | |
uniqueId | The unique Identifier of this control or CCONTROL_NO_ID_REQUIRED if no id is required | |
area | The area of this control relative to the root controls top left | |
listener | The action listener |
virtual Exponent::GUI::Controls::CRolloverButton::~CRolloverButton | ( | ) | [virtual] |
Destruction
virtual void Exponent::GUI::Controls::CRolloverButton::drawControl | ( | CGraphics & | graphics | ) | [virtual] |
Draw the controls
graphics | The graphics context |
Reimplemented from Exponent::GUI::Controls::CControl.
virtual void Exponent::GUI::Controls::CRolloverButton::handleLeftButtonDown | ( | CMouseEvent & | event | ) | [virtual] |
Handle left button being clicked
event | The event to handle |
Reimplemented from Exponent::GUI::Controls::CControl.
Reimplemented in Exponent::GUI::Controls::CRepeatingButton.
virtual void Exponent::GUI::Controls::CRolloverButton::handleLeftButtonUp | ( | CMouseEvent & | event | ) | [virtual] |
Handle left button being released
event | The event to handle |
Reimplemented from Exponent::GUI::Controls::CControl.
Reimplemented in Exponent::GUI::Controls::CRepeatingButton.
virtual void Exponent::GUI::Controls::CRolloverButton::handleMouseLeavingArea | ( | CMouseEvent & | event | ) | [virtual] |
Handle mouse leaving the area
event | The event to handle |
Reimplemented from Exponent::GUI::Controls::CControl.
virtual void Exponent::GUI::Controls::CRolloverButton::handleMouseMovement | ( | CMouseEvent & | event | ) | [virtual] |
Handle mouse movement
event | The event to handle |
Reimplemented from Exponent::GUI::Controls::CControl.
Reimplemented in Exponent::GUI::Controls::CRepeatingButton.
virtual void Exponent::GUI::Controls::CRolloverButton::setDownImage | ( | IImage * | theImage | ) | [virtual] |
Set the down image
theImage | The image to display when the mouse is down |
void Exponent::GUI::Controls::CRolloverButton::setLabelText | ( | const CString & | text | ) | [inline] |
Set the label text
text | The text to display on the button if there is no image |
Definition at line 138 of file CRolloverButton.hpp.
References m_labelText.
virtual void Exponent::GUI::Controls::CRolloverButton::setOverImage | ( | IImage * | theImage | ) | [virtual] |
Set the over image
theImage | The image to display when the mouse is over |
virtual void Exponent::GUI::Controls::CRolloverButton::useCursorChange | ( | const bool | use = true |
) | [inline, virtual] |
Should we use cursor change?
use | If true then when mouse over occurs mouse is changed to hand cursor |
Definition at line 84 of file CRolloverButton.hpp.
References m_cursorChange.
bool Exponent::GUI::Controls::CRolloverButton::m_cursorChange [protected] |
Should the cursor change
Definition at line 149 of file CRolloverButton.hpp.
Referenced by useCursorChange().
IImage* Exponent::GUI::Controls::CRolloverButton::m_downImage [protected] |
The down image
Definition at line 146 of file CRolloverButton.hpp.
CString Exponent::GUI::Controls::CRolloverButton::m_labelText [protected] |
Text drawn on the face of the button if no image is set
Definition at line 151 of file CRolloverButton.hpp.
Referenced by setLabelText().
bool Exponent::GUI::Controls::CRolloverButton::m_mouseIsDown [protected] |
Is the mouse down?
Definition at line 150 of file CRolloverButton.hpp.
IImage* Exponent::GUI::Controls::CRolloverButton::m_overImage [protected] |
The over image
Definition at line 147 of file CRolloverButton.hpp.
The state
Definition at line 148 of file CRolloverButton.hpp.