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 */
267a84e134Smrg
277a84e134Smrg/*
287a84e134Smrg * SimpleMenuP.h - Private Header file for SimpleMenu widget.
297a84e134Smrg *
307a84e134Smrg * Date:    April 3, 1989
317a84e134Smrg *
327a84e134Smrg * By:      Chris D. Peterson
337a84e134Smrg *          MIT X Consortium
347a84e134Smrg *          kit@expo.lcs.mit.edu
357a84e134Smrg */
367a84e134Smrg
377a84e134Smrg#ifndef _SimpleMenuP_h
387a84e134Smrg#define _SimpleMenuP_h
397a84e134Smrg
407a84e134Smrg#include <X11/Xaw/SimpleMenu.h>
417a84e134Smrg#include <X11/Xaw/SmeP.h>
427a84e134Smrg#include <X11/ShellP.h>
437a84e134Smrg#include <X11/Xaw/XawInit.h>
447a84e134Smrg
457a84e134Smrgtypedef struct {
467a84e134Smrg    XtPointer extension;		/* For future needs */
477a84e134Smrg} SimpleMenuClassPart;
487a84e134Smrg
497a84e134Smrgtypedef struct _SimpleMenuClassRec {
507a84e134Smrg    CoreClassPart	    core_class;
517a84e134Smrg    CompositeClassPart	    composite_class;
527a84e134Smrg    ShellClassPart	    shell_class;
537a84e134Smrg    OverrideShellClassPart  override_shell_class;
547a84e134Smrg    SimpleMenuClassPart	    simpleMenu_class;
557a84e134Smrg} SimpleMenuClassRec;
567a84e134Smrg
577a84e134Smrgextern SimpleMenuClassRec simpleMenuClassRec;
587a84e134Smrg
597a84e134Smrgtypedef struct _SimpleMenuPart {
607a84e134Smrg  /* resources */
617a84e134Smrg    String	label_string;	/* The string for the label or NULL */
627a84e134Smrg    SmeObject	label;		/* If label_string is non-NULL then this is
637a84e134Smrg				   the label widget */
647a84e134Smrg    WidgetClass	label_class;	/* Widget Class of the menu label object */
657a84e134Smrg    Dimension	top_margin;	/* Top and bottom margins */
667a84e134Smrg    Dimension	bottom_margin;
677a84e134Smrg    Dimension	row_height;	/* height of each row (menu entry) */
687a84e134Smrg    Cursor	cursor;		/* The menu's cursor */
697a84e134Smrg    SmeObject	popup_entry;	/* The entry to position the cursor on for
707a84e134Smrg				   when using XawPositionSimpleMenu */
717a84e134Smrg    Boolean	menu_on_screen;	/* Force the menus to be fully on the screen*/
727a84e134Smrg    int		backing_store;	/* What type of backing store to use */
737a84e134Smrg
747a84e134Smrg    /* private */
757a84e134Smrg    Boolean	recursive_set_values; /* contain a possible infinite loop */
76421c997bSmrg    Boolean	menu_width;	/* If true then force width to remain
777a84e134Smrg				   core.width */
787a84e134Smrg    Boolean	menu_height;	/* Just like menu_width, but for height */
797a84e134Smrg    SmeObject	entry_set;	/* The entry that is currently set or
807a84e134Smrg				   highlighted */
817a84e134Smrg#ifndef OLDXAW
827a84e134Smrg    Dimension	left_margin;
837a84e134Smrg    Dimension	right_margin;
847a84e134Smrg    XawDisplayList *display_list;
857a84e134Smrg    Widget	sub_menu;
867a84e134Smrg    unsigned	char state;
875b16253fSmrg    XtPointer pad[4];	/* for future use and keep binary compatibility */
887a84e134Smrg#endif
897a84e134Smrg} SimpleMenuPart;
907a84e134Smrg
917a84e134Smrgtypedef struct _SimpleMenuRec {
927a84e134Smrg    CorePart		core;
93421c997bSmrg    CompositePart	composite;
947a84e134Smrg    ShellPart		shell;
957a84e134Smrg    OverrideShellPart	override;
967a84e134Smrg    SimpleMenuPart	simple_menu;
977a84e134Smrg} SimpleMenuRec;
987a84e134Smrg
997a84e134Smrg#endif /* _SimpleMenuP_h */
100