]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/dirdlgg.h
MSVC 5 fix.
[wxWidgets.git] / include / wx / generic / dirdlgg.h
CommitLineData
d7a15103 1/////////////////////////////////////////////////////////////////////////////
74d8ead3 2// Name: wx/generic/dirdlgg.h
748fcded
VS
3// Purpose: wxGenericDirCtrl class
4// Builds on wxDirCtrl class written by Robert Roebling for the
5// wxFile application, modified by Harm van der Heijden.
6// Further modified for Windows.
7// Author: Robert Roebling, Harm van der Heijden, Julian Smart et al
d7a15103 8// Modified by:
748fcded 9// Created: 21/3/2000
8b17ba72 10// RCS-ID: $Id$
748fcded
VS
11// Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
12// Licence: wxWindows licence
d7a15103
JS
13/////////////////////////////////////////////////////////////////////////////
14
15#ifndef _WX_DIRDLGG_H_
16#define _WX_DIRDLGG_H_
17
12028905 18#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
d7a15103
JS
19#pragma interface "dirdlgg.h"
20#endif
21
748fcded 22class WXDLLEXPORT wxGenericDirCtrl;
10eb1f1e 23class WXDLLEXPORT wxTextCtrl;
748fcded 24class WXDLLEXPORT wxTreeEvent;
10eb1f1e 25
74d8ead3
VZ
26// we may be included directly as well as from wx/dirdlg.h (FIXME)
27WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogNameStr;
28WXDLLEXPORT_DATA(extern const wxChar*) wxDirSelectorPromptStr;
29#ifndef wxDD_DEFAULT_STYLE
30 #define wxDD_DEFAULT_STYLE \
31 (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON)
32#endif
33
34#include "wx/dialog.h"
35
d7a15103 36//-----------------------------------------------------------------------------
748fcded 37// wxGenericDirDialog
dc6c62a9
RR
38//-----------------------------------------------------------------------------
39
74d8ead3 40class WXDLLEXPORT wxGenericDirDialog : public wxDialog
dc6c62a9
RR
41{
42public:
e78d4a23
VZ
43 wxGenericDirDialog() : wxDialog() { }
44
45 wxGenericDirDialog(wxWindow* parent,
46 const wxString& title = wxDirSelectorPromptStr,
957aea45 47 const wxString& defaultPath = wxEmptyString,
e78d4a23 48 long style = wxDD_DEFAULT_STYLE,
957aea45
DW
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& sz = wxSize(450, 550),
e78d4a23 51 const wxString& name = wxDirDialogNameStr);
748fcded
VS
52
53 //// Accessors
74d8ead3 54 void SetMessage(const wxString& message) { m_message = message; }
748fcded 55 void SetPath(const wxString& path);
74d8ead3 56 void SetStyle(long style) { m_dialogStyle = style; }
d7a15103 57
74d8ead3
VZ
58 wxString GetMessage() const { return m_message; }
59 wxString GetPath() const;
60 long GetStyle() const { return m_dialogStyle; }
d7a15103 61
748fcded 62 //// Overrides
74d8ead3
VZ
63 virtual int ShowModal();
64
65 // this one is specific to wxGenericDirDialog
66 wxTextCtrl* GetInputCtrl() const { return m_input; }
d7a15103 67
748fcded
VS
68protected:
69 //// Event handlers
70 void OnCloseWindow(wxCloseEvent& event);
d7a15103 71 void OnOK(wxCommandEvent& event);
748fcded
VS
72 void OnTreeSelected(wxTreeEvent &event);
73 void OnTreeKeyDown(wxTreeEvent &event);
d7a15103 74 void OnNew(wxCommandEvent& event);
e13ea14e 75 void OnGoHome(wxCommandEvent& event);
42dcacf0 76 void OnShowHidden(wxCommandEvent& event);
d7a15103 77
748fcded
VS
78 wxString m_message;
79 long m_dialogStyle;
80 wxString m_path;
81 wxGenericDirCtrl* m_dirCtrl;
82 wxTextCtrl* m_input;
83
dc6c62a9 84 DECLARE_EVENT_TABLE()
d6379fa3 85 DECLARE_DYNAMIC_CLASS(wxGenericDirDialog)
d7a15103
JS
86};
87
748fcded 88#endif // _WX_DIRDLGG_H_