00001 /* 00002 ============================================================================== 00003 00004 This file is part of the JUCE library - "Jules' Utility Class Extensions" 00005 Copyright 2004-7 by Raw Material Software ltd. 00006 00007 ------------------------------------------------------------------------------ 00008 00009 JUCE can be redistributed and/or modified under the terms of the 00010 GNU General Public License, as published by the Free Software Foundation; 00011 either version 2 of the License, or (at your option) any later version. 00012 00013 JUCE is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with JUCE; if not, visit www.gnu.org/licenses or write to the 00020 Free Software Foundation, Inc., 59 Temple Place, Suite 330, 00021 Boston, MA 02111-1307 USA 00022 00023 ------------------------------------------------------------------------------ 00024 00025 If you'd like to release a closed-source product which uses JUCE, commercial 00026 licenses are also available: visit www.rawmaterialsoftware.com/juce for 00027 more information. 00028 00029 ============================================================================== 00030 */ 00031 00032 #ifndef __JUCE_DIRECTORYCONTENTSDISPLAYCOMPONENT_JUCEHEADER__ 00033 #define __JUCE_DIRECTORYCONTENTSDISPLAYCOMPONENT_JUCEHEADER__ 00034 00035 #include "juce_DirectoryContentsList.h" 00036 #include "juce_FileBrowserListener.h" 00037 00038 00039 //============================================================================== 00045 class JUCE_API DirectoryContentsDisplayComponent 00046 { 00047 public: 00048 //============================================================================== 00051 DirectoryContentsDisplayComponent (DirectoryContentsList& listToShow); 00052 00054 virtual ~DirectoryContentsDisplayComponent(); 00055 00056 //============================================================================== 00061 virtual const File getSelectedFile() const = 0; 00062 00064 virtual void scrollToTop() = 0; 00065 00066 //============================================================================== 00071 void addListener (FileBrowserListener* const listener) throw(); 00072 00077 void removeListener (FileBrowserListener* const listener) throw(); 00078 00079 00080 //============================================================================== 00091 enum ColourIds 00092 { 00093 highlightColourId = 0x1000540, 00094 textColourId = 0x1000541, 00095 }; 00096 00097 //============================================================================== 00099 void sendSelectionChangeMessage(); 00101 void sendDoubleClickMessage (const File& file); 00103 void sendMouseClickMessage (const File& file, const MouseEvent& e); 00104 00105 //============================================================================== 00106 juce_UseDebuggingNewOperator 00107 00108 protected: 00109 DirectoryContentsList& fileList; 00110 SortedSet <void*> listeners; 00111 00112 DirectoryContentsDisplayComponent (const DirectoryContentsDisplayComponent&); 00113 const DirectoryContentsDisplayComponent& operator= (const DirectoryContentsDisplayComponent&); 00114 }; 00115 00116 00117 #endif // __JUCE_DIRECTORYCONTENTSDISPLAYCOMPONENT_JUCEHEADER__