]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/filedlg.h
added JPEG support
[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
24extern const char *wxFileSelectorPromptStr;
25extern const char *wxFileSelectorDefaultWildcardStr;
26
27class wxFileDialog: public wxDialog
28{
0e1399b3
VZ
29DECLARE_DYNAMIC_CLASS(wxFileDialog)
30
31public:
32 wxFileDialog() { }
33
34 wxFileDialog(wxWindow *parent,
35 const wxString& message = wxFileSelectorPromptStr,
36 const wxString& defaultDir = "",
37 const wxString& defaultFile = "",
38 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
39 long style = 0,
40 const wxPoint& pos = wxDefaultPosition);
41
42 void SetMessage(const wxString& message) { m_message = message; }
43 void SetPath(const wxString& path) { m_path = path; }
44 void SetDirectory(const wxString& dir) { m_dir = dir; }
45 void SetFilename(const wxString& name) { m_fileName = name; }
46 void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
47 void SetStyle(long style) { m_dialogStyle = style; }
48 void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
49
50 wxString GetMessage() const { return m_message; }
51 wxString GetPath() const { return m_path; }
52 wxString GetDirectory() const { return m_dir; }
53 wxString GetFilename() const { return m_fileName; }
54 wxString GetWildcard() const { return m_wildCard; }
55 long GetStyle() const { return m_dialogStyle; }
56 int GetFilterIndex() const { return m_filterIndex ; }
57
58 int ShowModal();
59
60 protected:
46327813 61
c801d85f
KB
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
46327813 76#define wxFILE_MUST_EXIST 16
c801d85f 77
c330a2cf
JS
78// File selector - backward compatibility
79WXDLLEXPORT wxString
80wxFileSelector(const char *message = wxFileSelectorPromptStr,
81 const char *default_path = NULL,
82 const char *default_filename = NULL,
83 const char *default_extension = NULL,
84 const char *wildcard = wxFileSelectorDefaultWildcardStr,
85 int flags = 0,
86 wxWindow *parent = NULL,
87 int x = -1, int y = -1);
88
89// An extended version of wxFileSelector
90WXDLLEXPORT wxString
91wxFileSelectorEx(const char *message = wxFileSelectorPromptStr,
92 const char *default_path = NULL,
93 const char *default_filename = NULL,
94 int *indexDefaultExtension = NULL,
95 const char *wildcard = wxFileSelectorDefaultWildcardStr,
96 int flags = 0,
97 wxWindow *parent = NULL,
98 int x = -1, int y = -1);
99
100// Ask for filename to load
101WXDLLEXPORT wxString
102wxLoadFileSelector(const char *what,
103 const char *extension,
104 const char *default_name = (const char *)NULL,
105 wxWindow *parent = (wxWindow *) NULL);
106
107// Ask for filename to save
108WXDLLEXPORT wxString
109wxSaveFileSelector(const char *what,
110 const char *extension,
111 const char *default_name = (const char *) NULL,
112 wxWindow *parent = (wxWindow *) NULL);
113
c801d85f
KB
114#endif
115 // __GTKFILEDLGH__