]> git.saurik.com Git - wxWidgets.git/blame - include/wx/stubs/filedlg.h
wxToolTip modifications: wxUSE_TOOLTIPS setting (default: on) added and
[wxWidgets.git] / include / wx / stubs / filedlg.h
CommitLineData
7c23a0b0
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: filedlg.h
3// Purpose: wxFileDialog class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
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)
31protected:
32 wxString m_message;
33 long m_dialogStyle;
34 wxWindow * m_parent;
35 wxString m_dir;
36 wxString m_path; // Full path
37 wxString m_fileName;
38 wxString m_wildCard;
39 int m_filterIndex;
40public:
41 wxFileDialog(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr,
42 const wxString& defaultDir = "", const wxString& defaultFile = "", const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
43 long style = 0, const wxPoint& pos = wxDefaultPosition);
44
45 inline void SetMessage(const wxString& message) { m_message = message; }
46 inline void SetPath(const wxString& path) { m_path = path; }
47 inline void SetDirectory(const wxString& dir) { m_dir = dir; }
48 inline void SetFilename(const wxString& name) { m_fileName = name; }
49 inline void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
50 inline void SetStyle(long style) { m_dialogStyle = style; }
51 inline void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
52
53 inline wxString GetMessage() const { return m_message; }
54 inline wxString GetPath() const { return m_path; }
55 inline wxString GetDirectory() const { return m_dir; }
56 inline wxString GetFilename() const { return m_fileName; }
57 inline wxString GetWildcard() const { return m_wildCard; }
58 inline long GetStyle() const { return m_dialogStyle; }
59 inline int GetFilterIndex() const { return m_filterIndex ; }
60
61 int ShowModal();
62};
63
64#define wxOPEN 0x0001
65#define wxSAVE 0x0002
66#define wxOVERWRITE_PROMPT 0x0004
67#define wxHIDE_READONLY 0x0008
68#define wxFILE_MUST_EXIST 0x0010
69
c330a2cf
JS
70// File selector - backward compatibility
71WXDLLEXPORT wxString
72wxFileSelector(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, int y = -1);
80
81// An extended version of wxFileSelector
82WXDLLEXPORT wxString
83wxFileSelectorEx(const char *message = wxFileSelectorPromptStr,
84 const char *default_path = NULL,
85 const char *default_filename = NULL,
86 int *indexDefaultExtension = NULL,
87 const char *wildcard = wxFileSelectorDefaultWildcardStr,
88 int flags = 0,
89 wxWindow *parent = NULL,
90 int x = -1, int y = -1);
91
92// Ask for filename to load
93WXDLLEXPORT wxString
94wxLoadFileSelector(const char *what,
95 const char *extension,
96 const char *default_name = (const char *)NULL,
97 wxWindow *parent = (wxWindow *) NULL);
98
99// Ask for filename to save
100WXDLLEXPORT wxString
101wxSaveFileSelector(const char *what,
102 const char *extension,
103 const char *default_name = (const char *) NULL,
104 wxWindow *parent = (wxWindow *) NULL);
7c23a0b0
JS
105#endif
106 // _WX_FILEDLG_H_