]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/dirdlgg.h
simplify the client data/non standard images handling code by unconditionally using...
[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 11// Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
65571936 12// Licence: wxWindows licence
d7a15103
JS
13/////////////////////////////////////////////////////////////////////////////
14
15#ifndef _WX_DIRDLGG_H_
16#define _WX_DIRDLGG_H_
17
748fcded 18class WXDLLEXPORT wxGenericDirCtrl;
10eb1f1e 19class WXDLLEXPORT wxTextCtrl;
748fcded 20class WXDLLEXPORT wxTreeEvent;
10eb1f1e 21
74d8ead3 22// we may be included directly as well as from wx/dirdlg.h (FIXME)
63ec432b
MR
23extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogNameStr[];
24extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
74d8ead3 25#ifndef wxDD_DEFAULT_STYLE
259a6e38
JS
26
27#ifdef __WXWINCE__
28 #define wxDD_DEFAULT_STYLE \
29 (wxDEFAULT_DIALOG_STYLE | wxDD_NEW_DIR_BUTTON)
30#else
74d8ead3
VZ
31 #define wxDD_DEFAULT_STYLE \
32 (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON)
33#endif
259a6e38 34#endif
74d8ead3
VZ
35
36#include "wx/dialog.h"
37
d7a15103 38//-----------------------------------------------------------------------------
748fcded 39// wxGenericDirDialog
dc6c62a9
RR
40//-----------------------------------------------------------------------------
41
b50747ea 42class WXDLLEXPORT wxGenericDirDialog : public wxDirDialogBase
dc6c62a9
RR
43{
44public:
b50747ea 45 wxGenericDirDialog() : wxDirDialogBase() { }
e78d4a23
VZ
46
47 wxGenericDirDialog(wxWindow* parent,
48 const wxString& title = wxDirSelectorPromptStr,
957aea45 49 const wxString& defaultPath = wxEmptyString,
e78d4a23 50 long style = wxDD_DEFAULT_STYLE,
957aea45 51 const wxPoint& pos = wxDefaultPosition,
b50747ea
RR
52 const wxSize& sz = wxDefaultSize,//Size(450, 550),
53 const wxString& name = wxDirDialogNameStr);
54
55 bool Create(wxWindow* parent,
56 const wxString& title = wxDirSelectorPromptStr,
57 const wxString& defaultPath = wxEmptyString,
58 long style = wxDD_DEFAULT_STYLE,
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& sz = wxDefaultSize,//Size(450, 550),
e78d4a23 61 const wxString& name = wxDirDialogNameStr);
748fcded
VS
62
63 //// Accessors
748fcded 64 void SetPath(const wxString& path);
74d8ead3 65 void SetStyle(long style) { m_dialogStyle = style; }
d7a15103 66
74d8ead3
VZ
67 wxString GetPath() const;
68 long GetStyle() const { return m_dialogStyle; }
d7a15103 69
748fcded 70 //// Overrides
74d8ead3
VZ
71 virtual int ShowModal();
72
73 // this one is specific to wxGenericDirDialog
74 wxTextCtrl* GetInputCtrl() const { return m_input; }
d7a15103 75
748fcded
VS
76protected:
77 //// Event handlers
78 void OnCloseWindow(wxCloseEvent& event);
d7a15103 79 void OnOK(wxCommandEvent& event);
748fcded
VS
80 void OnTreeSelected(wxTreeEvent &event);
81 void OnTreeKeyDown(wxTreeEvent &event);
d7a15103 82 void OnNew(wxCommandEvent& event);
e13ea14e 83 void OnGoHome(wxCommandEvent& event);
42dcacf0 84 void OnShowHidden(wxCommandEvent& event);
d7a15103 85
748fcded 86 long m_dialogStyle;
748fcded
VS
87 wxGenericDirCtrl* m_dirCtrl;
88 wxTextCtrl* m_input;
89
dc6c62a9 90 DECLARE_EVENT_TABLE()
d6379fa3 91 DECLARE_DYNAMIC_CLASS(wxGenericDirDialog)
d7a15103
JS
92};
93
748fcded 94#endif // _WX_DIRDLGG_H_