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
|
|
|
|
// Licence: wxWindows licence
|
1998-12-17 15:56:27 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DIRDLGG_H_
|
|
|
|
#define _WX_DIRDLGG_H_
|
|
|
|
|
2002-08-31 07:29:13 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
1998-12-17 15:56:27 -05:00
|
|
|
#pragma interface "dirdlgg.h"
|
|
|
|
#endif
|
|
|
|
|
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)
|
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogNameStr;
|
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxDirSelectorPromptStr;
|
|
|
|
#ifndef wxDD_DEFAULT_STYLE
|
|
|
|
#define wxDD_DEFAULT_STYLE \
|
|
|
|
(wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#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
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2002-05-04 08:45:14 -04:00
|
|
|
class WXDLLEXPORT wxGenericDirDialog : public wxDialog
|
1999-08-15 11:18:54 -04:00
|
|
|
{
|
|
|
|
public:
|
2002-05-04 08:38:51 -04:00
|
|
|
wxGenericDirDialog() : wxDialog() { }
|
|
|
|
|
|
|
|
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,
|
|
|
|
const wxSize& sz = wxSize(450, 550),
|
2002-05-04 08:38:51 -04:00
|
|
|
const wxString& name = wxDirDialogNameStr);
|
2002-01-06 18:10:56 -05:00
|
|
|
|
|
|
|
//// Accessors
|
2002-05-04 08:45:14 -04:00
|
|
|
void SetMessage(const wxString& message) { m_message = message; }
|
2002-01-06 18:10:56 -05:00
|
|
|
void SetPath(const wxString& path);
|
2002-05-04 08:45:14 -04:00
|
|
|
void SetStyle(long style) { m_dialogStyle = style; }
|
1998-12-17 15:56:27 -05:00
|
|
|
|
2002-05-04 08:45:14 -04:00
|
|
|
wxString GetMessage() const { return m_message; }
|
|
|
|
wxString GetPath() const;
|
|
|
|
long GetStyle() const { return m_dialogStyle; }
|
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();
|
|
|
|
|
|
|
|
// 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
|
|
|
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-06 18:10:56 -05:00
|
|
|
#endif // _WX_DIRDLGG_H_
|