// With Core Graphics on Mac, it's not possible to show sash feedback,
// so we'll always use live update instead.
#if defined(__WXMAC__)
+ wxUnusedVar(manager);
return true;
#else
return (manager.GetFlags() & wxAUI_MGR_LIVE_RESIZE) == wxAUI_MGR_LIVE_RESIZE;
void wxListbook::SetImageList(wxImageList *imageList)
{
+#ifdef CAN_USE_REPORT_VIEW
wxListView * const list = GetListView();
-#ifdef CAN_USE_REPORT_VIEW
// If imageList presence has changed, we update the list control view
if ( (imageList != NULL) != (GetImageList() != NULL) )
{
}
void
-#ifdef __WXMAC__
wxRendererGeneric::DrawItemSelectionRect(wxWindow * win,
wxDC& dc,
const wxRect& rect,
int flags)
-#else
-wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
- wxDC& dc,
- const wxRect& rect,
- int flags)
-#endif
{
wxBrush brush;
if ( flags & wxCONTROL_SELECTED )
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle( rect );
+
+ // it's unused everywhere except in wxOSX/Carbon
+ wxUnusedVar(win);
}
void
wxBitmap wxScreenDCImpl::DoGetAsBitmap(const wxRect *subrect) const
{
- CGRect srcRect = CGRectMake(0, 0, m_width, m_height);
- if (subrect)
- {
- srcRect.origin.x = subrect->GetX();
- srcRect.origin.y = subrect->GetY();
- srcRect.size.width = subrect->GetWidth();
- srcRect.size.height = subrect->GetHeight();
- }
- wxBitmap bmp = wxBitmap(srcRect.size.width, srcRect.size.height, 32);
-#if wxOSX_USE_IPHONE
-#else
+ wxRect rect = subrect ? *subrect : wxRect(0, 0, m_width, m_height);
+
+ wxBitmap bmp(rect.GetSize(), 32);
+
+#if !wxOSX_USE_IPHONE
+ CGRect srcRect = CGRectMake(rect.x, rect.y, rect.width, rect.height);
+
CGContextRef context = (CGContextRef)bmp.GetHBITMAP();
CGContextSaveGState(context);
#if WXWIN_COMPATIBILITY_2_8
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
const_cast<wxFont *>(this)->RealizeResource();
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
const_cast<wxFont *>(this)->RealizeResource();
encoding_ = wxFont::GetDefaultEncoding();
m_encoding = encoding_;
// not reflected in native descriptors
-}
\ No newline at end of file
+}
#include "wx/settings.h"
#endif
+#include "wx/math.h"
#include "wx/osx/private.h"
@interface wxNSScroller : NSScroller
virtual wxInt32 GetValue() const
{
- return [(wxNSScroller*) m_osxView floatValue] * m_maximum;
+ return wxRound([(wxNSScroller*) m_osxView floatValue] * m_maximum);
}
virtual wxInt32 GetMaximum() const
SetType(wxBITMAP_TYPE_PICT_RESOURCE);
};
- virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight);
+ virtual bool LoadFile(wxBitmap *bitmap,
+ const wxString& name,
+ wxBitmapType type,
+ int desiredWidth,
+ int desiredHeight);
};
IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap,
const wxString& name,
- long WXUNUSED(flags),
+ wxBitmapType WXUNUSED(type),
int WXUNUSED(desiredWidth),
int WXUNUSED(desiredHeight))
{
glReadBuffer(GL_FRONT);
- width = srcRect.size.width;
- height = srcRect.size.height;
+ width = (GLint)srcRect.size.width;
+ height = (GLint)srcRect.size.height;
bytewidth = width * 4; // Assume 4 bytes/pixel for now
bool wxConsoleEventLoop::Dispatch()
{
- DispatchTimeout(wxFDIODispatcher::TIMEOUT_INFINITE);
+ DispatchTimeout(static_cast<unsigned long>(
+ wxFDIODispatcher::TIMEOUT_INFINITE));
return true;
}