comparison lwlib/xlwmenuP.h @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children b980b6286996
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
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;
31 #endif
32 Dimension font_ascent, font_descent; /* extracted from font/fontlist */
33
34 Pixel foreground;
35 Pixel button_foreground;
36 Dimension margin;
37 Dimension horizontal_margin;
38 Dimension vertical_margin;
39 Dimension column_spacing;
40 Dimension shadow_thickness;
41 Dimension indicator_size;
42 Pixel top_shadow_color;
43 Pixel bottom_shadow_color;
44 Pixel select_color;
45 Pixmap top_shadow_pixmap;
46 Pixmap bottom_shadow_pixmap;
47 Cursor cursor_shape;
48 XtCallbackList open;
49 XtCallbackList select;
50 widget_value* contents;
51 int horizontal;
52 Boolean use_backing_store;
53 Boolean bounce_down;
54 Boolean lookup_labels;
55
56 /* State of the XlwMenu */
57 int old_depth;
58 widget_value** old_stack;
59 int old_stack_length;
60
61 /* New state after the user moved */
62 int new_depth;
63 widget_value** new_stack;
64 int new_stack_length;
65
66 /* Window resources */
67 window_state* windows;
68 int windows_length;
69
70 /* Internal part, set by the XlwMenu */
71 GC foreground_gc;
72 GC button_gc;
73 GC background_gc;
74 GC inactive_gc;
75 GC inactive_button_gc;
76 GC shadow_top_gc;
77 GC shadow_bottom_gc;
78 GC select_gc;
79 Cursor cursor;
80 Boolean popped_up;
81 Pixmap gray_pixmap;
82
83 /* Stay-up stuff */
84 Boolean pointer_grabbed;
85 Boolean next_release_must_exit;
86 Time menu_post_time, menu_bounce_time;
87 widget_value * last_selected_val;
88 } XlwMenuPart;
89
90 /* Full instance record declaration */
91 typedef struct _XlwMenuRec
92 {
93 CorePart core;
94 XlwMenuPart menu;
95 } XlwMenuRec;
96
97 /* New fields for the XlwMenu widget class record */
98 typedef struct
99 {
100 int dummy;
101 } XlwMenuClassPart;
102
103 /* Full class record declaration. */
104 typedef struct _XlwMenuClassRec
105 {
106 CoreClassPart core_class;
107 XlwMenuClassPart menu_class;
108 } XlwMenuClassRec;
109
110 /* Class pointer. */
111 extern XlwMenuClassRec xlwMenuClassRec;
112
113 #endif /* _XlwMenuP_h */