annotate lwlib/xlwmenuP.h @ 138:6608ceec7cf8 r20-2b3

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