GRE::UI::VIEW_CANVAS Class Reference

#include <gre/uiviewcanvas.h>

Inheritance diagram for GRE::UI::VIEW_CANVAS:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 VIEW_CANVAS ()
virtual ~VIEW_CANVAS ()
ERRVALUE CreateCanvas (MGUI::LAYOUT_PANE &ParentPane, VIEWABLE *viewable, int iwidth, int iheight, const char *sizefield=0, CREATEFLAGS createflags=CREATEFLAG_None, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_Expand)
MGUI::TOOLCANVASGetCanvas ()
MGD::DEVICE_MEM32RGBGetDrawingDeviceViewInView () const
MGUI::LAYOUT_PANEGetToolBarPane ()
VIEWTOOLMGRGetToolMgr () const
ERRVALUE Pan (INT16 dx, INT16 dy)
VIEWTOOLToolFind (VIEWTOOLID ViewToolID) const
VIEWTOOLToolGetActive () const
VIEWTOOLID ToolGetActiveID () const
void ToolSet (VIEWTOOLID ViewToolID)
void ToolSet (VIEWTOOL *tool)
void ToolSetDefault ()
ERRVALUE Zoom (double dz, INT16 cx, INT16 cy)

Protected Member Functions

Overridables



virtual bool v_OnKey (MGUI::POINT point, MGUI::KEYCODE keycode, MGUI::KEYSTATE keystate)
virtual void v_OnPointerButtonDown (MGUI::POINT point, MGUI::POINTERBUTTON button, MGUI::KEYSTATE keystate)
virtual void v_OnPointerButtonUp (MGUI::POINT point, MGUI::POINTERBUTTON button, MGUI::KEYSTATE keystate)
virtual void v_OnPointerEnter ()
virtual void v_OnPointerLeave ()
virtual void v_OnPointerMove (MGUI::POINT point, MGUI::KEYSTATE keystate)

Private Member Functions

virtual MGUI::LAYOUT_PANEv_GetToolBarPane ()

Constructor & Destructor Documentation

GRE::UI::VIEW_CANVAS::VIEW_CANVAS (  ) 

Default constructor.

virtual GRE::UI::VIEW_CANVAS::~VIEW_CANVAS (  )  [virtual]

Destructor.


Member Function Documentation

ERRVALUE GRE::UI::VIEW_CANVAS::CreateCanvas ( MGUI::LAYOUT_PANE ParentPane,
VIEWABLE viewable,
int  iwidth,
int  iheight,
const char *  sizefield = 0,
CREATEFLAGS  createflags = CREATEFLAG_None,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_Expand 
)

Create canvas and view.

Parameters:
sizefield Field from .ini for retrieving window size
MGUI::TOOLCANVAS& GRE::UI::VIEW_CANVAS::GetCanvas (  )  [inline]

Get canvas.

MGD::DEVICE_MEM32RGB* GRE::UI::VIEW_CANVAS::GetDrawingDeviceViewInView (  )  const [inline]

Get MGD::DEVICE for 'view-in-view'.

MGUI::LAYOUT_PANE* GRE::UI::VIEW_CANVAS::GetToolBarPane (  )  [inline]

Get pointer to toolbar pane.

Returns:
NULL if no toolbar pane.
VIEWTOOLMGR* GRE::UI::VIEW_CANVAS::GetToolMgr (  )  const [inline]

Get tool manager.

Intended for internal use only.

ERRVALUE GRE::UI::VIEW_CANVAS::Pan ( INT16  dx,
INT16  dy 
)

Pan canvas by specified amount.

If possible, existing rendering will be copied and exposed area filled in.

Parameters:
dx Amount to pan left(-) or right(+) in display pixels
dy Amount to pan up(-) down(+) in display pixels
VIEWTOOL* GRE::UI::VIEW_CANVAS::ToolFind ( VIEWTOOLID  ViewToolID  )  const

Find tool using builtin ID.

VIEWTOOL* GRE::UI::VIEW_CANVAS::ToolGetActive (  )  const

Get the active tool.

Returns:
Pointer to active tool or NULL if no tool active.
VIEWTOOLID GRE::UI::VIEW_CANVAS::ToolGetActiveID (  )  const

Get ID of active tool.

Returns:
Active tool VIEWTOOLID, VIEWTOOLID_None if no tool active.
void GRE::UI::VIEW_CANVAS::ToolSet ( VIEWTOOLID  ViewToolID  ) 

Set active tool for view (by tool ID).

Parameters:
ViewToolID Builtin tool id
void GRE::UI::VIEW_CANVAS::ToolSet ( VIEWTOOL tool  ) 

Set active tool for view (by tool).

Parameters:
tool Tool
void GRE::UI::VIEW_CANVAS::ToolSetDefault (  ) 

Set tool to default.

virtual MGUI::LAYOUT_PANE* GRE::UI::VIEW_CANVAS::v_GetToolBarPane (  )  [private, virtual]

Get pointer to toolbar pane.

Default implementation returns NULL.

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

Called when key "pressed".

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
virtual void GRE::UI::VIEW_CANVAS::v_OnPointerButtonDown ( MGUI::POINT  point,
MGUI::POINTERBUTTON  button,
MGUI::KEYSTATE  keystate 
) [protected, virtual]

Called when pointer button pressed.

Override must call base for proper behavior.

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

Called when pointer button released.

Override must call base for proper behavior.

virtual void GRE::UI::VIEW_CANVAS::v_OnPointerEnter (  )  [protected, virtual]

Called when pointer enters canvas area.

Override must call base for proper behavior.

virtual void GRE::UI::VIEW_CANVAS::v_OnPointerLeave (  )  [protected, virtual]

Called when pointer leaves canvas area.

Override must call base for proper behavior.

virtual void GRE::UI::VIEW_CANVAS::v_OnPointerMove ( MGUI::POINT  point,
MGUI::KEYSTATE  keystate 
) [protected, virtual]

Called when pointer is moved.

Override must call base for proper behavior.

Parameters:
point Point in canvas coordinates where button event occurred
keystate Modifier key state at time of event
ERRVALUE GRE::UI::VIEW_CANVAS::Zoom ( double  dz,
INT16  cx,
INT16  cy 
)

Zoom view by specified amount.

If possible, existing rendering will be used for initial display before redraw.

Parameters:
dz Change in zoom, > 1 to increase, < 1 to decrease
cx Center X coordinate to zoom around in device coordinates
cy Center Y coordinate to zoom around in device coordinates

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

Generated on Sun Oct 7 21:34:59 2012 for TNTsdk 2012 by  doxygen 1.6.1