]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/filedlg.h
wxMGL update
[wxWidgets.git] / include / wx / msw / filedlg.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: filedlg.h
3// Purpose: wxFileDialog class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
ba681060 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_FILEDLG_H_
13#define _WX_FILEDLG_H_
2bda0e17
KB
14
15#ifdef __GNUG__
c61f4f6d 16 #pragma interface "filedlg.h"
2bda0e17
KB
17#endif
18
19#include "wx/dialog.h"
20
21/*
22 * File selector
23 */
24
e97f6ab6
OK
25WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorPromptStr;
26WXDLLEXPORT_DATA(extern const wxChar*) wxFileSelectorDefaultWildcardStr;
2bda0e17
KB
27
28class WXDLLEXPORT wxFileDialog: public wxDialog
29{
2bda0e17
KB
30public:
31 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
62448488 32 const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
2bda0e17
KB
33 long style = 0, const wxPoint& pos = wxDefaultPosition);
34
c61f4f6d
VZ
35 void SetMessage(const wxString& message) { m_message = message; }
36 void SetPath(const wxString& path) { m_path = path; }
37 void SetDirectory(const wxString& dir) { m_dir = dir; }
38 void SetFilename(const wxString& name) { m_fileName = name; }
39 void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
40 void SetStyle(long style) { m_dialogStyle = style; }
41 void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
42
43 wxString GetMessage() const { return m_message; }
44 wxString GetPath() const { return m_path; }
45 void GetPaths(wxArrayString& paths) const;
46 wxString GetDirectory() const { return m_dir; }
47 wxString GetFilename() const { return m_fileName; }
48 void GetFilenames(wxArrayString& files) const { files = m_fileNames; }
49 wxString GetWildcard() const { return m_wildCard; }
50 long GetStyle() const { return m_dialogStyle; }
51 int GetFilterIndex() const { return m_filterIndex ; }
52
53 int ShowModal();
ba681060
VZ
54
55protected:
c61f4f6d
VZ
56 wxString m_message;
57 long m_dialogStyle;
58 wxWindow * m_parent;
59 wxString m_dir;
60 wxString m_path; // Full path
61 wxString m_fileName;
62 wxArrayString m_fileNames;
63 wxString m_wildCard;
64 int m_filterIndex;
65
66private:
67 DECLARE_DYNAMIC_CLASS(wxFileDialog)
2bda0e17
KB
68};
69
c330a2cf
JS
70// File selector - backward compatibility
71WXDLLEXPORT wxString
e97f6ab6
OK
72wxFileSelector(const wxChar *message = wxFileSelectorPromptStr,
73 const wxChar *default_path = NULL,
74 const wxChar *default_filename = NULL,
75 const wxChar *default_extension = NULL,
76 const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
c330a2cf
JS
77 int flags = 0,
78 wxWindow *parent = NULL,
79 int x = -1, int y = -1);
80
81// An extended version of wxFileSelector
82WXDLLEXPORT wxString
e97f6ab6
OK
83wxFileSelectorEx(const wxChar *message = wxFileSelectorPromptStr,
84 const wxChar *default_path = NULL,
85 const wxChar *default_filename = NULL,
c330a2cf 86 int *indexDefaultExtension = NULL,
e97f6ab6 87 const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
c330a2cf
JS
88 int flags = 0,
89 wxWindow *parent = NULL,
90 int x = -1, int y = -1);
91
92// Ask for filename to load
93WXDLLEXPORT wxString
e97f6ab6
OK
94wxLoadFileSelector(const wxChar *what,
95 const wxChar *extension,
96 const wxChar *default_name = (const wxChar *)NULL,
c330a2cf
JS
97 wxWindow *parent = (wxWindow *) NULL);
98
99// Ask for filename to save
100WXDLLEXPORT wxString
e97f6ab6
OK
101wxSaveFileSelector(const wxChar *what,
102 const wxChar *extension,
103 const wxChar *default_name = (const wxChar *) NULL,
c330a2cf
JS
104 wxWindow *parent = (wxWindow *) NULL);
105
2bda0e17 106#endif
bbcdf8bc 107 // _WX_FILEDLG_H_
c61f4f6d 108