# e-tree-model

## Name

e-tree-model --

## Synopsis

    #define     E_TREE_MODEL_TYPE
    gint        (*ETreePathCompareFunc)         (ETreeModel *model,
                                                 ETreePath *path1,
                                                 ETreePath *path2);
    gboolean    (*ETreePathFunc)                (ETreeModel *model,
                                                 ETreePath *path,
                                                 gpointer data);
    void        e_tree_model_construct          (ETreeModel *etree);
    ETreeModel* e_tree_model_new                (void);
    ETreePath*  e_tree_model_get_root           (ETreeModel *etree);
    ETreePath*  e_tree_model_node_get_parent    (ETreeModel *etree,
                                                 ETreePath *path);
    ETreePath*  e_tree_model_node_get_first_child
                                                (ETreeModel *etree,
                                                 ETreePath *path);
    ETreePath*  e_tree_model_node_get_last_child
                                                (ETreeModel *etree,
                                                 ETreePath *path);
    ETreePath*  e_tree_model_node_get_next      (ETreeModel *etree,
                                                 ETreePath *path);
    ETreePath*  e_tree_model_node_get_prev      (ETreeModel *etree,
                                                 ETreePath *path);
    ETreePath*  e_tree_model_node_insert        (ETreeModel *etree,
                                                 ETreePath *parent,
                                                 int position,
                                                 gpointer node_data);
    ETreePath*  e_tree_model_node_insert_before (ETreeModel *etree,
                                                 ETreePath *parent,
                                                 ETreePath *sibling,
                                                 gpointer node_data);
    gpointer    e_tree_model_node_remove        (ETreeModel *etree,
                                                 ETreePath *path);
    void        e_tree_model_freeze             (ETreeModel *etree);
    void        e_tree_model_thaw               (ETreeModel *etree);
    gboolean    e_tree_model_node_is_root       (ETreeModel *etree,
                                                 ETreePath *path);
    gboolean    e_tree_model_node_is_expandable (ETreeModel *etree,
                                                 ETreePath *path);
    gboolean    e_tree_model_node_is_expanded   (ETreeModel *etree,
                                                 ETreePath *path);
    gboolean    e_tree_model_node_is_visible    (ETreeModel *etree,
                                                 ETreePath *path);
    void        e_tree_model_set_expanded_default
                                                (ETreeModel *etree,
                                                 gboolean expanded);
    void        e_tree_model_node_set_expanded  (ETreeModel *etree,
                                                 ETreePath *path,
                                                 gboolean expanded);
    void        e_tree_model_node_set_expanded_recurse
                                                (ETreeModel *etree,
                                                 ETreePath *path,
                                                 gboolean expanded);
    guint       e_tree_model_node_get_children  (ETreeModel *etree,
                                                 ETreePath *path,
                                                 ETreePath ***paths);
    guint       e_tree_model_node_depth         (ETreeModel *etree,
                                                 ETreePath *path);
    guint       e_tree_model_node_num_visible_descendents
                                                (ETreeModel *etm,
                                                 ETreePath *node);
    gpointer    e_tree_model_node_get_data      (ETreeModel *etm,
                                                 ETreePath *node);
    void        e_tree_model_node_set_data      (ETreeModel *etm,
                                                 ETreePath *node,
                                                 gpointer node_data);
    ETreePath*  e_tree_model_node_at_row        (ETreeModel *etree,
                                                 int row);
    GdkPixbuf*  e_tree_model_icon_of_node       (ETreeModel *etree,
                                                 ETreePath *path);
    int         e_tree_model_row_of_node        (ETreeModel *etree,
                                                 ETreePath *path);
    void        e_tree_model_root_node_set_visible
                                                (ETreeModel *etree,
                                                 gboolean visible);
    gboolean    e_tree_model_root_node_is_visible
                                                (ETreeModel *etree);
    void        e_tree_model_node_set_compare_function
                                                (ETreeModel *tree_model,
                                                 ETreePath *node,
                                                 ETreePathCompareFunc compare);
    void        e_tree_model_node_sort          (ETreeModel *tree_model,
                                                 ETreePath *node);
    void        e_tree_model_node_changed       (ETreeModel *tree_model,
                                                 ETreePath *node);
    void        e_tree_model_node_inserted      (ETreeModel *tree_model,
                                                 ETreePath *parent_node,
                                                 ETreePath *inserted_node);
    void        e_tree_model_node_removed       (ETreeModel *tree_model,
                                                 ETreePath *parent_node,
                                                 ETreePath *removed_node);
    void        e_tree_model_node_collapsed     (ETreeModel *tree_model,
                                                 ETreePath *node);
    void        e_tree_model_node_expanded      (ETreeModel *tree_model,
                                                 ETreePath *node,
                                                 gboolean *allow_expand);
    gboolean    e_tree_model_save_expanded_state
                                                (ETreeModel *etm,
                                                 const char *filename);
    gboolean    e_tree_model_load_expanded_state
                                                (ETreeModel *etm,
                                                 const char *filename);
    void        e_tree_model_node_set_save_id   (ETreeModel *etm,
                                                 ETreePath *node,
                                                 const char *id);
    ETreePath*  e_tree_model_node_insert_id     (ETreeModel *tree_model,
                                                 ETreePath *parent_path,
                                                 int position,
                                                 gpointer node_data,
                                                 const char *save_id);
    void        e_tree_model_node_traverse      (ETreeModel *model,
                                                 ETreePath *path,
                                                 ETreePathFunc func,
                                                 gpointer data);

