swi-prolog: update to 9.2.9
[oi-userland.git] / components / x11 / libXaw5 / src / SimpleMenu.h
blob8f527b851a4d6dc56cdfa974aeca63d0735feb59
1 /*
2 * $XConsortium: SimpleMenu.h,v 1.22 94/04/17 20:12:47 kaleb Exp $
4 Copyright (c) 1989, 1994 X Consortium
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 Except as contained in this notice, the name of the X Consortium shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from the X Consortium.
27 * Author: Chris D. Peterson, MIT X Consortium
31 * SimpleMenu.h - Public Header file for SimpleMenu widget.
33 * This is the public header file for the Athena SimpleMenu widget.
34 * It is intended to provide one pane pulldown and popup menus within
35 * the framework of the X Toolkit. As the name implies it is a first and
36 * by no means complete implementation of menu code. It does not attempt to
37 * fill the needs of all applications, but does allow a resource oriented
38 * interface to menus.
40 * Date: April 3, 1989
42 * By: Chris D. Peterson
43 * MIT X Consortium
44 * kit@expo.lcs.mit.edu
47 #ifndef _SimpleMenu_h
48 #define _SimpleMenu_h
50 #include <X11/Shell.h>
51 #include <X11/Xmu/Converters.h>
53 /****************************************************************
55 * SimpleMenu widget
57 ****************************************************************/
59 /* SimpleMenu Resources:
61 Name Class RepType Default Value
62 ---- ----- ------- -------------
63 background Background Pixel XtDefaultBackground
64 backgroundPixmap BackgroundPixmap Pixmap None
65 borderColor BorderColor Pixel XtDefaultForeground
66 borderPixmap BorderPixmap Pixmap None
67 borderWidth BorderWidth Dimension 1
68 bottomMargin VerticalMargins Dimension VerticalSpace
69 columnWidth ColumnWidth Dimension Width of widest text
70 cursor Cursor Cursor None
71 destroyCallback Callback Pointer NULL
72 height Height Dimension 0
73 label Label String NULL (No label)
74 labelClass LabelClass Pointer smeBSBObjectClass
75 mappedWhenManaged MappedWhenManaged Boolean True
76 rowHeight RowHeight Dimension Height of Font
77 sensitive Sensitive Boolean True
78 topMargin VerticalMargins Dimension VerticalSpace
79 width Width Dimension 0
80 x Position Position 0n
81 y Position Position 0
85 typedef struct _SimpleMenuClassRec* SimpleMenuWidgetClass;
86 typedef struct _SimpleMenuRec* SimpleMenuWidget;
88 extern WidgetClass simpleMenuWidgetClass;
90 #define XtNcursor "cursor"
91 #define XtNbottomMargin "bottomMargin"
92 #define XtNcolumnWidth "columnWidth"
93 #define XtNlabelClass "labelClass"
94 #define XtNmenuOnScreen "menuOnScreen"
95 #define XtNpopupOnEntry "popupOnEntry"
96 #define XtNrowHeight "rowHeight"
97 #define XtNtopMargin "topMargin"
99 #define XtCColumnWidth "ColumnWidth"
100 #define XtCLabelClass "LabelClass"
101 #define XtCMenuOnScreen "MenuOnScreen"
102 #define XtCPopupOnEntry "PopupOnEntry"
103 #define XtCRowHeight "RowHeight"
104 #define XtCVerticalMargins "VerticalMargins"
106 /************************************************************
108 * Public Functions.
110 ************************************************************/
112 _XFUNCPROTOBEGIN
114 /* Function Name: XawSimpleMenuAddGlobalActions
115 * Description: adds the global actions to the simple menu widget.
116 * Arguments: app_con - the appcontext.
117 * Returns: none.
120 extern void XawSimpleMenuAddGlobalActions(
121 #if NeedFunctionPrototypes
122 XtAppContext /* app_con */
123 #endif
126 /* Function Name: XawSimpleMenuGetActiveEntry
127 * Description: Gets the currently active (set) entry.
128 * Arguments: w - the smw widget.
129 * Returns: the currently set entry or NULL if none is set.
132 extern Widget XawSimpleMenuGetActiveEntry(
133 #if NeedFunctionPrototypes
134 Widget /* w */
135 #endif
138 /* Function Name: XawSimpleMenuClearActiveEntry
139 * Description: Unsets the currently active (set) entry.
140 * Arguments: w - the smw widget.
141 * Returns: none.
144 extern void XawSimpleMenuClearActiveEntry(
145 #if NeedFunctionPrototypes
146 Widget /* w */
147 #endif
150 _XFUNCPROTOEND
152 #endif /* _SimpleMenu_h */