![]() | ![]() | ![]() | GTK+ Reference Manual | ![]() |
---|
GtkCellViewGtkCellView — A widget displaying a single row of a GtkTreeModel |
#include <gtk/gtk.h> GtkCellView; GtkWidget* gtk_cell_view_new (void); GtkWidget* gtk_cell_view_new_with_text (constgchar *text); GtkWidget* gtk_cell_view_new_with_markup (constgchar *markup); GtkWidget* gtk_cell_view_new_with_pixbuf (GdkPixbuf *pixbuf);void gtk_cell_view_set_value (GtkCellView *cell_view, GtkCellRenderer *renderer,gchar *property,GValue *value);void gtk_cell_view_set_values (GtkCellView *cell_view, GtkCellRenderer *renderer, ...);void gtk_cell_view_set_model (GtkCellView *cell_view, GtkTreeModel *model);void gtk_cell_view_set_displayed_row (GtkCellView *cell_view, GtkTreePath *path); GtkTreePath* gtk_cell_view_get_displayed_row (GtkCellView *cell_view);gboolean gtk_cell_view_get_size_of_row (GtkCellView *cell_view, GtkTreePath *path, GtkRequisition *requisition);void gtk_cell_view_set_background_color (GtkCellView *cell_view, constGdkColor *color);void gtk_cell_view_set_cell_data (GtkCellView *cell_view);GList * gtk_cell_view_get_cell_renderers (GtkCellView *cell_view);
"background"gchararray : Write "background-gdk"GdkColor : Read / Write "background-set"gboolean : Read / Write
GtkWidget* gtk_cell_view_new (void);
Creates a new GtkCellView widget.
Returns : | A newly created GtkCellView widget. |
Since 2.6
GtkWidget* gtk_cell_view_new_with_text (constgchar *text);
Creates a new GtkCellView widget, adds a GtkCellRendererText to it, and makes its show text.
text : | the text to display in the cell view |
Returns : | A newly created GtkCellView widget. |
Since 2.6
GtkWidget* gtk_cell_view_new_with_markup (constgchar *markup);
Creates a new GtkCellView widget, adds a GtkCellRendererText
to it, and makes its show markup. The text can text can be
marked up with the
markup : | the text to display in the cell view |
Returns : | A newly created GtkCellView widget. |
Since 2.6
GtkWidget* gtk_cell_view_new_with_pixbuf (GdkPixbuf *pixbuf);
Creates a new GtkCellView widget, adds a GtkCellRendererPixbuf to it, and makes its show pixbuf.
pixbuf : | the image to display in the cell view |
Returns : | A newly created GtkCellView widget. |
Since 2.6
void gtk_cell_view_set_value (GtkCellView *cell_view, GtkCellRenderer *renderer,gchar *property,GValue *value);
Sets a property of a cell renderer of cell_view, and makes sure the display of cell_view is updated.
cell_view : | a GtkCellView widget |
renderer : | one of the renderers of cell_view |
property : | the name of the property of renderer to set |
value : | the new value to set the property to |
Since 2.6
void gtk_cell_view_set_values (GtkCellView *cell_view, GtkCellRenderer *renderer, ...);
Sets multiple properties of a cell renderer of cell_view, and makes sure the display of cell_view is updated.
cell_view : | a GtkCellView widget |
renderer : | one of the renderers of cell_view |
... : | a list of pairs of property names and |
Since 2.6
void gtk_cell_view_set_model (GtkCellView *cell_view, GtkTreeModel *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 NULL, then it will unset the old model.
cell_view : | a GtkCellView |
model : | a GtkTreeModel |
Since 2.6
void gtk_cell_view_set_displayed_row (GtkCellView *cell_view, GtkTreePath *path);
Sets the row of the model that is currently displayed by the GtkCellView. 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 GtkCellView becomes temporarily empty.
cell_view : | a GtkCellView |
path : | a GtkTreePath or NULL to unset. |
Since 2.6
GtkTreePath* gtk_cell_view_get_displayed_row (GtkCellView *cell_view);
cell_view : | |
Returns : |
gboolean gtk_cell_view_get_size_of_row (GtkCellView *cell_view, GtkTreePath *path, GtkRequisition *requisition);
Sets requisition to the size needed by cell_view to display the model row pointed to by path.
cell_view : | a GtkCellView |
path : | a GtkTreePath |
requisition : | return location for the size |
Returns : | TRUE |
Since 2.6
void gtk_cell_view_set_background_color (GtkCellView *cell_view, constGdkColor *color);
Sets the background color of view.
cell_view : | a GtkCellView |
color : | the new background color |
Since 2.6
void gtk_cell_view_set_cell_data (GtkCellView *cell_view);
cell_view : |
GList * gtk_cell_view_get_cell_renderers (GtkCellView *cell_view);
Returns the cell renderers which have been added to cell_view.
cell_view : | a GtkCellView |
Returns : | a list of cell renderers. The list, but not the
renderers has been newly allocated and should be freed with
|
Since 2.6
<< GtkTreeView drag-and-drop | GtkIconView >> |