1998-12-17 20:56:27 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dirdlgg.h
|
2002-01-06 23:10:56 +00:00
|
|
|
// Purpose: wxGenericDirCtrl class
|
|
|
|
// Builds on wxDirCtrl class written by Robert Roebling for the
|
|
|
|
// wxFile application, modified by Harm van der Heijden.
|
|
|
|
// Further modified for Windows.
|
|
|
|
// Author: Robert Roebling, Harm van der Heijden, Julian Smart et al
|
1998-12-17 20:56:27 +00:00
|
|
|
// Modified by:
|
2002-01-06 23:10:56 +00:00
|
|
|
// Created: 21/3/2000
|
1999-08-17 15:55:25 +00:00
|
|
|
// RCS-ID: $Id$
|
2002-01-06 23:10:56 +00:00
|
|
|
// Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
1998-12-17 20:56:27 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DIRDLGG_H_
|
|
|
|
#define _WX_DIRDLGG_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "dirdlgg.h"
|
|
|
|
#endif
|
|
|
|
|
1999-06-15 20:21:59 +00:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
#if wxUSE_DIRDLG
|
|
|
|
|
1998-12-17 20:56:27 +00:00
|
|
|
#include "wx/dialog.h"
|
2002-01-06 23:10:56 +00:00
|
|
|
class WXDLLEXPORT wxGenericDirCtrl;
|
2001-10-30 16:58:42 +00:00
|
|
|
class WXDLLEXPORT wxTextCtrl;
|
2002-01-06 23:10:56 +00:00
|
|
|
class WXDLLEXPORT wxTreeEvent;
|
2001-10-30 16:58:42 +00:00
|
|
|
|
1998-12-17 20:56:27 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
2002-01-06 23:10:56 +00:00
|
|
|
// wxGenericDirDialog
|
1999-08-15 15:18:54 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2002-01-08 23:25:01 +00:00
|
|
|
class WXDLLEXPORT wxGenericDirDialog: public wxDialog
|
1999-08-15 15:18:54 +00:00
|
|
|
{
|
|
|
|
public:
|
2002-01-06 23:10:56 +00:00
|
|
|
wxGenericDirDialog(): wxDialog() {}
|
|
|
|
wxGenericDirDialog(wxWindow* parent, const wxString& title,
|
2002-01-25 22:47:37 +00:00
|
|
|
const wxString& defaultPath = wxEmptyString,
|
2002-04-10 09:35:36 +00:00
|
|
|
long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON,
|
2002-01-25 22:47:37 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& sz = wxSize(450, 550),
|
2002-01-06 23:10:56 +00:00
|
|
|
const wxString& name = _T("dialog"));
|
|
|
|
|
|
|
|
//// Accessors
|
1998-12-17 20:56:27 +00:00
|
|
|
inline void SetMessage(const wxString& message) { m_message = message; }
|
2002-01-06 23:10:56 +00:00
|
|
|
void SetPath(const wxString& path);
|
1998-12-17 20:56:27 +00:00
|
|
|
inline void SetStyle(long style) { m_dialogStyle = style; }
|
|
|
|
|
2002-01-06 23:10:56 +00:00
|
|
|
inline wxString GetMessage(void) const { return m_message; }
|
|
|
|
wxString GetPath(void) const;
|
|
|
|
inline long GetStyle(void) const { return m_dialogStyle; }
|
|
|
|
|
|
|
|
wxTextCtrl* GetInputCtrl() const { return m_input; }
|
1998-12-17 20:56:27 +00:00
|
|
|
|
2002-01-06 23:10:56 +00:00
|
|
|
//// Overrides
|
1998-12-17 20:56:27 +00:00
|
|
|
int ShowModal();
|
|
|
|
|
2002-01-06 23:10:56 +00:00
|
|
|
protected:
|
|
|
|
//// Event handlers
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
1998-12-17 20:56:27 +00:00
|
|
|
void OnOK(wxCommandEvent& event);
|
2002-01-06 23:10:56 +00:00
|
|
|
void OnTreeSelected(wxTreeEvent &event);
|
|
|
|
void OnTreeKeyDown(wxTreeEvent &event);
|
1998-12-17 20:56:27 +00:00
|
|
|
void OnNew(wxCommandEvent& event);
|
2002-04-07 23:08:51 +00:00
|
|
|
void OnGoHome(wxCommandEvent& event);
|
2002-01-09 18:00:39 +00:00
|
|
|
void OnShowHidden(wxCommandEvent& event);
|
1998-12-17 20:56:27 +00:00
|
|
|
|
2002-01-06 23:10:56 +00:00
|
|
|
wxString m_message;
|
|
|
|
long m_dialogStyle;
|
|
|
|
wxString m_path;
|
|
|
|
wxGenericDirCtrl* m_dirCtrl;
|
|
|
|
wxTextCtrl* m_input;
|
|
|
|
|
1999-08-15 15:18:54 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-12-17 20:56:27 +00:00
|
|
|
};
|
|
|
|
|
2002-01-25 22:47:37 +00:00
|
|
|
#if !defined(__WXMSW__) && !defined(__WXMAC__)
|
2002-01-06 23:10:56 +00:00
|
|
|
#define wxDirDialog wxGenericDirDialog
|
1999-06-15 20:21:59 +00:00
|
|
|
#endif
|
|
|
|
|
2002-01-06 23:10:56 +00:00
|
|
|
#endif // wxUSE_DIRDLG
|
1998-12-17 20:56:27 +00:00
|
|
|
|
2002-01-06 23:10:56 +00:00
|
|
|
#endif // _WX_DIRDLGG_H_
|