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, see <http://www.gnu.org/licenses/>.
19 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
20 * file for a list of people on the GTK+ Team. See the ChangeLog
21 * files for a list of changes. These files are distributed with
22 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25 #ifndef __GTK_MENU_PRIVATE_H__
26 #define __GTK_MENU_PRIVATE_H__
28 #include <gtk/gtkmenu.h>
32 /* Directions for submenus */
37 } GtkSubmenuDirection;
39 /* Placement of submenus */
44 } GtkSubmenuPlacement;
47 struct _GtkMenuPrivate
49 GtkWidget *parent_menu_item;
50 GtkWidget *old_active_menu_item;
52 GtkAccelGroup *accel_group;
55 GtkMenuPositionFunc position_func;
56 gpointer position_func_data;
57 GDestroyNotify position_func_data_destroy;
64 /* Do _not_ touch these widgets directly. We hide the reference
65 * count from the toplevel to the menu, so it must be restored
66 * before operating on these widgets
70 GtkWidget *tearoff_window;
71 GtkWidget *tearoff_hbox;
72 GtkWidget *tearoff_scrollbar;
73 GtkAdjustment *tearoff_adjustment;
75 GdkWindow *view_window;
76 GdkWindow *bin_window;
79 gint saved_scroll_offset;
84 guint needs_destruction_ref : 1;
86 /* The tearoff is active when it is torn off and the not-torn-off
87 * menu is not popped up.
89 guint tearoff_active : 1;
90 guint scroll_fast : 1;
92 guint upper_arrow_visible : 1;
93 guint lower_arrow_visible : 1;
94 guint upper_arrow_prelight : 1;
95 guint lower_arrow_prelight : 1;
97 guint have_position : 1;
98 guint have_layout : 1;
99 guint seen_item_enter : 1;
100 guint ignore_button_release : 1;
101 guint no_toggle_size : 1;
102 guint drag_already_pressed : 1;
103 guint drag_scroll_started : 1;
105 /* info used for the table */
108 gint requested_height;
110 gboolean initially_pushed_in;
113 /* Cached layout information */
120 GtkStateFlags lower_arrow_state;
121 GtkStateFlags upper_arrow_state;
123 /* navigation region */
126 gint navigation_width;
127 gint navigation_height;
129 guint navigation_timeout;
131 gdouble drag_start_y;
132 gint initial_drag_offset;
137 #endif /* __GTK_MENU_PRIVATE_H__ */