1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/gtk/filedlg.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 13:03:18 -05:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2008-08-07 02:51:10 -04:00
|
|
|
#ifndef _WX_GTKFILEDLG_H_
|
|
|
|
#define _WX_GTKFILEDLG_H_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2007-09-16 20:14:34 -04:00
|
|
|
#include "wx/gtk/filectrl.h" // for wxGtkFileChooser
|
2004-12-05 15:30:18 -05:00
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
//-------------------------------------------------------------------------
|
2003-07-19 13:22:05 -04:00
|
|
|
// wxFileDialog
|
1998-05-20 10:01:55 -04:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
2007-11-05 13:43:14 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxFileDialog: public wxFileDialogBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-02-02 07:07:25 -05:00
|
|
|
public:
|
|
|
|
wxFileDialog() { }
|
|
|
|
|
|
|
|
wxFileDialog(wxWindow *parent,
|
|
|
|
const wxString& message = wxFileSelectorPromptStr,
|
2003-07-19 13:22:05 -04:00
|
|
|
const wxString& defaultDir = wxEmptyString,
|
|
|
|
const wxString& defaultFile = wxEmptyString,
|
1999-02-02 07:07:25 -05:00
|
|
|
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
2006-05-28 19:32:12 -04:00
|
|
|
long style = wxFD_DEFAULT_STYLE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& sz = wxDefaultSize,
|
|
|
|
const wxString& name = wxFileDialogNameStr);
|
2012-03-14 08:32:27 -04:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
const wxString& message = wxFileSelectorPromptStr,
|
|
|
|
const wxString& defaultDir = wxEmptyString,
|
|
|
|
const wxString& defaultFile = wxEmptyString,
|
|
|
|
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
|
|
|
long style = wxFD_DEFAULT_STYLE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& sz = wxDefaultSize,
|
|
|
|
const wxString& name = wxFileDialogNameStr);
|
2008-08-26 12:19:23 -04:00
|
|
|
virtual ~wxFileDialog();
|
2005-03-31 16:20:58 -05:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual wxString GetPath() const wxOVERRIDE;
|
|
|
|
virtual void GetPaths(wxArrayString& paths) const wxOVERRIDE;
|
|
|
|
virtual wxString GetFilename() const wxOVERRIDE;
|
|
|
|
virtual void GetFilenames(wxArrayString& files) const wxOVERRIDE;
|
|
|
|
virtual int GetFilterIndex() const wxOVERRIDE;
|
2005-03-31 16:20:58 -05:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void SetMessage(const wxString& message) wxOVERRIDE;
|
|
|
|
virtual void SetPath(const wxString& path) wxOVERRIDE;
|
|
|
|
virtual void SetDirectory(const wxString& dir) wxOVERRIDE;
|
|
|
|
virtual void SetFilename(const wxString& name) wxOVERRIDE;
|
|
|
|
virtual void SetWildcard(const wxString& wildCard) wxOVERRIDE;
|
|
|
|
virtual void SetFilterIndex(int filterIndex) wxOVERRIDE;
|
2005-03-31 16:20:58 -05:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual int ShowModal() wxOVERRIDE;
|
2004-12-05 15:30:18 -05:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual bool SupportsExtraControl() const wxOVERRIDE { return true; }
|
2006-05-28 19:01:21 -04:00
|
|
|
|
2013-05-31 19:21:27 -04:00
|
|
|
// Implementation only.
|
|
|
|
void GTKSelectionChanged(const wxString& filename);
|
|
|
|
|
2004-12-05 15:30:18 -05:00
|
|
|
|
2006-02-08 16:47:09 -05:00
|
|
|
protected:
|
2005-04-25 15:13:28 -04:00
|
|
|
// override this from wxTLW since the native
|
|
|
|
// form doesn't have any m_wxwindow
|
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
2014-03-29 20:02:23 -04:00
|
|
|
int sizeFlags = wxSIZE_AUTO) wxOVERRIDE;
|
2005-04-25 15:13:28 -04:00
|
|
|
|
|
|
|
|
2005-03-31 16:20:58 -05:00
|
|
|
private:
|
2013-05-22 09:36:14 -04:00
|
|
|
void OnFakeOk( wxCommandEvent &event );
|
2008-08-07 02:51:10 -04:00
|
|
|
void OnSize(wxSizeEvent&);
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void AddChildGTK(wxWindowGTK* child) wxOVERRIDE;
|
2007-09-16 20:14:34 -04:00
|
|
|
|
|
|
|
wxGtkFileChooser m_fc;
|
2008-08-07 02:51:10 -04:00
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxFileDialog);
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
2008-08-07 02:51:10 -04:00
|
|
|
#endif // _WX_GTKFILEDLG_H_
|