]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/dirdlgg.h
added ping location for IRIX
[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
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 26// we may be included directly as well as from wx/dirdlg.h (FIXME)
f4fffffc
WS
27extern WXDLLEXPORT_DATA(const wxChar*) wxDirDialogNameStr;
28extern WXDLLEXPORT_DATA(const wxChar*) wxDirSelectorPromptStr;
74d8ead3 29#ifndef wxDD_DEFAULT_STYLE
259a6e38
JS
30
31#ifdef __WXWINCE__
32 #define wxDD_DEFAULT_STYLE \
33 (wxDEFAULT_DIALOG_STYLE | wxDD_NEW_DIR_BUTTON)
34#else
74d8ead3
VZ
35 #define wxDD_DEFAULT_STYLE \
36 (wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON)
37#endif
259a6e38 38#endif
74d8ead3
VZ
39
40#include "wx/dialog.h"
41
d7a15103 42//-----------------------------------------------------------------------------
748fcded 43// wxGenericDirDialog
dc6c62a9
RR
44//-----------------------------------------------------------------------------
45
74d8ead3 46class WXDLLEXPORT wxGenericDirDialog : public wxDialog
dc6c62a9
RR
47{
48public:
e78d4a23
VZ
49 wxGenericDirDialog() : wxDialog() { }
50
51 wxGenericDirDialog(wxWindow* parent,
52 const wxString& title = wxDirSelectorPromptStr,
957aea45 53 const wxString& defaultPath = wxEmptyString,
e78d4a23 54 long style = wxDD_DEFAULT_STYLE,
957aea45
DW
55 const wxPoint& pos = wxDefaultPosition,
56 const wxSize& sz = wxSize(450, 550),
e78d4a23 57 const wxString& name = wxDirDialogNameStr);
748fcded
VS
58
59 //// Accessors
74d8ead3 60 void SetMessage(const wxString& message) { m_message = message; }
748fcded 61 void SetPath(const wxString& path);
74d8ead3 62 void SetStyle(long style) { m_dialogStyle = style; }
d7a15103 63
74d8ead3
VZ
64 wxString GetMessage() const { return m_message; }
65 wxString GetPath() const;
66 long GetStyle() const { return m_dialogStyle; }
d7a15103 67
748fcded 68 //// Overrides
74d8ead3
VZ
69 virtual int ShowModal();
70
71 // this one is specific to wxGenericDirDialog
72 wxTextCtrl* GetInputCtrl() const { return m_input; }
d7a15103 73
748fcded
VS
74protected:
75 //// Event handlers
76 void OnCloseWindow(wxCloseEvent& event);
d7a15103 77 void OnOK(wxCommandEvent& event);
748fcded
VS
78 void OnTreeSelected(wxTreeEvent &event);
79 void OnTreeKeyDown(wxTreeEvent &event);
d7a15103 80 void OnNew(wxCommandEvent& event);
e13ea14e 81 void OnGoHome(wxCommandEvent& event);
42dcacf0 82 void OnShowHidden(wxCommandEvent& event);
d7a15103 83
748fcded
VS
84 wxString m_message;
85 long m_dialogStyle;
86 wxString m_path;
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_