]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/filedlg.h
New scrolling code.
[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
15#ifdef __GNUG__
16#pragma interface "filedlg.h"
17#endif
18
19#include "wx/dialog.h"
20
21/*
22 * File selector
23 */
24
25WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr;
26WXDLLEXPORT_DATA(extern const char*) wxFileSelectorDefaultWildcardStr;
27
28class WXDLLEXPORT wxFileDialog: public wxDialog
29{
30DECLARE_DYNAMIC_CLASS(wxFileDialog)
0e320a79
DW
31public:
32 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
33 const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
34 long style = 0, const wxPoint& pos = wxDefaultPosition);
35
36 inline void SetMessage(const wxString& message) { m_message = message; }
37 inline void SetPath(const wxString& path) { m_path = path; }
38 inline void SetDirectory(const wxString& dir) { m_dir = dir; }
39 inline void SetFilename(const wxString& name) { m_fileName = name; }
40 inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
41 inline void SetStyle(long style) { m_dialogStyle = style; }
42 inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
43
44 inline wxString GetMessage() const { return m_message; }
45 inline wxString GetPath() const { return m_path; }
46 inline wxString GetDirectory() const { return m_dir; }
47 inline wxString GetFilename() const { return m_fileName; }
48 inline wxString GetWildcard() const { return m_wildCard; }
49 inline long GetStyle() const { return m_dialogStyle; }
50 inline int GetFilterIndex() const { return m_filterIndex ; }
51
52 int ShowModal();
f0a56ab0
DW
53
54protected:
55 wxString m_message;
56 long m_dialogStyle;
57 wxWindow * m_parent;
58 wxString m_dir;
59 wxString m_path; // Full path
60 wxString m_fileName;
61 wxString m_wildCard;
62 int m_filterIndex;
0e320a79
DW
63};
64
65#define wxOPEN 0x0001
66#define wxSAVE 0x0002
67#define wxOVERWRITE_PROMPT 0x0004
68#define wxHIDE_READONLY 0x0008
69#define wxFILE_MUST_EXIST 0x0010
70
71// File selector - backward compatibility
f0a56ab0
DW
72WXDLLEXPORT wxString wxFileSelector( const char *message = wxFileSelectorPromptStr
73 ,const char *default_path = NULL
74 ,const char *default_filename = NULL
75 ,const char *default_extension = NULL
76 ,const char *wildcard = wxFileSelectorDefaultWildcardStr
77 ,int flags = 0
78 ,wxWindow *parent = NULL
79 ,int x = -1
80 ,int y = -1
81 );
0e320a79
DW
82
83// An extended version of wxFileSelector
f0a56ab0
DW
84WXDLLEXPORT wxString wxFileSelectorEx( const char *message = wxFileSelectorPromptStr
85 ,const char *default_path = NULL
86 ,const char *default_filename = NULL
87 ,int *indexDefaultExtension = NULL
88 ,const char *wildcard = wxFileSelectorDefaultWildcardStr
89 ,int flags = 0
90 ,wxWindow *parent = NULL
91 ,int x = -1
92 ,int y = -1
93 );
0e320a79
DW
94
95// Generic file load dialog
f0a56ab0
DW
96WXDLLEXPORT wxString wxLoadFileSelector( const char *what
97 ,const char *extension
98 ,const char *default_name = NULL
99 ,wxWindow *parent = NULL
100 );
0e320a79
DW
101
102// Generic file save dialog
f0a56ab0
DW
103WXDLLEXPORT wxString wxSaveFileSelector( const char *what
104 ,const char *extension
105 ,const char *default_name = NULL
106 ,wxWindow *parent = NULL
107 );
0e320a79
DW
108
109#endif
110 // _WX_FILEDLG_H_