1 /* 2 * $XConsortium: SimpleMenP.h,v 1.14 94/04/17 20:12:44 kaleb Exp $ 3 * 4 Copyright (c) 1989, 1994 X Consortium 5 6 Permission is hereby granted, free of charge, to any person obtaining a copy 7 of this software and associated documentation files (the "Software"), to deal 8 in the Software without restriction, including without limitation the rights 9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 copies of the Software, and to permit persons to whom the Software is 11 furnished to do so, subject to the following conditions: 12 13 The above copyright notice and this permission notice shall be included in 14 all copies or substantial portions of the Software. 15 16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 23 Except as contained in this notice, the name of the X Consortium shall not be 24 used in advertising or otherwise to promote the sale, use or other dealings 25 in this Software without prior written authorization from the X Consortium. 26 * 27 */ 28 /* MODIFIED FOR N*XTSTEP LOOK */ 29 /* Modifications Copyright (c) 1996 by Alfredo Kojima */ 30 /***********************************************************/ 31 32 /* 33 * SimpleMenuP.h - Private Header file for SimpleMenu widget. 34 * 35 * Date: April 3, 1989 36 * 37 * By: Chris D. Peterson 38 * MIT X Consortium 39 * kit@expo.lcs.mit.edu 40 */ 41 42 #ifndef _SimpleMenuP_h 43 #define _SimpleMenuP_h 44 45 #include <X11/neXtaw/SimpleMenu.h> 46 #include <X11/neXtaw/SmeP.h> 47 #include <X11/neXtaw/ThreeD.h> 48 49 #include <X11/ShellP.h> 50 51 typedef struct { 52 XtPointer extension; /* For future needs. */ 53 } SimpleMenuClassPart; 54 55 typedef struct _SimpleMenuClassRec { 56 CoreClassPart core_class; 57 CompositeClassPart composite_class; 58 ShellClassPart shell_class; 59 OverrideShellClassPart override_shell_class; 60 SimpleMenuClassPart simpleMenu_class; 61 } SimpleMenuClassRec; 62 63 extern SimpleMenuClassRec simpleMenuClassRec; 64 65 typedef struct _SimpleMenuPart { 66 67 /* resources */ 68 69 String label_string; /* The string for the label or NULL. */ 70 SmeObject label; /* If label_string is non-NULL then this is 71 the label widget. */ 72 WidgetClass label_class; /* Widget Class of the menu label object. */ 73 74 Dimension top_margin; /* Top and bottom margins. */ 75 Dimension bottom_margin; 76 Dimension row_height; /* height of each row (menu entry) */ 77 78 Cursor cursor; /* The menu's cursor. */ 79 SmeObject popup_entry; /* The entry to position the cursor on for 80 when using XawPositionSimpleMenu. */ 81 Boolean menu_on_screen; /* Force the menus to be fully on the screen.*/ 82 int backing_store; /* What type of backing store to use. */ 83 84 /* private state */ 85 Boolean recursive_set_values; /* contain a possible infinite loop. */ 86 87 Boolean menu_width; /* If true then force width to remain 88 core.width */ 89 Boolean menu_height; /* Just like menu_width, but for height. */ 90 91 SmeObject entry_set; /* The entry that is currently set or 92 highlighted. */ 93 Widget threeD; /* 3d drawing stuff */ 94 Boolean too_tall; /* menu doesn't fit on screen */ 95 SmeObject *first_entry; /* the first entry */ 96 SmeObject *current_first; /* the first entry displayed */ 97 Dimension last_y; 98 Dimension first_y; 99 Boolean didnt_fit; /* if some entry didn't fit in the menu */ 100 } SimpleMenuPart; 101 102 typedef struct _SimpleMenuRec { 103 CorePart core; 104 CompositePart composite; 105 ShellPart shell; 106 OverrideShellPart override; 107 SimpleMenuPart simple_menu; 108 } SimpleMenuRec; 109 110 #endif /* _SimpleMenuP_h */ 111