DAZ Script | |
---|---|
void | accept ( String caption ) |
void | beginHold () |
void | cancel () |
Boolean | canPushItems () |
Boolean | canRedo () |
Boolean | canUndo () |
void | clearAll () |
void | drop () |
String | getCaption ( Number offset=0 ) |
Number | getCurrentIndex () |
Number | getNumItems () |
Number | getNumRedoItems () |
Number | getNumUndoItems () |
String | getRedoCaption () |
String | getUndoCaption () |
Boolean | hasItems () |
Boolean | isInUndoRedo () |
void | lock () |
Boolean | redo () |
Boolean | undo () |
void | unlock () |
void | redoAvailable ( Boolean yesNo ) |
void | redoCaptionChanged ( String caption ) |
void | undoAvailable ( Boolean yesNo ) |
void | undoCaptionChanged ( String caption ) |
There is only one undo stack in the application, which is created and owned by DzApp. This object is directly available using the Global::UndoStack variable.
void : accept( String caption )
It is recommended that you use Global::acceptUndo() instead of calling this function directly to avoid leaving the undo stack open.
Finishes the hold and pushes the undo list onto the stack. If the stack is already at maximum depth, it pushes the oldest item off of the list.
Parameter(s):
void : beginHold()
It is recommended that you use Global::beginUndo() instead of calling this function directly to avoid leaving the undo stack open.
Begins a hold, collecting all undo items into one undo entry. Every call to begin hold must be matched by a call to accept() or cancel().
void : cancel()
It is recommended that you use Global::cancelUndo() instead of calling this function directly to avoid leaving the undo stack open.
Finishes the hold but immediately calls undo to restore the state of the list to what it was before the matching beginHold() call.
Boolean : canPushItems()
Return Value:
true
if undo items can be pushed onto the stack, otherwise false
.Return Value:
Return Value:
void : clearAll()
Clears the undo stack. This must be called at least whenever the list changes.
See Also:
void : drop()
It is recommended that you use Global::dropUndo() instead of calling this function directly to avoid leaving the undo stack open.
Accepts the actions performed and closes the undo stack hold without adding the items to the undo stack - the memory associated with the items is freed.
String : getCaption( Number offset=0 )
Parameter(s):
Return Value:
offset
is within the [0, getNumItems() - 1] range, the caption assigned to the item at the index, otherwise an empty string.Since:
Return Value:
Attention:
Since:
Number : getNumItems()
Return Value:
Return Value:
Return Value:
String : getRedoCaption()
Return Value:
String : getUndoCaption()
Return Value:
Return Value:
true
if there are items on the undo stack, otherwise false
.Boolean : isInUndoRedo()
Return Value:
true
if the undo stack is currently engaged in an undo/redo operation. This is useful for items that need to perform certain operations if the undo stack is not the one effecting data changes.void : lock()
Disables items from being pushed onto the stack. This will be toggled by items to prevent undo operations from creating new undo items during an undo. Every call to lock() must be matched by a call to unlock().
Calls redo on the item at the top of the stack, then moves the pointer to the next item in the stack.
Return Value:
true
on success, false
on error or if the stack is empty.Calls undo on the item at the top of the stack, then moves the pointer to the previous item in the stack.
Return Value:
true
if successful, false
on error or if the stack is empty.void : unlock()
Enables items to be pushed onto the stack after a lock() call.
void : redoAvailable( Boolean yesNo )
Signature:“redoAvailable(bool)”
Emitted when the availability of the redo stack changes.
void : redoCaptionChanged( String caption )
Signature:“redoCaptionChanged(const QString&)”
Emitted when the caption of the redo stack changes.
void : undoAvailable( Boolean yesNo )
Signature:“undoAvailable(bool)”
Emitted when the availability of the undo stack changes.
void : undoCaptionChanged( String caption )
Signature:“undoCaptionChanged(const QString&)”
Emitted when the caption of the undo stack changes.