]> git.saurik.com Git - wxWidgets.git/blob - include/wx/qt/filedlg.h
fixed mysterious mistakes
[wxWidgets.git] / include / wx / qt / filedlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: filedlg.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifndef __GTKFILEDLGH__
13 #define __GTKFILEDLGH__
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "wx/dialog.h"
20
21 //-------------------------------------------------------------------------
22 // File selector
23 //-------------------------------------------------------------------------
24
25 extern const char *wxFileSelectorPromptStr;
26 extern const char *wxFileSelectorDefaultWildcardStr;
27
28 class wxFileDialog: public wxDialog
29 {
30
31 DECLARE_DYNAMIC_CLASS(wxFileDialog)
32
33 public:
34
35 wxFileDialog() {};
36
37 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
38 const wxString& defaultDir = "", const wxString& defaultFile = "",
39 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
40 long style = 0, const wxPoint& pos = wxDefaultPosition);
41
42 inline void SetMessage(const wxString& message) { m_message = message; }
43 inline void SetPath(const wxString& path) { m_path = path; }
44 inline void SetDirectory(const wxString& dir) { m_dir = dir; }
45 inline void SetFilename(const wxString& name) { m_fileName = name; }
46 inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
47 inline void SetStyle(long style) { m_dialogStyle = style; }
48 inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
49
50 inline wxString GetMessage(void) const { return m_message; }
51 inline wxString GetPath(void) const { return m_path; }
52 inline wxString GetDirectory(void) const { return m_dir; }
53 inline wxString GetFilename(void) const { return m_fileName; }
54 inline wxString GetWildcard(void) const { return m_wildCard; }
55 inline long GetStyle(void) const { return m_dialogStyle; }
56 inline int GetFilterIndex(void) const { return m_filterIndex ; }
57
58 int ShowModal(void);
59
60 protected:
61
62 wxString m_message;
63 long m_dialogStyle;
64 wxWindow * m_parent;
65 wxString m_dir;
66 wxString m_path; // Full path
67 wxString m_fileName;
68 wxString m_wildCard;
69 int m_filterIndex;
70 };
71
72 #define wxOPEN 1
73 #define wxSAVE 2
74 #define wxOVERWRITE_PROMPT 4
75 #define wxHIDE_READONLY 8
76 #define wxFILE_MUST_EXIST 16
77
78 // File selector - backward compatibility
79
80 char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
81 const char *default_filename = NULL, const char *default_extension = NULL,
82 const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
83 wxWindow *parent = NULL, int x = -1, int y = -1);
84
85 char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL,
86 wxWindow *parent = NULL);
87
88 char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL,
89 wxWindow *parent = NULL);
90
91
92
93 #endif
94 // __GTKFILEDLGH__