### Method

# PapersView UndoContext add_action

#### Declaration [src]

    void
    pps_undo_context_add_action (
      PpsUndoContext* context,
      PpsUndoHandler* handler,
      gpointer data
    )

#### Description [src]

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`.

#### Parameters

`handler`

  Type: `PpsUndoHandler`

  An object implementing `PpsUndoHandler`.

  The data is owned by the caller of the method.

`data`

  Type: `gpointer`

  A pointer to a struct that `handler` will use to undo an action.

  The argument can be `NULL`.
  The data is owned by the caller of the method.