BaseContext Undo & Redo Methods
[BaseContext Related Documentations]


Detailed Description

BaseContext provides an automatic management for all editable object members in the context. Active it with BaseContext::SetMaximumNumberOfUndoableEvents(). Note: its is currently beta, because re-creation of destroyed objects or list elements by undo is not managed at the moment, So any deletion on a list will flush the undo stack.


Functions

virtual bool BaseContext::CanUndo ()
 test if an Undo() is currently possible. Useful to enable or disable an Undo Function in an interface.
virtual bool BaseContext::Undo ()
 Undo the last modification done on any object of the base, using a private "action history stack".
virtual bool BaseContext::CanRedo ()
 test if an Redo() is currently possible. Useful to enable or disable a Redo Function in an interface.
virtual bool BaseContext::Redo ()
 Redo the last undo on any object of the base, using a private "action history stack".
void BaseContext::FlushUndoStack ()
 Flush the Undo Stack: no undo or redo possible until next modification. Some edition events (object destruction) on the context need to completely erase the Undo stack, because the event stack coherence is broken.
void BaseContext::SetMaximumNumberOfUndoableEvents (unsigned int _maxNumber)
 The undo stack history can be less or more large. Default max is 0: no undo management.


Function Documentation

virtual bool CanRedo  )  [virtual, inherited]
 

test if an Redo() is currently possible. Useful to enable or disable a Redo Function in an interface.

Returns:
true if it is.

virtual bool CanUndo  )  [virtual, inherited]
 

test if an Undo() is currently possible. Useful to enable or disable an Undo Function in an interface.

Returns:
true if it is.

void FlushUndoStack  )  [inherited]
 

Flush the Undo Stack: no undo or redo possible until next modification. Some edition events (object destruction) on the context need to completely erase the Undo stack, because the event stack coherence is broken.

virtual bool Redo  )  [virtual, inherited]
 

Redo the last undo on any object of the base, using a private "action history stack".

Returns:
true if the last undo was "redone", false if no more redo available.

void SetMaximumNumberOfUndoableEvents unsigned int  _maxNumber  )  [inherited]
 

The undo stack history can be less or more large. Default max is 0: no undo management.

Parameters:
_maxnumber maximum number of undoable event.

virtual bool Undo  )  [virtual, inherited]
 

Undo the last modification done on any object of the base, using a private "action history stack".

Returns:
true if the undo was "undone", false if no more undo available.


      /\/\        4         N         k         !         N         D
                      _______  _ __ ___  _____            ___ _ _  ____
     ___________  __//___   /________  |/    / ___________\_______/    \
    /   _   _   \/   _     /    _   /      _/_/____/    _       __     /
   /    /   /       /     /    /    \      \/     /    /    \   \     /
  \\___/___/___/    ¯    _____/_____/       ______\___/_____/\________\\
               \________/_ ___ __ l____\      /elD!  
                 http://www.m4nkind.com \____/