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