1 /* $Id: misc.h,v 1.11 2001/11/12 14:04:27 amai Exp $ */
3 #define TEXT_IS_BLANK 1
4 #define TEXT_NOT_NUMBER 2
6 /* maximum length for a window geometry string */
7 #define MAX_GEOM_STRING_LEN 24
9 /* Maximum length for a menu accelerator string.
10 Which e.g. can be parsed by misc.c:parseAccelString()
11 (how many modifier keys can you hold down at once?) */
12 #define MAX_ACCEL_LEN 100
15 void AddMotifCloseCallback(Widget shell
, XtCallbackProc closeCB
, void *arg
);
16 void SuppressPassiveGrabWarnings(void);
17 void PopDownBugPatch(Widget w
);
18 void RemapDeleteKey(Widget w
);
19 void SetDeleteRemap(int state
);
20 void RealizeWithoutForcingPosition(Widget shell
);
21 void ManageDialogCenteredOnPointer(Widget dialogChild
);
22 void SetPointerCenteredDialogs(int state
);
23 void RaiseShellWindow(Widget shell
);
24 void RaiseWindow(Display
*display
, Window w
);
25 void AddDialogMnemonicHandler(Widget dialog
, int unmodifiedToo
);
26 void RemoveDialogMnemonicHandler(Widget dialog
);
27 void AccelLockBugPatch(Widget topWidget
, Widget topMenuContainer
);
28 void UpdateAccelLockPatch(Widget topWidget
, Widget newButton
);
29 char *GetXmStringText(XmString fromString
);
30 XFontStruct
*GetDefaultFontStruct(XmFontList font
);
31 XmString
* StringTable(int count
, ...);
32 void FreeStringTable(XmString
*table
);
33 void SimulateButtonPress(Widget widget
);
34 Widget
AddMenuItem(Widget parent
, char *name
, char *label
, char mnemonic
,
35 char *acc
, char *accText
, XtCallbackProc callback
, void *cbArg
);
36 Widget
AddMenuToggle(Widget parent
, char *name
, char *label
, char mnemonic
,
37 char *acc
, char *accText
, XtCallbackProc callback
, void *cbArg
,int set
);
38 Widget
AddMenuSeparator(Widget parent
, char *name
);
39 Widget
AddSubMenu(Widget parent
, char *name
, char *label
, char mnemonic
);
40 void SetIntLabel(Widget label
, int value
);
41 void SetFloatLabel(Widget label
, double value
);
42 void SetIntText(Widget text
, int value
);
43 void SetFloatText(Widget text
, double value
);
44 int GetFloatText(Widget text
, double *value
);
45 int GetIntText(Widget text
, int *value
);
46 int GetFloatTextWarn(Widget text
, double *value
, const char *fieldName
, int warnBlank
);
47 int GetIntTextWarn(Widget text
, int *value
, const char *fieldName
, int warnBlank
);
48 int TextWidgetIsBlank(Widget textW
);
49 void MakeSingleLineTextW(Widget textW
);
50 void BeginWait(Widget topCursorWidget
);
51 void EndWait(Widget topCursorWidget
);
52 void PasswordText(Widget w
, char *passTxt
);
53 void AddHistoryToTextWidget(Widget textW
, char ***historyList
, int *nItems
);
54 void AddToHistoryList(char *newItem
, char ***historyList
, int *nItems
);
55 void CreateGeometryString(char *string
, int x
, int y
,
56 int width
, int height
, int bitmask
);
57 void FindBestVisual(Display
*display
, const char *appName
, const char *appClass
,
58 Visual
**visual
, int *depth
, Colormap
*colormap
);
59 Widget
CreateDialogShell(Widget parent
, char *name
, ArgList arglist
,
61 Widget
CreatePopupMenu(Widget parent
, char *name
, ArgList arglist
,
63 Widget
CreatePulldownMenu(Widget parent
, char *name
, ArgList arglist
,
65 Widget
CreatePromptDialog(Widget parent
, char *name
, ArgList arglist
,
67 Widget
CreateSelectionDialog(Widget parent
, char *name
, ArgList arglist
,
69 Widget
CreateFormDialog(Widget parent
, char *name
, ArgList arglist
,
71 Widget
CreateFileSelectionDialog(Widget parent
, char *name
, ArgList arglist
,
73 Widget
CreateQuestionDialog(Widget parent
, char *name
, ArgList arglist
,
75 Widget
CreateMessageDialog(Widget parent
, char *name
, ArgList arglist
,
77 Widget
CreateErrorDialog(Widget parent
, char *name
, ArgList arglist
,
79 Widget
CreateShellWithBestVis(String appName
, String appClass
,
80 WidgetClass
class, Display
*display
, ArgList args
, Cardinal nArgs
);