Top | ![]() |
![]() |
![]() |
![]() |
gulong | gwy_app_undo_checkpoint () |
gulong | gwy_app_undo_qcheckpoint () |
gulong | gwy_app_undo_checkpointv () |
gulong | gwy_app_undo_qcheckpointv () |
void | gwy_app_undo_undo_container () |
void | gwy_app_undo_redo_container () |
void | gwy_app_undo_container_remove () |
gulong | gwy_undo_checkpoint () |
gulong | gwy_undo_qcheckpoint () |
gulong | gwy_undo_checkpointv () |
gulong | gwy_undo_qcheckpointv () |
void | gwy_undo_undo_container () |
void | gwy_undo_redo_container () |
gboolean | gwy_undo_container_has_undo () |
gboolean | gwy_undo_container_has_redo () |
gint | gwy_undo_container_get_modified () |
void | gwy_undo_container_set_unmodified () |
void | gwy_undo_container_remove () |
gboolean | gwy_undo_get_enabled () |
void | gwy_undo_set_enabled () |
For a module developer, the only two useful undo/redo functions are probably gwy_app_undo_checkpoint()
and
gwy_app_undo_checkpointv()
creating a checkpoint in the undo history to which is possible to return to later. You
should use these functions before commiting changes to data.
The other functions actually perform undo or redo, and has little use outside main application, unless it wishes to implement its local undo.
There are two types of functions app-level and container-level. App-level functions (have `app' in their names) should be generally used only by the main application as they update menus and toolboxes according to undo and redo state. Container-level functions only perform the actual undo or redo and can be used for local undo implementation.
Undo information for a GwyContainer is automatically destroyed when the container is finalized.
gulong gwy_app_undo_checkpoint (GwyContainer *data
,...
);
Create a point in the undo history it is possible to return to.
In addition to what gwy_undo_checkpoint()
does, this function takes care of updating application controls state.
gulong gwy_app_undo_qcheckpoint (GwyContainer *data
,...
);
Create a point in the undo history it is possible to return to.
In addition to what gwy_undo_checkpoint()
does, this function takes care of updating application controls state.
gulong gwy_app_undo_checkpointv (GwyContainer *data
,guint n
,const gchar **keys
);
Create a point in the undo history it is possible to return to.
In addition to what gwy_undo_checkpointv()
does, this function takes care of updating application controls state.
gulong gwy_app_undo_qcheckpointv (GwyContainer *data
,guint n
,const GQuark *keys
);
Create a point in the undo history it is possible to return to.
In addition to what gwy_undo_checkpointv()
does, this function takes care of updating application controls state.
void
gwy_app_undo_undo_container (GwyContainer *data
);
Performs undo on a data container.
It must have undo available.
In addition to what gwy_undo_undo_container()
does, this function takes care
of updating application controls state.
void
gwy_app_undo_redo_container (GwyContainer *data
);
Performs undo on a data container.
It must have redo available.
In addition to what gwy_undo_redo_container()
does, this function takes care
of updating application controls state.
void gwy_app_undo_container_remove (GwyContainer *data
,const gchar *prefix
);
Removes undo/redo information for a data container.
In addition to what gwy_undo_container_remove()
does, this function takes
care of updating application controls state.
gulong gwy_undo_checkpoint (GwyContainer *data
,...
);
Create a point in the undo history it is possible to return to.
gulong gwy_undo_qcheckpoint (GwyContainer *data
,...
);
Create a point in the undo history it is possible to return to.
gulong gwy_undo_checkpointv (GwyContainer *data
,guint n
,const gchar **keys
);
Create a point in the undo history it is possible to return to.
gulong gwy_undo_qcheckpointv (GwyContainer *data
,guint n
,const GQuark *keys
);
Create a point in the undo history it is possible to return to.
void
gwy_undo_undo_container (GwyContainer *data
);
Performs undo on a data container.
It must have undo available.
void
gwy_undo_redo_container (GwyContainer *data
);
Performs undo on a data container.
It must have redo available.
gboolean
gwy_undo_container_has_undo (GwyContainer *data
);
Returns whether there is any undo available for a container.
gboolean
gwy_undo_container_has_redo (GwyContainer *data
);
Returns whether there is any redo available for a container.
gint
gwy_undo_container_get_modified (GwyContainer *data
);
Tests whether a container was modified.
FIXME: it may not work.
void
gwy_undo_container_set_unmodified (GwyContainer *data
);
Marks a data container as umodified (that is, saved).
void gwy_undo_container_remove (GwyContainer *data
,const gchar *prefix
);
Removes undo/redo information for a data container.
gboolean
gwy_undo_get_enabled (void
);
Reports whether undo/redo is globally enabled.
void
gwy_undo_set_enabled (gboolean setting
);
Globally enables or disables undo/redo.
By default, undo/redo is enabled. Non-GUI applications that run module functions may wish to disable it to conserve resources.
If undo/redo is disabled undo information manipulating functions such as gwy_app_undo_qcheckpoint()
become no-op
and gwy_undo_container_get_modified()
always returns zero. Disabling undo also removes saved undo data of all
containers.