From b02a6dc2b6e10302272af502a12b249681df40d6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 22 Jul 2004 18:51:13 +0000 Subject: [PATCH] wxUSE_STL fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/fl/frmview.h | 2 +- contrib/include/wx/fl/garbagec.h | 2 +- contrib/src/fl/controlbar.cpp | 22 +++++++++++++--------- contrib/src/fl/frmview.cpp | 14 +++++++------- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/contrib/include/wx/fl/frmview.h b/contrib/include/wx/fl/frmview.h index 2c9513c1f2..7d339c3b8c 100644 --- a/contrib/include/wx/fl/frmview.h +++ b/contrib/include/wx/fl/frmview.h @@ -123,7 +123,7 @@ public: int GetActiveViewNo(); wxFrameView* GetActiveView(); - wxNode* GetActiveViewNode(); + wxObjectList::compatibility_iterator GetActiveViewNode(); wxFrameView* GetView( int viewNo ); diff --git a/contrib/include/wx/fl/garbagec.h b/contrib/include/wx/fl/garbagec.h index a80595daab..5e3da01ef7 100644 --- a/contrib/include/wx/fl/garbagec.h +++ b/contrib/include/wx/fl/garbagec.h @@ -25,7 +25,7 @@ struct GCItem wxList mRefs; // references to other nodes }; -inline void* gc_node_to_obj( wxNode* pGCNode ) +inline void* gc_node_to_obj( wxObjectList::compatibility_iterator pGCNode ) { return ( (GCItem*) (pGCNode->GetData()) )->mpObj; } diff --git a/contrib/src/fl/controlbar.cpp b/contrib/src/fl/controlbar.cpp index 5adc722a20..ab23f7e10e 100644 --- a/contrib/src/fl/controlbar.cpp +++ b/contrib/src/fl/controlbar.cpp @@ -406,7 +406,7 @@ void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent ) void wxFrameLayout::DestroyBarWindows() { - wxNode* pSpy = mBarSpyList.GetFirst(); + wxObjectList::compatibility_iterator pSpy = mBarSpyList.GetFirst(); while( pSpy ) { @@ -436,7 +436,7 @@ void wxFrameLayout::DestroyBarWindows() void wxFrameLayout::ShowFloatedWindows( bool show ) { - wxNode* pNode = mFloatedFrames.GetFirst(); + wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst(); while( pNode ) { @@ -496,7 +496,7 @@ wxFrameLayout::~wxFrameLayout() if ( mpNECursor ) delete mpNECursor; - wxNode* pSpy = mBarSpyList.GetFirst(); + wxObjectList::compatibility_iterator pSpy = mBarSpyList.GetFirst(); while( pSpy ) { @@ -723,7 +723,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow ) { pBar->mpBarWnd->Show(false); // to avoid flicker upon reparenting - wxNode* pNode = mFloatedFrames.GetFirst(); + wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst(); while( pNode ) { @@ -741,7 +741,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow ) pBar->mAlignment = pBar->mDimInfo.mLRUPane; - mFloatedFrames.DeleteNode( pNode ); + mFloatedFrames.Erase( pNode ); pFFrm->Show( false ); pFFrm->Destroy(); break; @@ -834,7 +834,7 @@ void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar ) { if ( !(mFloatingOn && pBar->mFloatingOn)) return; - wxNode* pNode = mFloatedFrames.GetFirst(); + wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst(); while( pNode ) { @@ -2181,7 +2181,7 @@ cbDockPane::~cbDockPane() for ( i = 0; i != mRows.Count(); ++i ) delete mRows[i]; - mRowShapeData.DeleteContents( true ); + WX_CLEAR_LIST(wxList,mRowShapeData) // NOTE:: control bar infromation structures are cleaned-up // in wxFrameLayout's destructor, using global control-bar list @@ -3472,7 +3472,11 @@ cbBarInfo* cbDockPane::GetBarInfoByWindow( wxWindow* pBarWnd ) void cbDockPane::GetRowShapeData( cbRowInfo* pRow, wxList* pLst ) { - pLst->DeleteContents( true ); + if(pLst) + { + WX_CLEAR_LIST(wxList,*pLst); + } + pLst->Clear(); size_t i; @@ -3494,7 +3498,7 @@ void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst ) if ( pLst->GetFirst() == NULL ) return; - wxNode* pData = pLst->GetFirst(); + wxObjectList::compatibility_iterator pData = pLst->GetFirst(); size_t i; for ( i = 0; i != pRow->mBars.Count(); ++i ) diff --git a/contrib/src/fl/frmview.cpp b/contrib/src/fl/frmview.cpp index 4246df8caf..67ee842b1a 100644 --- a/contrib/src/fl/frmview.cpp +++ b/contrib/src/fl/frmview.cpp @@ -168,7 +168,7 @@ void wxFrameManager::DestroyViews() { DeactivateCurrentView(); - wxNode* pNode = mViews.GetFirst(); + wxObjectList::compatibility_iterator pNode = mViews.GetFirst(); while ( pNode ) { @@ -184,7 +184,7 @@ void wxFrameManager::DestroyViews() int wxFrameManager::GetViewNo( wxFrameView* pView ) { - wxNode* pNode = mViews.GetFirst(); + wxObjectList::compatibility_iterator pNode = mViews.GetFirst(); int n = 0; while ( pNode ) @@ -225,7 +225,7 @@ void wxFrameManager::EnableMenusForView( wxFrameView* pView, bool enable ) void wxFrameManager::SyncAllMenus() { - wxNode* pNode = mViews.GetFirst(); + wxObjectList::compatibility_iterator pNode = mViews.GetFirst(); int i = 0; while ( pNode ) @@ -261,7 +261,7 @@ void wxFrameManager::Init( wxWindow* pMainFrame, const wxString& settingsFile ) mSettingsFile = settingsFile; mpFrameWnd = pMainFrame; - wxNode* pNode = mViews.GetFirst(); + wxObjectList::compatibility_iterator pNode = mViews.GetFirst(); while ( pNode ) { @@ -318,13 +318,13 @@ int wxFrameManager::GetActiveViewNo() wxFrameView* wxFrameManager::GetActiveView() { - wxNode* pNode = mViews.Item( mActiveViewNo ); + wxObjectList::compatibility_iterator pNode = mViews.Item( mActiveViewNo ); if ( pNode ) return (wxFrameView*)pNode->GetData(); else return NULL; } -wxNode* wxFrameManager::GetActiveViewNode() +wxObjectList::compatibility_iterator wxFrameManager::GetActiveViewNode() { return mViews.Item( mActiveViewNo ); } @@ -341,7 +341,7 @@ wxWindow* wxFrameManager::GetParentWindow() wxFrameView* wxFrameManager::GetView( int viewNo ) { - wxNode* pNode = mViews.Item( viewNo ); + wxObjectList::compatibility_iterator pNode = mViews.Item( viewNo ); if ( pNode ) return (wxFrameView*)pNode->GetData(); else return NULL; -- 2.47.2