logo top
Main Page   Widgets   Namespaces   Book  

Gtk::CellView Class Reference
[Widgets]

Inheritance diagram for Gtk::CellView:

Inheritance graph
[legend]
List of all members.

Detailed Description

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.


Public Member Functions

 CellView (const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
 Creates a new CellView widget, adds a CellRendererPixbuf to it, and makes it show the pixbuf.
 CellView (const Glib::ustring& text, bool use_markup=false)
 Creates a new CellView widget, adds a CellRendererText to it, and makes it show the text.
 CellView ()
Glib::ListHandle<const CellRenderer*> get_cell_renderers () const
 Return value: a list of cell renderers.
Glib::ListHandle<CellRenderer*> get_cell_renderers ()
 Return value: a list of cell renderers.
TreeModel::Path get_displayed_row () const
 Returns: the currently displayed row or 0.
bool get_size_of_row (const TreeModel::Path& path, Requisition& requisition) const
 Sets requisition to the size needed by cell_view to display the model row pointed to by path .
const GtkCellView* gobj () const
 Provides access to the underlying C GtkObject.
GtkCellView* gobj ()
 Provides access to the underlying C GtkObject.
void set_background_color (const Gdk::Color& color)
 Sets the background color of view .
void set_displayed_row (const TreeModel::Path& path)
 Sets the row of the model that is currently displayed by the Gtk::CellView.
void set_model (const Glib::RefPtr<TreeModel>& model)
 Sets the model for cell_view .
virtual ~CellView ()

Related Functions

(Note that these are not member functions.)

Gtk::CellViewwrap (GtkCellView* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Constructor & Destructor Documentation

virtual Gtk::CellView::~CellView (  )  [virtual]

Gtk::CellView::CellView (  ) 

Gtk::CellView::CellView ( const Glib::ustring text,
bool  use_markup = false 
) [explicit]

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.

Parameters:
text The text to display in the cell view
markup Whether the text uses Pango text markup language.

Gtk::CellView::CellView ( const Glib::RefPtr<Gdk::Pixbuf>&  pixbuf  )  [explicit]

Creates a new CellView widget, adds a CellRendererPixbuf to it, and makes it show the pixbuf.

Parameters:
pixbuf The image to display in the cell view
markup Whether the text uses Pango text markup language.


Member Function Documentation

Glib::ListHandle<const CellRenderer*> Gtk::CellView::get_cell_renderers (  )  const

Return value: a list of cell renderers.

The list, but not the

Returns:
A list of cell renderers. The list, but not the renderers has been newly allocated and should be freed with Glib::list_free() when no longer needed.
Since gtkmm 2.6:

Glib::ListHandle<CellRenderer*> Gtk::CellView::get_cell_renderers (  ) 

Return value: a list of cell renderers.

The list, but not the

Returns:
A list of cell renderers. The list, but not the renderers has been newly allocated and should be freed with Glib::list_free() when no longer needed.
Since gtkmm 2.6:

TreeModel::Path Gtk::CellView::get_displayed_row (  )  const

Returns: the currently displayed row or 0.

Returns:
The currently displayed row or 0
Since gtkmm 2.6:

bool Gtk::CellView::get_size_of_row ( const TreeModel::Path path,
Requisition requisition 
) const

Sets requisition to the size needed by cell_view to display the model row pointed to by path .

Parameters:
path A Gtk::TreePath.
requisition Return location for the size.
Returns:
true
Since gtkmm 2.6:

const GtkCellView* Gtk::CellView::gobj (  )  const [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::CellLayout.

GtkCellView* Gtk::CellView::gobj (  )  [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::CellLayout.

void Gtk::CellView::set_background_color ( const Gdk::Color color  ) 

Sets the background color of view .

Since gtkmm 2.6:
Parameters:
color The new background color.

void Gtk::CellView::set_displayed_row ( const TreeModel::Path path  ) 

Sets the row of the model that is currently displayed by the Gtk::CellView.

If the path is unset, then the contents of the cellview "stick" at their last value; this is not normally a desired result, but may be a needed intermediate state if say, the model for the Gtk::CellView becomes temporarily empty.

Since gtkmm 2.6:
Parameters:
path A Gtk::TreePath or 0 to unset.

void Gtk::CellView::set_model ( const Glib::RefPtr<TreeModel>&  model  ) 

Sets the model for cell_view .

If cell_view already has a model set, it will remove it before setting the new model. If model is 0, then it will unset the old model.

Since gtkmm 2.6:
Parameters:
model A Gtk::TreeModel.


Friends And Related Function Documentation

Gtk::CellView* wrap ( GtkCellView *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:

Generated for gtkmm 2.4 by Doxygen 1.5.1 © 1997-2001