]> git.saurik.com Git - wxWidgets.git/blob - src/common/dseldlg.cpp
Added files for GnomeVFS backend (currently useful
[wxWidgets.git] / src / common / dseldlg.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/dseldlg.cpp
3 // Purpose: implementation of ::wxDirSelector()
4 // Author: Paul Thiessen
5 // Modified by:
6 // Created: 20.02.01
7 // RCS-ID: $Id$
8 // Copyright: (c) 2001 wxWidgets team
9 // License: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 // ============================================================================
13 // declarations
14 // ============================================================================
15
16 // ----------------------------------------------------------------------------
17 // headers
18 // ----------------------------------------------------------------------------
19
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
22
23 #ifdef __BORLANDC__
24 #pragma hdrstop
25 #endif
26
27 #ifndef WX_PRECOMP
28 #endif //WX_PRECOMP
29
30 #include "wx/dirdlg.h"
31
32 #if wxUSE_DIRDLG
33
34 // ============================================================================
35 // implementation
36 // ============================================================================
37
38 const wxChar wxDirSelectorPromptStr[] = wxT("Select a directory");
39
40 wxString wxDirSelector(const wxString& message,
41 const wxString& defaultPath,
42 long style,
43 const wxPoint& pos,
44 wxWindow *parent)
45 {
46 wxString path;
47
48 wxDirDialog dirDialog(parent, message, defaultPath, style, pos);
49 if ( dirDialog.ShowModal() == wxID_OK )
50 {
51 path = dirDialog.GetPath();
52 }
53
54 return path;
55 }
56
57 #endif // wxUSE_DIRDLG
58