ETableSortInfo: Evolution Utilities Reference Manual

## ETableSortInfo ETableSortInfo |

## Functions

ETableSortInfo * | e_table_sort_info_new ()
void | e_table_sort_info_parse_context_push ()
ETableSortInfo * | e_table_sort_info_parse_context_pop ()
struct _ETableSpecification * | e_table_sort_info_ref_specification ()
gboolean | e_table_sort_info_get_can_group ()
void | e_table_sort_info_set_can_group ()
guint | e_table_sort_info_grouping_get_count ()
void | e_table_sort_info_grouping_truncate ()
ETableColumnSpecification * | e_table_sort_info_grouping_get_nth ()
void | e_table_sort_info_grouping_set_nth ()
guint | e_table_sort_info_sorting_get_count ()
void | e_table_sort_info_sorting_remove ()
void | e_table_sort_info_sorting_truncate ()
ETableColumnSpecification * | e_table_sort_info_sorting_get_nth ()
void | e_table_sort_info_sorting_set_nth ()
void | e_table_sort_info_sorting_insert ()
void | e_table_sort_info_load_from_node ()
xmlNode * | e_table_sort_info_save_to_node ()
ETableSortInfo * | e_table_sort_info_duplicate ()

## Properties

ETableSpecification * | specification | Read / Write / Construct Only

## Signals

void | group-info-changed | Run Last
void | sort-info-changed | Run Last

## Object Hierarchy

        GObject
        ╰── ETableSortInfo

## Description

## Functions

### e_table_sort_info_new ()

    ETableSortInfo *
    e_table_sort_info_new (struct _ETableSpecification *specification);

This creates a new ETableSortInfo object that contains no grouping and no sorting defined as of yet. This object is used to keep track of multi-level sorting and multi-level grouping of an ETable.

#### Parameters

specification | an ETableSpecification |

#### Returns

A new ETableSortInfo object

### e_table_sort_info_parse_context_push ()

    void
    e_table_sort_info_parse_context_push (GMarkupParseContext *context,
                                          struct _ETableSpecification *specification);

Creates a new ETableSortInfo from a segment of XML data being fed to `context` . Call this function for the appropriate opening tag from the `start_element` callback of a GMarkupParser, then call `e_table_sort_info_parse_context_pop()` for the corresponding closing tag from the `end_element` callback.

#### Parameters

context | a GMarkupParseContext |
specification | an ETableSpecification |

### e_table_sort_info_parse_context_pop ()

    ETableSortInfo *
    e_table_sort_info_parse_context_pop (GMarkupParseContext *context);

Creates a new ETableSortInfo from a segment of XML data being fed to `context` . Call `e_table_sort_info_parse_context_push()` for the appropriate opening tag from the `start_element` callback of a GMarkupParser, then call this function for the corresponding closing tag from the `end_element` callback.

Unreference the newly-created ETableSortInfo with `g_object_unref()` when finished with it.

#### Parameters

context | a GMarkupParseContext |

#### Returns

an ETableSortInfo

### e_table_sort_info_ref_specification ()

    struct _ETableSpecification *
    e_table_sort_info_ref_specification (ETableSortInfo *sort_info);

Returns the ETableSpecification passed to `e_table_sort_info_new()`.

The returned ETableSpecification is referenced for thread-safety and must be unreferenced with `g_object_unref()` when finished with it.

#### Parameters

sort_info | an ETableSortInfo |

#### Returns

an ETableSpecification

### e_table_sort_info_get_can_group ()

    gboolean
    e_table_sort_info_get_can_group (ETableSortInfo *sort_info);

### e_table_sort_info_set_can_group ()

    void
    e_table_sort_info_set_can_group (ETableSortInfo *sort_info,
                                     gboolean can_group);

### e_table_sort_info_grouping_get_count ()

    guint
    e_table_sort_info_grouping_get_count (ETableSortInfo *sort_info);

#### Parameters

sort_info | an ETableSortInfo |

#### Returns

the number of grouping criteria in the object.

### e_table_sort_info_grouping_truncate ()

    void
    e_table_sort_info_grouping_truncate (ETableSortInfo *sort_info,
                                         guint length);

This routine can be used to reduce or grow the number of grouping criteria in the object.

#### Parameters

sort_info | an ETableSortInfo |
length | position where the truncation happens. |

