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