Changes from arch/CVS synchronization
[bpt/emacs.git] / lwlib / xlwmenuP.h
CommitLineData
44862e8e
SM
1/* Internals of a lightweight menubar widget.
2 Copyright (C) 1999, 2000, 2002, 2004 Free Software Foundation, Inc.
3
4This file is part of the Lucid Widget Library.
5
6The Lucid Widget Library is free software; you can redistribute it and/or
7modify it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11The Lucid Widget Library is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to the
18Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
07c30a5c
RS
21#ifndef _XlwMenuP_h
22#define _XlwMenuP_h
23
24#include "xlwmenu.h"
25#include <X11/CoreP.h>
26
27/* Elements in the stack arrays. */
28typedef struct _window_state
29{
30 Window window;
31 Position x;
32 Position y;
33 Dimension width;
34 Dimension height;
35 Dimension label_width;
7c2eb6d1
GM
36
37 /* Width of toggle buttons or radio buttons. */
38 Dimension button_width;
07c30a5c
RS
39} window_state;
40
41
42/* New fields for the XlwMenu widget instance record */
ba755702 43typedef struct _XlwMenu_part
07c30a5c
RS
44{
45 /* slots set by the resources */
46 XFontStruct* font;
98270d54 47 Pixel foreground;
ba755702 48 Pixel disabled_foreground;
07c30a5c
RS
49 Pixel button_foreground;
50 Dimension margin;
51 Dimension horizontal_spacing;
52 Dimension vertical_spacing;
53 Dimension arrow_spacing;
54 Dimension shadow_thickness;
55 Pixel top_shadow_color;
56 Pixel bottom_shadow_color;
57 Pixmap top_shadow_pixmap;
58 Pixmap bottom_shadow_pixmap;
98270d54 59 Cursor cursor_shape;
07c30a5c 60 XtCallbackList open;
ad45c495 61 XtCallbackList select, highlight;
07c30a5c
RS
62 widget_value* contents;
63 int horizontal;
457d47f8
GM
64
65 /* True means top_shadow_color and/or bottom_shadow_color must be freed. */
66 unsigned free_top_shadow_color_p : 1;
67 unsigned free_bottom_shadow_color_p : 1;
ba755702 68
07c30a5c 69 /* State of the XlwMenu */
244c93fe 70 int top_depth;
07c30a5c
RS
71 int old_depth;
72 widget_value** old_stack;
73 int old_stack_length;
74
75 /* New state after the user moved */
76 int new_depth;
77 widget_value** new_stack;
78 int new_stack_length;
79
80 /* Window resources */
81 window_state* windows;
82 int windows_length;
83
84 /* Internal part, set by the XlwMenu */
85 GC foreground_gc;
86 GC button_gc;
87 GC background_gc;
ba755702 88 GC disabled_gc;
07c30a5c
RS
89 GC inactive_button_gc;
90 GC shadow_top_gc;
91 GC shadow_bottom_gc;
92 Cursor cursor;
93 Boolean popped_up;
94 Pixmap gray_pixmap;
95} XlwMenuPart;
96
97/* Full instance record declaration */
ba755702 98typedef struct _XlwMenuRec
07c30a5c
RS
99{
100 CorePart core;
101 XlwMenuPart menu;
102} XlwMenuRec;
103
104/* New fields for the XlwMenu widget class record */
ba755702 105typedef struct
07c30a5c
RS
106{
107 int dummy;
108} XlwMenuClassPart;
109
110/* Full class record declaration. */
ba755702 111typedef struct _XlwMenuClassRec
07c30a5c
RS
112{
113 CoreClassPart core_class;
114 XlwMenuClassPart menu_class;
115} XlwMenuClassRec;
116
117/* Class pointer. */
118extern XlwMenuClassRec xlwMenuClassRec;
119
120#endif /* _XlwMenuP_h */
ab5796a9
MB
121
122/* arch-tag: 18d7fc41-ffa0-47a3-a49f-3469900c7a25
123 (do not change this comment) */