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