suppress more float/double->int conversion warnings to be able to see anything else in wxOSX/Cocoa build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,18 +23,18 @@ NSRect wxToNSRect( NSView* parent, const wxRect& r )
|
||||
int y = r.y;
|
||||
int x = r.x ;
|
||||
if ( parent == NULL || ![ parent isFlipped ] )
|
||||
y = frame.size.height - ( r.y + r.height );
|
||||
y = (int)(frame.size.height - ( r.y + r.height ));
|
||||
return NSMakeRect(x, y, r.width , r.height);
|
||||
}
|
||||
|
||||
wxRect wxFromNSRect( NSView* parent, const NSRect& rect )
|
||||
{
|
||||
NSRect frame = parent ? [parent bounds] : [[NSScreen mainScreen] frame];
|
||||
int y = rect.origin.y;
|
||||
int x = rect.origin.x;
|
||||
int y = (int)rect.origin.y;
|
||||
int x = (int)rect.origin.x;
|
||||
if ( parent == NULL || ![ parent isFlipped ] )
|
||||
y = frame.size.height - (rect.origin.y + rect.size.height);
|
||||
return wxRect( x, y, rect.size.width, rect.size.height );
|
||||
y = (int)(frame.size.height - (rect.origin.y + rect.size.height));
|
||||
return wxRect( x, y, (int)rect.size.width, (int)rect.size.height );
|
||||
}
|
||||
|
||||
NSPoint wxToNSPoint( NSView* parent, const wxPoint& p )
|
||||
@@ -43,17 +43,17 @@ NSPoint wxToNSPoint( NSView* parent, const wxPoint& p )
|
||||
int x = p.x ;
|
||||
int y = p.y;
|
||||
if ( parent == NULL || ![ parent isFlipped ] )
|
||||
y = frame.size.height - ( p.y );
|
||||
y = (int)(frame.size.height - ( p.y ));
|
||||
return NSMakePoint(x, y);
|
||||
}
|
||||
|
||||
wxPoint wxFromNSPoint( NSView* parent, const NSPoint& p )
|
||||
{
|
||||
NSRect frame = parent ? [parent bounds] : [[NSScreen mainScreen] frame];
|
||||
int x = p.x;
|
||||
int y = p.y;
|
||||
int x = (int)p.x;
|
||||
int y = (int)p.y;
|
||||
if ( parent == NULL || ![ parent isFlipped ] )
|
||||
y = frame.size.height - ( p.y );
|
||||
y = (int)(frame.size.height - ( p.y ));
|
||||
return wxPoint( x, y);
|
||||
}
|
||||
|
||||
@@ -217,8 +217,8 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector
|
||||
{
|
||||
NSRect frame = [win frame];
|
||||
wxRect wxframe = wxFromNSRect( NULL, frame );
|
||||
wxframe.SetWidth( proposedFrameSize.width );
|
||||
wxframe.SetHeight( proposedFrameSize.height );
|
||||
wxframe.SetWidth( (int)proposedFrameSize.width );
|
||||
wxframe.SetHeight( (int)proposedFrameSize.height );
|
||||
wxNSWindow* window = (wxNSWindow*) win;
|
||||
wxNonOwnedWindowCocoaImpl* windowimpl = [window implementation];
|
||||
if ( windowimpl )
|
||||
@@ -548,8 +548,8 @@ void wxNonOwnedWindowCocoaImpl::GetPosition( int &x, int &y ) const
|
||||
void wxNonOwnedWindowCocoaImpl::GetSize( int &width, int &height ) const
|
||||
{
|
||||
NSRect rect = [m_macWindow frame];
|
||||
width = rect.size.width;
|
||||
height = rect.size.height;
|
||||
width = (int)rect.size.width;
|
||||
height = (int)rect.size.height;
|
||||
}
|
||||
|
||||
void wxNonOwnedWindowCocoaImpl::GetContentArea( int& left, int &top, int &width, int &height ) const
|
||||
@@ -557,10 +557,10 @@ void wxNonOwnedWindowCocoaImpl::GetContentArea( int& left, int &top, int &width,
|
||||
NSRect outer = NSMakeRect(100,100,100,100);
|
||||
NSRect content = [NSWindow contentRectForFrameRect:outer styleMask:[m_macWindow styleMask] ];
|
||||
NSRect rect = [[m_macWindow contentView] frame];
|
||||
left = rect.origin.x;
|
||||
top = rect.origin.y;
|
||||
width = rect.size.width;
|
||||
height = rect.size.height;
|
||||
left = (int)rect.origin.x;
|
||||
top = (int)rect.origin.y;
|
||||
width = (int)rect.size.width;
|
||||
height = (int)rect.size.height;
|
||||
}
|
||||
|
||||
bool wxNonOwnedWindowCocoaImpl::SetShape(const wxRegion& WXUNUSED(region))
|
||||
|
@@ -106,10 +106,10 @@ public:
|
||||
{
|
||||
wxNSTabView* slf = (wxNSTabView*) m_osxView;
|
||||
NSRect r = [slf contentRect];
|
||||
left = r.origin.x;
|
||||
top = r.origin.y;
|
||||
width = r.size.width;
|
||||
height = r.size.height;
|
||||
left = (int)r.origin.x;
|
||||
top = (int)r.origin.y;
|
||||
width = (int)r.size.width;
|
||||
height = (int)r.size.height;
|
||||
}
|
||||
|
||||
void SetValue( wxInt32 value )
|
||||
|
@@ -716,9 +716,9 @@ void wxToolBar::DoGetSize( int *width, int *height ) const
|
||||
}
|
||||
|
||||
if ( width != NULL )
|
||||
*width = windowFrame.size.width;
|
||||
*width = (int)windowFrame.size.width;
|
||||
if ( height != NULL )
|
||||
*height = toolbarHeight;
|
||||
*height = (int)toolbarHeight;
|
||||
}
|
||||
else
|
||||
wxToolBarBase::DoGetSize( width, height );
|
||||
|
@@ -284,7 +284,7 @@ void SetupKeyEvent( wxKeyEvent &wxevent , NSEvent * nsEvent, NSString* charStrin
|
||||
wxevent.m_rawCode = [nsEvent keyCode];
|
||||
wxevent.m_rawFlags = modifiers;
|
||||
|
||||
wxevent.SetTimestamp( [nsEvent timestamp] * 1000.0 ) ;
|
||||
wxevent.SetTimestamp( (int)([nsEvent timestamp] * 1000) ) ;
|
||||
|
||||
wxString chars;
|
||||
if ( eventType != NSFlagsChanged )
|
||||
@@ -373,7 +373,7 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent )
|
||||
wxevent.m_controlDown = modifiers & NSControlKeyMask;
|
||||
wxevent.m_altDown = modifiers & NSAlternateKeyMask;
|
||||
wxevent.m_metaDown = modifiers & NSCommandKeyMask;
|
||||
wxevent.SetTimestamp( [nsEvent timestamp] * 1000.0 ) ;
|
||||
wxevent.SetTimestamp( (int)([nsEvent timestamp] * 1000) ) ;
|
||||
|
||||
UInt32 mouseChord = 0;
|
||||
|
||||
@@ -497,11 +497,11 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent )
|
||||
if ( fabs([nsEvent deltaX]) > fabs([nsEvent deltaY]) )
|
||||
{
|
||||
wxevent.m_wheelAxis = 1;
|
||||
wxevent.m_wheelRotation = [nsEvent deltaX] * 10.0;
|
||||
wxevent.m_wheelRotation = (int)([nsEvent deltaX] * 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxevent.m_wheelRotation = [nsEvent deltaY] * 10.0;
|
||||
wxevent.m_wheelRotation = (int)([nsEvent deltaY] * 10);
|
||||
}
|
||||
}
|
||||
break ;
|
||||
@@ -1230,8 +1230,8 @@ void wxWidgetCocoaImpl::GetPosition( int &x, int &y ) const
|
||||
void wxWidgetCocoaImpl::GetSize( int &width, int &height ) const
|
||||
{
|
||||
NSRect rect = [m_osxView frame];
|
||||
width = rect.size.width;
|
||||
height = rect.size.height;
|
||||
width = (int)rect.size.width;
|
||||
height = (int)rect.size.height;
|
||||
}
|
||||
|
||||
void wxWidgetCocoaImpl::GetContentArea( int&left, int &top, int &width, int &height ) const
|
||||
@@ -1243,14 +1243,14 @@ void wxWidgetCocoaImpl::GetContentArea( int&left, int &top, int &width, int &hei
|
||||
NSRect bounds = [m_osxView bounds];
|
||||
NSRect rect = [cv frame];
|
||||
|
||||
int y = rect.origin.y;
|
||||
int x = rect.origin.x;
|
||||
int y = (int)rect.origin.y;
|
||||
int x = (int)rect.origin.x;
|
||||
if ( ![ m_osxView isFlipped ] )
|
||||
y = bounds.size.height - (rect.origin.y + rect.size.height);
|
||||
y = (int)(bounds.size.height - (rect.origin.y + rect.size.height));
|
||||
left = x;
|
||||
top = y;
|
||||
width = rect.size.width;
|
||||
height = rect.size.height;
|
||||
width = (int)rect.size.width;
|
||||
height = (int)rect.size.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1373,7 +1373,7 @@ wxInt32 wxWidgetCocoaImpl::GetMinimum() const
|
||||
{
|
||||
if ( [m_osxView respondsToSelector:@selector(getMinValue:)] )
|
||||
{
|
||||
return [m_osxView minValue];
|
||||
return (int)[m_osxView minValue];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1382,7 +1382,7 @@ wxInt32 wxWidgetCocoaImpl::GetMaximum() const
|
||||
{
|
||||
if ( [m_osxView respondsToSelector:@selector(getMaxValue:)] )
|
||||
{
|
||||
return [m_osxView maxValue];
|
||||
return (int)[m_osxView maxValue];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1410,8 +1410,8 @@ void wxWidgetCocoaImpl::GetBestRect( wxRect *r ) const
|
||||
[m_osxView sizeToFit];
|
||||
NSRect best = [m_osxView frame];
|
||||
[m_osxView setFrame:former];
|
||||
r->width = best.size.width;
|
||||
r->height = best.size.height;
|
||||
r->width = (int)best.size.width;
|
||||
r->height = (int)best.size.height;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user