]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/splitter.cpp
suppress gcc warning about non virtual dtor
[wxWidgets.git] / src / generic / splitter.cpp
index 7070960e1e047667d7fdef8a01bd8d618b048fb4..e6a00ded5eb36c6f195a91da22160dee67532b96 100644 (file)
@@ -162,8 +162,8 @@ void wxSplitterWindow::OnIdle(wxIdleEvent& WXUNUSED(event))
 
 void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
 {
-    long x = event.GetX();
-    long y = event.GetY();
+    wxCoord x = (wxCoord)event.GetX(),
+            y = (wxCoord)event.GetY();
 
     // reset the cursor
 #ifdef __WXMOTIF__
@@ -189,6 +189,15 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
 
             m_oldX = x;
             m_oldY = y;
+
+            if ( m_splitMode == wxSPLIT_VERTICAL )
+            {
+                SetCursor(*m_sashCursorWE);
+            }
+            else
+            {
+                SetCursor(*m_sashCursorNS);
+            }
             return;
         }
     }
@@ -257,6 +266,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
         }
 
         SizeWindows();
+        m_needUpdating = FALSE;
     }  // left up && dragging
     else if (event.Moving() && !event.Dragging())
     {
@@ -279,9 +289,24 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
             SetCursor(* wxSTANDARD_CURSOR);
         }
 #endif // __WXGTK__
+
+        m_needUpdating = FALSE;
     }
     else if (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING))
     {
+#ifdef __WXMSW__
+        // Otherwise, the cursor sometimes reverts to the normal cursor
+        // during dragging.
+        if ( m_splitMode == wxSPLIT_VERTICAL )
+        {
+            SetCursor(*m_sashCursorWE);
+        }
+        else
+        {
+            SetCursor(*m_sashCursorNS);
+        }
+#endif
+
         // Obtain window size. We are only interested in the dimension the sash
         // splits up
         int new_sash_position =