fix a couple of harmless warnings during wxOSX build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -874,6 +874,7 @@ bool wxAuiManager_HasLiveResize(wxAuiManager& manager)
|
|||||||
// With Core Graphics on Mac, it's not possible to show sash feedback,
|
// With Core Graphics on Mac, it's not possible to show sash feedback,
|
||||||
// so we'll always use live update instead.
|
// so we'll always use live update instead.
|
||||||
#if defined(__WXMAC__)
|
#if defined(__WXMAC__)
|
||||||
|
wxUnusedVar(manager);
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return (manager.GetFlags() & wxAUI_MGR_LIVE_RESIZE) == wxAUI_MGR_LIVE_RESIZE;
|
return (manager.GetFlags() & wxAUI_MGR_LIVE_RESIZE) == wxAUI_MGR_LIVE_RESIZE;
|
||||||
|
@@ -298,9 +298,9 @@ bool wxListbook::SetPageImage(size_t n, int imageId)
|
|||||||
|
|
||||||
void wxListbook::SetImageList(wxImageList *imageList)
|
void wxListbook::SetImageList(wxImageList *imageList)
|
||||||
{
|
{
|
||||||
|
#ifdef CAN_USE_REPORT_VIEW
|
||||||
wxListView * const list = GetListView();
|
wxListView * const list = GetListView();
|
||||||
|
|
||||||
#ifdef CAN_USE_REPORT_VIEW
|
|
||||||
// If imageList presence has changed, we update the list control view
|
// If imageList presence has changed, we update the list control view
|
||||||
if ( (imageList != NULL) != (GetImageList() != NULL) )
|
if ( (imageList != NULL) != (GetImageList() != NULL) )
|
||||||
{
|
{
|
||||||
|
@@ -647,17 +647,10 @@ wxRendererGeneric::DrawPushButton(wxWindow *win,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#ifdef __WXMAC__
|
|
||||||
wxRendererGeneric::DrawItemSelectionRect(wxWindow * win,
|
wxRendererGeneric::DrawItemSelectionRect(wxWindow * win,
|
||||||
wxDC& dc,
|
wxDC& dc,
|
||||||
const wxRect& rect,
|
const wxRect& rect,
|
||||||
int flags)
|
int flags)
|
||||||
#else
|
|
||||||
wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
|
|
||||||
wxDC& dc,
|
|
||||||
const wxRect& rect,
|
|
||||||
int flags)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
wxBrush brush;
|
wxBrush brush;
|
||||||
if ( flags & wxCONTROL_SELECTED )
|
if ( flags & wxCONTROL_SELECTED )
|
||||||
@@ -687,6 +680,9 @@ wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
|
|||||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||||
|
|
||||||
dc.DrawRectangle( rect );
|
dc.DrawRectangle( rect );
|
||||||
|
|
||||||
|
// it's unused everywhere except in wxOSX/Carbon
|
||||||
|
wxUnusedVar(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -64,17 +64,13 @@ wxScreenDCImpl::~wxScreenDCImpl()
|
|||||||
|
|
||||||
wxBitmap wxScreenDCImpl::DoGetAsBitmap(const wxRect *subrect) const
|
wxBitmap wxScreenDCImpl::DoGetAsBitmap(const wxRect *subrect) const
|
||||||
{
|
{
|
||||||
CGRect srcRect = CGRectMake(0, 0, m_width, m_height);
|
wxRect rect = subrect ? *subrect : wxRect(0, 0, m_width, m_height);
|
||||||
if (subrect)
|
|
||||||
{
|
wxBitmap bmp(rect.GetSize(), 32);
|
||||||
srcRect.origin.x = subrect->GetX();
|
|
||||||
srcRect.origin.y = subrect->GetY();
|
#if !wxOSX_USE_IPHONE
|
||||||
srcRect.size.width = subrect->GetWidth();
|
CGRect srcRect = CGRectMake(rect.x, rect.y, rect.width, rect.height);
|
||||||
srcRect.size.height = subrect->GetHeight();
|
|
||||||
}
|
|
||||||
wxBitmap bmp = wxBitmap(srcRect.size.width, srcRect.size.height, 32);
|
|
||||||
#if wxOSX_USE_IPHONE
|
|
||||||
#else
|
|
||||||
CGContextRef context = (CGContextRef)bmp.GetHBITMAP();
|
CGContextRef context = (CGContextRef)bmp.GetHBITMAP();
|
||||||
|
|
||||||
CGContextSaveGState(context);
|
CGContextSaveGState(context);
|
||||||
|
@@ -784,7 +784,7 @@ void * wxFont::MacGetATSUStyle() const
|
|||||||
#if WXWIN_COMPATIBILITY_2_8
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
wxUint32 wxFont::MacGetATSUFontID() const
|
wxUint32 wxFont::MacGetATSUFontID() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
|
wxCHECK_MSG( M_FONTDATA != NULL, 0, wxT("invalid font") );
|
||||||
|
|
||||||
// cast away constness otherwise lazy font resolution is not possible
|
// cast away constness otherwise lazy font resolution is not possible
|
||||||
const_cast<wxFont *>(this)->RealizeResource();
|
const_cast<wxFont *>(this)->RealizeResource();
|
||||||
@@ -794,7 +794,7 @@ wxUint32 wxFont::MacGetATSUFontID() const
|
|||||||
|
|
||||||
wxUint32 wxFont::MacGetATSUAdditionalQDStyles() const
|
wxUint32 wxFont::MacGetATSUAdditionalQDStyles() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );
|
wxCHECK_MSG( M_FONTDATA != NULL, 0, wxT("invalid font") );
|
||||||
|
|
||||||
// cast away constness otherwise lazy font resolution is not possible
|
// cast away constness otherwise lazy font resolution is not possible
|
||||||
const_cast<wxFont *>(this)->RealizeResource();
|
const_cast<wxFont *>(this)->RealizeResource();
|
||||||
@@ -1303,4 +1303,4 @@ void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding_)
|
|||||||
encoding_ = wxFont::GetDefaultEncoding();
|
encoding_ = wxFont::GetDefaultEncoding();
|
||||||
m_encoding = encoding_;
|
m_encoding = encoding_;
|
||||||
// not reflected in native descriptors
|
// not reflected in native descriptors
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/math.h"
|
||||||
#include "wx/osx/private.h"
|
#include "wx/osx/private.h"
|
||||||
|
|
||||||
@interface wxNSScroller : NSScroller
|
@interface wxNSScroller : NSScroller
|
||||||
@@ -67,7 +68,7 @@ public :
|
|||||||
|
|
||||||
virtual wxInt32 GetValue() const
|
virtual wxInt32 GetValue() const
|
||||||
{
|
{
|
||||||
return [(wxNSScroller*) m_osxView floatValue] * m_maximum;
|
return wxRound([(wxNSScroller*) m_osxView floatValue] * m_maximum);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual wxInt32 GetMaximum() const
|
virtual wxInt32 GetMaximum() const
|
||||||
|
@@ -1654,8 +1654,11 @@ public:
|
|||||||
SetType(wxBITMAP_TYPE_PICT_RESOURCE);
|
SetType(wxBITMAP_TYPE_PICT_RESOURCE);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
|
virtual bool LoadFile(wxBitmap *bitmap,
|
||||||
int desiredWidth, int desiredHeight);
|
const wxString& name,
|
||||||
|
wxBitmapType type,
|
||||||
|
int desiredWidth,
|
||||||
|
int desiredHeight);
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
|
IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
|
||||||
@@ -1663,7 +1666,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
|
|||||||
|
|
||||||
bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap,
|
bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
long WXUNUSED(flags),
|
wxBitmapType WXUNUSED(type),
|
||||||
int WXUNUSED(desiredWidth),
|
int WXUNUSED(desiredWidth),
|
||||||
int WXUNUSED(desiredHeight))
|
int WXUNUSED(desiredHeight))
|
||||||
{
|
{
|
||||||
|
@@ -146,8 +146,8 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
|
|||||||
glReadBuffer(GL_FRONT);
|
glReadBuffer(GL_FRONT);
|
||||||
|
|
||||||
|
|
||||||
width = srcRect.size.width;
|
width = (GLint)srcRect.size.width;
|
||||||
height = srcRect.size.height;
|
height = (GLint)srcRect.size.height;
|
||||||
|
|
||||||
|
|
||||||
bytewidth = width * 4; // Assume 4 bytes/pixel for now
|
bytewidth = width * 4; // Assume 4 bytes/pixel for now
|
||||||
|
@@ -200,7 +200,8 @@ bool wxConsoleEventLoop::Pending() const
|
|||||||
|
|
||||||
bool wxConsoleEventLoop::Dispatch()
|
bool wxConsoleEventLoop::Dispatch()
|
||||||
{
|
{
|
||||||
DispatchTimeout(wxFDIODispatcher::TIMEOUT_INFINITE);
|
DispatchTimeout(static_cast<unsigned long>(
|
||||||
|
wxFDIODispatcher::TIMEOUT_INFINITE));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user