1Prima::Widget::UndoActiUosnesr(3C)ontributed Perl DocumePnrtiamtai:o:nWidget::UndoActions(3)
2
3
4

NAME

6       Prima::Widget::UndoActions - undo and redo the content of editable
7       widgets
8

DESCRIPTION

10       Generic helpers that implement stored actions for undo/redo.
11

SYNOPSIS

Properties

14       undoLimit INTEGER
15           Sets limit on number of stored atomic undo operations. If 0, undo
16           is disabled.
17
18   Methods
19       begin_undo_group
20           Opens bracket for group of actions, undone as single operation.
21           The bracket is closed by calling "end_undo_group".
22
23       can_undo, can_redo
24           Return boolean flags whether undo or redo could be done.  Useful
25           for graying a menu f ex.
26
27       end_undo_group
28           Closes bracket for group of actions, opened by "begin_undo_group".
29
30       init_undo
31           Should be called once, inside init()
32
33       has_undo_action ACTION
34           Checks whether there is any ACTION in the undo list.
35
36       push_grouped_undo_action ACTION, @PARAMS
37           Stores a single undo action where ACTION is a method to be called
38           inside undo/redo, if any.  Each action is added to the last undo
39           group, and will be removed/replayed together with the other actions
40           in the group.
41
42       push_undo_action ACTION, @PARAMS
43           Stores a single undo action where ACTION is a method to be called
44           inside undo/redo, if any.  Each action is a single undo/redo
45           operation.
46
47       redo
48           Re-applies changes, formerly rolled back by "undo".
49
50       undo
51           Rolls back changes into internal array, which size cannot extend
52           "undoLimit" value. In case "undoLimit" is 0, no undo actions can be
53           made.
54

AUTHOR

56       Dmitry Karasik, <dmitry@karasik.eu.org>.
57

SEE ALSO

59       Prima, Prima::Edit,
60
61
62
63perl v5.38.0                      2023-07-21     Prima::Widget::UndoActions(3)
Impressum