00001 /** 00002 * \file mxtools.h <mi32/mxtools.h> 00003 * \brief Definitions for MicroImages library tool functions 00004 * 00005 * \if NODOC 00006 * $Id: mxtools.h_v 1.104 2004/06/30 21:17:56 scowan Exp $ 00007 * 00008 * $Log: mxtools.h_v $ 00009 * Revision 1.104 2004/06/30 21:17:56 scowan 00010 * Changed view set function name. 00011 * 00012 * Revision 1.103 2004/06/30 17:19:03 scowan 00013 * Replaced map proj parm wit coord ref sys and removed unused entries. 00014 * 00015 * Revision 1.102 2004/06/29 21:20:00 scowan 00016 * Changed region tool to use region 2d. 00017 * 00018 * Revision 1.101 2004/06/28 23:48:18 scowan 00019 * Changed to use region 2d. 00020 * 00021 * Revision 1.100 2004/04/08 22:04:51 scowan 00022 * Removed e text legacy graphic tool. 00023 * 00024 * Revision 1.99 2004/04/08 21:46:14 scowan 00025 * Added defines for the text tool. 00026 * 00027 * Revision 1.98 2003/11/13 20:59:53 scowan 00028 * *** empty log message *** 00029 * 00030 * Revision 1.97 2003/09/15 13:49:56 fileserver!dwilliss 00031 * Doxygen 00032 * 00033 * Revision 1.96 2003/05/09 16:54:10 mju 00034 * Make SetTrans2D use const. 00035 * 00036 * Revision 1.95 2003/04/23 20:31:13 scowan 00037 * Added text flag. 00038 * 00039 * Revision 1.94 2003/03/03 21:04:03 scowan 00040 * More const. 00041 * 00042 * Revision 1.93 2002/12/11 15:29:44 dwilliss 00043 * Added a new MxtFLAG 00044 * 00045 * Revision 1.92 2002/09/09 14:45:22 mju 00046 * Remove deprecated fn. 00047 * 00048 * Revision 1.91 2002/03/28 16:01:36 scowan 00049 * Deprecate group,key title asetting function. 00050 * 00051 * Revision 1.90 2002/02/07 00:06:05 scowan 00052 * Changed leader line information. 00053 * 00054 * Revision 1.89 2002/01/17 18:53:34 scowan 00055 * Added text label tool info. 00056 * 00057 * Revision 1.88 2001/11/05 20:32:15 scowan 00058 * Nothing. 00059 * 00060 * Revision 1.87 2001/10/23 15:21:50 scowan 00061 * Added to polylie editor. 00062 * 00063 * Revision 1.86 2000/07/07 19:45:53 sparsons 00064 * Genitor documentation. 00065 * 00066 * Revision 1.85 2000/06/14 21:10:24 mju 00067 * Change MxtCreate... macros to inlines so will be documented by Genitor. 00068 * 00069 * \endif 00070 **/ 00071 00072 #ifndef INC_MI32_MXTOOLS_H 00073 #define INC_MI32_MXTOOLS_H 00074 00075 #ifndef INC_MI32_XDEFNS_H 00076 #include <mi32/xdefns.h> 00077 #endif 00078 00079 #ifndef INC_MI32_UNITCONV_H 00080 #include <mi32/unitconv.h> 00081 #endif 00082 00083 #ifndef INC_TRANSPARM_H 00084 #include <mi32/transgen.h> 00085 #endif 00086 00087 #ifndef INC_MI32_REGION2D_H 00088 #include <mi32/region2d.h> 00089 #endif 00090 00091 #ifndef INC_MI32_ELEMSTYL_H 00092 #include <mi32/elemstyl.h> 00093 #endif 00094 00095 #ifndef INC_MI32_MCB_H 00096 #include <mi32/mcb.h> 00097 #endif 00098 00099 #ifndef INC_MI32_POLYLINE_H 00100 #include <mi32/polyline.h> 00101 #endif 00102 00103 00104 #ifndef GENERATING_DOXYGEN_OUTPUT 00105 namespace SPATREF { 00106 class COORDREFSYS; 00107 } 00108 #endif // GENERATING_DOXYGEN_OUTPUT 00109 00110 typedef void *MXTHANDLE; 00111 00112 /* 00113 * Alter tool position flags 00114 * for MxtMove(), MxtResize(), MxtShear(), MxtRotate(). 00115 */ 00116 00117 #define MxtADJUST_Relative 0x0000 00118 #define MxtADJUST_Absolute 0x0001 00119 #define MxtADJUST_ToolCoords 0x0000 00120 #define MxtADJUST_ScreenCoords 0x0002 00121 #define MxtADJUST_Notify 0x8000 00122 00123 00124 /******** Change reason flags **********/ 00125 00126 #define MxtCR_ReasonMask 0xFF000000 00127 #define MxtCR_IsBegin 0x10000000 00128 #define MxtCR_IsContinue 0x20000000 00129 #define MxtCR_IsEnd 0x40000000 00130 #define MxtCR_IsOther 0x80000000 00131 #define MxtCR_IsActivate 0x01000000 00132 #define MxtCR_IsDestroy 0x02000000 00133 00134 #define MxtCR_NoReason (0|MxtCR_IsOther) /* "No reason, I just like doing things like that." */ 00135 #define MxtCR_Activate (1|MxtCR_IsOther|MxtCR_IsActivate) 00136 #define MxtCR_SetValues (2|MxtCR_IsOther) 00137 #define MxtCR_NewLimits (3|MxtCR_IsOther) 00138 #define MxtCR_SelectPosition (4|MxtCR_IsOther) 00139 #define MxtCR_Manage (5|MxtCR_IsOther) 00140 #define MxtCR_Unmanage (6|MxtCR_IsOther) 00141 #define MxtCR_ClearPosition (7|MxtCR_IsOther) 00142 #define MxtCR_Cancel (8|MxtCR_IsOther) /* User pressed 'Cancel' button */ 00143 #define MxtCR_SnapCoord (9|MxtCR_IsOther) 00144 #define MxtCR_Destroy (10|MxtCR_IsDestroy) 00145 #define MxtCR_ChangeCurrentElem (11|MxtCR_IsOther) 00146 00147 #define MxtCR_MoveBegin (30|MxtCR_IsBegin) 00148 #define MxtCR_MoveContinue (30|MxtCR_IsContinue) 00149 #define MxtCR_MoveEnd (30|MxtCR_IsEnd) 00150 #define MxtCR_ResizeBegin (31|MxtCR_IsBegin) 00151 #define MxtCR_ResizeContinue (31|MxtCR_IsContinue) 00152 #define MxtCR_ResizeEnd (31|MxtCR_IsEnd) 00153 #define MxtCR_RotateBegin (32|MxtCR_IsBegin) 00154 #define MxtCR_RotateContinue (32|MxtCR_IsContinue) 00155 #define MxtCR_RotateEnd (32|MxtCR_IsEnd) 00156 #define MxtCR_ShearBegin (33|MxtCR_IsBegin) 00157 #define MxtCR_ShearContinue (33|MxtCR_IsContinue) 00158 #define MxtCR_ShearEnd (33|MxtCR_IsEnd) 00159 #define MxtCR_EditBegin (34|MxtCR_IsBegin) 00160 #define MxtCR_EditContinue (34|MxtCR_IsContinue) 00161 #define MxtCR_EditEnd (34|MxtCR_IsEnd) 00162 #define MxtCR_CreateBegin (35|MxtCR_IsBegin) 00163 #define MxtCR_CreateContinue (35|MxtCR_IsContinue) 00164 #define MxtCR_CreateEnd (35|MxtCR_IsEnd) 00165 #define MxtCR_Trace (36|MxtCR_IsOther) 00166 00167 #define MxtCR_CreateTool MxtCR_CreateBegin //!< Compatibility to old stuff 00168 00169 struct SNAPGRIDPARMS { 00170 DPOINT3D BasePt; //!< Base point of snap grid 00171 double xsize; //!< X direction size 00172 double ysize; //!< Y direction size 00173 double zsize; //!< Z direction size 00174 double rotate; //!< Rotation angle (snap grid) 00175 Mat3x3 OtoS, StoO; //!< Translation to/from snap grid coordinates 00176 }; 00177 00178 struct MANUALTOOLPARMS { 00179 TRANSPARM ViewToTool; //!< View coordinates to tool coordinates, set output side 00180 UNITCONV units; //!< Original tool coordinate units 00181 double xscaletou; //!< Scale to units defined in UNITCONV 00182 double yscaletou; 00183 double zscaletou; 00184 unsigned scalevaluesset:1, //!< Scale values are set 00185 unitconvset:1, //!< Unit conversion fields are set 00186 mapparmset:1, //!< A valid map projection is in use for view 00187 unused:29; 00188 }; 00189 00190 00191 struct MxtAnyCallbackStruct { 00192 UINT32 reason; //!< Reason for callback, defined above 00193 MXTHANDLE mxt; //!< Tool handle, useful to get user data 00194 XAnyEvent *event; //!< X event that initiated the callback 00195 void *toolinfo; //!< Pointer to the internal tool data, RO 00196 unsigned IsGPS:1, 00197 IsXYDig:1, 00198 unused:30; 00199 }; 00200 00201 00202 struct MxtSnapCoordCallbackStruct { 00203 UINT32 reason; //!< Reason for callback, defined above 00204 MXTHANDLE mxt; //!< Tool handle, useful to get user data 00205 XAnyEvent *event; //!< X event that initiated the callback 00206 void *toolinfo; //!< Pointer to the internal tool data, RO 00207 unsigned IsGPS:1, 00208 IsXYDig:1, 00209 unused:30; 00210 double xcoord; 00211 double ycoord; 00212 double zcoord; 00213 }; 00214 00215 00216 /* Flags common to ALL tools, allocated MSB first */ 00217 00218 #define MxtFLAG_DialogManipMask 0xF8000200 //!< Mask for flags that manipulate dialog stuff 00219 #define MxtFLAG_EnableXYDig 0x10000000 //!< Places a X-Y Digitizer toggle button on the dialog 00220 #define MxtFLAG_EnableManual 0x20000000 //!< Allow user to edit tool manually, places manual button on dialog 00221 #define MxtFLAG_EnableDialog 0x40000000 //!< Allow tool to generate a dialog, not optional for some tools 00222 #define MxtFLAG_EnableSnapGrid 0x80000000 //!< Places a Snap Grid toggle button on the dialog 00223 00224 #define MxtFLAG_EnableGPS 0x08000000 //!< Enable GPS source to be used 00225 #define MxtFLAG_NoManualProj 0x04000000 //!< DO not allow manual projection / distance to be shown on manual dialog 00226 00227 #define MxtFLAG_NoResize 0x00100000 00228 #define MxtFLAG_NoCreate 0x00200000 00229 #define MxtFLAG_CanMoveOff 0x00400000 //!< Tool graphic can be moved off the screen 00230 #define MxtFLAG_NoRotate 0x00800000 00231 00232 #define MxtFLAG_NotifyMotion 0x00010000 //!< Send "ChangeCB" events while tool being moved 00233 #define MxtFLAG_NoResetDialog 0x00020000 //!< Do not reset dialog upon a activate callback 00234 #define MxtFLAG_NoExposeResize 0x00040000 //!< Ignore Expose/Resize callbacks 00235 #define MxtFLAG_NoSaveB 0x00080000 //!< Don't show save button 00236 00237 #define MxtFLAG_HalfStepDeltas 0x00001000 //!< Take "half steps" in screen coords and do special drawing 00238 #define MxtFLAG_ForceActivate 0x00002000 //!< Call "Activate" callback even if tool does not have a position set 00239 #define MxtFLAG_AllowCancelBtn 0x00004000 //!< Allow 'Cancel' button in dialog, caller must support MxtCR_Cancel callback 00240 #define MxtFLAG_NoDialog 0x00008000 //!< No dialog is to be made 00241 00242 #define MxtFLAG_ForceManual 0x00000800 //!< Force manual dialog on, no "Manual Entry" button 00243 #define MxtFLAG_NoMove 0x00000400 //!< Do not allow tool to move 00244 #define MxtFLAG_NoElemHeight 0x00000200 //!< Do not allow "Use Element Height" toggle on text style 00245 00246 /* Flags for MxtSetBounds() */ 00247 #define MxtBOUND_Xmin 0x01000000 00248 #define MxtBOUND_Ymin 0x02000000 00249 #define MxtBOUND_Xmax 0x04000000 00250 #define MxtBOUND_Ymax 0x08000000 00251 #define MxtBOUND_FullRect 0x0F000000 00252 00253 00254 /* 00255 * Marker types, used in various tools. Defaults should be set in mxtE...() functions 00256 */ 00257 00258 #define MxtMARKER_X 0 //!< Marker types 00259 #define MxtMARKER_Plus 1 00260 #define MxtMARKER_ArrowIn 2 00261 #define MxtMARKER_ArrowOut 3 00262 #define MxtMARKER_None 4 00263 #define MxtMARKER_Circle 5 00264 #define MxtMARKER_Flat 6 00265 #define MxtMARKER_Square 7 00266 00267 00268 /*----------------------------------------------------------------------------*/ 00269 /* Definitions for elastic line tool */ 00270 /*----------------------------------------------------------------------------*/ 00271 00272 struct ELINEINFO { 00273 DPOINT2D start, end; 00274 UINT16 smarker, emarker; //!< Marker types for start and end 00275 UINT16 smarksize, emarksize; //!< Size of markers 00276 }; 00277 00278 00279 /*----------------------------------------------------------------------------*/ 00280 /* Definitions for elastic box tool */ 00281 /*----------------------------------------------------------------------------*/ 00282 00283 struct EBOXINFO { 00284 double xinit, yinit, xlast, ylast; //!< Current box position or extents if rotated 00285 DPOINT2D corner[4]; //!< Box corners 00286 double wmin, hmin, wmax, hmax; //!< Size range 00287 double xsize, ysize; //!< Current box size 00288 double rotangle; //!< Rotation angle in radians, angle of vector from corner 0 to 1, CCW from right 00289 double xproport, yproport; //!< Ratio for proportional box 00290 }; 00291 00292 #define MxEBOX_Range 0x00000001 //!< Range fields (xinit, yinit, xlast, ylast) set 00293 #define MxEBOX_AllCorners 0x00000002 //!< All corner locations set (DEFAULT) 00294 #define MxEBOX_Proport 0x00000004 00295 00296 #define MxEBOX_Corner0 0x00000010 //!< Corner 0, size and angle set 00297 #define MxEBOX_Corner1 0x00000020 //!< Corner 1, size and angle set 00298 #define MxEBOX_Corner2 0x00000040 //!< Corner 2, size and angle set 00299 #define MxEBOX_Corner3 0x00000080 //!< Corner 3, size and angle set 00300 00301 #define MxEBOX_CanFlipHorz 0x00000100 //!< Allow user to flip box horizontally 00302 #define MxEBOX_CanFlipVert 0x00000200 //!< Allow user to flip box vertically 00303 #define MxEBOX_CanFlipBoth (MxEBOX_CanFlipHorz|MxEBOX_CanFlipVert) 00304 00305 /* Maximum allowed flag is 0x00000200 !!! */ 00306 00307 /*----------------------------------------------------------------------------*/ 00308 /* Definitions for elastic polyline tool */ 00309 /*----------------------------------------------------------------------------*/ 00310 00311 struct EPOLYLINEINFO { 00312 DPOLYGON poly; 00313 double zvalue; //!< Z value for VPOINT_3DXY points 00314 unsigned Is3D:1, //!< The point data is in (x,y,z) coordinates 00315 IsPoly:1, //!< Currently in "polygon" mode, assumed to be closed, draw dashed line 00316 LockStartPt:1, //!< Do not allow start point to be moved or added to 00317 LockEndPt:1, //!< Do not allow end point to be moved or added to 00318 KeepModIndex:1, //!< Maintain modification array 00319 EnableTraceBtn:1, //!< Enable trace button 00320 InTraceMode:1, //!< In trace mode 00321 unused:25; //!< Pad to 32 bits 00322 UINT32 CurveType; //!< Type of curve fit to use 00323 UINT16 smarker, emarker; //!< Marker types for start and end 00324 UINT16 smarksize, emarksize; //!< Size of markers 00325 UINT16 smarkcolor, emarkcolor; //!< Color of markers 0 for primary, 1 for secondary 00326 INT32 *ModIndex; //!< Modification array for line vertices 00327 }; 00328 00329 #define MxEPOLYLINE_EditPoly 0x00000001 //!< Edit polygon 00330 #define MxEPOLYLINE_UseSnapCoord 0x00000002 //!< Use the snap coord callback reason to allow snapping vertices 00331 #define MxEPOLYLINE_EnableProfile 0x00000004 //!< Enable profile option 00332 #define MxEPOLYLINE_EnableTrace 0x00000008 //!< Enable trace button 00333 00334 #define MxEPOLYLINE_EnableResetB 0x00000010 //!< Enable tool reset button 00335 #define MxEPOLYLINE_NoClearB 0x00000020 //!< Don't show clear button 00336 #define MxEPOLYLINE_NoClosePolyB 0x00000040 //!< Don't show close poly button 00337 #define MxEPOLYLINE_UseCurveFit 0x00000080 //!< Edit a curve fit 00338 00339 #define MxEPOLYLINE_CanChgLinePolyMode 0x00000100 //!< User can toggle between polygon and line modes 00340 #define MxEPOLYLINE_NoEditZValue 0x00000200 //!< Don't let user edit z value 00341 00342 /*----------------------------------------------------------------------------*/ 00343 /* Definitions for elastic multi-polyline tool */ 00344 /*----------------------------------------------------------------------------*/ 00345 00346 struct EMULTILINEINFO { 00347 DPOLYGON *Lines; //!< List of lines to edit 00348 UINT32 NumLines; //!< Number of lines in the tool 00349 INT32 ActiveLine; //!< The active line in the tool, -1 if current line has no position set 00350 double zvalue; //!< Z value for VPOINT_3DXY points 00351 unsigned Is3D:1, //!< The point data is in (x,y,z) coordinates 00352 IsPoly:1, //!< Currently in "polygon" mode, assumed to be closed, draw dashed line 00353 LockStartPt:1, //!< Do not allow start point to be moved or added to 00354 LockEndPt:1, //!< Do not allow end point to be moved or added to 00355 SingleLine:1, //!< This is single-line data 00356 unused:27; //!< Pad to 32 bits 00357 UINT32 CurveType; //!< Type of curve fit to use 00358 UINT16 smarker, emarker; //!< Marker types for start and end 00359 UINT16 smarksize, emarksize; //!< Size of markers 00360 UINT16 smarkcolor, emarkcolor; //!< Color of markers 0 for primary, 1 for secondary 00361 }; 00362 00363 #define MxEMULTILINE_EditPoly 0x00000001 //!< Edit polygon 00364 #define MxEMULTILINE_LineIs3D 0x00000002 //!< Tool thinks line is 3D, until Is3D variable is changed 00365 #define MxEMULTILINE_EnableResetB 0x00000004 //!< Enable tool reset button 00366 #define MxEMULTILINE_NoClearB 0x00000008 //!< Don't show clear button 00367 00368 #define MxEMULTILINE_NoClosePolyB 0x00000010 //!< Don't show close poly button 00369 #define MxEMULTILINE_UseCurveFit 0x00000020 //!< Edit a curve fit 00370 #define MxEMULTILINE_CanChgLinePolyMode 0x00000040 //!< User can toggle between polygon and line modes 00371 #define MxEMULTILINE_NoEditZValue 0x00000080 //!< Don't let user edit z value 00372 00373 #define MxEMULTILINE_SingleLineOnly 0x00000100 //!< Don't allow multi-line editing 00374 00375 /*----------------------------------------------------------------------------*/ 00376 /* Definitions for elastic point tool */ 00377 /*----------------------------------------------------------------------------*/ 00378 00379 struct EPOINTINFO { 00380 DPOINT3D pt; 00381 UINT16 marker; //!< Marker to use for center 00382 UINT16 markersize; //!< Size of marker in pixels 00383 }; 00384 00385 #define MxEPOINT_NoEditZValue 0x00000001 //!< Don't let user edit z value 00386 00387 00388 /*----------------------------------------------------------------------------*/ 00389 /* Definitions for elastic point tool */ 00390 /*----------------------------------------------------------------------------*/ 00391 00392 struct EMULTIPOINTINFO { 00393 DPOINT3D *pt; 00394 INT32 NumPoints; 00395 INT32 ActivePoint; //!< The active point in the tool, -1 if current line has no position set 00396 UINT16 marker; //!< Marker to use for center 00397 UINT16 markersize; //!< Size of marker in pixels 00398 }; 00399 00400 #define MxEMULTIPOINT_NoEditZValue 0x00000001 //!< Don't let user edit z value 00401 #define MxEMULTIPOINT_SinglePointOnly 0x00000002 //!< Don't allow multi-point editing 00402 00403 /*----------------------------------------------------------------------------*/ 00404 /* Definitions for line breaking tool */ 00405 /*----------------------------------------------------------------------------*/ 00406 00407 struct BRKSEGMENT { 00408 DPOINT2D pt; //!< Start point to break at 00409 int DelSeg; //!< Flag, delete this segment 00410 BRKSEGMENT *next; //!< Pointer to next sorted segment in the list 00411 INT32 segnum; //!< Number of the segment that this entry belongs to 00412 }; 00413 00414 00415 struct ELINEBRKINFO { 00416 DPOLYGON line; 00417 BRKSEGMENT *seg; 00418 UINT16 marker; //!< Marker to use for breaks 00419 UINT16 markersize; //!< Size of marker in pixels 00420 }; 00421 00422 00423 /*----------------------------------------------------------------------------*/ 00424 /* Definitions for elastic circle tool */ 00425 /*----------------------------------------------------------------------------*/ 00426 00427 struct ECIRCLEINFO { 00428 DPOINT2D center; //!< Circle center 00429 double radius; //!< Circle radius 00430 double rmin, rmax; //!< Radius range 00431 UINT16 cmarker; //!< Marker to use for center 00432 UINT16 cmarkersize; //!< Size of marker in pixels 00433 double rotangle; //!< Circle bar rotation angle in radians 00434 }; 00435 00436 #define MxECIRCLE_Rmin 0x00000001 //!< Flag bits 00437 #define MxECIRCLE_Rmax 0x00000002 00438 #define MxECIRCLE_RotationBar 0x00000004 //!< Circle has rotation bar 00439 00440 00441 /*----------------------------------------------------------------------------*/ 00442 /* Definitions for elastic regular polygon tool */ 00443 /*----------------------------------------------------------------------------*/ 00444 00445 struct EREGPOLYINFO { 00446 DPOINT2D center; //!< Circle center 00447 double radius; //!< Circle radius 00448 double rmin, rmax; //!< Radius range 00449 double rotangle; //!< Rotation angle in radians, angle of vector from center point, CCW from right 00450 UINT32 NumSegments; //!< Number of segments in polygon 00451 UINT16 cmarker; //!< Marker to use for center 00452 UINT16 cmarkersize; //!< Size of marker in pixels 00453 }; 00454 00455 #define MxEREGPOLY_Rmin 0x00000001 //!< Flag bits 00456 #define MxEREGPOLY_Rmax 0x00000002 00457 00458 00459 /*----------------------------------------------------------------------------*/ 00460 /* Definitions for elastic arc tools */ 00461 /*----------------------------------------------------------------------------*/ 00462 00463 struct EARCINFO { 00464 DPOINT2D center; //!< Arc center 00465 double radius; //!< Arc radius 00466 int startang; //!< Start angle in 1/64 degree 00467 int sweepang; //!< Sweep angle in 1/64 degree 00468 double rmin, rmax; //!< Radius range 00469 UINT16 cmarker; //!< Marker to use for center 00470 UINT16 cmarkersize; //!< Size of marker in pixels 00471 unsigned IsChord:1, //!< The tool is drawing a chord 00472 IsWedge:1, //!< The tool is drawing a wedge 00473 unused:30; //!< Pad to 32 bits 00474 }; 00475 00476 #define MxEARC_Rmin 0x00000001 //!< Flags for what is initially set in EARCINFO structure 00477 #define MxEARC_Rmax 0x00000002 00478 #define MxEARC_EditWedge 0x00000004 00479 #define MxEARC_EditChord 0x00000008 00480 00481 00482 /*----------------------------------------------------------------------------*/ 00483 /* Definitions for crosshair tool */ 00484 /*----------------------------------------------------------------------------*/ 00485 00486 struct CROSSHAIRINFO { 00487 DPOINT2D center; //!< Center of crosshair 00488 double angle; //!< Angle of crosshair in radians 00489 double hlen, vlen; //!< Length of "horizontal" and "vertical" bars 00490 DPOINT2D endpt0, endpt180; //!< End points of "horizontal" line 00491 DPOINT2D endpt90, endpt270; //!< End points of "vertical" line 00492 }; 00493 00494 #define MxCROSSHAIR_NoBar0 0x00000001 //!< Do not draw 0 degree bar 00495 #define MxCROSSHAIR_NoBar90 0x00000002 //!< Do not draw 90 degree bar 00496 #define MxCROSSHAIR_NoBar180 0x00000004 //!< Do not draw 180 degree bar 00497 #define MxCROSSHAIR_NoBar270 0x00000008 //!< Do not draw 270 degree bar 00498 #define MxCROSSHAIR_SnapInside 0x00000010 //!< Snap crosshair to cursor in "inside" zone 00499 00500 00501 /*----------------------------------------------------------------------------*/ 00502 /* Definitions for elastic ellipse tool */ 00503 /*----------------------------------------------------------------------------*/ 00504 00505 struct EELLIPSEINFO { 00506 DPOINT2D center; //!< Ellipse center 00507 double angle; 00508 double xradius; //!< X Ellipse radius 00509 double yradius; //!< Y Ellipse radius 00510 double xrmin, xrmax; //!< Radius range 00511 double yrmin, yrmax; //!< Radius range 00512 UINT16 cmarker; //!< Marker to user for center 00513 UINT16 cmarkersize; //!< Size of marker in pixels 00514 }; 00515 00516 #define MxEELLIPSE_Rmin 0x00000001 //!< Flags for what is initially set in EELLIPSEINFO structure 00517 #define MxEELLIPSE_Rmax 0x00000002 00518 00519 00520 /*----------------------------------------------------------------------------*/ 00521 /* Definitions for elastic text label tool */ 00522 /*----------------------------------------------------------------------------*/ 00523 00524 class ETEXTLABELINFO { 00525 public: 00526 00527 enum BASECURVE { 00528 BASECURVE_Straight, 00529 BASECURVE_Exact, 00530 BASECURVE_Spline 00531 }; 00532 00533 struct LEADERINFO { 00534 POLYLINE m_Line; 00535 DPOINT3D m_TiePoint; 00536 INT32 m_ElemNum; 00537 ELEMTYPE m_ElemType; 00538 00539 LEADERINFO () : m_ElemNum(0), m_ElemType(ELEMTYPE_Empty) {} 00540 }; 00541 00542 POLYLINE m_Baseline; //!< Baseline points 00543 BASECURVE m_BaseCurve; //!< Baseline curve 00544 MISTRING m_String; //!< Text string being edited 00545 double m_Height; //!< Height of text in tool units 00546 TEXTSTYLE m_Style; //!< Style information for text 00547 double m_MapScale; //!< Map scale to use based on the scale of the drawing area 00548 MILIST<LEADERINFO> m_LeaderLines; //!< List of leader lines 00549 POLYLINE m_SourceLine; //!< Source line to follow if the label wants to be moved "along" the line 00550 00551 ETEXTLABELINFO ( 00552 ) : 00553 m_BaseCurve(BASECURVE_Straight), 00554 m_Height(1.0), 00555 m_MapScale(1.0) 00556 {} 00557 00558 ETEXTLABELINFO ( 00559 const ETEXTLABELINFO& rhs 00560 ) : 00561 m_Baseline(rhs.m_Baseline), 00562 m_BaseCurve(rhs.m_BaseCurve), 00563 m_String(rhs.m_String), 00564 m_Height(rhs.m_Height), 00565 m_Style(rhs.m_Style), 00566 m_MapScale(rhs.m_MapScale), 00567 m_LeaderLines(rhs.m_LeaderLines), 00568 m_SourceLine(rhs.m_SourceLine) 00569 {} 00570 00571 ETEXTLABELINFO& operator= ( 00572 const ETEXTLABELINFO& rhs 00573 ) { 00574 if (this != &rhs) { 00575 m_Baseline = rhs.m_Baseline; 00576 m_BaseCurve = rhs.m_BaseCurve; 00577 m_String = rhs.m_String; 00578 m_Height = rhs.m_Height; 00579 m_Style = rhs.m_Style; 00580 m_MapScale = rhs.m_MapScale; 00581 m_LeaderLines = rhs.m_LeaderLines; 00582 m_SourceLine = rhs.m_SourceLine; 00583 } 00584 return (*this); 00585 } 00586 00587 void Clear ( 00588 ) { 00589 m_String.Clear(); 00590 m_LeaderLines.Clear(); 00591 m_Baseline.Clear(); 00592 return; 00593 } 00594 00595 }; 00596 00597 #define MxETEXTLABEL_NoLeaderLines 0x00000001 //!< Do not allow editing of leader lines 00598 #define MxETEXTLABEL_NoAdvanced 0x00000002 //!< Do not allow advanced style button 00599 #define MxETEXTLABEL_NoBaselineEdit 0x00000004 //!< Do not allow baseline to be edited 00600 #define MxETEXTLABEL_NoStylePanel 0x00000008 //!< Do not allow the style panel to be created 00601 00602 PREVENT_MEMFUNC(ETEXTLABELINFO); 00603 00604 /*----------------------------------------------------------------------------*/ 00605 /* Definitions for elastic node tool */ 00606 /*----------------------------------------------------------------------------*/ 00607 00608 struct ENODEINFO { 00609 DPOINT3D pt; 00610 DPOLYGON *LineList; 00611 UINT32 NumLines; //!< Number of lines in the line list 00612 UINT16 marker; //!< Marker to use for center 00613 UINT16 markersize; //!< Size of marker in pixels 00614 int Is3D; //!< Line point list is in 3DXYZ 00615 }; 00616 00617 00618 /*----------------------------------------------------------------------------*/ 00619 /* Definitions for elastic move box tool */ 00620 /*----------------------------------------------------------------------------*/ 00621 00622 struct EMBOXINFO { 00623 DRECT2D m_Extents; //!< Current box position or extents if rotated 00624 DPOINT2D corner[4]; //!< Source box corners 00625 DPOINT2D BasePt; //!< Base Point for box 00626 DPOINT2D InsertPt; //!< Insertion point for box 00627 double xscale, yscale; //!< Sacle factors x and y direction 00628 double wmin, hmin, wmax, hmax; //!< Size range 00629 double rotangle; //!< Rotation angle in radians, angle of vector from corner 0 to 1, CCW from right 00630 double xproport, yproport; //!< Ratio for proportional box 00631 UINT16 cmarker; //!< Marker to user for center 00632 UINT16 cmarkersize; //!< Size of marker in pixels 00633 }; 00634 00635 #define MxEMBOX_Proport 0x00000001 00636 #define MxEMBOX_DontShowBasePt 0x00000002 //!< Do not draw insertion/base point chosshair 00637 00638 00639 /*----------------------------------------------------------------------------*/ 00640 /* Definitions for elastic region tool */ 00641 /*----------------------------------------------------------------------------*/ 00642 00643 struct EREGIONINFO { 00644 REGION2D region; //!< Region to draw/move 00645 }; 00646 PREVENT_MEMFUNC(EREGIONINFO); 00647 00648 #define MxEREGION_NoMove 0x00000001 00649 00650 00651 //! Macros for defining class methods to add Mxt callbacks 00652 00653 #define MXT_ADD(_clsname) inline void MxtCallbackAdd (MXTHANDLE vmxt, void (*f)(MxtAnyCallbackStruct*,_clsname*), UINT32 flags) const { MxtAddCallback(vmxt,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } 00654 #define MXT_REMOVE(_clsname) inline void MxtCallbackRemove (MXTHANDLE vmxt, void (*f)(MxtAnyCallbackStruct*,_clsname*), UINT32 flags) const { MxtRemoveCallback(vmxt,reinterpret_cast<McbCallbackFunc>(f),const_cast<_clsname*>(this),(flags)); } 00655 00656 00657 /** 00658 * Function Prototypes 00659 **/ 00660 00661 //!:Associate with "Mxt Graphic Tool Functions" 00662 //!\addtogroup Mxt Mxt Graphic Tool Functions 00663 //!@{ 00664 00665 extern "C" { 00666 00667 //! Create an instance of a rotatable crosshair tool. 00668 MXTHANDLE mxtCrossHair ( 00669 UINT32 flags, 00670 void *pwidget 00671 ); 00672 00673 //! Create an instance of an elastic arc tool. 00674 //! 00675 //! 3/4 Done, Need bound checking fixed. 00676 MXTHANDLE mxtEArc ( 00677 UINT32 flags, 00678 void *pwidget 00679 ); 00680 00681 //! Create an instance of an elastic box tool. 00682 MXTHANDLE mxtEBox ( 00683 UINT32 flags, 00684 void *pwidget 00685 ); 00686 00687 //! Create an instance of an elastic breakline tool. 00688 MXTHANDLE mxtEBreakLine ( 00689 UINT32 flags, 00690 void *pwidget 00691 ); 00692 00693 //! Create an instance of an elastic circle tool. 00694 //! 00695 //! 3/4 Done, Need bound checking fixed. 00696 MXTHANDLE mxtECircle ( 00697 UINT32 flags, 00698 void *pwidget 00699 ); 00700 00701 //! Create an instance of an elastic ellipse tool. 00702 MXTHANDLE mxtEEllipse ( 00703 UINT32 flags, 00704 void *pwidget 00705 ); 00706 00707 //! Create an instance of an elastic box tool. 00708 MXTHANDLE mxtELine ( 00709 UINT32 flags, 00710 void *pwidget 00711 ); 00712 00713 //! Create an instance of an elastic box tool. 00714 MXTHANDLE mxtEMBox ( 00715 UINT32 flags, 00716 void *pwidget 00717 ); 00718 00719 //! Create an instance of an elastic point tool. 00720 MXTHANDLE mxtEMultiPoint ( 00721 UINT32 flags, 00722 void *pwidget 00723 ); 00724 00725 //! Create multi elastic polyline tool. 00726 MXTHANDLE mxtEMultiPolyLine ( 00727 UINT32 flags, 00728 void *pwidget 00729 ); 00730 00731 //! Create an instance of node edit tool. 00732 MXTHANDLE mxtENode ( 00733 UINT32 flags, 00734 void *pwidget 00735 ); 00736 00737 //! Create an instance of an elastic point tool. 00738 MXTHANDLE mxtEPoint ( 00739 UINT32 flags, 00740 void *pwidget 00741 ); 00742 00743 //! Create elastic polyline tool. 00744 MXTHANDLE mxtEPolyLine ( 00745 UINT32 flags, 00746 void *pwidget 00747 ); 00748 00749 //! Create elastic region tool. 00750 MXTHANDLE mxtERegion ( 00751 UINT32 flags, 00752 void *pwidget 00753 ); 00754 00755 //! Create an instance of an elastic regpoly tool. 00756 MXTHANDLE mxtERegPoly ( 00757 UINT32 flags, 00758 void *pwidget 00759 ); 00760 00761 //! Create an instance of an elastic text label tool. 00762 MXTHANDLE mxtETextLabel ( 00763 UINT32 flags, 00764 void *pwidget 00765 ); 00766 00767 //! Create an instance of point follow tool. 00768 MXTHANDLE mxtFollowPoint ( 00769 UINT32 flags, 00770 void *pwidget 00771 ); 00772 00773 //! Create an instance of point selection tool. 00774 MXTHANDLE mxtSelectPoint ( 00775 UINT32 flags, 00776 void *pwidget 00777 ); 00778 00779 //! Add callback to tool. 00780 //! 00781 //! Valid reasons: The reasons are in reason classes 00782 //! <ul> 00783 //! <li>MxtCR_IsBegin 00784 //! <li>MxtCR_IsContinue 00785 //! <li>MxtCR_IsEnd 00786 //! <li>MxtCR_IsOther 00787 //! <li>MxtCR_IsActivate 00788 //! <li>MxtCR_IsDestroy 00789 //! <li>MxtCR_IsOther reasons: 00790 //! <ul> 00791 //! <li>MxtCR_NoReason 00792 //! <li>MxtCR_SetValues 00793 //! <li>MxtCR_NewLimits 00794 //! <li>MxtCR_SelectPosition SelectPoint tool sends this on a left button click 00795 //! <li>MxtCR_Manage 00796 //! <li>MxtCR_Unmanage 00797 //! <li>MxtCR_ClearPosition 00798 //! <li>MxtCR_Cancel User pressed 'Cancel' button 00799 //! <li>MxtCR_SnapCoord Passed MxtSnapCoordCallback, see below 00800 //! </ul> 00801 //! <li>MxtCR_IsActivate reasons: 00802 //! <ul> 00803 //! <li>MxtCR_Activate 00804 //! </ul> 00805 //! <li>MxtCR_IsDestroy reasons: 00806 //! <ul> 00807 //! <li>MxtCR_Destroy 00808 //! </ul> 00809 //! <li>MxtCR_IsBegin reasons: 00810 //! <ul> 00811 //! <li>MxtCR_CreateBegin 00812 //! <li>MxtCR_MoveBegin 00813 //! <li>MxtCR_ResizeBegin 00814 //! <li>MxtCR_RotateBegin 00815 //! <li>MxtCR_ShearBegin 00816 //! <li>MxtCR_EditBegin 00817 //! </ul> 00818 //! <li>MxtCR_IsContinue reasons: 00819 //! <ul> 00820 //! <li>MxtCR_MoveContinue 00821 //! <li>MxtCR_ResizeContinue 00822 //! <li>MxtCR_RotateContinue 00823 //! <li>MxtCR_ShearContinue 00824 //! <li>MxtCR_EditContinue 00825 //! <li>MxtCR_CreateContinue 00826 //! </ul> 00827 //! <li>MxtCR_IsEnd reasons: 00828 //! <ul> 00829 //! <li>MxtCR_MoveEnd 00830 //! <li>MxtCR_ResizeEnd 00831 //! <li>MxtCR_RotateEnd 00832 //! <li>MxtCR_ShearEnd 00833 //! <li>MxtCR_EditEnd 00834 //! <li>MxtCR_CreateEnd 00835 //! </ul> 00836 //! </ul> 00837 int MxtAddCallback ( 00838 MXTHANDLE vmxt, //!< Add callback to tool 00839 McbCallbackFunc func, //!< Callback function 00840 void *udata, //!< User data passed to func 00841 UINT32 reason //!< Reason set flags to get callbacks on 00842 ); 00843 00844 //! Add callback to tool with position determined by priority. 00845 int MxtCallbackAddExt ( 00846 MXTHANDLE vmxt, //!< Add callback to tool 00847 McbCallbackFunc func, //!< Callback function 00848 void *udata, //!< User data passed to func 00849 UINT32 reason, //!< Reason set flags to get callbacks on 00850 INT8 priority 00851 ); 00852 00853 //! Call "activate" callback for specified tool 00854 void MxtCallActivateCallback ( 00855 MXTHANDLE mxt //!< Tool handle 00856 ); 00857 00858 //! Call "change" callback for specified tool. 00859 void MxtCallChangeCallback ( 00860 MXTHANDLE mxt, //!< Tool handle 00861 UINT32 reason //!< Callback reason 00862 ); 00863 00864 //! Clear tool position (erasing tool). 00865 //! 00866 //! This function undraws the tool then clears the tool information. 00867 //! Useful in activate callbacks to simulate adding elements. 00868 void MxtClearPosition ( 00869 MXTHANDLE mxt //!< Handle returned by MxtCreate() 00870 ); 00871 00872 //! Create new tool instance. 00873 //! 00874 //! This function creates a tool handle by calling the appropriate tool 00875 //! create function. It also sets up the default tool position which will 00876 //! be a clear tool (no info). Neither the tool create function nor this 00877 //! function will create the dialog. Any setup of the tool dialog must be 00878 //! done before MxtManage() is called because MxtManage() sets up the dialog. 00879 //! NOTE: Call MxtSetValues() to setup default tool information. 00880 //! List of flags to pass in this function (see MxtSetFlags()). 00881 //! \li \b MxtFLAG_EnableManual 00882 //! \li \b MxtFLAG_EnableDialog 00883 //! \li \b MxtFLAG_EnableXYDig 00884 //! \li \b MxtFLAG_EnableSnapGrid 00885 //! Any tool specific flags dealing with dialog management. Eg: 00886 //! \li \b MxEPOLYLINE_NoEditZValue 00887 //! \li \b MxEPOLYLINE_NoClosePolyB 00888 MXTHANDLE MxtCreate ( 00889 Widget pwidget, //!< Drawing Area widget 00890 MXTHANDLE (*CreateFunc)(UINT32, void*), //! Function to create specific tool 00891 UINT32 flags //!< MxtFLAG... flags 00892 ); 00893 00894 //! Destroy previously created tool instance. 00895 //! 00896 //! This function does basic cleanup of the tool. It will unmanage the tool 00897 //! if not done so already. It will also remove the tool tag string to keep 00898 //! the tool pointer from being used as a tool. It will free the pointer. 00899 void MxtDestroy ( 00900 MXTHANDLE mxt //!< Tool handle 00901 ); 00902 00903 //! Draw tool graphic. 00904 void MxtDrawGraphic ( 00905 MXTHANDLE vmxt, //!< Handle returned by MxtCreate() 00906 const LRECT2D *rect //!< Area to draw into, NULL for the whole area 00907 ); 00908 00909 //! Display dialog allowing user to edit global tool colors and width. 00910 //! 00911 //! @return 0 if user changed values, EUserCancel if cancelled. 00912 //! 00913 //! This will automatically update the process global tool settings and save to the Ini file. 00914 //! The application should refresh all active tools if possible using MxtSetToolColor() for 00915 //! each DrawingArea's current tool. 00916 int MxtEditGlobalOptions ( 00917 Widget pwidget //!< Parent for dialog 00918 ); 00919 00920 //! GPS input is enabled for this view. 00921 void MxtEnableGps ( 00922 Widget pwidget, //!< Drawing Area widget 00923 int enabled //!< TRUE if GPS is set for this drawing area 00924 ); 00925 00926 //! Free tool structure internal data storage (Eg. EPOLYLINEINFO). 00927 //! 00928 //! This function frees any allocated data associated with the tool 00929 //! structure. Eg. the point buffer for line data. It will not free 00930 //! the data associated with a change callback. 00931 void MxtFreeValues ( 00932 MXTHANDLE mxt, //!< Handle returned by MxtCreate() 00933 void *toolvalues //!< Pointer to tool structure 00934 ); 00935 00936 //! Generate manual form for tool if it exists. 00937 //! 00938 //! @return Form widget or NULL if non-existant. 00939 //! 00940 //! NOTE: Must specify MxtFLAG_NoDialog to use this function. 00941 Widget MxtGenerateManualForm ( 00942 MXTHANDLE vmxt, //!< Handle returned by MxtCreate() 00943 Widget parent //!< Parent for main tool form, assumed to be a RowColumn 00944 ); 00945 00946 //! Generate a region form the tool if supported. 00947 //! 00948 //! @return 1 if a region is generated, 0 if not, < 0 Error. 00949 //! 00950 //! This function will call MregionInit(). If an error occurs, MregionFree() is called. 00951 int MxtGenerateRegion ( 00952 MXTHANDLE vmxt, //!< Handle returned by MxtCreate() 00953 REGION2D& region, //!< The region to fill in 00954 UINT32 flags //!< May be used at some point 00955 ); 00956 00957 //! Generate spatial form for tool if it exists. 00958 //! 00959 //! @return Form widget or NULL if non-existant. 00960 //! 00961 //! NOTE: Must specify MxtFLAG_NoDialog to use this function. 00962 Widget MxtGenerateSpatialForm ( 00963 MXTHANDLE vmxt, //!< Handle returned by MxtCreate() 00964 Widget parent //!< Parent for main tool form, assumed to be a RowColumn 00965 ); 00966 00967 //! Generate main tool form for tool if it exists. 00968 //! 00969 //! @return Form widget or NULL if non-existant. 00970 //! 00971 //! NOTE: Must specify MxtFLAG_NoDialog to use this function. 00972 Widget MxtGenerateToolForm ( 00973 MXTHANDLE vmxt, //!< Handle returned by MxtCreate() 00974 Widget parent //!< Parent for main tool form, assumed to be a RowColumn 00975 ); 00976 00977 //! Return current arrow key delta values. 00978 //! 00979 //! This function gets the amount of movement for hitting arrow keys in 00980 //! object coordinates (i.e. deltas). 00981 void MxtGetArrowKeyDeltas ( 00982 MXTHANDLE mxt, //!< Handle returned by MxtCreate() 00983 double *delta_x, //!< Length to move in X direction (RETURNED) 00984 double *delta_y //!< Length to move in Y direction (RETURNED) 00985 ); 00986 00987 //! Return current tool boundary rectangle. 00988 //! 00989 //! @return 1 - Tool has boundaries, 0 - Tool can move off drawable. 00990 //! 00991 //! This function returns the boundaries for the tool. 00992 int MxtGetBounds ( 00993 MXTHANDLE mxt, //!< Handle returned by MxtCreate() 00994 DRECT2D *rect //!< Rect containing coordinates to bound, tool coords 00995 ); 00996 00997 //! Return currently active tool handle. 00998 //! 00999 //! @return Handle to the currently active tool or NULL if no tool is active. 01000 MXTHANDLE MxtGetCurrentTool ( 01001 MXTHANDLE mxt //!< Can either be a MXTHANDLE or the parent widget of the tool 01002 ); 01003 01004 //! Return current tool flags. 01005 //! 01006 //! This function returns the current flags set in the tool. You should call 01007 //! this function to get the current flags, set or unset certain flags, then 01008 //! call MxtSetFlags() to set the flags. 01009 UINT32 MxtGetFlags ( 01010 MXTHANDLE mxt 01011 ); 01012 01013 //! Return global colors set for tools in the application. 01014 void MxtGetGlobalColor ( 01015 int *UseTool, //!< Not used, can pass NULL 01016 COLOR *color, //!< Primary tool color RETURNED 01017 COLOR *seccolor, //!< Secondary tool color RETURNED 01018 int *LineWidth //!< Tool line width RETURNED 01019 ); 01020 01021 //! Return status of manual edit dialog (on/off). 01022 //! 01023 //! @return TRUE if the manual editor is in use, FALSE if not. 01024 //! 01025 //! This function returns the status of the manual editor mode. 01026 int MxtGetManualMode ( 01027 MXTHANDLE mxt //!< Handle returned by MxtCreate() 01028 ); 01029 01030 //! Return current tool manual parameter settings. 01031 //! 01032 //! This function retrieves the manual tool editing information within the tool. 01033 void MxtGetManualParms ( 01034 MXTHANDLE mxt, //!< Handle returned by MxtCreate() 01035 MANUALTOOLPARMS *mtparms //!< Pointer to manual tool editing parameters 01036 ); 01037 01038 //! Return current tool snap grid settings. 01039 //! 01040 //! This function retrieves the snap grid information from the tool. 01041 void MxtGetSnapGrid ( 01042 MXTHANDLE mxt, //!< Handle returned by MxtCreate() 01043 SNAPGRIDPARMS *snapgrid //!< Pointer to snap grid parameters 01044 ); 01045 01046 //! Return current status of tool snap grid (on/off). 01047 //! 01048 //! @return TRUE if the snap grid is in use, FALSE if not. 01049 //! 01050 //! This function returns the status of the snap grid mode. 01051 int MxtGetSnapGridMode ( 01052 MXTHANDLE mxt //!< Handle returned by MxtCreate() 01053 ); 01054 01055 //! Return the GC (X drawing parameter handle) of the tool. 01056 GC MxtGetToolGC ( 01057 MXTHANDLE mxt 01058 ); 01059 01060 //! Get size of tool structure (Eg. sizeof(EBOXINFO)). 01061 //! 01062 //! Returns the structure size of the tool. 01063 int MxtGetToolSize ( 01064 MXTHANDLE mxt //!< Handle returned by MxtCreate() 01065 ); 01066 01067 //! Get "userdata" resource for a tool. 01068 //! 01069 //! Returns the pointer to the data associated with the tool. Set by MxtSetUserData(). 01070 void *MxtGetUserData ( 01071 MXTHANDLE mxt //!< Handle returned by MxtCreate() 01072 ); 01073 01074 //! Get current tool-specific "values" structure. 01075 //! 01076 //! The tool makes a copy of the information and places it in the toolvalues 01077 //! structure. No direct access of the tool data is allowed. You must free 01078 //! any allocated fields in the tool structure using MxtFreeValues(). 01079 //! Definitions of tool structures is with the respective "Create" 01080 //! function for that tool. Eg: MxtCreateEBox has a definition of an 01081 //! EBOXINFO structure. 01082 int MxtGetValues ( 01083 MXTHANDLE mxt, //!< Handle returned by MxtCreate() 01084 void *toolvalues //!< Pointer to tool structure to copy into 01085 ); 01086 01087 //! Return current status of X-Y Digitizer (on/off). 01088 //! 01089 //! @return TRUE if the digitizer is in use, FALSE if not. 01090 int MxtGetXYDigitizerMode ( 01091 MXTHANDLE mxt //!< Handle returned by MxtCreate() 01092 ); 01093 01094 //! Return "position" status of tool. 01095 //! 01096 //! @return TRUE if tool has graphic position set. 01097 int MxtHasPosition ( 01098 MXTHANDLE mxt //!< Handle returned by MxtCreate() 01099 ); 01100 01101 //! Inform caller if we are in an update background call. 01102 int MxtInBgUpdateCall ( 01103 MXTHANDLE mxt 01104 ); 01105 01106 //! Return "managed" status of tool. 01107 //! 01108 //! @return TRUE if tool has been managed. Set by MxtManage(). 01109 int MxtIsManaged ( 01110 MXTHANDLE mxt //!< Handle returned by MxtCreate() 01111 ); 01112 01113 //! Return "suspended" status of tool. 01114 //! 01115 //! @return TRUE if tool has been suspended. Set by MxtSuspend(). 01116 int MxtIsSuspended ( 01117 MXTHANDLE mxt //!< Handle returned by MxtCreate() 01118 ); 01119 01120 //! Check to see if GPS tracking is on. 01121 int MxtIsTrackingGps ( 01122 MXTHANDLE mxt 01123 ); 01124 01125 //! Make tool instance active, allowing user to modify it. 01126 //! 01127 //! This function creates the GC and tool dialog. It also sets up specific 01128 //! event handlers to check for certain events, displays the tool if the 01129 //! tool has i