<refentry id="ETableCol">
<refmeta>
<refentrytitle>ETableCol</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GAL Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>ETableCol</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



#define     <link linkend="E-TABLE-COL-TYPE:CAPS">E_TABLE_COL_TYPE</link>
typedef     <link linkend="ETableCol">ETableCol</link>;
enum        <link linkend="ETableColArrow">ETableColArrow</link>;
<link linkend="ETableCol">ETableCol</link>*  <link linkend="e-table-col-new">e_table_col_new</link>                 (<link linkend="int">int</link> col_idx,
                                             const <link linkend="char">char</link> *text,
                                             <link linkend="double">double</link> expansion,
                                             <link linkend="int">int</link> min_width,
                                             <link linkend="ECell">ECell</link> *ecell,
                                             <link linkend="GCompareFunc">GCompareFunc</link> compare,
                                             <link linkend="gboolean">gboolean</link> resizable);
<link linkend="ETableCol">ETableCol</link>*  <link linkend="e-table-col-new-with-pixbuf">e_table_col_new_with_pixbuf</link>     (<link linkend="int">int</link> col_idx,
                                             <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                             <link linkend="double">double</link> expansion,
                                             <link linkend="int">int</link> min_width,
                                             <link linkend="ECell">ECell</link> *ecell,
                                             <link linkend="GCompareFunc">GCompareFunc</link> compare,
                                             <link linkend="gboolean">gboolean</link> resizable);
<link linkend="void">void</link>        <link linkend="e-table-col-destroy">e_table_col_destroy</link>             (<link linkend="ETableCol">ETableCol</link> *etc);

</synopsis>
</refsynopsisdiv>

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

  <link linkend="GtkObject">GtkObject</link>
   +----ETableCol
</synopsis>

</refsect1>





<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="ETableCol--sortable">sortable</link>&quot;             <link linkend="gboolean">gboolean</link>              : Read / Write
</synopsis>
</refsect1>



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

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="E-TABLE-COL-TYPE:CAPS">E_TABLE_COL_TYPE</title>
<indexterm><primary>E_TABLE_COL_TYPE</primary></indexterm><programlisting>#define E_TABLE_COL_TYPE        (e_table_col_get_type ())
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="ETableCol">ETableCol</title>
<indexterm><primary>ETableCol</primary></indexterm><programlisting>typedef struct {
	GtkObject    base;
	char        *text;
	GdkPixbuf   *pixbuf;
	int          min_width;
	int          width;
	double       expansion;
	short        x;
	GCompareFunc compare;
	unsigned int is_pixbuf:1;
	unsigned int selected:1;
	unsigned int resizeable:1;
	unsigned int sortable:1;
	unsigned int groupable:1;
	int          col_idx;

	GtkJustification justification;

	ECell         *ecell;
} ETableCol;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="ETableColArrow">enum ETableColArrow</title>
<indexterm><primary>ETableColArrow</primary></indexterm><programlisting>typedef enum {
	E_TABLE_COL_ARROW_NONE = 0,
	E_TABLE_COL_ARROW_UP,
	E_TABLE_COL_ARROW_DOWN
} ETableColArrow;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="e-table-col-new">e_table_col_new ()</title>
<indexterm><primary>e_table_col_new</primary></indexterm><programlisting><link linkend="ETableCol">ETableCol</link>*  e_table_col_new                 (<link linkend="int">int</link> col_idx,
                                             const <link linkend="char">char</link> *text,
                                             <link linkend="double">double</link> expansion,
                                             <link linkend="int">int</link> min_width,
                                             <link linkend="ECell">ECell</link> *ecell,
                                             <link linkend="GCompareFunc">GCompareFunc</link> compare,
                                             <link linkend="gboolean">gboolean</link> resizable);</programlisting>
