Audacity 3.2.0
FileDialog.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 FileDialog.h
6
7 Leland Lucius
8
9*******************************************************************//*******************************************************************/
16
17#ifndef _FILEDIALOG_H_
18#define _FILEDIALOG_H_
19
20#include <wx/filedlg.h> // to inherit
21
22class WX_WRAPPERS_API FileDialogBase : public wxFileDialogBase
23{
24public:
26 virtual ~FileDialogBase() {};
27
28 // FileDialogBase
29
30 typedef void (*UserPaneCreatorFunction)(wxWindow *parent, wxUIntPtr userdata);
31
32 virtual bool HasUserPaneCreator() const;
33 virtual void SetUserPaneCreator(UserPaneCreatorFunction creator, wxUIntPtr userdata);
34
35 virtual void SetFileExtension(const wxString& extension) {};
36
37protected:
38 void CreateUserPane(wxWindow *parent);
39
40 UserPaneCreatorFunction m_creator;
41 wxUIntPtr m_userdata;
42};
43
44#if defined(__WXGTK__)
46#elif defined(__WXMAC__)
48#elif defined(__WXMSW__)
50#else
51#error Unknown implementation
52#endif
53
54//
55// Copied from wx 3.0.2 and modified to support additional features
56//
58// Name: wx/filedlg.h
59// Purpose: wxFileDialog base header
60// Author: Robert Roebling
61// Modified by: Leland Lucius
62// Created: 8/17/99
63// Copyright: (c) Robert Roebling
64// Licence: wxWindows licence
66
67//----------------------------------------------------------------------------
68// FileDialog convenience functions
69//----------------------------------------------------------------------------
70
71WX_WRAPPERS_API wxString
72FileSelector(const wxString& message = wxFileSelectorPromptStr,
73 const wxString& default_path = wxEmptyString,
74 const wxString& default_filename = wxEmptyString,
75 const wxString& default_extension = wxEmptyString,
76 const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
77 int flags = 0,
78 wxWindow *parent = NULL,
79 int x = wxDefaultCoord, int y = wxDefaultCoord);
80
81// An extended version of FileSelector
82WX_WRAPPERS_API wxString
83FileSelectorEx(const wxString& message = wxFileSelectorPromptStr,
84 const wxString& default_path = wxEmptyString,
85 const wxString& default_filename = wxEmptyString,
86 int *indexDefaultExtension = NULL,
87 const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
88 int flags = 0,
89 wxWindow *parent = NULL,
90 int x = wxDefaultCoord, int y = wxDefaultCoord);
91
92#endif
WX_WRAPPERS_API wxString FileSelectorEx(const wxString &message=wxFileSelectorPromptStr, const wxString &default_path=wxEmptyString, const wxString &default_filename=wxEmptyString, int *indexDefaultExtension=NULL, const wxString &wildcard=wxFileSelectorDefaultWildcardStr, int flags=0, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: FileDialog.cpp:125
WX_WRAPPERS_API wxString FileSelector(const wxString &message=wxFileSelectorPromptStr, const wxString &default_path=wxEmptyString, const wxString &default_filename=wxEmptyString, const wxString &default_extension=wxEmptyString, const wxString &wildcard=wxFileSelectorDefaultWildcardStr, int flags=0, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: FileDialog.cpp:61
wxUIntPtr m_userdata
Definition: FileDialog.h:41
virtual void SetFileExtension(const wxString &extension)
Definition: FileDialog.h:35
UserPaneCreatorFunction m_creator
Definition: FileDialog.h:40
virtual ~FileDialogBase()
Definition: FileDialog.h:26