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_FileSearchPathListComponent.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//==============================================================================
38class JUCE_API FileSearchPathListComponent : public Component,
41 private ListBoxModel
42{
43public:
44 //==============================================================================
47
48 //==============================================================================
50 const FileSearchPath& getPath() const noexcept { return path; }
51
53 void setPath (const FileSearchPath& newPath);
54
59 void setDefaultBrowseTarget (const File& newDefaultDirectory);
60
69 {
70 backgroundColourId = 0x1004100,
72 };
73
74 //==============================================================================
76 int getNumRows() override;
78 void paintListBoxItem (int rowNumber, Graphics& g, int width, int height, bool rowIsSelected) override;
80 void deleteKeyPressed (int lastRowSelected) override;
82 void returnKeyPressed (int lastRowSelected) override;
84 void listBoxItemDoubleClicked (int row, const MouseEvent&) override;
86 void selectedRowsChanged (int lastRowSelected) override;
88 void resized() override;
90 void paint (Graphics&) override;
92 bool isInterestedInFileDrag (const StringArray&) override;
94 void filesDropped (const StringArray& files, int, int) override;
95
96private:
97 //==============================================================================
98 FileSearchPath path;
99 File defaultBrowseTarget;
101
102 ListBox listBox;
103 TextButton addButton, removeButton, changeButton;
104 DrawableButton upButton, downButton;
105
106 void changed();
107 void updateButtons();
108
109 void addPath();
110 void deleteSelected();
111 void editSelected();
112 void moveSelection (int);
113
115};
116
117} // namespace juce
The base class for all JUCE user-interface objects.
A button that displays a Drawable.
Components derived from this class can have files dropped onto them by an external application.
Shows a set of file paths in a list, allowing them to be added, removed or re-ordered.
const FileSearchPath & getPath() const noexcept
Returns the path as it is currently shown.
ColourIds
A set of colour IDs to use to change the colour of various aspects of the label.
Represents a set of folders that make up a search path.
Represents a local file or directory.
Definition juce_File.h:45
A graphics context, used for drawing a component or image.
A subclass of this is used to drive a ListBox.
A list of items that can be scrolled vertically.
Contains position and status information about a mouse event.
An implementation of TooltipClient that stores the tooltip string and a method for changing it.
A special array for holding a list of strings.
A button that uses the standard lozenge-shaped background with a line of text on it.
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for ...
JUCE Namespace.