]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/generic/dirdlgg.h
create greyed image for wxBitmapButton in MSW automatically, as in wxGTK (replaces...
[wxWidgets.git] / include / wx / generic / dirdlgg.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/generic/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
18class WXDLLIMPEXP_FWD_CORE wxGenericDirCtrl;
19class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
20class WXDLLIMPEXP_FWD_CORE wxTreeEvent;
21
22// we may be included directly as well as from wx/dirdlg.h (FIXME)
23extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogNameStr[];
24extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
25
26#ifndef wxDD_DEFAULT_STYLE
27#ifdef __WXWINCE__
28 #define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE
29#else
30 #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
31#endif
32#endif
33
34#include "wx/dialog.h"
35
36//-----------------------------------------------------------------------------
37// wxGenericDirDialog
38//-----------------------------------------------------------------------------
39
40class WXDLLEXPORT wxGenericDirDialog : public wxDirDialogBase
41{
42public:
43 wxGenericDirDialog() : wxDirDialogBase() { }
44
45 wxGenericDirDialog(wxWindow* parent,
46 const wxString& title = wxDirSelectorPromptStr,
47 const wxString& defaultPath = wxEmptyString,
48 long style = wxDD_DEFAULT_STYLE,
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& sz = wxDefaultSize,//Size(450, 550),
51 const wxString& name = wxDirDialogNameStr);
52
53 bool Create(wxWindow* parent,
54 const wxString& title = wxDirSelectorPromptStr,
55 const wxString& defaultPath = wxEmptyString,
56 long style = wxDD_DEFAULT_STYLE,
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& sz = wxDefaultSize,//Size(450, 550),
59 const wxString& name = wxDirDialogNameStr);
60
61 //// Accessors
62 void SetPath(const wxString& path);
63 wxString GetPath() const;
64
65 //// Overrides
66 virtual int ShowModal();
67 virtual void EndModal(int retCode);
68
69 // this one is specific to wxGenericDirDialog
70 wxTextCtrl* GetInputCtrl() const { return m_input; }
71
72protected:
73 //// Event handlers
74 void OnCloseWindow(wxCloseEvent& event);
75 void OnOK(wxCommandEvent& event);
76 void OnTreeSelected(wxTreeEvent &event);
77 void OnTreeKeyDown(wxTreeEvent &event);
78 void OnNew(wxCommandEvent& event);
79 void OnGoHome(wxCommandEvent& event);
80 void OnShowHidden(wxCommandEvent& event);
81
82 wxGenericDirCtrl* m_dirCtrl;
83 wxTextCtrl* m_input;
84
85 DECLARE_EVENT_TABLE()
86 DECLARE_DYNAMIC_CLASS(wxGenericDirDialog)
87};
88
89#endif // _WX_DIRDLGG_H_