Commit | Line | Data |
---|---|---|
07c30a5c RS |
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 | } window_state; | |
17 | ||
18 | ||
19 | /* New fields for the XlwMenu widget instance record */ | |
20 | typedef struct _XlwMenu_part | |
21 | { | |
22 | /* slots set by the resources */ | |
23 | XFontStruct* font; | |
98270d54 | 24 | Pixel foreground; |
07c30a5c RS |
25 | Pixel button_foreground; |
26 | Dimension margin; | |
27 | Dimension horizontal_spacing; | |
28 | Dimension vertical_spacing; | |
29 | Dimension arrow_spacing; | |
30 | Dimension shadow_thickness; | |
31 | Pixel top_shadow_color; | |
32 | Pixel bottom_shadow_color; | |
33 | Pixmap top_shadow_pixmap; | |
34 | Pixmap bottom_shadow_pixmap; | |
98270d54 | 35 | Cursor cursor_shape; |
07c30a5c RS |
36 | XtCallbackList open; |
37 | XtCallbackList select; | |
38 | widget_value* contents; | |
39 | int horizontal; | |
40 | ||
41 | /* State of the XlwMenu */ | |
42 | int old_depth; | |
43 | widget_value** old_stack; | |
44 | int old_stack_length; | |
45 | ||
46 | /* New state after the user moved */ | |
47 | int new_depth; | |
48 | widget_value** new_stack; | |
49 | int new_stack_length; | |
50 | ||
51 | /* Window resources */ | |
52 | window_state* windows; | |
53 | int windows_length; | |
54 | ||
55 | /* Internal part, set by the XlwMenu */ | |
56 | GC foreground_gc; | |
57 | GC button_gc; | |
58 | GC background_gc; | |
59 | GC inactive_gc; | |
60 | GC inactive_button_gc; | |
61 | GC shadow_top_gc; | |
62 | GC shadow_bottom_gc; | |
63 | Cursor cursor; | |
64 | Boolean popped_up; | |
65 | Pixmap gray_pixmap; | |
66 | } XlwMenuPart; | |
67 | ||
68 | /* Full instance record declaration */ | |
69 | typedef struct _XlwMenuRec | |
70 | { | |
71 | CorePart core; | |
72 | XlwMenuPart menu; | |
73 | } XlwMenuRec; | |
74 | ||
75 | /* New fields for the XlwMenu widget class record */ | |
76 | typedef struct | |
77 | { | |
78 | int dummy; | |
79 | } XlwMenuClassPart; | |
80 | ||
81 | /* Full class record declaration. */ | |
82 | typedef struct _XlwMenuClassRec | |
83 | { | |
84 | CoreClassPart core_class; | |
85 | XlwMenuClassPart menu_class; | |
86 | } XlwMenuClassRec; | |
87 | ||
88 | /* Class pointer. */ | |
89 | extern XlwMenuClassRec xlwMenuClassRec; | |
90 | ||
91 | #endif /* _XlwMenuP_h */ |