+// Called when the sash is double-clicked. The default behaviour is to remove
+// the sash if the minimum pane size is zero.
+void wxSplitterWindow::OnDoubleClickSash(int x, int y)
+{
+ wxCHECK_RET(m_windowTwo, wxT("splitter: no window to remove"));
+
+ // new code should handle events instead of using the virtual functions
+ wxSplitterEvent event(wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, this);
+ event.m_data.pt.x = x;
+ event.m_data.pt.y = y;
+ if ( DoSendEvent(event) )
+ {
+ if ( GetMinimumPaneSize() == 0 || m_permitUnsplitAlways )
+ {
+ wxWindow* win = m_windowTwo;
+ if ( Unsplit(win) )
+ {
+ wxSplitterEvent unsplitEvent(wxEVT_COMMAND_SPLITTER_UNSPLIT, this);
+ unsplitEvent.m_data.win = win;
+ (void)DoSendEvent(unsplitEvent);
+ }
+ }
+ }
+ //else: blocked by user
+}
+
+void wxSplitterWindow::OnUnsplit(wxWindow *winRemoved)
+{
+ // call this before calling the event handler which may delete the window
+ winRemoved->Show(false);
+}
+
+#if defined( __WXMSW__ ) || defined( __WXMAC__)
+
+// this is currently called (and needed) under MSW only...
+void wxSplitterWindow::OnSetCursor(wxSetCursorEvent& event)
+{
+ // if we don't do it, the resizing cursor might be set for child window:
+ // and like this we explicitly say that our cursor should not be used for
+ // children windows which overlap us
+
+ if ( SashHitTest(event.GetX(), event.GetY(), 0) )
+ {
+ // default processing is ok
+ event.Skip();
+ }
+ //else: do nothing, in particular, don't call Skip()
+}
+
+#endif // wxMSW || wxMac
+
+#endif // wxUSE_SPLITTER
+