annotate lwlib/xlwmenuP.h @ 98:0d2f883870bc r20-1b1

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