00001 /** 00002 * mi32/xdefns.h - Definitions for MicroImages library functions which use X toolkit 00003 * 00004 * \if NODOC 00005 * $Log: xdefns.h_v $ 00006 * Revision 3.729 2005/10/11 14:19:21 mju 00007 * Fix rastype_float64 value. 00008 * 00009 * Revision 3.728 2005/08/18 16:16:01 dwilliss 00010 * Changed prototype of a function (actually overloaded it and deprecated the 00011 * old version) 00012 * 00013 * Revision 3.727 2005/05/12 19:41:29 dwilliss 00014 * New prototype 00015 * 00016 * Revision 3.726 2005/03/31 18:23:23 mju 00017 * Add MxSetFocusToWidget. 00018 * 00019 * Revision 3.725 2005/03/31 16:57:22 fileserver!dwilliss 00020 * Rename one of our types to MIUNICODE because it conflicted with a Microsoft #define 00021 * 00022 * Revision 3.724 2005/03/24 16:22:42 dwilliss 00023 * new proto 00024 * 00025 * Revision 3.723 2005/03/15 18:43:25 mju 00026 * Remove mapprojparm decl. 00027 * 00028 * Revision 3.722 2005/03/07 16:47:36 dwilliss 00029 * Added a prototype 00030 * 00031 * Revision 3.721 2005/02/17 15:17:22 mju 00032 * Add defaults for unused parms in saveDrawable/SnapshotToRaster. 00033 * 00034 * Revision 3.720 2005/01/20 18:34:30 scowan 00035 * Changed mx select element function parameters. 00036 * 00037 * Revision 3.719 2005/01/18 15:57:50 mju 00038 * Add iconid variants for mxCreateIcon... 00039 * 00040 * Revision 3.718 2005/01/17 18:55:22 vdronov 00041 * *** empty log message *** 00042 * 00043 * Revision 3.717 2005/01/14 23:57:57 dwilliss 00044 * RASTYPE constants switched around to be the same as RVC::IMAGE::CELLTYPE 00045 * Eliminated 2-bit raster type 00046 * 00047 * Revision 3.716 2005/01/10 18:00:16 mju 00048 * Remove group.key variant for msgLineSetTimer. 00049 * 00050 * Revision 3.715 2005/01/10 17:53:19 mju 00051 * Use mistring for mxtitleSetString so can use textid. 00052 * 00053 * Revision 3.714 2005/01/10 16:02:29 mju 00054 * Add dft for msglinesettimer. 00055 * 00056 * Revision 3.713 2005/01/07 16:35:31 mju 00057 * Rmv mxMsgLineSetString as unused. 00058 * 00059 * Revision 3.712 2005/01/04 15:24:28 mju 00060 * Remove mxtitleSetStringExt. 00061 * 00062 * Revision 3.711 2005/01/03 16:23:49 mju 00063 * Add ifdefs for deprecation. 00064 * 00065 * Revision 3.710 2004/10/21 16:57:26 mju 00066 * Use msys fn to get appcontext in mxXtTimeOutAdd. 00067 * 00068 * Revision 3.709 2004/10/15 20:56:39 mju 00069 * In mxToggleButtonSetState force values to true/false when call xm version. 00070 * 00071 * Revision 3.708 2004/10/14 20:14:03 dwilliss 00072 * Added 2 new option menu functions to wrap Motif ones 00073 * 00074 * Revision 3.707 2004/07/15 19:28:50 mju 00075 * Use region2d for region generation functions. 00076 * 00077 * Revision 3.706 2004/07/14 22:56:15 dwilliss 00078 * another dregion bites the dust! 00079 * 00080 * Revision 3.705 2004/07/14 22:14:13 dwilliss 00081 * mx setup floodparms callback now takes a REGION2D, not a dregion. 00082 * 00083 * Revision 3.704 2004/07/13 15:36:13 mju 00084 * *** empty log message *** 00085 * 00086 * Revision 3.703 2004/07/12 19:41:52 scowan 00087 * Removed mx extents form prototypes. 00088 * 00089 * Revision 3.702 2004/07/12 16:50:10 mju 00090 * Remove legacy map calculator. 00091 * 00092 * Revision 3.701 2004/06/30 21:22:49 scowan 00093 * *** empty log message *** 00094 * 00095 * Revision 3.700 2004/06/30 21:18:06 scowan 00096 * Forward declare region 2d. 00097 * 00098 * Revision 3.699 2004/06/30 21:08:09 mju 00099 * Don't include coordop, just forward-declare what we actually need. 00100 * 00101 * Revision 3.698 2004/06/29 21:28:42 scowan 00102 * Fixed prototype change. 00103 * 00104 * Revision 3.697 2004/06/29 21:21:26 vdronov 00105 * *** empty log message *** 00106 * 00107 * Revision 3.696 2004/06/16 17:47:47 dwilliss 00108 * Added MxPopupMenuAddParent 00109 * 00110 * Revision 3.695 2004/06/15 16:33:33 dwilliss 00111 * Proto for new function 00112 * 00113 * Revision 3.694 2004/06/11 17:27:56 scowan 00114 * Deprecated mx extents form functions. 00115 * 00116 * Revision 3.693 2004/06/02 15:18:56 dwilliss 00117 * MxCreateXmStringUC now takes optional style parameter 00118 * 00119 * Revision 3.692 2004/05/25 19:28:04 dwilliss 00120 * Added an optional parameter to the MxStringXxx functions 00121 * 00122 * Revision 3.691 2004/04/14 21:47:49 mju 00123 * Add MxMENU_NOCENTERLABEL. 00124 * 00125 * Revision 3.690 2004/04/08 22:16:18 scowan 00126 * Removed prototypes of mx texts style form functions. 00127 * 00128 * Revision 3.689 2004/03/11 21:12:25 mju 00129 * Change comment for mxToolTip fn replacement. 00130 * 00131 * Revision 3.688 2004/03/08 15:48:47 dwilliss 00132 * New prototype 00133 * 00134 * Revision 3.687 2004/03/05 16:03:44 dwilliss 00135 * Added parameter to MxStringExtents to clear up confusion about what height 00136 * was returned (even though it was CLEARLY DOCUMENTED!) Now you have to tell 00137 * it what you want. You have a choice and it's not optional. 00138 * 00139 * Revision 3.686 2004/03/01 15:15:30 mju 00140 * Deprecate more legacy functions. 00141 * Show replacements for most deprecated items. 00142 * 00143 * Revision 3.685 2004/02/26 16:54:53 mju 00144 * Deprecate old style editor functions. 00145 * 00146 * Revision 3.684 2004/02/16 21:48:34 mju 00147 * No mtTextGetXmString. 00148 * 00149 * Revision 3.683 2004/02/16 18:01:49 mju 00150 * Use 'deprecated' on deprecated items. 00151 * 00152 * Revision 3.682 2004/02/05 22:08:04 mju 00153 * Remove/deprecate legacy tooltip functions. 00154 * 00155 * Revision 3.681 2004/02/02 17:54:17 mju 00156 * Add xmstr.SetFromWidget. 00157 * 00158 * Revision 3.680 2004/01/06 14:29:39 mju 00159 * Remove getXServerFont as not used. 00160 * 00161 * Revision 3.679 2004/01/06 13:08:53 mju 00162 * Remove 'console' functions to own header. 00163 * 00164 * Revision 3.678 2004/01/02 17:38:52 mju 00165 * Add mxClearWidget. 00166 * 00167 * Revision 3.677 2003/12/19 21:25:42 mju 00168 * mtTextGetSmString should be inline. 00169 * 00170 * Revision 3.676 2003/12/19 17:15:03 dwilliss 00171 * added a new prototype for a new tooltip func 00172 * 00173 * Revision 3.675 2003/12/19 14:20:44 mju 00174 * Remove obsolete mtTextSetXeTextString. 00175 * 00176 * Revision 3.674 2003/12/18 13:42:42 mju 00177 * Remove deprecated stuff. 00178 * 00179 * Revision 3.673 2003/12/15 23:55:11 dwilliss 00180 * Added tool tip function to show an MGD image 00181 * 00182 * Revision 3.672 2003/12/15 21:02:07 dwilliss 00183 * Added a proto 00184 * 00185 * Revision 3.671 2003/11/19 21:50:26 mju 00186 * Add MxCreateLabel using MISTRING. 00187 * 00188 * Revision 3.670 2003/11/11 22:54:36 dwilliss 00189 * Overloaded version of MxGetDBFields that takes MISTRING/FILEPATH 00190 * 00191 * Revision 3.669 2003/11/10 16:13:26 dwilliss 00192 * New prototype. 00193 * 00194 * Revision 3.668 2003/11/07 14:37:44 mju 00195 * Remove mxWarp... protototypes. 00196 * 00197 * Revision 3.667 2003/11/05 20:50:30 mju 00198 * Restore XMSTR ctor/op= from MIUNICODE const*. 00199 * 00200 * Revision 3.666 2003/11/05 15:01:15 mju 00201 * Forgot to inline fn. 00202 * 00203 * Revision 3.665 2003/11/05 14:44:00 mju 00204 * Add mxGetColorPixel, setWidgetColor. 00205 * Remove more obsolete prototypes. 00206 * 00207 * Revision 3.664 2003/11/04 15:27:36 scowan 00208 * Removed get scaalbe font flags and prototype. 00209 * 00210 * Revision 3.663 2003/11/04 15:24:38 scowan 00211 * Removed legacy wrapper call to get scalable font function. 00212 * 00213 * Revision 3.662 2003/11/03 20:40:06 scowan 00214 * Deprecate legacy get scalable font function. 00215 * 00216 * Revision 3.661 2003/11/03 14:41:26 mju 00217 * Add MxMsgLineSetText, make SetString/SetTextID call it. 00218 * 00219 * Revision 3.660 2003/10/31 22:28:43 mju 00220 * Move MxcAlloc after FindClosest so builds. 00221 * 00222 * Revision 3.659 2003/10/31 22:12:09 mju 00223 * Remove almost all Mxc color toolkit fns as colormapped displays no longer supported. 00224 * 00225 * Revision 3.658 2003/10/31 16:33:38 mju 00226 * Remove mxFindClosestStdColor. 00227 * 00228 * Revision 3.657 2003/10/31 16:21:52 mju 00229 * Delete obsolete prototypes. 00230 * 00231 * Revision 3.656 2003/10/31 16:02:42 mju 00232 * Remove old metadata attachment fn. 00233 * 00234 * Revision 3.655 2003/10/30 20:25:33 scowan 00235 * Changed check disk space prototype to take a filepath and a int 64. 00236 * 00237 * Revision 3.654 2003/10/22 16:33:09 mju 00238 * Remove mxGeorefMakeImplied prototype. 00239 * 00240 * Revision 3.653 2003/10/22 15:44:11 mju 00241 * Remove mxDisplayMessageCode prototypes. 00242 * 00243 * Revision 3.652 2003/10/17 14:52:50 mju 00244 * Deprecate MxPopupYNC. 00245 * 00246 * Revision 3.651 2003/10/16 18:03:36 scowan 00247 * nc. 00248 * 00249 * Revision 3.650 2003/10/15 21:51:43 mju 00250 * Deprecate MfxSelectTable. 00251 * 00252 * Revision 3.649 2003/10/15 14:59:54 mju 00253 * MxAdvisor parms changed. 00254 * 00255 * Revision 3.648 2003/10/09 15:27:23 scowan 00256 * Added text id support for xm str class. 00257 * 00258 * Revision 3.647 2003/10/08 22:33:26 scowan 00259 * Removed unused prototypes. 00260 * 00261 * Revision 3.646 2003/10/08 16:42:14 mju 00262 * Add MxMsgLineSetTimer variant using textid. 00263 * 00264 * Revision 3.645 2003/09/22 19:57:03 scowan 00265 * removed old recover rvc function prototype. 00266 * 00267 * Revision 3.644 2003/09/15 15:25:32 dwilliss 00268 * Fixed error in Doxygen cleanup. 00269 * 00270 * Revision 3.643 2003/09/15 13:49:56 fileserver!dwilliss 00271 * Doxygen 00272 * 00273 * \endif 00274 **/ 00275 00276 #if !defined(INC_MI32_XDEFNS_H) && (!defined(WIN32_NATIVE) || defined(GENERATING_DOXYGEN_OUTPUT)) 00277 00278 #define INC_MI32_XDEFNS_H 00279 00280 #define NoXmMessageDialogTypes //!< So don't allow XmDIALOG_ERROR, WARNING, etc 00281 00282 #ifndef INC_MI32_STDDEFNS_H 00283 #include <mi32/stddefns.h> 00284 #endif 00285 00286 #ifndef _XLIB_H_ 00287 #include <X11/Xlib.h> 00288 #endif 00289 00290 #ifndef _XUTIL_H 00291 #include <X11/Xutil.h> 00292 #endif 00293 00294 #ifdef EDITRES 00295 #include <X11/Xmu/Editres.h> 00296 #endif 00297 00298 #ifndef _Xm_h 00299 #include <Xm/Xm.h> 00300 #endif 00301 #ifndef _XmToggle_h 00302 #include <Xm/ToggleB.h> 00303 #endif 00304 00305 #ifndef INC_MI32_MSTATUSW_H 00306 #include <mi32/mstatusw.h> 00307 #endif 00308 #ifndef INC_MI32_MDLG_H 00309 #include <mi32/mdlg.h> 00310 #endif 00311 #ifndef INC_MI32_MCB_H 00312 #include <mi32/mcb.h> 00313 #endif 00314 00315 #ifndef INC_MI32_DISPINFO_H 00316 #include <mi32/dispinfo.h> 00317 #endif 00318 00319 #ifndef INC_MI32_ELEMTYPE_H 00320 #include <mi32/elemtype.h> 00321 #endif 00322 00323 #ifndef INC_MI32_COLOR_H 00324 #include <mi32/color.h> 00325 #endif 00326 00327 #ifndef INC_MI32_TEXTBASE_H 00328 #include <mi32/textbase.h> //! For TEXTBASEORIGIN 00329 #endif 00330 00331 #ifndef INC_MI32_LATLONFM_H 00332 #include <mi32/latlonfm.h> //! For DEGTOSTRFLAGS 00333 #endif 00334 00335 #ifndef INC_MI32_MSYS_H 00336 #include <mi32/msys.h> 00337 #endif 00338 00339 #ifndef INC_MI32_SIMPLEAR_H 00340 #include <mi32/simplear.h> 00341 #endif 00342 00343 #ifndef INC_MI32_RVCDEFNS_H 00344 #include <mi32/rvcdefns.h> 00345 #endif 00346 00347 #ifndef INC_MI32_HELPID_H 00348 #include <mi32/helpid.h> 00349 #endif 00350 00351 #ifndef INC_MI32_MG2ENUMS_H 00352 #include <mi32/mg2enums.h> 00353 #endif 00354 00355 #ifndef INC_MI32_TEXTID_H 00356 #include <mi32/textid.h> 00357 #endif 00358 00359 #ifndef INC_MI32_ICONID_H 00360 #include <mi32/iconid.h> 00361 #endif 00362 00363 #ifdef index 00364 #undef index 00365 #endif 00366 00367 //! Forward declarations 00368 00369 union ANYRASTVALUE; 00370 struct BITMAPPATTHDR; 00371 class REGION2D; 00372 struct COLMAPINFO; 00373 struct HISTORGB; 00374 struct MICONSTRUCT; 00375 struct RGNELEMLIST; 00376 struct RVCRASTINFO; 00377 struct RVCTABLEINFO; 00378 struct TABLEFIELD; 00379 struct TEXTSTYLE; 00380 struct TRANSPARM; 00381 struct MTIMER; 00382 class TRANS2D_MAPGEN; 00383 struct UNITCONV; 00384 struct TEXTMETRICS; 00385 class FILEPATH; 00386 class XTARGS; 00387 00388 00389 #ifndef USE_NEW_MGD 00390 #define USE_NEW_MGD 00391 #endif 00392 00393 00394 namespace MGD { 00395 class DEVICE; 00396 class DEVICE_BINARY; 00397 } 00398 typedef MGD::DEVICE MGD_DISPLAY; 00399 00400 namespace RVC { 00401 class OBJITEM; 00402 } 00403 typedef RVC::OBJITEM RVCOBJITEM; 00404 00405 namespace SPATREF { 00406 class COORDREFSYS; 00407 } 00408 00409 /*----------------------------------------------------------------------------*/ 00410 /* Helper macros */ 00411 /*----------------------------------------------------------------------------*/ 00412 00413 #define XtSetArgI(arg,c,n,v) ((void)(arg[c].name=(char*)(n),arg[c].value=(XtArgVal)(v),c++)) 00414 00415 // The sizeof operators are used to ensure that the size of the variable where 00416 // userData will be stored is at least as large as a pointer. Normally the 00417 // expression inside the [] evaluates to 1. mju 1994-05-10 00418 #define MxGetUserData(w,p) { Arg _mxgetuserdataarg[sizeof(*p)-sizeof(void*)+1]; XtSetArg(_mxgetuserdataarg[0],XmNuserData,p); XtGetValues(w,_mxgetuserdataarg,1); } 00419 00420 #define MxAddEditResHandler(shell) XtAddEventHandler(shell, (EventMask) 0, True, _XEditResCheckMessages, NULL) 00421 00422 //! Macros for defining class methods to add Xt callbacks / event handlers 00423 #define MXXTCB_ADD(_clsname) inline void MxXtCallbackAdd (Widget w, const char *name, void (*f)(Widget,_clsname*,void*)) { XtAddCallback(w,(name),reinterpret_cast<XtCallbackProc>(f),this); } 00424 #define MXXTCB_REMOVE(_clsname) inline void MxXtCallbackRemove (Widget w, const char *name, void (*f)(Widget,_clsname*,void*)) { XtRemoveCallback(w,(name),reinterpret_cast<XtCallbackProc>(f),this); } 00425 #define MXXTEH_ADD(_clsname) inline void MxXtEventHandlerAdd (Widget w, EventMask emask, void (*f)(Widget,_clsname*,XEvent*,Boolean*), bool nmi=false) { XtAddEventHandler(w,(emask),(Boolean)(nmi),reinterpret_cast<XtEventHandler>(f),this); } 00426 #define MXXTEH_REMOVE(_clsname) inline void MxXtEventHandlerRemove (Widget w, EventMask emask, void (*f)(Widget,_clsname*,XEvent*,Boolean*), bool nmi=false) { XtRemoveEventHandler(w,(emask),(Boolean)(nmi),reinterpret_cast<XtEventHandler>(f),this); } 00427 #define MXXTTO_ADD(_clsname) inline XtIntervalId MxXtTimeOutAdd (Widget w, unsigned long delay, void (*f)(_clsname*,XtIntervalId*)) { return(XtAppAddTimeOut(MsysAppGetXContext(),(delay),reinterpret_cast<XtTimerCallbackProc>(f),this)); } 00428 00429 00430 /*----------------------------------------------------------------------------*/ 00431 00432 extern "C" { 00433 00434 extern int _MxShadowThickness; //!< Shadow thickness for widgets that have shadows 00435 extern int _MxSpaceNarrow; //!< Narrow spacing (eg, inside Frame) between widgets 00436 extern int _MxSpaceNormal; //!< Normal spacing between widgets 00437 extern int _MxSpaceWide; //!< Wide spacing between widgets 00438 00439 } //! extern "C" 00440 00441 /*----------------------------------------------------------------------------*/ 00442 /* Definitions for EditColor */ 00443 /*----------------------------------------------------------------------------*/ 00444 00445 #define EDITCOLOR_AllowTransp 0x0002 //!< Allows transparency toggle 00446 #define EDITCOLOR_AllowTransPct 0x0004 //!< Allows setting of transparency 0-100% 00447 00448 struct EDITCOLORINFO { 00449 COLOR color; 00450 Pixel pixel; //!< Pixel value to use on PseudoColor displays 00451 UINT8 CanChangeColor; //!< Set if colormap entry for pixel value is writable 00452 UINT8 AllowTransparent; //!< Allow this color to be set to "transparent" 00453 UINT8 DefaultSelected; //!< Default to having this item 'selected' 00454 UINT8 spare; 00455 char *name; //!< Name for color, will be translated through resource file 00456 }; 00457 00458 00459 /*----------------------------------------------------------------------------*/ 00460 /* Menu Item definitions */ 00461 /*----------------------------------------------------------------------------*/ 00462 00463 struct MENUITEM { 00464 mutable char *label; //!< Label for the item, if "-" a separator will be generated, NULL to indicate end of array. 00465 unsigned long flags; //!< Must be same size as pointer for proper alignment on the DEC Alpha 00466 XtCallbackProc callback; //!< Callback function; NULL if none 00467 void *callback_data; //!< client_data for callback() 00468 const char *help; //!< Help id 00469 const MENUITEM *subitems; //!< Submenu items; NULL if none 00470 void *userdata; //!< Used to set userData resource if NULL passed to MxCreateMenuBar 00471 UINT32 icid; //!< Interface Component ID for customization 00472 mutable Widget widget; //!< Widget created for this menu item 00473 Widget *pwidget; //!< If non-NULL, pointed-to value will be set to widget when created 00474 }; 00475 00476 struct MENUBARITEM { 00477 mutable char *label; //!< Label for the item, NULL to indicate end of array. 00478 const MENUITEM *items; //!< First pulldown menu items, NULL to indicate end. 00479 Widget *widget_list; //!< Array of widgets to save into 00480 mutable Widget widget; //!< Widget created for this menu bar item 00481 const char *help; //!< Help id 00482 UINT32 icid; //!< Interface Component ID for customization 00483 Widget *pwidget; //!< If non-NULL, pointed-to value will be set to widget when created 00484 }; 00485 00486 #define MxMENU_SELECTED 0x0001 00487 #define MxMENU_ONE_OF_MANY 0x0002 //!< radio button gadget 00488 #define MxMENU_TOGGLE 0x0004 //!< single ToggleButtonGadget 00489 #define MxMENU_DISABLED 0x0008 //!< button is initially not "Sensitive" 00490 #define MxMENU_LABEL 0x0010 //!< Just a label 00491 #define MxMENU_FORCENAME 0x0020 //!< Set labelString resource to label value so doesn't read from resource file 00492 #define MxMENU_LABELMIUNICODE 0x0040 //!< Label is a pointer to a MIUNICODE string 00493 #define MxMENU_IGNORE 0x0080 //!< Ignore this item, don't put on menu 00494 #define MxMENU_NOGADGET 0x0100 //!< Don't use "gadget" for this item 00495 #define MxMENU_NOCENTERLABEL 0x0200 //!< Don't center if label 00496 #define MxMENU_PROGRAMMER 0x0400 //!< Item only appears on "Programmer" systems 00497 #define MxMENU_NOCHGCBDATA 0x0800 //!< Don't change callback_data for this item 00498 #define MxMENU_FREELABEL 0x1000 //!< Free label field after item created 00499 #define MxMENU_NOCUSTOMSUBMENU 0x2000 //!< Don't show submenu when customizing 00500 00501 00502 enum MxEDITMENUFLAGS { //! Flags for MxEditMenuCreate 00503 MxEDITMENUFLAG_None = 0x0000, 00504 MxEDITMENUFLAG_NoSearch = 0x0001, 00505 MxEDITMENUFLAG_NoReplace = 0x0002, 00506 MxEDITMENUFLAG_NoInsertFile = 0x0004, 00507 MxEDITMENUFLAG_AllowFormat = 0x0008 //!< For if widgit is WYSIWYG 00508 }; 00509 DEFINE_ENUM_OPERATORS(MxEDITMENUFLAGS); 00510 00511 /*----------------------------------------------------------------------------*/ 00512 /* Definitions used by MxCreateButtonRow */ 00513 /*----------------------------------------------------------------------------*/ 00514 00515 struct BUTTONITEM { 00516 char *label; //!< the label for the item 00517 UINT32 flags; //!< see below 00518 XtCallbackProc callback; //!< Callback function; NULL if none 00519 void *callback_data; //!< client_data for callback() if NULL passed to MxCreateButtonRow 00520 const char *help; //!< Help id 00521 void *userdata; //!< Used to set userData resource if NULL passed to MxCreateButtonRow 00522 mutable Widget pbwidget; //!< Widget created 00523 const char *IconName; //!< name of the bitmap fill pattern to use for the icon (16 chars max) 00524 const char *ClassName; //!< if not NULL, will override "class" passed to MxCreateIconButtonXXXX 00525 UINT32 icid; //!< Interface Component ID for customization 00526 const MIUNICODE *ToolTip; //!< ToolTip string for override 00527 Pixel BackgroundPixel; //!< Background color of icon if MxBUTTON_BACKGROUND_PIXEL is set 00528 Widget *pwidget; //!< If non-NULL, pointed-to value will be set to widget when created 00529 }; 00530 00531 #define MxBUTTON_DISABLED 0x0001 //!< Button is initially not "Sensitive" 00532 #define MxBUTTON_TOGGLE 0x0002 //!< Create toggle (radio or checkbox) button 00533 #define MxBUTTON_NOINDICATOR 0x0004 //!< Don't show indicator 00534 #define MxBUTTON_SELECTED 0x0008 //!< Toggle button initially selected 00535 #define MxBUTTON_ONE_OF_MANY 0x0010 //!< Use one-of-many indicator, enforce radio behavior 00536 #define MxBUTTON_DEFAULT 0x0020 //!< Button gets default border (Not implemented) 00537 #define MxBUTTON_MULTI_CLICK 0x0040 //!< Button allows multiple clicks in rapid succession 00538 #define MxBUTTON_IGNORE 0x0080 //!< Ignore this entry in the BUTTONITEM array 00539 #define MxBUTTON_PROGRAMMER 0x0100 //!< Don't display button unless in Programmer mode 00540 #define MxBUTTON_NOMANAGE 0x0200 //!< Don't manage button when created (RowColumn button-rows only) 00541 #define MxBUTTON_ICON_MENU 0x0400 //!< Create icon popup menu for button, callback_data points to MENUITEM* 00542 #define MxBUTTON_ICON_MENU_FILE 0x0800 //!< Create icon popup menu for button, callback_data points to menu file name 00543 #define MxBUTTON_BACKGROUND_PIXEL 0x1000 //!< Use BackgroundPixel from ButtonItem 00544 #define MxBUTTON_NOCUSTOMSUBMENU 0x2000 //!< Don't show submenu when customizing 00545 #define MxBUTTON_FORCENAME 0x4000 //!< Set labelString resource to label value so doesn't read from resource file 00546 #define MxBUTTON_LABELMIUNICODE 0x8000 //!< Label is a pointer to a MIUNICODE string (implies FORCENAME) 00547 00548 #define MxBUTTONROW_NoIcons 0x0001 //!< Don't create and use icons for this button row (passed in flags for MxCreateIconButtonRow() 00549 #define MxBUTTONROW_RowColumn 0x0002 //!< Use RowColumn for button-row instead of form 00550 00551 /*----------------------------------------------------------------------------*/ 00552 /* TABPAGE definitions */ 00553 /*----------------------------------------------------------------------------*/ 00554 00555 typedef void (*TABPAGEFUNC) (Widget, int, void*); 00556 00557 struct MxTABPAGEITEM { 00558 char *label; 00559 UINT32 flags; 00560 TABPAGEFUNC create; 00561 TABPAGEFUNC activate; 00562 TABPAGEFUNC deactivate; 00563 TABPAGEFUNC destroy; 00564 void *pageUserData; 00565 }; 00566 00567 #define MxTABPAGE_DISABLED 0x0001 //!< TabPage is initially disabled 00568 #define MxTABPAGE_FreeLabel 0x0002 //!< TabPage will free the allocated label 00569 #define MxTABPAGE_LabelUnicode 0x0004 //!< Label is pointer to Unicode string 00570 00571 /*----------------------------------------------------------------------------*/ 00572 /* Flags for MxCreateIcon... */ 00573 /*----------------------------------------------------------------------------*/ 00574 00575 #define MXICON_Stippled MICONFLAG_Stippled 00576 #define MXICON_DefaultBackground MICONFLAG_DefaultBackground 00577 #define MXICON_StippledSelected MICONFLAG_StippledSelected 00578 #define MXICON_Size16 MICONFLAG_Size16 00579 #define MXICON_Size32 MICONFLAG_Size32 00580 #define MXICON_NoDarkenSelected MICONFLAG_NoDarkenSelected 00581 00582 /* Flags for MxSelectIcon() */ 00583 00584 #define SELICON_Resize 0x01 //!< Resize icons smaller than specified minimum size 00585 00586 00587 /*----------------------------------------------------------------------------*/ 00588 /* Flags used by MxPopupGet... and MxCreateDouble() etc... */ 00589 /*----------------------------------------------------------------------------*/ 00590 00591 #define GET_NoMin (0x00000011) //! Don't use or show 00592 #define GET_NoMax (0x00000022) 00593 #define GET_NoRange (0x00000033) 00594 #define GET_NoDft (0x00000004) 00595 #define GET_InvValid (0x00000008) //! For GetString 00596 #define GET_AllowCancel (0x00000001) //! For MxPopupYNC 00597 #define GET_AllowYesAll (0x00000002) //! For MxPopupYNC 00598 #define GET_RastValRGB16UINT2 (0x00000008) //! For MxPromptRastValCreate 00599 #define GET_RangeMask (0xFFFFFFFC) 00600 00601 #define GET_NoShowMin (0x00000010) //! Use, but don't show 00602 #define GET_NoShowMax (0x00000020) 00603 #define GET_NoShowRange (0x00000030) //! Obsolete 00604 #define GET_ShowUnitLabel (0x00000040) //! Show "unit" label 00605 #define GET_ShowRange (0x00000080) //! Set if want range displayed 00606 00607 #define GET_NoCancel (0x00000100) 00608 #define GET_LabelTop (0x00000200) //! label on top of text widget 00609 #define GET_DftRet (0x00000400) //! retval contains default 00610 #define GET_AddOne (0x00000800) //! Add 1 before showing dft/range 00611 00612 #define GET_DegsNS (0x00000000) //! For Lat/Lon prompt (yes, this is zero) 00613 #define GET_DegsEW (0x00001000) //! For Lat/Lon prompt 00614 #define GET_ToUpper (0x00002000) //! Convert characters to upper case as entered 00615 #define GET_DetectNULL (0x00004000) //! Treat 7FFF as empty string (for databases) 00616 #define GET_BlankZero (0x00008000) //! Show 0 values as blank 00617 #define GET_RightJustify (0x00010000) //! Right justify within field 00618 #define GET_OutputOnly (0x00020000) //! Output-only prompt 00619 #define GET_PromptGiven (0x00040000) //! For DBQueryEdit Only 00620 #define GET_DegsNoDir (0x00080000) //! For Lat/Lon "range" prompt, don't show direction 00621 #define GET_NoManage (0x00100000) 00622 #define GET_NoForm (0x00200000) //! For MxCreatePrompt... 00623 #define GET_PopupForceStr (0x00400000) //! In MxPopup... use specified string instead of doing lookup 00624 #define GET_HasScale (0x00800000) //! Put "Scale" widget in prompt 00625 #define GET_Degs360EW (0x01000000) //! For Longitude allow entry/display of W360 to E360 00626 #define GET_Unicode (0x02000000) //! Make string widget Unicode 00627 #define GET_PromptUnicode (0x04000000) //! Prompt string is really (MIUNICODE*) 00628 #define GET_LeftJustify (0x08000000) //! Left justify numeric value within field 00629 #define GET_UseLogScale (0x20000000) //! Set if want logarithmic scale, must set GET_HasScale also 00630 #define GET_Password (0x40000000) //! Show "*"'s in text widget 00631 00632 #define MxPromptRastValCR_ValueChanged 0x0001 00633 00634 #define MxPromptCR_ValueChanged 0x00000001 //!< User has changed prompt value 00635 #define MxPromptCR_ValueChangeDrag 0x00000002 //!< User dragging prompt scale slider 00636 #define MxPromptCR_Activate 0x00000004 //!< User pressed <Enter> while in prompt 00637 00638 struct MxPromptCallbackStruct { 00639 UINT32 reason; //!< Callback reason 00640 Widget prompt; //!< Prompt widget 00641 void *value; //!< Pointer to prompt value 00642 }; 00643 00644 typedef void (*MxPromptCallbackFunc)(MxPromptCallbackStruct*, void*); 00645 00646 #define MXPRMTCB_ADD(_clsname) inline void MxPromptCallbackAdd (Widget w, void (*f)(MxPromptCallbackStruct*,_clsname*), UINT32 flags = MxPromptCR_ValueChanged) const { MxPromptAddCallback(w,reinterpret_cast<MxPromptCallbackFunc>(f),(void*)this,(flags)); } 00647 #define MXPRMTCB_REMOVE(_clsname) inline void MxPromptCallbackRemove (Widget w, void (*f)(MxPromptCallbackStruct*,_clsname*), UINT32 flags) const { MxPromptRemoveCallback(w,reinterpret_cast<MxPromptCallbackFunc>(f),(void*)this,(flags)); } 00648 00649 /* Prompt field types */ 00650 #define MXPROMPT_ASTRING 0 //!< ASCII string 00651 #define MXPROMPT_USTRING 1 //!< Unicode string 00652 #define MXPROMPT_ACHAR 2 //!< Single ASCII character 00653 #define MXPROMPT_UCHAR 3 //!< Single Unicode character 00654 #define MXPROMPT_DOUBLE 10 //!< 64-bit floating-point 00655 #define MXPROMPT_FLOAT 11 //!< 32-bit floating-point 00656 #define MXPROMPT_UINT32 12 //!< Unsigned 32-bit number 00657 #define MXPROMPT_INT32 13 //!< Signed 32-bit number 00658 #define MXPROMPT_UINT16 14 //!< Unsigned 16-bit number 00659 #define MXPROMPT_INT16 15 //!< Signed 16-bit number 00660 #define MXPROMPT_UINT8 16 //!< Unsigned 8-bit number 00661 #define MXPROMPT_INT8 17 //!< Signed 8-bit number 00662 #define MXPROMPT_LATLON 18 //!< Latitude or Longitude stored as double 00663 00664 /*----------------------------------------------------------------------------*/ 00665 /* Flags for MxGetPattern */ 00666 /*----------------------------------------------------------------------------*/ 00667 00668 enum GETPATTERNFLAGS { 00669 GETPATTERN_None = 0x00, 00670 GETPATTERN_NewOK = 0x01, //!< Allow new pattern to be created 00671 GETPATTERN_IconMode = 0x02, //!< Don't replicate bitmap samples 00672 GETPATTERN_OnlyOne = 0x04, //!< Only allow one icon in the user set 00673 GETPATTERN_TitleEdit = 0x08 //!< Use "edit" title instead of "select" title 00674 }; 00675 DEFINE_ENUM_OPERATORS(GETPATTERNFLAGS); 00676 00677 /*----------------------------------------------------------------------------*/ 00678 /* Flags for MxCreateRastTypeOptionMenu */ 00679 /*----------------------------------------------------------------------------*/ 00680 00681 // These must be same as RVC::IMAGE::CELLTYPE 00682 #define RASTYPE_binary 0x00000001 //!< one bit (binary) 00683 #define RASTYPE_1bit 0x00000001 //!< one bit (binary) 00684 #define RASTYPE_4bit 0x00000002 //!< four bit integer 00685 #define RASTYPE_unsigned8 0x00000004 //!< unsigned 8 bit integer 00686 #define RASTYPE_unsigned32 0x00000008 //!< 32 bit unsigned integer 00687 #define RASTYPE_unsigned16 0x00000010 //!< unsigned 16 bit integer 00688 #define RASTYPE_signed8 0x00000040 //!< signed 8 bit integer 00689 #define RASTYPE_signed16 0x00000080 //!< signed 16 bit integer 00690 #define RASTYPE_signed32 0x00000100 //!< 32 bit signed integer 00691 #define RASTYPE_float32 0x00000400 //!< 32 bit floating point 00692 #define RASTYPE_float64 0x00000800 //!< 64 bit floating point 00693 #define RASTYPE_complexri 0x00004000 //!< complex real/imaginary 00694 #define RASTYPE_complexmp 0x00008000 //!< complex magnitude/phase 00695 #define RASTYPE_rgb_packed16 0x00010000 //!< 16 bit packed rgb 00696 #define RASTYPE_bgr_packed16 0x00020000 //!< 16 bit packed bgr 00697 #define RASTYPE_rgb_packed24 0x00040000 //!< 24 bit packed rgb 00698 #define RASTYPE_bgr_packed24 0x00080000 //!< 24 bit packed bgr 00699 #define RASTYPE_all 0x000FFFFF //!< ALL datatypes 00700 #define RASTYPE_no_rgb ~(RASTYPE_rgb_packed16|RASTYPE_bgr_packed16|RASTYPE_rgb_packed24|RASTYPE_bgr_packed24) 00701 00702 #define RASTYPE_no_complex ~(RASTYPE_complexri|RASTYPE_complexmp) 00703 #define RASTYPE_no_bin ~(RASTYPE_binary) 00704 #define RASTYPE_no_2 ~(0) 00705 #define RASTYPE_no_4 ~(RASTYPE_4bit) 00706 #define RASTYPE_no_lessthan8 ~(RASTYPE_binary|RASTYPE_4bit) 00707 #define RASTYPE_signed (RASTYPE_signed8|RASTYPE_signed16|RASTYPE_signed32) 00708 #define RASTYPE_unsigned (RASTYPE_unsigned8|RASTYPE_unsigned16|RASTYPE_unsigned32) 00709 00710 #define RASTYPE_float (RASTYPE_float32| RASTYPE_float64) 00711 #define RASTYPE_dimmed 0x00100000 //!< dim non_selected types 00712 #define RASTYPE_omit 0x00200000 //!< omit non_selected types 00713 #define RASTYPE_none_dimmed 0x000FFFFF //!< do not dim any of the items 00714 00715 /*----------------------------------------------------------------------------*/ 00716 /* Values by MxPositionWindowRel */ 00717 /*----------------------------------------------------------------------------*/ 00718 00719 enum MxRELPOSN { 00720 MxRELPOSN_Default = 0, 00721 MxRELPOSN_AutoLeftRight = 1, 00722 MxRELPOSN_RightTop = 2, 00723 MxRELPOSN_LeftTop = 3, 00724 MxRELPOSN_RightCenter = 4, 00725 MxRELPOSN_LeftCenter = 5, 00726 MxRELPOSN_RightBottom = 6, 00727 MxRELPOSN_LeftBottom = 7, 00728 MxRELPOSN_TopLeft = 8, 00729 MxRELPOSN_BottomLeft = 9, 00730 MxRELPOSN_TopCenter = 10, 00731 MxRELPOSN_BottomCenter = 11, 00732 MxRELPOSN_TopRight = 12, 00733 MxRELPOSN_BottomRight = 13, 00734 MxRELPOSN_MatchBottom = 14, 00735 MxRELPOSN_MatchTop = 15, 00736 MxRELPOSN_MatchLeft = 16, 00737 MxRELPOSN_MatchRight = 17 00738 }; 00739 00740 /*----------------------------------------------------------------------------*/ 00741 /* Values used by MxLockWindowSize() */ 00742 /*----------------------------------------------------------------------------*/ 00743 00744 #define MxLOCKSIZE_MinHeight 0x1 00745 #define MxLOCKSIZE_MinWidth 0x2 00746 #define MxLOCKSIZE_MaxHeight 0x4 00747 #define MxLOCKSIZE_MaxWidth 0x8 00748 #define MxLOCKSIZE_Min (MxLOCKSIZE_MinHeight | MxLOCKSIZE_MinWidth) 00749 #define MxLOCKSIZE_Max (MxLOCKSIZE_MaxHeight | MxLOCKSIZE_MaxWidth) 00750 #define MxLOCKSIZE_MinMax (MxLOCKSIZE_Min | MxLOCKSIZE_Max) 00751 00752 /*----------------------------------------------------------------------------*/ 00753 /* Values used by MxCreatePathSelector */ 00754 /*----------------------------------------------------------------------------*/ 00755 00756 #define MxPATHSEL_AllowFiles 0x0002 //!< Allow files to be specified in path 00757 00758 /*----------------------------------------------------------------------------*/ 00759 /* Definitions used by MxEditStyle...() */ 00760 /*----------------------------------------------------------------------------*/ 00761 00762 #define EDITSTYLE_Default 0x00000001 //!< Only editing the "default" style 00763 #define EDITSTYLE_CAD 0x00000002 //!< Editing CAD styles 00764 #define EDITSTYLE_OKCancel 0x00000004 //!< Add OK/Cancel butons 00765 #define EDITSTYLE_SingleType 0x00000008 //!< Only allow editing of specified style type 00766 #define EDITSTYLE_NoRenameStyles 0x00000010 //!< Don't allow styles to be renamed 00767 #define EDITSTYLE_NoNewDelStyles 0x00000020 //!< Don't allow styles to be created or deleted 00768 #define EDITSTYLE_NoElemHeight 0x00000040 //!< Don't include "Use element height" togglebutton 00769 #define EDITSTYLE_AllowTextHTML 0x00000080 //!< Allow HTML text formatting options 00770 #define EDITSTYLE_AllowTextSpecialFormat 0x00000100 //!< Allow "Special Format" options for text styles 00771 #define EDITSTYLE_NoScaleToNone 0x00000200 //!< Scaling to "none" not allowed 00772 #define EDITSTYLE_NoTypeButtons 0x00000400 //!< Don't include buttons for switching style type 00773 #define EDITSTYLE_NoScaleToLayout 0x00000800 //!< Don't allow scaling to "layout" 00774 #define EDITSTYLE_NoScaleOptions 0x00001000 //!< Don't give user options for scale-to 00775 #define EDITSTYLE_NoSymbolNone 0x00002000 //!< Don't allow "no symbol" option 00776 #define EDITSTYLE_AllowTextVertAlignment 0x00004000 //!< Add option for text vertical alignment 00777 #define EDITSTYLE_SymbolForceSquare 0x00008000 //!< Force symbol "width" to match "height" 00778 #define EDITSTYLE_NoSample 0x00010000 //!< No not show "sample" 00779 #define EDITSTYLE_NoWordWrap 0x00020000 //!< Disallow setting word wrap 00780 #define EDITSTYLE_ForceWordWrap 0x00040000 //!< Force word wrap 00781 #define EDITSTYLE_NoBlockWidth 0x00080000 //!< Don't allow setting block width 00782 #define EDITSTYLE_NoAdvanced 0x00100000 //!< Don't allow advanced button 00783 00784 /*----------------------------------------------------------------------------*/ 00785 /* Values used by MxSetupXYDigRefInfo */ 00786 /*----------------------------------------------------------------------------*/ 00787 00788 #define MxXYD_NoChangeProj 0x00000001 00789 00790 /*----------------------------------------------------------------------------*/ 00791 /* Class for double-click handling */ 00792 /*----------------------------------------------------------------------------*/ 00793 00794 class DOUBLECLICKTEST { 00795 public: 00796 00797 //! Constructor 00798 DOUBLECLICKTEST ( 00799 ): 00800 m_State(0), 00801 m_Interval(400), 00802 m_StartTime(0) 00803 { } 00804 00805 //! Destructor 00806 ~DOUBLECLICKTEST ( 00807 ) { } 00808 00809 //! Reset to initial state 00810 void Reset ( 00811 ) { m_State = 0; } 00812 00813 //! Set interval 00814 void SetInterval ( 00815 INT32 Interval //!< Interval in milliseconds 00816 ) { m_Interval = Interval; } 00817 00818 //! Test if event results in double-click 00819 bool TestEvent ( 00820 const XEvent *event //!< Event to check 00821 ); 00822 00823 private: 00824 #ifndef GENERATING_DOXYGEN_OUTPUT 00825 UINT8 m_State; //!< State for double-click testing 00826 INT32 m_Interval; //!< Interval in milliseconds 00827 UINT32 m_StartTime; //!< Starting event time 00828 #endif // GENERATING_DOXYGEN_OUTPUT 00829 }; 00830 00831 00832 /*----------------------------------------------------------------------------*/ 00833 /* Misc constants */ 00834 /*----------------------------------------------------------------------------*/ 00835 00836 #define MxCOLORSEL_EditTranspPct 0x0001 //!< Allow transparency percentage to be set in MxColorSel... 00837 00838 #if !defined(DEPRECATE_GROUPKEY) && !defined(DEPRECATE_OLDHELP) 00839 #define MxYNC_HasCancel GET_AllowCancel 00840 #endif 00841 00842 #define MxBCOL_ALIGN_BEGINNING 1 00843 00844 #define MxTEXTSTYLEFORM_NoColorButton 0x00000001 00845 00846 /*----------------------------------------------------------------------------*/ 00847 /* Function prototypes (keep in alphabetical order!) */ 00848 /*----------------------------------------------------------------------------*/ 00849 00850 //!:Associate with "MsysApp Functions" 00851 //!\addtogroup MsysApp MsysApp Functions 00852 //!@{ 00853 00854 extern "C" { 00855 00856 //! Get X Application Context. 00857 XtAppContext MsysAppGetXContext (); 00858 00859 //! Get X Display pointer. 00860 Display* MsysAppGetXDisplay (); 00861 00862 //! Set X Display pointer and application context. 00863 void MsysAppSetXDisplayContext ( 00864 Display *xdisplay, //!< X Display pointer 00865 XtAppContext xappcontext //!< Xt application context 00866 ); 00867 00868 //!@} 00869 //!:Associate with "X Functions" 00870 //!\addtogroup X11 X11 Functions 00871 //!@{ 00872 00873 /* Generic callbacks */ 00874 00875 //! The XmNhelpCallback to any widget that you want to give help to. 00876 //! The callback data should be a string containing the refcode of the 00877 //! help entry. If the name of the widget is the same as it's refcode, 00878 //! you can just pass null for the callback data. 00879 void MxcbDisplayHelp ( 00880 Widget, //!< The widget to display help for 00881 void*, 00882 void* 00883 ); 00884 00885 //! Callback to place dialog on center of primary monitor/screen. 00886 //! Use for mapCallback. 00887 void MxcbMapToCenter ( 00888 Widget, 00889 void*, 00890 void* 00891 ); 00892 00893 //! OptionMenu callback for setting UINT8 value. 00894 //! The userdata parameter specified in MxCreateOptionMenuExt() must be a pointer to the UINT8 variable or member to be set. 00895 //! The MENUITEM.callback_data will contain the values to be set in the specified variable. 00896 void MxcbOptionUBYTE ( 00897 Widget w, 00898 void *voption, 00899 void* 00900 ); 00901 00902 //! OptionMenu callback for setting UINT32 value. 00903 //! The userdata parameter specified in MxCreateOptionMenuExt() must be a pointer to the UINT32 variable or member to be set. 00904 //! The MENUITEM.callback_data will contain the values to be set in the specified variable. 00905 void MxcbOptionULONG ( 00906 Widget w, 00907 void *voption, 00908 void* 00909 ); 00910 00911 //! OptionMenu callback for setting UINT16 value. 00912 //! The userdata parameter specified in MxCreateOptionMenuExt() must be a pointer to the UINT16 variable or member to be set. 00913 //! The MENUITEM.callback_data will contain the values to be set in the specified variable. 00914 void MxcbOptionUWORD ( 00915 Widget w, 00916 void *voption, 00917 void* 00918 ); 00919 00920 //! Set the exit process 00921 void MxcbSetExit ( 00922 Widget, 00923 void*, 00924 void* 00925 ); 00926 00927 //! Callback for toggling bool variable/member. 00928 //! The callback data must be a pointer to the 'bool' value to toggle. 00929 void MxcbToggleBool ( 00930 Widget, 00931 void *vvalue, 00932 XmToggleButtonCallbackStruct *cbs 00933 ); 00934 00935 //! Callback for toggling UINT8 variable/member. 00936 //! The callback data must be a pointer to the UINT8 value to toggle. 00937 void MxcbToggleUBYTE ( 00938 Widget, 00939 void *vvalue, 00940 XmToggleButtonCallbackStruct *cbs 00941 ); 00942 00943 //! Set value in UINT8 base on radio ToggleButton setting. 00944 void MxcbToggleSetUBYTE ( 00945 Widget w, 00946 void *voption, 00947 XmToggleButtonCallbackStruct *cbs 00948 ); 00949 00950 #define MxcbOptionUINT8 MxcbOptionUBYTE 00951 #define MxcbOptionUINT16 MxcbOptionUWORD 00952 #define MxcbOptionUINT32 MxcbOptionULONG 00953 #define MxcbToggleUINT8 MxcbToggleUBYTE 00954 #define MxcbToggleSetUINT8 MxcbToggleSetUBYTE 00955 00956 //! Main entry point for Edit / Attribute Database. 00957 int Main_DatabaseEditor ( 00958 Widget parent //!< Parent widget 00959 ); 00960 00961 namespace RVC { 00962 //! Create a georeference option menu. 00963 //! @return the option menu 00964 MDLGPARENT OmGeorefCreate ( 00965 MDLGPARENT dlgparent, 00966 const RVC::OBJITEM& ObjItem, 00967 RVC::OBJECTNAME& GeorefName, 00968 Arg *arglist, 00969 int argcount 00970 ); 00971 00972 ERRVALUE OmGeorefUpdate ( 00973 MDLGPARENT GeorefOM, //!< Previously-created georeference OptionMenu 00974 const RVC::OBJITEM& ObjItem, 00975 RVC::OBJECTNAME& GeorefName 00976 ); 00977 00978 } //! End of RVC namespace 00979 00980 //! Dialog to ask user to select a port. 00981 //! This function will bring up a modal dialog asking the user to 00982 //! select a port. port_type should be able to hold a 20 byte 00983 //! string. port_name can be any length, but if PORTTYPE_File 00984 //! is allowed, 256 is recommended. If valid_types is 0, all 00985 //! available port types are valid. If a device can only talk 00986 //! to LPT or COM, set valid_types to PORTTYPE_LPT|PORTTYPE_COM. 00987 void MpSelectPort ( 00988 Widget parent, //!< Parent widget 00989 char* type, //!< Port type (string) 00990 char* name, //!< Port name 00991 char* extn, //!< Dft extension to use if going to file 00992 int maxlen, //!< Max len for name to return 00993 UINT32 validtypes //!< Bit mask of valid types 00994 ); 00995 00996 //! Handle f.delete from TWM or f.kill from MWM. 00997 //! This function should be called after any dialog is created. It will 00998 //! add support for the "Close" item on the MWM menu (f.kill) and the 00999 //! f.delete (Be Polite) in TWM. It uses the standard WM_DELETE_WINDOW 01000 //! protocol so anything that sends WM_DELETE_WINDOW will be trapped by 01001 //! this callback. It is also assumed that the resource deleteResponse 01002 //! has been set to XmDO_NOTHING. If you do not pass a shell widget, the 01003 //! widget hierarchy of the widget you do pass will be searched for the 01004 //! nearest shell widget. 01005 //! If you pass NULL for the callback function, a static local callback 01006 //! which calls XBeep() will be added for you. 01007 //! See mxadwcb.c for more information about what is going on. 01008 void MxAddDeleteWindowCallback ( 01009 Widget widget, 01010 XtCallbackProc cbproc, 01011 void* cbdata 01012 ); 01013 01014 //! Close TNT Advisor dialog if it is currently open. 01015 //! This will close the TNT Advisor dialog. It must be called when the user-invoked 01016 //! step resulting in the advisor being opened has completed. 01017 void MxAdvisorClose ( 01018 ); 01019 01020 //! Open TNT Advisor dialog and display specified message. 01021 //! This function will open the advisor dialog and display the specified message if the appropriate 01022 //! number of intervals (default is 5) have elapsed since the last time this particular message was 01023 //! requested. Each message may use its own interval by adding a <msgkey>Freq=### to the [advisor] 01024 //! section of the tntmips.ini file. If the advisor window is already open because of a previous 01025 //! message the message will be updated automatically. 01026 //! The [advisor] message class will be used for retrieving the message. 01027 //! If you call this function, you MUST call MxAdvisorClose() whener the entire sequence of steps 01028 //! resulting from the last user action is complete. In other words, do not pop the advisor window 01029 //! in and our for each individual step. 01030 void MxAdvisorOpen ( 01031 Widget parent, //!< Parent widget, will use MxTopLevel() if NULL 01032 const MISTRING& msg, //!< Message to show in window 01033 const char* IniKey //!< Ini key for determining whether to show 01034 ); 01035 01036 //! Make labels a uniform width and right justify them. 01037 //! This routine takes an array of widgets and makes them all as wide as the widest one in the list. 01038 //! This forces XmALIGNMENT_CENTER for buttons and XmALIGNMENT_END for everything else. 01039 void MxAlignLabels ( 01040 Widget* widgets, //!< Array of widgets to align 01041 int num //!< Number of widgets to align 01042 ); 01043 01044 //! Make specified widgets the same width, adjust alignment if requested. 01045 //! This routine takes an array of widgets and makes them all as wide as the widest one in the list. 01046 //! Flags: 01047 //! \li 1 = Force XmALIGNMENT_CENTER for buttons and XmALIGNMENT_END for everything else 01048 //! \li 2 = Force XmALIGNMENT_BEGINNING for everything 01049 void MxAlignWidgets ( 01050 Widget* widgets, //!< Array of widgets to align 01051 int num, //!< Number of widgets to align 01052 UINT32 flags //!< Flags 01053 ); 01054 01055 01056 #define MxANGLECONTROL_Quadrant1 0x00000001 01057 #define MxANGLECONTROL_Quadrant2 0x00000002 01058 #define MxANGLECONTROL_Quadrant3 0x00000004 01059 #define MxANGLECONTROL_Quadrant4 0x00000008 01060 #define MxANGLECONTROL_FullCircle 0x0000000F //!< All of the above 01061 #define MxANGLECONTROL_ZeroAtTop 0x00000010 01062 01063 //! Create a graphical control for entering an angle. 01064 //! 01065 //! Creates a drawing area which will allow the user to 01066 //! graphically enter an angle. Note that no numeric prompt 01067 //! is created. If you want one, create it yourself, then 01068 //! call MxAngleControlSetPrompt(). 01069 //! By default, the control allows for 360 degrees. If you want 01070 //! to limit it to one or more quadrants, use one or more of the 01071 //! following flags ORd together. 01072 //! 01073 //! \li MxANGLECONTROL_Quadrant1 Upper Right 01074 //! \li MxANGLECONTROL_Quadrant2 Upper Left 01075 //! \li MxANGLECONTROL_Quadrant3 Lower Left 01076 //! \li MxANGLECONTROL_Quadrant4 Lower Right 01077 //! 01078 //! There's no guarentee what you'll get if you give three quadrants 01079 //! or two which are diagonaly opposite. 01080 //! 01081 //! If you intend to add a numeric prompt, you can also pass the 01082 //! following flag to the create function. 01083 //! 01084 //! \li MxANGLECONTROL_ZeroAtTop 01085 //! 01086 //! The default is for zero to be along the right X axis and increase 01087 //! counter-clockwise. If you give the ZeroAtTop flag, then zero is 01088 //! at the top (go figure!) and increases clockwise. 01089 //! 01090 Widget MxAngleControlCreate ( 01091 Widget parent, 01092 double* pValue, //!< Pointer to angle to modify (radians) 01093 int radius, //!< Radius of control 01094 UINT32 flags, //!< 01095 Arg *callerargs, 01096 int numargs 01097 ); 01098 01099 01100 //! Set the numeric prompt for an angular prompt (graphic control). 01101 //! 01102 //! MxAngleControlCreate only creates the graphic control for setting 01103 //! an angle. If you also want a numeric prompt to reflect the angle, 01104 //! you can create the prompt yourself, placing it wherever you want 01105 //! then call this function. 01106 ERRVALUE MxAngleControlSetPrompt ( 01107 Widget control, 01108 Widget prompt 01109 ); 01110 01111 //! Add a callback to be called when the angle is changed. 01112 ERRVALUE MxAngleControlAddCallback ( 01113 Widget control, 01114 McbCallbackFunc cbfunc, 01115 void* cbdata 01116 ); 01117 01118 //! Remove a callback to be called when the angle is changed. 01119 ERRVALUE MxAngleControlRemoveCallback ( 01120 Widget control, 01121 McbCallbackFunc cbfunc, 01122 void* cbdata 01123 ); 01124 01125 //! Inform the AngleControl that the angle it's representing has changed. 01126 ERRVALUE MxAngleControlUpdate ( 01127 Widget control, 01128 double value 01129 ); 01130 01131 //! Set the angle. 01132 //! Note: Won't call the callbacks 01133 ERRVALUE MxAngleControlSetValue ( 01134 Widget control, 01135 double value 01136 ); 01137 01138 //! Get the current angle of an Angle Control 01139 double MxAngleControlGetValue ( 01140 Widget control, 01141 double value 01142 ); 01143 01144 //! Create "application shell". 01145 //! 01146 //! @return unrealized topLevelShell widget 01147 Widget MxAppShellCreate ( 01148 const char *posnkey, //!< Name of shell (used for window positioning) NULL ok 01149 Arg* arg, //!< Argument list 01150 int numargs //!< Number of arguments 01151 ); 01152 01153 //! Assign cursor to a window. 01154 //! 01155 //! @return 0 01156 void MxAssignCursor ( 01157 Display* display, 01158 Window window, 01159 int cursor 01160 ); 01161 01162 //! Creates a file manager for .atl files. 01163 //! 01164 //! @return 0 01165 int MxATLFileManager ( 01166 Widget parent, //!< Parent widget 01167 MIUNICODE *filename //!< atl filename 01168 ); 01169 01170 //! Help users assemble their TNTatlas for CD-ROM mastering. 01171 //! 01172 //! @return 0 01173 int MxAtlasAssemblyWizard ( 01174 Widget parent 01175 ); 01176 01177 01178 //! Deternime number of items in BUTTONITEM array including terminator. 01179 //! 01180 //! @return number of items 01181 int MxButtonGetNumItems ( 01182 const BUTTONITEM *items //!< BUTTONITEM array 01183 ); 01184 01185 //! Retry/Cancel dialog if lock change is not possible. 01186 //! 01187 //! This function will try to change the lock on the file using 01188 //! MfChangeFileLock(). If MfChangeFileLock() returns R_CantGetReadLock, 01189 //! R_CantGetWriteLock or R_FileReadOnly the Retry/Cancel dialog is 01190 //! presented and a message placed on it referring to the problem. The 01191 //! function will automaticalley try to relock the file at specific 01192 //! intervals until it succeeds or the retry interval has elapsed. For 01193 //! batch routines, the dialog appears anyway, but the retry interval 01194 //! is much longer. 01195 //! Flag values: 01196 //! \li\b RVCFILE_ReadLock Lock the file for reading 01197 //! \li\b RVCFILE_WriteLock Lock the file for writing 01198 //! \li\b RVCFILE_WriteLockAttempt Lock the file for write access if possible, otherwise lock for read 01199 //! \li\b RVCFILE_SharedLock Lock the file for shared access, not implemented yet 01200 int MxChangeFileLock ( 01201 Widget parent, 01202 int file, 01203 UINT32 flags 01204 ); 01205 01206 #ifndef NO_DEPRECATED 01207 //! Checks to see if disk space is available. 01208 //! 01209 //! @return warning if not enough space, 0 if enough space, or space available 01210 DEPRECATED int MxCheckDiskSpace ( 01211 MDLGPARENT parent, 01212 const FILEPATH& filename, //!< File name 01213 INT64 SpaceNeeded //!< Space needed 01214 ); 01215 #endif 01216 01217 // Erase specified widget, optionally generating exposure notification. 01218 void MxClearWidget ( 01219 Widget widget, 01220 bool sendexposure = true 01221 ); 01222 01223 //! Add callbacks to edit menu items after menu has been created. 01224 //! Same as old MxEditMenuAddCallbacks, but don't have to have the handle. 01225 //! If the text widget is in a dialog that already has an edit menu 01226 //! registered by calling MxEditMenuAddCallbacks(handle, NULL), it will 01227 //! setup callbacks for the text widget to make it handle the edit menu. 01228 //! If there is no edit menu in the dialog, it silently ignores you. 01229 void MxClipboardRegisterTextWidget ( 01230 Widget widget //!< An XeText widget 01231 ); 01232 01233 //! Create color selection form to insert into dialog. 01234 //! 01235 //! @return Form widget containing palette, Color... button and sample area 01236 //! Flags: 01237 //! \li\b MxCOLORSEL_EditTranspPct Allow transparency percentage to be set by user 01238 Widget MxColorSelCreate ( 01239 Widget parent, //!< Parent widget 01240 COLOR* color, //!< Color value to change when user makes a selection 01241 int size, //!< Size of palette boxes (0 for default of 8) 01242 UINT32 flags, //!< Flags 01243 Arg* arg,