2 * $XConsortium: SimpleMenu.h,v 1.17 89/12/11 15:01:55 kit Exp $
4 * Copyright 1989 Massachusetts Institute of Technology
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of M.I.T. not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission. M.I.T. makes no representations about the
13 * suitability of this software for any purpose. It is provided "as is"
14 * without express or implied warranty.
16 * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
18 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
19 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 * Author: Chris D. Peterson, MIT X Consortium
27 * SimpleMenu.h - Public Header file for SimpleMenu widget.
29 * This is the public header file for the Athena SimpleMenu widget.
30 * It is intended to provide one pane pulldown and popup menus within
31 * the framework of the X Toolkit. As the name implies it is a first and
32 * by no means complete implementation of menu code. It does not attempt to
33 * fill the needs of all applications, but does allow a resource oriented
38 * By: Chris D. Peterson
40 * kit@expo.lcs.mit.edu
46 #include <X11/Shell.h>
47 #include <X11/Xmu/Converters.h>
49 /****************************************************************
53 ****************************************************************/
55 /* SimpleMenu Resources:
57 Name Class RepType Default Value
58 ---- ----- ------- -------------
59 background Background Pixel XtDefaultBackground
60 backgroundPixmap BackgroundPixmap Pixmap None
61 borderColor BorderColor Pixel XtDefaultForeground
62 borderPixmap BorderPixmap Pixmap None
63 borderWidth BorderWidth Dimension 1
64 bottomMargin VerticalMargins Dimension VerticalSpace
65 columnWidth ColumnWidth Dimension Width of widest text
66 cursor Cursor Cursor None
67 destroyCallback Callback Pointer NULL
68 height Height Dimension 0
69 label Label String NULL (No label)
70 labelClass LabelClass Pointer smeBSBObjectClass
71 mappedWhenManaged MappedWhenManaged Boolean True
72 rowHeight RowHeight Dimension Height of Font
73 sensitive Sensitive Boolean True
74 topMargin VerticalMargins Dimension VerticalSpace
75 width Width Dimension 0
76 x Position Position 0n
81 typedef struct _SimpleMenuClassRec
* SimpleMenuWidgetClass
;
82 typedef struct _SimpleMenuRec
* SimpleMenuWidget
;
84 extern WidgetClass simpleMenuWidgetClass
;
86 #define XtNcursor "cursor"
87 #define XtNbottomMargin "bottomMargin"
88 #define XtNcolumnWidth "columnWidth"
89 #define XtNlabelClass "labelClass"
90 #define XtNmenuOnScreen "menuOnScreen"
91 #define XtNpopupOnEntry "popupOnEntry"
92 #define XtNrowHeight "rowHeight"
93 #define XtNtopMargin "topMargin"
95 #define XtCColumnWidth "ColumnWidth"
96 #define XtCLabelClass "LabelClass"
97 #define XtCMenuOnScreen "MenuOnScreen"
98 #define XtCPopupOnEntry "PopupOnEntry"
99 #define XtCRowHeight "RowHeight"
100 #define XtCVerticalMargins "VerticalMargins"
102 /************************************************************
106 ************************************************************/
108 /* Function Name: XawSimpleMenuAddGlobalActions
109 * Description: adds the global actions to the simple menu widget.
110 * Arguments: app_con - the appcontext.
115 XawSimpleMenuAddGlobalActions(/* app_con */);
117 XtAppContext app_con;
120 /* Function Name: XawSimpleMenuGetActiveEntry
121 * Description: Gets the currently active (set) entry.
122 * Arguments: w - the smw widget.
123 * Returns: the currently set entry or NULL if none is set.
127 XawSimpleMenuGetActiveEntry( /* w */);
132 /* Function Name: XawSimpleMenuClearActiveEntry
133 * Description: Unsets the currently active (set) entry.
134 * Arguments: w - the smw widget.
139 XawSimpleMenuClearActiveEntry(/* w */);
144 #endif /* _SimpleMenu_h */