openshot-audio  0.1.2
juce_FileListComponent.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_FILELISTCOMPONENT_H_INCLUDED
26 #define JUCE_FILELISTCOMPONENT_H_INCLUDED
27 
28 
29 //==============================================================================
43  private ListBoxModel,
44  private ChangeListener
45 {
46 public:
47  //==============================================================================
51 
54 
55  //==============================================================================
59  int getNumSelectedFiles() const override;
60 
65  File getSelectedFile (int index = 0) const override;
66 
68  void deselectAllFiles() override;
69 
71  void scrollToTop() override;
72 
75  void setSelectedFile (const File&) override;
76 
77 private:
78  //==============================================================================
79  File lastDirectory;
80 
81  class ItemComponent;
82 
84 
85  int getNumRows() override;
86  void paintListBoxItem (int, Graphics&, int, int, bool) override;
87  Component* refreshComponentForRow (int rowNumber, bool isRowSelected, Component*) override;
88  void selectedRowsChanged (int lastRowSelected) override;
89  void deleteKeyPressed (int currentSelectedRow) override;
90  void returnKeyPressed (int currentSelectedRow) override;
91 
93 };
94 
95 
96 #endif // JUCE_FILELISTCOMPONENT_H_INCLUDED
Definition: juce_DirectoryContentsDisplayComponent.h:35
virtual void setSelectedFile(const File &)=0
Definition: juce_ChangeListener.h:44
Definition: juce_ListBox.h:177
Definition: juce_DirectoryContentsList.h:39
virtual void returnKeyPressed(int lastRowSelected)
Definition: juce_ListBox.cpp:964
virtual File getSelectedFile(int index) const =0
Definition: juce_ChangeBroadcaster.h:35
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_FileListComponent.cpp:89
virtual int getNumRows()=0
Definition: juce_Component.h:33
Definition: juce_FileListComponent.h:41
virtual void changeListenerCallback(ChangeBroadcaster *source)=0
virtual void paintListBoxItem(int rowNumber, Graphics &g, int width, int height, bool rowIsSelected)=0
virtual void selectedRowsChanged(int lastRowSelected)
Definition: juce_ListBox.cpp:962
virtual Component * refreshComponentForRow(int rowNumber, bool isRowSelected, Component *existingComponentToUpdate)
Definition: juce_ListBox.cpp:952
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
Definition: juce_GraphicsContext.h:42
virtual void deleteKeyPressed(int lastRowSelected)
Definition: juce_ListBox.cpp:963
Definition: juce_File.h:45
virtual int getNumSelectedFiles() const =0
Definition: juce_ListBox.h:35