## ETreeMemory

ETreeMemory

## Synopsis

    struct              ETreeMemory;
    void                e_tree_memory_construct             (ETreeMemory *tree_memory);
    ETreeMemory *       e_tree_memory_new                   (void);
    ETreePath           e_tree_memory_node_insert           (ETreeMemory *tree_memory,
                                                             ETreePath parent_node,
                                                             gint position,
                                                             gpointer node_data);
    ETreePath           e_tree_memory_node_insert_id        (ETreeMemory *tree_memory,
                                                             ETreePath parent,
                                                             gint position,
                                                             gpointer node_data,
                                                             gchar *id);
    ETreePath           e_tree_memory_node_insert_before    (ETreeMemory *tree_memory,
                                                             ETreePath parent,
                                                             ETreePath sibling,
                                                             gpointer node_data);
    gpointer            e_tree_memory_node_remove           (ETreeMemory *tree_memory,
                                                             ETreePath path);
    void                e_tree_memory_freeze                (ETreeMemory *tree_memory);
    void                e_tree_memory_thaw                  (ETreeMemory *tree_memory);
    void                e_tree_memory_set_expanded_default  (ETreeMemory *tree_memory,
                                                             gboolean expanded);
    gpointer            e_tree_memory_node_get_data         (ETreeMemory *tree_memory,
                                                             ETreePath node);
    void                e_tree_memory_node_set_data         (ETreeMemory *tree_memory,
                                                             ETreePath node,
                                                             gpointer node_data);
    gint                (*ETreeMemorySortCallback)          (ETreeMemory *tree_memory,
                                                             ETreePath path1,
                                                             ETreePath path2,
                                                             gpointer closure);
    void                e_tree_memory_sort_node             (ETreeMemory *tree_memory,
                                                             ETreePath node,
                                                             ETreeMemorySortCallback callback,
                                                             gpointer user_data);
    void                e_tree_memory_set_node_destroy_func (ETreeMemory *tree_memory,
                                                             GFunc destroy_func,
                                                             gpointer user_data);

## Object Hierarchy

      GObject
       +----ETreeModel
             +----ETreeMemory

## Signals

      "fill-in-children"                               : Run Last

## Description

## Details

### struct ETreeMemory

    struct ETreeMemory;

### e_tree_memory_construct ()

    void                e_tree_memory_construct             (ETreeMemory *tree_memory);

### e_tree_memory_new ()

    ETreeMemory *       e_tree_memory_new                   (void);

XXX docs here.

return values: a newly constructed ETreeMemory.

### e_tree_memory_node_insert ()

    ETreePath           e_tree_memory_node_insert           (ETreeMemory *tree_memory,
                                                             ETreePath parent_node,
                                                             gint position,
                                                             gpointer node_data);

### e_tree_memory_node_insert_id ()

    ETreePath           e_tree_memory_node_insert_id        (ETreeMemory *tree_memory,
                                                             ETreePath parent,
                                                             gint position,
                                                             gpointer node_data,
                                                             gchar *id);

### e_tree_memory_node_insert_before ()

    ETreePath           e_tree_memory_node_insert_before    (ETreeMemory *tree_memory,
                                                             ETreePath parent,
                                                             ETreePath sibling,
                                                             gpointer node_data);

### e_tree_memory_node_remove ()

    gpointer            e_tree_memory_node_remove           (ETreeMemory *tree_memory,
                                                             ETreePath path);

### e_tree_memory_freeze ()

    void                e_tree_memory_freeze                (ETreeMemory *tree_memory);

This function prepares an ETreeModel for a period of much change. All signals regarding changes to the tree are deferred until we thaw the tree.

`tree_memory` : | the ETreeModel to freeze.

### e_tree_memory_thaw ()

    void                e_tree_memory_thaw                  (ETreeMemory *tree_memory);

This function thaws an ETreeMemory. All the defered signals can add up to a lot, we don't know - so we just emit a model_changed signal.

`tree_memory` : | the ETreeMemory to thaw.

### e_tree_memory_set_expanded_default ()

    void                e_tree_memory_set_expanded_default  (ETreeMemory *tree_memory,
                                                             gboolean expanded);

Sets the state of nodes to be append to a thread. They will either be expanded or collapsed, according to the value of `expanded`.

### e_tree_memory_node_get_data ()

    gpointer            e_tree_memory_node_get_data         (ETreeMemory *tree_memory,
                                                             ETreePath node);

### e_tree_memory_node_set_data ()

    void                e_tree_memory_node_set_data         (ETreeMemory *tree_memory,
                                                             ETreePath node,
                                                             gpointer node_data);

### ETreeMemorySortCallback ()

    gint                (*ETreeMemorySortCallback)          (ETreeMemory *tree_memory,
                                                             ETreePath path1,
                                                             ETreePath path2,
                                                             gpointer closure);

### e_tree_memory_sort_node ()

    void                e_tree_memory_sort_node             (ETreeMemory *tree_memory,
                                                             ETreePath node,
                                                             ETreeMemorySortCallback callback,
                                                             gpointer user_data);

### e_tree_memory_set_node_destroy_func ()

    void                e_tree_memory_set_node_destroy_func (ETreeMemory *tree_memory,
                                                             GFunc destroy_func,
                                                             gpointer user_data);

## Signal Details

### The `"fill-in-children"` signal

    void                user_function                      (ETreeMemory *etreememory,
                                                            gpointer     arg1,
                                                            gpointer     user_data)        : Run Last