## GladeApp GladeApp — The central control point of the Glade core. |

## Synopsis

                        GladeApp;
    GladeApp*           glade_app_new                       (void);
    GType               glade_pointer_mode_get_type         (void);
    GladeApp*           glade_app_get                       (void);
    void                glade_app_update_ui                 (void);
    void                glade_app_set_window                (GtkWidget *window);
    GtkWidget*          glade_app_get_window                (void);
    GladeEditor*        glade_app_get_editor                (void);
    GladePalette*       glade_app_get_palette               (void);
    GladeClipboard*     glade_app_get_clipboard             (void);
    GtkWidget*          glade_app_get_clipboard_view        (void);
    GladeProject*       glade_app_get_project               (void);
    void                glade_app_set_project               (GladeProject *project);
    GladePointerMode    glade_app_get_pointer_mode          (void);
    void                glade_app_set_pointer_mode          (GladePointerMode mode);
    void                glade_app_add_project               (GladeProject *project);
    void                glade_app_remove_project            (GladeProject *project);
    GList*              glade_app_get_projects              (void);
    GKeyFile*           glade_app_get_config                (void);
    gboolean            glade_app_is_project_loaded         (const gchar *project_path);
    GladeProject*       glade_app_get_project_by_path       (const gchar *project_path);
    void                glade_app_show_properties           (gboolean raise);
    void                glade_app_hide_properties           (void);
    void                glade_app_command_copy              (void);
    void                glade_app_command_cut               (void);
    void                glade_app_command_paste             (GladePlaceholder *placeholder);
    void                glade_app_command_delete            (void);
    void                glade_app_command_delete_clipboard  (void);
    void                glade_app_command_undo              (void);
    void                glade_app_command_redo              (void);
    gint                glade_app_config_save               (void);
    void                glade_app_set_transient_parent      (GtkWindow *parent);
    GtkWindow *         glade_app_get_transient_parent      (void);
    void                glade_app_set_accel_group           (GtkAccelGroup *accel_group);
    void                glade_app_update_instance_count     (GladeProject *project);
    GtkWidget *         glade_app_undo_button_new           (void);
    GtkWidget *         glade_app_redo_button_new           (void);
    GList *             glade_app_get_selection             (void);
    gboolean            glade_app_is_selected               (GObject *object);
    void                glade_app_selection_set             (GObject *object,
                                                             gboolean emit_signal);
    void                glade_app_selection_add             (GObject *object,
                                                             gboolean emit_signal);
    void                glade_app_selection_remove          (GObject *object,
                                                             gboolean emit_signal);
    void                glade_app_selection_clear           (gboolean emit_signal);
    void                glade_app_selection_changed         (void);
    const gchar *       glade_app_get_catalogs_dir          (void);
    const gchar *       glade_app_get_modules_dir           (void);
    const gchar *       glade_app_get_plugins_dir           (void);
    const gchar *       glade_app_get_pixmaps_dir           (void);
    const gchar *       glade_app_get_locale_dir            (void);

## Object Hierarchy

      GObject
       +----GladeApp

## Properties

      "active-project"           GladeProject*         : Read / Write
      "pointer-mode"             GladePointerMode      : Read / Write

## Signals

      "signal-editor-created"                          : Run Last
      "update-ui"                                      : Run First

## Description

This main control object is where we try to draw the line between what is the Glade core and what is the main application. The main application must derive from the GladeApp object and create an instance to initialize the Glade core.

## Details

### GladeApp

    typedef struct _GladeApp GladeApp;

### glade_app_new ()

    GladeApp*           glade_app_new                       (void);

### glade_pointer_mode_get_type ()

    GType               glade_pointer_mode_get_type         (void);

### glade_app_get ()

    GladeApp*           glade_app_get                       (void);

### glade_app_update_ui ()

    void                glade_app_update_ui                 (void);

### glade_app_set_window ()

    void                glade_app_set_window                (GtkWidget *window);

### glade_app_get_window ()

    GtkWidget*          glade_app_get_window                (void);

### glade_app_get_editor ()

    GladeEditor*        glade_app_get_editor                (void);

### glade_app_get_palette ()

    GladePalette*       glade_app_get_palette               (void);

### glade_app_get_clipboard ()

    GladeClipboard*     glade_app_get_clipboard             (void);

### glade_app_get_clipboard_view ()

    GtkWidget*          glade_app_get_clipboard_view        (void);

### glade_app_get_project ()

    GladeProject*       glade_app_get_project               (void);

### glade_app_set_project ()

    void                glade_app_set_project               (GladeProject *project);

Sets the active project in the GladeApp to `project`.

`project` : | A GladeProject

### glade_app_get_pointer_mode ()

    GladePointerMode    glade_app_get_pointer_mode          (void);

Gets the current GladePointerMode

Returns : | The GladePointerMode

### glade_app_set_pointer_mode ()

    void                glade_app_set_pointer_mode          (GladePointerMode mode);

Sets the GladePointerMode

`mode` : | A GladePointerMode

