]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/private/treeentry_gtk.h
18ed5181aecadad87c362f4e18dc51bfaa362082
[wxWidgets.git] / include / wx / gtk / private / treeentry_gtk.h
1 /* ///////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/private/treeentry_gtk.h
3 // Purpose: GtkTreeEntry - a string/userdata combo for use with treeview
4 // Author: Ryan Norton
5 // Id: $Id$
6 // Copyright: (c) 2006 Ryan Norton
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////// */
9
10 #ifndef _WX_GTK_TREE_ENTRY_H_
11 #define _WX_GTK_TREE_ENTRY_H_
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* __cplusplus */
16
17 #include <gtk/gtk.h> /* for gpointer and gchar* etc. */
18
19 #include "wx/dlimpexp.h"
20
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 ()))
24
25 typedef struct _GtkTreeEntry GtkTreeEntry;
26
27 typedef void (*GtkTreeEntryDestroy) (GtkTreeEntry* entry, gpointer context);
28
29 struct _GtkTreeEntry
30 {
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 */
37 };
38
39 WXDLLIMPEXP_CORE
40 GtkTreeEntry* gtk_tree_entry_new (void);
41
42 WXDLLIMPEXP_CORE
43 GType gtk_tree_entry_get_type (void);
44
45 WXDLLIMPEXP_CORE
46 gchar* gtk_tree_entry_get_collate_key (GtkTreeEntry* entry);
47
48 WXDLLIMPEXP_CORE
49 gchar* gtk_tree_entry_get_label (GtkTreeEntry* entry);
50
51 WXDLLIMPEXP_CORE
52 gpointer gtk_tree_entry_get_userdata (GtkTreeEntry* entry);
53
54 WXDLLIMPEXP_CORE
55 void gtk_tree_entry_set_label (GtkTreeEntry* entry, const gchar* label);
56
57 WXDLLIMPEXP_CORE
58 void gtk_tree_entry_set_userdata (GtkTreeEntry* entry, gpointer userdata);
59
60 WXDLLIMPEXP_CORE
61 void gtk_tree_entry_set_destroy_func (GtkTreeEntry* entry,
62 GtkTreeEntryDestroy destroy_func,
63 gpointer destroy_func_data);
64
65 #ifdef __cplusplus
66 }
67 #endif /* __cplusplus */
68
69 #endif /* _WX_GTK_TREE_ENTRY_H_ */