1998-12-17 20:56:27 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2002-05-04 12:45:14 +00:00
|
|
|
// Name: wx/generic/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
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-12-17 20:56:27 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DIRDLGG_H_
|
|
|
|
#define _WX_DIRDLGG_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
|
|
|
|
2002-05-04 12:45:14 +00:00
|
|
|
// we may be included directly as well as from wx/dirdlg.h (FIXME)
|
2006-01-16 14:59:55 +00:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogNameStr[];
|
|
|
|
extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
|
2005-04-02 21:39:53 +00:00
|
|
|
|
2006-05-06 20:10:11 +00:00
|
|
|
#ifndef wxDD_DEFAULT_STYLE
|
2005-04-02 21:39:53 +00:00
|
|
|
#ifdef __WXWINCE__
|
2006-05-28 23:32:12 +00:00
|
|
|
#define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE
|
2005-04-02 21:39:53 +00:00
|
|
|
#else
|
2006-05-28 23:32:12 +00:00
|
|
|
#define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
|
2002-05-04 12:45:14 +00:00
|
|
|
#endif
|
2005-04-02 21:39:53 +00:00
|
|
|
#endif
|
2002-05-04 12:45:14 +00:00
|
|
|
|
|
|
|
#include "wx/dialog.h"
|
|
|
|
|
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
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2006-04-30 09:44:29 +00:00
|
|
|
class WXDLLEXPORT wxGenericDirDialog : public wxDirDialogBase
|
1999-08-15 15:18:54 +00:00
|
|
|
{
|
|
|
|
public:
|
2006-04-30 09:44:29 +00:00
|
|
|
wxGenericDirDialog() : wxDirDialogBase() { }
|
2002-05-04 12:38:51 +00:00
|
|
|
|
|
|
|
wxGenericDirDialog(wxWindow* parent,
|
|
|
|
const wxString& title = wxDirSelectorPromptStr,
|
2002-01-25 22:47:37 +00:00
|
|
|
const wxString& defaultPath = wxEmptyString,
|
2002-05-04 12:38:51 +00:00
|
|
|
long style = wxDD_DEFAULT_STYLE,
|
2002-01-25 22:47:37 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
2006-04-30 09:44:29 +00:00
|
|
|
const wxSize& sz = wxDefaultSize,//Size(450, 550),
|
|
|
|
const wxString& name = wxDirDialogNameStr);
|
|
|
|
|
|
|
|
bool Create(wxWindow* parent,
|
|
|
|
const wxString& title = wxDirSelectorPromptStr,
|
|
|
|
const wxString& defaultPath = wxEmptyString,
|
|
|
|
long style = wxDD_DEFAULT_STYLE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& sz = wxDefaultSize,//Size(450, 550),
|
2002-05-04 12:38:51 +00:00
|
|
|
const wxString& name = wxDirDialogNameStr);
|
2002-01-06 23:10:56 +00:00
|
|
|
|
|
|
|
//// Accessors
|
|
|
|
void SetPath(const wxString& path);
|
2002-05-04 12:45:14 +00:00
|
|
|
wxString GetPath() const;
|
1998-12-17 20:56:27 +00:00
|
|
|
|
2002-01-06 23:10:56 +00:00
|
|
|
//// Overrides
|
2002-05-04 12:45:14 +00:00
|
|
|
virtual int ShowModal();
|
2006-05-06 20:10:11 +00:00
|
|
|
virtual void EndModal(int retCode);
|
2002-05-04 12:45:14 +00:00
|
|
|
|
|
|
|
// this one is specific to wxGenericDirDialog
|
|
|
|
wxTextCtrl* GetInputCtrl() const { return m_input; }
|
1998-12-17 20:56:27 +00:00
|
|
|
|
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
|
|
|
wxGenericDirCtrl* m_dirCtrl;
|
|
|
|
wxTextCtrl* m_input;
|
|
|
|
|
1999-08-15 15:18:54 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2003-03-14 20:08:45 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxGenericDirDialog)
|
1998-12-17 20:56:27 +00:00
|
|
|
};
|
|
|
|
|
2002-01-06 23:10:56 +00:00
|
|
|
#endif // _WX_DIRDLGG_H_
|