X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8949ba7d7450bbecea6b496551f00f01b632c3d6..82bf63a08ca2c5e2d500557550449cad219991c9:/src/aui/framemanager.cpp diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index b4ee254fd6..3c0b35a969 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -64,7 +64,7 @@ DEFINE_EVENT_TYPE(wxEVT_AUI_FIND_MANAGER) // a few defines to avoid nameclashes #define __MAC_OS_X_MEMORY_MANAGER_CLEAN__ 1 #define __AIFF__ - #include "wx/mac/private.h" + #include "wx/osx/private.h" #endif #ifdef __WXMSW__ @@ -610,17 +610,6 @@ wxAuiManager::~wxAuiManager() } #endif - // We need to remove any reference to this wxAuiManager in any of the - // wxAuiFloatingFrames associated with this manager in case they haven't - // been deleted just yet. - // We need an array copy since Unregister removes the items. - wxAuiFloatingFramePtrArray array_copy = m_floating_frames; - int i, count = array_copy.GetCount(); - for (i = 0; i < count; ++i) - { - UnregisterFloatingFrame(array_copy.Item(i)); - } - delete m_art; } @@ -628,9 +617,7 @@ wxAuiManager::~wxAuiManager() wxAuiFloatingFrame* wxAuiManager::CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& pane_info) { - wxAuiFloatingFrame* frame = new wxAuiFloatingFrame(parent, this, pane_info); - RegisterFloatingFrame(frame); - return frame; + return new wxAuiFloatingFrame(parent, this, pane_info); } bool wxAuiManager::CanDockPanel(const wxAuiPaneInfo & WXUNUSED(p)) @@ -640,37 +627,6 @@ bool wxAuiManager::CanDockPanel(const wxAuiPaneInfo & WXUNUSED(p)) return !(wxGetKeyState(WXK_CONTROL) || wxGetKeyState(WXK_ALT)); } -// registers a floating frame with this manager (see header) -void wxAuiManager::RegisterFloatingFrame(wxAuiFloatingFrame* frame) -{ - frame->SetOwnerManager(this); - int i, count = m_floating_frames.GetCount(); - for (i = 0; i < count; ++i) - { - wxAuiFloatingFrame* f = m_floating_frames.Item(i); - if (f == frame) - // this frame is already registered - return; - } - m_floating_frames.Add(frame); -} - -// unregisters a floating frame from this manager (see header) -void wxAuiManager::UnregisterFloatingFrame(wxAuiFloatingFrame* frame) -{ - frame->SetOwnerManager(NULL); - int i, count = m_floating_frames.GetCount(); - for (i = 0; i < count; ++i) - { - wxAuiFloatingFrame* f = m_floating_frames.Item(i); - if (f == frame) - { - m_floating_frames.Remove(f); - return; - } - } -} - // GetPane() looks up a wxAuiPaneInfo structure based // on the supplied window pointer. Upon failure, GetPane() // returns an empty wxAuiPaneInfo, a condition which can be checked @@ -1014,7 +970,7 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& pane_info) if (pinfo.name.empty() || already_exists) { pinfo.name.Printf(wxT("%08lx%08x%08x%08lx"), - ((unsigned long)pinfo.window) & 0xffffffff, + wxPtrToUInt(pinfo.window) & 0xffffffff, (unsigned int)time(NULL), #ifdef __WXWINCE__ (unsigned int)GetTickCount(), @@ -2365,7 +2321,9 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes, if (middle->GetChildren().GetCount() > 0) cont->Add(middle, 1, wxEXPAND); - + else + delete middle; + // find any bottom docks in this layer @@ -3273,7 +3231,7 @@ void wxAuiManager::ShowHint(const wxRect& rect) // nasty redrawn problems. clip.Intersect(m_frame->GetRect()); - screendc.SetClippingRegion(clip); + screendc.SetDeviceClippingRegion(clip); wxBitmap stipple = wxPaneCreateStippleBitmap(); wxBrush brush(stipple);