Top |
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.
a new GladeProject for the opened project on success,
NULL
on failure.
[transfer full][nullable]
gboolean glade_project_save (GladeProject *project
,const gchar *path
,GError **error
);
Saves project
to the given path.
void
glade_project_undo (GladeProject *project
);
Undoes a GladeCommand in this project.
void
glade_project_redo (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 receive 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()
.
project |
||
object |
a GObject in |
|
emit_signal |
whether or not to emit a signal indicating a selection change |
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()
.
project |
||
object |
a GObject in |
|
emit_signal |
whether or not to emit a signal indicating a selection change |
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()
.
project |
||
object |
a GObject in |
|
emit_signal |
whether or not to emit a signal indicating a selection change |
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 transforms 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.
gboolean glade_project_autosave (GladeProject *project
,GError **error
);
Saves an autosave snapshot of project
to it's currently set path
If the project was never saved, nothing is done and TRUE
is returned.
gboolean glade_project_available_widget_name (GladeProject *project
,GladeWidget *widget
,const gchar *name
);
Checks whether name
is an appropriate name for widget
.
project |
||
widget |
the GladeWidget intended to receive a new name |
|
name |
base name of the widget to create |
gboolean glade_project_backup (GladeProject *project
,const gchar *path
,GError **error
);
Backup the last file which project
has saved to
or was loaded from.
If path
is not the same as the current project
path, then the current project path will be
backed up under the new location.
If this the first save, and no persisted file
exists, then TRUE
is returned and no backup is made.
void glade_project_check_reordered (GladeProject *project
,GladeWidget *parent
,GList *old_order
);
project |
||
parent |
the parent GladeWidget |
|
old_order |
the old order to compare with. |
[element-type GObject] |
void glade_project_command_paste (GladeProject *project
,GladePlaceholder *placeholder
);
gchar *
glade_project_display_dependencies (GladeProject *project
);
GladeWidgetAdaptor *
glade_project_get_add_item (GladeProject *project
);
const gchar *
glade_project_get_css_provider_path (GladeProject *project
);
GladePointerMode
glade_project_get_pointer_mode (GladeProject *project
);
const gchar *
glade_project_get_resource_path (GladeProject *project
);
void glade_project_get_target_version (GladeProject *project
,const gchar *catalog
,gint *major
,gint *minor
);
Fetches the target version of the project
for catalog
.
const gchar *
glade_project_get_translation_domain (GladeProject *project
);
void glade_project_preview (GladeProject *project
,GladeWidget *gwidget
);
Creates and displays a preview window holding a snapshot of gwidget
's
toplevel window in project
. Note that the preview window is only a snapshot
of the current state of the project, there is no limit on how many preview
snapshots can be taken.
void
glade_project_properties (GladeProject *project
);
Runs a document properties dialog for project
.
void
glade_project_queue_selection_changed (GladeProject *project
);
GList *
glade_project_required_libs (GladeProject *project
);
a GList of allocated strings which are the names of the required catalogs for this project.
[transfer full][element-type utf8]
gboolean glade_project_save_verify (GladeProject *project
,const gchar *path
,GladeVerifyFlags flags
,GError **error
);
Saves project
to the given path.
project |
||
path |
location to save glade file |
|
flags |
the GladeVerifyFlags to warn about |
|
error |
an error from the |
void glade_project_set_add_item (GladeProject *project
,GladeWidgetAdaptor *adaptor
);
void glade_project_set_css_provider_path (GladeProject *project
,const gchar *path
);
Set the custom CSS provider path to use in project
void glade_project_set_license (GladeProject *project
,const gchar *license
);
void glade_project_set_pointer_mode (GladeProject *project
,GladePointerMode mode
);
void glade_project_set_resource_path (GladeProject *project
,const gchar *path
);
void glade_project_set_target_version (GladeProject *project
,const gchar *catalog
,gint major
,gint minor
);
void glade_project_set_template (GladeProject *project
,GladeWidget *widget
);
void glade_project_set_translation_domain (GladeProject *project
,const gchar *domain
);
Set the project translation domain.
void glade_project_set_widget_name (GladeProject *project
,GladeWidget *widget
,const gchar *name
);
Sets name
on widget
in project
, if name
is not
available then a new name will be used.
gboolean glade_project_verify (GladeProject *project
,gboolean saving
,GladeVerifyFlags flags
);
void glade_project_verify_signal (GladeWidget *widget
,GladeSignal *signal
);
gchar * glade_project_verify_widget_adaptor (GladeProject *project
,GladeWidgetAdaptor *adaptor
,GladeSupportMask *mask
);
Checks the supported state of this widget adaptor and generates a string to show in the UI describing why.
project |
||
adaptor |
the GladeWidgetAdaptor to verify |
|
mask |
a return location for a GladeSupportMask |
void glade_project_widget_changed (GladeProject *project
,GladeWidget *gwidget
);
void glade_project_widget_visibility_changed (GladeProject *project
,GladeWidget *widget
,gboolean visible
);
Emits GladeProject::widget-visibility-changed signal
project |
The GladeProject. |
|
widget |
The widget which visibility changed |
|
visible |
widget visibility value |
The tree view columns provided by the GtkTreeModel implemented by GladeProject
Indicates what the pointer is used for in the workspace.