![]() |
![]() |
Gwyddion Application Library Reference Manual | ![]() |
---|
undoundo — Undo and redo. |
gulong gwy_app_undo_checkpoint (GwyContainer *data, ...); gulong gwy_app_undo_checkpointv (GwyContainer *data, guint n, const gchar **keys); void gwy_app_undo_undo_container (GwyContainer *data); void gwy_app_undo_redo_container (GwyContainer *data); gulong gwy_undo_checkpoint (GwyContainer *data, ...); gulong gwy_undo_checkpointv (GwyContainer *data, guint n, const gchar **keys); void gwy_undo_undo_container (GwyContainer *data); void gwy_undo_redo_container (GwyContainer *data); gboolean gwy_undo_container_has_undo (GwyContainer *data); gboolean gwy_undo_container_has_redo (GwyContainer *data); gint gwy_undo_container_get_modified (GwyContainer *data); void gwy_undo_container_set_unmodified (GwyContainer *data);
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.
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.
data : | A data container. |
... : | NULL-terminated list of container item names to save. |
Returns : | Undo level id. Not useful (yet). |
gulong gwy_app_undo_checkpointv (GwyContainer *data, guint n, const gchar **keys);
Create a point in the undo history is is possible to return to.
In addition to what gwy_undo_checkpointv() does, this function takes care of updating application controls state.
data : | A data container. |
n : | The number of strings in keys. |
keys : | An array of container keys to save data. |
Returns : | Undo level id. Not useful (yet). |
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.
data : | A data container. |
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.
data : | A data container. |
gulong gwy_undo_checkpoint (GwyContainer *data, ...);
Create a point in the undo history it is possible to return to.
data : | A data container. |
... : | NULL-terminated list of container item names to save. |
Returns : | Undo level id. Not useful (yet). |
gulong gwy_undo_checkpointv (GwyContainer *data, guint n, const gchar **keys);
Create a point in the undo history is is possible to return to.
data : | A data container. |
n : | The number of strings in keys. |
keys : | An array of container keys to save data. |
Returns : | Undo level id. Not useful (yet). |
void gwy_undo_undo_container (GwyContainer *data);
Performs undo on a data container.
It must have undo available.
data : | A data container. |
void gwy_undo_redo_container (GwyContainer *data);
Performs undo on a data container.
It must have redo available.
data : | A data container. |
gboolean gwy_undo_container_has_undo (GwyContainer *data);
Returns whether there is any undo available for a container.
data : | Data container to get undo infomation of. |
Returns : | TRUE if there is undo, FALSE otherwise. |
gboolean gwy_undo_container_has_redo (GwyContainer *data);
Returns whether there is any redo available for a container.
data : | Data container to get redo infomation of. |
Returns : | TRUE if there is redo, FALSE otherwise. |
gint gwy_undo_container_get_modified (GwyContainer *data);
Tests whether a container was modified.
FIXME: it may not work.
data : | Data container to get modification infomation of. |
Returns : | TRUE if container was modified, FALSE otherwise. |
void gwy_undo_container_set_unmodified (GwyContainer *data);
Marks a data container as umodified (that is, saved).
data : | Data container to set modification infomation of. |
<< menu-windowlist | unitool >> |