JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::CodeEditorComponent::State Struct Reference

Can be used to save and restore the editor's caret position, selection state, etc. More...

#include <juce_CodeEditorComponent.h>

Collaboration diagram for juce::CodeEditorComponent::State:

Public Member Functions

 State (const CodeEditorComponent &)
 Creates an object containing the state of the given editor. More...
 
 State (const String &stringifiedVersion)
 Creates a state object from a string that was previously created with toString(). More...
 
 State (const State &) noexcept
 
void restoreState (CodeEditorComponent &) const
 Updates the given editor with this saved state. More...
 
String toString () const
 Returns a stringified version of this state that can be used to recreate it later. More...
 

Private Attributes

int lastCaretPos
 
int lastSelectionEnd
 
int lastTopLine
 

Detailed Description

Can be used to save and restore the editor's caret position, selection state, etc.

Constructor & Destructor Documentation

◆ State() [1/3]

juce::CodeEditorComponent::State::State ( const CodeEditorComponent )

Creates an object containing the state of the given editor.

◆ State() [2/3]

juce::CodeEditorComponent::State::State ( const String stringifiedVersion)

Creates a state object from a string that was previously created with toString().

◆ State() [3/3]

juce::CodeEditorComponent::State::State ( const State )
noexcept

Member Function Documentation

◆ restoreState()

void juce::CodeEditorComponent::State::restoreState ( CodeEditorComponent ) const

Updates the given editor with this saved state.

◆ toString()

String juce::CodeEditorComponent::State::toString ( ) const

Returns a stringified version of this state that can be used to recreate it later.

Member Data Documentation

◆ lastCaretPos

int juce::CodeEditorComponent::State::lastCaretPos
private

◆ lastSelectionEnd

int juce::CodeEditorComponent::State::lastSelectionEnd
private

◆ lastTopLine

int juce::CodeEditorComponent::State::lastTopLine
private

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