# ETableSpecification

## Name

ETableSpecification -- Internal object to keep track of the ETable State.

## Synopsis

    #define     E_TABLE_SPECIFICATION_TYPE
    typedef     ETableSpecification;
    ETableSpecification* e_table_specification_new
                                                (void);
    gboolean    e_table_specification_load_from_file
                                                (ETableSpecification *specification,
                                                 const char *filename);
    void        e_table_specification_load_from_string
                                                (ETableSpecification *specification,
                                                 const char *xml);
    void        e_table_specification_load_from_node
                                                (ETableSpecification *specification,
                                                 const xmlNode *node);
    void        e_table_specification_save_to_file
                                                (ETableSpecification *specification,
                                                 const char *filename);
    char*       e_table_specification_save_to_string
                                                (ETableSpecification *specification);
    xmlNode*    e_table_specification_save_to_node
                                                (ETableSpecification *specification,
                                                 xmlDoc *doc);

## Object Hierarchy

      GtkObject
       +----ETableSpecification

## Description

This object is used to keep track of the ETableState, and it is mostly an internal function. These are used by the ETable widget and its configuration engine (`ETableConfig`). It is mostly an internal object.

## Details

### E_TABLE_SPECIFICATION_TYPE

    #define E_TABLE_SPECIFICATION_TYPE        (e_table_specification_get_type ())

### ETableSpecification

    typedef struct {
    	GtkObject base;

    	ETableColumnSpecification **columns;
    	ETableState *state;

    	guint no_headers : 1;
    	guint click_to_add : 1;
    	guint draw_grid : 1;
    	ETableCursorMode cursor_mode;
    	char *click_to_add_message_;
    } ETableSpecification;

### e_table_specification_new ()

    ETableSpecification* e_table_specification_new
                                                (void);

Creates a new `ETableSpecification` object. This object is used to hold the information about the rendering information for ETable.

Returns : | a newly created `ETableSpecification` object.

### e_table_specification_load_from_file ()

    gboolean    e_table_specification_load_from_file
                                                (ETableSpecification *specification,
                                                 const char *filename);

This routine modifies `specification` to reflect the state described by the file `filename`.

`specification` : | An ETableSpecification that you want to modify
`filename` : | a filename that contains an ETableSpecification
Returns : | TRUE on success, FALSE on failure.

### e_table_specification_load_from_string ()

    void        e_table_specification_load_from_string
                                                (ETableSpecification *specification,
                                                 const char *xml);

This routine modifies `specification` to reflect the state described by `xml`. `xml` is typically returned by e_table_specification_save_to_string or it can be embedded in your source code.

`specification` : | An ETableSpecification that you want to modify
`xml` : | a stringified representation of an ETableSpecification description.

### e_table_specification_load_from_node ()

    void        e_table_specification_load_from_node
                                                (ETableSpecification *specification,
                                                 const xmlNode *node);

This routine modifies `specification` to reflect the state described by `node`.

`specification` : | An ETableSpecification that you want to modify
`node` : | an xmlNode with an XML ETableSpecification description.

### e_table_specification_save_to_file ()

    void        e_table_specification_save_to_file
                                                (ETableSpecification *specification,
                                                 const char *filename);

This routine stores the `specification` into `filename`.

`specification` : | An `ETableSpecification` that you want to save
`filename` : | a file name to store the specification.

### e_table_specification_save_to_string ()

    char*       e_table_specification_save_to_string
                                                (ETableSpecification *specification);

Saves the state of `specification` to a string.

`specification` : | An `ETableSpecification` that you want to stringify
Returns : | an `g_alloc()` allocated string containing the stringified representation of `specification`. This stringified representation uses XML as a convenience.

### e_table_specification_save_to_node ()

    xmlNode*    e_table_specification_save_to_node
                                                (ETableSpecification *specification,
                                                 xmlDoc *doc);

This routine saves the `ETableSpecification` state in the object `specification` into the xmlDoc represented by `doc`.

`specification` : | An ETableSpecification that you want to store.
`doc` : | Node where the specification is saved
Returns : | The node that has been attached to `doc` with the contents of the ETableSpecification.

## See Also

`ETable`, `ETableColumnSpecification`, `ETableConfig`.