openshot-audio  0.1.2
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) 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_FILECHOOSERDIALOGBOX_H_INCLUDED
26 #define JUCE_FILECHOOSERDIALOGBOX_H_INCLUDED
27 
28 
29 //==============================================================================
65  private ButtonListener, // (can't use Button::Listener due to idiotic VC2005 bug)
66  private FileBrowserListener
67 {
68 public:
69  //==============================================================================
85  FileChooserDialogBox (const String& title,
86  const String& instructions,
87  FileBrowserComponent& browserComponent,
88  bool warnAboutOverwritingExistingFiles,
89  Colour backgroundColour);
90 
93 
94  //==============================================================================
95  #if JUCE_MODAL_LOOPS_PERMITTED
96 
103  bool show (int width = 0, int height = 0);
104 
112  bool showAt (int x, int y, int width, int height);
113  #endif
114 
118  void centreWithDefaultSize (Component* componentToCentreAround = nullptr);
119 
120  //==============================================================================
129  {
130  titleTextColourId = 0x1000850,
131  };
132 
133 private:
134  class ContentComponent;
135  ContentComponent* content;
136  const bool warnAboutOverwritingExistingFiles;
137 
138  void buttonClicked (Button*) override;
139  void closeButtonPressed();
140  void selectionChanged() override;
141  void fileClicked (const File&, const MouseEvent&) override;
142  void fileDoubleClicked (const File&) override;
143  void browserRootChanged (const File&) override;
144  int getDefaultWidth() const;
145 
146  void okButtonPressed();
147  void createNewFolder();
148  void createNewFolderConfirmed (const String& name);
149 
150  static void okToOverwriteFileCallback (int result, FileChooserDialogBox*);
151  static void createNewFolderCallback (int result, FileChooserDialogBox*, Component::SafePointer<AlertWindow>);
152 
154 };
155 
156 
157 #endif // JUCE_FILECHOOSERDIALOGBOX_H_INCLUDED
Definition: juce_ResizableWindow.h:49
virtual void fileClicked(const File &file, const MouseEvent &e)=0
virtual void buttonClicked(Button *)=0
Definition: juce_Component.h:2092
Definition: juce_Button.h:39
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
virtual void selectionChanged()=0
Definition: juce_Colour.h:35
Definition: juce_Component.h:33
Definition: juce_FileChooserDialogBox.h:64
Definition: juce_Button.h:162
Definition: juce_FileBrowserComponent.h:39
Definition: juce_FileBrowserListener.h:35
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition: juce_PlatformDefs.h:198
virtual void browserRootChanged(const File &newRoot)=0
virtual void fileDoubleClicked(const File &file)=0
ColourIds
Definition: juce_FileChooserDialogBox.h:128
Definition: juce_File.h:45
Definition: juce_MouseEvent.h:36
Definition: juce_FileChooserDialogBox.cpp:25