]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/filedlg.h
implement wxHAVE_RAW_BITMAP
[wxWidgets.git] / include / wx / os2 / filedlg.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: filedlg.h
3// Purpose: wxFileDialog class
f0a56ab0 4// Author: David Webster
0e320a79 5// Modified by:
f0a56ab0 6// Created: 10/05/99
0e320a79 7// RCS-ID: $Id$
f0a56ab0 8// Copyright: (c) David Webster
0e320a79
DW
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_FILEDLG_H_
13#define _WX_FILEDLG_H_
14
0e320a79
DW
15#include "wx/dialog.h"
16
17/*
18 * File selector
19 */
20
0e320a79
DW
21class WXDLLEXPORT wxFileDialog: public wxDialog
22{
23DECLARE_DYNAMIC_CLASS(wxFileDialog)
0e320a79 24public:
b93f4bb9
DW
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; }
25fc812c 47 inline void GetFilenames(wxArrayString& rasFilenames) { rasFilenames = m_asFileNames; }
b93f4bb9
DW
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 ; }
0e320a79
DW
51
52 int ShowModal();
f0a56ab0
DW
53
54protected:
b93f4bb9
DW
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
0e320a79
DW
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
b93f4bb9 73//
0e320a79 74// File selector - backward compatibility
b93f4bb9
DW
75//
76WXDLLEXPORT 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
f0a56ab0 85 );
0e320a79 86
b93f4bb9 87//
0e320a79 88// An extended version of wxFileSelector
b93f4bb9
DW
89
90WXDLLEXPORT 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
f0a56ab0 99 );
0e320a79 100
b93f4bb9 101//
0e320a79 102// Generic file load dialog
b93f4bb9
DW
103//
104WXDLLEXPORT wxString wxLoadFileSelector( const char* pzWhat
105 ,const char* pzExtension
106 ,const char* pzDefaultName = NULL
107 ,wxWindow* pParent = NULL
f0a56ab0 108 );
0e320a79 109
b93f4bb9 110//
0e320a79 111// Generic file save dialog
b93f4bb9
DW
112//
113WXDLLEXPORT wxString wxSaveFileSelector( const char* pzWhat
114 ,const char* pzExtension
115 ,const char* pzDefaultName = NULL
116 ,wxWindow* pParent = NULL
f0a56ab0 117 );
0e320a79
DW
118
119#endif
b93f4bb9
DW
120
121// _WX_FILEDLG_H_