EmptyChaos 822326eea9 Update wxWidgets to 3.1.0
From wxWidgets master 81570ae070b35c9d52de47b1f14897f3ff1a66c7.

include/wx/defs.h -- __w64 warning disable patch by comex brought forward.

include/wx/msw/window.h -- added GetContentScaleFactor() which was not implemented on Windows but is necessary for wxBitmap scaling on Mac OS X so it needs to work to avoid #ifdef-ing the code.

src/gtk/window.cpp -- Modified DoSetClientSize() to direct call wxWindowGTK::DoSetSize() instead of using public wxWindowBase::SetSize() which now prevents derived classes (like wxAuiToolbar) intercepting the call and breaking it. This matches Windows which does NOT need to call DoSetSize internally. End result is this fixes Dolphin's debug tools toolbars on Linux.

src/osx/window_osx.cpp -- Same fix as for GTK since it has the same issue.

src/msw/radiobox.cpp -- Hacked to fix display in HiDPI (was clipping off end of text).

Updated CMakeLists for Linux and Mac OS X. Small code changes to Dolphin to fix debug error boxes, deprecation warnings, and retain previous UI behavior on Windows.
2016-06-26 15:25:29 +10:00

161 lines
6.0 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: wx/generic/filedlgg.h
// Purpose: wxGenericFileDialog
// Author: Robert Roebling
// Modified by:
// Created: 8/17/99
// Copyright: (c) Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_FILEDLGG_H_
#define _WX_FILEDLGG_H_
#include "wx/listctrl.h"
#include "wx/datetime.h"
#include "wx/filefn.h"
#include "wx/artprov.h"
#include "wx/filedlg.h"
#include "wx/generic/filectrlg.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_FWD_CORE wxBitmapButton;
class WXDLLIMPEXP_FWD_CORE wxGenericFileCtrl;
class WXDLLIMPEXP_FWD_CORE wxGenericFileDialog;
class WXDLLIMPEXP_FWD_CORE wxFileCtrlEvent;
//-------------------------------------------------------------------------
// wxGenericFileDialog
//-------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxGenericFileDialog: public wxFileDialogBase
{
public:
wxGenericFileDialog() : wxFileDialogBase() { Init(); }
wxGenericFileDialog(wxWindow *parent,
const wxString& message = wxFileSelectorPromptStr,
const wxString& defaultDir = wxEmptyString,
const wxString& defaultFile = wxEmptyString,
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
long style = wxFD_DEFAULT_STYLE,
const wxPoint& pos = wxDefaultPosition,
const wxSize& sz = wxDefaultSize,
const wxString& name = wxFileDialogNameStr,
bool bypassGenericImpl = false );
bool Create( wxWindow *parent,
const wxString& message = wxFileSelectorPromptStr,
const wxString& defaultDir = wxEmptyString,
const wxString& defaultFile = wxEmptyString,
const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
long style = wxFD_DEFAULT_STYLE,
const wxPoint& pos = wxDefaultPosition,
const wxSize& sz = wxDefaultSize,
const wxString& name = wxFileDialogNameStr,
bool bypassGenericImpl = false );
virtual ~wxGenericFileDialog();
virtual void SetDirectory(const wxString& dir) wxOVERRIDE
{ m_filectrl->SetDirectory(dir); }
virtual void SetFilename(const wxString& name) wxOVERRIDE
{ m_filectrl->SetFilename(name); }
virtual void SetMessage(const wxString& message) wxOVERRIDE { SetTitle(message); }
virtual void SetPath(const wxString& path) wxOVERRIDE
{ m_filectrl->SetPath(path); }
virtual void SetFilterIndex(int filterIndex) wxOVERRIDE
{ m_filectrl->SetFilterIndex(filterIndex); }
virtual void SetWildcard(const wxString& wildCard) wxOVERRIDE
{ m_filectrl->SetWildcard(wildCard); }
virtual wxString GetPath() const wxOVERRIDE
{ return m_filectrl->GetPath(); }
virtual void GetPaths(wxArrayString& paths) const wxOVERRIDE
{ m_filectrl->GetPaths(paths); }
virtual wxString GetDirectory() const wxOVERRIDE
{ return m_filectrl->GetDirectory(); }
virtual wxString GetFilename() const wxOVERRIDE
{ return m_filectrl->GetFilename(); }
virtual void GetFilenames(wxArrayString& files) const wxOVERRIDE
{ m_filectrl->GetFilenames(files); }
virtual wxString GetWildcard() const wxOVERRIDE
{ return m_filectrl->GetWildcard(); }
virtual int GetFilterIndex() const wxOVERRIDE
{ return m_filectrl->GetFilterIndex(); }
virtual bool SupportsExtraControl() const wxOVERRIDE { return true; }
// implementation only from now on
// -------------------------------
virtual int ShowModal() wxOVERRIDE;
virtual bool Show( bool show = true ) wxOVERRIDE;
void OnList( wxCommandEvent &event );
void OnReport( wxCommandEvent &event );
void OnUp( wxCommandEvent &event );
void OnHome( wxCommandEvent &event );
void OnOk( wxCommandEvent &event );
void OnNew( wxCommandEvent &event );
void OnFileActivated( wxFileCtrlEvent &event);
private:
// if true, don't use this implementation at all
bool m_bypassGenericImpl;
protected:
// update the state of m_upDirButton and m_newDirButton depending on the
// currently selected directory
void OnUpdateButtonsUI(wxUpdateUIEvent& event);
wxString m_filterExtension;
wxGenericFileCtrl *m_filectrl;
wxBitmapButton *m_upDirButton;
wxBitmapButton *m_newDirButton;
private:
void Init();
wxBitmapButton* AddBitmapButton( wxWindowID winId, const wxArtID& artId,
const wxString& tip, wxSizer *sizer );
wxDECLARE_DYNAMIC_CLASS(wxGenericFileDialog);
wxDECLARE_EVENT_TABLE();
// these variables are preserved between wxGenericFileDialog calls
static long ms_lastViewStyle; // list or report?
static bool ms_lastShowHidden; // did we show hidden files?
};
#ifdef wxHAS_GENERIC_FILEDIALOG
class WXDLLIMPEXP_CORE wxFileDialog: public wxGenericFileDialog
{
public:
wxFileDialog() {}
wxFileDialog(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,
const wxSize& size = wxDefaultSize)
:wxGenericFileDialog(parent, message,
defaultDir, defaultFile, wildCard,
style,
pos, size)
{
}
private:
wxDECLARE_DYNAMIC_CLASS(wxFileDialog);
};
#endif // wxHAS_GENERIC_FILEDIALOG
#endif // _WX_FILEDLGG_H_