|
| Undo () |
|
virtual | ~Undo () |
|
int | addEvent (UndoEvent *event, const char *description=0) |
|
bool | canReDo () const |
|
bool | canUnDo () const |
|
int | currentEventID () const |
|
int | firstEventID () const |
|
BufferString | getDesc (int eventid) const |
|
int | getNextUserInteractionEnd (int start) const |
|
bool | isUserInteractionEnd (int eventid) const |
|
int | lastEventID () const |
|
int | maxLength () const |
|
bool | reDo (int nrtimes=1, bool userinteraction=true) |
|
BufferString | reDoDesc () const |
|
void | removeAll () |
|
void | removeAllAfterCurrentEvent () |
|
void | removeAllBeforeCurrentEvent () |
|
void | setDesc (int eventid, const char *d) |
|
void | setMaxLength (int) |
|
void | setUserInteractionEnd (int eventid, bool=true) |
|
bool | unDo (int nrtimes=1, bool userinteraction=true) |
|
BufferString | unDoDesc () const |
|
| CallBacker () |
|
| CallBacker (const CallBacker &) |
|
virtual | ~CallBacker () |
|
bool | attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const |
|
bool | attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const |
|
void | detachAllNotifiers () const |
| Call from the destructor of your inherited object. More...
|
|
void | detachCB (const NotifierAccess &, const CallBack &) const |
|
void | detachCB (const NotifierAccess *notif, const CallBack &cb) const |
|
virtual bool | isCapsule () const |
|
bool | isNotifierAttached (const NotifierAccess *) const |
| Only for debugging purposes, don't use. More...
|
|
void | stopReceivingNotifications () const |
|
virtual CallBacker * | trueCaller () |
|
Class to handle undo/redo information.
Events that can be undone/redone are added to the Undo. One user operation may involve thousands of changes added to the history, but the user does not want to press undo a thousand times.This is managed by setting a UserInteractionEnd flag on the last event in a chain that the user started. When doing undo, one undo step is consists of all events from the current event until the next event with the UserInteraction flag set.
This means that after all user-driven events, the UserInteractionEnd should be set:
{
doSomethingsThatAddThingsOnTheHistory();
}
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:184
int currentEventID() const
<>