/* Copyright (C) 2004 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
_CONFIGINCLUDE(gtkmmconfig.h)
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/widget_p.h)
namespace Gtk
{
/** A widget displaying a single row of a TreeModel.
* A CellView displays a single row of a TreeModel, using cell renderers just like TreeView. CellView doesn't support some of the more
* complex features of GtkTreeView, like cell editing and drag and drop.
*
* @ingroup Widgets
*/
class GTKMM_API CellView :
public Widget,
public CellLayout,
public Orientable
{
_CLASS_GTKOBJECT(CellView, GtkCellView, GTK_CELL_VIEW, Gtk::Widget, GtkWidget, , , GTKMM_API)
_IMPLEMENTS_INTERFACE(CellLayout)
_IMPLEMENTS_INTERFACE(Orientable)
public:
_CTOR_DEFAULT()
/** Creates a new CellView widget, adds a CellRendererText to it, and makes it show the text.
* Optionally, the text can be marked up with the Pango text markup language.
*
* @param text The text to display in the cell view
* @param use_markup Whether the @a text uses Pango text markup language.
*/
explicit CellView(const Glib::ustring& text, bool use_markup = false);
_IGNORE(gtk_cell_view_new_with_text, gtk_cell_view_new_with_markup)
/** Creates a new CellView widget, adds a CellRendererPixbuf to it, and makes it show the pixbuf.
*
* @param pixbuf The image to display in the cell view
*/
explicit CellView(const Glib::RefPtr& pixbuf);
_IGNORE(gtk_cell_view_new_with_pixbuf)
_WRAP_METHOD(void set_model(const Glib::RefPtr& model), gtk_cell_view_set_model)
/** Remove the model from the CellView.
*
* @see set_model().
*
* @newin{2,16}
*/
void unset_model();
_WRAP_METHOD(Glib::RefPtr get_model(), gtk_cell_view_get_model, refreturn)
_WRAP_METHOD(Glib::RefPtr get_model() const, gtk_cell_view_get_model, refreturn, constversion)
_WRAP_METHOD(void set_displayed_row(const TreeModel::Path& path), gtk_cell_view_set_displayed_row)
_WRAP_METHOD(TreeModel::Path get_displayed_row() const, gtk_cell_view_get_displayed_row)
_IGNORE(gtk_cell_view_get_size_of_row) //deprecated
_WRAP_METHOD(void set_background_color(const Gdk::Color& color), gtk_cell_view_set_background_color, deprecated "Use set_background_rgba instead.")
_WRAP_METHOD(void set_background_rgba(const Gdk::RGBA& rgba), gtk_cell_view_set_background_rgba)
_WRAP_METHOD(bool get_draw_sensitive() const, gtk_cell_view_get_draw_sensitive)
_WRAP_METHOD(void set_draw_sensitive(bool draw_sensitive = true), gtk_cell_view_set_draw_sensitive)
_WRAP_METHOD(bool get_fit_model() const, gtk_cell_view_get_fit_model)
_WRAP_METHOD(void set_fit_model(bool fit_model = true), gtk_cell_view_set_fit_model)
_WRAP_PROPERTY("background", Glib::ustring)
_WRAP_PROPERTY("background-gdk", Gdk::Color, deprecated "Use property_background_rgba() instead.")
_WRAP_PROPERTY("background-rgba", Gdk::RGBA)
_WRAP_PROPERTY("background-set", bool)
_WRAP_PROPERTY("model", Glib::RefPtr)
_WRAP_PROPERTY("cell-area", Glib::RefPtr)
_WRAP_PROPERTY("cell-area-context", Glib::RefPtr)
_WRAP_PROPERTY("draw-sensitive", bool)
_WRAP_PROPERTY("fit-model", bool)
};
} // namespace Gtk