## IAnjutaProjectChooser

IAnjutaProjectChooser — Interface for selecting project node

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-project-chooser.h>

    #define             IANJUTA_PROJECT_CHOOSER_ERROR
    struct              IAnjutaProjectChooserIface;
    GQuark              ianjuta_project_chooser_error_quark (void);
    GFile *             ianjuta_project_chooser_get_selected
                                                            (IAnjutaProjectChooser *obj,
                                                             GError **err);
    gboolean            ianjuta_project_chooser_set_project_model
                                                            (IAnjutaProjectChooser *obj,
                                                             IAnjutaProjectManager *manager,
                                                             AnjutaProjectNodeType child_type,
                                                             GError **err);

## Description

## Details

### IANJUTA_PROJECT_CHOOSER_ERROR

    #define IANJUTA_PROJECT_CHOOSER_ERROR ianjuta_project_chooser_error_quark()

### struct IAnjutaProjectChooserIface

    struct IAnjutaProjectChooserIface {
    	GTypeInterface g_iface;

    	/* Signal */
    	void (*changed) (IAnjutaProjectChooser *obj);

    	GFile* (*get_selected) (IAnjutaProjectChooser *obj, GError **err);
    	gboolean (*set_project_model) (IAnjutaProjectChooser *obj, IAnjutaProjectManager *manager,  AnjutaProjectNodeType child_type, GError **err);
    };

### ianjuta_project_chooser_error_quark ()

    GQuark              ianjuta_project_chooser_error_quark (void);

### ianjuta_project_chooser_get_selected ()

    GFile *             ianjuta_project_chooser_get_selected
                                                            (IAnjutaProjectChooser *obj,
                                                             GError **err);

Gets the currently selected element in the project chooser.

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : | A GFile corresponding to the selected element in the project view or `NULL` if no valid node is selected. The file is owned by the widget If you want to keep a pointer to the file you must add a refcount using `g_object_ref()`. [transfer none]

### ianjuta_project_chooser_set_project_model ()

    gboolean            ianjuta_project_chooser_set_project_model
                                                            (IAnjutaProjectChooser *obj,
                                                             IAnjutaProjectManager *manager,
                                                             AnjutaProjectNodeType child_type,
                                                             GError **err);

Initialize a project chooser button allowing to select a parent node where you can add the nodes of type child_type. As special cases with

ANJUTA_PROJECT_ROOT | all nodes are included
ANJUTA_PROJECT_MODULE | only modules are included, this can be used to add a new package. While ANJUTA_PROJECT_PACKAGE allows you to select a target using a package.

`obj` : | Self
`manager` : | A project manager
`child_type` : | Select one element type: source, group or target
`err` : | Error propagation and reporting.
Returns : | TRUE if sucessful, other FALSE.