1/*
2 *
3Copyright 1989, 1994, 1998  The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall not be
22used in advertising or otherwise to promote the sale, use or other dealings
23in this Software without prior written authorization from The Open Group.
24 *
25 */
26
27/*
28 * SimpleMenuP.h - Private Header file for SimpleMenu widget.
29 *
30 * Date:    April 3, 1989
31 *
32 * By:      Chris D. Peterson
33 *          MIT X Consortium
34 *          kit@expo.lcs.mit.edu
35 */
36
37#ifndef _SimpleMenuP_h
38#define _SimpleMenuP_h
39
40#include <X11/Xaw/SimpleMenu.h>
41#include <X11/Xaw/SmeP.h>
42#include <X11/ShellP.h>
43#include <X11/Xaw/XawInit.h>
44
45typedef struct {
46    XtPointer extension;		/* For future needs */
47} SimpleMenuClassPart;
48
49typedef struct _SimpleMenuClassRec {
50    CoreClassPart	    core_class;
51    CompositeClassPart	    composite_class;
52    ShellClassPart	    shell_class;
53    OverrideShellClassPart  override_shell_class;
54    SimpleMenuClassPart	    simpleMenu_class;
55} SimpleMenuClassRec;
56
57extern SimpleMenuClassRec simpleMenuClassRec;
58
59typedef struct _SimpleMenuPart {
60  /* resources */
61    String	label_string;	/* The string for the label or NULL */
62    SmeObject	label;		/* If label_string is non-NULL then this is
63				   the label widget */
64    WidgetClass	label_class;	/* Widget Class of the menu label object */
65    Dimension	top_margin;	/* Top and bottom margins */
66    Dimension	bottom_margin;
67    Dimension	row_height;	/* height of each row (menu entry) */
68    Cursor	cursor;		/* The menu's cursor */
69    SmeObject	popup_entry;	/* The entry to position the cursor on for
70				   when using XawPositionSimpleMenu */
71    Boolean	menu_on_screen;	/* Force the menus to be fully on the screen*/
72    int		backing_store;	/* What type of backing store to use */
73
74    /* private */
75    Boolean	recursive_set_values; /* contain a possible infinite loop */
76    Boolean	menu_width;	/* If true then force width to remain
77				   core.width */
78    Boolean	menu_height;	/* Just like menu_width, but for height */
79    SmeObject	entry_set;	/* The entry that is currently set or
80				   highlighted */
81#ifndef OLDXAW
82    Dimension	left_margin;
83    Dimension	right_margin;
84    XawDisplayList *display_list;
85    Widget	sub_menu;
86    unsigned	char state;
87    XtPointer pad[4];	/* for future use and keep binary compatibility */
88#endif
89} SimpleMenuPart;
90
91typedef struct _SimpleMenuRec {
92    CorePart		core;
93    CompositePart	composite;
94    ShellPart		shell;
95    OverrideShellPart	override;
96    SimpleMenuPart	simple_menu;
97} SimpleMenuRec;
98
99#endif /* _SimpleMenuP_h */
100