Top | ![]() |
![]() |
![]() |
![]() |
GladeWidgetAdaptor * | add-item | Read |
gchar * | css-provider-path | Read / Write |
gboolean | has-selection | Read |
gchar * | license | Read / Write |
gboolean | modified | Read |
gchar * | path | Read |
GladePointerMode | pointer-mode | Read |
gboolean | read-only | Read |
gchar * | resource-path | Read / Write |
GladeWidget * | template | Read / Write |
gchar * | translation-domain | Read / Write |
void | add-widget | Run Last |
void | changed | Run First |
void | close | Run Last |
void | load-progress | Run First |
void | parse-began | Run First |
void | parse-finished | Run First |
void | remove-widget | Run Last |
void | selection-changed | Run Last |
void | targets-changed | Run First |
void | widget-name-changed | Run Last |
void | widget-visibility-changed | Run First |
This object owns all project objects and is responsable for loading and saving the glade document, you can monitor the project state via this object and its signals.
gboolean glade_project_load_from_file (GladeProject *project
,const gchar *path
);
GladeProject *
glade_project_load (const gchar *path
);
Opens a project at the given path.
gboolean glade_project_save (GladeProject *project
,const gchar *path
,GError **error
);
Saves project
to the given path.
void
glade_project_undo (GladeProject *project
);
Redoes a GladeCommand in this project.
GladeCommand *
glade_project_next_undo_item (GladeProject *project
);
Gets the next undo item on project
's command stack.
GladeCommand *
glade_project_next_redo_item (GladeProject *project
);
Gets the next redo item on project
's command stack.
void glade_project_push_undo (GladeProject *project
,GladeCommand *cmd
);
Pushes a newly created GladeCommand onto projects
stack.
GtkWidget *
glade_project_undo_items (GladeProject *project
);
Creates a menu of the undo items in the project stack
GtkWidget *
glade_project_redo_items (GladeProject *project
);
Creates a menu of the undo items in the project stack
gboolean
glade_project_get_readonly (GladeProject *project
);
Gets whether the project is read only or not
void glade_project_add_object (GladeProject *project
,GObject *object
);
Adds an object to the project.
void glade_project_remove_object (GladeProject *project
,GObject *object
);
Removes object
from project
.
Note that when removing the GObject from the project we don't change ->project in the associated GladeWidget; this way UNDO can work.
gboolean glade_project_has_object (GladeProject *project
,GObject *object
);
GladeWidget * glade_project_get_widget_by_name (GladeProject *project
,const gchar *name
);
Searches under ancestor
in project
looking for a GladeWidget named name
.
gchar * glade_project_new_widget_name (GladeProject *project
,GladeWidget *widget
,const gchar *base_name
);
Creates a new name for a widget that doesn't collide with any of the names
already in project
. This name will start with base_name
.
Note the widget
parameter is ignored and preserved only for historical reasons.
project |
||
widget |
the GladeWidget intended to recieve a new name, or |
|
base_name |
base name of the widget to create |
gboolean glade_project_is_selected (GladeProject *project
,GObject *object
);
void glade_project_selection_set (GladeProject *project
,GObject *object
,gboolean emit_signal
);
Set the selection in project
to object
If emit_signal
is TRUE
, calls glade_project_selection_changed()
.
void glade_project_selection_add (GladeProject *project
,GObject *object
,gboolean emit_signal
);
Adds object
to the selection chain of project
If emit_signal
is TRUE
, calls glade_project_selection_changed()
.
void glade_project_selection_remove (GladeProject *project
,GObject *object
,gboolean emit_signal
);
Removes object
from the selection chain of project
If emit_signal
is TRUE
, calls glade_project_selection_changed()
.
void glade_project_selection_clear (GladeProject *project
,gboolean emit_signal
);
Clears project
's selection chain
If emit_signal
is TRUE
, calls glade_project_selection_changed()
.
void
glade_project_selection_changed (GladeProject *project
);
Causes project
to emit a "selection_changed" signal.
gboolean
glade_project_get_has_selection (GladeProject *project
);
gchar * glade_project_resource_fullpath (GladeProject *project
,const gchar *resource
);
Project resource strings are always relative, this function tranforms a path relative to project to a full path.
gboolean
glade_project_get_modified (GladeProject *project
);
Get's whether the project has been modified since it was last saved.
“add-item”
property“add-item” GladeWidgetAdaptor *
The current item to add to the project.
Flags: Read
“css-provider-path”
property “css-provider-path” gchar *
Path to use as the custom CSS provider for this project.
Flags: Read / Write
Default value: NULL
“has-selection”
property “has-selection” gboolean
Whether project has a selection.
Flags: Read
Default value: FALSE
“license”
property “license” gchar *
License for this project, it will be added as a document level comment.
Flags: Read / Write
Default value: NULL
“modified”
property “modified” gboolean
Whether project has been modified since it was last saved.
Flags: Read
Default value: FALSE
“path”
property “path” gchar *
The filesystem path of the project.
Flags: Read
Default value: NULL
“pointer-mode”
property “pointer-mode” GladePointerMode
The currently effective GladePointerMode.
Flags: Read
Default value: GLADE_POINTER_SELECT
“read-only”
property “read-only” gboolean
Whether project is read-only.
Flags: Read
Default value: FALSE
“resource-path”
property “resource-path” gchar *
Path to load images and resources in Glade's runtime.
Flags: Read / Write
Default value: NULL
“template”
property“template” GladeWidget *
The project's template widget, if any.
Flags: Read / Write
“add-widget”
signalvoid user_function (GladeProject *gladeproject, GladeWidget *arg1, gpointer user_data)
Emitted when a widget is added to a project.
gladeproject |
the GladeProject which received the signal. |
|
arg1 |
the GladeWidget that was added to |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“changed”
signalvoid user_function (GladeProject *gladeproject, GladeCommand *arg1, gboolean arg2, gpointer user_data)
Emitted when a gladeproject
's state changes via a GladeCommand.
gladeproject |
the GladeProject which received the signal. |
|
arg1 |
the GladeCommand that was executed |
|
arg2 |
whether the command was executed or undone. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“close”
signalvoid user_function (GladeProject *gladeproject, gpointer user_data)
Emitted when a project is closing (a good time to clean up any associated resources).
gladeproject |
the GladeProject which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“load-progress”
signalvoid user_function (GladeProject *gladeproject, gint objects_total, gint objects_loaded, gpointer user_data)
Emitted while project
is loading.
gladeproject |
the GladeProject which received the signal. |
|
objects_total |
the total amount of objects to load |
|
objects_loaded |
the current amount of loaded objects |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“parse-began”
signalvoid user_function (GladeProject *gladeproject, gpointer user_data)
Emitted when gladeproject
parsing starts.
gladeproject |
the GladeProject which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“parse-finished”
signalvoid user_function (GladeProject *gladeproject, gpointer user_data)
Emitted when gladeproject
parsing has finished.
gladeproject |
the GladeProject which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“remove-widget”
signalvoid user_function (GladeProject *gladeproject, GladeWidget *arg1, gpointer user_data)
Emitted when a widget is removed from a project.
gladeproject |
the GladeProject which received the signal. |
|
arg1 |
the GladeWidget that was removed from |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“selection-changed”
signalvoid user_function (GladeProject *gladeproject, gpointer user_data)
Emitted when gladeproject
selection list changes.
gladeproject |
the GladeProject which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“targets-changed”
signalvoid user_function (GladeProject *gladeproject, gpointer user_data)
Emitted when gladeproject
target versions change.
gladeproject |
the GladeProject which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“widget-name-changed”
signalvoid user_function (GladeProject *gladeproject, GladeWidget *arg1, gpointer user_data)
Emitted when gwidget
's name changes.
gladeproject |
the GladeProject which received the signal. |
|
arg1 |
the GladeWidget who's name changed. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“widget-visibility-changed”
signalvoid user_function (GladeProject *gladeproject, GladeWidget *widget, gboolean visible, gpointer user_data)
Emitted when the visivility of a widget changed
gladeproject |
the GladeProject which received the signal. |
|
widget |
the widget that its visibity changed |
|
visible |
the current visiblity of the widget |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First