gtkmm: Gtk::CellView Class Reference
A widget displaying a single row of a TreeModel. More...

Public Member Functions | |
| virtual | ~CellView () |
| GtkCellView* | gobj () |
| Provides access to the underlying C GtkObject. | |
| const GtkCellView* | gobj () const |
| Provides access to the underlying C GtkObject. | |
| CellView () | |
| 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 (const Glib::RefPtr< Gdk::Pixbuf >& pixbuf) | |
| Creates a new CellView widget, adds a CellRendererPixbuf to it, and makes it show the pixbuf. | |
| void | set_model (const Glib::RefPtr< TreeModel >& model) |
| Sets the model for cell_view. | |
| void | unset_model () |
| Remove the model from the CellView. | |
| Glib::RefPtr< TreeModel > | get_model () |
| Returns the model for cell_view. | |
| Glib::RefPtr< const TreeModel > | get_model () const |
| Returns the model for cell_view. | |
| void | set_displayed_row (const TreeModel::Path& path) |
| Sets the row of the model that is currently displayed by the Gtk::CellView. | |
| TreeModel::Path | get_displayed_row () const |
| Returns a Gtk::TreePath referring to the currently displayed row. | |
| void | set_background_color (const Gdk::Color& color) |
| Sets the background color of view. | |
| void | set_background_rgba (const Gdk::RGBA& rgba) |
| Sets the background color of cell_view. | |
| bool | get_draw_sensitive () const |
| Gets whether cell_view is configured to draw all of its cells in a sensitive state. | |
| void | set_draw_sensitive (bool draw_sensitive=true) |
| Sets whether cell_view should draw all of its cells in a sensitive state, this is used by Gtk::ComboBox menus to ensure that rows with insensitive cells that contain children appear sensitive in the parent menu item. | |
| bool | get_fit_model () const |
| Gets whether cell_view is configured to request space to fit the entire Gtk::TreeModel. | |
| void | set_fit_model (bool fit_model=true) |
| Sets whether cell_view should request space to fit the entire Gtk::TreeModel. | |
| Glib::PropertyProxy_WriteOnly < Glib::ustring > | property_background () |
| Background color as a string. | |
| Glib::PropertyProxy< Gdk::Color > | property_background_gdk () |
| Background color as a GdkColor. | |
| Glib::PropertyProxy_ReadOnly < Gdk::Color > | property_background_gdk () const |
| Background color as a GdkColor. | |
| Glib::PropertyProxy< Gdk::RGBA > | property_background_rgba () |
| Background color as a GdkRGBA. | |
| Glib::PropertyProxy_ReadOnly < Gdk::RGBA > | property_background_rgba () const |
| Background color as a GdkRGBA. | |
| Glib::PropertyProxy< bool > | property_background_set () |
| Whether this tag affects the background color. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_background_set () const |
| Whether this tag affects the background color. | |
| Glib::PropertyProxy < Glib::RefPtr< TreeModel > > | property_model () |
| The model for cell view. | |
| Glib::PropertyProxy_ReadOnly < Glib::RefPtr< TreeModel > > | property_model () const |
| The model for cell view. | |
| Glib::PropertyProxy_ReadOnly < Glib::RefPtr< CellArea > > | property_cell_area () const |
| The GtkCellArea used to layout cells. | |
| Glib::PropertyProxy_ReadOnly < Glib::RefPtr < CellAreaContext > > | property_cell_area_context () const |
| The GtkCellAreaContext used to compute the geometry of the cell view. | |
| Glib::PropertyProxy< bool > | property_draw_sensitive () |
| Whether to force cells to be drawn in a sensitive state. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_draw_sensitive () const |
| Whether to force cells to be drawn in a sensitive state. | |
| Glib::PropertyProxy< bool > | property_fit_model () |
| Whether to request enough space for every row in the model. | |
| Glib::PropertyProxy_ReadOnly < bool > | property_fit_model () const |
| Whether to request enough space for every row in the model. | |
Related Functions | |
(Note that these are not member functions.) | |
| Gtk::CellView* | wrap (GtkCellView* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
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.
Constructor & Destructor Documentation
| virtual Gtk::CellView::~CellView | ( | ) | [virtual] |
| 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
Returns a Gtk::TreePath referring to the currently displayed row.
If no row is currently displayed, 0 is returned.
- Returns:
- The currently displayed row or
0.
| bool Gtk::CellView::get_draw_sensitive | ( | ) | const |
Gets whether cell_view is configured to draw all of its cells in a sensitive state.
- Returns:
- Whether cell_view draws all of its cells in a sensitive state.
| bool Gtk::CellView::get_fit_model | ( | ) | const |
Gets whether cell_view is configured to request space to fit the entire Gtk::TreeModel.
- Returns:
- Whether cell_view requests space to fit the entire Gtk::TreeModel.
Returns the model for cell_view.
If no model is used 0 is returned.
- Returns:
- A Gtk::TreeModel used or
0.
| Glib::RefPtr<const TreeModel> Gtk::CellView::get_model | ( | ) | const |
Returns the model for cell_view.
If no model is used 0 is returned.
- Returns:
- A Gtk::TreeModel used or
0.
| GtkCellView* Gtk::CellView::gobj | ( | ) | [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::CellLayout.
| const GtkCellView* Gtk::CellView::gobj | ( | ) | const [inline] |
Provides access to the underlying C GtkObject.
Reimplemented from Gtk::CellLayout.
Background color as a string.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Background color as a GdkColor.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Background color as a GdkColor.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Background color as a GdkRGBA.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Background color as a GdkRGBA.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Whether this tag affects the background color.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly< bool > Gtk::CellView::property_background_set | ( | ) | const |
Whether this tag affects the background color.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
The GtkCellArea used to layout cells.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly< Glib::RefPtr<CellAreaContext> > Gtk::CellView::property_cell_area_context | ( | ) | const |
The GtkCellAreaContext used to compute the geometry of the cell view.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Whether to force cells to be drawn in a sensitive state.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly< bool > Gtk::CellView::property_draw_sensitive | ( | ) | const |
Whether to force cells to be drawn in a sensitive state.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy< bool > Gtk::CellView::property_fit_model | ( | ) |
Whether to request enough space for every row in the model.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| Glib::PropertyProxy_ReadOnly< bool > Gtk::CellView::property_fit_model | ( | ) | const |
Whether to request enough space for every row in the model.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
The model for cell view.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
The model for cell view.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
| void Gtk::CellView::set_background_color | ( | const Gdk::Color& | color | ) |
Sets the background color of view.
Deprecated: 3.4: Use set_background_rgba() instead.
- Deprecated:
- Use set_background_rgba instead.
- Parameters:
-
color The new background color.
| void Gtk::CellView::set_background_rgba | ( | const Gdk::RGBA& | rgba | ) |
| 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.
- Parameters:
-
path A Gtk::TreePath or 0to unset.
| void Gtk::CellView::set_draw_sensitive | ( | bool | draw_sensitive = true | ) |
Sets whether cell_view should draw all of its cells in a sensitive state, this is used by Gtk::ComboBox menus to ensure that rows with insensitive cells that contain children appear sensitive in the parent menu item.
- Parameters:
-
draw_sensitive Whether to draw all cells in a sensitive state.
| void Gtk::CellView::set_fit_model | ( | bool | fit_model = true | ) |
Sets whether cell_view should request space to fit the entire Gtk::TreeModel.
This is used by Gtk::ComboBox to ensure that the cell view displayed on the combo box's button always gets enough space and does not resize when selection changes.
- Parameters:
-
fit_model Whether cell_view should request space for the whole model.
| 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. Use unset_model() to unset the old model.
- Parameters:
-
model A Gtk::TreeModel.
| void Gtk::CellView::unset_model | ( | ) |
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:
- gtkmm/cellview.h
