Commit | Line | Data |
---|---|---|
44862e8e | 1 | /* Internals of a lightweight menubar widget. |
b3d90e46 GM |
2 | Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, |
3 | 2005, 2006, 2007 Free Software Foundation, Inc. | |
44862e8e SM |
4 | |
5 | This file is part of the Lucid Widget Library. | |
6 | ||
7 | The Lucid Widget Library is free software; you can redistribute it and/or | |
8 | modify it under the terms of the GNU General Public License as published by | |
9 | the Free Software Foundation; either version 2, or (at your option) | |
10 | any later version. | |
11 | ||
12 | The Lucid Widget Library is distributed in the hope that it will be useful, | |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with GNU Emacs; see the file COPYING. If not, write to the | |
364c38d3 LK |
19 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 | Boston, MA 02110-1301, USA. */ | |
44862e8e | 21 | |
07c30a5c RS |
22 | #ifndef _XlwMenuP_h |
23 | #define _XlwMenuP_h | |
24 | ||
25 | #include "xlwmenu.h" | |
26 | #include <X11/CoreP.h> | |
27 | ||
28 | /* Elements in the stack arrays. */ | |
29 | typedef struct _window_state | |
30 | { | |
31 | Window window; | |
32 | Position x; | |
33 | Position y; | |
34 | Dimension width; | |
35 | Dimension height; | |
36 | Dimension label_width; | |
7c2eb6d1 GM |
37 | |
38 | /* Width of toggle buttons or radio buttons. */ | |
39 | Dimension button_width; | |
07c30a5c RS |
40 | } window_state; |
41 | ||
42 | ||
43 | /* New fields for the XlwMenu widget instance record */ | |
ba755702 | 44 | typedef struct _XlwMenu_part |
07c30a5c RS |
45 | { |
46 | /* slots set by the resources */ | |
423a3f59 | 47 | #ifdef HAVE_X_I18N |
37484540 | 48 | XFontSet fontSet; |
423a3f59 | 49 | XFontSetExtents *font_extents; |
423a3f59 | 50 | #endif |
37484540 | 51 | XFontStruct* font; |
98270d54 | 52 | Pixel foreground; |
ba755702 | 53 | Pixel disabled_foreground; |
07c30a5c RS |
54 | Pixel button_foreground; |
55 | Dimension margin; | |
56 | Dimension horizontal_spacing; | |
57 | Dimension vertical_spacing; | |
58 | Dimension arrow_spacing; | |
59 | Dimension shadow_thickness; | |
60 | Pixel top_shadow_color; | |
61 | Pixel bottom_shadow_color; | |
62 | Pixmap top_shadow_pixmap; | |
63 | Pixmap bottom_shadow_pixmap; | |
98270d54 | 64 | Cursor cursor_shape; |
07c30a5c | 65 | XtCallbackList open; |
ad45c495 | 66 | XtCallbackList select, highlight; |
36bce9a9 | 67 | XtCallbackList enter, leave; |
07c30a5c RS |
68 | widget_value* contents; |
69 | int horizontal; | |
457d47f8 GM |
70 | |
71 | /* True means top_shadow_color and/or bottom_shadow_color must be freed. */ | |
72 | unsigned free_top_shadow_color_p : 1; | |
73 | unsigned free_bottom_shadow_color_p : 1; | |
ba755702 | 74 | |
07c30a5c | 75 | /* State of the XlwMenu */ |
244c93fe | 76 | int top_depth; |
07c30a5c RS |
77 | int old_depth; |
78 | widget_value** old_stack; | |
79 | int old_stack_length; | |
36bce9a9 | 80 | widget_value* inside_entry; |
07c30a5c RS |
81 | |
82 | /* New state after the user moved */ | |
83 | int new_depth; | |
84 | widget_value** new_stack; | |
85 | int new_stack_length; | |
86 | ||
87 | /* Window resources */ | |
88 | window_state* windows; | |
89 | int windows_length; | |
90 | ||
91 | /* Internal part, set by the XlwMenu */ | |
92 | GC foreground_gc; | |
93 | GC button_gc; | |
94 | GC background_gc; | |
ba755702 | 95 | GC disabled_gc; |
07c30a5c RS |
96 | GC inactive_button_gc; |
97 | GC shadow_top_gc; | |
98 | GC shadow_bottom_gc; | |
99 | Cursor cursor; | |
100 | Boolean popped_up; | |
101 | Pixmap gray_pixmap; | |
102 | } XlwMenuPart; | |
103 | ||
104 | /* Full instance record declaration */ | |
ba755702 | 105 | typedef struct _XlwMenuRec |
07c30a5c RS |
106 | { |
107 | CorePart core; | |
108 | XlwMenuPart menu; | |
109 | } XlwMenuRec; | |
110 | ||
111 | /* New fields for the XlwMenu widget class record */ | |
ba755702 | 112 | typedef struct |
07c30a5c RS |
113 | { |
114 | int dummy; | |
115 | } XlwMenuClassPart; | |
116 | ||
117 | /* Full class record declaration. */ | |
ba755702 | 118 | typedef struct _XlwMenuClassRec |
07c30a5c RS |
119 | { |
120 | CoreClassPart core_class; | |
121 | XlwMenuClassPart menu_class; | |
122 | } XlwMenuClassRec; | |
123 | ||
124 | /* Class pointer. */ | |
125 | extern XlwMenuClassRec xlwMenuClassRec; | |
126 | ||
127 | #endif /* _XlwMenuP_h */ | |
ab5796a9 MB |
128 | |
129 | /* arch-tag: 18d7fc41-ffa0-47a3-a49f-3469900c7a25 | |
130 | (do not change this comment) */ |