#include <mi32/grtool.h>
Inheritance diagram for MicroImages::GRTOOL:

Public Types | |
| enum | ADJUSTFLAGS { ADJUST_Default = 0x00, ADJUST_Absolute = 0x01, ADJUST_ScreenCoords = 0x02, ADJUST_Notify = 0x80 } |
| enum | CTRLOPT { CTRLOPT_Default = 0x00, CTRLOPT_Manual = 0x01, CTRLOPT_GPS = 0x02, CTRLOPT_SnapGrid = 0x04, CTRLOPT_NoManualProj = 0x08 } |
| enum | MARKER { MARKER_X = 0, MARKER_Plus = 1, MARKER_ArrowIn = 2, MARKER_ArrowOut = 3, MARKER_None = 4, MARKER_Circle = 5, MARKER_Flat = 6, MARKER_Square = 7 } |
| enum | MOVESEQ { MOVESEQ_Begin = 1, MOVESEQ_Continue = 2, MOVESEQ_End = 3, MOVESEQ_Cancel = 4 } |
| enum | MOVETYPE { MOVETYPE_None = 0, MOVETYPE_Shift = 1, MOVETYPE_Resize = 2, MOVETYPE_Rotate = 3, MOVETYPE_Shear = 4, MOVETYPE_Edit = 5, MOVETYPE_Create = 6, MOVETYPE_Clear = 7 } |
| enum | PENCOLOR { PENCOLOR_Primary, PENCOLOR_Inactive, PENCOLOR_Highlight, PENCOLOR_COUNT } |
Public Member Functions | |
| void | Activate () |
| void | ClearPosition () |
| virtual MGUI::CTRL * | CreateControlForm (MGUI::LAYOUT_PANE_BASE &ParentPane, CTRLOPT ctrlopt) |
| virtual MGUI::CTRL * | CreateManualForm (MGUI::LAYOUT_PANE_BASE &ParentPane, CTRLOPT ctrlopt) |
| void | Deactivate () |
| virtual int | GenerateRegion (REGION2D ®ion) const |
| const DPOINT2D & | GetArrowKeyDeltas () const |
| CTRLOPT | GetControlOptions () const |
| const TRANS2D_AFFINE & | GetTransToWindow () const |
| GRTOOLVIEW * | GetView () const |
| const DRECT2D & | GetViewExtents () const |
| bool | HasControls () const |
| bool | HasManualControls () const |
| bool | HasPosition () const |
| bool | IsActive () const |
| bool | IsResizable () const |
| bool | IsRotatable () const |
| bool | IsSuspended () const |
| void | Move (double dx, double dy, ADJUSTFLAGS flags) |
| void | Resize (double dx, double dy, ADJUSTFLAGS flags) |
| void | Resume () |
| void | SetArrowKeyDeltas (double dx, double dy) |
| void | SetCanStartNew (bool canstartnew) |
| void | SetControlOptions (CTRLOPT ctrlopt) |
| void | SetResizable (bool resizable) |
| void | SetRotatable (bool rotatable) |
| void | SetTransToWindow (const TRANS2D_AFFINE &trans) |
| const SNAPGRIDPARMS & | SnapGridGet () const |
| bool | SnapGridIsActive () const |
| void | SnapGridSet (SNAPGRIDPARMS &parms) |
| void | SnapGridSetActive (bool active) |
| void | Suspend () |
| virtual | ~GRTOOL ()=0 |
Static Public Member Functions | |
| DWORD | GetPenColor (PENCOLOR pencolor) |
| void | SetPenColor (PENCOLOR pencolor, DWORD ColorRef) |
Protected Types | |
| enum | CONTROLNEED { CONTROLNEED_None, CONTROLNEED_Optional, CONTROLNEED_Required } |
| enum | PENSTYLE { PENSTYLE_Solid, PENSTYLE_Dash, PENSTYLE_COUNT } |
Protected Member Functions | |
| virtual void | AdjustBegin (MOVETYPE movetype, bool redraw=true) |
| virtual void | AdjustEnd (bool releasecapture=true, bool cancel=false) |
| void | ApplyMoveDeltas (DPOINT2D &point, double dx, double dy, ADJUSTFLAGS flags) const |
| void | ApplySnap (DPOINT2D &point) const |
| bool | CanStartNew () const |
| int | CheckBounds (const DRECT2D &, DRECT2D *) const |
| virtual void | DoDraw (CDC *)=0 |
| virtual void | DoMove (double, double, ADJUSTFLAGS) |
| virtual void | DoResize (double, double, ADJUSTFLAGS) |
| void | DrawMarker (CDC *pDC, const POINT ¢erpoint, const POINT &dirpoint, MARKER marker, UINT16 size) const |
| bool | GetArrowDeltas (int, double *, double *) |
| CDC * | GetDC () |
| MOVETYPE | GetMoveType () const |
| GRTOOL (GRTOOLVIEW *view, CONTROLNEED ControlNeed, bool HasManualControls) | |
| bool | IsMouseCaptured () const |
| virtual void | OnActivate () |
| virtual void | OnCancel () |
| virtual void | OnCaptureChanged (CWnd *pWnd) |
| virtual void | OnClear () |
| virtual void | OnDeactivate () |
| virtual bool | OnKey (UINT nChar, UINT nRepCnt, UINT nFlags) |
| virtual void | OnLButtonDown (UINT nFlags, const CPoint &mpoint)=0 |
| virtual void | OnLButtonUp (UINT nFlags, const CPoint &mpoint) |
| virtual void | OnMouseMove (UINT nFlags, const CPoint &mpoint)=0 |
| virtual void | OnMove (MOVESEQ moveseq, MOVETYPE movetype) |
| virtual void | OnRButtonDown (UINT nFlags, const CPoint &mpoint) |
| virtual void | OnRButtonUp (UINT nFlags, const CPoint &mpoint) |
| virtual void | OnResume () |
| virtual void | OnSetTransToWindow () |
| virtual void | OnSize () |
| void | ReleaseDC (CDC *pDC) |
| void | RestoreBackground (const LRECT2D &rect, bool AddLineWidth=true) const |
| void | RestoreBackground () const |
| void | SetHasPosition (bool HasPosition=true) |
| POINT | TransToolToWindow (const DPOINT3D &point) const |
| POINT | TransToolToWindow (const DPOINT2D &point) const |
| DPOINT2D | TransWindowToTool (const POINT &point) const |
Static Protected Member Functions | |
| CPen * | GetPen (PENCOLOR PenColor=PENCOLOR_Primary, PENSTYLE PenStyle=PENSTYLE_Solid) |
Definition at line 89 of file grtool.h.
|
|
Adjustment flags for Move() and Resize() methods.
|
|
|
|
|
|
|
|
|
Marker types, not all types are supported by all tools.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Destructor.
|
|
||||||||||||||||
|
Constructor.
|
|
|
Activate the tool. If another tool is currently active in the view it will be automatically deactivated. |
|
||||||||||||
|
Utility methods for use by tool implementation.
|
|
||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
Snap point to current snap grid, if no snapping enabled point unchanged.
|
|
|
|
|
||||||||||||
|
Check rectangle against tool limits.
|
|
|
Clear current tool position, erasing all graphics.
|
|
||||||||||||
|
Create "form" with tool-specific controls.
Reimplemented in MicroImages::GRTOOL_MULTIPOINT, and MicroImages::GRTOOL_POLYLINE. |
|
||||||||||||
|
Create "form" with tool-specific manual-entry controls.
|
|
|
Deactivate this tool.
|
|
|
||||||||||||||||
|
||||||||||||||||
|
|
|
||||||||||||||||||||||||
|
Draw a marker (MARKER...) in the position and size specified.
|
|
|
Generate region from tool.
Reimplemented in MicroImages::GRTOOL_CIRCLE, MicroImages::GRTOOL_ELLIPSE, MicroImages::GRTOOL_ARC, MicroImages::GRTOOL_RECTANGLE, MicroImages::GRTOOL_REGPOLYGON, and MicroImages::GRTOOL_POLYLINE. |
|
||||||||||||||||
|
|
|
|
Get movement values associated with arrow keys.
|
|
|
Get current control options settings.
|
|
|
|
|
|
|
|
||||||||||||
|
Get pen for drawing tool.
|
|
|
Get global tool pen color reference.
|
|
|
Get transformation between "tool" and "window" coordinates.
|
|
|
Get "view" associated with tool.
|
|
|
Get extents of view.
|
|
|
Determine if tool controls available.
|
|
|
Determine if has manual data entry controls.
|
|
|
Check if tool has a valid position set.
|
|
|
Check if tool is currently "active".
|
|
|
|
|
|
Determine if tool is "resizable".
|
|
|
Determine if tool is "rotatable".
|
|
|
Check if tool is "suspended".
|
|
||||||||||||||||
|
Move the tool by the specified amount.
|
|
|
Called when tool is "activated". Derived class must call superclass method BEFORE performing own processing. Reimplemented in MicroImages::GRTOOL_LIMITED. |
|
|
Called when user performs "Cancel" action with tool. Derived class must call superclass method BEFORE performing own processing. |
|
|
|
|
|
Called when tool is "cleared" by user action, usually on control dialog. Derived class must call superclass method BEFORE performing own processing. Reimplemented in MicroImages::GRTOOL_MULTIPOINT, and MicroImages::GRTOOL_POLYLINE. |
|
|
Called when tool is deactivated. Derived class must call superclass method BEFORE performing own processing. |
|
||||||||||||||||
|
Called when key pressed/released.
Reimplemented in MicroImages::GRTOOL_MULTIPOINT, MicroImages::GRTOOL_REGPOLYGON, and MicroImages::GRTOOL_POLYLINE. |
|
||||||||||||
|
||||||||||||
|
Reimplemented in MicroImages::GRTOOL_MULTIPOINT, and MicroImages::GRTOOL_POLYLINE. |
|
||||||||||||
|
||||||||||||
|
Called when user alters tool position, shape, size, etc. Derived class must call superclass method BEFORE performing own processing.
|
|
||||||||||||
|
Called when right mouse button pressed. Usually overridden to show a popup menu. Default implementation does nothing. |
|
||||||||||||
|
Called when right mouse button released. Usually overridden to perform an 'apply' action. Default implementation does nothing. |
|
|
Called when tool is "resumed" after being suspended. Derived class must call superclass method BEFORE performing own processing. |
|
|
Called when tool to window transformation is set. Derived class must call superclass method BEFORE performing own processing. Reimplemented in MicroImages::GRTOOL_LIMITED. |
|
|
Reimplemented in MicroImages::GRTOOL_LIMITED. |
|
|
|
|
||||||||||||||||
|
Resize the tool.
|
|
||||||||||||
|
Restore background for specified rectangle.
|
|
|
Restore background for entire tool view window.
|
|
|
Resume the tool after performing drawing operation on the view.
|
|
||||||||||||
|
Set movement amounts associated with arrow keys.
|
|
|
Set whether user can start drawing a "new" tool.
|
|
|
Set controls to appear on dialog when shown. If used, this must be called before tool is first activated.
|
|
|
|
|
||||||||||||
|
Set global tool pen color.
|
|
|
Set whether tool is resizable.
|
|
|
Set whether tool is rotatable.
|
|
|
Set transformation between "tool" and "window" coordinates.
|
|
|
Get snap grid settings.
|
|
|
Determine if snap grid is currently in use.
|
|
|
Set snap grid parameters.
|
|
|
Set whether to use snap grid or not.
|
|
|
Suspend tool prior to performing a drawing operation on the view.
|
|
|
Transform DPOINT3D from "tool" to "window" coordinates.
|
|
|
Transform DPOINT2D from "tool" to "window" coordinates.
|
|
|
Transform point in "window" to "tool" coordinates.
|
1.3.8-20040913