1 /* Internals of a lightweight menubar widget.
2 Copyright (C) 1992 Lucid, Inc.
3 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 Free Software Foundation, Inc.
6 This file is part of the Lucid Widget Library.
8 The Lucid Widget Library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 1, or (at your option)
13 The Lucid Widget Library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Emacs; see the file COPYING. If not, write to the
20 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
27 #include <X11/CoreP.h>
29 #include <X11/Xft/Xft.h>
32 /* Elements in the stack arrays. */
33 typedef struct _window_state
42 Dimension label_width
;
45 /* Width of toggle buttons or radio buttons. */
46 Dimension button_width
;
53 /* New fields for the XlwMenu widget instance record */
54 typedef struct _XlwMenu_part
56 /* slots set by the resources */
59 XFontSetExtents
*font_extents
;
65 XftColor xft_fg
, xft_bg
, xft_disabled_fg
;
69 Pixel disabled_foreground
;
70 Pixel button_foreground
;
72 Dimension horizontal_spacing
;
73 Dimension vertical_spacing
;
74 Dimension arrow_spacing
;
75 Dimension shadow_thickness
;
76 Pixel top_shadow_color
;
77 Pixel bottom_shadow_color
;
78 Pixmap top_shadow_pixmap
;
79 Pixmap bottom_shadow_pixmap
;
82 XtCallbackList select
, highlight
;
83 XtCallbackList enter
, leave
;
84 widget_value
* contents
;
87 /* True means top_shadow_color and/or bottom_shadow_color must be freed. */
88 unsigned free_top_shadow_color_p
: 1;
89 unsigned free_bottom_shadow_color_p
: 1;
91 /* State of the XlwMenu */
94 widget_value
** old_stack
;
96 widget_value
* inside_entry
;
98 /* New state after the user moved */
100 widget_value
** new_stack
;
101 int new_stack_length
;
103 /* Window resources */
104 window_state
* windows
;
107 /* Internal part, set by the XlwMenu */
112 GC inactive_button_gc
;
120 /* Full instance record declaration */
121 typedef struct _XlwMenuRec
127 /* New fields for the XlwMenu widget class record */
133 /* Full class record declaration. */
134 typedef struct _XlwMenuClassRec
136 CoreClassPart core_class
;
137 XlwMenuClassPart menu_class
;
141 extern XlwMenuClassRec xlwMenuClassRec
;
143 #endif /* _XlwMenuP_h */