<refentry id="ETableCol" revision="12 Jan 2001">
<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>                 (int col_idx,
                                             const char *text,
                                             <link linkend="double">double</link> expansion,
                                             int 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>     (int col_idx,
                                             <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                             <link linkend="double">double</link> expansion,
                                             int min_width,
                                             <link linkend="ECell">ECell</link> *ecell,
                                             <link linkend="GCompareFunc">GCompareFunc</link> compare,
                                             <link linkend="gboolean">gboolean</link> resizable);
void        <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>Args</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>
<programlisting>#define E_TABLE_COL_TYPE        (e_table_col_get_type ())
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="ETableCol">ETableCol</title>
<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>
<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>
<programlisting><link linkend="ETableCol">ETableCol</link>*  e_table_col_new                 (int col_idx,
                                             const char *text,
                                             <link linkend="double">double</link> expansion,
                                             int 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><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>col_idx</parameter>&nbsp;:</entry>
<entry> the column we represent in the model
</entry></row>
<row><entry align="right"><parameter>text</parameter>&nbsp;:</entry>
<entry> a title for this column
</entry></row>
<row><entry align="right"><parameter>expansion</parameter>&nbsp;:</entry>
<entry> FIXME
</entry></row>
<row><entry align="right"><parameter>min_width</parameter>&nbsp;:</entry>
<entry> minimum width in pixels for this column
</entry></row>
<row><entry align="right"><parameter>ecell</parameter>&nbsp;:</entry>
<entry> the renderer to be used for this column
</entry></row>
<row><entry align="right"><parameter>compare</parameter>&nbsp;:</entry>
<entry> comparision function for the elements stored in this column
</entry></row>
<row><entry align="right"><parameter>resizable</parameter>&nbsp;:</entry>
<entry> whether the column can be resized interactively by the user
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the newly created ETableCol object.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="e-table-col-new-with-pixbuf">e_table_col_new_with_pixbuf ()</title>
<programlisting><link linkend="ETableCol">ETableCol</link>*  e_table_col_new_with_pixbuf     (int col_idx,
                                             <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf,
                                             <link linkend="double">double</link> expansion,
                                             int 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><informaltable pgwide=1 frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>col_idx</parameter>&nbsp;:</entry>
<entry> the column we represent in the model
</entry></row>
<row><entry align="right"><parameter>pixbuf</parameter>&nbsp;:</entry>
<entry> the image to be used for the header
</entry></row>
<row><entry align="right"><parameter>expansion</parameter>&nbsp;:</entry>
<entry> FIXME
</entry></row>
<row><entry align="right"><parameter>min_width</parameter>&nbsp;:</entry>
<entry> minimum width in pixels for this column
</entry></row>
<row><entry align="right"><parameter>ecell</parameter>&nbsp;:</entry>
<entry> the renderer to be used for this column
</entry></row>
<row><entry align="right"><parameter>compare</parameter>&nbsp;:</entry>
<entry> comparision function for the elements stored in this column
</entry></row>
<row><entry align="right"><parameter>resizable</parameter>&nbsp;:</entry>
<entry> whether the column can be resized interactively by the user
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> the newly created ETableCol object.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="e-table-col-destroy">e_table_col_destroy ()</title>
<programlisting>void        e_table_col_destroy             (<link linkend="ETableCol">ETableCol</link> *etc);</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>etc</parameter>&nbsp;:</entry>
<entry>


</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Args</title>
<variablelist>
<varlistentry><term><anchor id="ETableCol--sortable">&quot;<literal>sortable</literal>&quot; (<link linkend="gboolean">gboolean</link> : Read / Write)</term>
<listitem>
<para>

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

</variablelist>
</refsect1>




</refentry>
