1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-06 23:02:42 +02:00
audacity/lib-src/FileDialog/gtk/FileDialogPrivate.h
lllucius c512822138 Additional changes for wx3
These are mostly for getting it to build on Linux, but I've
also created new configs in Visual Studio to make it easier
to switch between wx2 and wx3.

For Linux, you have to tell configure where to find the wx3
version of the wx-config script and, since some distros build
wxWidgets v3 against GTK+ v3, you may also need to enable
gtk3 with something like:

./configure --enable-gtk3 WX_CONFIG=/usr/bin/wx-config-3.0

On Windows, I've added "wx3-Debug" and "wx3-Release" to the
existing "Debug" and "Release" configurations.

They depend on you having your WXWIN environment variable
pointing to your wx2 directory and a new WXWIN3 environment
variable pointing to your wx3 directory.  For instance, I
have:

WXWIN=C:\Users\yam\Documents\wxWidgets-2.8.13
WXWIN3=C:\Users\yam\Documents\wxWidgets-3.0.2

Doing this allows you to switch freely among the 4 configurations
without having to get out of Visual Studio and monkey around with
the environment.

The project files will also add the location of the wxWidgets DLLs
to the PATH when running Audacity from within Visual Studio.  They
add %WXWIN%\lib\vc_dll or %WXWIN3%\lib\vc_dll at the beginning
of the PATH variable as appropriate.

I expect that once we convert to wx3 we'll just drop back down to
the normal Debug and Release configurations, but this should make
switching between wx2 and wx3 much easier during the transition.
2014-10-16 16:18:04 +00:00

81 lines
2.5 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: filedlg.h
// Purpose:
// Author: Robert Roebling
// Id: $Id: FileDialogPrivate.h,v 1.2 2008-05-24 02:57:39 llucius Exp $
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
//
// Modified for Audacity to support an additional button on Save dialogs
//
/////////////////////////////////////////////////////////////////////////////
#ifndef __FILEDIALOGGTKH__
#define __FILEDIALOGGTKH__
#include "wx/defs.h"
#define GENERIC_FILEDIALOG 1
#include "../generic/FileDialogPrivate.h"
//-------------------------------------------------------------------------
// FileDialog
//-------------------------------------------------------------------------
class FileDialog: public GenericFileDialog
{
public:
FileDialog() { }
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 ~FileDialog();
virtual wxString GetPath() const;
virtual void GetPaths(wxArrayString& paths) const;
virtual wxString GetDirectory() const;
virtual wxString GetFilename() const;
virtual void GetFilenames(wxArrayString& files) const;
virtual int GetFilterIndex() const;
virtual void SetMessage(const wxString& message);
virtual void SetPath(const wxString& path);
virtual void SetDirectory(const wxString& dir);
virtual void SetFilename(const wxString& name);
virtual void SetWildcard(const wxString& wildCard);
virtual void SetFilterIndex(int filterIndex);
virtual int ShowModal();
virtual bool Show( bool show = true );
//private:
bool m_destroyed_by_delete;
// override this from wxTLW since the native
// form doesn't have any m_wxwindow
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
virtual void EnableButton(wxString label, fdCallback cb, void *cbdata);
virtual void ClickButton(int index);
private:
DECLARE_DYNAMIC_CLASS(FileDialog)
DECLARE_EVENT_TABLE()
void OnFakeOk( wxCommandEvent &event );
wxString m_buttonlabel;
fdCallback m_callback;
void *m_cbdata;
};
#endif