C-x 5 1
[emacs.git] / lwlib / xlwmenuP.h
blob1cf8319e10180d71d35e294318dfc1a3e91e2ed4
1 #ifndef _XlwMenuP_h
2 #define _XlwMenuP_h
4 #include "xlwmenu.h"
5 #include <X11/CoreP.h>
7 /* Elements in the stack arrays. */
8 typedef struct _window_state
10 Window window;
11 Position x;
12 Position y;
13 Dimension width;
14 Dimension height;
15 Dimension label_width;
17 /* Width of toggle buttons or radio buttons. */
18 Dimension button_width;
19 } window_state;
22 /* New fields for the XlwMenu widget instance record */
23 typedef struct _XlwMenu_part
25 /* slots set by the resources */
26 XFontStruct* font;
27 Pixel foreground;
28 Pixel button_foreground;
29 Dimension margin;
30 Dimension horizontal_spacing;
31 Dimension vertical_spacing;
32 Dimension arrow_spacing;
33 Dimension shadow_thickness;
34 Pixel top_shadow_color;
35 Pixel bottom_shadow_color;
36 Pixmap top_shadow_pixmap;
37 Pixmap bottom_shadow_pixmap;
38 Cursor cursor_shape;
39 XtCallbackList open;
40 XtCallbackList select, highlight;
41 widget_value* contents;
42 int horizontal;
44 /* True means top_shadow_color and/or bottom_shadow_color must be freed. */
45 unsigned free_top_shadow_color_p : 1;
46 unsigned free_bottom_shadow_color_p : 1;
48 /* State of the XlwMenu */
49 int old_depth;
50 widget_value** old_stack;
51 int old_stack_length;
53 /* New state after the user moved */
54 int new_depth;
55 widget_value** new_stack;
56 int new_stack_length;
58 /* Window resources */
59 window_state* windows;
60 int windows_length;
62 /* Internal part, set by the XlwMenu */
63 GC foreground_gc;
64 GC button_gc;
65 GC background_gc;
66 GC inactive_gc;
67 GC inactive_button_gc;
68 GC shadow_top_gc;
69 GC shadow_bottom_gc;
70 Cursor cursor;
71 Boolean popped_up;
72 Pixmap gray_pixmap;
73 } XlwMenuPart;
75 /* Full instance record declaration */
76 typedef struct _XlwMenuRec
78 CorePart core;
79 XlwMenuPart menu;
80 } XlwMenuRec;
82 /* New fields for the XlwMenu widget class record */
83 typedef struct
85 int dummy;
86 } XlwMenuClassPart;
88 /* Full class record declaration. */
89 typedef struct _XlwMenuClassRec
91 CoreClassPart core_class;
92 XlwMenuClassPart menu_class;
93 } XlwMenuClassRec;
95 /* Class pointer. */
96 extern XlwMenuClassRec xlwMenuClassRec;
98 #endif /* _XlwMenuP_h */