1 /* ///////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/private/treeentry_gtk.h
3 // Purpose: GtkTreeEntry - a string/userdata combo for use with treeview
6 // Copyright: (c) 2006 Ryan Norton
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////// */
10 #ifndef _WX_GTK_TREE_ENTRY_H_
11 #define _WX_GTK_TREE_ENTRY_H_
15 #endif /* __cplusplus */
17 #include <gtk/gtk.h> /* for gpointer and gchar* etc. */
19 #include "wx/dlimpexp.h"
21 #define GTK_TYPE_TREE_ENTRY (gtk_tree_entry_get_type())
22 #define GTK_TREE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, gtk_tree_entry_get_type (), GtkTreeEntry))
23 #define GTK_IS_TREE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_tree_entry_get_type ()))
25 typedef struct _GtkTreeEntry GtkTreeEntry
;
27 typedef void (*GtkTreeEntryDestroy
) (GtkTreeEntry
* entry
, gpointer context
);
31 GObject parent
; /* object instance */
32 gchar
* label
; /* label - always copied by this object except on get */
33 gchar
* collate_key
; /* collate key used for string comparisons/sorting */
34 gpointer userdata
; /* untouched userdata */
35 GtkTreeEntryDestroy destroy_func
; /* called upon destruction - use for freeing userdata etc. */
36 gpointer destroy_func_data
; /* context passed to destroy_func */
40 GtkTreeEntry
* gtk_tree_entry_new (void);
43 GType
gtk_tree_entry_get_type (void);
46 gchar
* gtk_tree_entry_get_collate_key (GtkTreeEntry
* entry
);
49 gchar
* gtk_tree_entry_get_label (GtkTreeEntry
* entry
);
52 gpointer
gtk_tree_entry_get_userdata (GtkTreeEntry
* entry
);
55 void gtk_tree_entry_set_label (GtkTreeEntry
* entry
, const gchar
* label
);
58 void gtk_tree_entry_set_userdata (GtkTreeEntry
* entry
, gpointer userdata
);
61 void gtk_tree_entry_set_destroy_func (GtkTreeEntry
* entry
,
62 GtkTreeEntryDestroy destroy_func
,
63 gpointer destroy_func_data
);
67 #endif /* __cplusplus */
69 #endif /* _WX_GTK_TREE_ENTRY_H_ */