]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/filedlg.h
implement wxHAVE_RAW_BITMAP
[wxWidgets.git] / include / wx / os2 / filedlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: filedlg.h
3 // Purpose: wxFileDialog class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/05/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_FILEDLG_H_
13 #define _WX_FILEDLG_H_
14
15 #include "wx/dialog.h"
16
17 /*
18 * File selector
19 */
20
21 class WXDLLEXPORT wxFileDialog: public wxDialog
22 {
23 DECLARE_DYNAMIC_CLASS(wxFileDialog)
24 public:
25 wxFileDialog( wxWindow* pParent
26 ,const wxString& rsMessage = wxFileSelectorPromptStr
27 ,const wxString& rsDefaultDir = ""
28 ,const wxString& rsDefaultFile = ""
29 ,const wxString& rsWildCard = wxFileSelectorDefaultWildcardStr
30 ,long lStyle = 0
31 ,const wxPoint& rPos = wxDefaultPosition
32 );
33
34 inline void SetMessage(const wxString& rsMessage) { m_sMessage = rsMessage; }
35 inline void SetPath(const wxString& rsPath) { m_sPath = rsPath; }
36 inline void SetDirectory(const wxString& rsDir) { m_sDir = rsDir; }
37 inline void SetFilename(const wxString& rsName) { m_sFileName = rsName; }
38 inline void SetWildcard(const wxString& rsWildCard) { m_sWildCard = rsWildCard; }
39 inline void SetStyle(long lStyle) { m_lDialogStyle = lStyle; }
40 inline void SetFilterIndex(int nFilterIndex) { m_nFilterIndex = nFilterIndex; }
41
42 inline wxString GetMessage(void) const { return m_sMessage; }
43 inline wxString GetPath(void) const { return m_sPath; }
44 void GetPaths(wxArrayString& rasPath) const;
45 inline wxString GetDirectory(void) const { return m_sDir; }
46 inline wxString GetFilename(void) const { return m_sFileName; }
47 inline void GetFilenames(wxArrayString& rasFilenames) { rasFilenames = m_asFileNames; }
48 inline wxString GetWildcard(void) const { return m_sWildCard; }
49 inline long GetStyle(void) const { return m_lDialogStyle; }
50 inline int GetFilterIndex() const { return m_nFilterIndex ; }
51
52 int ShowModal();
53
54 protected:
55 wxString m_sMessage;
56 long m_lDialogStyle;
57 wxWindow* m_pParent;
58 wxString m_sDir;
59 wxString m_sPath; // Full path
60 wxString m_sFileName;
61 wxArrayString m_asFileNames;
62 wxString m_sWildCard;
63 int m_nFilterIndex;
64 wxPoint m_vPos;
65 }; // end of CLASS wxFileDialog
66
67 #define wxOPEN 0x0001
68 #define wxSAVE 0x0002
69 #define wxOVERWRITE_PROMPT 0x0004
70 #define wxHIDE_READONLY 0x0008
71 #define wxFILE_MUST_EXIST 0x0010
72
73 //
74 // File selector - backward compatibility
75 //
76 WXDLLEXPORT wxString wxFileSelector( const char* pzMessage = wxFileSelectorPromptStr
77 ,const char* pzDefaultPath = NULL
78 ,const char* pzDefaultFilename = NULL
79 ,const char* pzDefaultExtension = NULL
80 ,const char* pzWildcard = wxFileSelectorDefaultWildcardStr
81 ,int nFlags = 0
82 ,wxWindow* pParent = NULL
83 ,int nX = -1
84 ,int nY = -1
85 );
86
87 //
88 // An extended version of wxFileSelector
89
90 WXDLLEXPORT wxString wxFileSelectorEx( const char* pzMessage = wxFileSelectorPromptStr
91 ,const char* pzDefaultPath = NULL
92 ,const char* pzDefaultFilename = NULL
93 ,int* pnIndexDefaultExtension = NULL
94 ,const char* pzWildcard = wxFileSelectorDefaultWildcardStr
95 ,int nFlags = 0
96 ,wxWindow* pParent = NULL
97 ,int nX = -1
98 ,int nY = -1
99 );
100
101 //
102 // Generic file load dialog
103 //
104 WXDLLEXPORT wxString wxLoadFileSelector( const char* pzWhat
105 ,const char* pzExtension
106 ,const char* pzDefaultName = NULL
107 ,wxWindow* pParent = NULL
108 );
109
110 //
111 // Generic file save dialog
112 //
113 WXDLLEXPORT wxString wxSaveFileSelector( const char* pzWhat
114 ,const char* pzExtension
115 ,const char* pzDefaultName = NULL
116 ,wxWindow* pParent = NULL
117 );
118
119 #endif
120
121 // _WX_FILEDLG_H_