Glade User Interface Designer Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
GCSetPropData; GladeCommand; void glade_command_push_group (const gchar *fmt
,...
); void glade_command_pop_group (void
); gboolean glade_command_execute (GladeCommand *command
); gboolean glade_command_undo (GladeCommand *command
); gboolean glade_command_unifies (GladeCommand *command
,GladeCommand *other
); void glade_command_collapse (GladeCommand *command
,GladeCommand *other
); void glade_command_set_property (GladeProperty *property
,...
); void glade_command_set_property_value (GladeProperty *property
,const GValue *value
); void glade_command_set_properties (GladeProperty *property
,const GValue *old_value
,const GValue *new_value
,...
); void glade_command_set_properties_list (GladeProject *project
,GList *props
); void glade_command_set_name (GladeWidget *glade_widget
,const gchar *name
); void glade_command_delete (GList *widgets
); GladeWidget * glade_command_create (GladeWidgetAdaptor *adaptor
,GladeWidget *parent
,GladePlaceholder *placeholder
,GladeProject *project
); void glade_command_cut (GList *widgets
); void glade_command_copy (GList *widgets
); void glade_command_paste (GList *widgets
,GladeWidget *parent
,GladePlaceholder *placeholder
); void glade_command_dnd (GList *widgets
,GladeWidget *parent
,GladePlaceholder *placeholder
); void glade_command_add_signal (GladeWidget *glade_widget
,const GladeSignal *signal
); void glade_command_remove_signal (GladeWidget *glade_widget
,const GladeSignal *signal
); void glade_command_change_signal (GladeWidget *glade_widget
,const GladeSignal *old_signal
,const GladeSignal *new_signal
); void glade_command_set_i18n (GladeProperty *property
,gboolean translatable
,gboolean has_context
,const gchar *context
,const gchar *comment
);
The Glade Command api allows us to view user actions as items and execute and undo those items; each GladeProject has its own Undo/Redo stack.
typedef struct { GladeProperty *property; GValue *new_value; GValue *old_value; } GCSetPropData;
GladeProperties can be set in a list as one command, for Undo purposes; we store the list of GCSetPropData with their old and new GValue.
GladeProperty * |
A GladeProperty to set |
The new GValue to assign to property
|
|
The old GValue of property
|
void glade_command_push_group (const gchar *fmt
,...
);
Marks the begining of a group.
|
The collective desctiption of the command group. only the description of the first group on the stack is used when embedding groups. |
|
args to the format string. |
gboolean glade_command_execute (GladeCommand *command
);
Executes command
|
A GladeCommand |
Returns : |
whether the command was successfully executed |
gboolean glade_command_undo (GladeCommand *command
);
Undo the effects of command
|
A GladeCommand |
Returns : |
whether the command was successfully reversed |
gboolean glade_command_unifies (GladeCommand *command
,GladeCommand *other
);
Checks whether command
and other
can be unified
to make one single command.
|
A GladeCommand |
|
another GladeCommand |
Returns : |
whether they can be unified. |
void glade_command_collapse (GladeCommand *command
,GladeCommand *other
);
Merges other
into command
, so that command
now
covers both commands and other
can be dispensed with.
|
A GladeCommand |
|
another GladeCommand |
void glade_command_set_property_value (GladeProperty *property
,const GValue *value
);
void glade_command_set_properties (GladeProperty *property
,const GValue *old_value
,const GValue *new_value
,...
);
void glade_command_set_properties_list (GladeProject *project
,GList *props
);
void glade_command_set_name (GladeWidget *glade_widget
,const gchar *name
);
void glade_command_delete (GList *widgets
);
Performs a delete command on the list of widgets.
|
a GList of GladeWidgets |
GladeWidget * glade_command_create (GladeWidgetAdaptor *adaptor
,GladeWidget *parent
,GladePlaceholder *placeholder
,GladeProject *project
);
Creates a new widget using adaptor
and put in place of the placeholder
in the project
|
A GladeWidgetAdaptor |
|
the parent GladeWidget to add the new widget to. |
|
the placeholder which will be substituted by the widget |
|
the project his widget belongs to. |
Returns : |
the newly created widget. |
void glade_command_cut (GList *widgets
);
Removes the list of widgets and adds them to the clipboard.
|
a GList of GladeWidgets |
void glade_command_copy (GList *widgets
);
Copies the list of widgets and adds them to the clipboard.
|
a GList of GladeWidgets |
void glade_command_paste (GList *widgets
,GladeWidget *parent
,GladePlaceholder *placeholder
);
Performs a paste command on all widgets in widgets
to parent
, possibly
replacing placeholder
(note toplevels dont need a parent; the active project
will be used when pasting toplevel objects).
|
a GList of GladeWidget |
|
a GladeWidget |
|
a GladePlaceholder |
void glade_command_dnd (GList *widgets
,GladeWidget *parent
,GladePlaceholder *placeholder
);
Performs a drag-n-drop command, i.e. removes the list of widgets and adds them
to the new parent, possibly replacing placeholder
(note toplevels dont need a
parent; the active project will be used when pasting toplevel objects).
|
a GList of GladeWidget |
|
a GladeWidget |
|
a GladePlaceholder |
void glade_command_add_signal (GladeWidget *glade_widget
,const GladeSignal *signal
);
TODO: write me
|
a GladeWidget |
|
a GladeSignal |
void glade_command_remove_signal (GladeWidget *glade_widget
,const GladeSignal *signal
);
TODO: write me
|
a GladeWidget |
|
a GladeSignal |
void glade_command_change_signal (GladeWidget *glade_widget
,const GladeSignal *old_signal
,const GladeSignal *new_signal
);
TODO: write me
|
a GladeWidget |
|
a GladeSignal |
|
a GladeSignal |
void glade_command_set_i18n (GladeProperty *property
,gboolean translatable
,gboolean has_context
,const gchar *context
,const gchar *comment
);
Sets the i18n data on the property.
|
a GladeProperty |
|
a gboolean |
|
a gboolean |
|
a const gchar * |
|
a const gchar * |