GTK+ Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#include <gtk/gtk.h> struct GtkCellRendererText; GtkCellRenderer* gtk_cell_renderer_text_new (void); void gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer, gint number_of_rows); |
"text" gchararray : Read / Write "markup" gchararray : Write "attributes" PangoAttrList : Read / Write "background" gchararray : Write "foreground" gchararray : Write "background-gdk" GdkColor : Read / Write "foreground-gdk" GdkColor : Read / Write "font" gchararray : Read / Write "font-desc" PangoFontDescription : Read / Write "family" gchararray : Read / Write "style" PangoStyle : Read / Write "variant" PangoVariant : Read / Write "weight" gint : Read / Write "stretch" PangoStretch : Read / Write "size" gint : Read / Write "size-points" gdouble : Read / Write "scale" gdouble : Read / Write "editable" gboolean : Read / Write "strikethrough" gboolean : Read / Write "underline" PangoUnderline : Read / Write "rise" gint : Read / Write "background-set" gboolean : Read / Write "foreground-set" gboolean : Read / Write "family-set" gboolean : Read / Write "style-set" gboolean : Read / Write "variant-set" gboolean : Read / Write "weight-set" gboolean : Read / Write "stretch-set" gboolean : Read / Write "size-set" gboolean : Read / Write "scale-set" gboolean : Read / Write "editable-set" gboolean : Read / Write "strikethrough-set" gboolean : Read / Write "underline-set" gboolean : Read / Write "rise-set" gboolean : Read / Write |
"edited" void user_function (GtkCellRendererText *cellrenderertext, gchar *arg1, gchar *arg2, gpointer user_data); |
GtkCellRenderer* gtk_cell_renderer_text_new (void); |
Creates a new GtkCellRendererText. Adjust how text is drawn using object properties. Object properties can be set globally (with g_object_set()). Also, with GtkTreeViewColumn, you can bind a property to a value in a GtkTreeModel. For example, you can bind the "text" property on the cell renderer to a string value in the model, thus rendering a different string in each row of the GtkTreeView
void gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer, gint number_of_rows); |
Sets the height of a renderer to explicitly be determined by the "font" and "y_pad" property set on it. Further changes in these properties do not affect the height, so they must be accompanied by a subsequent call to this function. Using this function is unflexible, and should really only be used if calculating the size of a cell is too slow (ie, a massive number of cells displayed). If number_of_rows is -1, then the fixed height is unset, and the height is determined by the properties again.
renderer : | A GtkCellRendererText |
number_of_rows : | Number of rows of text each cell renderer is allocated, or -1 |
void user_function (GtkCellRendererText *cellrenderertext, gchar *arg1, gchar *arg2, gpointer user_data); |