17a84e134Smrg/*
27a84e134Smrg *
37a84e134SmrgCopyright 1989, 1994, 1998  The Open Group
47a84e134Smrg
57a84e134SmrgPermission to use, copy, modify, distribute, and sell this software and its
67a84e134Smrgdocumentation for any purpose is hereby granted without fee, provided that
77a84e134Smrgthe above copyright notice appear in all copies and that both that
87a84e134Smrgcopyright notice and this permission notice appear in supporting
97a84e134Smrgdocumentation.
107a84e134Smrg
117a84e134SmrgThe above copyright notice and this permission notice shall be included in
127a84e134Smrgall copies or substantial portions of the Software.
137a84e134Smrg
147a84e134SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
157a84e134SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
167a84e134SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
177a84e134SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
187a84e134SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
197a84e134SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
207a84e134Smrg
217a84e134SmrgExcept as contained in this notice, the name of The Open Group shall not be
227a84e134Smrgused in advertising or otherwise to promote the sale, use or other dealings
237a84e134Smrgin this Software without prior written authorization from The Open Group.
247a84e134Smrg *
257a84e134Smrg * Author:  Chris D. Peterson, MIT X Consortium
267a84e134Smrg */
277a84e134Smrg
287a84e134Smrg/*
297a84e134Smrg * SimpleMenu.h - Public Header file for SimpleMenu widget.
307a84e134Smrg *
317a84e134Smrg * This is the public header file for the Athena SimpleMenu widget.
327a84e134Smrg * It is intended to provide one pane pulldown and popup menus within
337a84e134Smrg * the framework of the X Toolkit.  As the name implies it is a first and
347a84e134Smrg * by no means complete implementation of menu code. It does not attempt to
357a84e134Smrg * fill the needs of all applications, but does allow a resource oriented
367a84e134Smrg * interface to menus.
377a84e134Smrg *
387a84e134Smrg * Date:    April 3, 1989
397a84e134Smrg *
407a84e134Smrg * By:      Chris D. Peterson
41421c997bSmrg *          MIT X Consortium
427a84e134Smrg *          kit@expo.lcs.mit.edu
437a84e134Smrg */
447a84e134Smrg
457a84e134Smrg#ifndef _SimpleMenu_h
467a84e134Smrg#define _SimpleMenu_h
477a84e134Smrg
487a84e134Smrg#include <X11/Shell.h>
497a84e134Smrg#include <X11/Xmu/Converters.h>
507a84e134Smrg
517a84e134Smrg/*
527a84e134Smrg * SimpleMenu widget
537a84e134Smrg */
547a84e134Smrg
557a84e134Smrg/* Resources:
567a84e134Smrg
577a84e134Smrg Name		     Class		RepType		Default Value
587a84e134Smrg ----		     -----		-------		-------------
597a84e134Smrg background	     Background		Pixel		XtDefaultBackground
607a84e134Smrg backgroundPixmap    BackgroundPixmap	Pixmap          None
617a84e134Smrg borderColor	     BorderColor	Pixel		XtDefaultForeground
627a84e134Smrg borderPixmap	     BorderPixmap	Pixmap		None
637a84e134Smrg borderWidth	     BorderWidth	Dimension	1
647a84e134Smrg bottomMargin        VerticalMargins    Dimension       VerticalSpace
657a84e134Smrg columnWidth         ColumnWidth        Dimension       Width of widest text
667a84e134Smrg cursor              Cursor             Cursor          None
677a84e134Smrg destroyCallback     Callback		Pointer		NULL
687a84e134Smrg displayList	     DisplayList	XawDisplayList*	NULL
697a84e134Smrg height		     Height		Dimension	0
707a84e134Smrg label               Label              String          NULL (No label)
717a84e134Smrg labelClass          LabelClass         Pointer         smeBSBObjectClass
727a84e134Smrg leftMargin	     HorizontalMargins	Dimension	0
737a84e134Smrg mappedWhenManaged   MappedWhenManaged	Boolean		True
747a84e134Smrg rightMargin	     HorizontalMargins	Dimension	0
757a84e134Smrg rowHeight           RowHeight          Dimension       Height of Font
767a84e134Smrg sensitive	     Sensitive		Boolean		True
777a84e134Smrg topMargin           VerticalMargins    Dimension       VerticalSpace
787a84e134Smrg width		     Width		Dimension	0
797a84e134Smrg x		     Position		Position	0
807a84e134Smrg y		     Position		Position	0
817a84e134Smrg
827a84e134Smrg*/
837a84e134Smrg
847a84e134Smrgtypedef struct _SimpleMenuClassRec*	SimpleMenuWidgetClass;
857a84e134Smrgtypedef struct _SimpleMenuRec*		SimpleMenuWidget;
867a84e134Smrg
877a84e134Smrgextern WidgetClass simpleMenuWidgetClass;
887a84e134Smrg
897a84e134Smrg#define XtNcursor "cursor"
907a84e134Smrg#define XtNbottomMargin "bottomMargin"
917a84e134Smrg#define XtNcolumnWidth "columnWidth"
927a84e134Smrg#define XtNlabelClass "labelClass"
937a84e134Smrg#define XtNmenuOnScreen "menuOnScreen"
947a84e134Smrg#define XtNpopupOnEntry "popupOnEntry"
957a84e134Smrg#define XtNrowHeight "rowHeight"
967a84e134Smrg#define XtNtopMargin "topMargin"
977a84e134Smrg#define XtNleftMargin "leftMargin"
987a84e134Smrg#define XtNrightMargin "rightMargin"
997a84e134Smrg
1007a84e134Smrg#define XtCColumnWidth "ColumnWidth"
1017a84e134Smrg#define XtCLabelClass "LabelClass"
1027a84e134Smrg#define XtCMenuOnScreen "MenuOnScreen"
1037a84e134Smrg#define XtCPopupOnEntry "PopupOnEntry"
1047a84e134Smrg#define XtCRowHeight "RowHeight"
1057a84e134Smrg
1067a84e134Smrg#define XtCVerticalMargins "VerticalMargins"
1077a84e134Smrg
1087a84e134Smrg#ifndef OLDXAW
1097a84e134Smrg#define XtCHorizontalMargins "HorizontalMargins"
1107a84e134Smrg#define XawNdisplayList "displayList"
1117a84e134Smrg#define XawCDisplayList "DisplayList"
1127a84e134Smrg#define XawRDisplayList "XawDisplayList"
1137a84e134Smrg#endif
1147a84e134Smrg
1157a84e134Smrg/*
1167a84e134Smrg * Public Functions
1177a84e134Smrg */
1187a84e134Smrg
1197a84e134Smrg_XFUNCPROTOBEGIN
1207a84e134Smrg
1217a84e134Smrg/*
1227a84e134Smrg * Function:
1237a84e134Smrg *	XawSimpleMenuAddGlobalActions
1247a84e134Smrg *
1257a84e134Smrg * Parameters:
1267a84e134Smrg *	app_con - appcontext
1277a84e134Smrg *
1287a84e134Smrg * Description:
1297a84e134Smrg *	Adds the global actions to the simple menu widget.
1307a84e134Smrg */
1317a84e134Smrgvoid XawSimpleMenuAddGlobalActions
1327a84e134Smrg(
1337a84e134Smrg XtAppContext		app_con
1347a84e134Smrg );
1357a84e134Smrg
1367a84e134Smrg/*
1377a84e134Smrg * Function:
1387a84e134Smrg *	XawSimpleMenuGetActiveEntry
1397a84e134Smrg *
1407a84e134Smrg * Parameters:
1417a84e134Smrg *	w - smw widget
1427a84e134Smrg *
1437a84e134Smrg * Description:
1447a84e134Smrg *	Gets the currently active (set) entry.
1457a84e134Smrg *
1467a84e134Smrg * Returns:
1477a84e134Smrg *	The currently set entry or NULL if none is set
1487a84e134Smrg */
1497a84e134SmrgWidget XawSimpleMenuGetActiveEntry
1507a84e134Smrg(
1517a84e134Smrg Widget			w
1527a84e134Smrg );
1537a84e134Smrg
1547a84e134Smrg/*
1557a84e134Smrg * Function:
1567a84e134Smrg *	XawSimpleMenuClearActiveEntry
1577a84e134Smrg *
1587a84e134Smrg * Parameters:
1597a84e134Smrg *	w - smw widget
1607a84e134Smrg *
1617a84e134Smrg * Description:
1627a84e134Smrg *	Unsets the currently active (set) entry.
1637a84e134Smrg */
1647a84e134Smrgvoid XawSimpleMenuClearActiveEntry
1657a84e134Smrg(
1667a84e134Smrg Widget			w
1677a84e134Smrg);
1687a84e134Smrg
1697a84e134Smrg_XFUNCPROTOEND
1707a84e134Smrg
1717a84e134Smrg#endif /* _SimpleMenu_h */
172