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_FileChooserDialogBox.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//==============================================================================
71class JUCE_API FileChooserDialogBox : public ResizableWindow,
73{
74public:
75 //==============================================================================
96 FileChooserDialogBox (const String& title,
97 const String& instructions,
98 FileBrowserComponent& browserComponent,
99 bool warnAboutOverwritingExistingFiles,
100 Colour backgroundColour,
101 Component* parentComponent = nullptr);
102
104 ~FileChooserDialogBox() override;
105
106 //==============================================================================
107 #if JUCE_MODAL_LOOPS_PERMITTED
115 bool show (int width = 0, int height = 0);
116
124 bool showAt (int x, int y, int width, int height);
125 #endif
126
130 void centreWithDefaultSize (Component* componentToCentreAround = nullptr);
131
132 //==============================================================================
141 {
142 titleTextColourId = 0x1000850,
143 };
144
145private:
146 class ContentComponent;
147 ContentComponent* content;
148 const bool warnAboutOverwritingExistingFiles;
149
150 void closeButtonPressed();
151 void selectionChanged() override;
152 void fileClicked (const File&, const MouseEvent&) override;
153 void fileDoubleClicked (const File&) override;
154 void browserRootChanged (const File&) override;
155 int getDefaultWidth() const;
156
157 void okButtonPressed();
158 void createNewFolder();
159 void createNewFolderConfirmed (const String& name);
160
161 static void createNewFolderCallback (int result, FileChooserDialogBox*, Component::SafePointer<AlertWindow>);
162
163 ScopedMessageBox messageBox;
164
166};
167
168} // namespace juce
Represents a colour, also including a transparency value.
Definition juce_Colour.h:38
Holds a pointer to some type of Component, which automatically becomes null if the component is delet...
The base class for all JUCE user-interface objects.
A component for browsing and selecting a file or directory to open or save.
A listener for user selection events in a file browser.
A file open/save dialog box.
ColourIds
A set of colour IDs to use to change the colour of various aspects of the box.
Represents a local file or directory.
Definition juce_File.h:45
Contains position and status information about a mouse event.
A base class for top-level windows that can be dragged around and resized.
Objects of this type can be used to programmatically close message boxes.
The JUCE String class!
Definition juce_String.h:53
#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.