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