Audacity 3.2.0
gtk/FileDialogPrivate.h
Go to the documentation of this file.
1//
2// Copied from wxWidgets 3.0.2 and modified for Audacity
3//
5// Name: wx/gtk/filedlg.h
6// Purpose:
7// Author: Robert Roebling
8// Copyright: (c) 1998 Robert Roebling
9// Licence: wxWindows licence
11
12#ifndef _GTK_FILEDIALOGPRIVATE_H_
13#define _GTK_FILEDIALOGPRIVATE_H_
14
15#include <wx/gtk/filectrl.h> // for wxGtkFileChooser
16#include <wx/panel.h>
17
18//-------------------------------------------------------------------------
19// FileDialog
20//-------------------------------------------------------------------------
21
22class WXDLLIMPEXP_CORE FileDialog: public FileDialogBase
23{
24public:
26
27 FileDialog(wxWindow *parent,
28 const wxString& message = wxFileSelectorPromptStr,
29 const wxString& defaultDir = wxEmptyString,
30 const wxString& defaultFile = wxEmptyString,
31 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
32 long style = wxFD_DEFAULT_STYLE,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& sz = wxDefaultSize,
35 const wxString& name = wxFileDialogNameStr);
36 bool Create(wxWindow *parent,
37 const wxString& message = wxFileSelectorPromptStr,
38 const wxString& defaultDir = wxEmptyString,
39 const wxString& defaultFile = wxEmptyString,
40 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
41 long style = wxFD_DEFAULT_STYLE,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& sz = wxDefaultSize,
44 const wxString& name = wxFileDialogNameStr);
45 virtual ~FileDialog();
46
47 virtual wxString GetPath() const;
48 virtual void GetPaths(wxArrayString& paths) const;
49 virtual wxString GetFilename() const;
50 virtual void GetFilenames(wxArrayString& files) const;
51 virtual int GetFilterIndex() const;
52
53 virtual void SetMessage(const wxString& message);
54 virtual void SetPath(const wxString& path);
55 virtual void SetDirectory(const wxString& dir);
56 virtual void SetFilename(const wxString& name);
57 virtual void SetWildcard(const wxString& wildCard);
58 virtual void SetFilterIndex(int filterIndex);
59
60 virtual int ShowModal();
61
62 virtual bool SupportsExtraControl() const { return true; }
63
64 virtual void SetFileExtension(const wxString& extension);
65
66 // Implementation only.
67 void GTKSelectionChanged(const wxString& filename);
68 void GTKFolderChanged();
69 void GTKFilterChanged();
70
71
72protected:
73 // override this from wxTLW since the native
74 // form doesn't have any m_wxwindow
75 virtual void DoSetSize(int x, int y,
76 int width, int height,
77 int sizeFlags = wxSIZE_AUTO);
78
79
80private:
81 void OnFakeOk( wxCommandEvent &event );
82 void OnSize(wxSizeEvent&);
83 virtual void AddChildGTK(wxWindowGTK* child);
84
85 wxGtkFileChooser m_fc;
86
87 DECLARE_DYNAMIC_CLASS(FileDialog)
88 DECLARE_EVENT_TABLE()
89};
90
91#endif
wxString name
Definition: TagsEditor.cpp:166
static void OnSize(wxSizeEvent &evt)
Definition: VSTEditor.cpp:224
virtual void SetFileExtension(const wxString &extension)
Definition: FileDialog.h:35
Dialog used to present platform specific "Save As" dialog with custom controls.
virtual bool SupportsExtraControl() const
virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags=wxSIZE_AUTO)
wxGtkFileChooser m_fc