]> git.saurik.com Git - wxWidgets.git/commitdiff
Implement right mouse down/dragged/up
authorDavid Elliott <dfe@tgwbd.org>
Mon, 9 Feb 2004 05:01:23 +0000 (05:01 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Mon, 9 Feb 2004 05:01:23 +0000 (05:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/cocoa/window.mm

index 28ea18d0ead587cd1e76b0bca263af9680f07e3b..5358dfa354cd9728ab8feb3cf252083a8eb26daf 100644 (file)
@@ -414,17 +414,27 @@ bool wxWindowCocoa::Cocoa_mouseUp(WX_NSEvent theEvent)
 
 bool wxWindowCocoa::Cocoa_rightMouseDown(WX_NSEvent theEvent)
 {
-    return false;
+    wxMouseEvent event([theEvent clickCount]<2?wxEVT_RIGHT_DOWN:wxEVT_RIGHT_DCLICK);
+    InitMouseEvent(event,theEvent);
+    wxLogDebug(wxT("Mouse Down @%d,%d num clicks=%d"),event.m_x,event.m_y,[theEvent clickCount]);
+    return GetEventHandler()->ProcessEvent(event);
 }
 
 bool wxWindowCocoa::Cocoa_rightMouseDragged(WX_NSEvent theEvent)
 {
-    return false;
+    wxMouseEvent event(wxEVT_MOTION);
+    InitMouseEvent(event,theEvent);
+    event.m_rightDown = true;
+    wxLogDebug(wxT("Mouse Drag @%d,%d"),event.m_x,event.m_y);
+    return GetEventHandler()->ProcessEvent(event);
 }
 
 bool wxWindowCocoa::Cocoa_rightMouseUp(WX_NSEvent theEvent)
 {
-    return false;
+    wxMouseEvent event(wxEVT_RIGHT_UP);
+    InitMouseEvent(event,theEvent);
+    wxLogDebug(wxT("Mouse Up @%d,%d"),event.m_x,event.m_y);
+    return GetEventHandler()->ProcessEvent(event);
 }
 
 bool wxWindowCocoa::Cocoa_otherMouseDown(WX_NSEvent theEvent)