wxUSE_STL fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-07-22 18:51:13 +00:00
parent 8833e26cbd
commit b02a6dc2b6
4 changed files with 22 additions and 18 deletions

View File

@@ -123,7 +123,7 @@ public:
int GetActiveViewNo(); int GetActiveViewNo();
wxFrameView* GetActiveView(); wxFrameView* GetActiveView();
wxNode* GetActiveViewNode(); wxObjectList::compatibility_iterator GetActiveViewNode();
wxFrameView* GetView( int viewNo ); wxFrameView* GetView( int viewNo );

View File

@@ -25,7 +25,7 @@ struct GCItem
wxList mRefs; // references to other nodes 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; return ( (GCItem*) (pGCNode->GetData()) )->mpObj;
} }

View File

@@ -406,7 +406,7 @@ void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent )
void wxFrameLayout::DestroyBarWindows() void wxFrameLayout::DestroyBarWindows()
{ {
wxNode* pSpy = mBarSpyList.GetFirst(); wxObjectList::compatibility_iterator pSpy = mBarSpyList.GetFirst();
while( pSpy ) while( pSpy )
{ {
@@ -436,7 +436,7 @@ void wxFrameLayout::DestroyBarWindows()
void wxFrameLayout::ShowFloatedWindows( bool show ) void wxFrameLayout::ShowFloatedWindows( bool show )
{ {
wxNode* pNode = mFloatedFrames.GetFirst(); wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst();
while( pNode ) while( pNode )
{ {
@@ -496,7 +496,7 @@ wxFrameLayout::~wxFrameLayout()
if ( mpNECursor ) if ( mpNECursor )
delete mpNECursor; delete mpNECursor;
wxNode* pSpy = mBarSpyList.GetFirst(); wxObjectList::compatibility_iterator pSpy = mBarSpyList.GetFirst();
while( pSpy ) while( pSpy )
{ {
@@ -723,7 +723,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
{ {
pBar->mpBarWnd->Show(false); // to avoid flicker upon reparenting pBar->mpBarWnd->Show(false); // to avoid flicker upon reparenting
wxNode* pNode = mFloatedFrames.GetFirst(); wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst();
while( pNode ) while( pNode )
{ {
@@ -741,7 +741,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
pBar->mAlignment = pBar->mDimInfo.mLRUPane; pBar->mAlignment = pBar->mDimInfo.mLRUPane;
mFloatedFrames.DeleteNode( pNode ); mFloatedFrames.Erase( pNode );
pFFrm->Show( false ); pFFrm->Show( false );
pFFrm->Destroy(); break; pFFrm->Destroy(); break;
@@ -834,7 +834,7 @@ void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar )
{ {
if ( !(mFloatingOn && pBar->mFloatingOn)) return; if ( !(mFloatingOn && pBar->mFloatingOn)) return;
wxNode* pNode = mFloatedFrames.GetFirst(); wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst();
while( pNode ) while( pNode )
{ {
@@ -2181,7 +2181,7 @@ cbDockPane::~cbDockPane()
for ( i = 0; i != mRows.Count(); ++i ) for ( i = 0; i != mRows.Count(); ++i )
delete mRows[i]; delete mRows[i];
mRowShapeData.DeleteContents( true ); WX_CLEAR_LIST(wxList,mRowShapeData)
// NOTE:: control bar infromation structures are cleaned-up // NOTE:: control bar infromation structures are cleaned-up
// in wxFrameLayout's destructor, using global control-bar list // 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 ) void cbDockPane::GetRowShapeData( cbRowInfo* pRow, wxList* pLst )
{ {
pLst->DeleteContents( true ); if(pLst)
{
WX_CLEAR_LIST(wxList,*pLst);
}
pLst->Clear(); pLst->Clear();
size_t i; size_t i;
@@ -3494,7 +3498,7 @@ void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst )
if ( pLst->GetFirst() == NULL ) if ( pLst->GetFirst() == NULL )
return; return;
wxNode* pData = pLst->GetFirst(); wxObjectList::compatibility_iterator pData = pLst->GetFirst();
size_t i; size_t i;
for ( i = 0; i != pRow->mBars.Count(); ++i ) for ( i = 0; i != pRow->mBars.Count(); ++i )

View File

@@ -168,7 +168,7 @@ void wxFrameManager::DestroyViews()
{ {
DeactivateCurrentView(); DeactivateCurrentView();
wxNode* pNode = mViews.GetFirst(); wxObjectList::compatibility_iterator pNode = mViews.GetFirst();
while ( pNode ) while ( pNode )
{ {
@@ -184,7 +184,7 @@ void wxFrameManager::DestroyViews()
int wxFrameManager::GetViewNo( wxFrameView* pView ) int wxFrameManager::GetViewNo( wxFrameView* pView )
{ {
wxNode* pNode = mViews.GetFirst(); wxObjectList::compatibility_iterator pNode = mViews.GetFirst();
int n = 0; int n = 0;
while ( pNode ) while ( pNode )
@@ -225,7 +225,7 @@ void wxFrameManager::EnableMenusForView( wxFrameView* pView, bool enable )
void wxFrameManager::SyncAllMenus() void wxFrameManager::SyncAllMenus()
{ {
wxNode* pNode = mViews.GetFirst(); wxObjectList::compatibility_iterator pNode = mViews.GetFirst();
int i = 0; int i = 0;
while ( pNode ) while ( pNode )
@@ -261,7 +261,7 @@ void wxFrameManager::Init( wxWindow* pMainFrame, const wxString& settingsFile )
mSettingsFile = settingsFile; mSettingsFile = settingsFile;
mpFrameWnd = pMainFrame; mpFrameWnd = pMainFrame;
wxNode* pNode = mViews.GetFirst(); wxObjectList::compatibility_iterator pNode = mViews.GetFirst();
while ( pNode ) while ( pNode )
{ {
@@ -318,13 +318,13 @@ int wxFrameManager::GetActiveViewNo()
wxFrameView* wxFrameManager::GetActiveView() wxFrameView* wxFrameManager::GetActiveView()
{ {
wxNode* pNode = mViews.Item( mActiveViewNo ); wxObjectList::compatibility_iterator pNode = mViews.Item( mActiveViewNo );
if ( pNode ) return (wxFrameView*)pNode->GetData(); if ( pNode ) return (wxFrameView*)pNode->GetData();
else return NULL; else return NULL;
} }
wxNode* wxFrameManager::GetActiveViewNode() wxObjectList::compatibility_iterator wxFrameManager::GetActiveViewNode()
{ {
return mViews.Item( mActiveViewNo ); return mViews.Item( mActiveViewNo );
} }
@@ -341,7 +341,7 @@ wxWindow* wxFrameManager::GetParentWindow()
wxFrameView* wxFrameManager::GetView( int viewNo ) wxFrameView* wxFrameManager::GetView( int viewNo )
{ {
wxNode* pNode = mViews.Item( viewNo ); wxObjectList::compatibility_iterator pNode = mViews.Item( viewNo );
if ( pNode ) return (wxFrameView*)pNode->GetData(); if ( pNode ) return (wxFrameView*)pNode->GetData();
else return NULL; else return NULL;