![]() | ![]() | ![]() | Gwyddion Application Library Reference Manual | ![]() |
---|
undo — Undo and redo.
gulong gwy_app_undo_checkpoint (GwyContainer *data, ...); gulong gwy_app_undo_checkpointv (GwyContainer *data, gsize n, const gchar **keys); void gwy_app_undo_undo (void); void gwy_app_undo_undo_window (GwyDataWindow *data_window); void gwy_app_undo_redo (void); void gwy_app_undo_redo_window (GwyDataWindow *data_window); gboolean gwy_app_data_window_has_undo (GwyDataWindow *data_window); gboolean gwy_app_data_window_has_redo (GwyDataWindow *data_window); void gwy_app_undo_clear (GwyDataWindow *data_window);
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.
XXX: It can only save the state of standard datafields.
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, gsize n, const gchar **keys);
Create a point in the undo history is is possible to return to.
XXX: It can only save the state of standard datafields.
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_window (GwyDataWindow *data_window);
Performs undo for the data window data_window.
data_window: | A data window (with undo available). |
Since 1.2.
void gwy_app_undo_redo_window (GwyDataWindow *data_window);
Performs redo for the data window data_window.
data_window: | A data window (with redo available). |
Since 1.2.
gboolean gwy_app_data_window_has_undo (GwyDataWindow *data_window);
Returns wheter there is any undo available for data_window.
data_window: | A data window. |
Returns : | TRUE if there is undo, FALSE otherwise. |
gboolean gwy_app_data_window_has_redo (GwyDataWindow *data_window);
Returns wheter there is any redo available for data_window.
data_window: | A data window. |
Returns : | TRUE if there is redo, FALSE otherwise. |
void gwy_app_undo_clear (GwyDataWindow *data_window);
Removes all undo and redo information for a data window.
data_window: | A data window. |
<< menu-windowlist | unitool >> |