]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/filedlg.h
Added wxTolBar::etMargins
[wxWidgets.git] / include / wx / gtk / 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{
29
30 DECLARE_DYNAMIC_CLASS(wxFileDialog)
035b704a 31
46327813
VZ
32 friend void gtk_filedialog_ok_callback( GtkWidget *widget, gpointer data );
33
c801d85f
KB
34 public:
35
36 wxFileDialog() {};
46327813 37
c801d85f 38 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
46327813
VZ
39 const wxString& defaultDir = "", const wxString& defaultFile = "",
40 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
c801d85f
KB
41 long style = 0, const wxPoint& pos = wxDefaultPosition);
42
43 inline void SetMessage(const wxString& message) { m_message = message; }
44 inline void SetPath(const wxString& path) { m_path = path; }
45 inline void SetDirectory(const wxString& dir) { m_dir = dir; }
46 inline void SetFilename(const wxString& name) { m_fileName = name; }
47 inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
48 inline void SetStyle(long style) { m_dialogStyle = style; }
49 inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
50
51 inline wxString GetMessage(void) const { return m_message; }
52 inline wxString GetPath(void) const { return m_path; }
53 inline wxString GetDirectory(void) const { return m_dir; }
54 inline wxString GetFilename(void) const { return m_fileName; }
55 inline wxString GetWildcard(void) const { return m_wildCard; }
56 inline long GetStyle(void) const { return m_dialogStyle; }
57 inline int GetFilterIndex(void) const { return m_filterIndex ; }
58
59 int ShowModal(void);
46327813 60
c801d85f 61 protected:
46327813 62
c801d85f
KB
63 wxString m_message;
64 long m_dialogStyle;
65 wxWindow * m_parent;
66 wxString m_dir;
67 wxString m_path; // Full path
68 wxString m_fileName;
69 wxString m_wildCard;
70 int m_filterIndex;
71};
72
73#define wxOPEN 1
74#define wxSAVE 2
75#define wxOVERWRITE_PROMPT 4
76#define wxHIDE_READONLY 8
46327813 77#define wxFILE_MUST_EXIST 16
c801d85f
KB
78
79// File selector - backward compatibility
80
c67daf87
UR
81char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = (const char *) NULL,
82 const char *default_filename = (const char *) NULL, const char *default_extension = (const char *) NULL,
c801d85f 83 const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
c67daf87 84 wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1);
c801d85f 85
c67daf87
UR
86char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL,
87 wxWindow *parent = (wxWindow *) NULL);
c801d85f 88
c67daf87
UR
89char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL,
90 wxWindow *parent = (wxWindow *) NULL);
c801d85f
KB
91
92
93
94#endif
95 // __GTKFILEDLGH__