## IAnjutaIterableTree IAnjutaIterableTree — Implemented by tree objects that can iterate |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-iterable-tree.h>

    #define             IANJUTA_ITERABLE_TREE_ERROR
    struct              IAnjutaIterableTreeIface;
    gboolean            ianjuta_iterable_tree_children      (IAnjutaIterableTree *obj,
                                                             GError **err);
    GQuark              ianjuta_iterable_tree_error_quark   (void);
    void                ianjuta_iterable_tree_foreach_post  (IAnjutaIterableTree *obj,
                                                             GFunc callback,
                                                             gpointer user_data,
                                                             GError **err);
    void                ianjuta_iterable_tree_foreach_pre   (IAnjutaIterableTree *obj,
                                                             GFunc callback,
                                                             gpointer user_data,
                                                             GError **err);
    gboolean            ianjuta_iterable_tree_has_children  (IAnjutaIterableTree *obj,
                                                             GError **err);
    gboolean            ianjuta_iterable_tree_parent        (IAnjutaIterableTree *obj,
                                                             GError **err);

## Description

## Details

### IANJUTA_ITERABLE_TREE_ERROR

    #define IANJUTA_ITERABLE_TREE_ERROR ianjuta_iterable_tree_error_quark()

### struct IAnjutaIterableTreeIface

    struct IAnjutaIterableTreeIface {
    	IAnjutaIterableIface g_iface;

    	gboolean (*children) (IAnjutaIterableTree *obj, GError **err);
    	void (*foreach_post) (IAnjutaIterableTree *obj, GFunc callback,  gpointer user_data, GError **err);
    	void (*foreach_pre) (IAnjutaIterableTree *obj, GFunc callback,  gpointer user_data, GError **err);
    	gboolean (*has_children) (IAnjutaIterableTree *obj, GError **err);
    	gboolean (*parent) (IAnjutaIterableTree *obj, GError **err);
    };

### ianjuta_iterable_tree_children ()

    gboolean            ianjuta_iterable_tree_children      (IAnjutaIterableTree *obj,
                                                             GError **err);

Iter position set to first child of current iter. If there is no children, return NULL (iter position is not changed).

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | TRUE if sucessful, otherwise FALSE.

### ianjuta_iterable_tree_error_quark ()

    GQuark              ianjuta_iterable_tree_error_quark   (void);

### ianjuta_iterable_tree_foreach_post ()

    void                ianjuta_iterable_tree_foreach_post  (IAnjutaIterableTree *obj,
                                                             GFunc callback,
                                                             gpointer user_data,
                                                             GError **err);

Call callback for each element in post order.

`obj` : | Self
`callback` : | Callback to call for each element.
`user_data` : | User data to pass back to callback.
`err` : | Error propagation and reporting

### ianjuta_iterable_tree_foreach_pre ()

    void                ianjuta_iterable_tree_foreach_pre   (IAnjutaIterableTree *obj,
                                                             GFunc callback,
                                                             gpointer user_data,
                                                             GError **err);

Call callback for each element in pre order.

`obj` : | Self
`callback` : | Callback to call for each element.
`user_data` : | User data to pass back to callback.
`err` : | Error propagation and reporting

### ianjuta_iterable_tree_has_children ()

    gboolean            ianjuta_iterable_tree_has_children  (IAnjutaIterableTree *obj,
                                                             GError **err);

Returns true if current iter has children

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | TRUE if there are children, otherwise FALSE.

### ianjuta_iterable_tree_parent ()

    gboolean            ianjuta_iterable_tree_parent        (IAnjutaIterableTree *obj,
                                                             GError **err);

Set iter position to parent of curernt iter. If there is no parent, returns FALSE (current iter position is not changed)

`obj` : | Self
`err` : | Error propagation and reporting
Returns : | TRUE if sucessful, otherwise FALSE.