nsISupports
Last changed in Gecko 1.7 void AddListener(in nsITransactionListener aListener); |
void beginBatch(); |
void clear(); |
void doTransaction(in nsITransaction aTransaction); |
void endBatch(); |
nsITransactionList getRedoList(); |
nsITransactionList getUndoList(); |
nsITransaction peekRedoStack(); |
nsITransaction peekUndoStack(); |
void redoTransaction(); |
void RemoveListener(in nsITransactionListener aListener); |
void undoTransaction(); |
Attribute | Type | Description |
maxTransactionCount | long | Sets the maximum number of transaction items the transaction manager will maintain at any time. This is commonly referred to as the number of levels of undo. A value of -1 means no limit. A value of zero means the transaction manager will execute each transaction, then immediately release all references it has to the transaction without pushing it on the undo stack. A value greater than zero indicates the max number of transactions that can exist at any time on both the undo and redo stacks. This method will prune the necessary number of transactions on the undo and redo stacks if the value specified is less than the number of items that exist on both the undo and redo stacks. |
numberOfRedoItems | long | The number of items on the redo stack. Read only. |
numberOfUndoItems | long | The number of items on the undo stack. Read only. |
Adds a listener to the transaction manager's notification list. Listeners are notified whenever a transaction is done, undone, or redone. The listener's nsITransactionListener.AddRef()
method is called.
void AddListener( in nsITransactionListener aListener );
aListener
nsITransactionListener
to add.Turns on the transaction manager's batch mode, forcing all transactions executed by the transaction manager's doTransaction()
method to be aggregated together until EndBatch()
is called. This mode allows an application to execute and group together several independent transactions so they can be undone with a single call to undoTransaction()
.
void beginBatch();
None.
Clears the undo and redo stacks.
void clear();
None.
Calls a transaction's nsITransaction.doTransaction()
method, then pushes it on the undo stack. This method calls the transaction's nsITransaction.AddRef()
method. The transaction's nsITransaction.Release()
method will be called when the undo or redo stack is pruned or when the transaction manager is destroyed.
void doTransaction( in nsITransaction aTransaction );
aTransaction
nsITransaction
to do.Turns off the transaction manager's batch mode.
void endBatch();
None.
Returns the list of nsITransaction
on the redo stack. Note that the transaction at the top of the redo stack will actually be at the index n-1
in the list, where n
is the number of items in the list.
nsITransactionList getRedoList();
None.
A list of nsITransaction
on the redo stack.
Returns the list of nsITransaction
on the undo stack. Note that the transaction at the top of the undo stack will actually be at the index n-1
in the list, where n
is the number of items in the list.
nsITransactionList getUndoList();
None.
A list of nsITransaction
on the undo stack.
Returns an AddRef'd pointer to the nsITransaction
at the top of the redo stack. Callers should be aware that this method could return a null
in some implementations if there is a batch at the top of the redo stack.
nsITransaction peekRedoStack();
None.
An AddRef'd pointer to the nsITransaction
at the top of the redo stack.
Returns an AddRef'd pointer to the nsITransaction
at the top of the undo stack. Callers should be aware that this method could return a null
in some implementations if there is a batch at the top of the undo stack.
nsITransaction peekUndoStack();
None.
An AddRef'd pointer to the nsITransaction
at the top of the undo stack.
Pops the topmost transaction on the redo stack, calls it's nsITransaction.redoTransaction()
method, then pushes it on the undo stack.
void redoTransaction();
None.
Removes a listener from the transaction manager's notification list. The listener's nsITransactionListener.Release()
method is called.
void RemoveListener( in nsITransactionListener aListener );
aListener
nsITransactionListener
to remove.Pops the topmost transaction on the undo stack, calls it's nsITransaction.undoTransaction()
method, then pushes it on the redo stack.
void undoTransaction();
None.