root / trunk / install / launcher / izpack-launcher-1.3_linux / src / wx / include / wx / gtk / filedlg.h @ 6834
History | View | Annotate | Download (3.77 KB)
1 |
/////////////////////////////////////////////////////////////////////////////
|
---|---|
2 |
// Name: filedlg.h
|
3 |
// Purpose:
|
4 |
// Author: Robert Roebling
|
5 |
// Id: $Id: filedlg.h 6834 2006-08-24 08:23:24Z jmvivo $
|
6 |
// Copyright: (c) 1998 Robert Roebling
|
7 |
// Licence: wxWindows licence
|
8 |
/////////////////////////////////////////////////////////////////////////////
|
9 |
|
10 |
|
11 |
#ifndef __GTKFILEDLGH__
|
12 |
#define __GTKFILEDLGH__
|
13 |
|
14 |
#include "wx/dialog.h" |
15 |
|
16 |
//-------------------------------------------------------------------------
|
17 |
// File selector
|
18 |
//-------------------------------------------------------------------------
|
19 |
|
20 |
extern const wxChar *wxFileSelectorPromptStr; |
21 |
extern const wxChar *wxFileSelectorDefaultWildcardStr; |
22 |
|
23 |
class wxFileDialog: public wxDialog |
24 |
{ |
25 |
public:
|
26 |
wxFileDialog() { } |
27 |
|
28 |
wxFileDialog(wxWindow *parent, |
29 |
const wxString& message = wxFileSelectorPromptStr,
|
30 |
const wxString& defaultDir = "", |
31 |
const wxString& defaultFile = "", |
32 |
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
|
33 |
long style = 0, |
34 |
const wxPoint& pos = wxDefaultPosition);
|
35 |
|
36 |
void SetMessage(const wxString& message) { m_message = message; } |
37 |
void SetPath(const wxString& path); |
38 |
void SetDirectory(const wxString& dir) { m_dir = dir; } |
39 |
void SetFilename(const wxString& name) { m_fileName = name; } |
40 |
void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; } |
41 |
void SetStyle(long style) { m_dialogStyle = style; } |
42 |
void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; } |
43 |
|
44 |
wxString GetMessage() const { return m_message; } |
45 |
wxString GetPath() const { return m_path; } |
46 |
wxString GetDirectory() const { return m_dir; } |
47 |
wxString GetFilename() const { return m_fileName; } |
48 |
wxString GetWildcard() const { return m_wildCard; } |
49 |
long GetStyle() const { return m_dialogStyle; } |
50 |
int GetFilterIndex() const { return m_filterIndex ; } |
51 |
|
52 |
protected:
|
53 |
wxString m_message; |
54 |
long m_dialogStyle;
|
55 |
wxWindow * m_parent; |
56 |
wxString m_dir; |
57 |
wxString m_path; // Full path
|
58 |
wxString m_fileName; |
59 |
wxString m_wildCard; |
60 |
int m_filterIndex;
|
61 |
|
62 |
private:
|
63 |
DECLARE_DYNAMIC_CLASS(wxFileDialog) |
64 |
}; |
65 |
|
66 |
#define wxOPEN 1 |
67 |
#define wxSAVE 2 |
68 |
#define wxOVERWRITE_PROMPT 4 |
69 |
#define wxHIDE_READONLY 8 |
70 |
#define wxFILE_MUST_EXIST 16 |
71 |
|
72 |
// File selector - backward compatibility
|
73 |
WXDLLEXPORT wxString |
74 |
wxFileSelector(const wxChar *message = wxFileSelectorPromptStr,
|
75 |
const wxChar *default_path = NULL, |
76 |
const wxChar *default_filename = NULL, |
77 |
const wxChar *default_extension = NULL, |
78 |
const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
|
79 |
int flags = 0, |
80 |
wxWindow *parent = NULL,
|
81 |
int x = -1, int y = -1); |
82 |
|
83 |
// An extended version of wxFileSelector
|
84 |
WXDLLEXPORT wxString |
85 |
wxFileSelectorEx(const wxChar *message = wxFileSelectorPromptStr,
|
86 |
const wxChar *default_path = NULL, |
87 |
const wxChar *default_filename = NULL, |
88 |
int *indexDefaultExtension = NULL, |
89 |
const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
|
90 |
int flags = 0, |
91 |
wxWindow *parent = NULL,
|
92 |
int x = -1, int y = -1); |
93 |
|
94 |
// Ask for filename to load
|
95 |
WXDLLEXPORT wxString |
96 |
wxLoadFileSelector(const wxChar *what,
|
97 |
const wxChar *extension,
|
98 |
const wxChar *default_name = (const wxChar *)NULL, |
99 |
wxWindow *parent = (wxWindow *) NULL);
|
100 |
|
101 |
// Ask for filename to save
|
102 |
WXDLLEXPORT wxString |
103 |
wxSaveFileSelector(const wxChar *what,
|
104 |
const wxChar *extension,
|
105 |
const wxChar *default_name = (const wxChar *) NULL, |
106 |
wxWindow *parent = (wxWindow *) NULL);
|
107 |
|
108 |
#endif
|
109 |
// __GTKFILEDLGH__
|