From 695c008862027cc9225788cd5d351530b773b523 Mon Sep 17 00:00:00 2001 From: Benjamin Williams Date: Thu, 2 Nov 2006 15:40:02 +0000 Subject: [PATCH] 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 --- src/aui/auibook.cpp | 20 +++++++++++++++++++- src/aui/tabmdi.cpp | 8 ++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 0a17298d75..6bcd7f7110 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -1921,6 +1921,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,7 +1986,12 @@ 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(); wxPoint mouse_client_pt = ScreenToClient(mouse_screen_pt); diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index 10c129d730..38ced9bfe4 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -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; } -- 2.45.2