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::InsertAction Struct Referencefinal
Inheritance diagram for juce::CodeDocument::InsertAction:
juce::UndoableAction

Public Member Functions

 InsertAction (CodeDocument &doc, const String &t, const int pos) 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 String text
 
const int insertPos
 

Additional Inherited Members

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

Detailed Description

Definition at line 882 of file juce_CodeDocument.cpp.

Constructor & Destructor Documentation

◆ InsertAction()

juce::CodeDocument::InsertAction::InsertAction ( CodeDocument doc,
const String t,
const int  pos 
)
noexcept

Definition at line 884 of file juce_CodeDocument.cpp.

Member Function Documentation

◆ getSizeInUnits()

int juce::CodeDocument::InsertAction::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 903 of file juce_CodeDocument.cpp.

◆ perform()

bool juce::CodeDocument::InsertAction::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 889 of file juce_CodeDocument.cpp.

◆ undo()

bool juce::CodeDocument::InsertAction::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 896 of file juce_CodeDocument.cpp.

Member Data Documentation

◆ insertPos

const int juce::CodeDocument::InsertAction::insertPos

Definition at line 907 of file juce_CodeDocument.cpp.

◆ owner

CodeDocument& juce::CodeDocument::InsertAction::owner

Definition at line 905 of file juce_CodeDocument.cpp.

◆ text

const String juce::CodeDocument::InsertAction::text

Definition at line 906 of file juce_CodeDocument.cpp.


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