]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/filedlg.h
- Modify #if to include wxCocoa as a platform using wxBitmapBase
[wxWidgets.git] / include / wx / msw / filedlg.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
2b5f62a0 2// Name: wx/msw/filedlg.h
2bda0e17
KB
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 30public:
2b5f62a0
VZ
31 wxFileDialog(wxWindow *parent,
32 const wxString& message = wxFileSelectorPromptStr,
33 const wxString& defaultDir = wxEmptyString,
34 const wxString& defaultFile = wxEmptyString,
35 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
36 long style = 0,
37 const wxPoint& pos = wxDefaultPosition);
2bda0e17 38
c61f4f6d 39 void SetMessage(const wxString& message) { m_message = message; }
2b5f62a0 40 void SetPath(const wxString& path);
c61f4f6d
VZ
41 void SetDirectory(const wxString& dir) { m_dir = dir; }
42 void SetFilename(const wxString& name) { m_fileName = name; }
43 void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
44 void SetStyle(long style) { m_dialogStyle = style; }
45 void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
46
47 wxString GetMessage() const { return m_message; }
48 wxString GetPath() const { return m_path; }
49 void GetPaths(wxArrayString& paths) const;
50 wxString GetDirectory() const { return m_dir; }
51 wxString GetFilename() const { return m_fileName; }
52 void GetFilenames(wxArrayString& files) const { files = m_fileNames; }
53 wxString GetWildcard() const { return m_wildCard; }
54 long GetStyle() const { return m_dialogStyle; }
55 int GetFilterIndex() const { return m_filterIndex ; }
56
2b5f62a0 57 virtual int ShowModal();
ba681060
VZ
58
59protected:
c61f4f6d
VZ
60 wxString m_message;
61 long m_dialogStyle;
62 wxWindow * m_parent;
63 wxString m_dir;
64 wxString m_path; // Full path
65 wxString m_fileName;
66 wxArrayString m_fileNames;
67 wxString m_wildCard;
68 int m_filterIndex;
69
70private:
71 DECLARE_DYNAMIC_CLASS(wxFileDialog)
22f3361e 72 DECLARE_NO_COPY_CLASS(wxFileDialog)
2bda0e17
KB
73};
74
c330a2cf
JS
75// File selector - backward compatibility
76WXDLLEXPORT wxString
e97f6ab6
OK
77wxFileSelector(const wxChar *message = wxFileSelectorPromptStr,
78 const wxChar *default_path = NULL,
79 const wxChar *default_filename = NULL,
80 const wxChar *default_extension = NULL,
81 const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
c330a2cf
JS
82 int flags = 0,
83 wxWindow *parent = NULL,
84 int x = -1, int y = -1);
85
86// An extended version of wxFileSelector
87WXDLLEXPORT wxString
e97f6ab6
OK
88wxFileSelectorEx(const wxChar *message = wxFileSelectorPromptStr,
89 const wxChar *default_path = NULL,
90 const wxChar *default_filename = NULL,
c330a2cf 91 int *indexDefaultExtension = NULL,
e97f6ab6 92 const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
c330a2cf
JS
93 int flags = 0,
94 wxWindow *parent = NULL,
95 int x = -1, int y = -1);
96
97// Ask for filename to load
98WXDLLEXPORT wxString
e97f6ab6
OK
99wxLoadFileSelector(const wxChar *what,
100 const wxChar *extension,
101 const wxChar *default_name = (const wxChar *)NULL,
c330a2cf
JS
102 wxWindow *parent = (wxWindow *) NULL);
103
104// Ask for filename to save
105WXDLLEXPORT wxString
e97f6ab6
OK
106wxSaveFileSelector(const wxChar *what,
107 const wxChar *extension,
108 const wxChar *default_name = (const wxChar *) NULL,
c330a2cf
JS
109 wxWindow *parent = (wxWindow *) NULL);
110
2bda0e17 111#endif
bbcdf8bc 112 // _WX_FILEDLG_H_
c61f4f6d 113