Xaw3_1SimpleMenP.h revision 749
222N/A/*
98N/A * $XConsortium: SimpleMenP.h,v 1.12 89/12/11 15:01:39 kit Exp $
306N/A *
98N/A * Copyright 1989 Massachusetts Institute of Technology
98N/A *
98N/A * Permission to use, copy, modify, distribute, and sell this software and its
98N/A * documentation for any purpose is hereby granted without fee, provided that
98N/A * the above copyright notice appear in all copies and that both that
98N/A * copyright notice and this permission notice appear in supporting
98N/A * documentation, and that the name of M.I.T. not be used in advertising or
98N/A * publicity pertaining to distribution of the software without specific,
98N/A * written prior permission. M.I.T. makes no representations about the
98N/A * suitability of this software for any purpose. It is provided "as is"
98N/A * without express or implied warranty.
98N/A *
98N/A * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
98N/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
98N/A * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
98N/A * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
98N/A * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
98N/A * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
98N/A *
98N/A */
98N/A
98N/A/*
98N/A * SimpleMenuP.h - Private Header file for SimpleMenu widget.
98N/A *
98N/A * Date: April 3, 1989
98N/A *
98N/A * By: Chris D. Peterson
561N/A * MIT X Consortium
98N/A * kit@expo.lcs.mit.edu
98N/A */
98N/A
561N/A#ifndef _SimpleMenuP_h
561N/A#define _SimpleMenuP_h
561N/A
493N/A#include <./Xaw3_1SimpleMenu.h>
222N/A#include <./Xaw3_1SmeP.h>
306N/A#include <X11/ShellP.h>
222N/A
306N/A#define ForAllChildren(smw, childP) \
372N/A for ( (childP) = (SmeObject *) (smw)->composite.children ; \
561N/A (childP) < (SmeObject *) ( (smw)->composite.children + \
561N/A (smw)->composite.num_children ) ; \
561N/A (childP)++ )
561N/A
561N/Atypedef struct {
306N/A XtPointer extension; /* For future needs. */
561N/A} SimpleMenuClassPart;
561N/A
561N/Atypedef struct _SimpleMenuClassRec {
561N/A CoreClassPart core_class;
561N/A CompositeClassPart composite_class;
561N/A ShellClassPart shell_class;
561N/A OverrideShellClassPart override_shell_class;
306N/A SimpleMenuClassPart simpleMenu_class;
561N/A} SimpleMenuClassRec;
561N/A
306N/Aextern SimpleMenuClassRec simpleMenuClassRec;
561N/A
561N/Atypedef struct _SimpleMenuPart {
561N/A
561N/A /* resources */
306N/A
561N/A String label_string; /* The string for the label or NULL. */
561N/A SmeObject label; /* If label_string is non-NULL then this is
561N/A the label widget. */
561N/A WidgetClass label_class; /* Widget Class of the menu label object. */
561N/A
561N/A Dimension top_margin; /* Top and bottom margins. */
561N/A Dimension bottom_margin;
561N/A Dimension row_height; /* height of each row (menu entry) */
561N/A
561N/A Cursor cursor; /* The menu's cursor. */
561N/A SmeObject popup_entry; /* The entry to position the cursor on for
561N/A when using XawPositionSimpleMenu. */
561N/A Boolean menu_on_screen; /* Force the menus to be fully on the screen.*/
561N/A int backing_store; /* What type of backing store to use. */
561N/A
98N/A /* private state */
493N/A
493N/A Boolean recursive_set_values; /* contain a possible infinite loop. */
98N/A
493N/A Boolean menu_width; /* If true then force width to remain
493N/A core.width */
380N/A Boolean menu_height; /* Just like menu_width, but for height. */
493N/A
493N/A SmeObject entry_set; /* The entry that is currently set or
493N/A highlighted. */
493N/A} SimpleMenuPart;
typedef struct _SimpleMenuRec {
CorePart core;
CompositePart composite;
ShellPart shell;
OverrideShellPart override;
SimpleMenuPart simple_menu;
} SimpleMenuRec;
#endif /* _SimpleMenuP_h */