Classes | Defines | Typedefs | Functions

gtk/src/ghbcellrenderertext.h File Reference

#include <pango/pango.h>
#include <gtk/gtk.h>

Go to the source code of this file.

Classes

struct  _GhbCellRendererText
struct  _GhbCellRendererTextClass

Defines

#define GHB_TYPE_CELL_RENDERER_TEXT   (ghb_cell_renderer_text_get_type ())
#define GHB_CELL_RENDERER_TEXT(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererText))
#define GHB_CELL_RENDERER_TEXT_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererTextClass))
#define GHB_IS_CELL_RENDERER_TEXT(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHB_TYPE_CELL_RENDERER_TEXT))
#define GHB_IS_CELL_RENDERER_TEXT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GHB_TYPE_CELL_RENDERER_TEXT))
#define GHB_CELL_RENDERER_TEXT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererTextClass))

Typedefs

typedef struct _GhbCellRendererText GhbCellRendererText
typedef struct
_GhbCellRendererTextClass 
GhbCellRendererTextClass

Functions

GType ghb_cell_renderer_text_get_type (void) G_GNUC_CONST
GtkCellRenderer * ghb_cell_renderer_text_new (void)
void ghb_cell_renderer_text_set_fixed_height_from_font (GhbCellRendererText *renderer, gint number_of_rows)

Define Documentation

#define GHB_CELL_RENDERER_TEXT (   obj  )     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererText))
#define GHB_CELL_RENDERER_TEXT_CLASS (   klass  )     (G_TYPE_CHECK_CLASS_CAST ((klass), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererTextClass))
#define GHB_CELL_RENDERER_TEXT_GET_CLASS (   obj  )     (G_TYPE_INSTANCE_GET_CLASS ((obj), GHB_TYPE_CELL_RENDERER_TEXT, GhbCellRendererTextClass))
#define GHB_IS_CELL_RENDERER_TEXT (   obj  )     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GHB_TYPE_CELL_RENDERER_TEXT))
#define GHB_IS_CELL_RENDERER_TEXT_CLASS (   klass  )     (G_TYPE_CHECK_CLASS_TYPE ((klass), GHB_TYPE_CELL_RENDERER_TEXT))
#define GHB_TYPE_CELL_RENDERER_TEXT   (ghb_cell_renderer_text_get_type ())

Typedef Documentation


Function Documentation

GType ghb_cell_renderer_text_get_type ( void   ) 
GtkCellRenderer* ghb_cell_renderer_text_new ( void   ) 

ghb_cell_renderer_text_new:

Creates a new GhbCellRendererText. 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

Return value: the new cell renderer

void ghb_cell_renderer_text_set_fixed_height_from_font ( GhbCellRendererText renderer,
gint  number_of_rows 
)

ghb_cell_renderer_text_set_fixed_height_from_font: : A GhbCellRendererText : Number of rows of text each cell renderer is allocated, or -1

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 is -1, then the fixed height is unset, and the height is determined by the properties again.