Class
PapersViewUndoContext
Description [src]
final class PapersView.UndoContext : GObject.Object
{
/* No available fields */
}
This context singleton manages two stacks of PpsUndoAction
that contain actions that may be undone or redone.
These actions may be added by a number of objects that implement PpsUndoHandler (e.g. the annotations context). Each handler provides a pointer to an opaque structure that contains data to undo the action.
The switch between the undo/redo stacks is done transparently: actions are added
to the redo stack if and only if another action is being undone (i.e.
pps_undo_context_undo
is being called).
Instance methods
pps_undo_context_add_action
This method adds a new action to the undo (or redo if it is used while
undoing) stack. If it is undone in the future, pps_undo_handler_undo
will be called on handler
with data
.
pps_undo_context_undo
This pops the last action on the undo stack and undoes it by calling the
undo interface method of the PpsUndoHandler
associated to the action.
While undoing, the PpsUndoHandler
should add a new action with
pps_undo_context_add_action
to redo what has just been undone, it will be
added to the redo stack by the undo context.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.