mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
Introjucer: minor internal changes.
This commit is contained in:
parent
bb2d7683e5
commit
6836d1eca6
4 changed files with 11 additions and 7 deletions
|
|
@ -487,10 +487,7 @@ public:
|
|||
|
||||
ScopedPointer<MainMenuModel> menuModel;
|
||||
|
||||
private:
|
||||
OwnedArray <MainWindow> mainWindows;
|
||||
|
||||
MainWindow* createNewMainWindow()
|
||||
virtual MainWindow* createNewMainWindow()
|
||||
{
|
||||
MainWindow* mw = new MainWindow();
|
||||
mainWindows.add (mw);
|
||||
|
|
@ -499,6 +496,9 @@ private:
|
|||
return mw;
|
||||
}
|
||||
|
||||
private:
|
||||
OwnedArray <MainWindow> mainWindows;
|
||||
|
||||
MainWindow* getOrCreateFrontmostWindow()
|
||||
{
|
||||
if (mainWindows.size() == 0)
|
||||
|
|
|
|||
|
|
@ -49,12 +49,13 @@ public:
|
|||
|
||||
//==============================================================================
|
||||
bool loadedOk() const { return true; }
|
||||
bool isForFile (const File& file) const { return modDetector.getFile() == file; }
|
||||
bool isForFile (const File& file) const { return getFile() == file; }
|
||||
bool isForNode (const ValueTree& node) const { return false; }
|
||||
bool refersToProject (Project& project) const { return false; }
|
||||
bool canSaveAs() const { return true; }
|
||||
String getName() const { return modDetector.getFile().getFileName(); }
|
||||
String getType() const { return modDetector.getFile().getFileExtension() + " file"; }
|
||||
String getName() const { return getFile().getFileName(); }
|
||||
String getType() const { return getFile().getFileExtension() + " file"; }
|
||||
File getFile() const { return modDetector.getFile(); }
|
||||
bool needsSaving() const { return codeDoc != nullptr && codeDoc->hasChangedSinceSavePoint(); }
|
||||
bool hasFileBeenModifiedExternally() { return modDetector.hasBeenModified(); }
|
||||
void fileHasBeenRenamed (const File& newFile) { modDetector.fileHasBeenRenamed (newFile); }
|
||||
|
|
@ -138,6 +139,7 @@ public:
|
|||
bool hasFileBeenModifiedExternally() { return fileModificationTime != file.getLastModificationTime(); }
|
||||
void reloadFromFile() { fileModificationTime = file.getLastModificationTime(); }
|
||||
String getName() const { return file.getFileName(); }
|
||||
File getFile() const { return file; }
|
||||
Component* createEditor() { return new ItemPreviewComponent (file); }
|
||||
Component* createViewer() { return createEditor(); }
|
||||
void fileHasBeenRenamed (const File& newFile) { file = newFile; }
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ public:
|
|||
virtual bool refersToProject (Project& project) const = 0;
|
||||
virtual String getName() const = 0;
|
||||
virtual String getType() const = 0;
|
||||
virtual File getFile() const = 0;
|
||||
virtual bool needsSaving() const = 0;
|
||||
virtual bool save() = 0;
|
||||
virtual bool canSaveAs() const = 0;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public:
|
|||
bool showDocument (OpenDocumentManager::Document* doc);
|
||||
void hideDocument (OpenDocumentManager::Document* doc);
|
||||
bool setEditorComponent (Component* editor, OpenDocumentManager::Document* doc);
|
||||
OpenDocumentManager::Document* getCurrentDocument() const { return currentDocument; }
|
||||
|
||||
void updateMissingFileStatuses();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue