annotate lwlib/xlwmenuP.h @ 56846:5817080daeba

* xmenu.c (digest_single_submenu): Set lname and lkey in widget_value instead of name and key. (update_submenu_strings): New function. (set_frame_menubar): Remove call to inhibit_garbage_collection, call update_submenu_strings. Call ENCODE_MENU_STRING for top level menu names. * gtkutil.h (_widget_value): Added lname and lkey.
author Jan Djärv <jan.h.d@swipnet.se>
date Mon, 30 Aug 2004 19:42:53 +0000
parents 609ef1718642
children 597c62d04dec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 #ifndef _XlwMenuP_h
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2 #define _XlwMenuP_h
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4 #include "xlwmenu.h"
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 #include <X11/CoreP.h>
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 /* Elements in the stack arrays. */
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 typedef struct _window_state
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 {
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 Window window;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 Position x;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 Position y;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 Dimension width;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 Dimension height;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 Dimension label_width;
25033
584c34c7cf53 (_window_state): Add button_width.
Gerd Moellmann <gerd@gnu.org>
parents: 7360
diff changeset
16
584c34c7cf53 (_window_state): Add button_width.
Gerd Moellmann <gerd@gnu.org>
parents: 7360
diff changeset
17 /* Width of toggle buttons or radio buttons. */
584c34c7cf53 (_window_state): Add button_width.
Gerd Moellmann <gerd@gnu.org>
parents: 7360
diff changeset
18 Dimension button_width;
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 } window_state;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22 /* 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
23 typedef struct _XlwMenu_part
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 {
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 /* slots set by the resources */
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 XFontStruct* font;
7360
cfb65c58eb9a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7359
diff changeset
27 Pixel foreground;
45145
762469b26903 (_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents: 29699
diff changeset
28 Pixel disabled_foreground;
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 Pixel button_foreground;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 Dimension margin;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 Dimension horizontal_spacing;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 Dimension vertical_spacing;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 Dimension arrow_spacing;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 Dimension shadow_thickness;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 Pixel top_shadow_color;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 Pixel bottom_shadow_color;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 Pixmap top_shadow_pixmap;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 Pixmap bottom_shadow_pixmap;
7360
cfb65c58eb9a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents: 7359
diff changeset
39 Cursor cursor_shape;
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 XtCallbackList open;
27340
1d84a7873d7c (_XlwMenu_part): Add `highlight' callback list.
Gerd Moellmann <gerd@gnu.org>
parents: 25033
diff changeset
41 XtCallbackList select, highlight;
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 widget_value* contents;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 int horizontal;
29699
bb36becbd66b (_XlwMenu_part): Add free_top_shadow_color_p and
Gerd Moellmann <gerd@gnu.org>
parents: 27340
diff changeset
44
bb36becbd66b (_XlwMenu_part): Add free_top_shadow_color_p and
Gerd Moellmann <gerd@gnu.org>
parents: 27340
diff changeset
45 /* 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
46 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
47 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
48
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
49 /* 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
50 int top_depth;
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
51 int old_depth;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
52 widget_value** old_stack;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
53 int old_stack_length;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
54
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
55 /* New state after the user moved */
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
56 int new_depth;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
57 widget_value** new_stack;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
58 int new_stack_length;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
59
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
60 /* Window resources */
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
61 window_state* windows;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
62 int windows_length;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 /* Internal part, set by the XlwMenu */
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65 GC foreground_gc;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
66 GC button_gc;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 GC background_gc;
45145
762469b26903 (_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents: 29699
diff changeset
68 GC disabled_gc;
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
69 GC inactive_button_gc;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
70 GC shadow_top_gc;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
71 GC shadow_bottom_gc;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
72 Cursor cursor;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
73 Boolean popped_up;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
74 Pixmap gray_pixmap;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
75 } XlwMenuPart;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
76
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
77 /* Full instance record declaration */
45145
762469b26903 (_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents: 29699
diff changeset
78 typedef struct _XlwMenuRec
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
79 {
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
80 CorePart core;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
81 XlwMenuPart menu;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
82 } XlwMenuRec;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
83
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
84 /* 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
85 typedef struct
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
86 {
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
87 int dummy;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88 } XlwMenuClassPart;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
89
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
90 /* Full class record declaration. */
45145
762469b26903 (_XlwMenu_part): Add new member `disabled_foreground'.
Pavel Janík <Pavel@Janik.cz>
parents: 29699
diff changeset
91 typedef struct _XlwMenuClassRec
7359
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
92 {
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
93 CoreClassPart core_class;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
94 XlwMenuClassPart menu_class;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 } XlwMenuClassRec;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 /* Class pointer. */
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 extern XlwMenuClassRec xlwMenuClassRec;
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99
6ab8e21b9b7c Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
100 #endif /* _XlwMenuP_h */
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 45145
diff changeset
101
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 45145
diff changeset
102 /* arch-tag: 18d7fc41-ffa0-47a3-a49f-3469900c7a25
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 45145
diff changeset
103 (do not change this comment) */