## Description

## Details

### E_TREE_MODEL_TYPE

    #define E_TREE_MODEL_TYPE        (e_tree_model_get_type ())

### ETreePathCompareFunc ()

    gint        (*ETreePathCompareFunc)         (ETreeModel *model,
                                                 ETreePath *path1,
                                                 ETreePath *path2);

`model` : |
`path1` : |
`path2` : |
Returns : |

### ETreePathFunc ()

    gboolean    (*ETreePathFunc)                (ETreeModel *model,
                                                 ETreePath *path,
                                                 gpointer data);

`model` : |
`path` : |
`data` : |
Returns : |

### e_tree_model_construct ()

    void        e_tree_model_construct          (ETreeModel *etree);

`etree` : |

### e_tree_model_new ()

    ETreeModel* e_tree_model_new                (void);

XXX docs here.

return values: a newly constructed ETreeModel.

Returns : |

### e_tree_model_get_root ()

    ETreePath*  e_tree_model_get_root           (ETreeModel *etree);

Accessor for the root node of `etree`.

return values: the ETreePath corresponding to the root node.

`etree` : | the ETreeModel of which we want the root node.
Returns : |

### e_tree_model_node_get_parent ()

    ETreePath*  e_tree_model_node_get_parent    (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_get_first_child ()

    ETreePath*  e_tree_model_node_get_first_child
                                                (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_get_last_child ()

    ETreePath*  e_tree_model_node_get_last_child
                                                (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_get_next ()

    ETreePath*  e_tree_model_node_get_next      (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_get_prev ()

    ETreePath*  e_tree_model_node_get_prev      (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_insert ()

    ETreePath*  e_tree_model_node_insert        (ETreeModel *etree,
                                                 ETreePath *parent,
                                                 int position,
                                                 gpointer node_data);

`etree` : |
`parent` : |
`position` : |
`node_data` : |
Returns : |

### e_tree_model_node_insert_before ()

    ETreePath*  e_tree_model_node_insert_before (ETreeModel *etree,
                                                 ETreePath *parent,
                                                 ETreePath *sibling,
                                                 gpointer node_data);

`etree` : |
`parent` : |
`sibling` : |
`node_data` : |
Returns : |

### e_tree_model_node_remove ()

    gpointer    e_tree_model_node_remove        (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_freeze ()

    void        e_tree_model_freeze             (ETreeModel *etree);

`etree` : |

### e_tree_model_thaw ()

    void        e_tree_model_thaw               (ETreeModel *etree);

`etree` : |

### e_tree_model_node_is_root ()

    gboolean    e_tree_model_node_is_root       (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_is_expandable ()

    gboolean    e_tree_model_node_is_expandable (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_is_expanded ()

    gboolean    e_tree_model_node_is_expanded   (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_is_visible ()

    gboolean    e_tree_model_node_is_visible    (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_set_expanded_default ()

    void        e_tree_model_set_expanded_default
                                                (ETreeModel *etree,
                                                 gboolean expanded);

`etree` : |
`expanded` : |

### e_tree_model_node_set_expanded ()

    void        e_tree_model_node_set_expanded  (ETreeModel *etree,
                                                 ETreePath *path,
                                                 gboolean expanded);

`etree` : |
`path` : |
`expanded` : |

### e_tree_model_node_set_expanded_recurse ()

    void        e_tree_model_node_set_expanded_recurse
                                                (ETreeModel *etree,
                                                 ETreePath *path,
                                                 gboolean expanded);

`etree` : |
`path` : |
`expanded` : |

### e_tree_model_node_get_children ()

    guint       e_tree_model_node_get_children  (ETreeModel *etree,
                                                 ETreePath *path,
                                                 ETreePath ***paths);

`etree` : |
`path` : |
`paths` : |
Returns : |

### e_tree_model_node_depth ()

    guint       e_tree_model_node_depth         (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_node_num_visible_descendents ()

    guint       e_tree_model_node_num_visible_descendents
                                                (ETreeModel *etm,
                                                 ETreePath *node);

`etm` : |
`node` : |
Returns : |

### e_tree_model_node_get_data ()

    gpointer    e_tree_model_node_get_data      (ETreeModel *etm,
                                                 ETreePath *node);

`etm` : |
`node` : |
Returns : |

### e_tree_model_node_set_data ()

    void        e_tree_model_node_set_data      (ETreeModel *etm,
                                                 ETreePath *node,
                                                 gpointer node_data);

`etm` : |
`node` : |
`node_data` : |

### e_tree_model_node_at_row ()

    ETreePath*  e_tree_model_node_at_row        (ETreeModel *etree,
                                                 int row);

`etree` : |
`row` : |
Returns : |

### e_tree_model_icon_of_node ()

    GdkPixbuf*  e_tree_model_icon_of_node       (ETreeModel *etree,
                                                 ETreePath *path);

XXX docs here.

return values: the GdkPixbuf associated with this node.

`etree` : | The ETreeModel.
`path` : | The ETreePath to the node we're getting the icon of.
Returns : |

### e_tree_model_row_of_node ()

    int         e_tree_model_row_of_node        (ETreeModel *etree,
                                                 ETreePath *path);

`etree` : |
`path` : |
Returns : |

### e_tree_model_root_node_set_visible ()

    void        e_tree_model_root_node_set_visible
                                                (ETreeModel *etree,
                                                 gboolean visible);

`etree` : |
`visible` : |

### e_tree_model_root_node_is_visible ()

    gboolean    e_tree_model_root_node_is_visible
                                                (ETreeModel *etree);

`etree` : |
Returns : |

### e_tree_model_node_set_compare_function ()

    void        e_tree_model_node_set_compare_function
                                                (ETreeModel *tree_model,
                                                 ETreePath *node,
                                                 ETreePathCompareFunc compare);

`tree_model` : |
`node` : |
`compare` : |

### e_tree_model_node_sort ()

    void        e_tree_model_node_sort          (ETreeModel *tree_model,
                                                 ETreePath *node);

`tree_model` : |
`node` : |

### e_tree_model_node_changed ()

    void        e_tree_model_node_changed       (ETreeModel *tree_model,
                                                 ETreePath *node);

`tree_model` : |
`node` : |

### e_tree_model_node_inserted ()

    void        e_tree_model_node_inserted      (ETreeModel *tree_model,
                                                 ETreePath *parent_node,
                                                 ETreePath *inserted_node);

`tree_model` : |
`parent_node` : |
`inserted_node` : |

### e_tree_model_node_removed ()

    void        e_tree_model_node_removed       (ETreeModel *tree_model,
                                                 ETreePath *parent_node,
                                                 ETreePath *removed_node);

`tree_model` : |
`parent_node` : |
`removed_node` : |

### e_tree_model_node_collapsed ()

    void        e_tree_model_node_collapsed     (ETreeModel *tree_model,
                                                 ETreePath *node);

`tree_model` : |
`node` : |

### e_tree_model_node_expanded ()

    void        e_tree_model_node_expanded      (ETreeModel *tree_model,
                                                 ETreePath *node,
                                                 gboolean *allow_expand);

`tree_model` : |
`node` : |
`allow_expand` : |

### e_tree_model_save_expanded_state ()

    gboolean    e_tree_model_save_expanded_state
                                                (ETreeModel *etm,
                                                 const char *filename);

`etm` : |
`filename` : |
Returns : |

### e_tree_model_load_expanded_state ()

    gboolean    e_tree_model_load_expanded_state
                                                (ETreeModel *etm,
                                                 const char *filename);

`etm` : |
`filename` : |
Returns : |

### e_tree_model_node_set_save_id ()

    void        e_tree_model_node_set_save_id   (ETreeModel *etm,
                                                 ETreePath *node,
                                                 const char *id);

`etm` : |
`node` : |
`id` : |

### e_tree_model_node_insert_id ()

    ETreePath*  e_tree_model_node_insert_id     (ETreeModel *tree_model,
                                                 ETreePath *parent_path,
                                                 int position,
                                                 gpointer node_data,
                                                 const char *save_id);

`tree_model` : |
`parent_path` : |
`position` : |
`node_data` : |
`save_id` : |
Returns : |

### e_tree_model_node_traverse ()

    void        e_tree_model_node_traverse      (ETreeModel *model,
                                                 ETreePath *path,
                                                 ETreePathFunc func,
                                                 gpointer data);

`model` : |
`path` : |
`func` : |
`data` : |