fixing some warnings, adding proper OnChar support for special keys

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2010-04-12 13:38:41 +00:00
parent 946ceed9cd
commit 849252d51c

View File

@@ -689,7 +689,7 @@ void wxOSX_mouseEvent(NSView* self, SEL _cmd, NSEvent *event)
impl->mouseEvent(event, self, _cmd);
}
BOOL wxOSX_acceptsFirstMouse(NSView* self, SEL _cmd, NSEvent *event)
BOOL wxOSX_acceptsFirstMouse(NSView* WXUNUSED(self), SEL WXUNUSED(_cmd), NSEvent *WXUNUSED(event))
{
// This is needed to support click through, otherwise the first click on a window
// will not do anything unless it is the active window already.
@@ -1333,6 +1333,7 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible )
- (void)animationDidEnd:(NSAnimation*)animation
{
wxUnusedVar(animation);
m_isDone = true;
}
@@ -1949,10 +1950,20 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
{
if ( !result )
{
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
[[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
if ( wxevent.GetKeyCode() < WXK_SPACE || wxevent.GetKeyCode() == WXK_DELETE || wxevent.GetKeyCode() >= WXK_START )
{
// eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars
wxKeyEvent wxevent2(wxevent) ;
wxevent2.SetEventType(wxEVT_CHAR);
GetWXPeer()->OSXHandleKeyEvent(wxevent2);
}
else
[m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
{
if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
[[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
else
[m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
}
result = true;
}
}