]> git.saurik.com Git - wxWidgets.git/commitdiff
added EVT_MOUSE_CAPTURE_LOST handler
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 9 Feb 2007 01:36:10 +0000 (01:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 9 Feb 2007 01:36:10 +0000 (01:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/scroll/scroll.cpp

index c740185ad6e6d67a40da709df3213d9c8216c6e9..9c144575661b15d0de88a0b7cd3838c0755dc958 100644 (file)
@@ -273,6 +273,7 @@ protected: // event stuff
     void OnMouseLeftDown(wxMouseEvent& event);
     void OnMouseLeftUp(wxMouseEvent& event);
     void OnMouseMove(wxMouseEvent& event);
+    void OnMouseCaptureLost(wxMouseCaptureLostEvent& event);
     void OnScroll(wxScrollWinEvent& event);
 
     DECLARE_EVENT_TABLE()
@@ -743,6 +744,7 @@ BEGIN_EVENT_TABLE(MyAutoTimedScrollingWindow, wxScrolledWindow)
     EVT_LEFT_DOWN(MyAutoTimedScrollingWindow::OnMouseLeftDown)
     EVT_LEFT_UP(MyAutoTimedScrollingWindow::OnMouseLeftUp)
     EVT_MOTION(MyAutoTimedScrollingWindow::OnMouseMove)
+    EVT_MOUSE_CAPTURE_LOST(MyAutoTimedScrollingWindow::OnMouseCaptureLost)
     EVT_SCROLLWIN(MyAutoTimedScrollingWindow::OnScroll)
 END_EVENT_TABLE()
 
@@ -1013,6 +1015,12 @@ void MyAutoTimedScrollingWindow::OnMouseMove(wxMouseEvent& event)
     }
 }
 
+void MyAutoTimedScrollingWindow::OnMouseCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event))
+{
+    // we only capture mouse for timed scrolling, so nothing is needed here
+    // other than making sure to not call event.Skip()
+}
+
 void MyAutoTimedScrollingWindow::OnScroll(wxScrollWinEvent& event)
 {
     // need to move the cursor when autoscrolling