mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
More MouseInputSource tweaks.
This commit is contained in:
parent
6758ce0bc9
commit
4233f603db
4 changed files with 56 additions and 31 deletions
|
|
@ -28,11 +28,28 @@
|
|||
|
||||
|
||||
//==============================================================================
|
||||
SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* document_,
|
||||
CodeDocument& codeDocument)
|
||||
SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* document_, CodeDocument& codeDocument)
|
||||
: DocumentEditorComponent (document_)
|
||||
{
|
||||
addAndMakeVisible (editor = createEditor (codeDocument));
|
||||
createEditor (codeDocument);
|
||||
}
|
||||
|
||||
SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* document_)
|
||||
: DocumentEditorComponent (document_)
|
||||
{
|
||||
}
|
||||
|
||||
void SourceCodeEditor::createEditor (CodeDocument& codeDocument)
|
||||
{
|
||||
if (document->getFile().hasFileExtension (sourceOrHeaderFileExtensions))
|
||||
setEditor (new CppCodeEditorComponent (codeDocument));
|
||||
else
|
||||
setEditor (new CodeEditorComponent (codeDocument, nullptr));
|
||||
}
|
||||
|
||||
void SourceCodeEditor::setEditor (CodeEditorComponent* newEditor)
|
||||
{
|
||||
addAndMakeVisible (editor = newEditor);
|
||||
|
||||
#if JUCE_MAC
|
||||
Font font (13.0f);
|
||||
|
|
@ -54,14 +71,6 @@ SourceCodeEditor::~SourceCodeEditor()
|
|||
getAppSettings().appearance.settings.removeListener (this);
|
||||
}
|
||||
|
||||
CodeEditorComponent* SourceCodeEditor::createEditor (CodeDocument& codeDocument)
|
||||
{
|
||||
if (document->getFile().hasFileExtension (sourceOrHeaderFileExtensions))
|
||||
return new CppCodeEditorComponent (codeDocument);
|
||||
|
||||
return new CodeEditorComponent (codeDocument, nullptr);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void SourceCodeEditor::resized()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue