2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_CELLVIEW_H
4 #define _GTKMM_CELLVIEW_H
12 * Copyright (C) 2004 The gtkmm Development Team
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Library General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.
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 * Library General Public License for more details.
24 * You should have received a copy of the GNU Library 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.
30 #include <gtkmm/widget.h>
31 #include <gtkmm/celllayout.h>
32 #include <gtkmm/treemodel.h>
33 #include <gtkmm/treepath.h>
34 #include <gtkmm/cellrenderer.h>
35 #include <gdkmm/pixbuf.h>
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 typedef struct _GtkCellView GtkCellView;
40 typedef struct _GtkCellViewClass GtkCellViewClass;
41 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
45 { class CellView_Class; } // namespace Gtk
49 /** A widget displaying a single row of a TreeModel.
50 * A CellView displays a single row of a TreeModel, using cell renderers just like TreeView. CellView doesn't support some of the more
51 * complex features of GtkTreeView, like cell editing and drag and drop.
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62 typedef CellView CppObjectType;
63 typedef CellView_Class CppClassType;
64 typedef GtkCellView BaseObjectType;
65 typedef GtkCellViewClass BaseClassType;
66 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
73 friend class CellView_Class;
74 static CppClassType cellview_class_;
77 CellView(const CellView&);
78 CellView& operator=(const CellView&);
81 explicit CellView(const Glib::ConstructParams& construct_params);
82 explicit CellView(GtkCellView* castitem);
84 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
87 #ifndef DOXYGEN_SHOULD_SKIP_THIS
88 static GType get_type() G_GNUC_CONST;
89 static GType get_base_type() G_GNUC_CONST;
92 ///Provides access to the underlying C GtkObject.
93 GtkCellView* gobj() { return reinterpret_cast<GtkCellView*>(gobject_); }
95 ///Provides access to the underlying C GtkObject.
96 const GtkCellView* gobj() const { return reinterpret_cast<GtkCellView*>(gobject_); }
100 //C++ methods used to invoke GTK+ virtual functions:
103 //GTK+ Virtual Functions (override these to change behaviour):
105 //Default Signal Handlers::
114 /** Creates a new CellView widget, adds a CellRendererText to it, and makes it show the text.
115 * Optionally, the text can be marked up with the Pango text markup language.
117 * @param text The text to display in the cell view
118 * @param markup Whether the @a text uses Pango text markup language.
120 explicit CellView(const Glib::ustring& text, bool use_markup = false);
123 /** Creates a new CellView widget, adds a CellRendererPixbuf to it, and makes it show the pixbuf.
125 * @param pixbuf The image to display in the cell view
126 * @param markup Whether the @a text uses Pango text markup language.
128 explicit CellView(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
131 //_WRAP_METHOD(void set_value(CellRenderer& renderer, const Glib::ustring& property, const Glib::ValueBase& value), gtk_cell_view_set_value)
134 /** Sets the model for @a cell_view . If @a cell_view already has a model
135 * set, it will remove it before setting the new model. If @a model is
136 * <tt>0</tt>, then it will unset the old model.
139 * @param model A Gtk::TreeModel.
141 void set_model(const Glib::RefPtr<TreeModel>& model);
143 /** Sets the row of the model that is currently displayed
144 * by the Gtk::CellView. If the path is unset, then the
145 * contents of the cellview "stick" at their last value;
146 * this is not normally a desired result, but may be
147 * a needed intermediate state if say, the model for
148 * the Gtk::CellView becomes temporarily empty.
151 * @param path A Gtk::TreePath or <tt>0</tt> to unset.
153 void set_displayed_row(const TreeModel::Path& path);
155 TreeModel::Path get_displayed_row() const;
157 /** Sets @a requisition to the size needed by @a cell_view to display
158 * the model row pointed to by @a path .
159 * @param path A Gtk::TreePath.
160 * @param requisition Return location for the size.
161 * @return <tt>true</tt>
165 bool get_size_of_row(const TreeModel::Path& path, Requisition& requisition) const;
168 /** Sets the background color of @a view .
171 * @param color The new background color.
173 void set_background_color(const Gdk::Color& color);
176 /** Returns the cell renderers which have been added to @a cell_view .
177 * @return A list of cell renderers. The list, but not the
178 * renderers has been newly allocated and should be freed with
179 * Glib::list_free() when no longer needed.
183 Glib::ListHandle<CellRenderer*> get_cell_renderers();
185 /** Returns the cell renderers which have been added to @a cell_view .
186 * @return A list of cell renderers. The list, but not the
187 * renderers has been newly allocated and should be freed with
188 * Glib::list_free() when no longer needed.
192 Glib::ListHandle<const CellRenderer*> get_cell_renderers() const;
202 /** @relates Gtk::CellView
203 * @param object The C instance
204 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
205 * @result A C++ instance that wraps this C instance.
207 Gtk::CellView* wrap(GtkCellView* object, bool take_copy = false);
209 #endif /* _GTKMM_CELLVIEW_H */