]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/dirdlg.h
9b7660e883127d93ee3854f0c5bff608e3be3887
[wxWidgets.git] / include / wx / osx / dirdlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/dirdlg.h
3 // Purpose: wxDirDialog 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_DIRDLG_H_
13 #define _WX_DIRDLG_H_
14
15 #if wxOSX_USE_COCOA
16 DECLARE_WXCOCOA_OBJC_CLASS(NSOpenPanel);
17 #endif
18
19 class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
20 {
21 public:
22 wxDirDialog() { Init(); }
23
24 wxDirDialog(wxWindow *parent,
25 const wxString& message = wxDirSelectorPromptStr,
26 const wxString& defaultPath = wxT(""),
27 long style = wxDD_DEFAULT_STYLE,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 const wxString& name = wxDirDialogNameStr)
31 {
32 Init();
33
34 Create(parent,message,defaultPath,style,pos,size,name);
35 }
36
37 void Create(wxWindow *parent,
38 const wxString& message = wxDirSelectorPromptStr,
39 const wxString& defaultPath = wxT(""),
40 long style = wxDD_DEFAULT_STYLE,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 const wxString& name = wxDirDialogNameStr);
44
45 #if wxOSX_USE_COCOA
46 ~wxDirDialog();
47 #endif
48
49 virtual int ShowModal();
50
51 #if wxOSX_USE_COCOA
52 virtual void ShowWindowModal();
53 virtual void ModalFinishedCallback(void* panel, int returnCode);
54 #endif
55
56 private:
57 #if wxOSX_USE_COCOA
58 // Create and initialize NSOpenPanel that we use in both ShowModal() and
59 // ShowWindowModal().
60 WX_NSOpenPanel OSXCreatePanel() const;
61
62 WX_NSObject m_sheetDelegate;
63 #endif
64
65 // Common part of all ctors.
66 void Init();
67
68 DECLARE_DYNAMIC_CLASS(wxDirDialog)
69 };
70
71 #endif // _WX_DIRDLG_H_