Ardour  9.0-pre0-582-g084a23a80d
celllayout.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_CELLLAYOUT_H
4 #define _GTKMM_CELLLAYOUT_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: celllayout.hg,v 1.12 2006/05/10 20:59:27 murrayc Exp $ */
11 
12 /* Copyright (C) 2003 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 #include <glibmm/interface.h>
30 #include <gtkmm/cellrenderer.h>
32 #include <gtkmm/treemodel.h>
33 
34 
35 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 extern "C"
37 {
39 }
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 
42 
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 typedef struct _GtkCellLayout GtkCellLayout;
45 typedef struct _GtkCellLayoutClass GtkCellLayoutClass;
46 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
47 
48 
49 #ifndef DOXYGEN_SHOULD_SKIP_THIS
50 namespace Gtk
51 { class CellLayout_Class; } // namespace Gtk
52 #endif // DOXYGEN_SHOULD_SKIP_THIS
53 
54 namespace Gtk
55 {
56 
62 class CellLayout : public Glib::Interface
63 {
64 
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66 
67 public:
68  typedef CellLayout CppObjectType;
69  typedef CellLayout_Class CppClassType;
70  typedef GtkCellLayout BaseObjectType;
71  typedef GtkCellLayoutIface BaseClassType;
72 
73 private:
74  friend class CellLayout_Class;
75  static CppClassType celllayout_class_;
76 
77  // noncopyable
78  CellLayout(const CellLayout&);
79  CellLayout& operator=(const CellLayout&);
80 
81 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
82 protected:
87 
88 #ifndef DOXYGEN_SHOULD_SKIP_THIS
95  explicit CellLayout(const Glib::Interface_Class& interface_class);
96 
97 public:
98  // This is public so that C++ wrapper instances can be
99  // created for C instances of unwrapped types.
100  // For instance, if an unexpected C type implements the C interface.
101  explicit CellLayout(GtkCellLayout* castitem);
102 
103 protected:
104 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
105 
106 public:
107  virtual ~CellLayout();
108 
109  static void add_interface(GType gtype_implementer);
110 
113  static GType get_type() G_GNUC_CONST;
114 
115 #ifndef DOXYGEN_SHOULD_SKIP_THIS
116  static GType get_base_type() G_GNUC_CONST;
117 #endif
118 
120  GtkCellLayout* gobj() { return reinterpret_cast<GtkCellLayout*>(gobject_); }
121 
123  const GtkCellLayout* gobj() const { return reinterpret_cast<GtkCellLayout*>(gobject_); }
124 
125 private:
126 
127 
128 public:
129 
130  template <class ColumnType> inline
131  void pack_start(const TreeModelColumn<ColumnType>& model_column, bool expand = true);
132 
133 
143  void pack_start(CellRenderer& cell, bool expand = true);
144 
154  void pack_end(CellRenderer& cell, bool expand = true);
155 
156 
161  Glib::ListHandle<CellRenderer*> get_cells();
162 
167  Glib::ListHandle<const CellRenderer*> get_cells() const;
168 
169 
173  void clear();
174 
175  //I think this is just a convenience method, equivalent to clear() and multiple add_attribute()s. murrayc.
176 
177 
188  void add_attribute(CellRenderer& cell, const Glib::ustring& attribute, int column);
189 
190  void add_attribute(const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column);
191 
192  void add_attribute(CellRenderer& cell, const Glib::ustring& attribute, const TreeModelColumnBase& column);
193 
194  //For instance, void on_cell_data(const TreeModel::const_iterator& iter)
195  typedef sigc::slot<void, const TreeModel::const_iterator&> SlotCellData;
196 
197  void set_cell_data_func(CellRenderer& cell, const SlotCellData& slot);
198 
199 
206 
207 
214  void reorder(CellRenderer& cell, int position);
215 
216 protected:
217  virtual void pack_start_vfunc(CellRenderer* cell, bool expand);
218 
219  virtual void pack_end_vfunc(CellRenderer* cell, bool expand);
220 
221  virtual void clear_vfunc();
222 
223 
224  virtual void add_attribute_vfunc(CellRenderer* cell, const Glib::ustring& attribute, int column);
225 
226 
227 //TODO (added in GTK+ 2.4): _WRAP_VFUNC(void set_cell_data_func(CellRenderer* cell, GtkCellLayoutDataFunc func, gpointer func_data, GDestroyNotify destroy), gtk_cell_layout_set_cell_data_func)
229 
230  virtual void reorder_vfunc(CellRenderer* cell, int position);
231 
232 
233 public:
234 
235 public:
236  //C++ methods used to invoke GTK+ virtual functions:
237 
238 protected:
239  //GTK+ Virtual Functions (override these to change behaviour):
240 
241  //Default Signal Handlers::
242 
243 
244 };
245 
246 template<class T_ModelColumnType>
248 {
249  //Generate appropriate Renderer for the column:
250  CellRenderer* pCellRenderer = manage( CellRenderer_Generation::generate_cellrenderer<T_ModelColumnType>() );
251 
252  //Use the renderer:
253  pack_start(*pCellRenderer, expand);
254 
255  //Make the renderer render the column:
256  add_attribute(pCellRenderer->_property_renderable(), column);
257 }
258 
259 } // namespace Gtk
260 
261 
262 namespace Glib
263 {
272  Glib::RefPtr<Gtk::CellLayout> wrap(GtkCellLayout* object, bool take_copy = false);
273 
274 } // namespace Glib
275 
276 
277 #endif /* _GTKMM_CELLLAYOUT_H */
278 
virtual void pack_start_vfunc(CellRenderer *cell, bool expand)
virtual ~CellLayout()
GtkCellLayout * gobj()
Provides access to the underlying C GObject.
Definition: celllayout.h:120
virtual void pack_end_vfunc(CellRenderer *cell, bool expand)
void add_attribute(CellRenderer &cell, const Glib::ustring &attribute, const TreeModelColumnBase &column)
const GtkCellLayout * gobj() const
Provides access to the underlying C GObject.
Definition: celllayout.h:123
static GType get_type() G_GNUC_CONST
Glib::ListHandle< const CellRenderer * > get_cells() const
Glib::RefPtr< Gtk::CellLayout > wrap(GtkCellLayout *object, bool take_copy=false)
virtual void clear_vfunc()
virtual void reorder_vfunc(CellRenderer *cell, int position)
void pack_end(CellRenderer &cell, bool expand=true)
void pack_start(const TreeModelColumn< ColumnType > &model_column, bool expand=true)
static void add_interface(GType gtype_implementer)
void pack_start(CellRenderer &cell, bool expand=true)
void set_cell_data_func(CellRenderer &cell, const SlotCellData &slot)
Glib::ListHandle< CellRenderer * > get_cells()
void add_attribute(CellRenderer &cell, const Glib::ustring &attribute, int column)
void reorder(CellRenderer &cell, int position)
void add_attribute(const Glib::PropertyProxy_Base &property, const TreeModelColumnBase &column)
sigc::slot< void, const TreeModel::const_iterator & > SlotCellData
Definition: celllayout.h:195
void clear_attributes(CellRenderer &cell)
virtual void clear_attributes_vfunc(CellRenderer *cell)
virtual void add_attribute_vfunc(CellRenderer *cell, const Glib::ustring &attribute, int column)
virtual Glib::PropertyProxy_Base _property_renderable()
struct _GtkCellLayout GtkCellLayout
Definition: gtkcelllayout.h:39
Definition: ardour_ui.h:188
T * manage(T *obj)
Definition: object.h:58