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

Undo_ContentView Class Reference

CP_View class that draws rectangles when the user clicks on the view to demonstrate the ability to undo/redo these actions.

List of all members.

Public Member Functions

Constructor / Destructor
 Undo_ContentView (CPLAT::CP_View *inSuperview, const CPLAT::CP_Point &inUpperLeft, const CPLAT::CP_Size &inContentSize)
 Constructor.
virtual ~Undo_ContentView () throw ()
 Destructor.

Protected Member Functions

Drawing
virtual void OnDraw (CPLAT::CP_Canvas &inCanvas, CPLAT::CP_Region &inUpdateArea)
Events
virtual void InitEventHandler (CPLAT::CP_EventHandler &inEventHandler)
void HandleControlHitEvent (CPLAT::CP_Event_Base &inEvent)


Constructor & Destructor Documentation

Undo_ContentView::Undo_ContentView 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 

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

Destructor.

Exceptions:
none 


Member Function Documentation

void Undo_ContentView::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 use the CP_Graphics class to display the rectangles.

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

void Undo_ContentView::InitEventHandler CPLAT::CP_EventHandler &  inEventHandler  )  [protected, virtual]
 

Initializes the event handler by installing a mouse down or control clicked handler to add a new rect for each mouse click.

Parameters:
inEventHandler The event handler to add the events to.
Exceptions:
none 
Returns:
void

void Undo_ContentView::HandleControlHitEvent CPLAT::CP_Event_Base &  inEvent  )  [protected]
 

Slot called when the user clicks on the view. We use this opportunity to create a new undo / redo action.

Parameters:
inEvent The control clicked/mouse down event.
Exceptions:
none 
Returns:
void


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