#include <mgui/toolcanvas.h>

Public Member Functions | |
| TOOLCANVAS () | |
| virtual | ~TOOLCANVAS () |
| void | DrawGadgets (DEVICETYPE DeviceType) |
| GADGET * | GetActiveGadget () const |
| TOOL_BASE * | GetActiveTool () const |
| const ZVIEW * | GetZView () 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 ZVIEW * | v_GetZView () const |
| MGUI::TOOLCANVAS::TOOLCANVAS | ( | ) |
Default constructor.
| virtual MGUI::TOOLCANVAS::~TOOLCANVAS | ( | ) | [virtual] |
Destructor.
| 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] |
| 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.
| margin | Margin between gadgets and canvas edge in pixels |
| void MGUI::TOOLCANVAS::SetGadgetSpacing | ( | UINT16 | spacing | ) |
Set gadget spacing.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| width | New canvas width in pixels | |
| height | New canvas height in pixels |
Reimplemented from MGUI::CANVAS.
1.6.1