Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

CP_MouseEvents_View Class Reference

CP_View subclass to display the current mouse coordinates when the mouse is in the content area of this view.

List of all members.

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


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
kMouseEventsView_NoEvent 
kMouseEventsView_MouseEntered 
kMouseEventsView_MouseMoved 
kMouseEventsView_MouseExited 


Constructor & Destructor Documentation

CP_MouseEvents_View::CP_MouseEvents_View CPLAT::CP_View *  inSuperview,
const CPLAT::CP_Point &  inUpperLeft,
const CPLAT::CP_Size &  inContentSize
 

Constructor.

Parameters:
inSuperview The subview handler that contains this pane.
inUpperLeft Upper left corner of pane in releation to its superview.
inContentSize Content size of the pane.
Exceptions:
none 

CP_MouseEvents_View::~CP_MouseEvents_View  )  throw () [virtual]
 

Destructor.

Exceptions:
none 


Member Function Documentation

void CP_MouseEvents_View::HandleMouseMoved CPLAT::CP_Event_Base &  inEvent,
const CPLAT::CP_Point &  inLocalMouseLocation
[virtual]
 

Event called when the mouse moves over this view.

Parameters:
inEvent The mouse moved event.
inLocalMouseLocation The location of the mouse in local coordinates.
Exceptions:
none 
Returns:
void

void CP_MouseEvents_View::HandleMouseEntered CPLAT::CP_Event_Base &  inEvent  )  [virtual]
 

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.

Parameters:
inEvent The mouse entered event.
Exceptions:
none 
Returns:
void

void CP_MouseEvents_View::HandleMouseExited CPLAT::CP_Event_Base &  inEvent  )  [virtual]
 

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.

Parameters:
inEvent The mouse exited event.
Exceptions:
none 
Returns:
void

void CP_MouseEvents_View::OnDraw CPLAT::CP_Canvas &  inCanvas,
CPLAT::CP_Region &  inUpdateArea
[protected, virtual]
 

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.

Parameters:
inCanvas The CP_Canvas to draw into.
inUpdateArea The area that needs to be drawn.
Exceptions:
none 
Returns:
void


Member Data Documentation

SInt16 CP_MouseEvents_View::fMouseEventStatus [private]
 

CPLAT::CP_Point CP_MouseEvents_View::fMouseLocation [private]
 

CPLAT::CP_ARGBColor CP_MouseEvents_View::fStrokeColor [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Sep 20 20:25:28 2005 for CPLAT_MacOS by  doxygen 1.4.0