]> git.saurik.com Git - wxWidgets.git/commitdiff
implemented wxAUI_NB_TAB_SPLIT and wxAUI_NB_TAB_MOVE
authorBenjamin Williams <bwilliams@kirix.com>
Thu, 2 Nov 2006 15:40:02 +0000 (15:40 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Thu, 2 Nov 2006 15:40:02 +0000 (15:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp
src/aui/tabmdi.cpp

index 0a17298d759d0abb54fdc699bc40541be9de6580..6bcd7f7110ae579d6d5125467b5ad2c8ac13f382 100644 (file)
@@ -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);
index 10c129d730e0fc9938d89872a467bea056bcc243..38ced9bfe495f81a0df2a082a6e510c7f1bd3d95 100644 (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;
     }