Ardour  8.7-14-g57a6773833
treesortable.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_TREESORTABLE_H
4 #define _GTKMM_TREESORTABLE_H
5 
6 #include <gtkmmconfig.h>
7 
8 
9 #include <glibmm/ustring.h>
10 #include <sigc++/sigc++.h>
11 
12 /* $Id: treesortable.hg,v 1.8 2006/04/21 07:41:28 murrayc Exp $ */
13 
14 
15 /* Copyright (C) 1998-2002 The gtkmm Development Team
16  *
17  * This library is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU Lesser General Public
19  * License as published by the Free Software Foundation; either
20  * version 2.1 of the License, or (at your option) any later version.
21  *
22  * This library is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25  * Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public
28  * License along with this library; if not, write to the Free
29  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30  */
31 
32 // This is for including the config header before any code (such as
33 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
34 
35 
36 #include <glibmm/interface.h>
37 #include <gtkmm/enums.h>
38 #include <gtkmm/treemodelcolumn.h>
39 #include <gtkmm/treemodel.h>
40 #include <gtkmm/treeiter.h>
41 
42 
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 extern "C"
45 {
47 }
48 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
49 
50 
51 #ifndef DOXYGEN_SHOULD_SKIP_THIS
52 typedef struct _GtkTreeSortable GtkTreeSortable;
53 typedef struct _GtkTreeSortableClass GtkTreeSortableClass;
54 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
55 
56 
57 #ifndef DOXYGEN_SHOULD_SKIP_THIS
58 namespace Gtk
59 { class TreeSortable_Class; } // namespace Gtk
60 #endif // DOXYGEN_SHOULD_SKIP_THIS
61 
62 namespace Gtk
63 {
64 
65 //TODO: This should maybe derive from TreeModel, because it is a prerequisite. murrayc
66 
71 class TreeSortable : public Glib::Interface
72 {
73 
74 #ifndef DOXYGEN_SHOULD_SKIP_THIS
75 
76 public:
77  typedef TreeSortable CppObjectType;
78  typedef TreeSortable_Class CppClassType;
79  typedef GtkTreeSortable BaseObjectType;
80  typedef GtkTreeSortableIface BaseClassType;
81 
82 private:
83  friend class TreeSortable_Class;
84  static CppClassType treesortable_class_;
85 
86  // noncopyable
87  TreeSortable(const TreeSortable&);
88  TreeSortable& operator=(const TreeSortable&);
89 
90 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
91 protected:
96 
97 #ifndef DOXYGEN_SHOULD_SKIP_THIS
104  explicit TreeSortable(const Glib::Interface_Class& interface_class);
105 
106 public:
107  // This is public so that C++ wrapper instances can be
108  // created for C instances of unwrapped types.
109  // For instance, if an unexpected C type implements the C interface.
110  explicit TreeSortable(GtkTreeSortable* castitem);
111 
112 protected:
113 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
114 
115 public:
116  virtual ~TreeSortable();
117 
118  static void add_interface(GType gtype_implementer);
119 
122  static GType get_type() G_GNUC_CONST;
123 
124 #ifndef DOXYGEN_SHOULD_SKIP_THIS
125  static GType get_base_type() G_GNUC_CONST;
126 #endif
127 
129  GtkTreeSortable* gobj() { return reinterpret_cast<GtkTreeSortable*>(gobject_); }
130 
132  const GtkTreeSortable* gobj() const { return reinterpret_cast<GtkTreeSortable*>(gobject_); }
133 
134 private:
135 
136 
137 public:
138 
139  enum
140  {
144  }; //See GTK+ implementation.
145 
146 
157  bool get_sort_column_id(int& sort_column_id, SortType& order) const;
158 
159 
175  void set_sort_column(const TreeModelColumnBase& sort_column_id, SortType order);
176 
192  void set_sort_column(int sort_column_id, SortType order);
193 
194  #ifndef GTKMM_DISABLE_DEPRECATED
195 
198  void set_sort_column_id(const TreeModelColumnBase& sort_column_id, SortType order);
199 
202  void set_sort_column_id(int sort_column_id, SortType order);
203  #endif // GTKMM_DISABLE_DEPRECATED
204 
205 
209  typedef sigc::slot<int, const Gtk::TreeModel::iterator&, const Gtk::TreeModel::iterator&> SlotCompare;
210 
211 
217  void set_sort_func(const TreeModelColumnBase& sort_column, const SlotCompare& slot);
218 
224  void set_sort_func(int sort_column_id, const SlotCompare& slot);
225 
233 
241 
242 
249  bool has_default_sort_func() const;
250 
251 
255 
262  Glib::SignalProxy0< void > signal_sort_column_changed();
263 
264 
265 protected:
266  virtual bool get_sort_column_id_vfunc(int* sort_column_id, SortType* order) const;
267 
268  virtual void set_sort_column_id_vfunc(int sort_column_id, SortType order);
269 
270  virtual void set_sort_func_vfunc(int sort_column_id, GtkTreeIterCompareFunc func, void* data, GDestroyNotify destroy);
271 
272  virtual void set_default_sort_func_vfunc(GtkTreeIterCompareFunc func, void* data, GDestroyNotify destroy);
273 
274  virtual bool has_default_sort_func_vfunc() const;
275 
276  virtual void sort_column_changed_vfunc() const;
277 
278 
279 public:
280 
281 public:
282  //C++ methods used to invoke GTK+ virtual functions:
283 
284 protected:
285  //GTK+ Virtual Functions (override these to change behaviour):
286 
287  //Default Signal Handlers::
289  virtual void on_sort_column_changed();
290 
291 
292 };
293 
294 } // namespace Gtk
295 
296 
297 namespace Glib
298 {
307  Glib::RefPtr<Gtk::TreeSortable> wrap(GtkTreeSortable* object, bool take_copy = false);
308 
309 } // namespace Glib
310 
311 
312 #endif /* _GTKMM_TREESORTABLE_H */
313 
void set_sort_column(int sort_column_id, SortType order)
void set_sort_func(int sort_column_id, const SlotCompare &slot)
void sort_column_changed()
Glib::RefPtr< Gtk::TreeSortable > wrap(GtkTreeSortable *object, bool take_copy=false)
bool has_default_sort_func() const
void set_sort_column_id(int sort_column_id, SortType order)
@ DEFAULT_SORT_COLUMN_ID
See set_default_sort_func() and set_sort_column().
Definition: treesortable.h:142
void set_sort_func(const TreeModelColumnBase &sort_column, const SlotCompare &slot)
virtual void set_sort_column_id_vfunc(int sort_column_id, SortType order)
virtual void set_sort_func_vfunc(int sort_column_id, GtkTreeIterCompareFunc func, void *data, GDestroyNotify destroy)
virtual void on_sort_column_changed()
This is a default handler for the signal signal_sort_column_changed().
GtkTreeSortable * gobj()
Provides access to the underlying C GObject.
Definition: treesortable.h:129
bool get_sort_column_id(int &sort_column_id, SortType &order) const
void set_sort_column_id(const TreeModelColumnBase &sort_column_id, SortType order)
void set_default_sort_func(const SlotCompare &slot)
static void add_interface(GType gtype_implementer)
const GtkTreeSortable * gobj() const
Provides access to the underlying C GObject.
Definition: treesortable.h:132
virtual void sort_column_changed_vfunc() const
sigc::slot< int, const Gtk::TreeModel::iterator &, const Gtk::TreeModel::iterator & > SlotCompare
Definition: treesortable.h:209
virtual ~TreeSortable()
void unset_default_sort_func()
virtual bool get_sort_column_id_vfunc(int *sort_column_id, SortType *order) const
void set_sort_column(const TreeModelColumnBase &sort_column_id, SortType order)
Glib::SignalProxy0< void > signal_sort_column_changed()
virtual void set_default_sort_func_vfunc(GtkTreeIterCompareFunc func, void *data, GDestroyNotify destroy)
static GType get_type() G_GNUC_CONST
virtual bool has_default_sort_func_vfunc() const
struct _GtkTreeSortable GtkTreeSortable
gint(* GtkTreeIterCompareFunc)(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data)
PBD::PropertyDescriptor< uint32_t > order
Definition: ardour_ui.h:188