GIMP Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# GimpPathEditor

## Name

GimpPathEditor -- Widget for editing a file search path.

## Synopsis

    struct      GimpPathEditor;
    #define     GIMP_PATH_EDITOR                (obj)
    GtkWidget*  gimp_path_editor_new            (gchar *filesel_title,
                                                 gchar *path);
    gchar*      gimp_path_editor_get_path       (GimpPathEditor *gpe);

## Object Hierarchy

      GtkObject
       +----GtkWidget
             +----GtkContainer
                   +----GtkBox
                         +----GtkVBox
                               +----GimpPathEditor

## Signal Prototypes

    "path-changed"
                void        user_function      (GimpPathEditor *gimppatheditor,
                                                gpointer user_data);

## Description

This widget is used to edit file search paths.

It shows a list of all directories which are in the search path. You can click a directory to select it. The widget provides a GimpFileSelection to change the currently selected directory.

There are buttons to add or delete directories as well as "up" and "down" buttons to change the order in which the directories will be searched.

Whenever the user adds, deletes, changes or reorders a directory of the search path, the "path_changed" signal will be emitted.

## Details

### struct GimpPathEditor

    struct GimpPathEditor;

### GIMP_PATH_EDITOR()

    #define GIMP_PATH_EDITOR(obj)            (GTK_CHECK_CAST ((obj), GIMP_TYPE_PATH_EDITOR, GimpPathEditor))

Checks if the passed pointer is a pointer to a GimpPathEditor and performs the cast if valid.

`obj` : | The pointer to cast.

### gimp_path_editor_new ()

    GtkWidget*  gimp_path_editor_new            (gchar *filesel_title,
                                                 gchar *path);

Creates a new GimpPathEditor widget.

The elements of the initial search path must be separated with the G_SEARCHPATH_SEPARATOR character.

`filesel_title` : | The title of the GtkFileSelection dialog which can be popped up by the attached GimpFileSelection.
`path` : | The initial search path.
Returns : | A pointer to the new GimpPathEditor widget.

### gimp_path_editor_get_path ()

    gchar*      gimp_path_editor_get_path       (GimpPathEditor *gpe);

The elements of the returned search path string are separated with the G_SEARCHPATH_SEPARATOR character.

Note that you have to g_free() the returned string.

`gpe` : | The path editor you want to get the search path from.
Returns : | The search path the user has selected in the path editor.

## Signals

### The "path-changed" signal

    void        user_function                  (GimpPathEditor *gimppatheditor,
                                                gpointer user_data);

This signal is emitted whenever the user adds, deletes, modifies or reorders an element of the search path.

`gimppatheditor` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

## See Also

GimpFileSelection

G_SEARCHPATH_SEPARATOR

<<< Previous Page | Home | Up | Next Page >>>
GimpFileSelection | GimpPixmap