Ardour  9.0-pre0-582-g084a23a80d
treemodelfilter.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_TREEMODELFILTER_H
4 #define _GTKMM_TREEMODELFILTER_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: treemodelfilter.hg,v 1.16 2006/04/12 11:11:25 murrayc Exp $ */
11 
12 /* Copyright(C) 1998-2002 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or(at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 // We couldn't include it in treemodel.h, but doing it here makes it easier for people.
30 #include <gtkmm/treepath.h>
31 
32 #include <gtkmm/treeiter.h>
33 #include <gtkmm/treemodel.h>
34 
35 
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 
41 
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 namespace Gtk
44 { class TreeModelFilter_Class; } // namespace Gtk
45 #endif //DOXYGEN_SHOULD_SKIP_THIS
46 
47 namespace Gtk
48 {
49 
56  public Glib::Object,
57  public TreeModel
58 {
59 
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
61 
62 public:
63  typedef TreeModelFilter CppObjectType;
64  typedef TreeModelFilter_Class CppClassType;
65  typedef GtkTreeModelFilter BaseObjectType;
66  typedef GtkTreeModelFilterClass BaseClassType;
67 
68 private: friend class TreeModelFilter_Class;
69  static CppClassType treemodelfilter_class_;
70 
71 private:
72  // noncopyable
74  TreeModelFilter& operator=(const TreeModelFilter&);
75 
76 protected:
77  explicit TreeModelFilter(const Glib::ConstructParams& construct_params);
78  explicit TreeModelFilter(GtkTreeModelFilter* castitem);
79 
80 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
81 
82 public:
83  virtual ~TreeModelFilter();
84 
87  static GType get_type() G_GNUC_CONST;
88 
89 #ifndef DOXYGEN_SHOULD_SKIP_THIS
90 
91 
92  static GType get_base_type() G_GNUC_CONST;
93 #endif
94 
96  GtkTreeModelFilter* gobj() { return reinterpret_cast<GtkTreeModelFilter*>(gobject_); }
97 
99  const GtkTreeModelFilter* gobj() const { return reinterpret_cast<GtkTreeModelFilter*>(gobject_); }
100 
103 
104 private:
105 
106 
107 protected:
108 
109  explicit TreeModelFilter(const Glib::RefPtr<TreeModel>& child_model);
110  explicit TreeModelFilter(const Glib::RefPtr<TreeModel>& child_model, const TreeModel::Path& virtual_root);
111 
112 
113 public:
114 
120  static Glib::RefPtr<TreeModelFilter> create(const Glib::RefPtr<TreeModel>& child_model);
121 
122 
128  static Glib::RefPtr<TreeModelFilter> create(const Glib::RefPtr<TreeModel>& child_model, const TreeModel::Path& virtual_root);
129 
130 
135  typedef sigc::slot<bool, const TreeModel::const_iterator&> SlotVisible;
136 
142  void set_visible_func(const SlotVisible& slot);
143 
144 
145  //TODO: It would be nicer to use "const TreeModelColumnBase& column" instead of "int column",
146  //but how can we get the TreeModelColumnBase from the int in the SignalProxy?
147  //Maybe we could pass the ColumnsRecord to set_modify_func() and store it in the proxy? murrayc.
155  typedef sigc::slot<void, const Gtk::TreeModel::iterator& /* iter */, Glib::ValueBase& /* value */, int /* column */> SlotModify;
156 
164  void set_modify_func(const TreeModelColumnRecord& columns, const SlotModify& slot);
165 
166 
175 
183  void set_visible_column(int column);
184 
185 
190  Glib::RefPtr<TreeModel> get_model();
191 
196  Glib::RefPtr<const TreeModel> get_model() const;
197 
203  iterator convert_child_iter_to_iter(const iterator& child_iter) const;
204 
210  iterator convert_iter_to_child_iter(const iterator& filter_iter) const;
211 
212  //TODO: Remove these deprecated non-const versions when we can break ABI:
213 
214 #ifndef GTKMM_DISABLE_DEPRECATED
215 
228 #endif // GTKMM_DISABLE_DEPRECATED
229 
230 
231 #ifndef GTKMM_DISABLE_DEPRECATED
232 
243  Path convert_path_to_child_path(const Path& filter_path);
244 #endif // GTKMM_DISABLE_DEPRECATED
245 
246 
256  Path convert_child_path_to_path(const Path& child_path) const;
257 
266  Path convert_path_to_child_path(const Path& filter_path) const;
267 
268 
272  void refilter();
273 
281  void clear_cache();
282 
288  Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> > property_child_model() const;
289 
290 
296  Glib::PropertyProxy_ReadOnly< TreeModel::Path > property_virtual_root() const;
297 
298 
299 protected:
300  virtual void set_value_impl(const iterator& row, int column, const Glib::ValueBase& value);
301 
302 
303 public:
304 
305 public:
306  //C++ methods used to invoke GTK+ virtual functions:
307 
308 protected:
309  //GTK+ Virtual Functions (override these to change behaviour):
310 
311  //Default Signal Handlers::
312 
313 
314 };
315 
316 } // namespace Gtk
317 
318 
319 namespace Glib
320 {
329  Glib::RefPtr<Gtk::TreeModelFilter> wrap(GtkTreeModelFilter* object, bool take_copy = false);
330 }
331 
332 
333 #endif /* _GTKMM_TREEMODELFILTER_H */
334 
TreeModelFilter(const Glib::RefPtr< TreeModel > &child_model)
Path convert_child_path_to_path(const Path &child_path)
static Glib::RefPtr< TreeModelFilter > create(const Glib::RefPtr< TreeModel > &child_model, const TreeModel::Path &virtual_root)
iterator convert_iter_to_child_iter(const iterator &filter_iter) const
void set_modify_func(const TreeModelColumnRecord &columns, const SlotModify &slot)
TreeModelFilter(const Glib::RefPtr< TreeModel > &child_model, const TreeModel::Path &virtual_root)
void set_visible_column(int column)
const GtkTreeModelFilter * gobj() const
Provides access to the underlying C GObject.
GtkTreeModelFilter * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
static GType get_type() G_GNUC_CONST
void set_visible_column(const TreeModelColumnBase &column)
Glib::RefPtr< const TreeModel > get_model() const
Glib::RefPtr< TreeModel > get_model()
sigc::slot< void, const Gtk::TreeModel::iterator &, Glib::ValueBase &, int > SlotModify
GtkTreeModelFilter * gobj()
Provides access to the underlying C GObject.
Path convert_path_to_child_path(const Path &filter_path) const
virtual void set_value_impl(const iterator &row, int column, const Glib::ValueBase &value)
virtual ~TreeModelFilter()
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< TreeModel > > property_child_model() const
iterator convert_child_iter_to_iter(const iterator &child_iter) const
static Glib::RefPtr< TreeModelFilter > create(const Glib::RefPtr< TreeModel > &child_model)
Path convert_path_to_child_path(const Path &filter_path)
void set_visible_func(const SlotVisible &slot)
Glib::RefPtr< Gtk::TreeModelFilter > wrap(GtkTreeModelFilter *object, bool take_copy=false)
Path convert_child_path_to_path(const Path &child_path) const
sigc::slot< bool, const TreeModel::const_iterator & > SlotVisible
Glib::PropertyProxy_ReadOnly< TreeModel::Path > property_virtual_root() const
Definition: ardour_ui.h:188