| @@ -203,6 +203,14 @@ void UndoManager::setCurrentTransactionName (const String& newName) noexcept | |||||
| action->name = newName; | action->name = newName; | ||||
| } | } | ||||
| String UndoManager::getCurrentTransactionName() const noexcept | |||||
| { | |||||
| if (ActionSet* action = getCurrentSet()) | |||||
| return action->name; | |||||
| return newTransactionName; | |||||
| } | |||||
| //============================================================================== | //============================================================================== | ||||
| UndoManager::ActionSet* UndoManager::getCurrentSet() const noexcept { return transactions [nextIndex - 1]; } | UndoManager::ActionSet* UndoManager::getCurrentSet() const noexcept { return transactions [nextIndex - 1]; } | ||||
| UndoManager::ActionSet* UndoManager::getNextSet() const noexcept { return transactions [nextIndex]; } | UndoManager::ActionSet* UndoManager::getNextSet() const noexcept { return transactions [nextIndex]; } | ||||
| @@ -144,6 +144,11 @@ public: | |||||
| */ | */ | ||||
| void setCurrentTransactionName (const String& newName) noexcept; | void setCurrentTransactionName (const String& newName) noexcept; | ||||
| /** Returns the name of the current transaction. | |||||
| @see setCurrentTransactionName | |||||
| */ | |||||
| String getCurrentTransactionName() const noexcept; | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Returns true if there's at least one action in the list to undo. | /** Returns true if there's at least one action in the list to undo. | ||||
| @see getUndoDescription, undo, canRedo | @see getUndoDescription, undo, canRedo | ||||
| @@ -194,7 +194,7 @@ public: | |||||
| These constants can be used either via the Component::setColour(), or LookAndFeel::setColour() | These constants can be used either via the Component::setColour(), or LookAndFeel::setColour() | ||||
| methods. | methods. | ||||
| NB: You can also set the caret colour using CaretComponent::caretColourId | NB: You can also set the caret colour using CaretComponent::caretColourId | ||||
| @see Component::setColour, Component::findColour, LookAndFeel::setColour, LookAndFeel::findColour | @see Component::setColour, Component::findColour, LookAndFeel::setColour, LookAndFeel::findColour | ||||