]>
Commit | Line | Data |
---|---|---|
4a46cbe8 | 1 | /* /////////////////////////////////////////////////////////////////////////// |
3540b72b | 2 | // Name: wx/gtk/private/treeentry_gtk.h |
4a46cbe8 RR |
3 | // Purpose: GtkTreeEntry - a string/userdata combo for use with treeview |
4 | // Author: Ryan Norton | |
4a46cbe8 RR |
5 | // Copyright: (c) 2006 Ryan Norton |
6 | // Licence: wxWindows licence | |
7 | /////////////////////////////////////////////////////////////////////////// */ | |
8 | ||
3540b72b PC |
9 | #ifndef _WX_GTK_TREE_ENTRY_H_ |
10 | #define _WX_GTK_TREE_ENTRY_H_ | |
4a46cbe8 RR |
11 | |
12 | #ifdef __cplusplus | |
13 | extern "C" { | |
14 | #endif /* __cplusplus */ | |
15 | ||
16 | #include <gtk/gtk.h> /* for gpointer and gchar* etc. */ | |
17 | ||
11f1e38e PC |
18 | #define WX_TYPE_TREE_ENTRY wx_tree_entry_get_type() |
19 | #define WX_TREE_ENTRY(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wx_tree_entry_get_type(), wxTreeEntry) | |
20 | #define WX_IS_TREE_ENTRY(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wx_tree_entry_get_type()) | |
4a46cbe8 | 21 | |
11f1e38e | 22 | typedef struct _wxTreeEntry wxTreeEntry; |
4a46cbe8 | 23 | |
11f1e38e | 24 | typedef void (*wxTreeEntryDestroy)(wxTreeEntry* entry, void* context); |
4a46cbe8 | 25 | |
11f1e38e | 26 | struct _wxTreeEntry |
4a46cbe8 RR |
27 | { |
28 | GObject parent; /* object instance */ | |
29 | gchar* label; /* label - always copied by this object except on get */ | |
30 | gchar* collate_key; /* collate key used for string comparisons/sorting */ | |
31 | gpointer userdata; /* untouched userdata */ | |
11f1e38e | 32 | wxTreeEntryDestroy destroy_func; /* called upon destruction - use for freeing userdata etc. */ |
4a46cbe8 RR |
33 | gpointer destroy_func_data; /* context passed to destroy_func */ |
34 | }; | |
35 | ||
11f1e38e | 36 | wxTreeEntry* wx_tree_entry_new(void); |
4a46cbe8 | 37 | |
11f1e38e | 38 | GType wx_tree_entry_get_type(void); |
4a46cbe8 | 39 | |
11f1e38e | 40 | char* wx_tree_entry_get_collate_key(wxTreeEntry* entry); |
4a46cbe8 | 41 | |
11f1e38e | 42 | char* wx_tree_entry_get_label(wxTreeEntry* entry); |
4a46cbe8 | 43 | |
11f1e38e | 44 | void* wx_tree_entry_get_userdata(wxTreeEntry* entry); |
4a46cbe8 | 45 | |
11f1e38e | 46 | void wx_tree_entry_set_label(wxTreeEntry* entry, const char* label); |
4a46cbe8 | 47 | |
11f1e38e | 48 | void wx_tree_entry_set_userdata(wxTreeEntry* entry, void* userdata); |
4a46cbe8 | 49 | |
11f1e38e PC |
50 | void wx_tree_entry_set_destroy_func(wxTreeEntry* entry, |
51 | wxTreeEntryDestroy destroy_func, | |
4a46cbe8 RR |
52 | gpointer destroy_func_data); |
53 | ||
54 | #ifdef __cplusplus | |
55 | } | |
56 | #endif /* __cplusplus */ | |
57 | ||
3540b72b | 58 | #endif /* _WX_GTK_TREE_ENTRY_H_ */ |