annotate lwlib/xlwmenuP.h @ 3632:dd6a0032bda9

[xemacs-hg @ 2006-10-21 21:51:19 by viteno] Update xemacs_extra_name.
author viteno
date Sat, 21 Oct 2006 21:51:19 +0000
parents 6aa26bef0527
children 382b11fa8866
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
1 #ifndef INCLUDED_xlwmenuP_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
2 #define INCLUDED_xlwmenuP_h_
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 #include "xlwmenu.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 #include <X11/CoreP.h>
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3094
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
7 #ifdef USE_XFT_MENUBARS
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
8 #include <X11/Xft/Xft.h>
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
9 #endif
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
10
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
11
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 /* Elements in the stack arrays. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 typedef struct _window_state
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 Window window;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 Position x;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 Position y;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 Dimension width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 Dimension height;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 Dimension label_width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 Dimension toggle_width;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 } window_state;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 /* New fields for the XlwMenu widget instance record */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 typedef struct _XlwMenu_part
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 /* slots set by the resources */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3094
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
30 #if defined(NEED_MOTIF) && !defined(USE_XFT_MENUBARS)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 XmFontList font_list;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 XmFontList font_list_2;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 XmFontList fallback_font_list;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 #else
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 XFontStruct * font;
3094
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
36 #ifdef USE_XFT_MENUBARS
3397
6aa26bef0527 [xemacs-hg @ 2006-05-12 19:25:28 by stephent]
stephent
parents: 3094
diff changeset
37 String fcFontName;
3094
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
38 XftFont *renderFont;
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
39 #endif
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 # ifdef USE_XFONTSET
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 XFontSet font_set;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 # endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 Dimension font_ascent, font_descent; /* extracted from font/fontlist */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 Pixel foreground;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 Pixel button_foreground;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 Pixel highlight_foreground;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 Pixel title_foreground;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 Dimension margin;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 Dimension horizontal_margin;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 Dimension vertical_margin;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 Dimension column_spacing;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 Dimension shadow_thickness;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 Dimension indicator_size;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 Pixel top_shadow_color;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 Pixel bottom_shadow_color;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 Pixel select_color;
3094
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
59 #ifdef USE_XFT_MENUBARS
ad2f4ae9895b [xemacs-hg @ 2005-11-26 11:45:47 by stephent]
stephent
parents: 440
diff changeset
60 #endif
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 Pixmap top_shadow_pixmap;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 Pixmap bottom_shadow_pixmap;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 Cursor cursor_shape;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 XtCallbackList open;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 XtCallbackList select;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 widget_value* contents;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 int horizontal;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 Boolean use_backing_store;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 Boolean bounce_down;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 Boolean lookup_labels;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 /* State of the XlwMenu */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 int old_depth;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 widget_value** old_stack;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 int old_stack_length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 /* New state after the user moved */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 int new_depth;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 widget_value** new_stack;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 int new_stack_length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 /* Window resources */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 window_state* windows;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 int windows_length;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 /* Internal part, set by the XlwMenu */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 GC foreground_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 GC button_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 GC background_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 GC inactive_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 GC inactive_button_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 GC shadow_top_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 GC shadow_bottom_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 GC select_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 GC highlight_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96 GC title_gc;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 Cursor cursor;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 Boolean popped_up;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 Pixmap gray_pixmap;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 /* Stay-up stuff */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 Boolean pointer_grabbed;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 Boolean next_release_must_exit;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 Time menu_post_time, menu_bounce_time;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 widget_value * last_selected_val;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 } XlwMenuPart;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 /* Full instance record declaration */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 typedef struct _XlwMenuRec
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 CorePart core;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 XlwMenuPart menu;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 } XlwMenuRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 /* New fields for the XlwMenu widget class record */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 typedef struct
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 int dummy;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 } XlwMenuClassPart;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 /* Full class record declaration. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 typedef struct _XlwMenuClassRec
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 CoreClassPart core_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 XlwMenuClassPart menu_class;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 } XlwMenuClassRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 /* Class pointer. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 extern XlwMenuClassRec xlwMenuClassRec;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
131 #endif /* INCLUDED_xlwmenuP_h_ */