LMMS
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//==============================================================================
41 private ListBoxModel
42{
43public:
44 //==============================================================================
47
48 //==============================================================================
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 //==============================================================================
100 std::unique_ptr<FileChooser> chooser;
101
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
#define noexcept
Definition DistrhoDefines.h:72
Component() noexcept
Definition juce_Component.cpp:517
Definition juce_DrawableButton.h:41
Definition juce_FileDragAndDropTarget.h:37
Definition juce_File.h:45
Definition juce_FileSearchPath.h:35
DrawableButton upButton
Definition juce_FileSearchPathListComponent.h:104
const FileSearchPath & getPath() const noexcept
Definition juce_FileSearchPathListComponent.h:50
ColourIds
Definition juce_FileSearchPathListComponent.h:69
@ backgroundColourId
Definition juce_FileSearchPathListComponent.h:70
void deleteSelected()
Definition juce_FileSearchPathListComponent.cpp:238
void changed()
Definition juce_FileSearchPathListComponent.cpp:94
TextButton changeButton
Definition juce_FileSearchPathListComponent.h:103
DrawableButton downButton
Definition juce_FileSearchPathListComponent.h:104
std::unique_ptr< FileChooser > chooser
Definition juce_FileSearchPathListComponent.h:100
FileSearchPathListComponent()
Definition juce_FileSearchPathListComponent.cpp:29
void updateButtons()
Definition juce_FileSearchPathListComponent.cpp:84
TextButton addButton
Definition juce_FileSearchPathListComponent.h:103
void addPath()
Definition juce_FileSearchPathListComponent.cpp:215
void moveSelection(int)
Definition juce_FileSearchPathListComponent.cpp:250
FileSearchPath path
Definition juce_FileSearchPathListComponent.h:98
File defaultBrowseTarget
Definition juce_FileSearchPathListComponent.h:99
void editSelected()
Definition juce_FileSearchPathListComponent.cpp:244
ListBox listBox
Definition juce_FileSearchPathListComponent.h:102
TextButton removeButton
Definition juce_FileSearchPathListComponent.h:103
Definition juce_GraphicsContext.h:45
Definition juce_ListBox.h:38
friend class ListBox
Definition juce_ListBox.h:169
Definition juce_MouseEvent.h:39
Definition juce_StringArray.h:35
Definition juce_TextButton.h:39
int g
Definition inflate.c:1573
static int int height
Definition pugl.h:1594
static int width
Definition pugl.h:1593
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
static char ** files
Definition misc.c:28
Definition carla_juce.cpp:31
#define const
Definition zconf.h:137