2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-10 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCER_PROJECTCONTENTCOMPONENT_JUCEHEADER__
27 #define __JUCER_PROJECTCONTENTCOMPONENT_JUCEHEADER__
29 #include "jucer_Project.h"
30 #include "../Application/jucer_OpenDocumentManager.h"
33 //==============================================================================
36 class ProjectContentComponent
: public Component
,
37 public ApplicationCommandTarget
,
41 //==============================================================================
42 ProjectContentComponent();
43 ~ProjectContentComponent();
45 void paint (Graphics
& g
);
47 void setProject (Project
* project
);
49 bool showEditorForFile (const File
& f
);
50 bool showDocument (OpenDocumentManager::Document
* doc
);
51 void hideDocument (OpenDocumentManager::Document
* doc
);
52 bool setEditorComponent (Component
* editor
, OpenDocumentManager::Document
* doc
);
54 void updateMissingFileStatuses();
56 void changeListenerCallback (ChangeBroadcaster
*);
58 //==============================================================================
59 ApplicationCommandTarget
* getNextCommandTarget();
60 void getAllCommands (Array
<CommandID
>& commands
);
61 void getCommandInfo (CommandID commandID
, ApplicationCommandInfo
& result
);
62 bool isCommandActive (const CommandID commandID
);
63 bool perform (const InvocationInfo
& info
);
67 OpenDocumentManager::Document
* currentDocument
;
69 ScopedPointer
<TreeView
> projectTree
;
70 ScopedPointer
<ResizableEdgeComponent
> resizerBar
;
71 ScopedPointer
<Component
> contentView
;
73 ComponentBoundsConstrainer treeSizeConstrainer
;
75 void updateMainWindowTitle();
77 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ProjectContentComponent
);
81 #endif // __JUCER_PROJECTCONTENTCOMPONENT_JUCEHEADER__