+void wxAuiNotebook::UpdateHintWindowSize()
+{
+ wxSize size = CalculateNewSplitSize();
+
+ // the placeholder hint window should be set to this size
+ wxAuiPaneInfo& info = m_mgr.GetPane(wxT("dummy"));
+ if (info.IsOk())
+ {
+ info.MinSize(size);
+ info.BestSize(size);
+ m_dummy_wnd->SetSize(size);
+ }
+}
+
+
+// calculates the size of the new split
+wxSize wxAuiNotebook::CalculateNewSplitSize()
+{
+ // count number of tab controls
+ int tab_ctrl_count = 0;
+ wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
+ size_t i, pane_count = all_panes.GetCount();
+ for (i = 0; i < pane_count; ++i)
+ {
+ wxAuiPaneInfo& pane = all_panes.Item(i);
+ if (pane.name == wxT("dummy"))
+ continue;
+ tab_ctrl_count++;
+ }
+
+ wxSize new_split_size;
+
+ // if there is only one tab control, the first split
+ // should happen around the middle
+ if (tab_ctrl_count < 2)
+ {
+ new_split_size = GetClientSize();
+ new_split_size.x /= 2;
+ new_split_size.y /= 2;
+ }
+ else
+ {
+ // this is in place of a more complicated calculation
+ // that needs to be implemented
+ new_split_size = wxSize(180,180);
+ }
+
+ return new_split_size;
+}
+