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