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 */
|
2002-05-06 18:54:28 +00:00
|
|
|
typedef struct _XlwMenu_part
|
1994-05-06 17:28:42 +00:00
|
|
|
{
|
|
|
|
/* slots set by the resources */
|
|
|
|
XFontStruct* font;
|
1994-05-06 17:29:23 +00:00
|
|
|
Pixel foreground;
|
2002-05-06 18:54:28 +00:00
|
|
|
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;
|
2000-01-17 09:11:23 +00:00
|
|
|
XtCallbackList select, highlight;
|
1994-05-06 17:28:42 +00:00
|
|
|
widget_value* contents;
|
|
|
|
int horizontal;
|
2000-06-16 18:33:58 +00:00
|
|
|
|
|
|
|
/* 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;
|
2002-05-06 18:54:28 +00:00
|
|
|
|
1994-05-06 17:28:42 +00:00
|
|
|
/* State of the XlwMenu */
|
2004-01-12 01:45:22 +00:00
|
|
|
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;
|
2002-05-06 18:54:28 +00:00
|
|
|
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 */
|
2002-05-06 18:54:28 +00:00
|
|
|
typedef struct _XlwMenuRec
|
1994-05-06 17:28:42 +00:00
|
|
|
{
|
|
|
|
CorePart core;
|
|
|
|
XlwMenuPart menu;
|
|
|
|
} XlwMenuRec;
|
|
|
|
|
|
|
|
/* New fields for the XlwMenu widget class record */
|
2002-05-06 18:54:28 +00:00
|
|
|
typedef struct
|
1994-05-06 17:28:42 +00:00
|
|
|
{
|
|
|
|
int dummy;
|
|
|
|
} XlwMenuClassPart;
|
|
|
|
|
|
|
|
/* Full class record declaration. */
|
2002-05-06 18:54:28 +00:00
|
|
|
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) */
|