JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_RecentlyOpenedFilesList.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
29//==============================================================================
42{
43public:
44 //==============================================================================
48
49 //==============================================================================
57 void setMaxNumberOfItems (int newMaxNumber);
58
62 int getMaxNumberOfItems() const noexcept { return maxNumberOfItems; }
63
68 int getNumFiles() const;
69
74 File getFile (int index) const;
75
78 const StringArray& getAllFilenames() const noexcept { return files; }
79
81 void clear();
82
91 void addFile (const File& file);
92
94 void removeFile (const File& file);
95
101 void removeNonExistentFiles();
102
108 static void registerRecentFileNatively (const File& file);
109
115 static void forgetRecentFileNatively (const File& file);
116
122 static void clearRecentFilesNatively();
123
124 //==============================================================================
142 int createPopupMenuItems (PopupMenu& menuToAddItemsTo,
143 int baseItemId,
144 bool showFullPaths,
145 bool dontAddNonExistentFiles,
146 const File** filesToAvoid = nullptr);
147
148 //==============================================================================
157 String toString() const;
158
166 void restoreFromString (const String& stringifiedVersion);
167
168
169private:
170 //==============================================================================
171 StringArray files;
172 int maxNumberOfItems;
173
175};
176
177} // namespace juce
Represents a local file or directory.
Definition juce_File.h:45
Creates and displays a popup-menu.
Manages a set of files for use as a list of recently-opened documents.
int getMaxNumberOfItems() const noexcept
Returns the number of items that this list will store.
const StringArray & getAllFilenames() const noexcept
Returns an array of all the absolute pathnames in the list.
A special array for holding a list of strings.
The JUCE String class!
Definition juce_String.h:53
#define JUCE_LEAK_DETECTOR(OwnerClass)
This macro lets you embed a leak-detecting object inside a class.
JUCE Namespace.