support for file-type popup, compatible for 10.4+, solves #12429

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2011-02-18 17:29:31 +00:00
parent d814b237d9
commit 13390af486
3 changed files with 395 additions and 106 deletions

View File

@@ -16,6 +16,11 @@
// wxFileDialog
//-------------------------------------------------------------------------
// set this system option to 1 in order to always show the filetypes popup in
// file open dialogs if possible
#define wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES wxT("osx.filedlg.always-show-types")
class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
{
DECLARE_DYNAMIC_CLASS(wxFileDialog)
@@ -45,6 +50,13 @@ public:
#endif
virtual bool SupportsExtraControl() const;
// implementation only
#if wxOSX_USE_COCOA
// returns true if the file can be shown as active
bool CheckFile( const wxString& filename );
#endif
protected:
// not supported for file dialog, RR
@@ -53,6 +65,20 @@ protected:
int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
void SetupExtraControls(WXWindow nativeWindow);
#if wxOSX_USE_COCOA
virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
virtual void OnFilterSelected(wxCommandEvent &event);
wxArrayString m_filterExtensions;
wxArrayString m_filterNames;
wxChoice* m_filterChoice;
wxWindow* m_filterPanel;
bool m_useFileTypeFilter;
int m_firstFileTypeFilter;
wxArrayString m_currentExtensions;
WX_NSObject m_delegate;
#endif
};
#endif // _WX_FILEDLG_H_