60584
|
1 /* Internals of a lightweight menubar widget.
|
76180
|
2 Copyright (C) 1992 Lucid, Inc.
|
|
3 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
|
|
4 Free Software Foundation, Inc.
|
60584
|
5
|
|
6 This file is part of the Lucid Widget Library.
|
|
7
|
|
8 The Lucid Widget Library is free software; you can redistribute it and/or
|
|
9 modify it under the terms of the GNU General Public License as published by
|
76216
|
10 the Free Software Foundation; either version 1, or (at your option)
|
60584
|
11 any later version.
|
|
12
|
|
13 The Lucid Widget Library is distributed in the hope that it will be useful,
|
|
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 GNU General Public License for more details.
|
|
17
|
|
18 You should have received a copy of the GNU General Public License
|
|
19 along with GNU Emacs; see the file COPYING. If not, write to the
|
64083
|
20 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
21 Boston, MA 02110-1301, USA. */
|
60584
|
22
|
7359
|
23 #ifndef _XlwMenuP_h
|
|
24 #define _XlwMenuP_h
|
|
25
|
|
26 #include "xlwmenu.h"
|
|
27 #include <X11/CoreP.h>
|
|
28
|
|
29 /* Elements in the stack arrays. */
|
|
30 typedef struct _window_state
|
|
31 {
|
|
32 Window window;
|
|
33 Position x;
|
|
34 Position y;
|
|
35 Dimension width;
|
|
36 Dimension height;
|
|
37 Dimension label_width;
|
25033
|
38
|
|
39 /* Width of toggle buttons or radio buttons. */
|
|
40 Dimension button_width;
|
7359
|
41 } window_state;
|
|
42
|
|
43
|
|
44 /* New fields for the XlwMenu widget instance record */
|
45145
|
45 typedef struct _XlwMenu_part
|
7359
|
46 {
|
|
47 /* slots set by the resources */
|
60698
|
48 #ifdef HAVE_X_I18N
|
61210
|
49 XFontSet fontSet;
|
60698
|
50 XFontSetExtents *font_extents;
|
61210
|
51 #endif
|
7359
|
52 XFontStruct* font;
|
7360
|
53 Pixel foreground;
|
45145
|
54 Pixel disabled_foreground;
|
7359
|
55 Pixel button_foreground;
|
|
56 Dimension margin;
|
|
57 Dimension horizontal_spacing;
|
|
58 Dimension vertical_spacing;
|
|
59 Dimension arrow_spacing;
|
|
60 Dimension shadow_thickness;
|
|
61 Pixel top_shadow_color;
|
|
62 Pixel bottom_shadow_color;
|
|
63 Pixmap top_shadow_pixmap;
|
|
64 Pixmap bottom_shadow_pixmap;
|
7360
|
65 Cursor cursor_shape;
|
7359
|
66 XtCallbackList open;
|
27340
|
67 XtCallbackList select, highlight;
|
75017
|
68 XtCallbackList enter, leave;
|
7359
|
69 widget_value* contents;
|
|
70 int horizontal;
|
29699
|
71
|
|
72 /* True means top_shadow_color and/or bottom_shadow_color must be freed. */
|
|
73 unsigned free_top_shadow_color_p : 1;
|
|
74 unsigned free_bottom_shadow_color_p : 1;
|
45145
|
75
|
7359
|
76 /* State of the XlwMenu */
|
53564
609ef1718642
Changes for lucid popup menus (keyboard traversal enabled) and dialogs
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
77 int top_depth;
|
7359
|
78 int old_depth;
|
|
79 widget_value** old_stack;
|
|
80 int old_stack_length;
|
75017
|
81 widget_value* inside_entry;
|
7359
|
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;
|
45145
|
96 GC disabled_gc;
|
7359
|
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 */
|
45145
|
106 typedef struct _XlwMenuRec
|
7359
|
107 {
|
|
108 CorePart core;
|
|
109 XlwMenuPart menu;
|
|
110 } XlwMenuRec;
|
|
111
|
|
112 /* New fields for the XlwMenu widget class record */
|
45145
|
113 typedef struct
|
7359
|
114 {
|
|
115 int dummy;
|
|
116 } XlwMenuClassPart;
|
|
117
|
|
118 /* Full class record declaration. */
|
45145
|
119 typedef struct _XlwMenuClassRec
|
7359
|
120 {
|
|
121 CoreClassPart core_class;
|
|
122 XlwMenuClassPart menu_class;
|
|
123 } XlwMenuClassRec;
|
|
124
|
|
125 /* Class pointer. */
|
|
126 extern XlwMenuClassRec xlwMenuClassRec;
|
|
127
|
|
128 #endif /* _XlwMenuP_h */
|
52401
|
129
|
|
130 /* arch-tag: 18d7fc41-ffa0-47a3-a49f-3469900c7a25
|
|
131 (do not change this comment) */
|