00001
00156 #if defined (MAC_OSX) && defined(__x86_64__)
00157 #define USE_XFT 1
00158 #endif
00159
00160 #if !defined(INC_MI32_XDEFNS_H) && (!defined(WIN32_NATIVE) || defined(GENERATING_DOXYGEN_OUTPUT))
00161
00162 #define INC_MI32_XDEFNS_H
00163
00164 #define NoXmMessageDialogTypes // So don't allow XmDIALOG_ERROR, WARNING, etc
00165
00166 #ifndef INC_MI32_STDDEFNS_H
00167 #include <mi32/stddefns.h>
00168 #endif
00169
00170 #ifndef _XLIB_H_
00171 #include <X11/Xlib.h>
00172 #endif
00173
00174 #ifndef _XUTIL_H
00175 #include <X11/Xutil.h>
00176 #endif
00177
00178 #ifdef EDITRES
00179 #include <X11/Xmu/Editres.h>
00180 #endif
00181
00182 #ifndef _Xm_h
00183 #include <Xm/Xm.h>
00184 #endif
00185
00186 #ifndef _XmToggle_h
00187 #include <Xm/ToggleB.h>
00188 #endif
00189
00190 #ifndef INC_MI32_DISPINFO_H
00191 #include <mi32/dispinfo.h>
00192 #endif
00193
00194 #ifndef INC_MI32_ELEMTYPE_H
00195 #include <mi32/elemtype.h>
00196 #endif
00197
00198 #ifndef INC_MI32_COLOR_H
00199 #include <mi32/color.h>
00200 #endif
00201
00202 #ifndef INC_MI32_TEXTBASE_H
00203 #include <mi32/textbase.h>
00204 #endif
00205
00206 #ifndef INC_MI32_STRTODEG_H
00207 #include <mi32/strtodeg.h>
00208 #endif
00209
00210 #ifndef INC_MI32_MSYS_H
00211 #include <mi32/msys.h>
00212 #endif
00213
00214 #ifndef INC_RVC_OBJTYPE_H
00215 #include <rvc/objtype.h>
00216 #endif
00217
00218 #ifndef INC_MI32_MG2ENUMS_H
00219 #include <mi32/mg2enums.h>
00220 #endif
00221
00222 #ifndef INC_MI32_ICONID_H
00223 #include <mi32/iconid.h>
00224 #endif
00225
00226 #ifndef INC_MI32_XTABPAGE_H
00227 #include <mi32/xtabpage.h>
00228 #endif
00229
00230 #ifndef INC_MI32_XBASE_H
00231 #include <mi32/xbase.h>
00232 #endif
00233
00234 #ifndef INC_MI32_XTARGS_H
00235 #include <mi32/xtargs.h>
00236 #endif
00237
00238 #ifndef INC_MI32_DELEGATE_H
00239 #include <mi32/delegate.h>
00240 #endif
00241
00242
00243 #ifdef index
00244 #undef index
00245 #endif
00246
00247
00248 #ifndef GENERATING_DOXYGEN_OUTPUT
00249
00250 class REGION2D;
00251 struct MICONSTRUCT;
00252 struct RGNELEMLIST;
00253 struct TEXTSTYLE;
00254 struct MTIMER;
00255 class TRANS2D_MAPGEN;
00256 struct UNITCONV;
00257 struct TEXTMETRICS;
00258 class FILEPATH;
00259 namespace MGD {
00260 class DEVICE;
00261 class DEVICE_BINARY;
00262 }
00263 namespace RVC {
00264 class OBJITEM;
00265 class OBJITEMLIST;
00266 class RASTER;
00267 class STYLE;
00268 class STYLEPATTERN_BITMAP;
00269 }
00270 namespace SPATREF {
00271 class COORDREFSYS;
00272 }
00273 #endif
00274
00275
00276
00277
00278
00279
00280 #define XtSetArgI(arg,c,n,v) ((void)(arg[c].name=(char*)(n),arg[c].value=(XtArgVal)(v),c++))
00281
00282
00283
00284
00285 #define MxGetUserData(w,p) { Arg _mxgetuserdataarg[sizeof(*p)-sizeof(void*)+1]; XtSetArg(_mxgetuserdataarg[0],XmNuserData,p); XtGetValues(w,_mxgetuserdataarg,1); }
00286
00287
00288 #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); }
00289 #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); }
00290 #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); }
00291 #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); }
00292 #define MXXTTO_ADD(_clsname) inline XtIntervalId MxXtTimeOutAdd (Widget, unsigned long delay, void (*f)(_clsname*,XtIntervalId*)) { return(XtAppAddTimeOut(MsysAppGetXContext(),(delay),reinterpret_cast<XtTimerCallbackProc>(f),this)); }
00293
00294
00295
00296
00297 extern "C" {
00298
00299 extern int _MxShadowThickness;
00300 extern int _MxSpaceNarrow;
00301 extern int _MxSpaceNormal;
00302 extern int _MxSpaceWide;
00303
00304 }
00305
00306
00307
00308
00309
00310 #define EDITCOLOR_AllowTransp 0x0002
00311 #define EDITCOLOR_AllowTransPct 0x0004
00312
00313 struct EDITCOLORINFO {
00314 COLOR color;
00315 Pixel pixel;
00316 UINT8 CanChangeColor;
00317 UINT8 AllowTransparent;
00318 UINT8 DefaultSelected;
00319 UINT8 spare;
00320 char *name;
00321 };
00322
00323
00324
00325
00326
00327
00328 struct MENUITEM {
00329 mutable char *label;
00330 unsigned long flags;
00331 XtCallbackProc callback;
00332 void *callback_data;
00333 const char *help;
00334 const MENUITEM *subitems;
00335 void *userdata;
00336 UINT32 icid;
00337 mutable Widget widget;
00338 Widget *pwidget;
00339 };
00340
00341 struct MENUBARITEM {
00342 mutable char *label;
00343 const MENUITEM *items;
00344 Widget *widget_list;
00345 mutable Widget widget;
00346 const char *help;
00347 UINT32 icid;
00348 Widget *pwidget;
00349 };
00350
00351 #define MxMENU_SELECTED 0x0001
00352 #define MxMENU_ONE_OF_MANY 0x0002
00353 #define MxMENU_TOGGLE 0x0004
00354 #define MxMENU_DISABLED 0x0008
00355 #define MxMENU_LABEL 0x0010
00356 #define MxMENU_FORCENAME 0x0020
00357 #define MxMENU_LABELMIUNICODE 0x0040
00358 #define MxMENU_IGNORE 0x0080
00359 #define MxMENU_NOGADGET 0x0100
00360 #define MxMENU_NOCENTERLABEL 0x0200
00361 #define MxMENU_PROGRAMMER 0x0400
00362 #define MxMENU_NOCHGCBDATA 0x0800
00363 #define MxMENU_FREELABEL 0x1000
00364 #define MxMENU_NOCUSTOMSUBMENU 0x2000
00365
00366
00367 enum MxEDITMENUFLAGS {
00368 MxEDITMENUFLAG_None = 0x0000,
00369 MxEDITMENUFLAG_NoSearch = 0x0001,
00370 MxEDITMENUFLAG_NoReplace = 0x0002,
00371 MxEDITMENUFLAG_NoInsertFile = 0x0004,
00372 MxEDITMENUFLAG_AllowFormat = 0x0008
00373 };
00374 #ifndef GENERATING_DOXYGEN_OUTPUT
00375 DEFINE_ENUM_OP_BITWISE(MxEDITMENUFLAGS)
00376 #endif
00377
00378
00379
00380
00381
00382 struct BUTTONITEM {
00383 char *label;
00384 UINT32 flags;
00385 XtCallbackProc callback;
00386 void *callback_data;
00387 const char *help;
00388 void *userdata;
00389 mutable Widget pbwidget;
00390 const char *IconName;
00391 const char *ClassName;
00392 UINT32 icid;
00393 const MIUNICODE *ToolTip;
00394 Pixel BackgroundPixel;
00395 Widget *pwidget;
00396 };
00397
00398 #define MxBUTTON_DISABLED 0x00000001
00399 #define MxBUTTON_TOGGLE 0x00000002
00400 #define MxBUTTON_NOINDICATOR 0x00000004
00401 #define MxBUTTON_SELECTED 0x00000008
00402 #define MxBUTTON_ONE_OF_MANY 0x00000010
00403 #define MxBUTTON_DEFAULT 0x00000020
00404 #define MxBUTTON_MULTI_CLICK 0x00000040
00405 #define MxBUTTON_IGNORE 0x00000080
00406 #define MxBUTTON_PROGRAMMER 0x00000100
00407 #define MxBUTTON_NOMANAGE 0x00000200
00408 #define MxBUTTON_ICON_MENU 0x00000400
00409 #define MxBUTTON_ICON_MENU_FILE 0x00000800
00410 #define MxBUTTON_BACKGROUND_PIXEL 0x00001000
00411 #define MxBUTTON_NOCUSTOMSUBMENU 0x00002000
00412 #define MxBUTTON_FORCENAME 0x00004000
00413 #define MxBUTTON_LABELMIUNICODE 0x00008000
00414 #define MxBUTTON_ALLOWRIGHTCLICK 0x00010000
00415
00416 #define MxBUTTONROW_NoIcons 0x0001
00417 #define MxBUTTONROW_RowColumn 0x0002
00418 #define MxBUTTONROW_XmiPane 0x0004
00419
00420
00421
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
00432
00433 #define SELICON_Resize 0x01
00434
00435
00436
00437
00438
00439
00440 #define GET_NoMin (0x00000011)
00441 #define GET_NoMax (0x00000022)
00442 #define GET_NoRange (0x00000033)
00443 #define GET_NoDft (0x00000004)
00444 #define GET_InvValid (0x00000008)
00445 #define GET_RastValRGB16UINT2 (0x00000008)
00446 #define GET_RangeMask (0xFFFFFFFC)
00447
00448 #define GET_NoShowMin (0x00000010)
00449 #define GET_NoShowMax (0x00000020)
00450 #define GET_NoShowRange (0x00000030)
00451 #define GET_ShowUnitLabel (0x00000040)
00452 #define GET_ShowRange (0x00000080)
00453
00454 #define GET_NoCancel (0x00000100)
00455 #define GET_LabelTop (0x00000200)
00456 #define GET_DftRet (0x00000400)
00457 #define GET_AddOne (0x00000800)
00458
00459 #define GET_DegsNS (0x00000000)
00460 #define GET_DegsEW (0x00001000)
00461 #define GET_ToUpper (0x00002000)
00462 #define GET_DetectNULL (0x00004000)
00463 #define GET_BlankZero (0x00008000)
00464 #define GET_RightJustify (0x00010000)
00465 #define GET_OutputOnly (0x00020000)
00466 #define GET_PromptGiven (0x00040000)
00467 #define GET_DegsNoDir (0x00080000)
00468 #define GET_NoManage (0x00100000)
00469 #define GET_NoForm (0x00200000)
00470 #define GET_PopupForceStr (0x00400000)
00471 #define GET_HasScale (0x00800000)
00472 #define GET_Degs360EW (0x01000000)
00473 #define GET_Unicode (0x02000000)
00474 #define GET_PromptUnicode (0x04000000)
00475 #define GET_LeftJustify (0x08000000)
00476 #define GET_UseLogScale (0x20000000)
00477 #define GET_Password (0x40000000)
00478
00479 #define MxPromptRastValCR_ValueChanged 0x0001
00480
00481 #define MxPromptCR_ValueChanged 0x00000001
00482 #define MxPromptCR_ValueChangeDrag 0x00000002
00483 #define MxPromptCR_Activate 0x00000004
00484
00485 struct MxPromptCallbackStruct {
00486 UINT32 reason;
00487 Widget prompt;
00488 void *value;
00489 };
00490
00491 typedef void (*MxPromptCallbackFunc)(MxPromptCallbackStruct*, void*);
00492
00493 #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)); }
00494 #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)); }
00495
00496
00497 #define MXPROMPT_ASTRING 0
00498 #define MXPROMPT_USTRING 1
00499 #define MXPROMPT_ACHAR 2
00500 #define MXPROMPT_UCHAR 3
00501 #define MXPROMPT_DOUBLE 10
00502 #define MXPROMPT_FLOAT 11
00503 #define MXPROMPT_UINT32 12
00504 #define MXPROMPT_INT32 13
00505 #define MXPROMPT_UINT16 14
00506 #define MXPROMPT_INT16 15
00507 #define MXPROMPT_UINT8 16
00508 #define MXPROMPT_INT8 17
00509 #define MXPROMPT_LATLON 18
00510
00511
00512
00513
00514
00515 enum MxRELPOSN {
00516 MxRELPOSN_Default = 0,
00517 MxRELPOSN_AutoLeftRight = 1,
00518 MxRELPOSN_RightTop = 2,
00519 MxRELPOSN_LeftTop = 3,
00520 MxRELPOSN_RightCenter = 4,
00521 MxRELPOSN_LeftCenter = 5,
00522 MxRELPOSN_RightBottom = 6,
00523 MxRELPOSN_LeftBottom = 7,
00524 MxRELPOSN_TopLeft = 8,
00525 MxRELPOSN_BottomLeft = 9,
00526 MxRELPOSN_TopCenter = 10,
00527 MxRELPOSN_BottomCenter = 11,
00528 MxRELPOSN_TopRight = 12,
00529 MxRELPOSN_BottomRight = 13,
00530 MxRELPOSN_MatchBottom = 14,
00531 MxRELPOSN_MatchTop = 15,
00532 MxRELPOSN_MatchLeft = 16,
00533 MxRELPOSN_MatchRight = 17
00534 };
00535
00536
00537
00538
00539
00540 #define MxLOCKSIZE_MinHeight 0x1
00541 #define MxLOCKSIZE_MinWidth 0x2
00542 #define MxLOCKSIZE_MaxHeight 0x4
00543 #define MxLOCKSIZE_MaxWidth 0x8
00544 #define MxLOCKSIZE_Min (MxLOCKSIZE_MinHeight | MxLOCKSIZE_MinWidth)
00545 #define MxLOCKSIZE_Max (MxLOCKSIZE_MaxHeight | MxLOCKSIZE_MaxWidth)
00546 #define MxLOCKSIZE_MinMax (MxLOCKSIZE_Min | MxLOCKSIZE_Max)
00547
00548
00549
00550
00551
00552 #define MxBCOL_ALIGN_BEGINNING 1
00553
00554 extern "C" {
00555
00556
00557
00558
00559
00562
00564 XtAppContext MsysAppGetXContext ();
00565
00567 Display* MsysAppGetXDisplay ();
00568
00570 void MsysAppSetXDisplayContext (
00571 Display *xdisplay,
00572 XtAppContext xappcontext
00573 );
00574
00578
00579
00580
00585 void MxcbDisplayHelp (
00586 Widget,
00587 void*,
00588 void*
00589 );
00590
00594 void MxcbOptionUBYTE (
00595 Widget w,
00596 void *voption,
00597 void*
00598 );
00599
00601 void MxcbSetExit (
00602 Widget,
00603 void*,
00604 void*
00605 );
00606
00609 void MxcbToggleBool (
00610 Widget,
00611 void *vvalue,
00612 XmToggleButtonCallbackStruct *cbs
00613 );
00614
00617 void MxcbToggleUBYTE (
00618 Widget,
00619 void *vvalue,
00620 XmToggleButtonCallbackStruct *cbs
00621 );
00622
00623 #define MxcbOptionUINT8 MxcbOptionUBYTE
00624 #define MxcbToggleUINT8 MxcbToggleUBYTE
00625
00627 int Main_DatabaseEditor (
00628 Widget parent
00629 );
00630
00643 void MxAddDeleteWindowCallback (
00644 Widget widget,
00645 XtCallbackProc cbproc,
00646 void* cbdata
00647 );
00648
00652 void MxAlignLabels (
00653 Widget* widgets,
00654 int num
00655 );
00656
00662 void MxAlignWidgets (
00663 Widget* widgets,
00664 int num,
00665 UINT32 flags
00666 );
00667
00668
00669 #define MxANGLECONTROL_Quadrant1 0x00000001
00670 #define MxANGLECONTROL_Quadrant2 0x00000002
00671 #define MxANGLECONTROL_Quadrant3 0x00000004
00672 #define MxANGLECONTROL_Quadrant4 0x00000008
00673 #define MxANGLECONTROL_FullCircle 0x0000000F
00674 #define MxANGLECONTROL_ZeroAtTop 0x00000010
00675
00703 Widget MxAngleControlCreate (
00704 Widget parent,
00705 double *pValue,
00706 int radius,
00707 UINT32 flags,
00708 Arg *callerargs,
00709 int numargs
00710 );
00711
00712
00719 ERRVALUE MxAngleControlSetPrompt (
00720 Widget control,
00721 Widget prompt
00722 );
00723
00727 Widget MxAppShellCreate (
00728 const char *posnkey,
00729 Arg* arg,
00730 int numargs
00731 );
00732
00736 void MxAssignCursor (
00737 Display* display,
00738 Window window,
00739 int cursor
00740 );
00741
00743 void MxClearWidget (
00744 Widget widget,
00745 bool sendexposure = true
00746 );
00747
00761 double MxConvertScreenUnits (
00762 double val,
00763 int InUnits,
00764 int OutUnits
00765 );
00766
00772 MIUNICODE* MxConvertXmStringToUC (
00773 XmString xmstr
00774 );
00775
00795 Widget MxCreateButtonColumn (
00796 Widget,
00797 BUTTONITEM*,
00798 void*,
00799 void*,
00800 int,
00801 Arg*,
00802 int
00803 );
00804
00811 Widget MxCreateButtonFieldXe (
00812 Widget form,
00813 const char* name,
00814 Widget* xetext,
00815 Widget* button,
00816 XtCallbackProc cbfunc,
00817 void* cbdata,
00818 Arg* arglist,
00819 int argcount
00820 );
00821
00844 Widget MxCreateButtonRow (
00845 Widget pwidget,
00846 const BUTTONITEM *buttonitem,
00847 void *cbdata,
00848 void *userdata,
00849 int flags,
00850 const Arg*,
00851 int argcount
00852 );
00853
00857 Widget MxCreateFormDialog (
00858 Widget pwidget,
00859 const char* titlestr,
00860 const char* helpstr,
00861 XtCallbackProc cbpopdn,
00862 void *cbdata,
00863 Arg *arglist,
00864 int argcount
00865 );
00866
00867
00868 }
00869
00876 Widget MxCreateFormDialog (
00877 Widget pwidget,
00878 const char* titlestr,
00879 Arg *arglist,
00880 int argcount
00881 );
00882
00883 extern "C" {
00884
00885 Widget MxCreateFrame (
00886 Widget pwidget,
00887 const XTARGS& arg,
00888 const char *label = 0
00889 );
00890
00898 Widget MxCreateIconButtonRow (
00899 Widget pwidget,
00900 const MIUNICODE *iconfile,
00901 const char *icongroup,
00902 const BUTTONITEM *buttonitem,
00903 void *cbdata,
00904 void *userdata,
00905 int flags,
00906 const Arg *arglist,
00907 int argcount
00908 );
00909
00914 Widget MxCreateIconLabel (
00915 Widget pwidget,
00916 int iconhandle,
00917 const char *IconClass,
00918 const char *IconName,
00919 const char *LabelName,
00920 const Arg *arglist,
00921 int argcount
00922 );
00923
00924 }
00925
00930 Widget MxCreateIconLabel (
00931 Widget pwidget,
00932 ICONID iconid,
00933 const MISTRING& tooltip,
00934 const Arg *arglist,
00935 int argcount
00936 );
00937
00938 extern "C" {
00954 Widget MxCreateIconLabelExt (
00955 Widget pwidget,
00956 int iconhandle,
00957 const char *IconClass,
00958 const char *IconName,
00959 const char *StippleName,
00960 const char *LabelName,
00961 const Arg *arglist,
00962 int argcount,
00963 UINT32 flags
00964 );
00965
00972 Widget MxCreateIconPopupMenuButton (
00973 Widget pwidget,
00974 int iconhandle,
00975 const char *IconClass,
00976 const char *IconName,
00977 const char *LabelName,
00978 const MENUITEM *items,
00979 Widget *widget_list,
00980 void *data,
00981 void *udata,
00982 const Arg *arglist,
00983 int argcount
00984 );
00985
00986 #ifndef NO_DEPRECATED
00991 DEPRECATED_MSG("There's another version that doesn't have a numeric style object id for the 2nd parameter") Widget MxCreateIconPushButton (
00992 Widget pwidget,
00993 int iconhandle,
00994 const char *IconClass,
00995 const char *IconName,
00996 const char *LabelName,
00997 XtCallbackProc,
00998 void *cbdata,
00999 const Arg *arglist,
01000 int argcount
01001 );
01002 #endif
01003
01004 }
01009 Widget MxCreateIconPushButton (
01010 Widget pwidget,
01011 ICONID iconid,
01012 const MISTRING& tooltip,
01013 XtCallbackProc cbfunc,
01014 void *cbdata,
01015 const Arg *arglist,
01016 int argcount
01017 );
01018
01023 Widget MxCreateIconPushButton (
01024 Widget pwidget,
01025 const char *IconGroup,
01026 const char *IconName,
01027 const char *LabelName,
01028 XtCallbackProc,
01029 void *cbdata,
01030 const Arg *arglist,
01031 int argcount,
01032 UINT32 flags = 0,
01033 RVC::STYLE* StyleObj = 0
01034 );
01035
01036 extern "C" {
01037
01049 Widget MxCreateIconPushButtonExt (
01050 Widget pwidget,
01051 int iconhandle,
01052 const char *IconClass,
01053 const char *IconName,
01054 const char *LabelName,
01055 XtCallbackProc,
01056 void *cbdata,
01057 const Arg *arglist,
01058 int argcount,
01059 UINT32 flags
01060 );
01061
01069 Widget MxCreateIconToggleButton (
01070 Widget pwidget,
01071 int iconhandle,
01072 const char *IconClass,
01073 const char *IconName,
01074 const char *LabelName,
01075 void(*)(Widget, void*, XmToggleButtonCallbackStruct*),
01076 void *cbdata,
01077 const Arg *arglist,
01078 int argcount
01079 );
01080
01096 Widget MxCreateIconToggleButtonExt (
01097 Widget pwidget,
01098 int iconhandle,
01099 const char *IconClass,
01100 const char *UnselIconName,
01101 const char *SelectedIconName,
01102 const char *LabelName,
01103 void(*)(Widget, void*, XmToggleButtonCallbackStruct*),
01104 void *cbdata,
01105 const Arg *arglist,
01106 int argcount,
01107 UINT32 flags
01108 );
01109
01115 int MxCreateImageFromWidget (
01116 Widget widget,
01117 XImage** ximage,
01118 void** buffer,
01119 int width,
01120 int height
01121 );
01122
01126 Widget MxCreateLabelFieldXe (
01127 Widget form,
01128 const char* name,
01129 Widget* xetext,
01130 Widget* label,
01131 Arg* arglist,
01132 int argcount
01133 );
01134
01140 Widget MxCreateLatLonFormatOptionMenu (
01141 Widget pwidget,
01142 char *label,
01143 UINT32 dftfmt,
01144 void(*)(Widget, void *, void *),
01145 void *userdata,
01146 Arg *arglist,
01147 int argcount
01148 );
01149
01155 Widget MxCreatePopupMenu (
01156 Widget parent,
01157 const char *title,
01158 const MENUITEM *items,
01159 Widget *widget_list,
01160 void *data,
01161 void *udata
01162 );
01163
01166 Widget MxCreatePulldownMenu (
01167 Widget parent,
01168 const MIUNICODE *label,
01169 const MENUITEM *items,
01170 void *cbdata,
01171 void *udata
01172 );
01173
01176 Widget MxCreateLabel (
01177 Widget parent,
01178 const char *name,
01179 Arg *arglist,
01180 int argcount
01181 );
01182
01183 }
01184
01187 Widget MxCreateLabel (
01188 Widget parent,
01189 const MISTRING& label,
01190 Arg *arglist,
01191 int argcount
01192 );
01193
01194 extern "C" {
01195
01198 Widget MxCreateManualPopupMenu (
01199 Widget parent,
01200 const char *title,
01201 const MENUITEM *items,
01202 Widget *widget_list,
01203 void *data,
01204 void *udata
01205 );
01206
01210 Widget MxCreateMenuBar (
01211 Widget pwidget,
01212 const MENUBARITEM *menus,
01213 void *clientdata,
01214 void *userdata
01215 );
01216
01224 Widget MxCreateOptionMenu (
01225 Widget pwidget,
01226 const char *title,
01227 const MENUITEM *items,
01228 void *userdata
01229 );
01230
01238 Widget MxCreateOptionMenuExt (
01239 Widget pwidget,
01240 const char *title,
01241 const MENUITEM *items,
01242 void *userdata,
01243 const Arg *arglist,
01244 int argcount
01245 );
01246
01249 Widget MxCreatePushButton (
01250 Widget pwidget,
01251 const char *name,
01252 XtCallbackProc,
01253 void *cbdata,
01254 Arg *arglist,
01255 int argcount
01256 );
01257
01260 Widget MxCreateTextEncodingLB (
01261 Widget pwidget,
01262 const char *label,
01263 CHAR_ENCODING& encoding,
01264 ENCODELIST_FLAGS enclistflags,
01265 Arg *arglist,
01266 int argcount
01267 );
01268
01271 Widget MxCreateToggleButton (
01272 Widget pwidget,
01273 const char *name,
01274 void(*)(Widget, void*, XmToggleButtonCallbackStruct*),
01275 void *cbdata,
01276 Arg *arglist,
01277 int argcount
01278 );
01279
01286 XmString MxCreateXmStringUC (
01287 const MIUNICODE* const string,
01288 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
01289 );
01290
01292 void MxDestroyPopupMenu (
01293 Widget parent,
01294 Widget popup
01295 );
01296
01298 void MxDestroyTopLevel (
01299 );
01300
01302 void MxDisplayHelp (
01303 Widget parent,
01304 const char* helpid
01305 );
01306
01308 void MxDisplayHelpByID (
01309 Widget parent,
01310 HELPID helpid
01311 );
01312
01316 int MxEditBitmapCursor (
01317 Widget pwidget,
01318 FILEPATH *filename,
01319 int flags
01320 );
01321
01325 int MxEditBitmapPattern (
01326 Widget pwidget,
01327 const RVC::OBJITEM& StyleObjItem,
01328 INT32 pattnum,
01329 const COLOR& varcolor,
01330 UINT32 flags
01331 );
01332
01339 int MxEditColor (
01340 Widget parent,
01341 EDITCOLORINFO *EditColorInfo,
01342 int numcolors,
01343 UINT32 flags,
01344 Widget *notused
01345 );
01346
01350 int MxEditHatchPattern (
01351 Widget pwidget,
01352 const RVC::OBJITEM& StyleObjItem,
01353 INT32 pattnum,
01354 COLOR *varcolor,
01355 UINT32 flags
01356 );
01357
01378 const BUTTONITEM *MxEditButtonsCreate (
01379 void **handle,
01380 MxEDITMENUFLAGS flags = MxEDITMENUFLAG_None,
01381 void(*undofunc)(Widget, void*) = 0,
01382 void *undodata = 0
01383 );
01384
01385
01409 DEPRECATED const MENUITEM *MxEditMenuCreate (
01410 void **handle,
01411 MxEDITMENUFLAGS flags = MxEDITMENUFLAG_None,
01412 void(*undofunc)(Widget, void*) = 0,
01413 void *undodata = 0
01414 );
01415
01416 }
01417
01442 const MENUITEM *MxEditMenuCreate (
01443 Widget shell,
01444 void **handle,
01445 MxEDITMENUFLAGS flags = MxEDITMENUFLAG_None,
01446 void(*undofunc)(Widget, void*) = 0,
01447 void *undodata = 0
01448 );
01449
01450 extern "C" {
01457 void MxEditButtonsAddCallbacks (
01458 void* handle,
01459 Widget textwidget
01460 );
01461
01471 void MxEditMenuAddCallbacks (
01472 void* handle,
01473 Widget textwidget
01474 );
01475
01479 int MxEditSymbol (
01480 Widget pwidget,
01481 const RVC::OBJITEM& StyleObjItem,
01482 INT32 pattnum,
01483 COLOR *varcolor,
01484 UINT32 flags
01485 );
01486
01493 void MxEnableMouseWheel (
01494 Widget owner,
01495 Widget scrollbar,
01496 int increment = 3
01497 );
01498
01503 void MxListEnableMouseWheel (
01504 Widget owner,
01505 int increment = 3
01506 );
01507
01510 Widget MxFindNamedChildWidget (
01511 Widget parent,
01512 char *name
01513 );
01514
01516 void MxForceDialog (
01517 Widget w
01518 );
01519
01523 void MxForceWindowOnScreen (
01524 Widget,
01525 int
01526 );
01527
01533 void MxFixWindowSizeForAppleX11 (
01534 Widget mainform
01535 );
01536
01538 Pixel MxGetColorPixel (
01539 COLOR const& color
01540 );
01541
01544 Pixel MxGetColorPixelNoICM (
01545 COLOR const& color
01546 );
01547
01554 XmFontList MxGetDefaultFontList (
01555 );
01556
01558 const char* MxGetDefaultSystemXLFD ();
01559
01561 const char* MxGetDefaultUIFont ();
01562
01564 void MxGetDisplayInfo (
01565 Widget widget,
01566 DISPLAYINFO *displayinfo
01567 );
01568
01570 void MxGetDrawingAreaSize (
01571 Widget dawidget,
01572 INT16& width,
01573 INT16& height
01574 );
01575
01579 int MxGetFontStructFromWidget (
01580 Widget widget,
01581 XFontStruct *fontstruct
01582 );
01583
01590 int MxGetMaxFontAscent (
01591 bool bForClipping = false
01592 );
01593
01600 int MxGetMaxFontDescent (
01601 bool bForClipping = false
01602 );
01603
01609 int MxGetMaxFontHeight (
01610 bool bForClipping = false
01611 );
01612
01615 int MxGetMaxFontWidth();
01616
01623 int MxGetTypicalFontWidth ();
01624
01627 int MxGetTypicalFontWidth2 (
01628 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
01629 );
01630
01634 void *MxGetNamedUserData (
01635 Widget widget,
01636 const char *name
01637 );
01638
01640 void MxGetScrollAreaSize (
01641 Widget,
01642 int *width,
01643 int *height
01644 );
01645
01649 Widget MxGetShell (
01650 Widget widget
01651 );
01652
01655 Pixel MxGetStdColorPixel (
01656 int index
01657 );
01658
01660 void MxGetStdColorPixels (
01661 Pixel *stdpixel
01662 );
01663
01665 void MxGetStdColors (
01666 COLOR stdcolor[NUMSTDCOLORS]
01667 );
01668
01670 int MxGetSystemPreferences (
01671 Widget pwidget
01672 );
01673
01678 Widget MxGetTopLevel (
01679 Widget widget
01680 );
01681
01686 Widget MxGetTopShell (
01687 Widget widget
01688 );
01689
01690 }
01691
01693 inline void *MxGetUserDataPtr (
01694 Widget widget
01695 ) {
01696 void *ptr;
01697 Arg arg;
01698 XtSetArg(arg,XmNuserData,&ptr);
01699 XtGetValues(widget,&arg,1);
01700 return (ptr);
01701 }
01702
01703
01704 extern "C" {
01705
01711 MIUNICODE *MxGetWidgetLabelString (
01712 Widget widget
01713 );
01714
01716 void MxGetWidgetSize (
01717 Widget widget,
01718 Dimension& width,
01719 Dimension& height
01720 );
01721
01726 int MxGetWindowBorders (
01727 Widget widget,
01728 int *left,
01729 int *right,
01730 int *top,
01731 int *bottom
01732 );
01733
01735 void MxGetWindowPosition (
01736 Widget w,
01737 int *px,
01738 int *py
01739 );
01740
01744 void MxIconAddDestroyCallback (
01745 Widget widget,
01746 MICONSTRUCT *
01747 );
01748
01751 void MxIconDrawDimmed (
01752 Display *display,
01753 Drawable drawable,
01754 GC gc,
01755 int x,
01756 int y,
01757 MICONSTRUCT *icon
01758 );
01759
01761 void MxIconDrawNormal (
01762 Display *display,
01763 Drawable drawable,
01764 GC gc,
01765 int x,
01766 int y,
01767 MICONSTRUCT *icon
01768 );
01769
01774 Pixmap MxIconGetPixmapDimmed (
01775 const MICONSTRUCT *icon
01776 );
01777
01781 Pixmap MxIconGetPixmapNormal (
01782 const MICONSTRUCT *icon
01783 );
01784
01786 int MxIsExitingProcess (
01787 );
01788
01792 int MxIsTimeOutInMainLoop (
01793 );
01794
01806 DEPRECATED Widget MxListButtonCreate (
01807 Widget pw,
01808 const char *label,
01809 int NumItems,
01810 int maxlen,
01811 MIUNICODE*(*GetItemFunc)(int,void*),
01812 void(*NotifyFunc)(int,void*),
01813 void *FuncData,
01814 Arg *arglist,
01815 int argcount
01816 );
01817
01820 DEPRECATED void MxListButtonSetHelpID (
01821 Widget listbutton,
01822 const char* helpid
01823 );
01824
01827 DEPRECATED void MxListButtonSetItem (
01828 Widget listbutton,
01829 int itemnum,
01830 int notify
01831 );
01832
01835 DEPRECATED void MxListButtonSetNumItems (
01836 Widget listbutton,
01837 int NumItems
01838 );
01839
01842 DEPRECATED void MxListButtonSetTitle (
01843 Widget listbutton,
01844 const char* title
01845 );
01846
01850 void MxListDisableKeySelect (
01851 Widget list
01852 );
01853
01863 void MxListEnableKeySelect (
01864 Widget list,
01865 int start
01866 );
01867
01879 void MxLockWindowSize (
01880 Widget widget,
01881 UINT32 flags = MxLOCKSIZE_MinMax
01882 );
01883
01895 void MxLockWindowSizeAbs (
01896 Widget widget,
01897 int height,
01898 int width,
01899 UINT32 flags
01900 );
01901
01913 void MxLockWindowSizeRel (
01914 Widget widget,
01915 int dheight,
01916 int dwidth,
01917 UINT32 flags
01918 );
01919
01951 void MxMainLoopUntilExitSet (
01952 );
01953
01955 void MxMainLoopUntilConditionMet (
01956 DELEGATE_BOOL_NOPARMS Delegate
01957 );
01958
01961 void MxMainLoopWhilePending (
01962 );
01963
01966 DEPRECATED void MxMakeObjectList (
01967 Widget list,
01968 const RVC::OBJITEMLIST& items
01969 );
01970
01972 void MxMakeListPosCentered (
01973 Widget listw,
01974 int listitem
01975 );
01976
01979 void MxMakeListPosVisible (
01980 Widget listw,
01981 int listitem
01982 );
01983
01985 int MxMenuFileLoad (
01986 Widget pwidget,
01987 const FILEPATH& filepath,
01988 XtCallbackProc CB_Internal,
01989 XtCallbackProc CB_Executable = 0,
01990 FastDelegate<void(Widget, const char*, int)> DelegateAddSpecial = 0
01991 );
01992
01996 Widget MxMenuFileCreateIconPulldown (
01997 Widget pwidget,
01998 const FILEPATH& filepath,
01999 XtCallbackProc CB_Internal,
02000 int IconHandle,
02001 const char *IconGroup,
02002 const char *IconName,
02003 const char *LabelName,
02004 const Arg *arglist,
02005 int argcount
02006 );
02007
02011 int MxMenuGetNumItems (
02012 const MENUITEM *items
02013 );
02014
02016 void MxMenuInitSelectedByCallbackData (
02017 MENUITEM *menuitem,
02018 void *cbdata
02019 );
02020
02022 void MxMenuInitSelectedByUserData (
02023 MENUITEM *menuitem,
02024 void *userdata
02025 );
02026
02033 Widget MxMenuItemWidget (
02034 Widget menubar,
02035 const char *path
02036 );
02037
02039 void MxMsgLineClear (
02040 Widget msgline
02041 );
02042
02050 Widget MxMsgLineCreate (
02051 Widget pwidget,
02052 Arg *arglist,
02053 int argcount
02054 );
02055
02057 void MxMsgLineSetError (
02058 Widget msgline,
02059 ERRVALUE errcode
02060 );
02061
02063 void MxMsgLineSetText (
02064 Widget msgline,
02065 const MISTRING& string
02066 );
02067
02069 void MxMsgLineSetTimer (
02070 Widget msgline,
02071 const MTIMER& timer,
02072 TEXTID textid = TEXTID__None
02073 );
02074
02076 void MxOptionMenuAppendItems (
02077 Widget omwidget,
02078 const MENUITEM *items,
02079 void *udata
02080 );
02081
02085 Widget MxOptionMenuGetButton (
02086 Widget omwidget
02087 );
02088
02090 Widget MxOptionMenuGetLabel (
02091 Widget omwidget
02092 );
02093
02095 void MxOptionMenuRemoveLast (
02096 Widget omwidget
02097 );
02098
02102 void MxOptionMenuReplaceItems (
02103 Widget omwidget,
02104 const MENUITEM *newitems,
02105 void *userdata
02106 );
02107
02111 Boolean MxOptionMenuSetItem (
02112 Widget omwidget,
02113 int itemnum
02114 );
02115
02118 Boolean MxOptionMenuSetItemByData (
02119 Widget widget,
02120 const MENUITEM *menuitem,
02121 void *callback_data
02122 );
02123
02128 Boolean MxOptionMenuSetItemSensitive (
02129 Widget omwidget,
02130 int itemnum,
02131 Boolean flag
02132 );
02133
02135 void MxOptionMenuSetSensitive (
02136 Widget omwidget,
02137 int sensitive
02138 );
02139
02143 int MxPixmapFromFillPattern (
02144 Widget pwidget,
02145 Pixel bgpixel,
02146 const RVC::STYLEPATTERN_BITMAP& Pattern,
02147 Pixmap *pixmap,
02148 bool bToGrayScale = false
02149 );
02150
02154 Widget MxPolyfitCreateForm (
02155 Widget parent,
02156 void(*action)(void*),
02157 void *userdata,
02158 Arg *arglist,
02159 int argcount
02160 );
02161
02165 int MxPolyfitGetParm (
02166 Widget wPolyfit,
02167 void *vpf
02168 );
02169
02171 int MxPolyfitSetParm (
02172 Widget wPolyfit,
02173 void *vpf
02174 );
02175
02179 int MxPolyfitIniRead (
02180 void *vpf
02181 );
02182
02186 int MxPolyfitIniWrite(
02187 void *vpf
02188 );
02189
02191 void MxPopupMenuReplaceItems (
02192 Widget menupane,
02193 const MENUITEM *items,
02194 void *udata
02195 );
02196
02209 int MxPopupModalDialog (
02210 Widget dlgparent,
02211 const char* dlgname,
02212 const char* helpid,
02213 Widget (*CreateWidgetFunc)(Widget,void*,Arg*,int),
02214 void* CreateWidgetData,
02215 const BUTTONITEM *extrabuttons = 0,
02216 bool (*CheckOkFunc)(void*) = 0
02217 );
02218
02220 void MxPopupTransientMenu (
02221 Widget parent,
02222 XButtonPressedEvent *event,
02223 const char *title,
02224 const MENUITEM *items,
02225 void *cbdata = 0,
02226 void *udata = 0,
02227 bool waitforpopdown = false
02228 );
02229
02251 void MxPositionWindowRel (
02252 Widget child,
02253 Widget base,
02254 MxRELPOSN relposn
02255 );
02256
02257
02272 int MxPromptAddCallback (
02273 Widget prompt,
02274 void(*cbfunc)(MxPromptCallbackStruct*,void*),
02275 void *cbdata,
02276 UINT32 reasonmask
02277 );
02278
02282 void MxPromptClearValue (
02283 Widget prompt
02284 );
02285
02298 int MxPromptColorAddCallback (
02299 Widget prompt,
02300 void(*cbfunc)(MxPromptCallbackStruct*,void*),
02301 void *cbdata,
02302 UINT32 reasonmask
02303 );
02304
02312 Widget MxPromptColorCreate (
02313 Widget pwidget,
02314 const char *name,
02315 COLOR *color,
02316 UINT32 flags,
02317 Arg *arglist,
02318 int argcount
02319 );
02320
02324 Widget MxPromptColorGetLabel (
02325 Widget prompt
02326 );
02327
02329 void MxPromptColorUpdate (
02330 Widget prompt
02331 );
02332
02336 Widget MxPromptCreateChar (
02337 Widget parent,
02338 const char *name,
02339 char *str,
02340 const char *help,
02341 UINT32 flags,
02342 Arg *args,
02343 int numargs
02344 );
02345
02376 Widget MxPromptCreateDouble (
02377 Widget parent,
02378 const char *name,
02379 double *ret,
02380 double dft,
02381 double min,
02382 double max,
02383 int places,
02384 const char *help,
02385 UINT32 flags,
02386 Arg *args,
02387 int n
02388 );
02389
02413 Widget MxPromptCreateFloat (
02414 Widget parent,
02415 const char *name,
02416 float *ret,
02417 float dft,
02418 float min,
02419 float max,
02420 int places,
02421 const char *help,
02422 UINT32 flags,
02423 Arg *args,
02424 int n
02425 );
02426
02430 Widget MxPromptCreateINT8 (
02431 Widget parent,
02432 const char *name,
02433 INT8 *ret,
02434 INT8 dft,
02435 INT8 min,
02436 INT8 max,
02437 const char *help,
02438 UINT32 flags,
02439 Arg *args,
02440 int n
02441 );
02442
02463 Widget MxPromptCreateINT16 (
02464 Widget parent,
02465 const char *name,
02466 INT16 *ret,
02467 INT16 dft,
02468 INT16 min,
02469 INT16 max,
02470 const char *help,
02471 UINT32 flags,
02472 Arg *args,
02473 int numargs
02474 );
02475
02496 Widget MxPromptCreateINT32 (
02497 Widget parent,
02498 const char *name,
02499 INT32 *ret,
02500 INT32 dft,
02501 INT32 min,
02502 INT32 max,
02503 const char *help,
02504 UINT32 flags,
02505 Arg *args,
02506 int n
02507 );
02508
02529 Widget MxPromptCreateLatLon (
02530 Widget parent,
02531 const char *name,
02532 double *ret,
02533 double dft,
02534 double min,
02535 double max,
02536 int places,
02537 const char *help,
02538 UINT32 flags,
02539 Arg *args,
02540 int n
02541 );
02542
02575 Widget MxPromptCreateNum (
02576 Widget parent,
02577 const char *name,
02578 int type,
02579 void *ret,
02580 double dft,
02581 double min,
02582 double max,
02583 int places,
02584 const char *help,
02585 char **comboitems,
02586 UINT32 flags,
02587 Arg *args,
02588 int n
02589 );
02590
02606 Widget MxPromptCreateString (
02607 Widget parent,
02608 const char *name,
02609 char *str,
02610 int maxlen,
02611 const char *help,
02612 UINT32 flags,
02613 Arg *args,
02614 int numargs
02615 );
02616
02620 Widget MxPromptCreateUINT8 (
02621 Widget parent,
02622 const char *name,
02623 UINT8 *ret,
02624 UINT8 dft,
02625 UINT8 min,
02626 UINT8 max,
02627 const char *help,
02628 UINT32 flags,
02629 Arg *args,
02630 int n
02631 );
02632
02653 Widget MxPromptCreateUINT16 (
02654 Widget parent,
02655 const char *name,
02656 UINT16 *ret,
02657 UINT16 dft,
02658 UINT16 min,
02659 UINT16 max,
02660 const char *help,
02661 UINT32 flags,
02662 Arg *args,
02663 int n
02664 );
02665
02686 Widget MxPromptCreateUINT32 (
02687 Widget parent,
02688 const char *name,
02689 UINT32 *ret,
02690 UINT32 dft,
02691 UINT32 min,
02692 UINT32 max,
02693 const char *help,
02694 UINT32 flags,
02695 Arg *args,
02696 int n
02697 );
02698
02702 MDLGPARENT MxPromptCreateUnicode (
02703 MDLGPARENT parent,
02704 const char *name,
02705 MIUNICODE *str,
02706 int maxlen,
02707 const char *help,
02708 UINT32 flags,
02709 Arg *args,
02710 int numargs
02711 );
02712
02714 void MxPromptDisableTraversal (
02715 Widget prompt
02716 );
02717
02721 int MxPromptSetValueDouble (
02722 Widget prompt,
02723 double val
02724 );
02725
02729 int MxPromptDoubleToLatLon (
02730 Widget prompt
02731 );
02732
02736 int MxPromptSetValueFloat (
02737 Widget prompt,
02738 float val
02739 );
02740
02744 Widget MxPromptGetLabel (
02745 Widget prompt
02746 );
02747
02749 void MxPromptGetMinMax (
02750 Widget widget,
02751 double *min,
02752 double *max
02753 );
02754
02758 Widget MxPromptGetScale (
02759 Widget prompt
02760 );
02761
02765 int MxPromptGetStdHeight (
02766 void
02767 );
02768
02772 Widget MxPromptGetUnitLabel (
02773 Widget widget
02774 );
02775
02779 void * MxPromptGetUserData (
02780 Widget prompt
02781 );
02782
02786 int MxPromptGetValueDouble (
02787 Widget widget,
02788 double *pval
02789 );
02790
02794 int MxPromptGetValueUnicode (
02795 Widget widget,
02796 MIUNICODE **pval
02797 );
02798
02803 Widget MxPromptGetXeText (
02804 Widget widget
02805 );
02806
02810 int MxPromptHasValue (
02811 Widget prompt
02812 );
02813
02817 MENUITEM * MxPromptLatLonGetFormatMenu (
02818 XtCallbackProc cbfunc,
02819 int isoption
02820 );
02821
02823 void MxPromptLatLonSetFormat (
02824 Widget widget,
02825 DEGTOSTRFLAGS flags
02826 );
02827
02830 int MxPromptLatLonSetValue (
02831 Widget prompt,
02832 double val
02833 );
02834
02837 int MxPromptLatLonToDouble (
02838 Widget prompt
02839 );
02840
02843 int MxPromptSetValueINT32 (
02844 Widget prompt,
02845 INT32 val
02846 );
02847
02854 int MxPromptRemoveCallback (
02855 Widget prompt,
02856 void(*cbfunc)(MxPromptCallbackStruct*,void*),
02857 void *cbdata,
02858 UINT32 reasonmask
02859 );
02860
02862 void MxPromptSetDecPlaces (
02863 Widget prompt,
02864 int places
02865 );
02866
02868 void MxPromptSetEditable (
02869 Widget prompt,
02870 int editable
02871 );
02872
02879 int MxPromptSetEncoding (
02880 Widget prompt,
02881 char *encoding,
02882 UINT32 flags
02883 );
02884
02886 void MxPromptSetEnterCallback (
02887 Widget widget,
02888 void(*func)(Widget, void*),
02889 void *cbdata
02890 );
02891
02894 void MxPromptSetFormat (
02895 Widget prompt,
02896 char *format
02897 );
02898
02903 void MxPromptSetLogScaleRange (
02904 Widget prompt,
02905 double min,
02906 double max
02907 );
02908
02911 void MxPromptSetModifyCallback (
02912 Widget prompt,
02913 void(*func)(Widget, void*),
02914 void *funcdata
02915 );
02916
02919 void MxPromptSetRange (
02920 Widget prompt,
02921 double min,
02922 double max,
02923 UINT32 flags
02924 );
02925
02929 void MxPromptSetTraversal (
02930 Widget prompt,
02931 Widget traverseto,
02932 XmTraversalDirection traversedir
02933 );
02934
02939 void MxPromptSetUnitConv (
02940 Widget prompt,
02941 const UNITCONV *unitconv
02942 );
02943
02949 void MxPromptSetUnitConvCode (
02950 Widget prompt,
02951 int unittype,
02952 int storedcode,
02953 int showncode
02954 );
02955
02958 void MxPromptSetUnitConvExt (
02959 Widget widget,
02960 const UNITCONV *unitconv,
02961 UINT32 flags
02962 );
02963
02966 void MxPromptSetUserData (
02967 Widget prompt,
02968 void *data
02969 );
02970
02972 void MxPromptSetValue (
02973 Widget widget,
02974 double wal,
02975 int hasvalue
02976 );
02977
02979 void MxPromptSetValuePtr (
02980 Widget prompt,
02981 void *newptr,
02982 int hasvalue
02983 );
02984
02988 int MxPromptSetValueINT16 (
02989 Widget prompt,
02990 short val
02991 );
02992
02996 int MxPromptSetValueString (
02997 Widget prompt,
02998 const char *val
02999 );
03000
03004 int MxPromptSetValueUnicode (
03005 Widget prompt,
03006 const MIUNICODE *val
03007 );
03008
03010 void MxPromptUpdateValue (
03011 Widget prompt
03012 );
03013
03022 int MxPromptUpdateData (
03023 Widget prompt,
03024 Boolean notify
03025 );
03026
03028 void MxPulldownMenuReplaceItems (
03029 Widget parent,
03030 const MENUITEM *items,
03031 void *userdata
03032 );
03033
03035 void MxRedrawWidget (
03036 Widget widget
03037 );
03038
03040 int MxRgnGenSetupRasterTraceAreaV (
03041 Widget pwidget,
03042 const RVC::OBJITEM& VectObjItem,
03043 RGNELEMLIST *ElemList,
03044 int NumElemTypes,
03045 void(*DispRegionFunc)(const REGION2D*,void*),
03046 void *DispRegionData
03047 );
03048
03050 int MxRgnGenSetupRasterTraceBoundaryV (
03051 Widget pwidget,
03052 const RVC::OBJITEM& VectObjItem,
03053 RGNELEMLIST *ElemList,
03054 int NumElemTypes,
03055 void(*DispRegionFunc)(const REGION2D*,void*),
03056 void *DispRegionData
03057 );
03058
03070 Widget MxSashCreate (
03071 Widget pwidget,
03072 Arg *arglist,
03073 int argcount
03074 );
03075
03079 int MxSaveSnapshotToRaster (
03080 Widget pwidget,
03081 const DISPLAYINFO& dispinfo,
03082 Drawable drawable
03083 );
03084
03087 void MxScrollBarGetValues (
03088 Widget w,
03089 int *value,
03090 int *sliderSize,
03091 int *increment,
03092 int *pageIncrement,
03093 int *minimum,
03094 int *maximum
03095 );
03096
03099 int MxSelectIcon (
03100 Widget pwidget,
03101 char *dialogname,
03102 char IconClass[16],
03103 char IconName[16],
03104 int minsize,
03105 int maxsize,
03106 UINT32 flags
03107 );
03108
03110 int MxSelectRegion (
03111 Widget parent,
03112 const RVC::OBJITEM& ObjItem,
03113 RVC::OBJTYPE ObjType,
03114 REGION2D& region
03115 );
03116
03119 void MxSetExitProcess ();
03120
03122 void MxSetNoExitProcess ();
03123
03125 void MxSetFocusToWidget (
03126 Widget widget
03127 );
03128
03130 inline void MxSetHelpCallback (
03131 Widget widget,
03132 const char *helpstr
03133 ) { XtAddCallback(widget,XmNhelpCallback,MxcbDisplayHelp,const_cast<char*>(helpstr)); }
03134
03136 void MxSetMenuItemCallbackData (
03137 MENUITEM *mi,
03138 void *cbdata
03139 );
03140
03142 void MxSetMenuItemUserData (
03143 MENUITEM *mi,
03144 void *udata
03145 );
03146
03150 void MxSetNamedUserData (
03151 Widget w,
03152 const char *name,
03153 void *data
03154 );
03155
03157 void MxSetSensitive (
03158 Widget w,
03159 int sensitive
03160 );
03161
03164 void MxSetTextEditable (
03165 Widget widget,
03166 int editable
03167 );
03168
03169
03170 void MxSetToolTipFromObjItem (
03171 Widget widget,
03172 const RVC::OBJITEM& ObjItem
03173 );
03174
03176 int MxSetupPolygonFitParms (
03177 Widget parent,
03178 const RVC::OBJITEM& SrcGeomObjItem,
03179 RGNELEMLIST *ElemList,
03180 int NumElemTypes,
03181 void (*dispreg)(const REGION2D*, void*),
03182 void *userdata
03183 );
03184
03186 int MxSetupClusterParms (
03187 Widget parent,
03188 const RVC::OBJITEM& SrcGeomObjItem,
03189 RGNELEMLIST *ElemList,
03190 int NumElemTypes,
03191 void (*dispreg)(const REGION2D*, void*),
03192 void *userdata
03193 );
03194
03196 int MxSetupBufferZoneParms (
03197 void *form,
03198 const RVC::OBJITEM& SrcObjItem,
03199 RGNELEMLIST *ElemList,
03200 int NumElemTypes,
03201 void (*dispreg)(const REGION2D*, void*),
03202 void *userdata
03203 );
03204
03206 int MxSetupRegionFromRangesParms (
03207 Widget parent,
03208 const RVC::OBJITEM& ObjItem,
03209 void (*dispreg)(const REGION2D*, void*),
03210 void *userdata
03211 );
03212
03214 int MxSetupRegionFromRastExpressParms (
03215 Widget parent,
03216 const RVC::OBJITEM& ObjItemRaster,
03217 void (*dispreg)(const REGION2D*, void*),
03218 void *userdata
03219 );
03220
03222 int MxSetupViewshedParms (
03223 MDLGPARENT parent,
03224 const RVC::OBJITEM& VectObjItem,
03225 UINT8 *setdata,
03226 INT32 NumEntries,
03227 void (*dispreg)(const REGION2D*, void*),
03228 void *userdata
03229 );
03230
03232 int MxSetupBasinParms (
03233 void *form,
03234 const RVC::OBJITEM& SrcVectObjItem,
03235 RGNELEMLIST *ElemList,
03236 int NumElemTypes,
03237 void (*dispreg)(const REGION2D*, void*),
03238 void *userdata
03239 );
03240
03242 int MxSetupTextureGrowthParms (
03243 MDLGPARENT parent,
03244 const RVC::OBJITEM& VectObjItem,
03245 RGNELEMLIST *ElemList,
03246 int NumElemTypes,
03247 void (*dispreg)(const REGION2D*, void*),
03248 void *userdata
03249 );
03250
03252 int MxSetupFloodParms (
03253 void *vparent,
03254 const RVC::OBJITEM& ObjItemVector,
03255 INT32 ActiveType,
03256 INT32 ActiveLine,
03257 void (*dispreg)(const REGION2D*, void*),
03258 void *userdata
03259 );
03260
03262 int MxSetupRasterCellsParms (
03263 MDLGPARENT parent,
03264 const RVC::OBJITEM& VectObjItem,
03265 RGNELEMLIST *ElemList,
03266 int NumElemTypes,
03267 void (*dispreg)(const REGION2D*, void*),
03268 void *userdata
03269 );
03270
03272 void MxSetWidgetColor (
03273 Widget widget,
03274 COLOR const& color
03275 );
03276
03278 void MxSetWindowFullScreen (
03279 Widget widget
03280 );
03281
03284 int MxSetWindowPosition (
03285 Widget widget,
03286 const char *group,
03287 const char *field
03288 );
03289
03292 int MxSetWindowPositionXY (
03293 Widget widget,
03294 const char *group,
03295 const char *field,
03296 int x,
03297 int y
03298 );
03299
03303 int MxSetWindowSize (
03304 Widget widget,
03305 const char *group,
03306 const char *field,
03307 int dftwidth,
03308 int dftheight
03309 );
03310
03312 void MxSetXmLabelString (
03313 Widget text,
03314 const MIUNICODE* const string
03315 );
03316
03319 void MxShowWidget (
03320 Widget w,
03321 bool show = true
03322 );
03323
03335 void MxStringDraw (
03336 Display *display,
03337 Window window,
03338 GC gc,
03339 INT32 x,
03340 INT32 y,
03341 const MIUNICODE* ucstr,
03342 TEXTBASEORIGIN origin,
03343 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
03344 );
03345
03346 #ifdef USE_XFT
03347 bool MxStringIsUsingAntiAlias ();
03348
03349 void MxStringDrawXft (
03350 Display *display,
03351 Window window,
03352 GC gc,
03353 INT32 x,
03354 INT32 y,
03355 const MIUNICODE* ucstr,
03356 TEXTBASEORIGIN origin,
03357 COLOR color,
03358 const LRECT2D& ClipRectangle,
03359 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
03360 );
03361 #endif
03362
03380 void MxStringDrawVisual (
03381 Display *display,
03382 Window window,
03383 GC gc,
03384 INT32 x,
03385 INT32 y,
03386 const MIUNICODE* ucstr,
03387 TEXTBASEORIGIN origin,
03388 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
03389 );
03390
03391 #ifdef USE_XFT
03392 void MxStringDrawVisualXft (
03393 Display *display,
03394 Window window,
03395 GC gc,
03396 INT32 x,
03397 INT32 y,
03398 const MIUNICODE* ucstr,
03399 TEXTBASEORIGIN origin,
03400 COLOR color,
03401 const LRECT2D& ClipRectangle,
03402 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
03403 );
03404 #endif
03405
03418 void MxStringExtents (
03419 const MIUNICODE* const ucstr,
03420 UINT32 *TextWidth,
03421 UINT32 *TextHeight,
03422 UINT32 *TextAscent,
03423 bool bHeightForClipping,
03424 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
03425 );
03426
03428 void MxStringMetrics (
03429 const MIUNICODE* const ucstr,
03430 TEXTMETRICS& metrics,
03431 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
03432 );
03433
03447 int MxStringWidth (
03448 const MIUNICODE* const ucstr,
03449 bool bInkMetrics = false,
03450 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
03451 );
03452
03459 int MxStringWidthVisual (
03460 const MIUNICODE* const ucstr,
03461 bool bInkMetrics = false,
03462 MGD::INTERFACETEXTSTYLE style = MGD::INTERFACETEXTSTYLE_Normal
03463 );
03464
03486 Widget MxTabPagesCreate (
03487 Widget pwidget,
03488 MxTABPAGEITEM *items,
03489 void *userdata,
03490 Arg *arglist,
03491 int argcount
03492 );
03493
03497 int MxTabPagesSetActiveItem (
03498 Widget tbwidget,
03499 int itemnum
03500 );
03501
03505 int MxTabPagesGetActiveItem (
03506 Widget tbwidget
03507 );
03508
03512 int MxTabPagesSetSensitiveItem (
03513 Widget tbwidget,
03514 int itemnum,
03515 int
03516 );
03517
03521 int MxTabPagesGetUserData (
03522 Widget tbwidget,
03523 void **userdata
03524 );
03525
03527 void MxTextClearXe (
03528 Widget xetext
03529 );
03530
03534 int MxTextEditBindXeText (
03535 void *vtehandle,
03536 Widget xetext
03537 );
03538
03542 int MxTextEditCheckSave (
03543 void *vtehandle
03544 );
03545
03549 int MxTextEditCreateHandle (
03550 void **vtehandle,
03551 UINT32 flags
03552 );
03553
03557 Widget MxTextEditCreateXeText (
03558 Widget pwidget,
03559 void *vtehandle,
03560 Arg *arglist,
03561 int argcount
03562 );
03563
03567 const MENUITEM * MxTextEditGetMenuEdit (
03568 void *vtehandle
03569 );
03570
03574 const MENUITEM * MxTextEditGetMenuFile (
03575 void *vtehandl,
03576 UINT32 flags
03577 );
03578
03580 int MxTextEditLoadFile (
03581 void *vtehandle,
03582 MIUNICODE *filename
03583 );
03584
03586 void MxTextEditSetCloseFunc (
03587 void *vtehandle,
03588 void (*CloseFunc)(void *),
03589 void *CloseData
03590 );
03591
03593 void MxTextEditSetDftExtn (
03594 void *vtehandle,
03595 char *dftextn
03596 );
03597
03599 void MxTextEditSetEncoding (
03600 void *vtehandle,
03601 char *encoding
03602 );
03603
03605 void MxTextSetFilePathXe (
03606 Widget xetext,
03607 const FILEPATH& filepath
03608 );
03609
03611 void MxTextSetObjItemXe (
03612 Widget xetext,
03613 const RVC::OBJITEM& objitem
03614 );
03615
03618 int MxThemeMapEdit (
03619 Widget pwidget,
03620 const RVC::OBJITEM& GeoObjItem,
03621 ELEMTYPE elemtype,
03622 INT16& StyAsTableNum,
03623 const UINT32 styletype = 0xFFFF
03624 );
03625
03627 void MxTimeOutInMainLoopSet (
03628 int val
03629 );
03630
03634 MIUNICODE *MxTitleGetString (
03635 Widget widget
03636 );
03637
03639 void MxTitleSetString (
03640 Widget widget,
03641 const MISTRING& string
03642 );
03643
03644 }
03645
03646 void MxTitleSetString (
03647 Widget widget,
03648 const MISTRING& string,
03649 bool ShowProcessID
03650 );
03651 extern "C" {
03652
03655 int MxTTFSymbolSelect (
03656 Widget widget,
03657 MISTRING& fontname,
03658 UINT16 *GlyphIndex,
03659 MIUNICODE *UnicodeNum
03660 );
03661
03664 Widget MxTopLevel (
03665 void
03666 );
03667
03670 void MxUngrabKeyboard (
03671 Display *display
03672 );
03673
03684 void MxUngrabPointer (
03685 Display *display
03686 );
03687
03690 void MxWaitForUnmap (
03691 Widget widget
03692 );
03693
03699 void MxWaitForUnmapWithIdleDelegate (
03700 Widget widget,
03701 DELEGATE_BOOL_UINT32 DelegateOnIdle
03702 );
03703
03706 Widget MxblCreate (
03707 Widget pwidget,
03708 int maxsize,
03709 Arg *formargs,
03710 int formn
03711 );
03712
03714 void MxblRefresh (
03715 Widget dform,
03716 INT32 start
03717 );
03718
03720 void MxblResize (
03721 Widget dform,
03722 INT32 numitems,
03723 INT32 start
03724 );
03725
03727 void MxblSetEditMode (
03728 Widget dform,
03729 UINT32 mode
03730 );
03731
03733 void MxblSetEditPosn (
03734 Widget dform,
03735 INT32 editposn
03736 );
03737
03739 void MxblSetEntryCallback (
03740 Widget dform,
03741 void (*EntryCB)(INT32, char*, void*),
03742 void *udata
03743 );
03744
03747 void MxblSetHighlightCallback (
03748 Widget dform,
03749 void (*HighlightCB)(INT32, void*),
03750 void *udata
03751 );
03752
03755 Widget MxCreateHTMLWidget(
03756 Widget parent,
03757 char *name,
03758 Arg *arg,
03759 int n
03760 );
03761
03762 #define WaitForUnmap(w) MxWaitForUnmap(w)
03763
03764 #ifndef GENERATING_DOXYGEN_OUTPUT
03765
03767 Widget _mxAppInitialize (
03768 int *argc,
03769 char *argv[],
03770 Arg *arglist,
03771 int argcount
03772 );
03773
03774 void _mxFixEncodingConverter ();
03775
03776 char * _mxReadDftFontList (
03777 void
03778 );
03779
03780 #endif
03781
03782
03783 }
03784
03785
03786
03787
03788
03790 inline void MxToggleButtonSetState (
03791 Widget tb,
03792 Boolean state,
03793 Boolean notify=FALSE
03794 ) { if (tb) XmToggleButtonSetState(tb,(state!=0),(notify!=0)); }
03795
03796
03797
03799
03800 #ifndef DEPRECATE_ALL
03804
03805 typedef void *TOOLTIPHANDLE;
03806
03807 #define TOOLTIPFLAG_NoEventHandler 0x00000002
03808
03811 DEPRECATED ERRVALUE MxToolTipAdd (
03812 Widget widget,
03813 const MIUNICODE *string,
03814 TOOLTIPHANDLE *tthandle = 0,
03815 UINT32 flags = 0
03816 );
03817
03829 DEPRECATED bool MxToolTipCheckMotion (
03830 TOOLTIPHANDLE handle,
03831 int x_root,
03832 int y_root,
03833 bool bAutoHide = true
03834 );
03835
03847 DEPRECATED bool MxToolTipCheckMotion (
03848 TOOLTIPHANDLE handle,
03849 const XEvent* ev,
03850 bool bAutoHide = true
03851 );
03852
03855 DEPRECATED ERRVALUE MxToolTipHide (
03856 TOOLTIPHANDLE handle,
03857 UINT32 flags = 0
03858 );
03859
03862 DEPRECATED bool MxToolTipIsVisible (
03863 TOOLTIPHANDLE handle
03864 );
03865
03868 DEPRECATED ERRVALUE MxToolTipShow (
03869 TOOLTIPHANDLE handle,
03870 const MIUNICODE *text,
03871 UINT32 flags = 0
03872 );
03873
03875 #endif
03876
03877
03878
03880 class XMSTR {
03881 public:
03882
03884 XMSTR (
03885 ): m_xmstr(0) { }
03886
03888 XMSTR (
03889 MISTRING const& str
03890 ): m_xmstr(MxCreateXmStringUC(str)) { }
03891
03893 XMSTR (
03894 MIUNICODE const* str
03895 ): m_xmstr(MxCreateXmStringUC(str)) { }
03896
03898 ~XMSTR (
03899 ) { Free(); }
03900
03902 XMSTR& operator= (
03903 MISTRING const& str
03904 ) { Free(); m_xmstr = MxCreateXmStringUC(str); return (*this); }
03905
03907 XMSTR& operator= (
03908 MIUNICODE const* str
03909 ) { Free(); m_xmstr = MxCreateXmStringUC(str); return (*this); }
03910
03912 XmString GetXmString (
03913 ) const { return (m_xmstr); }
03914
03916 void SetFromWidget (
03917 Widget widget
03918 ) { Free(); Arg arg; XtSetArg(arg,XmNlabelString,&m_xmstr); XtGetValues(widget,&arg,1); }
03919
03920 private:
03921 #ifndef GENERATING_DOXYGEN_OUTPUT
03922 XmString m_xmstr;
03923
03924 void Free (
03925 ) { if (m_xmstr != 0) XmStringFree(m_xmstr); }
03926
03927 XMSTR (const XMSTR&);
03928 XMSTR& operator= (const XMSTR&);
03929 #endif // GENERATING_DOXYGEN_OUTPUT
03930 };
03931
03932
03933
03934
03935
03936 #endif // #ifndef INC_MI32_XDEFNS_H