## 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
                        IAnjutaIterableTree;
                        IAnjutaIterableTreeIface;
    GQuark              ianjuta_iterable_tree_error_quark   (void);
    gboolean            ianjuta_iterable_tree_children      (IAnjutaIterableTree *obj,
                                                             GError **err);
    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);

## Object Hierarchy

      GInterface
       +----IAnjutaIterableTree

## Prerequisites

IAnjutaIterableTree requires IAnjutaIterable and GObject.

## Description

## Details

### IANJUTA_ITERABLE_TREE_ERROR

    #define IANJUTA_ITERABLE_TREE_ERROR ianjuta_iterable_tree_error_quark()

### IAnjutaIterableTree

    typedef struct _IAnjutaIterableTree IAnjutaIterableTree;

### IAnjutaIterableTreeIface

    typedef struct {
    	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);
    } IAnjutaIterableTreeIface;

### ianjuta_iterable_tree_error_quark ()

    GQuark              ianjuta_iterable_tree_error_quark   (void);

Returns : |

### 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_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.