implemented wxAUI_NB_TAB_SPLIT and wxAUI_NB_TAB_MOVE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams
2006-11-02 15:40:02 +00:00
parent 931483d799
commit 695c008862
2 changed files with 23 additions and 5 deletions

View File

@@ -1922,6 +1922,12 @@ void wxAuiNotebook::OnTabDragMotion(wxCommandEvent& evt)
// always hide the hint for inner-tabctrl drag
m_mgr.HideHint();
// if tab moving is not allowed, leave
if (!(m_flags & wxAUI_NB_TAB_MOVE))
{
return;
}
wxPoint pt = dest_tabs->ScreenToClient(screen_pt);
wxWindow* dest_location_tab;
@@ -1953,6 +1959,13 @@ void wxAuiNotebook::OnTabDragMotion(wxCommandEvent& evt)
return;
}
// if tab moving is not allowed, leave
if (!(m_flags & wxAUI_NB_TAB_SPLIT))
{
return;
}
if (dest_tabs)
{
wxRect hint_rect = dest_tabs->GetRect();
@@ -1973,6 +1986,11 @@ void wxAuiNotebook::OnTabEndDrag(wxCommandEvent& command_evt)
m_mgr.HideHint();
// if tab moving is not allowed, leave
if (!(m_flags & wxAUI_NB_TAB_SPLIT))
{
return;
}
// get the mouse position, which will be used to determine the drop point
wxPoint mouse_screen_pt = ::wxGetMousePosition();

View File

@@ -601,10 +601,10 @@ bool wxAuiMDIClientWindow::CreateClient(wxAuiMDIParentFrame* parent, long style)
SetWindowStyleFlag(style);
if (!wxAuiNotebook::Create(parent,
wxID_ANY,
wxPoint(0,0),
wxSize(100, 100),
wxNO_BORDER))
wxID_ANY,
wxPoint(0,0),
wxSize(100, 100),
wxAUI_NB_DEFAULT_STYLE | wxNO_BORDER))
{
return false;
}