Mercurial > emacs
annotate lwlib/xlwmenuP.h @ 62573:b79d54436669
(remote-compile): Use compilation-start.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 May 2005 04:52:05 +0000 |
parents | 35f1da1a7f48 |
children | 23a17af379b1 146c086df160 |
rev | line source |
---|---|
60584
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
1 /* Internals of a lightweight menubar widget. |
61438
35f1da1a7f48
Update copyright.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
61210
diff
changeset
|
2 Copyright (C) 1999, 2000, 2002, 2004, 2005 Free Software Foundation, Inc. |
60584
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
3 |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
4 This file is part of the Lucid Widget Library. |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
5 |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
6 The Lucid Widget Library is free software; you can redistribute it and/or |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
7 modify it under the terms of the GNU General Public License as published by |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
8 the Free Software Foundation; either version 2, or (at your option) |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
9 any later version. |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
10 |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
11 The Lucid Widget Library is distributed in the hope that it will be useful, |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
14 GNU General Public License for more details. |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
15 |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
16 You should have received a copy of the GNU General Public License |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
17 along with GNU Emacs; see the file COPYING. If not, write to the |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
18 Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
19 Boston, MA 02111-1307, USA. */ |
597c62d04dec
Add missing copyright and license notice.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53564
diff
changeset
|
20 |
7359 | 21 #ifndef _XlwMenuP_h |
22 #define _XlwMenuP_h | |
23 | |
24 #include "xlwmenu.h" | |
25 #include <X11/CoreP.h> | |
26 | |
27 /* Elements in the stack arrays. */ | |
28 typedef struct _window_state | |
29 { | |
30 Window window; | |
31 Position x; | |
32 Position y; | |
33 Dimension width; | |
34 Dimension height; | |
35 Dimension label_width; | |
25033
584c34c7cf53
(_window_state): Add button_width.
Gerd Moellmann <gerd@gnu.org>
parents:
7360
diff
changeset
|
36 |
584c34c7cf53
(_window_state): Add button_width.
Gerd Moellmann <gerd@gnu.org>
parents:
7360
diff
changeset
|
37 /* Width of toggle buttons or radio buttons. */ |
584c34c7cf53
(_window_state): Add button_width.
Gerd Moellmann <gerd@gnu.org>
parents:
7360
diff
changeset
|
38 Dimension button_width; |
7359 | 39 } window_state; |
40 | |
41 | |
42 /* New fields for the XlwMenu widget instance record */ | |
45145
762469b26903
(_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents:
29699
diff
changeset
|
43 typedef struct _XlwMenu_part |
7359 | 44 { |
45 /* slots set by the resources */ | |
60698
3e557e11645e
Add support for I18N to Lucid menus.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
60584
diff
changeset
|
46 #ifdef HAVE_X_I18N |
61210
0eb69e12c16d
* xlwmenuP.h (_XlwMenu_part): Add fontSet resource.
Jan Djärv <jan.h.d@swipnet.se>
parents:
60829
diff
changeset
|
47 XFontSet fontSet; |
60698
3e557e11645e
Add support for I18N to Lucid menus.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
60584
diff
changeset
|
48 XFontSetExtents *font_extents; |
61210
0eb69e12c16d
* xlwmenuP.h (_XlwMenu_part): Add fontSet resource.
Jan Djärv <jan.h.d@swipnet.se>
parents:
60829
diff
changeset
|
49 #endif |
7359 | 50 XFontStruct* font; |
7360 | 51 Pixel foreground; |
45145
762469b26903
(_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents:
29699
diff
changeset
|
52 Pixel disabled_foreground; |
7359 | 53 Pixel button_foreground; |
54 Dimension margin; | |
55 Dimension horizontal_spacing; | |
56 Dimension vertical_spacing; | |
57 Dimension arrow_spacing; | |
58 Dimension shadow_thickness; | |
59 Pixel top_shadow_color; | |
60 Pixel bottom_shadow_color; | |
61 Pixmap top_shadow_pixmap; | |
62 Pixmap bottom_shadow_pixmap; | |
7360 | 63 Cursor cursor_shape; |
7359 | 64 XtCallbackList open; |
27340
1d84a7873d7c
(_XlwMenu_part): Add `highlight' callback list.
Gerd Moellmann <gerd@gnu.org>
parents:
25033
diff
changeset
|
65 XtCallbackList select, highlight; |
7359 | 66 widget_value* contents; |
67 int horizontal; | |
29699
bb36becbd66b
(_XlwMenu_part): Add free_top_shadow_color_p and
Gerd Moellmann <gerd@gnu.org>
parents:
27340
diff
changeset
|
68 |
bb36becbd66b
(_XlwMenu_part): Add free_top_shadow_color_p and
Gerd Moellmann <gerd@gnu.org>
parents:
27340
diff
changeset
|
69 /* True means top_shadow_color and/or bottom_shadow_color must be freed. */ |
bb36becbd66b
(_XlwMenu_part): Add free_top_shadow_color_p and
Gerd Moellmann <gerd@gnu.org>
parents:
27340
diff
changeset
|
70 unsigned free_top_shadow_color_p : 1; |
bb36becbd66b
(_XlwMenu_part): Add free_top_shadow_color_p and
Gerd Moellmann <gerd@gnu.org>
parents:
27340
diff
changeset
|
71 unsigned free_bottom_shadow_color_p : 1; |
45145
762469b26903
(_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents:
29699
diff
changeset
|
72 |
7359 | 73 /* State of the XlwMenu */ |
53564
609ef1718642
Changes for lucid popup menus (keyboard traversal enabled) and dialogs
Jan Djärv <jan.h.d@swipnet.se>
parents:
52401
diff
changeset
|
74 int top_depth; |
7359 | 75 int old_depth; |
76 widget_value** old_stack; | |
77 int old_stack_length; | |
78 | |
79 /* New state after the user moved */ | |
80 int new_depth; | |
81 widget_value** new_stack; | |
82 int new_stack_length; | |
83 | |
84 /* Window resources */ | |
85 window_state* windows; | |
86 int windows_length; | |
87 | |
88 /* Internal part, set by the XlwMenu */ | |
89 GC foreground_gc; | |
90 GC button_gc; | |
91 GC background_gc; | |
45145
762469b26903
(_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents:
29699
diff
changeset
|
92 GC disabled_gc; |
7359 | 93 GC inactive_button_gc; |
94 GC shadow_top_gc; | |
95 GC shadow_bottom_gc; | |
96 Cursor cursor; | |
97 Boolean popped_up; | |
98 Pixmap gray_pixmap; | |
99 } XlwMenuPart; | |
100 | |
101 /* Full instance record declaration */ | |
45145
762469b26903
(_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents:
29699
diff
changeset
|
102 typedef struct _XlwMenuRec |
7359 | 103 { |
104 CorePart core; | |
105 XlwMenuPart menu; | |
106 } XlwMenuRec; | |
107 | |
108 /* New fields for the XlwMenu widget class record */ | |
45145
762469b26903
(_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents:
29699
diff
changeset
|
109 typedef struct |
7359 | 110 { |
111 int dummy; | |
112 } XlwMenuClassPart; | |
113 | |
114 /* Full class record declaration. */ | |
45145
762469b26903
(_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents:
29699
diff
changeset
|
115 typedef struct _XlwMenuClassRec |
7359 | 116 { |
117 CoreClassPart core_class; | |
118 XlwMenuClassPart menu_class; | |
119 } XlwMenuClassRec; | |
120 | |
121 /* Class pointer. */ | |
122 extern XlwMenuClassRec xlwMenuClassRec; | |
123 | |
124 #endif /* _XlwMenuP_h */ | |
52401 | 125 |
126 /* arch-tag: 18d7fc41-ffa0-47a3-a49f-3469900c7a25 | |
127 (do not change this comment) */ |