1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
21 * file for a list of people on the GTK+ Team. See the ChangeLog
22 * files for a list of changes. These files are distributed with
23 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
26 #ifndef __GTK_MENU_PRIVATE_H__
27 #define __GTK_MENU_PRIVATE_H__
29 #include <gtk/gtkmenu.h>
33 /* Directions for submenus */
38 } GtkSubmenuDirection;
40 /* Placement of submenus */
45 } GtkSubmenuPlacement;
48 struct _GtkMenuPrivate
50 GtkWidget *parent_menu_item;
51 GtkWidget *old_active_menu_item;
53 GtkAccelGroup *accel_group;
56 GtkMenuPositionFunc position_func;
57 gpointer position_func_data;
58 GDestroyNotify position_func_data_destroy;
65 /* Do _not_ touch these widgets directly. We hide the reference
66 * count from the toplevel to the menu, so it must be restored
67 * before operating on these widgets
71 GtkWidget *tearoff_window;
72 GtkWidget *tearoff_hbox;
73 GtkWidget *tearoff_scrollbar;
74 GtkAdjustment *tearoff_adjustment;
76 GdkWindow *view_window;
77 GdkWindow *bin_window;
80 gint saved_scroll_offset;
85 guint needs_destruction_ref : 1;
87 /* The tearoff is active when it is torn off and the not-torn-off
88 * menu is not popped up.
90 guint tearoff_active : 1;
91 guint scroll_fast : 1;
93 guint upper_arrow_visible : 1;
94 guint lower_arrow_visible : 1;
95 guint upper_arrow_prelight : 1;
96 guint lower_arrow_prelight : 1;
98 guint have_position : 1;
99 guint have_layout : 1;
100 guint seen_item_enter : 1;
101 guint ignore_button_release : 1;
102 guint no_toggle_size : 1;
104 /* info used for the table */
107 gint requested_height;
109 gboolean initially_pushed_in;
112 /* Cached layout information */
119 GtkStateFlags lower_arrow_state;
120 GtkStateFlags upper_arrow_state;
122 /* navigation region */
125 gint navigation_width;
126 gint navigation_height;
128 guint navigation_timeout;
133 #endif /* __GTK_MENU_PRIVATE_H__ */