1998-12-17 15:56:27 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dirdlgg.h
|
2002-01-06 18:10:56 -05: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 15:56:27 -05:00
|
|
|
// Modified by:
|
2002-01-06 18:10:56 -05:00
|
|
|
// Created: 21/3/2000
|
1999-08-17 11:55:25 -04:00
|
|
|
// RCS-ID: $Id$
|
2002-01-06 18:10:56 -05:00
|
|
|
// Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
1998-12-17 15:56:27 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DIRDLGG_H_
|
|
|
|
#define _WX_DIRDLGG_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "dirdlgg.h"
|
|
|
|
#endif
|
|
|
|
|
1999-06-15 16:21:59 -04:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
#if wxUSE_DIRDLG
|
|
|
|
|
1998-12-17 15:56:27 -05:00
|
|
|
#include "wx/dialog.h"
|
2002-01-06 18:10:56 -05:00
|
|
|
class WXDLLEXPORT wxGenericDirCtrl;
|
2001-10-30 11:58:42 -05:00
|
|
|
class WXDLLEXPORT wxTextCtrl;
|
2002-01-06 18:10:56 -05:00
|
|
|
class WXDLLEXPORT wxTreeEvent;
|
2001-10-30 11:58:42 -05:00
|
|
|
|
1998-12-17 15:56:27 -05:00
|
|
|
//-----------------------------------------------------------------------------
|
2002-01-06 18:10:56 -05:00
|
|
|
// wxGenericDirDialog
|
1999-08-15 11:18:54 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2002-01-08 18:25:01 -05:00
|
|
|
class WXDLLEXPORT wxGenericDirDialog: public wxDialog
|
1999-08-15 11:18:54 -04:00
|
|
|
{
|
|
|
|
public:
|
2002-01-06 18:10:56 -05:00
|
|
|
wxGenericDirDialog(): wxDialog() {}
|
|
|
|
wxGenericDirDialog(wxWindow* parent, const wxString& title,
|
2002-01-25 17:47:37 -05:00
|
|
|
const wxString& defaultPath = wxEmptyString,
|
2002-01-06 18:10:56 -05:00
|
|
|
long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER,
|
2002-01-25 17:47:37 -05:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& sz = wxSize(450, 550),
|
2002-01-06 18:10:56 -05:00
|
|
|
const wxString& name = _T("dialog"));
|
|
|
|
|
|
|
|
//// Accessors
|
1998-12-17 15:56:27 -05:00
|
|
|
inline void SetMessage(const wxString& message) { m_message = message; }
|
2002-01-06 18:10:56 -05:00
|
|
|
void SetPath(const wxString& path);
|
1998-12-17 15:56:27 -05:00
|
|
|
inline void SetStyle(long style) { m_dialogStyle = style; }
|
|
|
|
|
2002-01-06 18:10:56 -05: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 15:56:27 -05:00
|
|
|
|
2002-01-06 18:10:56 -05:00
|
|
|
//// Overrides
|
1998-12-17 15:56:27 -05:00
|
|
|
int ShowModal();
|
|
|
|
|
2002-01-06 18:10:56 -05:00
|
|
|
protected:
|
|
|
|
//// Event handlers
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
1998-12-17 15:56:27 -05:00
|
|
|
void OnOK(wxCommandEvent& event);
|
2002-01-06 18:10:56 -05:00
|
|
|
void OnTreeSelected(wxTreeEvent &event);
|
|
|
|
void OnTreeKeyDown(wxTreeEvent &event);
|
1998-12-17 15:56:27 -05:00
|
|
|
void OnNew(wxCommandEvent& event);
|
2002-01-09 13:00:39 -05:00
|
|
|
void OnShowHidden(wxCommandEvent& event);
|
1998-12-17 15:56:27 -05:00
|
|
|
|
2002-01-06 18:10:56 -05:00
|
|
|
wxString m_message;
|
|
|
|
long m_dialogStyle;
|
|
|
|
wxString m_path;
|
|
|
|
wxGenericDirCtrl* m_dirCtrl;
|
|
|
|
wxTextCtrl* m_input;
|
|
|
|
|
1999-08-15 11:18:54 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-12-17 15:56:27 -05:00
|
|
|
};
|
|
|
|
|
2002-01-25 17:47:37 -05:00
|
|
|
#if !defined(__WXMSW__) && !defined(__WXMAC__)
|
2002-01-06 18:10:56 -05:00
|
|
|
#define wxDirDialog wxGenericDirDialog
|
1999-06-15 16:21:59 -04:00
|
|
|
#endif
|
|
|
|
|
2002-01-06 18:10:56 -05:00
|
|
|
#endif // wxUSE_DIRDLG
|
1998-12-17 15:56:27 -05:00
|
|
|
|
2002-01-06 18:10:56 -05:00
|
|
|
#endif // _WX_DIRDLGG_H_
|