Browse Source

Introjucer: minor internal changes.

tags/2021-05-28
jules 13 years ago
parent
commit
6836d1eca6
4 changed files with 11 additions and 7 deletions
  1. +4
    -4
      extras/Introjucer/Source/Application/jucer_Application.h
  2. +5
    -3
      extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp
  3. +1
    -0
      extras/Introjucer/Source/Application/jucer_OpenDocumentManager.h
  4. +1
    -0
      extras/Introjucer/Source/Project/jucer_ProjectContentComponent.h

+ 4
- 4
extras/Introjucer/Source/Application/jucer_Application.h View File

@@ -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)


+ 5
- 3
extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp View File

@@ -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; }


+ 1
- 0
extras/Introjucer/Source/Application/jucer_OpenDocumentManager.h View File

@@ -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;


+ 1
- 0
extras/Introjucer/Source/Project/jucer_ProjectContentComponent.h View File

@@ -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…
Cancel
Save