]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/osx/filedlg.h
Document wxKill(wxSIGTERM) reliance on having an open window in wxMSW.
[wxWidgets.git] / include / wx / osx / filedlg.h
index aa9f39da24ee2c717190ee766922d90d641fff03..7b1e58a6959d2b2d14a0494e122ff79be7d2177b 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        filedlg.h
+// Name:        wx/osx/filedlg.h
 // Purpose:     wxFileDialog class
 // Author:      Stefan Csomor
 // Modified by:
@@ -12,6 +12,8 @@
 #ifndef _WX_FILEDLG_H_
 #define _WX_FILEDLG_H_
 
+class WXDLLIMPEXP_FWD_CORE wxChoice;
+
 //-------------------------------------------------------------------------
 // wxFileDialog
 //-------------------------------------------------------------------------
@@ -19,7 +21,7 @@
 // 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")
+#define wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES wxT("osx.openfiledialog.always-show-types")
 
 class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
 {
@@ -29,7 +31,23 @@ protected:
     wxArrayString m_paths;
 
 public:
+    wxFileDialog() { Init(); }
     wxFileDialog(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)
+    {
+        Init();
+
+        Create(parent,message,defaultDir,defaultFile,wildCard,style,pos,sz,name);
+    }
+
+    void Create(wxWindow *parent,
                  const wxString& message = wxFileSelectorPromptStr,
                  const wxString& defaultDir = wxEmptyString,
                  const wxString& defaultFile = wxEmptyString,
@@ -39,6 +57,10 @@ public:
                  const wxSize& sz = wxDefaultSize,
                  const wxString& name = wxFileDialogNameStr);
 
+#if wxOSX_USE_COCOA
+    ~wxFileDialog();
+#endif
+    
     virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
     virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
 
@@ -68,6 +90,7 @@ protected:
     
 #if wxOSX_USE_COCOA
     virtual wxWindow* CreateFilterPanel(wxWindow *extracontrol);
+    void DoOnFilterSelected(int index);
     virtual void OnFilterSelected(wxCommandEvent &event);
 
     wxArrayString m_filterExtensions;
@@ -78,7 +101,12 @@ protected:
     int m_firstFileTypeFilter;
     wxArrayString m_currentExtensions;
     WX_NSObject m_delegate;
+    WX_NSObject m_sheetDelegate;
 #endif
+
+private:
+    // Common part of all ctors.
+    void Init();
 };
 
 #endif // _WX_FILEDLG_H_