]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/filedlg.h
More German translations updates from Sebastian Walderich.
[wxWidgets.git] / include / wx / osx / filedlg.h
CommitLineData
6762286d 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/osx/filedlg.h
6762286d
SC
3// Purpose: wxFileDialog class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
6762286d
SC
7// Copyright: (c) Stefan Csomor
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_FILEDLG_H_
12#define _WX_FILEDLG_H_
13
2de61130
VZ
14class WXDLLIMPEXP_FWD_CORE wxChoice;
15
6762286d
SC
16//-------------------------------------------------------------------------
17// wxFileDialog
18//-------------------------------------------------------------------------
19
13390af4
SC
20// set this system option to 1 in order to always show the filetypes popup in
21// file open dialogs if possible
22
a37e1f0e 23#define wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES wxT("osx.openfiledialog.always-show-types")
13390af4 24
6762286d
SC
25class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
26{
27DECLARE_DYNAMIC_CLASS(wxFileDialog)
28protected:
29 wxArrayString m_fileNames;
30 wxArrayString m_paths;
31
32public:
aad2997b 33 wxFileDialog() { Init(); }
6762286d 34 wxFileDialog(wxWindow *parent,
aad2997b
VZ
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 Init();
45
46 Create(parent,message,defaultDir,defaultFile,wildCard,style,pos,sz,name);
47 }
48
49 void Create(wxWindow *parent,
6762286d
SC
50 const wxString& message = wxFileSelectorPromptStr,
51 const wxString& defaultDir = wxEmptyString,
52 const wxString& defaultFile = wxEmptyString,
53 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
54 long style = wxFD_DEFAULT_STYLE,
55 const wxPoint& pos = wxDefaultPosition,
56 const wxSize& sz = wxDefaultSize,
57 const wxString& name = wxFileDialogNameStr);
58
681bf55c
SC
59#if wxOSX_USE_COCOA
60 ~wxFileDialog();
61#endif
62
6762286d
SC
63 virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
64 virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
65
66 virtual int ShowModal();
ce00f59b 67
bfa92264
KO
68#if wxOSX_USE_COCOA
69 virtual void ShowWindowModal();
70 virtual void ModalFinishedCallback(void* panel, int resultCode);
71#endif
6762286d 72
61ad44c7 73 virtual bool SupportsExtraControl() const;
13390af4
SC
74
75 // implementation only
76
77#if wxOSX_USE_COCOA
78 // returns true if the file can be shown as active
79 bool CheckFile( const wxString& filename );
80#endif
ce00f59b 81
6762286d
SC
82protected:
83 // not supported for file dialog, RR
84 virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
85 int WXUNUSED(width), int WXUNUSED(height),
86 int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
ce00f59b 87
2f30930a 88 void SetupExtraControls(WXWindow nativeWindow);
13390af4
SC
89
90#if wxOSX_USE_COCOA
91 virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
cbbb1f54 92 void DoOnFilterSelected(int index);
13390af4
SC
93 virtual void OnFilterSelected(wxCommandEvent &event);
94
95 wxArrayString m_filterExtensions;
96 wxArrayString m_filterNames;
97 wxChoice* m_filterChoice;
98 wxWindow* m_filterPanel;
99 bool m_useFileTypeFilter;
100 int m_firstFileTypeFilter;
101 wxArrayString m_currentExtensions;
102 WX_NSObject m_delegate;
681bf55c 103 WX_NSObject m_sheetDelegate;
13390af4 104#endif
aad2997b
VZ
105
106private:
107 // Common part of all ctors.
108 void Init();
6762286d
SC
109};
110
111#endif // _WX_FILEDLG_H_