# ECellText

## Name

ECellText -- Text Cell renderer.

## Synopsis

    typedef     ECellText;
    char*       (*ECellTextFilter)              (const void*);
    #define     E_CELL_TEXT_TYPE
    ECell*      e_cell_text_new                 (const char *fontname,
                                                 GtkJustification justify);

## Object Hierarchy

      GtkObject
       +----ECell
             +----ECellText

## Properties

      "strikeout-column"     gint                  : Read / Write
      "bold-column"          gint                  : Read / Write
      "color-column"         gint                  : Read / Write
      "text-filter"          gpointer              : Read / Write

## Description

The ECellText implements an `ETable` cell renderer (of type `ECell`). This one in particular uses the extensible editing features of `EText` (which is a general canvas item for doing text editing).

You can use `ECellText` renderer objects when you want to display strings that are in your `ETableModel`.

The ETable widget typically takes care of creating these rendering objects for you when the type string has been specified.

## Details

### ECellText

    typedef struct {
    	ECell parent;

    	GtkJustification  justify;
    	char             *font_name;

    	double x, y;			/* Position at anchor */

    	gulong pixel;			/* Fill color */

    	/* Clip handling */
    	char *ellipsis;                 /* The ellipsis characters.  NULL = "...". */

    	guint use_ellipsis : 1;         /* Whether to use the ellipsis. */

    	int strikeout_column;
    	int bold_column;

    	/* This column in the ETable should return a string specifying a color,
    	   either a color name like "red" or a color spec like "rgb:F/0/0".
    	   See the XParseColor man page for the formats available. */
    	int color_column;

    	ECellTextFilter filter;

    	/* This stores the colors we have allocated. */
    	GHashTable *colors;
    } ECellText;

### ECellTextFilter ()

    char*       (*ECellTextFilter)              (const void*);

The type for a filtering function that will be invoked to provide filtered data at runtime from the model.

`Param1` : |
Returns : |

### E_CELL_TEXT_TYPE

    #define E_CELL_TEXT_TYPE        (e_cell_text_get_type ())

### e_cell_text_new ()

    ECell*      e_cell_text_new                 (const char *fontname,
                                                 GtkJustification justify);

Creates a new ECell renderer that can be used to render strings that that come from the model. The value returned from the model is interpreted as being a char *.

The ECellText object support a large set of properties that can be configured through the Gtk argument system and allows the user to have a finer control of the way the string is displayed. The arguments supported allow the control of strikeout, underline, bold, and color.

The arguments "strikeout_column", "underline_column", "bold_column" and "color_column" set and return an integer that points to a column in the model that controls these settings. So controlling the way things are rendered is achieved by having special columns in the model that will be used to flag whether the text should be rendered with strikeout, or bolded. In the case of the "color_column" argument, the column in the model is expected to have a string that can be parsed by `gdk_color_parse()`.

Creates a new `ECellText` renderer object.

`fontname` : | this param is no longer used, but left here for api stability
`justify` : | Justification of the string in the cell.
Returns : | an ECell object that can be used to render strings.

## Properties

### The "`strikeout-column`" property

      "strikeout-column"     gint                  : Read / Write

### The "`bold-column`" property

      "bold-column"          gint                  : Read / Write

### The "`color-column`" property

      "color-column"         gint                  : Read / Write

### The "`text-filter`" property

      "text-filter"          gpointer              : Read / Write

## See Also

`ECell`, `ECellCheckbox`, `ECellToggle`, `ECellTree`.