1 /* ///////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/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 __GTK_TREE_ENTRY_H__
11 #define __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_TREE_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, gtk_tree_entry_get_type (), GtkTreeEntryClass))
24 #define GTK_IS_TREE_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, gtk_tree_entry_get_type ()))
26 typedef struct _GtkTreeEntry GtkTreeEntry
;
27 typedef struct _GtkTreeEntryClass GtkTreeEntryClass
;
29 typedef void (*GtkTreeEntryDestroy
) (GtkTreeEntry
* entry
, gpointer context
);
33 GObject parent
; /* object instance */
34 gchar
* label
; /* label - always copied by this object except on get */
35 gchar
* collate_key
; /* collate key used for string comparisons/sorting */
36 gpointer userdata
; /* untouched userdata */
37 GtkTreeEntryDestroy destroy_func
; /* called upon destruction - use for freeing userdata etc. */
38 gpointer destroy_func_data
; /* context passed to destroy_func */
41 struct _GtkTreeEntryClass
47 GtkTreeEntry
* gtk_tree_entry_new (void);
50 GType
gtk_tree_entry_get_type (void);
53 gchar
* gtk_tree_entry_get_collate_key (GtkTreeEntry
* entry
);
56 gchar
* gtk_tree_entry_get_label (GtkTreeEntry
* entry
);
59 gpointer
gtk_tree_entry_get_userdata (GtkTreeEntry
* entry
);
62 void gtk_tree_entry_set_label (GtkTreeEntry
* entry
, const gchar
* label
);
65 void gtk_tree_entry_set_userdata (GtkTreeEntry
* entry
, gpointer userdata
);
68 void gtk_tree_entry_set_destroy_func (GtkTreeEntry
* entry
,
69 GtkTreeEntryDestroy destroy_func
,
70 gpointer destroy_func_data
);
74 #endif /* __cplusplus */
76 #endif /* __GTK_TREE_ENTRY_H__ */