Public Types | |
enum | { kMouseEventsView_NoEvent, kMouseEventsView_MouseEntered, kMouseEventsView_MouseMoved, kMouseEventsView_MouseExited } |
Public Member Functions | |
Constructor / Destructor | |
CP_MouseEvents_View (CPLAT::CP_View *inSuperview, const CPLAT::CP_Point &inUpperLeft, const CPLAT::CP_Size &inContentSize) | |
Constructor. | |
virtual | ~CP_MouseEvents_View () throw () |
Destructor. | |
Mouse Events | |
virtual void | HandleMouseMoved (CPLAT::CP_Event_Base &inEvent, const CPLAT::CP_Point &inLocalMouseLocation) |
virtual void | HandleMouseEntered (CPLAT::CP_Event_Base &inEvent) |
virtual void | HandleMouseExited (CPLAT::CP_Event_Base &inEvent) |
Protected Member Functions | |
Drawing | |
virtual void | OnDraw (CPLAT::CP_Canvas &inCanvas, CPLAT::CP_Region &inUpdateArea) |
Private Attributes | |
SInt16 | fMouseEventStatus |
CPLAT::CP_Point | fMouseLocation |
CPLAT::CP_ARGBColor | fStrokeColor |
|
|
|
Constructor.
|
|
Destructor.
|
|
Event called when the mouse moves over this view.
|
|
Event called when the mouse enters this view. We set the color displayed by the frame of this view to red to indicate the mouse has entered the views bounds.
|
|
Event called when the mouse exits this view. We set the color displayed by the frame of this view to blue to indicate the mouse has exited the views bounds.
|
|
Called when the view needs to update the visual appearance of itself. In this demo we display the coordinates of the mouse when it moves over the bounds of this view.
|
|
|
|
|
|
|