]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/dirdlgg.h
Made widgets sample take up less space
[wxWidgets.git] / include / wx / generic / dirdlgg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dirdlgg.h
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
8 // Modified by:
9 // Created: 21/3/2000
10 // RCS-ID: $Id$
11 // Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
12 // Licence: wxWindows licence
13 /////////////////////////////////////////////////////////////////////////////
14
15 #ifndef _WX_DIRDLGG_H_
16 #define _WX_DIRDLGG_H_
17
18 #ifdef __GNUG__
19 #pragma interface "dirdlgg.h"
20 #endif
21
22 #include "wx/defs.h"
23
24 #if wxUSE_DIRDLG
25
26 #include "wx/dialog.h"
27 class WXDLLEXPORT wxGenericDirCtrl;
28 class WXDLLEXPORT wxTextCtrl;
29 class WXDLLEXPORT wxTreeEvent;
30
31 //-----------------------------------------------------------------------------
32 // wxGenericDirDialog
33 //-----------------------------------------------------------------------------
34
35 class WXDLLEXPORT wxGenericDirDialog: public wxDialog
36 {
37 public:
38 wxGenericDirDialog(): wxDialog() {}
39 wxGenericDirDialog(wxWindow* parent, const wxString& title,
40 const wxString& defaultPath = wxEmptyString,
41 long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& sz = wxSize(450, 550),
44 const wxString& name = _T("dialog"));
45
46 //// Accessors
47 inline void SetMessage(const wxString& message) { m_message = message; }
48 void SetPath(const wxString& path);
49 inline void SetStyle(long style) { m_dialogStyle = style; }
50
51 inline wxString GetMessage(void) const { return m_message; }
52 wxString GetPath(void) const;
53 inline long GetStyle(void) const { return m_dialogStyle; }
54
55 wxTextCtrl* GetInputCtrl() const { return m_input; }
56
57 //// Overrides
58 int ShowModal();
59
60 protected:
61 //// Event handlers
62 void OnCloseWindow(wxCloseEvent& event);
63 void OnOK(wxCommandEvent& event);
64 void OnTreeSelected(wxTreeEvent &event);
65 void OnTreeKeyDown(wxTreeEvent &event);
66 void OnNew(wxCommandEvent& event);
67 void OnGoHome(wxCommandEvent& event);
68 void OnShowHidden(wxCommandEvent& event);
69
70 wxString m_message;
71 long m_dialogStyle;
72 wxString m_path;
73 wxGenericDirCtrl* m_dirCtrl;
74 wxTextCtrl* m_input;
75
76 DECLARE_EVENT_TABLE()
77 };
78
79 #if !defined(__WXMSW__) && !defined(__WXMAC__)
80 #define wxDirDialog wxGenericDirDialog
81 #endif
82
83 #endif // wxUSE_DIRDLG
84
85 #endif // _WX_DIRDLGG_H_