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