File: FileDialog.h

package info (click to toggle)
audacity 2.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 86,844 kB
  • sloc: ansic: 225,005; cpp: 221,240; sh: 27,327; python: 16,896; makefile: 8,186; lisp: 8,002; perl: 317; xml: 307; sed: 16
file content (92 lines) | stat: -rw-r--r-- 2,828 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**********************************************************************

  Audacity: A Digital Audio Editor

  FileDialog.h

  Leland Lucius

*******************************************************************//**

\class FileDialog
\brief Dialog used to present platform specific "Save As" dialog with
custom controls.

*//*******************************************************************/

#ifndef _FILEDIALOG_H_
#define _FILEDIALOG_H_

#include <wx/defs.h>
#include <wx/filectrl.h>
#include <wx/filedlg.h>

class FileDialogBase : public wxFileDialogBase
{
public:
   FileDialogBase();
   virtual ~FileDialogBase() {};

   // FileDialogBase

   typedef void (*UserPaneCreatorFunction)(wxWindow *parent, wxUIntPtr userdata);

   virtual bool HasUserPaneCreator() const;
   virtual void SetUserPaneCreator(UserPaneCreatorFunction creator, wxUIntPtr userdata);

protected:
   void CreateUserPane(wxWindow *parent);

   UserPaneCreatorFunction m_creator;
   wxUIntPtr m_userdata;
};

#if defined(__WXGTK__)
#include "gtk/FileDialogPrivate.h"
#elif defined(__WXMAC__)
#include "mac/FileDialogPrivate.h"
#elif defined(__WXMSW__)
#include "win/FileDialogPrivate.h"
#else
#error Unknown implementation
#endif

//
// Copied from wx 3.0.2 and modified to support additional features
//
/////////////////////////////////////////////////////////////////////////////
// Name:        wx/filedlg.h
// Purpose:     wxFileDialog base header
// Author:      Robert Roebling
// Modified by: Leland Lucius
// Created:     8/17/99
// Copyright:   (c) Robert Roebling
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

//----------------------------------------------------------------------------
// FileDialog convenience functions
//----------------------------------------------------------------------------

wxString
FileSelector(const wxString& message = wxFileSelectorPromptStr,
             const wxString& default_path = wxEmptyString,
             const wxString& default_filename = wxEmptyString,
             const wxString& default_extension = wxEmptyString,
             const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
             int flags = 0,
             wxWindow *parent = NULL,
             int x = wxDefaultCoord, int y = wxDefaultCoord);

// An extended version of FileSelector
wxString
FileSelectorEx(const wxString& message = wxFileSelectorPromptStr,
               const wxString& default_path = wxEmptyString,
               const wxString& default_filename = wxEmptyString,
               int *indexDefaultExtension = NULL,
               const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
               int flags = 0,
               wxWindow *parent = NULL,
               int x = wxDefaultCoord, int y = wxDefaultCoord);

#endif