File: FileDialogPrivate.h

package info (click to toggle)
audacity 2.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 80,076 kB
  • sloc: cpp: 192,859; ansic: 158,072; sh: 34,021; python: 24,248; lisp: 7,495; makefile: 3,667; xml: 573; perl: 31; sed: 16
file content (58 lines) | stat: -rw-r--r-- 2,021 bytes parent folder | download | duplicates (3)
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
/////////////////////////////////////////////////////////////////////////////
// Name:        filedlg.h
// Purpose:     wxFileDialog class
// Author:      Stefan Csomor
// Modified by: Leland Lucius
// Created:     1998-01-01
// RCS-ID:      $Id: FileDialogPrivate.h,v 1.3 2008-05-24 02:57:39 llucius Exp $
// Copyright:   (c) Stefan Csomor
// Licence:     wxWindows licence
//
// Modified for Audacity to support an additional button on Save dialogs
//
/////////////////////////////////////////////////////////////////////////////

#ifndef _FILEDIALOGMAC_H_
#define _FILEDIALOGMAC_H_

//-------------------------------------------------------------------------
// FileDialog
//-------------------------------------------------------------------------

class FileDialog: public wxFileDialogBase
{
   DECLARE_DYNAMIC_CLASS(FileDialog)
 protected:
   long m_dialogStyle;
   wxArrayString m_fileNames;
   wxArrayString m_paths;
   
   wxString m_buttonlabel;
   fdCallback m_callback;
   void *m_cbdata;
   static wxString ConvertSlashInFileName(const wxString& filePath);
   
 public:
   FileDialog(wxWindow *parent,
              const wxString& message = wxFileSelectorPromptStr,
              const wxString& defaultDir = wxEmptyString,
              const wxString& defaultFile = wxEmptyString,
              const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
              long style = 0,
              const wxPoint& pos = wxDefaultPosition);
   
   virtual void GetPaths(wxArrayString& paths) const { paths = m_paths; }
   virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; }
   
   virtual int ShowModal();
   
   // not supported for file dialog, RR
   virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
                          int WXUNUSED(width), int WXUNUSED(height),
                          int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {}
   
   virtual void EnableButton(wxString label, fdCallback cb, void *cbdata);
   virtual void ClickButton(int index);
};

#endif