]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/private/treeentry_gtk.h
Define WXBUILDING in Xcode projects.
[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 #define WX_TYPE_TREE_ENTRY wx_tree_entry_get_type()
20 #define WX_TREE_ENTRY(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wx_tree_entry_get_type(), wxTreeEntry)
21 #define WX_IS_TREE_ENTRY(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wx_tree_entry_get_type())
22
23 typedef struct _wxTreeEntry wxTreeEntry;
24
25 typedef void (*wxTreeEntryDestroy)(wxTreeEntry* entry, void* context);
26
27 struct _wxTreeEntry
28 {
29 GObject parent; /* object instance */
30 gchar* label; /* label - always copied by this object except on get */
31 gchar* collate_key; /* collate key used for string comparisons/sorting */
32 gpointer userdata; /* untouched userdata */
33 wxTreeEntryDestroy destroy_func; /* called upon destruction - use for freeing userdata etc. */
34 gpointer destroy_func_data; /* context passed to destroy_func */
35 };
36
37 wxTreeEntry* wx_tree_entry_new(void);
38
39 GType wx_tree_entry_get_type(void);
40
41 char* wx_tree_entry_get_collate_key(wxTreeEntry* entry);
42
43 char* wx_tree_entry_get_label(wxTreeEntry* entry);
44
45 void* wx_tree_entry_get_userdata(wxTreeEntry* entry);
46
47 void wx_tree_entry_set_label(wxTreeEntry* entry, const char* label);
48
49 void wx_tree_entry_set_userdata(wxTreeEntry* entry, void* userdata);
50
51 void wx_tree_entry_set_destroy_func(wxTreeEntry* entry,
52 wxTreeEntryDestroy destroy_func,
53 gpointer destroy_func_data);
54
55 #ifdef __cplusplus
56 }
57 #endif /* __cplusplus */
58
59 #endif /* _WX_GTK_TREE_ENTRY_H_ */