<refentry id="ECellText" revision="12 Jan 2001">
<refmeta>
<refentrytitle>ECellText</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GAL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>ECellText</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>



typedef     <link linkend="ECellText">ECellText</link>;
char*       (<link linkend="ECellTextFilter">*ECellTextFilter</link>)              (const void*);
#define     <link linkend="E-CELL-TEXT-TYPE-CAPS">E_CELL_TEXT_TYPE</link>
<link linkend="ECell">ECell</link>*      <link linkend="e-cell-text-new">e_cell_text_new</link>                 (const char *fontname,
                                             <link linkend="GtkJustification">GtkJustification</link> justify);

</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GtkObject">GtkObject</link>
   +----<link linkend="ECell">ECell</link>
         +----ECellText
</synopsis>

</refsect1>

<refsect1>
<title>Args</title>
<synopsis>

  &quot;<link linkend="ECellText--strikeout-column">strikeout_column</link>&quot;     <link linkend="gint">gint</link>                 : Read / Write
  &quot;<link linkend="ECellText--bold-column">bold_column</link>&quot;          <link linkend="gint">gint</link>                 : Read / Write
  &quot;<link linkend="ECellText--color-column">color_column</link>&quot;         <link linkend="gint">gint</link>                 : Read / Write
  &quot;<link linkend="ECellText--text-filter">text_filter</link>&quot;          <link linkend="gpointer">gpointer</link>             : Read / Write
</synopsis>
</refsect1>



<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="ECellText">ECellText</title>
<programlisting>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;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="ECellTextFilter">ECellTextFilter ()</title>
<programlisting>char*       (*ECellTextFilter)              (const void*);</programlisting>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>Param1</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="E-CELL-TEXT-TYPE-CAPS">E_CELL_TEXT_TYPE</title>
<programlisting>#define E_CELL_TEXT_TYPE        (e_cell_text_get_type ())
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="e-cell-text-new">e_cell_text_new ()</title>
<programlisting><link linkend="ECell">ECell</link>*      e_cell_text_new                 (const char *fontname,
                                             <link linkend="GtkJustification">GtkJustification</link> justify);</programlisting>
<para>
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 *.
</para>
<para>
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, bold, color and a text filter.
</para>
<para>
The arguments "strikeout_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 <link linkend="gdk-color-parse">gdk_color_parse</link>().</para>
<para>

</para><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>fontname</parameter>&nbsp;:</entry>
<entry> font to be used to render on the screen
</entry></row>
<row><entry align="right"><parameter>justify</parameter>&nbsp;:</entry>
<entry> Justification of the string in the cell.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> an ECell object that can be used to render strings.
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Args</title>
<variablelist>
<varlistentry><term><anchor id="ECellText--strikeout-column">&quot;<literal>strikeout_column</literal>&quot; (<link linkend="gint">gint</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="ECellText--bold-column">&quot;<literal>bold_column</literal>&quot; (<link linkend="gint">gint</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="ECellText--color-column">&quot;<literal>color_column</literal>&quot; (<link linkend="gint">gint</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>
<varlistentry><term><anchor id="ECellText--text-filter">&quot;<literal>text_filter</literal>&quot; (<link linkend="gpointer">gpointer</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>

</variablelist>
</refsect1>




</refentry>
