]>
Commit | Line | Data |
---|---|---|
10eb1f1e VZ |
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 wxWindows team | |
9 | // License: wxWindows license | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | // ============================================================================ | |
13 | // declarations | |
14 | // ============================================================================ | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // headers | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #ifdef __GNUG__ | |
21 | #pragma implementation "dseldlg.h" | |
22 | #endif | |
23 | ||
24 | // For compilers that support precompilation, includes "wx.h". | |
25 | #include "wx/wxprec.h" | |
26 | ||
27 | #ifdef __BORLANDC__ | |
28 | #pragma hdrstop | |
29 | #endif | |
30 | ||
31 | #ifndef WX_PRECOMP | |
32 | #endif //WX_PRECOMP | |
33 | ||
34 | #include "wx/dirdlg.h" | |
35 | ||
36 | #if wxUSE_DIRDLG | |
37 | ||
38 | // ============================================================================ | |
39 | // implementation | |
40 | // ============================================================================ | |
41 | ||
42 | const wxChar *wxDirSelectorPromptStr = wxT("Select a directory"); | |
43 | ||
44 | wxString wxDirSelector(const wxString& message, | |
45 | const wxString& defaultPath, | |
46 | long style, | |
47 | const wxPoint& pos, | |
48 | wxWindow *parent) | |
49 | { | |
50 | wxString path; | |
51 | ||
52 | wxDirDialog dirDialog(parent, message, defaultPath, style, pos); | |
53 | if ( dirDialog.ShowModal() == wxID_OK ) | |
54 | { | |
55 | path = dirDialog.GetPath(); | |
56 | } | |
57 | ||
58 | return path; | |
59 | } | |
60 | ||
61 | #endif // wxUSE_DIRDLG | |
62 |