2 * $XConsortium: SimpleMenP.h,v 1.12 89/12/11 15:01:39 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.
26 * SimpleMenuP.h - Private Header file for SimpleMenu widget.
30 * By: Chris D. Peterson
32 * kit@expo.lcs.mit.edu
35 #ifndef _SimpleMenuP_h
36 #define _SimpleMenuP_h
38 #include <./Xaw3_1SimpleMenu.h>
39 #include <./Xaw3_1SmeP.h>
40 #include <X11/ShellP.h>
42 #define ForAllChildren(smw, childP) \
43 for ( (childP) = (SmeObject *) (smw)->composite.children ; \
44 (childP) < (SmeObject *) ( (smw)->composite.children + \
45 (smw)->composite.num_children ) ; \
49 XtPointer extension
; /* For future needs. */
50 } SimpleMenuClassPart
;
52 typedef struct _SimpleMenuClassRec
{
53 CoreClassPart core_class
;
54 CompositeClassPart composite_class
;
55 ShellClassPart shell_class
;
56 OverrideShellClassPart override_shell_class
;
57 SimpleMenuClassPart simpleMenu_class
;
60 extern SimpleMenuClassRec simpleMenuClassRec
;
62 typedef struct _SimpleMenuPart
{
66 String label_string
; /* The string for the label or NULL. */
67 SmeObject label
; /* If label_string is non-NULL then this is
69 WidgetClass label_class
; /* Widget Class of the menu label object. */
71 Dimension top_margin
; /* Top and bottom margins. */
72 Dimension bottom_margin
;
73 Dimension row_height
; /* height of each row (menu entry) */
75 Cursor cursor
; /* The menu's cursor. */
76 SmeObject popup_entry
; /* The entry to position the cursor on for
77 when using XawPositionSimpleMenu. */
78 Boolean menu_on_screen
; /* Force the menus to be fully on the screen.*/
79 int backing_store
; /* What type of backing store to use. */
83 Boolean recursive_set_values
; /* contain a possible infinite loop. */
85 Boolean menu_width
; /* If true then force width to remain
87 Boolean menu_height
; /* Just like menu_width, but for height. */
89 SmeObject entry_set
; /* The entry that is currently set or
93 typedef struct _SimpleMenuRec
{
95 CompositePart composite
;
97 OverrideShellPart override
;
98 SimpleMenuPart simple_menu
;
101 #endif /* _SimpleMenuP_h */