mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-14 00:14:18 +00:00
Introjucer: changes to implementation of auto-update and a few editor tweaks.
This commit is contained in:
parent
4c26b1bcb9
commit
c53b00cb21
8 changed files with 240 additions and 118 deletions
|
|
@ -146,7 +146,7 @@ SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* doc, CodeDocu
|
|||
setEditor (ed);
|
||||
}
|
||||
|
||||
SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* doc, CodeEditorComponent* ed)
|
||||
SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* doc, GenericCodeEditorComponent* ed)
|
||||
: DocumentEditorComponent (doc)
|
||||
{
|
||||
setEditor (ed);
|
||||
|
|
@ -163,7 +163,7 @@ SourceCodeEditor::~SourceCodeEditor()
|
|||
doc->updateLastState (*editor);
|
||||
}
|
||||
|
||||
void SourceCodeEditor::setEditor (CodeEditorComponent* newEditor)
|
||||
void SourceCodeEditor::setEditor (GenericCodeEditorComponent* newEditor)
|
||||
{
|
||||
if (editor != nullptr)
|
||||
editor->getDocument().removeListener (this);
|
||||
|
|
@ -322,6 +322,16 @@ bool GenericCodeEditorComponent::perform (const InvocationInfo& info)
|
|||
return CodeEditorComponent::perform (info);
|
||||
}
|
||||
|
||||
void GenericCodeEditorComponent::addListener (GenericCodeEditorComponent::Listener* listener)
|
||||
{
|
||||
listeners.add (listener);
|
||||
}
|
||||
|
||||
void GenericCodeEditorComponent::removeListener (GenericCodeEditorComponent::Listener* listener)
|
||||
{
|
||||
listeners.remove (listener);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
class GenericCodeEditorComponent::FindPanel : public Component,
|
||||
private TextEditor::Listener,
|
||||
|
|
@ -527,6 +537,12 @@ void GenericCodeEditorComponent::handleEscapeKey()
|
|||
hideFindPanel();
|
||||
}
|
||||
|
||||
void GenericCodeEditorComponent::editorViewportPositionChanged()
|
||||
{
|
||||
CodeEditorComponent::editorViewportPositionChanged();
|
||||
listeners.call (&Listener::codeEditorViewportMoved, *this);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
static CPlusPlusCodeTokeniser cppTokeniser;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue