EVT_SPLITTER_SASH_POS_CHANGING(-1, wxSplitterWindow::OnSashPosChanged)
EVT_SPLITTER_DCLICK(-1, wxSplitterWindow::OnDoubleClick)
EVT_SPLITTER_UNSPLIT(-1, wxSplitterWindow::OnUnsplitEvent)
+
+ WX_EVENT_TABLE_CONTROL_CONTAINER(wxSplitterWindow)
END_EVENT_TABLE()
+WX_DELEGATE_TO_CONTROL_CONTAINER(wxSplitterWindow);
+
bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString& name)
{
+ // allow TABbing from one window to the other
+ style |= wxTAB_TRAVERSAL;
+
if (!wxWindow::Create(parent, id, pos, size, style, name))
return FALSE;
void wxSplitterWindow::Init()
{
+ m_container.SetContainerWindow(this);
+
m_splitMode = wxSPLIT_VERTICAL;
m_permitUnsplitAlways = TRUE;
m_windowOne = (wxWindow *) NULL;
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;