<para>
The ETableCol represents a column to be used inside an ETable.  The
ETableCol objects are inserted inside an ETableHeader (which is just a collection
of ETableCols).  The ETableHeader is the definition of the order in which
columns are shown to the user. 
</para>
<para>
The <parameter>text</parameter> argument is the the text that will be shown as a header to the
user. <parameter>col_idx</parameter> reflects where the data for this ETableCol object will
be fetch from an ETableModel.  So even if the user changes the order
of the columns being viewed (the ETableCols in the ETableHeader), the
column will always point to the same column inside the ETableModel.
</para>
<para>
The <parameter>ecell</parameter> argument is an ECell object that needs to know how to render the
data in the ETableModel for this specific row.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>col_idx</parameter>&nbsp;:</term>
<listitem><simpara> the column we represent in the model
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> a title for this column
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>expansion</parameter>&nbsp;:</term>
<listitem><simpara> FIXME
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>min_width</parameter>&nbsp;:</term>
<listitem><simpara> minimum width in pixels for this column
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ecell</parameter>&nbsp;:</term>
<listitem><simpara> the renderer to be used for this column
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>compare</parameter>&nbsp;:</term>
<listitem><simpara> comparision function for the elements stored in this column
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>resizable</parameter>&nbsp;:</term>
<listitem><simpara> whether the column can be resized interactively by the user
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly created ETableCol object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-table-col-new-with-pixbuf">e_table_col_new_with_pixbuf ()</title>
<indexterm><primary>e_table_col_new_with_pixbuf</primary></indexterm><programlisting><link linkend="ETableCol">ETableCol</link>*  e_table_col_new_with_pixbuf     (<link linkend="int">int</link> col_idx,
                                             <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                             <link linkend="double">double</link> expansion,
                                             <link linkend="int">int</link> min_width,
                                             <link linkend="ECell">ECell</link> *ecell,
                                             <link linkend="GCompareFunc">GCompareFunc</link> compare,
                                             <link linkend="gboolean">gboolean</link> resizable);</programlisting>
<para>
The ETableCol represents a column to be used inside an ETable.  The
ETableCol objects are inserted inside an ETableHeader (which is just a collection
of ETableCols).  The ETableHeader is the definition of the order in which
columns are shown to the user. 
</para>
<para>
The <parameter>text</parameter> argument is the the text that will be shown as a header to the
user. <parameter>col_idx</parameter> reflects where the data for this ETableCol object will
be fetch from an ETableModel.  So even if the user changes the order
of the columns being viewed (the ETableCols in the ETableHeader), the
column will always point to the same column inside the ETableModel.
</para>
<para>
The <parameter>ecell</parameter> argument is an ECell object that needs to know how to render the
data in the ETableModel for this specific row.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>col_idx</parameter>&nbsp;:</term>
<listitem><simpara> the column we represent in the model
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixbuf</parameter>&nbsp;:</term>
<listitem><simpara> the image to be used for the header
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>expansion</parameter>&nbsp;:</term>
<listitem><simpara> FIXME
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>min_width</parameter>&nbsp;:</term>
<listitem><simpara> minimum width in pixels for this column
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>ecell</parameter>&nbsp;:</term>
<listitem><simpara> the renderer to be used for this column
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>compare</parameter>&nbsp;:</term>
<listitem><simpara> comparision function for the elements stored in this column
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>resizable</parameter>&nbsp;:</term>
<listitem><simpara> whether the column can be resized interactively by the user
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly created ETableCol object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="e-table-col-destroy">e_table_col_destroy ()</title>
<indexterm><primary>e_table_col_destroy</primary></indexterm><programlisting><link linkend="void">void</link>        e_table_col_destroy             (<link linkend="ETableCol">ETableCol</link> *etc);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>etc</parameter>&nbsp;:</term>
<listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<refsect2><title><anchor id="ETableCol--sortable">The &quot;<literal>sortable</literal>&quot; property</title>
<programlisting>  &quot;sortable&quot;             <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para></para></refsect2>

</refsect1>




</refentry>
