1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-29 11:02:01 +00:00
emacs/lwlib/xlwmenuP.h

129 lines
3.2 KiB
C
Raw Normal View History

/* Internals of a lightweight menubar widget.
2005-08-07 10:56:27 +00:00
Copyright (C) 1999, 2000, 2002, 2003, 2004,
2006-02-05 23:44:47 +00:00
2005, 2006 Free Software Foundation, Inc.
This file is part of the Lucid Widget Library.
The Lucid Widget Library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
The Lucid Widget Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs; see the file COPYING. If not, write to the
2005-07-04 15:47:28 +00:00
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
1994-05-06 17:28:42 +00:00
#ifndef _XlwMenuP_h
#define _XlwMenuP_h
#include "xlwmenu.h"
#include <X11/CoreP.h>
/* Elements in the stack arrays. */
typedef struct _window_state
{
Window window;
Position x;
Position y;
Dimension width;
Dimension height;
Dimension label_width;
1999-07-21 21:43:52 +00:00
/* Width of toggle buttons or radio buttons. */
Dimension button_width;
1994-05-06 17:28:42 +00:00
} window_state;
/* New fields for the XlwMenu widget instance record */
typedef struct _XlwMenu_part
1994-05-06 17:28:42 +00:00
{
/* slots set by the resources */
#ifdef HAVE_X_I18N
XFontSet fontSet;
XFontSetExtents *font_extents;
#endif
XFontStruct* font;
1994-05-06 17:29:23 +00:00
Pixel foreground;
Pixel disabled_foreground;
1994-05-06 17:28:42 +00:00
Pixel button_foreground;
Dimension margin;
Dimension horizontal_spacing;
Dimension vertical_spacing;
Dimension arrow_spacing;
Dimension shadow_thickness;
Pixel top_shadow_color;
Pixel bottom_shadow_color;
Pixmap top_shadow_pixmap;
Pixmap bottom_shadow_pixmap;
1994-05-06 17:29:23 +00:00
Cursor cursor_shape;
1994-05-06 17:28:42 +00:00
XtCallbackList open;
XtCallbackList select, highlight;
1994-05-06 17:28:42 +00:00
widget_value* contents;
int horizontal;
/* True means top_shadow_color and/or bottom_shadow_color must be freed. */
unsigned free_top_shadow_color_p : 1;
unsigned free_bottom_shadow_color_p : 1;
1994-05-06 17:28:42 +00:00
/* State of the XlwMenu */
int top_depth;
1994-05-06 17:28:42 +00:00
int old_depth;
widget_value** old_stack;
int old_stack_length;
/* New state after the user moved */
int new_depth;
widget_value** new_stack;
int new_stack_length;
/* Window resources */
window_state* windows;
int windows_length;
/* Internal part, set by the XlwMenu */
GC foreground_gc;
GC button_gc;
GC background_gc;
GC disabled_gc;
1994-05-06 17:28:42 +00:00
GC inactive_button_gc;
GC shadow_top_gc;
GC shadow_bottom_gc;
Cursor cursor;
Boolean popped_up;
Pixmap gray_pixmap;
} XlwMenuPart;
/* Full instance record declaration */
typedef struct _XlwMenuRec
1994-05-06 17:28:42 +00:00
{
CorePart core;
XlwMenuPart menu;
} XlwMenuRec;
/* New fields for the XlwMenu widget class record */
typedef struct
1994-05-06 17:28:42 +00:00
{
int dummy;
} XlwMenuClassPart;
/* Full class record declaration. */
typedef struct _XlwMenuClassRec
1994-05-06 17:28:42 +00:00
{
CoreClassPart core_class;
XlwMenuClassPart menu_class;
} XlwMenuClassRec;
/* Class pointer. */
extern XlwMenuClassRec xlwMenuClassRec;
#endif /* _XlwMenuP_h */
2003-09-01 15:45:59 +00:00
/* arch-tag: 18d7fc41-ffa0-47a3-a49f-3469900c7a25
(do not change this comment) */