]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/filedlg.h
Don't use "Cancel" button in the about dialog of the listctrl sample.
[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
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_FILEDLG_H_
13#define _WX_FILEDLG_H_
14
2de61130
VZ
15class WXDLLIMPEXP_FWD_CORE wxChoice;
16
6762286d
SC
17//-------------------------------------------------------------------------
18// wxFileDialog
19//-------------------------------------------------------------------------
20
13390af4
SC
21// set this system option to 1 in order to always show the filetypes popup in
22// file open dialogs if possible
23
a37e1f0e 24#define wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES wxT("osx.openfiledialog.always-show-types")
13390af4 25
6762286d
SC
26class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
27{
28DECLARE_DYNAMIC_CLASS(wxFileDialog)
29protected:
30 wxArrayString m_fileNames;
31 wxArrayString m_paths;
32
33public:
34 wxFileDialog(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
681bf55c
SC
44#if wxOSX_USE_COCOA
45 ~wxFileDialog();
46#endif
47
6762286d
SC
48 virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
49 virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
50
51 virtual int ShowModal();
ce00f59b 52
bfa92264
KO
53#if wxOSX_USE_COCOA
54 virtual void ShowWindowModal();
55 virtual void ModalFinishedCallback(void* panel, int resultCode);
56#endif
6762286d 57
61ad44c7 58 virtual bool SupportsExtraControl() const;
13390af4
SC
59
60 // implementation only
61
62#if wxOSX_USE_COCOA
63 // returns true if the file can be shown as active
64 bool CheckFile( const wxString& filename );
65#endif
ce00f59b 66
6762286d
SC
67protected:
68 // not supported for file dialog, RR
69 virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
70 int WXUNUSED(width), int WXUNUSED(height),
71 int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
ce00f59b 72
2f30930a 73 void SetupExtraControls(WXWindow nativeWindow);
13390af4
SC
74
75#if wxOSX_USE_COCOA
76 virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
cbbb1f54 77 void DoOnFilterSelected(int index);
13390af4
SC
78 virtual void OnFilterSelected(wxCommandEvent &event);
79
80 wxArrayString m_filterExtensions;
81 wxArrayString m_filterNames;
82 wxChoice* m_filterChoice;
83 wxWindow* m_filterPanel;
84 bool m_useFileTypeFilter;
85 int m_firstFileTypeFilter;
86 wxArrayString m_currentExtensions;
87 WX_NSObject m_delegate;
681bf55c 88 WX_NSObject m_sheetDelegate;
13390af4 89#endif
6762286d
SC
90};
91
92#endif // _WX_FILEDLG_H_