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