annotate lwlib/xlwmenuP.h @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents e45d5e7c476e
children 697ef44129c6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 207
diff changeset
1 #ifndef INCLUDED_xlwmenuP_h_
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 207
diff changeset
2 #define INCLUDED_xlwmenuP_h_
0
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;
207
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 136
diff changeset
39 Pixel highlight_foreground;
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 136
diff changeset
40 Pixel title_foreground;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 Dimension margin;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 Dimension horizontal_margin;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 Dimension vertical_margin;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 Dimension column_spacing;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 Dimension shadow_thickness;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 Dimension indicator_size;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 Pixel top_shadow_color;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 Pixel bottom_shadow_color;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 Pixel select_color;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 Pixmap top_shadow_pixmap;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 Pixmap bottom_shadow_pixmap;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 Cursor cursor_shape;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 XtCallbackList open;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 XtCallbackList select;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 widget_value* contents;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 int horizontal;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 Boolean use_backing_store;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 Boolean bounce_down;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 Boolean lookup_labels;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 /* State of the XlwMenu */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 int old_depth;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 widget_value** old_stack;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 int old_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 /* New state after the user moved */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 int new_depth;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 widget_value** new_stack;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 int new_stack_length;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 /* Window resources */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 window_state* windows;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 int windows_length;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 /* Internal part, set by the XlwMenu */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 GC foreground_gc;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 GC button_gc;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 GC background_gc;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 GC inactive_gc;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 GC inactive_button_gc;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 GC shadow_top_gc;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 GC shadow_bottom_gc;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 GC select_gc;
207
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 136
diff changeset
84 GC highlight_gc;
e45d5e7c476e Import from CVS: tag r20-4b2
cvs
parents: 136
diff changeset
85 GC title_gc;
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 Cursor cursor;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 Boolean popped_up;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 Pixmap gray_pixmap;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 /* Stay-up stuff */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 Boolean pointer_grabbed;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 Boolean next_release_must_exit;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 Time menu_post_time, menu_bounce_time;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 widget_value * last_selected_val;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 } XlwMenuPart;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 /* Full instance record declaration */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 typedef struct _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 CorePart core;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 XlwMenuPart menu;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 } XlwMenuRec;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 /* New fields for the XlwMenu widget class record */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 typedef struct
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 int dummy;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 } XlwMenuClassPart;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 /* Full class record declaration. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 typedef struct _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 CoreClassPart core_class;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 XlwMenuClassPart menu_class;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 } XlwMenuClassRec;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 /* Class pointer. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 extern XlwMenuClassRec xlwMenuClassRec;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 207
diff changeset
120 #endif /* INCLUDED_xlwmenuP_h_ */