Mxt Graphic Tool Functions

:Associate with "Mxt Graphic Tool Functions" More...

Functions

int MxtAddCallback (MXTHANDLE vmxt, McbCallbackFunc func, void *udata, UINT32 reason)
void MxtCallActivateCallback (MXTHANDLE mxt)
int MxtCallbackAddExt (MXTHANDLE vmxt, McbCallbackFunc func, void *udata, UINT32 reason, INT8 priority)
void MxtCallChangeCallback (MXTHANDLE mxt, UINT32 reason)
void MxtClearPosition (MXTHANDLE mxt)
MXTHANDLE MxtCreate (Widget pwidget, MXTHANDLE(*CreateFunc)(UINT32, void *), UINT32 flags)
MXTHANDLE MxtCreateCrossHair (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEArc (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEBox (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEBreakLine (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateECircle (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEEllipse (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateELine (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEMBox (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEMultiPoint (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEMultiPolyLine (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateENode (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEPoint (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateEPolyLine (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateERegion (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateERegPoly (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateETextLabel (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateFollowPoint (Widget dawidget, UINT32 flags=0)
MXTHANDLE MxtCreateSelectPoint (Widget dawidget, UINT32 flags=0)
MXTHANDLE mxtCrossHair (UINT32 flags, void *pwidget)
void MxtDestroy (MXTHANDLE mxt)
void MxtDrawGraphic (MXTHANDLE vmxt, const LRECT2D *rect)
MXTHANDLE mxtEArc (UINT32 flags, void *pwidget)
MXTHANDLE mxtEBox (UINT32 flags, void *pwidget)
MXTHANDLE mxtEBreakLine (UINT32 flags, void *pwidget)
MXTHANDLE mxtECircle (UINT32 flags, void *pwidget)
int MxtEditGlobalOptions (Widget pwidget)
MXTHANDLE mxtEEllipse (UINT32 flags, void *pwidget)
MXTHANDLE mxtELine (UINT32 flags, void *pwidget)
MXTHANDLE mxtEMBox (UINT32 flags, void *pwidget)
MXTHANDLE mxtEMultiPoint (UINT32 flags, void *pwidget)
MXTHANDLE mxtEMultiPolyLine (UINT32 flags, void *pwidget)
void MxtEnableGps (Widget pwidget, int enabled)
MXTHANDLE mxtENode (UINT32 flags, void *pwidget)
MXTHANDLE mxtEPoint (UINT32 flags, void *pwidget)
MXTHANDLE mxtEPolyLine (UINT32 flags, void *pwidget)
MXTHANDLE mxtERegion (UINT32 flags, void *pwidget)
MXTHANDLE mxtERegPoly (UINT32 flags, void *pwidget)
MXTHANDLE mxtETextLabel (UINT32 flags, void *pwidget)
MXTHANDLE mxtFollowPoint (UINT32 flags, void *pwidget)
void MxtFreeValues (MXTHANDLE mxt, void *toolvalues)
Widget MxtGenerateManualForm (MXTHANDLE vmxt, Widget parent)
int MxtGenerateRegion (MXTHANDLE vmxt, REGION2D &region, UINT32 flags)
Widget MxtGenerateSpatialForm (MXTHANDLE vmxt, Widget parent)
Widget MxtGenerateToolForm (MXTHANDLE vmxt, Widget parent)
void MxtGetArrowKeyDeltas (MXTHANDLE mxt, double *delta_x, double *delta_y)
int MxtGetBounds (MXTHANDLE mxt, DRECT2D *rect)
MXTHANDLE MxtGetCurrentTool (MXTHANDLE mxt)
UINT32 MxtGetFlags (MXTHANDLE mxt)
void MxtGetGlobalColor (int *UseTool, COLOR *color, COLOR *seccolor, int *LineWidth)
int MxtGetManualMode (MXTHANDLE mxt)
void MxtGetManualParms (MXTHANDLE mxt, MANUALTOOLPARMS *mtparms)
UINT32 MxtGetReasonClass (UINT32 reason)
void MxtGetSnapGrid (MXTHANDLE mxt, SNAPGRIDPARMS *snapgrid)
int MxtGetSnapGridMode (MXTHANDLE mxt)
GC MxtGetToolGC (MXTHANDLE mxt)
int MxtGetToolSize (MXTHANDLE mxt)
void * MxtGetUserData (MXTHANDLE mxt)
int MxtGetValues (MXTHANDLE mxt, void *toolvalues)
int MxtGetXYDigitizerMode (MXTHANDLE mxt)
int MxtHasPosition (MXTHANDLE mxt)
int MxtInBgUpdateCall (MXTHANDLE mxt)
int MxtIsManaged (MXTHANDLE mxt)
int MxtIsSuspended (MXTHANDLE mxt)
int MxtIsTrackingGps (MXTHANDLE mxt)
void MxtManage (MXTHANDLE mxt)
int MxtManualViewCoordRefSysSet (MXTHANDLE vmxt, const SPATREF::COORDREFSYS &ViewCoordRefSys, bool ForceProj)
void MxtMove (MXTHANDLE mxt, double dx, double dy, XAnyEvent *event, UINT32 flags)
void MxtRaiseWindow (MXTHANDLE vmxt)
void MxtRemoveCallback (MXTHANDLE vmxt, McbCallbackFunc func, void *udata, UINT32 reason)
void MxtResize (MXTHANDLE mxt, double dx, double dy, XAnyEvent *event, UINT32 flags)
void MxtResume (MXTHANDLE mxt)
void MxtRotate (MXTHANDLE mxt, double drot, XAnyEvent *event, UINT32 flags)
void MxtSaveGlobalColor (char *group)
MXTHANDLE mxtSelectPoint (UINT32 flags, void *pwidget)
void MxtSetActivateCallback (MXTHANDLE mxt, void(*CBFunc)(MxtAnyCallbackStruct *, void *), void *udata)
void MxtSetArrowKeyDeltas (MXTHANDLE mxt, double delta_x, double delta_y)
void MxtSetBgUpdateFunc (Widget pwidget, void(*UpdBg)(Widget, DRECT2D *, void *), void *udata)
void MxtSetBounds (MXTHANDLE mxt, DRECT2D *rect, UINT32 flags)
void MxtSetChangeCallback (MXTHANDLE mxt, void(*CBFunc)(MxtAnyCallbackStruct *, void *), void *udata)
int MxtSetDialogPosition (MXTHANDLE vmxt, int NewPosn)
void MxtSetFlags (MXTHANDLE mxt, UINT32 flags)
void MxtSetGlobalColor (Widget parent, int UseTool, const COLOR &color, const COLOR &seccolor, int LineWidth)
void MxtSetGpsSource (MXTHANDLE vmxt, void *vNewSource)
void MxtSetHelpString (MXTHANDLE mxt, char *helpstr)
void MxtSetManualMode (MXTHANDLE mxt, int setflag)
int MxtSetManualParms (MXTHANDLE mxt, MANUALTOOLPARMS *mtparms)
int MxtSetOutputTrans (MXTHANDLE vmxt, TRANSPARM *tparm)
int MxtSetSnapGrid (MXTHANDLE mxt, SNAPGRIDPARMS *snapgrid)
void MxtSetSnapGridMode (MXTHANDLE mxt, int setflag)
void MxtSetToolColor (MXTHANDLE vmxt, COLOR *color, COLOR *seccolor, int LineWidth)
void MxtSetTrans2D (MXTHANDLE mxt, const MAT3X3 OtoD, const MAT3X3 DtoO)
void MxtSetUserData (MXTHANDLE mxt, void *udata)
int MxtSetValues (MXTHANDLE mxt, void *toolvalues, int notify)
void MxtSetWindowButtonRow (MXTHANDLE mxt, BUTTONITEM *buttonrow, void *udata)
void MxtSetWindowFormCallback (MXTHANDLE mxt, int(*AddToForm)(Widget, void *), void *udata)
void MxtSetWindowSaveButton (MXTHANDLE mxt, char *savebutton)
void MxtSetWindowTitle (MXTHANDLE mxt, TEXTID textid)
void MxtSetXORPixel (MXTHANDLE mxt, Pixel pixel)
void MxtSetXYDigitizerMode (MXTHANDLE mxt, int setflag)
void MxtSetXYDtoObjectTrans (MXTHANDLE mxt, TRANSFUNC tfunc, void *udata)
void MxtShear (MXTHANDLE mxt, double dshear, XAnyEvent *event, UINT32 flags)
void MxtSuspend (MXTHANDLE mxt)
void MxtTrackGps (MXTHANDLE vmxt, int track)
void MxtUnmanage (MXTHANDLE mxt)

Detailed Description

:Associate with "Mxt Graphic Tool Functions"


Function Documentation

int MxtAddCallback MXTHANDLE  vmxt,
McbCallbackFunc  func,
void *  udata,
UINT32  reason
 

Add callback to tool.

Valid reasons: The reasons are in reason classes

  • MxtCR_IsBegin
  • MxtCR_IsContinue
  • MxtCR_IsEnd
  • MxtCR_IsOther
  • MxtCR_IsActivate
  • MxtCR_IsDestroy
  • MxtCR_IsOther reasons:
    • MxtCR_NoReason
    • MxtCR_SetValues
    • MxtCR_NewLimits
    • MxtCR_SelectPosition SelectPoint tool sends this on a left button click
    • MxtCR_Manage
    • MxtCR_Unmanage
    • MxtCR_ClearPosition
    • MxtCR_Cancel User pressed 'Cancel' button
    • MxtCR_SnapCoord Passed MxtSnapCoordCallback, see below
  • MxtCR_IsActivate reasons:
    • MxtCR_Activate
  • MxtCR_IsDestroy reasons:
    • MxtCR_Destroy
  • MxtCR_IsBegin reasons:
    • MxtCR_CreateBegin
    • MxtCR_MoveBegin
    • MxtCR_ResizeBegin
    • MxtCR_RotateBegin
    • MxtCR_ShearBegin
    • MxtCR_EditBegin
  • MxtCR_IsContinue reasons:
    • MxtCR_MoveContinue
    • MxtCR_ResizeContinue
    • MxtCR_RotateContinue
    • MxtCR_ShearContinue
    • MxtCR_EditContinue
    • MxtCR_CreateContinue
  • MxtCR_IsEnd reasons:
    • MxtCR_MoveEnd
    • MxtCR_ResizeEnd
    • MxtCR_RotateEnd
    • MxtCR_ShearEnd
    • MxtCR_EditEnd
    • MxtCR_CreateEnd
Parameters:
vmxt  Add callback to tool
func  Callback function
udata  User data passed to func
reason  Reason set flags to get callbacks on

void MxtCallActivateCallback MXTHANDLE  mxt  ) 
 

Call "activate" callback for specified tool.

Parameters:
mxt  Tool handle

int MxtCallbackAddExt MXTHANDLE  vmxt,
McbCallbackFunc  func,
void *  udata,
UINT32  reason,
INT8  priority
 

Add callback to tool with position determined by priority.

Parameters:
vmxt  Add callback to tool
func  Callback function
udata  User data passed to func
reason  Reason set flags to get callbacks on

void MxtCallChangeCallback MXTHANDLE  mxt,
UINT32  reason
 

Call "change" callback for specified tool.

Parameters:
mxt  Tool handle
reason  Callback reason

void MxtClearPosition MXTHANDLE  mxt  ) 
 

Clear tool position (erasing tool).

This function undraws the tool then clears the tool information. Useful in activate callbacks to simulate adding elements.

Parameters:
mxt  Handle returned by MxtCreate()

MXTHANDLE MxtCreate Widget  pwidget,
MXTHANDLE(*  CreateFunc)(UINT32, void *),
UINT32  flags
 

Create new tool instance.

This function creates a tool handle by calling the appropriate tool create function. It also sets up the default tool position which will be a clear tool (no info). Neither the tool create function nor this function will create the dialog. Any setup of the tool dialog must be done before MxtManage() is called because MxtManage() sets up the dialog. NOTE: Call MxtSetValues() to setup default tool information. List of flags to pass in this function (see MxtSetFlags()).

  • MxtFLAG_EnableManual
  • MxtFLAG_EnableDialog
  • MxtFLAG_EnableXYDig
  • MxtFLAG_EnableSnapGrid Any tool specific flags dealing with dialog management. Eg:
  • MxEPOLYLINE_NoEditZValue
  • MxEPOLYLINE_NoClosePolyB
Parameters:
pwidget  Drawing Area widget
flags  Function to create specific tool MxtFLAG... flags

MXTHANDLE MxtCreateCrossHair Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create crosshair tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags for structure initialization
  • MxCROSSHAIR_BarLength Bar lengths (hlen, vlen) set (not used yet)
  • MxCROSSHAIR_NoBar0 Do not draw 0 degree bar
  • MxCROSSHAIR_NoBar90 Do not draw 90 degree bar
  • MxCROSSHAIR_NoBar180 Do not draw 180 degree bar
  • MxCROSSHAIR_NoBar270 Do not draw 270 degree bar Flags to control behavior
  • MxtFLAG_NoRotate Don't allow rotation
  • MxtFLAG_CanMoveOff Allow tool (center) to move off allowed area
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1592 of file mxtools.h.

MXTHANDLE MxtCreateEArc Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic arc tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags for structure initialization:
  • MxEARC_Rmin Minimum radius set
  • MxEARC_Rmax Maximum radius set
Flags to control behavior:
  • MxtFLAG_NoResize Don't allow arc to be resized
  • MxtFLAG_NoCreate Don't allow new arc to be created
  • MxtFLAG_CanMoveOff Can move arc outside specified position ranges
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1611 of file mxtools.h.

MXTHANDLE MxtCreateEBox Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic box tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags for structure initialization:
  • MxEBOX_Range Range fields (xinit, yinit, xlast, ylast) set
  • MxEBOX_AllCorners All corner locations set
  • MxEBOX_Corner0 Corner 0, size and angle set
  • MxEBOX_Corner1 Corner 1, size and angle set
  • MxEBOX_Corner2 Corner 2, size and angle set
  • MxEBOX_Corner3 Corner 3, size and angle set
  • MxEBOX_Wmin Minimum width set
  • MxEBOX_Hmin Minimum height set
  • MxEBOX_Wmax Maximum width set
  • MxEBOX_Hmax Maximum height set
Flags to control behavior:
  • MxtFLAG_NoResize Don't allow box to be resized
  • MxtFLAG_NoCreate Don't allow new box to be created
  • MxtFLAG_CanMoveOff Can move box outside specified position ranges
  • MxtFLAG_CanRotate Don't allow box to be rotated
  • MxEBOX_Proport Make box proportional
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1640 of file mxtools.h.

MXTHANDLE MxtCreateEBreakLine Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create line breaking tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1650 of file mxtools.h.

MXTHANDLE MxtCreateECircle Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic circle tool instance.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags for structure initialization:
  • MxECIRCLE_Rmin Minimum radius set
  • MxECIRCLE_Rmax Maximum radius set
Flags to control behavior:
  • MxtFLAG_NoResize Don't allow circle to be resized
  • MxtFLAG_NoCreate Don't allow new circle to be created
  • MxtFLAG_CanMoveOff Can move circle outside specified position ranges
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1669 of file mxtools.h.

MXTHANDLE MxtCreateEEllipse Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic ellipse tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags for structure initialization:
  • MxEELLIPSE_Rmin Minimum radius set
  • MxEELLIPSE_Rmax Maximum radius set
Flags to control behavior
  • MxtFLAG_NoResize Don't allow ellipse to be resized
  • MxtFLAG_NoCreate Don't allow new ellipse to be created
  • MxtFLAG_CanMoveOff Can move ellipse outside specified position ranges
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1688 of file mxtools.h.

MXTHANDLE MxtCreateELine Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic line tool instance.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags to control behavior
  • MxtFLAG_NoResize Don't allow line to be resized (length changed)
  • MxtFLAG_NoCreate Don't allow new line to be created
  • MxtFLAG_CanMoveOff Can move line outside specified position ranges
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1703 of file mxtools.h.

MXTHANDLE MxtCreateEMBox Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic "move box" tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags to control behavior
  • MxtFLAG_NoResize Don't allow line to be resized (length changed)
  • MxtFLAG_NoCreate Don't allow new line to be created
  • MxtFLAG_CanMoveOff Can move line outside specified position ranges
  • MxEMBOX_Proport
  • MxEMBOX_DontShowBasePt Do not draw insertion/base point chosshair
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1720 of file mxtools.h.

MXTHANDLE MxtCreateEMultiPoint Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic multi-point tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags to control behavior
  • MxEMULITPOINT_NoEditZValue Don't let user edit z value
  • MxEMULTIPOINT_SinglePointOnly Don't allow multi-point editing
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1734 of file mxtools.h.

MXTHANDLE MxtCreateEMultiPolyLine Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic multi-line/polygon tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags to control behavior:
  • MxEMULTILINE_EditPoly Edit polygon
  • MxEMULTILINE_EnableResetB Enable tool reset button
  • MxEMULTILINE_NoClearB Don't show clear button
  • MxEMULTILINE_NoClosePolyB Don't show close poly button
  • MxEMULTILINE_UseCurveFit Edit a curve fit
  • MxEMULTILINE_CanChgLinePolyMode User can toggle between polygon and line modes
  • MxEMULTILINE_NoEditZValue Don't let user edit z value
  • MxEMULTILINE_SingleLineOnly Don't allow multi-line editing
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1754 of file mxtools.h.

MXTHANDLE MxtCreateENode Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic "node" tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
NOTE: This function performs moving nodes in the vector editor.
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1766 of file mxtools.h.

MXTHANDLE MxtCreateEPoint Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create "point" tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1776 of file mxtools.h.

MXTHANDLE MxtCreateEPolyLine Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic "polyline/polygon" tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags to control behavior
  • MxtFLAG_NoResize Don't allow line to be resized (length changed)
  • MxtFLAG_NoCreate Don't allow new line to be created
  • MxtFLAG_CanMoveOff Can move line outside specified position ranges
  • MxEPOLYLINE_EditPoly Edit polygon
  • MxEPOLYLINE_UseSnapCoord Use the snap coord callback reason to allow snapping vertices
  • MxEPOLYLINE_EnableResetB Enable tool reset button
  • MxEPOLYLINE_NoClosePolyB Don't show close poly button
  • MxEPOLYLINE_UseCurveFit Edit a curve fit
  • MxEPOLYLINE_CanChgLinePolyMode User can toggle between polygon and line modes
  • MxEPOLYLINE_NoEditZValue Don't let user edit z value
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1798 of file mxtools.h.

MXTHANDLE MxtCreateERegion Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create "region" display tool.

Tool handle (mxthandle) used in other Mxt... functions.

Flags to control behavior:

  • MxEREGION_NoMove
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1811 of file mxtools.h.

MXTHANDLE MxtCreateERegPoly Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic "regular polygon" tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags to control behavior:
  • MxEREGPOLY_Rmin
  • MxEREGPOLY_Rmax
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1825 of file mxtools.h.

MXTHANDLE MxtCreateETextLabel Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create elastic "text label" tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Flags to control behavior
  • MxtFLAG_NoResize Don't allow line to be resized (length changed)
  • MxtFLAG_NoCreate Don't allow new line to be created
  • MxtFLAG_CanMoveOff Can move line outside specified position ranges
  • MxETEXTLABEL_NoLeaderLines Do not allow editing of leader lines
  • MxETEXTLABEL_NoAdvanced Do not allow advanced style button
  • MxETEXTLABEL_NoBaselineEdit Do not allow baseline to be edited
  • MxETEXTLABEL_NoStylePanel Do not allow the style panel to be created
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1844 of file mxtools.h.

MXTHANDLE MxtCreateFollowPoint Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create feature follow tool.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
NOTE: This function uses the MxtCR_SnapCoord callback reason and structure to operate. The reason must be supported.
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1857 of file mxtools.h.

MXTHANDLE MxtCreateSelectPoint Widget  dawidget,
UINT32  flags = 0
[inline]
 

Create point selection tool instance.

Returns:
Tool handle (mxthandle) used in other Mxt... functions.
Parameters:
dawidget  DrawingArea widget to contain tool
flags  MxtFLAG_...

Definition at line 1867 of file mxtools.h.

MXTHANDLE mxtCrossHair UINT32  flags,
void *  pwidget
 

Create an instance of a rotatable crosshair tool.

void MxtDestroy MXTHANDLE  mxt  ) 
 

Destroy previously created tool instance.

This function does basic cleanup of the tool. It will unmanage the tool if not done so already. It will also remove the tool tag string to keep the tool pointer from being used as a tool. It will free the pointer.

Parameters:
mxt  Tool handle

void MxtDrawGraphic MXTHANDLE  vmxt,
const LRECT2D rect
 

Draw tool graphic.

Parameters:
vmxt  Handle returned by MxtCreate()
rect  Area to draw into, NULL for the whole area

MXTHANDLE mxtEArc UINT32  flags,
void *  pwidget
 

Create an instance of an elastic arc tool.

3/4 Done, Need bound checking fixed.

MXTHANDLE mxtEBox UINT32  flags,
void *  pwidget
 

Create an instance of an elastic box tool.

MXTHANDLE mxtEBreakLine UINT32  flags,
void *  pwidget
 

Create an instance of an elastic breakline tool.

MXTHANDLE mxtECircle UINT32  flags,
void *  pwidget
 

Create an instance of an elastic circle tool.

3/4 Done, Need bound checking fixed.

int MxtEditGlobalOptions Widget  pwidget  ) 
 

Display dialog allowing user to edit global tool colors and width.

Returns:
0 if user changed values, EUserCancel if cancelled.
This will automatically update the process global tool settings and save to the Ini file. The application should refresh all active tools if possible using MxtSetToolColor() for each DrawingArea's current tool.
Parameters:
pwidget  Parent for dialog

MXTHANDLE mxtEEllipse UINT32  flags,
void *  pwidget
 

Create an instance of an elastic ellipse tool.

MXTHANDLE mxtELine UINT32  flags,
void *  pwidget
 

Create an instance of an elastic box tool.

MXTHANDLE mxtEMBox UINT32  flags,
void *  pwidget
 

Create an instance of an elastic box tool.

MXTHANDLE mxtEMultiPoint UINT32  flags,
void *  pwidget
 

Create an instance of an elastic point tool.

MXTHANDLE mxtEMultiPolyLine UINT32  flags,
void *  pwidget
 

Create multi elastic polyline tool.

void MxtEnableGps Widget  pwidget,
int  enabled
 

GPS input is enabled for this view.

Parameters:
pwidget  Drawing Area widget
enabled  TRUE if GPS is set for this drawing area

MXTHANDLE mxtENode UINT32  flags,
void *  pwidget
 

Create an instance of node edit tool.

MXTHANDLE mxtEPoint UINT32  flags,
void *  pwidget
 

Create an instance of an elastic point tool.

MXTHANDLE mxtEPolyLine UINT32  flags,
void *  pwidget
 

Create elastic polyline tool.

MXTHANDLE mxtERegion UINT32  flags,
void *  pwidget
 

Create elastic region tool.

MXTHANDLE mxtERegPoly UINT32  flags,
void *  pwidget
 

Create an instance of an elastic regpoly tool.

MXTHANDLE mxtETextLabel UINT32  flags,
void *  pwidget
 

Create an instance of an elastic text label tool.

MXTHANDLE mxtFollowPoint UINT32  flags,
void *  pwidget
 

Create an instance of point follow tool.

void MxtFreeValues MXTHANDLE  mxt,
void *  toolvalues
 

Free tool structure internal data storage (Eg.

EPOLYLINEINFO).

This function frees any allocated data associated with the tool structure. Eg. the point buffer for line data. It will not free the data associated with a change callback.

Parameters:
mxt  Handle returned by MxtCreate()
toolvalues  Pointer to tool structure

Widget MxtGenerateManualForm MXTHANDLE  vmxt,
Widget  parent
 

Generate manual form for tool if it exists.

Returns:
Form widget or NULL if non-existant.
NOTE: Must specify MxtFLAG_NoDialog to use this function.
Parameters:
vmxt  Handle returned by MxtCreate()
parent  Parent for main tool form, assumed to be a RowColumn

int MxtGenerateRegion MXTHANDLE  vmxt,
REGION2D region,
UINT32  flags
 

Generate a region form the tool if supported.

Returns:
1 if a region is generated, 0 if not, < 0 Error.
This function will call MregionInit(). If an error occurs, MregionFree() is called.
Parameters:
vmxt  Handle returned by MxtCreate()
region  The region to fill in
flags  May be used at some point

Widget MxtGenerateSpatialForm MXTHANDLE  vmxt,
Widget  parent
 

Generate spatial form for tool if it exists.

Returns:
Form widget or NULL if non-existant.
NOTE: Must specify MxtFLAG_NoDialog to use this function.
Parameters:
vmxt  Handle returned by MxtCreate()
parent  Parent for main tool form, assumed to be a RowColumn

Widget MxtGenerateToolForm MXTHANDLE  vmxt,
Widget  parent
 

Generate main tool form for tool if it exists.

Returns:
Form widget or NULL if non-existant.
NOTE: Must specify MxtFLAG_NoDialog to use this function.
Parameters:
vmxt  Handle returned by MxtCreate()
parent  Parent for main tool form, assumed to be a RowColumn

void MxtGetArrowKeyDeltas MXTHANDLE  mxt,
double *  delta_x,
double *  delta_y
 

Return current arrow key delta values.

This function gets the amount of movement for hitting arrow keys in object coordinates (i.e. deltas).

Parameters:
mxt  Handle returned by MxtCreate()
delta_x  Length to move in X direction (RETURNED)
delta_y  Length to move in Y direction (RETURNED)

int MxtGetBounds MXTHANDLE  mxt,
DRECT2D rect
 

Return current tool boundary rectangle.

Returns:
1 - Tool has boundaries, 0 - Tool can move off drawable.
This function returns the boundaries for the tool.
Parameters:
mxt  Handle returned by MxtCreate()
rect  Rect containing coordinates to bound, tool coords

MXTHANDLE MxtGetCurrentTool MXTHANDLE  mxt  ) 
 

Return currently active tool handle.

Returns:
Handle to the currently active tool or NULL if no tool is active.
Parameters:
mxt  Can either be a MXTHANDLE or the parent widget of the tool

UINT32 MxtGetFlags MXTHANDLE  mxt  ) 
 

Return current tool flags.

This function returns the current flags set in the tool. You should call this function to get the current flags, set or unset certain flags, then call MxtSetFlags() to set the flags.

void MxtGetGlobalColor int *  UseTool,
COLOR color,
COLOR seccolor,
int *  LineWidth
 

Return global colors set for tools in the application.

Parameters:
UseTool  Not used, can pass NULL
color  Primary tool color RETURNED
seccolor  Secondary tool color RETURNED
LineWidth  Tool line width RETURNED

int MxtGetManualMode MXTHANDLE  mxt  ) 
 

Return status of manual edit dialog (on/off).

Returns:
TRUE if the manual editor is in use, FALSE if not.
This function returns the status of the manual editor mode.
Parameters:
<
mxt  Handle returned by MxtCreate()