#include "wx/settings.h"
#include "wx/log.h"
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_DOUBLECLICKED)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_SPLITTER_UNSPLIT)
+
IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow)
IMPLEMENT_DYNAMIC_CLASS(wxSplitterEvent, wxCommandEvent)
DrawSash(dc);
}
-void wxSplitterWindow::OnIdle(wxIdleEvent& WXUNUSED(event))
+void wxSplitterWindow::OnIdle(wxIdleEvent& event)
{
if (m_needUpdating)
SizeWindows();
+
+ event.Skip();
}
void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
return;
}
}
-
+
if (new_sash_position == m_sashPosition)
return;
if ( GetBorderSize() > 0 )
DrawBorders(dc);
DrawSash(dc);
-
+
SetNeedUpdating(FALSE);
}
if ( sashPosition > 0 )
m_sashPosition = sashPosition;
else if ( sashPosition < 0 )
- m_sashPosition = w - sashPosition;
+ m_sashPosition = w + sashPosition; // It's negative so adding is subtracting
else // default
m_sashPosition = w/2;
if ( sashPosition > 0 )
m_sashPosition = sashPosition;
else if ( sashPosition < 0 )
- m_sashPosition = h - sashPosition;
+ m_sashPosition = h + sashPosition; // It's negative so adding is subtracting
else // default
m_sashPosition = h/2;