From: Stefan Csomor Date: Wed, 19 Jun 2013 20:28:01 +0000 (+0000) Subject: using common GetContentScaleFactor throughout part 1 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f082dcd598c2489b67a32528cdf263918d92b449 using common GetContentScaleFactor throughout part 1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index d5008ee052..118bad21ac 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -147,6 +147,8 @@ public : virtual bool IsFlipped() const { return m_isFlipped; } #endif + virtual double GetContentScaleFactor() const; + // cocoa thunk connected calls virtual unsigned int draggingEntered(void* sender, WXWidget slf, void* _cmd); @@ -247,8 +249,6 @@ public : virtual void WindowToScreen( int *x, int *y ); - virtual double GetMagnificationFactor() const; - virtual bool IsActive(); virtual void SetModified(bool modified); diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h index c93a02c7ea..9c4660a765 100644 --- a/include/wx/osx/core/private.h +++ b/include/wx/osx/core/private.h @@ -259,7 +259,7 @@ public : virtual void GetPosition( int &x, int &y ) const = 0; virtual void GetSize( int &width, int &height ) const = 0; virtual void SetControlSize( wxWindowVariant variant ) = 0; - virtual float GetContentScaleFactor() const + virtual double GetContentScaleFactor() const { return 1.0; } @@ -874,8 +874,6 @@ public : virtual void WindowToScreen( int *x, int *y ) = 0; - virtual double GetMagnificationFactor() const { return 1.0; } - virtual bool IsActive() = 0; wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } diff --git a/include/wx/osx/iphone/private.h b/include/wx/osx/iphone/private.h index ff78c42c36..070637b234 100644 --- a/include/wx/osx/iphone/private.h +++ b/include/wx/osx/iphone/private.h @@ -61,7 +61,7 @@ public : virtual void GetPosition( int &x, int &y ) const; virtual void GetSize( int &width, int &height ) const; virtual void SetControlSize( wxWindowVariant variant ); - virtual float GetContentScaleFactor() const ; + virtual double GetContentScaleFactor() const ; virtual void SetNeedsDisplay( const wxRect* where = NULL ); virtual bool GetNeedsDisplay() const; diff --git a/include/wx/osx/nonownedwnd.h b/include/wx/osx/nonownedwnd.h index 273cf5ddc0..827dc9f340 100644 --- a/include/wx/osx/nonownedwnd.h +++ b/include/wx/osx/nonownedwnd.h @@ -66,8 +66,6 @@ public: virtual wxPoint GetClientAreaOrigin() const; - virtual double GetMagnificationFactor() const; - // implement base class pure virtuals virtual bool SetTransparent(wxByte alpha); diff --git a/include/wx/osx/window.h b/include/wx/osx/window.h index 69f910a574..3af0c97038 100644 --- a/include/wx/osx/window.h +++ b/include/wx/osx/window.h @@ -98,8 +98,6 @@ public: virtual int GetCharHeight() const; virtual int GetCharWidth() const; - virtual double GetMagnificationFactor() const; - public: virtual void SetScrollbar( int orient, int pos, int thumbVisible, int range, bool refresh = true ); @@ -294,7 +292,7 @@ public: bool IsNativeWindowWrapper() const { return m_isNativeWindowWrapper; } - float GetContentScaleFactor() const ; + double GetContentScaleFactor() const ; // internal response to size events virtual void MacOnInternalSize() {} diff --git a/include/wx/window.h b/include/wx/window.h index 8376fb7731..52c7a4c466 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -521,9 +521,9 @@ public: return wxSize( wxMax( client.x, best.x ), wxMax( client.y, best.y ) ); } - // returns the magnification of the backing store of this window + // returns the magnification of the content of this window // eg 2.0 for a window on a retina screen - virtual double GetMagnificationFactor() const + virtual double GetContentScaleFactor() const { return 1.0; } // return the size of the left/right and top/bottom borders in x and y