1 /* gtktreemenu.h 2 * 3 * Copyright (C) 2010 Openismus GmbH 4 * 5 * Authors: 6 * Tristan Van Berkom <tristanvb@openismus.com> 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Library General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Library General Public License for more details. 17 * 18 * You should have received a copy of the GNU Library General Public 19 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef __GTK_TREE_MENU_H__ 23 #define __GTK_TREE_MENU_H__ 24 25 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) 26 #error "Only <gtk/gtk.h> can be included directly." 27 #endif 28 29 #include <gtk/gtkmenu.h> 30 #include <gtk/gtktreemodel.h> 31 #include <gtk/gtktreeview.h> 32 #include <gtk/gtkcellarea.h> 33 34 G_BEGIN_DECLS 35 36 #define GTK_TYPE_TREE_MENU (_gtk_tree_menu_get_type ()) 37 #define GTK_TREE_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_MENU, GtkTreeMenu)) 38 #define GTK_TREE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_MENU, GtkTreeMenuClass)) 39 #define GTK_IS_TREE_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_MENU)) 40 #define GTK_IS_TREE_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_MENU)) 41 #define GTK_TREE_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_MENU, GtkTreeMenuClass)) 42 43 typedef struct _GtkTreeMenu GtkTreeMenu; 44 typedef struct _GtkTreeMenuClass GtkTreeMenuClass; 45 typedef struct _GtkTreeMenuPrivate GtkTreeMenuPrivate; 46 47 struct _GtkTreeMenu 48 { 49 GtkMenu parent_instance; 50 51 /*< private >*/ 52 GtkTreeMenuPrivate *priv; 53 }; 54 55 struct _GtkTreeMenuClass 56 { 57 GtkMenuClass parent_class; 58 59 /*< private >*/ 60 /* Padding for future expansion */ 61 void (*_gtk_reserved1) (void); 62 void (*_gtk_reserved2) (void); 63 void (*_gtk_reserved3) (void); 64 void (*_gtk_reserved4) (void); 65 void (*_gtk_reserved5) (void); 66 void (*_gtk_reserved6) (void); 67 }; 68 69 GType _gtk_tree_menu_get_type (void) G_GNUC_CONST; 70 71 GtkWidget *_gtk_tree_menu_new (void); 72 GtkWidget *_gtk_tree_menu_new_with_area (GtkCellArea *area); 73 GtkWidget *_gtk_tree_menu_new_full (GtkCellArea *area, 74 GtkTreeModel *model, 75 GtkTreePath *root); 76 void _gtk_tree_menu_set_model (GtkTreeMenu *menu, 77 GtkTreeModel *model); 78 GtkTreeModel *_gtk_tree_menu_get_model (GtkTreeMenu *menu); 79 void _gtk_tree_menu_set_root (GtkTreeMenu *menu, 80 GtkTreePath *path); 81 GtkTreePath *_gtk_tree_menu_get_root (GtkTreeMenu *menu); 82 gboolean _gtk_tree_menu_get_tearoff (GtkTreeMenu *menu); 83 void _gtk_tree_menu_set_tearoff (GtkTreeMenu *menu, 84 gboolean tearoff); 85 gint _gtk_tree_menu_get_wrap_width (GtkTreeMenu *menu); 86 void _gtk_tree_menu_set_wrap_width (GtkTreeMenu *menu, 87 gint width); 88 gint _gtk_tree_menu_get_row_span_column (GtkTreeMenu *menu); 89 void _gtk_tree_menu_set_row_span_column (GtkTreeMenu *menu, 90 gint row_span); 91 gint _gtk_tree_menu_get_column_span_column (GtkTreeMenu *menu); 92 void _gtk_tree_menu_set_column_span_column (GtkTreeMenu *menu, 93 gint column_span); 94 95 GtkTreeViewRowSeparatorFunc _gtk_tree_menu_get_row_separator_func (GtkTreeMenu *menu); 96 void _gtk_tree_menu_set_row_separator_func (GtkTreeMenu *menu, 97 GtkTreeViewRowSeparatorFunc func, 98 gpointer data, 99 GDestroyNotify destroy); 100 101 G_END_DECLS 102 103 #endif /* __GTK_TREE_MENU_H__ */ 104