diff options
author | Kristian Rietveld <kris@gtk.org> | 2003-09-10 20:32:33 +0000 |
---|---|---|
committer | Kristian Rietveld <kristian@src.gnome.org> | 2003-09-10 20:32:33 +0000 |
commit | e23ed607821328952000268ff8227cf36cddefc9 (patch) | |
tree | 168992840abef642457c9993cdd133217a690996 /gtk/gtkmenu.h | |
parent | 87c0d2651ca1c3b401d238dd6fd1d0c9e311526a (diff) | |
download | gtk+-e23ed607821328952000268ff8227cf36cddefc9.tar.gz |
The table menu patch! Turns GtkMenu into a table, so you can attach menu
Wed Sep 10 22:25:04 2003 Kristian Rietveld <kris@gtk.org>
The table menu patch! Turns GtkMenu into a table, so you can attach
menu items in numerous new ways! Be creative!
Contains some bug fixes and RTL adaptions from Matthias Clasen.
* gtk/gtkmenu.c [toplevel]: introduce ATTACH_INFO_KEY, extend
GtkMenuPrivate, introduce AttachInfo, add child properties enum,
(gtk_menu_free_private), (gtk_menu_get_private): we have to free
the heights array in the private struct,
(gtk_menu_class_init): reorder code a bit, install child properties,
(get_attach_info), (get_child_attach): new utility functions,
(gtk_menu_set_child_property), (gtk_menu_get_child_property): introduce
child properties, for the attach info,
(gtk_menu_remove): remove AttachInfo from menu item,
(gtk_menu_real_insert): implemented algorithm to automagically place
inserted menu items at the correct place in the table,
(gtk_menu_size_request), (gtk_menu_size_allocate),
(compute_child_offset): reworked/rewritten to support table menus,
(gtk_menu_attach): new function,
(find_child_containing), (gtk_menu_move_current): new functions to
get table menu keynav right.
* gtk/gtkmenu.h: add gtk_menu_attach() prototype.
Diffstat (limited to 'gtk/gtkmenu.h')
-rw-r--r-- | gtk/gtkmenu.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtkmenu.h b/gtk/gtkmenu.h index 62d5ac3e29..b430254ba3 100644 --- a/gtk/gtkmenu.h +++ b/gtk/gtkmenu.h @@ -188,6 +188,15 @@ void gtk_menu_reorder_child (GtkMenu *menu, void gtk_menu_set_screen (GtkMenu *menu, GdkScreen *screen); + +void gtk_menu_attach (GtkMenu *menu, + GtkWidget *child, + guint left_attach, + guint right_attach, + guint top_attach, + guint bottom_attach); + + #ifndef GTK_DISABLE_DEPRECATED #define gtk_menu_append(menu,child) gtk_menu_shell_append ((GtkMenuShell *)(menu),(child)) #define gtk_menu_prepend(menu,child) gtk_menu_shell_prepend ((GtkMenuShell *)(menu),(child)) |