summaryrefslogtreecommitdiff
path: root/gtk/gtktreemenu.h
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2010-11-20 16:32:24 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2011-01-04 23:37:06 +0900
commit9ffaae50220da45e0004b4682ec7d1d1031fe924 (patch)
treecc91d1b6b431ce35dc216481b70604e9301626eb /gtk/gtktreemenu.h
parent6d8dfd5546578bd49835aa2dd44e12f0f427f38a (diff)
downloadgtk+-9ffaae50220da45e0004b4682ec7d1d1031fe924.tar.gz
Added GtkTreeMenuHeaderFunc to decide if a submenu gets a leaf header.
GtkComboBox needs treemenus to allow selection of all leafs including rows which may have children, this allows the combobox or combobox user to decide which row that has children can also be selectable as a header leaf of the submenu. Test case testtreemenu updated to reflect this.
Diffstat (limited to 'gtk/gtktreemenu.h')
-rw-r--r--gtk/gtktreemenu.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk/gtktreemenu.h b/gtk/gtktreemenu.h
index 9a05678ad2..539613f161 100644
--- a/gtk/gtktreemenu.h
+++ b/gtk/gtktreemenu.h
@@ -46,6 +46,9 @@ typedef struct _GtkTreeMenu GtkTreeMenu;
typedef struct _GtkTreeMenuClass GtkTreeMenuClass;
typedef struct _GtkTreeMenuPrivate GtkTreeMenuPrivate;
+typedef gboolean (*GtkTreeMenuHeaderFunc) (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data);
struct _GtkTreeMenu
{
@@ -89,6 +92,12 @@ void gtk_tree_menu_set_row_separator_func (GtkTreeMenu
GDestroyNotify destroy);
GtkTreeViewRowSeparatorFunc gtk_tree_menu_get_row_separator_func (GtkTreeMenu *menu);
+void gtk_tree_menu_set_header_func (GtkTreeMenu *menu,
+ GtkTreeMenuHeaderFunc func,
+ gpointer data,
+ GDestroyNotify destroy);
+GtkTreeMenuHeaderFunc gtk_tree_menu_get_header_func (GtkTreeMenu *menu);
+
G_END_DECLS
#endif /* __GTK_TREE_MENU_H__ */