]> git.saurik.com Git - wxWidgets.git/commitdiff
using native key handling, closes #10406
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 25 Sep 2009 18:53:38 +0000 (18:53 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 25 Sep 2009 18:53:38 +0000 (18:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/listbox.mm

index f354c9bc0c0c18d25e5a34fa24369d0b1cdd7879..79389e8306ccb34e5265fbfbfc9106465553b7eb 100644 (file)
@@ -150,6 +150,8 @@ public :
     virtual void            UpdateLineToEnd( unsigned int n);
 
     virtual void            controlDoubleAction(WXWidget slf, void* _cmd, void *sender);
+    virtual bool            DoHandleKeyEvent(NSEvent *event);
+
 protected :
     wxNSTableView*          m_tableView ;
 
@@ -510,6 +512,18 @@ void wxListWidgetCocoaImpl::controlDoubleAction(WXWidget WXUNUSED(slf),void* WXU
     list->HandleLineEvent( sel, true );
 }
 
+bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
+{
+    wxKeyEvent wxevent(wxEVT_KEY_DOWN);
+    SetupKeyEvent( wxevent, event );
+    wxevent.SetEventObject(GetWXPeer());
+    bool result = GetWXPeer()->OSXHandleKeyEvent(wxevent);
+
+    // no interpretKeyEvents here, but rerouting to native keyhandling
+    
+    return result;
+}
+
 // accessing content