]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/filedlg.h
wxFrame::SetIcon()
[wxWidgets.git] / include / wx / gtk / filedlg.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: filedlg.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
46327813 8// Licence: wxWindows licence
c801d85f
KB
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifndef __GTKFILEDLGH__
13#define __GTKFILEDLGH__
14
15#ifdef __GNUG__
16#pragma interface
17#endif
18
19#include "wx/dialog.h"
20
21//-------------------------------------------------------------------------
22// File selector
23//-------------------------------------------------------------------------
24
25extern const char *wxFileSelectorPromptStr;
26extern const char *wxFileSelectorDefaultWildcardStr;
27
28class wxFileDialog: public wxDialog
29{
30
31 DECLARE_DYNAMIC_CLASS(wxFileDialog)
035b704a 32
46327813
VZ
33 friend void gtk_filedialog_ok_callback( GtkWidget *widget, gpointer data );
34
c801d85f
KB
35 public:
36
37 wxFileDialog() {};
46327813 38
c801d85f 39 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
46327813
VZ
40 const wxString& defaultDir = "", const wxString& defaultFile = "",
41 const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
c801d85f
KB
42 long style = 0, const wxPoint& pos = wxDefaultPosition);
43
44 inline void SetMessage(const wxString& message) { m_message = message; }
45 inline void SetPath(const wxString& path) { m_path = path; }
46 inline void SetDirectory(const wxString& dir) { m_dir = dir; }
47 inline void SetFilename(const wxString& name) { m_fileName = name; }
48 inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
49 inline void SetStyle(long style) { m_dialogStyle = style; }
50 inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
51
52 inline wxString GetMessage(void) const { return m_message; }
53 inline wxString GetPath(void) const { return m_path; }
54 inline wxString GetDirectory(void) const { return m_dir; }
55 inline wxString GetFilename(void) const { return m_fileName; }
56 inline wxString GetWildcard(void) const { return m_wildCard; }
57 inline long GetStyle(void) const { return m_dialogStyle; }
58 inline int GetFilterIndex(void) const { return m_filterIndex ; }
59
60 int ShowModal(void);
46327813 61
c801d85f 62 protected:
46327813 63
c801d85f
KB
64 wxString m_message;
65 long m_dialogStyle;
66 wxWindow * m_parent;
67 wxString m_dir;
68 wxString m_path; // Full path
69 wxString m_fileName;
70 wxString m_wildCard;
71 int m_filterIndex;
72};
73
74#define wxOPEN 1
75#define wxSAVE 2
76#define wxOVERWRITE_PROMPT 4
77#define wxHIDE_READONLY 8
46327813 78#define wxFILE_MUST_EXIST 16
c801d85f
KB
79
80// File selector - backward compatibility
81
82char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
83 const char *default_filename = NULL, const char *default_extension = NULL,
84 const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
85 wxWindow *parent = NULL, int x = -1, int y = -1);
86
46327813 87char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL,
c801d85f
KB
88 wxWindow *parent = NULL);
89
46327813 90char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL,
c801d85f
KB
91 wxWindow *parent = NULL);
92
93
94
95#endif
96 // __GTKFILEDLGH__