### glade_app_add_project ()

    void                glade_app_add_project               (GladeProject *project);

### glade_app_remove_project ()

    void                glade_app_remove_project            (GladeProject *project);

### glade_app_get_projects ()

    GList*              glade_app_get_projects              (void);

### glade_app_get_config ()

    GKeyFile*           glade_app_get_config                (void);

### glade_app_is_project_loaded ()

    gboolean            glade_app_is_project_loaded         (const gchar *project_path);

### glade_app_get_project_by_path ()

    GladeProject*       glade_app_get_project_by_path       (const gchar *project_path);

Finds an open project with `path`

`project_path` : | The path of an open project
Returns : | A GladeProject, or NULL if no such open project was found

### glade_app_show_properties ()

    void                glade_app_show_properties           (gboolean raise);

### glade_app_hide_properties ()

    void                glade_app_hide_properties           (void);

### glade_app_command_copy ()

    void                glade_app_command_copy              (void);

Copy the active project's selection (the new copies will end up on the clipboard and will be set as the clipboards selection).

`app` : | A GladeApp

### glade_app_command_cut ()

    void                glade_app_command_cut               (void);

Cut the active project's selection (the cut objects will end up on the clipboard and will be set as the clipboards selection).

`app` : | A GladeApp

### glade_app_command_paste ()

    void                glade_app_command_paste             (GladePlaceholder *placeholder);

Paste the clipboard selection to the active project's selection (the project must have only one object selected).

`placeholder` : | A GladePlaceholder

### glade_app_command_delete ()

    void                glade_app_command_delete            (void);

Delete the active project's selection.

### glade_app_command_delete_clipboard ()

    void                glade_app_command_delete_clipboard  (void);

Delete the clipboard's selection.

### glade_app_command_undo ()

    void                glade_app_command_undo              (void);

### glade_app_command_redo ()

    void                glade_app_command_redo              (void);

### glade_app_config_save ()

    gint                glade_app_config_save               (void);

Saves the GKeyFile to "`g_get_user_config_dir()`/GLADE_CONFIG_FILENAME"

Return 0 on success.

### glade_app_set_transient_parent ()

    void                glade_app_set_transient_parent      (GtkWindow *parent);

### glade_app_get_transient_parent ()

    GtkWindow *         glade_app_get_transient_parent      (void);

### glade_app_set_accel_group ()

    void                glade_app_set_accel_group           (GtkAccelGroup *accel_group);

### glade_app_update_instance_count ()

    void                glade_app_update_instance_count     (GladeProject *project);

### glade_app_undo_button_new ()

    GtkWidget *         glade_app_undo_button_new           (void);

### glade_app_redo_button_new ()

    GtkWidget *         glade_app_redo_button_new           (void);

### glade_app_get_selection ()

    GList *             glade_app_get_selection             (void);

### glade_app_is_selected ()

    gboolean            glade_app_is_selected               (GObject *object);

### glade_app_selection_set ()

    void                glade_app_selection_set             (GObject *object,
                                                             gboolean emit_signal);

### glade_app_selection_add ()

    void                glade_app_selection_add             (GObject *object,
                                                             gboolean emit_signal);

### glade_app_selection_remove ()

    void                glade_app_selection_remove          (GObject *object,
                                                             gboolean emit_signal);

### glade_app_selection_clear ()

    void                glade_app_selection_clear           (gboolean emit_signal);

### glade_app_selection_changed ()

    void                glade_app_selection_changed         (void);

### glade_app_get_catalogs_dir ()

    const gchar *       glade_app_get_catalogs_dir          (void);

### glade_app_get_modules_dir ()

    const gchar *       glade_app_get_modules_dir           (void);

### glade_app_get_plugins_dir ()

    const gchar *       glade_app_get_plugins_dir           (void);

### glade_app_get_pixmaps_dir ()

    const gchar *       glade_app_get_pixmaps_dir           (void);

### glade_app_get_locale_dir ()

    const gchar *       glade_app_get_locale_dir            (void);

## Property Details

### The `"active-project"` property

      "active-project"           GladeProject*         : Read / Write

The active project.

### The `"pointer-mode"` property

      "pointer-mode"             GladePointerMode      : Read / Write

Current mode for the pointer in the workspace.

Default value: select

## Signal Details

### The `"signal-editor-created"` signal

    void                user_function                      (GladeApp *gladeapp,
                                                            GObject  *signal_editor,
                                                            gpointer  user_data)          : Run Last

Emitted when a new signal editor created. A tree view is created in the default handler. Connect your handler before the default handler for setting a custom column or renderer and after it for connecting to the tree view signals

`gladeapp` : | the GladeApp which received the signal.
`signal_editor` : | the new GladeSignalEditor.
`user_data` : | user data set when the signal handler was connected.

### The `"update-ui"` signal

    void                user_function                      (GladeApp *gladeapp,
                                                            gpointer  user_data)      : Run First

Emitted when a project name changes or a cut/copy/paste/delete occurred.

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