MGUI::TOOLCANVAS Class Reference

#include <mgui/toolcanvas.h>

Inheritance diagram for MGUI::TOOLCANVAS:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TOOLCANVAS ()
virtual ~TOOLCANVAS ()
void DrawGadgets (DEVICETYPE DeviceType)
GADGETGetActiveGadget () const
TOOL_BASEGetActiveTool () const
const ZVIEWGetZView () const
void GraphicToolResume () const
void GraphicToolSuspend () const
void PlaceGadgets ()
void SetGadgetMargin (UINT16 margin)
void SetGadgetSpacing (UINT16 spacing)
void StereoCursorDrawAbsolute (const DPOINT3D &ptCanvas3D)
void StereoCursorDrawOnSurface (MGUI::POINT ptCanvas)
void StereoCursorRestore ()

Protected Member Functions

virtual void v_OnCaptureChanged ()
virtual bool v_OnKey (MGUI::POINT point, MGUI::KEYCODE keycode, MGUI::KEYSTATE keystate)
virtual void v_OnPaint (MGD::CONTEXT *gc)
virtual void v_OnPointerButtonDown (MGUI::POINT point, POINTERBUTTON button, KEYSTATE keystate)
virtual void v_OnPointerButtonUp (MGUI::POINT point, POINTERBUTTON button, KEYSTATE keystate)
virtual void v_OnPointerEnter ()
virtual void v_OnPointerLeave ()
virtual void v_OnPointerMove (MGUI::POINT point, POINTERBUTTON button, KEYSTATE keystate, bool hasmore)
virtual void v_OnSize (int width, int height)

Private Member Functions

void GadgetAttach (GADGET *const pGadget)
void GadgetDetach (GADGET *const pGadget)
void SetActiveTool (TOOL_BASE *pTool)
void ToolAttach (TOOL_BASE *const pTool)
void ToolDetach (TOOL_BASE *const pTool)
virtual const ZVIEWv_GetZView () const

Constructor & Destructor Documentation

MGUI::TOOLCANVAS::TOOLCANVAS (  ) 

Default constructor.

virtual MGUI::TOOLCANVAS::~TOOLCANVAS (  )  [virtual]

Destructor.


Member Function Documentation

void MGUI::TOOLCANVAS::DrawGadgets ( DEVICETYPE  DeviceType  ) 

Draw all gadgets on specified device type.

void MGUI::TOOLCANVAS::GadgetAttach ( GADGET *const   pGadget  )  [private]
void MGUI::TOOLCANVAS::GadgetDetach ( GADGET *const   pGadget  )  [private]
GADGET* MGUI::TOOLCANVAS::GetActiveGadget (  )  const

Get pointer to active gadget.

TOOL_BASE* MGUI::TOOLCANVAS::GetActiveTool (  )  const

Get pointer to currently active graphic tool.

const ZVIEW* MGUI::TOOLCANVAS::GetZView (  )  const [inline]

Get ZVIEW for surface value access and stereo drawing.

Returns:
Pointer to ZVIEW if available, NULL if not.
void MGUI::TOOLCANVAS::GraphicToolResume (  )  const

Resume active graphic tool.

void MGUI::TOOLCANVAS::GraphicToolSuspend (  )  const

Suspend active graphic tool.

void MGUI::TOOLCANVAS::PlaceGadgets (  ) 

Place gadgets on canvas.

void MGUI::TOOLCANVAS::SetActiveTool ( TOOL_BASE pTool  )  [private]
void MGUI::TOOLCANVAS::SetGadgetMargin ( UINT16  margin  ) 

Set gadget margin.

Parameters:
margin Margin between gadgets and canvas edge in pixels
void MGUI::TOOLCANVAS::SetGadgetSpacing ( UINT16  spacing  ) 

Set gadget spacing.

Parameters:
spacing Minimum spacing between gadgets in pixels
void MGUI::TOOLCANVAS::StereoCursorDrawAbsolute ( const DPOINT3D ptCanvas3D  ) 

Draw stereo cursor using absolute Z value.

Does not restore under previous stereo cursor if any.

Parameters:
ptCanvas3D Point with X/Y in canvas coordinates and Z value set
void MGUI::TOOLCANVAS::StereoCursorDrawOnSurface ( MGUI::POINT  ptCanvas  ) 

