Audacity 3.2.0
mac/FileDialogPrivate.h
Go to the documentation of this file.
1//
2// Copied from wx 3.0.2 and modified to support additional features
3//
5// Name: wx/osx/filedlg.h
6// Purpose: wxFileDialog class
7// Author: Stefan Csomor
8// Modified by: Leland Lucius
9// Created: 1998-01-01
10// Copyright: (c) Stefan Csomor
11// Licence: wxWindows licence
13
14#ifndef _MAC_FILEDIALOG_H_
15#define _MAC_FILEDIALOG_H_
16
17#include "../FileDialog.h"
18
19class wxChoice;
20
21//-------------------------------------------------------------------------
22// wxFileDialog
23//-------------------------------------------------------------------------
24
25class FileDialog: public FileDialogBase
26{
27DECLARE_DYNAMIC_CLASS(FileDialog)
28protected:
29 wxArrayString m_fileNames;
30 wxArrayString m_paths;
31
32public:
34 FileDialog(wxWindow *parent,
35 const wxString& message = wxFileSelectorPromptStr,
36 const wxString& defaultDir = wxEmptyString,
37 const wxString& defaultFile = wxEmptyString,
38 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
39 long style = wxFD_DEFAULT_STYLE,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& sz = wxDefaultSize,
42 const wxString& name = wxFileDialogNameStr);
43
44 void Create(wxWindow *parent,
45 const wxString& message = wxFileSelectorPromptStr,
46 const wxString& defaultDir = wxEmptyString,
47 const wxString& defaultFile = wxEmptyString,
48 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
49 long style = wxFD_DEFAULT_STYLE,
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& sz = wxDefaultSize,
52 const wxString& name = wxFileDialogNameStr);
53
54#if wxOSX_USE_COCOA
56#endif
57
58 virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
59 virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
60
61 virtual int ShowModal();
62
63#if wxOSX_USE_COCOA
64 virtual void ModalFinishedCallback(void* panel, int resultCode);
65#endif
66
67 virtual bool SupportsExtraControl() const;
68
69 virtual void SetFileExtension(const wxString& extension);
70
71 // implementation only
72
73#if wxOSX_USE_COCOA
74 void DoViewResized(void* object);
75 void DoSendFolderChangedEvent(void* panel, const wxString& path);
76 void DoSendSelectionChangedEvent(void* panel);
77#endif
78
79protected:
80 // not supported for file dialog, RR
81 virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
82 int WXUNUSED(width), int WXUNUSED(height),
83 int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
84
85 void SetupExtraControls(WXWindow nativeWindow);
86
87#if wxOSX_USE_COCOA
88 void DoOnFilterSelected(int index);
89 virtual void OnFilterSelected(wxCommandEvent &event);
90
91 wxArrayString m_filterExtensions;
92 wxArrayString m_filterNames;
93 wxChoice* m_filterChoice;
94 wxWindow* m_filterPanel;
95 bool m_useFileTypeFilter;
96 int m_firstFileTypeFilter;
97 wxArrayString m_currentExtensions;
98 WX_NSObject m_delegate;
99 WX_NSObject m_sheetDelegate;
100#endif
101
102private:
103 // Common part of all ctors.
104 void Init();
105};
106
107#endif
wxString name
Definition: TagsEditor.cpp:166
Dialog used to present platform specific "Save As" dialog with custom controls.
virtual void SetFileExtension(const wxString &extension)
void SetupExtraControls(WXWindow nativeWindow)
virtual bool SupportsExtraControl() const
wxArrayString m_fileNames
virtual void GetPaths(wxArrayString &paths) const
void Create(wxWindow *parent, const wxString &message=wxFileSelectorPromptStr, const wxString &defaultDir=wxEmptyString, const wxString &defaultFile=wxEmptyString, const wxString &wildCard=wxFileSelectorDefaultWildcardStr, long style=wxFD_DEFAULT_STYLE, const wxPoint &pos=wxDefaultPosition, const wxSize &sz=wxDefaultSize, const wxString &name=wxFileDialogNameStr)
wxArrayString m_paths
virtual void GetFilenames(wxArrayString &files) const
virtual int ShowModal()
FileDialog(wxWindow *parent, const wxString &message=wxFileSelectorPromptStr, const wxString &defaultDir=wxEmptyString, const wxString &defaultFile=wxEmptyString, const wxString &wildCard=wxFileSelectorDefaultWildcardStr, long style=wxFD_DEFAULT_STYLE, const wxPoint &pos=wxDefaultPosition, const wxSize &sz=wxDefaultSize, const wxString &name=wxFileDialogNameStr)
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(sizeFlags)=wxSIZE_AUTO)