JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
juce::CodeDocument::DeleteAction Struct Referencefinal
Inheritance diagram for juce::CodeDocument::DeleteAction:
juce::UndoableAction

Public Member Functions

 DeleteAction (CodeDocument &doc, int start, int end) noexcept
 
bool perform () override
 Overridden by a subclass to perform the action.
 
bool undo () override
 Overridden by a subclass to undo the action.
 
int getSizeInUnits () override
 Returns a value to indicate how much memory this object takes up.
 
- Public Member Functions inherited from juce::UndoableAction
virtual ~UndoableAction ()=default
 Destructor.
 
virtual UndoableActioncreateCoalescedAction (UndoableAction *nextAction)
 Allows multiple actions to be coalesced into a single action object, to reduce storage space.
 

Public Attributes

CodeDocumentowner
 
const int startPos
 
const int endPos
 
const String removedText
 

Additional Inherited Members

- Protected Member Functions inherited from juce::UndoableAction
 UndoableAction ()=default
 Creates an action.
 

Detailed Description

Definition at line 970 of file juce_CodeDocument.cpp.

Constructor & Destructor Documentation

◆ DeleteAction()

juce::CodeDocument::DeleteAction::DeleteAction ( CodeDocument doc,
int  start,
int  end 
)
noexcept

Definition at line 972 of file juce_CodeDocument.cpp.

Member Function Documentation

◆ getSizeInUnits()

int juce::CodeDocument::DeleteAction::getSizeInUnits ( )
overridevirtual

Returns a value to indicate how much memory this object takes up.

Because the UndoManager keeps a list of UndoableActions, this is used to work out how much space each one will take up, so that the UndoManager can work out how many to keep.

The default value returned here is 10 - units are arbitrary and don't have to be accurate.

See also
UndoManager::getNumberOfUnitsTakenUpByStoredCommands, UndoManager::setMaxNumberOfStoredUnits

Reimplemented from juce::UndoableAction.

Definition at line 993 of file juce_CodeDocument.cpp.

◆ perform()

bool juce::CodeDocument::DeleteAction::perform ( )
overridevirtual

Overridden by a subclass to perform the action.

This method is called by the UndoManager, and shouldn't be used directly by applications.

Be careful not to make any calls in a perform() method that could call recursively back into the UndoManager::perform() method

Returns
true if the action could be performed.
See also
UndoManager::perform

Implements juce::UndoableAction.

Definition at line 979 of file juce_CodeDocument.cpp.

◆ undo()

bool juce::CodeDocument::DeleteAction::undo ( )
overridevirtual

Overridden by a subclass to undo the action.

This method is called by the UndoManager, and shouldn't be used directly by applications.

Be careful not to make any calls in an undo() method that could call recursively back into the UndoManager::perform() method

Returns
true if the action could be undone without any errors.
See also
UndoManager::perform

Implements juce::UndoableAction.

Definition at line 986 of file juce_CodeDocument.cpp.

Member Data Documentation

◆ endPos

const int juce::CodeDocument::DeleteAction::endPos

Definition at line 996 of file juce_CodeDocument.cpp.

◆ owner

CodeDocument& juce::CodeDocument::DeleteAction::owner

Definition at line 995 of file juce_CodeDocument.cpp.

◆ removedText

const String juce::CodeDocument::DeleteAction::removedText

Definition at line 997 of file juce_CodeDocument.cpp.

◆ startPos

const int juce::CodeDocument::DeleteAction::startPos

Definition at line 996 of file juce_CodeDocument.cpp.


The documentation for this struct was generated from the following file: