1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 09:00:07 +02:00
audacity/lib-src/FileDialog/win/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

76 lines
2.3 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/msw/filedlg.h
// Purpose: wxFileDialog class
// Author: Julian Smart
// Modified by: Leland Lucius
// Created: 01/02/97
// RCS-ID: $Id: FileDialogPrivate.h,v 1.6 2009-04-11 05:53:09 llucius Exp $
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
//
// Modified for Audacity to support an additional button on Save dialogs
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _FILEDIALOGMSW_H_
#define _FILEDIALOGMSW_H_
#include <windows.h>
#include <wx/msw/winundef.h>
//-------------------------------------------------------------------------
// wxFileDialog
//-------------------------------------------------------------------------
class FileDialog: public wxFileDialogBase
{
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 SetPath(const wxString& path);
virtual void GetPaths(wxArrayString& paths) const;
virtual void GetFilenames(wxArrayString& files) const;
virtual int ShowModal();
virtual void EnableButton(wxString label, fdCallback cb, void *cbdata);
virtual void ClickButton(int index);
virtual void FilterFiles(HWND hDlg, bool refresh);
virtual void ParseFilter(int index);
wxString m_buttonlabel;
protected:
#if !(defined(__SMARTPHONE__) && defined(__WXWINCE__))
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetPosition( int *x, int *y ) const;
#endif // !(__SMARTPHONE__ && __WXWINCE__)
private:
wxArrayString m_fileNames;
bool m_bMovedWindow;
long m_dialogStyle;
wxArrayString m_FilterGroups;
wxArrayString m_Filters;
wxChar *m_NameBuf;
int m_NameBufLen;
fdCallback m_callback;
void *m_cbdata;
DECLARE_DYNAMIC_CLASS(FileDialog)
DECLARE_NO_COPY_CLASS(FileDialog)
};
#endif