### e_table_sort_info_grouping_get_nth ()

    ETableColumnSpecification *
    e_table_sort_info_grouping_get_nth (ETableSortInfo *sort_info,
                                        guint n,
                                        GtkSortType *out_sort_type);

#### Parameters

sort_info | an ETableSortInfo |
n | Item information to fetch. |
out_sort_type | return location for a GtkSortType value, or `NULL` |

#### Returns

the description of the `n` -th grouping criteria in the `info` object.

### e_table_sort_info_grouping_set_nth ()

    void
    e_table_sort_info_grouping_set_nth (ETableSortInfo *sort_info,
                                        guint n,
                                        ETableColumnSpecification *spec,
                                        GtkSortType sort_type);

Sets the grouping criteria for index `n` to `spec` and `sort_type` .

#### Parameters

sort_info | an ETableSortInfo |
n | Item information to fetch. |
spec | an ETableColumnSpecification |
sort_type | a GtkSortType |

### e_table_sort_info_sorting_get_count ()

    guint
    e_table_sort_info_sorting_get_count (ETableSortInfo *sort_info);

### e_table_sort_info_sorting_remove ()

    void
    e_table_sort_info_sorting_remove (ETableSortInfo *sort_info,
                                      guint n);

Removes the sorting element at the given index. The following sorting elements are moved down one place.

#### Parameters

sort_info | an ETableSortInfo |
n | the index of the element to remove |

### e_table_sort_info_sorting_truncate ()

    void
    e_table_sort_info_sorting_truncate (ETableSortInfo *sort_info,
                                        guint length);

This routine can be used to reduce or grow the number of sort criteria in the object.

#### Parameters

sort_info | an ETableSortInfo |
length | position where the truncation happens. |

### e_table_sort_info_sorting_get_nth ()

    ETableColumnSpecification *
    e_table_sort_info_sorting_get_nth (ETableSortInfo *sort_info,
                                       guint n,
                                       GtkSortType *out_sort_type);

#### Parameters

sort_info | an ETableSortInfo |
n | Item information to fetch. |
out_sort_type | return location for a GtkSortType value, or `NULL` |

#### Returns

the description of the `n` -th grouping criteria in the `info` object.

### e_table_sort_info_sorting_set_nth ()

    void
    e_table_sort_info_sorting_set_nth (ETableSortInfo *sort_info,
                                       guint n,
                                       ETableColumnSpecification *spec,
                                       GtkSortType sort_type);

Sets the sorting criteria for index `n` to `spec` and `sort_type` .

#### Parameters

sort_info | an ETableSortInfo |
n | Item information to fetch. |
spec | an ETableColumnSpecification |
sort_type | a GtkSortType |

### e_table_sort_info_sorting_insert ()

    void
    e_table_sort_info_sorting_insert (ETableSortInfo *sort_info,
                                      guint n,
                                      ETableColumnSpecification *spec,
                                      GtkSortType sort_type);

### e_table_sort_info_load_from_node ()

    void
    e_table_sort_info_load_from_node (ETableSortInfo *sort_info,
                                      xmlNode *node,
                                      gdouble state_version);

This loads the state for the ETableSortInfo object `info` from the xml node `node` .

#### Parameters

sort_info | an ETableSortInfo |
node | pointer to the xmlNode that describes the sorting and grouping information |

### e_table_sort_info_save_to_node ()

    xmlNode *
    e_table_sort_info_save_to_node (ETableSortInfo *sort_info,
                                    xmlNode *parent);

This function is used

#### Parameters

sort_info | an ETableSortInfo |
parent | xmlNode that will be hosting the saved state of the `info` object. |

#### Returns

the node that has been appended to `parent` as a child containing the sorting and grouping information for this ETableSortInfo object.

### e_table_sort_info_duplicate ()

    ETableSortInfo *
    e_table_sort_info_duplicate (ETableSortInfo *sort_info);

## Property Details

### The `“specification”` property

      “specification”            ETableSpecification *

Specification for the table state.

Owner: ETableSortInfo

Flags: Read / Write / Construct Only

## Signal Details

### The `“group-info-changed”` signal

    void
    user_function (ETableSortInfo *etablesortinfo,
                   gpointer        user_data)

Flags: Run Last

### The `“sort-info-changed”` signal

    void
    user_function (ETableSortInfo *etablesortinfo,
                   gpointer        user_data)

Flags: Run Last