+void wxSplitterWindow::AdjustSashPosition(int &sashPos)
+{
+ int w, h;
+ GetClientSize(&w, &h);
+ int window_size = (m_splitMode == wxSPLIT_VERTICAL) ? w : h;
+ wxWindow *win;
+
+ if ( sashPos < m_minimumPaneSize )
+ sashPos = m_minimumPaneSize;
+ else if ( sashPos > window_size - m_minimumPaneSize )
+ sashPos = window_size - m_minimumPaneSize;
+
+ win = GetWindow1();
+ if ( win )
+ {
+ int minSize = (m_splitMode == wxSPLIT_VERTICAL) ?
+ win->GetMinWidth() : win->GetMinHeight();
+ if ( minSize != -1 && sashPos < minSize + GetBorderSize() )
+ sashPos = minSize + GetBorderSize();
+ }
+
+ win = GetWindow2();
+ if ( win )
+ {
+ int minSize = (m_splitMode == wxSPLIT_VERTICAL) ?
+ win->GetMinWidth() : win->GetMinHeight();
+ if ( minSize != -1 && sashPos > window_size - minSize - GetBorderSize() )
+ sashPos = window_size - minSize - GetBorderSize();
+ }
+}
+