mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-15 10:39:13 +01:00
822326eea9
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.
136 lines
4.4 KiB
Objective-C
136 lines
4.4 KiB
Objective-C
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/osx/cocoa/private/textimpl.h
|
|
// Purpose: textcontrol implementation classes that have to be exposed
|
|
// Author: Stefan Csomor
|
|
// Modified by:
|
|
// Created: 03/02/99
|
|
// Copyright: (c) Stefan Csomor
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
|
#define _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|
|
|
|
#include "wx/combobox.h"
|
|
#include "wx/osx/private.h"
|
|
|
|
@class wxTextEntryFormatter;
|
|
|
|
// implementation exposed, so that search control can pull it
|
|
|
|
class wxNSTextFieldControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl
|
|
{
|
|
public :
|
|
// wxNSTextFieldControl must always be associated with a wxTextEntry. If
|
|
// it's associated with a wxTextCtrl then we can get the associated entry
|
|
// from it but otherwise the second ctor should be used to explicitly pass
|
|
// us the entry.
|
|
wxNSTextFieldControl( wxTextCtrl *text, WXWidget w );
|
|
wxNSTextFieldControl( wxWindow *wxPeer, wxTextEntry *entry, WXWidget w );
|
|
virtual ~wxNSTextFieldControl();
|
|
|
|
virtual bool CanClipMaxLength() const { return true; }
|
|
virtual void SetMaxLength(unsigned long len);
|
|
|
|
virtual bool CanForceUpper() { return true; }
|
|
virtual void ForceUpper();
|
|
|
|
virtual wxString GetStringValue() const ;
|
|
virtual void SetStringValue( const wxString &str) ;
|
|
virtual void Copy() ;
|
|
virtual void Cut() ;
|
|
virtual void Paste() ;
|
|
virtual bool CanPaste() const ;
|
|
virtual void SetEditable(bool editable) ;
|
|
virtual void GetSelection( long* from, long* to) const ;
|
|
virtual void SetSelection( long from , long to );
|
|
virtual void WriteText(const wxString& str) ;
|
|
virtual bool HasOwnContextMenu() const { return true; }
|
|
virtual bool SetHint(const wxString& hint);
|
|
|
|
virtual void controlAction(WXWidget slf, void* _cmd, void *sender);
|
|
virtual bool becomeFirstResponder(WXWidget slf, void *_cmd);
|
|
virtual bool resignFirstResponder(WXWidget slf, void *_cmd);
|
|
|
|
virtual void SetInternalSelection( long from , long to );
|
|
virtual void UpdateInternalSelectionFromEditor( wxNSTextFieldEditor* editor);
|
|
protected :
|
|
NSTextField* m_textField;
|
|
long m_selStart;
|
|
long m_selEnd;
|
|
|
|
private:
|
|
// Common part of both ctors.
|
|
void Init(WXWidget w);
|
|
|
|
// Get our formatter, creating it if necessary.
|
|
wxTextEntryFormatter* GetFormatter();
|
|
};
|
|
|
|
class wxNSTextViewControl : public wxWidgetCocoaImpl, public wxTextWidgetImpl
|
|
{
|
|
public:
|
|
wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w, long style );
|
|
virtual ~wxNSTextViewControl();
|
|
|
|
virtual void insertText(NSString* text, WXWidget slf, void *_cmd);
|
|
|
|
virtual wxString GetStringValue() const ;
|
|
virtual void SetStringValue( const wxString &str) ;
|
|
virtual void Copy() ;
|
|
virtual void Cut() ;
|
|
virtual void Paste() ;
|
|
virtual bool CanPaste() const ;
|
|
virtual void SetEditable(bool editable) ;
|
|
virtual void GetSelection( long* from, long* to) const ;
|
|
virtual void SetSelection( long from , long to );
|
|
virtual void WriteText(const wxString& str) ;
|
|
virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true );
|
|
|
|
virtual bool GetStyle(long position, wxTextAttr& style);
|
|
virtual void SetStyle(long start, long end, const wxTextAttr& style);
|
|
|
|
virtual bool CanFocus() const;
|
|
|
|
virtual bool HasOwnContextMenu() const { return true; }
|
|
|
|
virtual void CheckSpelling(bool check);
|
|
virtual wxSize GetBestSize() const;
|
|
|
|
protected:
|
|
NSScrollView* m_scrollView;
|
|
NSTextView* m_textView;
|
|
};
|
|
|
|
class wxNSComboBoxControl : public wxNSTextFieldControl, public wxComboWidgetImpl
|
|
{
|
|
public :
|
|
wxNSComboBoxControl( wxComboBox *wxPeer, WXWidget w );
|
|
virtual ~wxNSComboBoxControl();
|
|
|
|
virtual int GetSelectedItem() const;
|
|
virtual void SetSelectedItem(int item);
|
|
|
|
virtual int GetNumberOfItems() const;
|
|
|
|
virtual void InsertItem(int pos, const wxString& item);
|
|
virtual void RemoveItem(int pos);
|
|
|
|
virtual void Clear();
|
|
|
|
virtual wxString GetStringAtIndex(int pos) const;
|
|
|
|
virtual int FindString(const wxString& text) const;
|
|
virtual void Popup();
|
|
virtual void Dismiss();
|
|
|
|
virtual void SetEditable(bool editable);
|
|
|
|
virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd);
|
|
|
|
private:
|
|
NSComboBox* m_comboBox;
|
|
};
|
|
|
|
#endif // _WX_OSX_COCOA_PRIVATE_TEXTIMPL_H_
|