]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/floatpane.cpp
Bring gtk class naming into line with the new naming scheme by dropping the gtk part.
[wxWidgets.git] / src / aui / floatpane.cpp
index f98693a9d10399142f3729069af9d60b24a39916..9fafc9976d1411ae51ccafed4e62e04b17895a41 100644 (file)
@@ -144,6 +144,11 @@ void wxAuiFloatingFrame::SetPaneWindow(const wxAuiPaneInfo& pane)
 
         SetClientSize(size);
     }
+
+    if (pane.IsFixed())
+    {
+        SetWindowStyleFlag(GetWindowStyleFlag() & ~wxRESIZE_BORDER);
+    }
 }
 
 wxAuiManager* wxAuiFloatingFrame::GetOwnerManager() const
@@ -152,11 +157,11 @@ wxAuiManager* wxAuiFloatingFrame::GetOwnerManager() const
 }
 
 
-void wxAuiFloatingFrame::OnSize(wxSizeEvent& event)
+void wxAuiFloatingFrame::OnSize(wxSizeEvent& WXUNUSED(event))
 {
     if (m_owner_mgr)
     {
-        m_owner_mgr->OnFloatingPaneResized(m_pane_window, event.GetSize());
+        m_owner_mgr->OnFloatingPaneResized(m_pane_window, GetRect());
     }
 }
 
@@ -209,6 +214,15 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event)
         m_last3_rect = m_last2_rect;
         m_last2_rect = m_last_rect;
         m_last_rect = win_rect;
+
+        // However still update the internally stored position to avoid
+        // snapping back to the old one later.
+        if (m_owner_mgr)
+        {
+            m_owner_mgr->GetPane(m_pane_window).
+                floating_pos = win_rect.GetPosition();
+        }
+
         return;
     }
 
@@ -318,7 +332,7 @@ void wxAuiFloatingFrame::OnActivate(wxActivateEvent& event)
 // functionality to wxWidgets itself)
 bool wxAuiFloatingFrame::isMouseDown()
 {
-    return wxGetMouseState().LeftDown();
+    return wxGetMouseState().LeftIsDown();
 }