Draw stereo cursor on surface.

Does not restore under previous stereo cursor if any.

Parameters:
ptCanvas Point with X/Y in canvas coordinates
void MGUI::TOOLCANVAS::StereoCursorRestore (  ) 

Restore under stereo cursor if was previously drawn.

void MGUI::TOOLCANVAS::ToolAttach ( TOOL_BASE *const   pTool  )  [private]
void MGUI::TOOLCANVAS::ToolDetach ( TOOL_BASE *const   pTool  )  [private]
virtual const ZVIEW* MGUI::TOOLCANVAS::v_GetZView (  )  const [private, virtual]

Get ZVIEW for surface value access and stereo drawing.

Default implementation returns NULL.

virtual void MGUI::TOOLCANVAS::v_OnCaptureChanged (  )  [protected, virtual]

Called when cursor "capture" is changed (lost).

Override must call base for proper behavior.

Reimplemented from MGUI::CANVAS.

virtual bool MGUI::TOOLCANVAS::v_OnKey ( MGUI::POINT  point,
MGUI::KEYCODE  keycode,
MGUI::KEYSTATE  keystate 
) [protected, virtual]

Called when key "pressed".

Override must call base for proper behavior if does not handle key itself.

Returns:
'true' if key handled, 'false' if not.
Parameters:
point Point in canvas coordinates where button event occurred
keycode Processed key code, equivalent to MIUNICODE for alphanumeric keys.
keystate Modifier key state

Reimplemented from MGUI::CANVAS.

virtual void MGUI::TOOLCANVAS::v_OnPaint ( MGD::CONTEXT gc  )  [protected, virtual]

Called when canvas needs to be redrawn, do not call directly except from derived implementation.

Override must call base for proper behavior. This is called after the buffer is updated to the screen. If no overlay and not unbuffered then this method does not need to be overridden.

Parameters:
gc Drawing context for unbuffered/overlay.

Reimplemented from MGUI::CANVAS.

virtual void MGUI::TOOLCANVAS::v_OnPointerButtonDown ( MGUI::POINT  point,
POINTERBUTTON  button,
KEYSTATE  keystate 
) [protected, virtual]

Called when pointer button pressed.

Override must call base for proper behavior.

Parameters:
point Point in canvas coordinates where button event occurred
button Button that was pressed
keystate Modifier key state at time of event

Reimplemented from MGUI::CANVAS.

virtual void MGUI::TOOLCANVAS::v_OnPointerButtonUp ( MGUI::POINT  point,
POINTERBUTTON  button,
KEYSTATE  keystate 
) [protected, virtual]

Called when pointer button released.

Override must call base for proper behavior.

Parameters:
point Point in canvas coordinates where button event occurred
button Button that was released
keystate Modifier key state at time button was originally pressed

Reimplemented from MGUI::CANVAS.

virtual void MGUI::TOOLCANVAS::v_OnPointerEnter (  )  [protected, virtual]

Called when pointer enters canvas area.

Override must call base for proper behavior.

Reimplemented from MGUI::CANVAS.

virtual void MGUI::TOOLCANVAS::v_OnPointerLeave (  )  [protected, virtual]

Called when pointer leaves canvas area.

Override must call base for proper behavior.

Reimplemented from MGUI::CANVAS.

virtual void MGUI::TOOLCANVAS::v_OnPointerMove ( MGUI::POINT  point,
POINTERBUTTON  button,
KEYSTATE  keystate,
bool  hasmore 
) [protected, virtual]

Called when pointer is moved.

Override must call base for proper behavior.

Parameters:
point Point in canvas coordinates where button event occurred
button Current button state
keystate Modifier key state at time of event
hasmore Indicates whether more "move" events follow with same button/key state

Reimplemented from MGUI::CANVAS.

virtual void MGUI::TOOLCANVAS::v_OnSize ( int  width,
int  height 
) [protected, virtual]

Called when canvas size changes.

Override must call base for proper behavior.

Parameters:
width New canvas width in pixels
height New canvas height in pixels

Reimplemented from MGUI::CANVAS.


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:36:22 2012 for TNTsdk 2012 by  doxygen 1.6.1