1 /* Internals of a lightweight menubar widget.
3 Copyright (C) 2002-2016 Free Software Foundation, Inc.
4 Copyright (C) 1992 Lucid, 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. If not, see <http://www.gnu.org/licenses/>. */
25 #include <X11/CoreP.h>
27 #include <X11/Xft/Xft.h>
30 /* Elements in the stack arrays. */
31 typedef struct _window_state
40 Dimension label_width
;
43 /* Width of toggle buttons or radio buttons. */
44 Dimension button_width
;
51 /* New fields for the XlwMenu widget instance record */
52 typedef struct _XlwMenu_part
54 /* slots set by the resources */
57 XFontSetExtents
*font_extents
;
62 XftColor xft_fg
, xft_bg
, xft_disabled_fg
;
67 Pixel disabled_foreground
;
68 Pixel button_foreground
;
70 Dimension horizontal_spacing
;
71 Dimension vertical_spacing
;
72 Dimension arrow_spacing
;
73 Dimension shadow_thickness
;
74 Pixel top_shadow_color
;
75 Pixel bottom_shadow_color
;
76 Pixmap top_shadow_pixmap
;
77 Pixmap bottom_shadow_pixmap
;
80 XtCallbackList select
, highlight
;
81 XtCallbackList enter
, leave
;
82 widget_value
* contents
;
85 /* True means top_shadow_color and/or bottom_shadow_color must be freed. */
86 bool_bf free_top_shadow_color_p
: 1;
87 bool_bf free_bottom_shadow_color_p
: 1;
89 /* State of the XlwMenu */
92 widget_value
** old_stack
;
94 widget_value
* inside_entry
;
96 /* New state after the user moved */
98 widget_value
** new_stack
;
101 /* Window resources */
102 window_state
* windows
;
105 /* Internal part, set by the XlwMenu */
110 GC inactive_button_gc
;
118 /* Full instance record declaration */
119 typedef struct _XlwMenuRec
125 /* New fields for the XlwMenu widget class record */
131 /* Full class record declaration. */
132 typedef struct _XlwMenuClassRec
134 CoreClassPart core_class
;
135 XlwMenuClassPart menu_class
;
139 extern XlwMenuClassRec xlwMenuClassRec
;
141 #endif /* _XlwMenuP_h */