]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/dirdlg.h
Support using GetTextExtent() with empty string to get descent in wxOSX.
[wxWidgets.git] / include / wx / osx / dirdlg.h
CommitLineData
6762286d 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/osx/dirdlg.h
6762286d
SC
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
95c854df
VZ
15#if wxOSX_USE_COCOA
16 DECLARE_WXCOCOA_OBJC_CLASS(NSOpenPanel);
17#endif
18
6762286d
SC
19class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase
20{
21public:
aad2997b
VZ
22 wxDirDialog() { Init(); }
23
6762286d 24 wxDirDialog(wxWindow *parent,
aad2997b
VZ
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,
6762286d 38 const wxString& message = wxDirSelectorPromptStr,
9a83f860 39 const wxString& defaultPath = wxT(""),
6762286d
SC
40 long style = wxDD_DEFAULT_STYLE,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 const wxString& name = wxDirDialogNameStr);
44
681bf55c
SC
45#if wxOSX_USE_COCOA
46 ~wxDirDialog();
47#endif
48
6762286d 49 virtual int ShowModal();
ce00f59b 50
bfa92264
KO
51#if wxOSX_USE_COCOA
52 virtual void ShowWindowModal();
53 virtual void ModalFinishedCallback(void* panel, int returnCode);
ce00f59b 54#endif
6762286d 55
95c854df 56private:
681bf55c 57#if wxOSX_USE_COCOA
95c854df
VZ
58 // Create and initialize NSOpenPanel that we use in both ShowModal() and
59 // ShowWindowModal().
60 WX_NSOpenPanel OSXCreatePanel() const;
61
681bf55c
SC
62 WX_NSObject m_sheetDelegate;
63#endif
95c854df 64
aad2997b
VZ
65 // Common part of all ctors.
66 void Init();
67
95c854df 68 DECLARE_DYNAMIC_CLASS(wxDirDialog)
6762286d
SC
69};
70
95c854df 71#endif // _WX_DIRDLG_H_