updated code to not use deprecated methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21360 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,7 +27,7 @@ struct GCItem
|
|||||||
|
|
||||||
inline void* gc_node_to_obj( wxNode* pGCNode )
|
inline void* gc_node_to_obj( wxNode* pGCNode )
|
||||||
{
|
{
|
||||||
return ( (GCItem*) (pGCNode->Data()) )->mpObj;
|
return ( (GCItem*) (pGCNode->GetData()) )->mpObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -402,11 +402,11 @@ void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent )
|
|||||||
|
|
||||||
void wxFrameLayout::DestroyBarWindows()
|
void wxFrameLayout::DestroyBarWindows()
|
||||||
{
|
{
|
||||||
wxNode* pSpy = mBarSpyList.First();
|
wxNode* pSpy = mBarSpyList.GetFirst();
|
||||||
|
|
||||||
while( pSpy )
|
while( pSpy )
|
||||||
{
|
{
|
||||||
cbBarSpy& spy = *((cbBarSpy*)pSpy->Data());
|
cbBarSpy& spy = *((cbBarSpy*)pSpy->GetData());
|
||||||
|
|
||||||
if ( spy.mpBarWnd->GetEventHandler() == &spy )
|
if ( spy.mpBarWnd->GetEventHandler() == &spy )
|
||||||
|
|
||||||
@@ -414,7 +414,7 @@ void wxFrameLayout::DestroyBarWindows()
|
|||||||
|
|
||||||
delete &spy;
|
delete &spy;
|
||||||
|
|
||||||
pSpy = pSpy->Next();
|
pSpy = pSpy->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
mBarSpyList.Clear();
|
mBarSpyList.Clear();
|
||||||
@@ -432,15 +432,15 @@ void wxFrameLayout::DestroyBarWindows()
|
|||||||
|
|
||||||
void wxFrameLayout::ShowFloatedWindows( bool show )
|
void wxFrameLayout::ShowFloatedWindows( bool show )
|
||||||
{
|
{
|
||||||
wxNode* pNode = mFloatedFrames.First();
|
wxNode* pNode = mFloatedFrames.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
|
cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
|
||||||
|
|
||||||
pFFrm->Show( show );
|
pFFrm->Show( show );
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -491,11 +491,11 @@ wxFrameLayout::~wxFrameLayout()
|
|||||||
if ( mpNECursor )
|
if ( mpNECursor )
|
||||||
delete mpNECursor;
|
delete mpNECursor;
|
||||||
|
|
||||||
wxNode* pSpy = mBarSpyList.First();
|
wxNode* pSpy = mBarSpyList.GetFirst();
|
||||||
|
|
||||||
while( pSpy )
|
while( pSpy )
|
||||||
{
|
{
|
||||||
cbBarSpy& spy = *((cbBarSpy*)pSpy->Data());
|
cbBarSpy& spy = *((cbBarSpy*)pSpy->GetData());
|
||||||
|
|
||||||
if ( spy.mpBarWnd->GetEventHandler() == &spy )
|
if ( spy.mpBarWnd->GetEventHandler() == &spy )
|
||||||
|
|
||||||
@@ -503,7 +503,7 @@ wxFrameLayout::~wxFrameLayout()
|
|||||||
|
|
||||||
delete &spy;
|
delete &spy;
|
||||||
|
|
||||||
pSpy = pSpy->Next();
|
pSpy = pSpy->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( i = 0; i != mAllBars.Count(); ++i )
|
for ( i = 0; i != mAllBars.Count(); ++i )
|
||||||
@@ -715,11 +715,11 @@ 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.First();
|
wxNode* pNode = mFloatedFrames.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
|
cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
|
||||||
|
|
||||||
if ( pFFrm->GetBar() == pBar )
|
if ( pFFrm->GetBar() == pBar )
|
||||||
{
|
{
|
||||||
@@ -739,7 +739,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
|
|||||||
pFFrm->Destroy(); break;
|
pFFrm->Destroy(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
// FOR NOW:: excessive!
|
// FOR NOW:: excessive!
|
||||||
@@ -826,11 +826,11 @@ void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar )
|
|||||||
{
|
{
|
||||||
if ( !(mFloatingOn && pBar->mFloatingOn)) return;
|
if ( !(mFloatingOn && pBar->mFloatingOn)) return;
|
||||||
|
|
||||||
wxNode* pNode = mFloatedFrames.First();
|
wxNode* pNode = mFloatedFrames.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
|
cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
|
||||||
|
|
||||||
if ( pFFrm->GetBar() == pBar )
|
if ( pFFrm->GetBar() == pBar )
|
||||||
{
|
{
|
||||||
@@ -848,7 +848,7 @@ void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2128,9 +2128,9 @@ IMPLEMENT_DYNAMIC_CLASS( cbBarInfo, wxObject )
|
|||||||
cbBarInfo::cbBarInfo(void)
|
cbBarInfo::cbBarInfo(void)
|
||||||
|
|
||||||
: mpRow( NULL ),
|
: mpRow( NULL ),
|
||||||
|
mFloatingOn( TRUE ),
|
||||||
mpNext( NULL ),
|
mpNext( NULL ),
|
||||||
mpPrev( NULL ),
|
mpPrev( NULL )
|
||||||
mFloatingOn( TRUE )
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
cbBarInfo::~cbBarInfo()
|
cbBarInfo::~cbBarInfo()
|
||||||
@@ -2500,7 +2500,7 @@ int cbDockPane::GetRowAt( int upperY, int lowerY )
|
|||||||
int range = lowerY - upperY;
|
int range = lowerY - upperY;
|
||||||
int oneThird = range / 3;
|
int oneThird = range / 3;
|
||||||
|
|
||||||
wxNode* pRow = mRows.First();
|
wxNode* pRow = mRows.GetFirst();
|
||||||
int row = 0;
|
int row = 0;
|
||||||
int curY = 0;
|
int curY = 0;
|
||||||
|
|
||||||
@@ -2508,7 +2508,7 @@ int cbDockPane::GetRowAt( int upperY, int lowerY )
|
|||||||
|
|
||||||
while( pRow )
|
while( pRow )
|
||||||
{
|
{
|
||||||
int rowHeight = GetRowHeight( (wxList*)pRow->Data() );
|
int rowHeight = GetRowHeight( (wxList*)pRow->GetData() );
|
||||||
|
|
||||||
if ( upperY >= curY &&
|
if ( upperY >= curY &&
|
||||||
lowerY < curY ) return row;
|
lowerY < curY ) return row;
|
||||||
@@ -2527,7 +2527,7 @@ int cbDockPane::GetRowAt( int upperY, int lowerY )
|
|||||||
|
|
||||||
++row;
|
++row;
|
||||||
curY += rowHeight;
|
curY += rowHeight;
|
||||||
pRow = pRow->Next();
|
pRow = pRow->GetNext();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -3489,10 +3489,10 @@ void cbDockPane::GetRowShapeData( cbRowInfo* pRow, wxList* pLst )
|
|||||||
|
|
||||||
void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst )
|
void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst )
|
||||||
{
|
{
|
||||||
if ( pLst->First() == NULL )
|
if ( pLst->GetFirst() == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxNode* pData = pLst->First();
|
wxNode* 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 )
|
||||||
@@ -3501,12 +3501,12 @@ void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst )
|
|||||||
|
|
||||||
cbBarInfo& bar = *pRow->mBars[i];;
|
cbBarInfo& bar = *pRow->mBars[i];;
|
||||||
|
|
||||||
cbBarShapeData& data = *((cbBarShapeData*)pData->Data());
|
cbBarShapeData& data = *((cbBarShapeData*)pData->GetData());
|
||||||
|
|
||||||
bar.mBounds = data.mBounds;
|
bar.mBounds = data.mBounds;
|
||||||
bar.mLenRatio = data.mLenRatio;
|
bar.mLenRatio = data.mLenRatio;
|
||||||
|
|
||||||
pData = pData->Next();
|
pData = pData->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -171,13 +171,13 @@ void wxFrameManager::DestroyViews()
|
|||||||
{
|
{
|
||||||
DeactivateCurrentView();
|
DeactivateCurrentView();
|
||||||
|
|
||||||
wxNode* pNode = mViews.First();
|
wxNode* pNode = mViews.GetFirst();
|
||||||
|
|
||||||
while ( pNode )
|
while ( pNode )
|
||||||
{
|
{
|
||||||
delete (wxFrameView*)pNode->Data();
|
delete (wxFrameView*)pNode->GetData();
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( mActiveViewNo != -1 && GetParentFrame() )
|
if ( mActiveViewNo != -1 && GetParentFrame() )
|
||||||
@@ -187,17 +187,17 @@ void wxFrameManager::DestroyViews()
|
|||||||
|
|
||||||
int wxFrameManager::GetViewNo( wxFrameView* pView )
|
int wxFrameManager::GetViewNo( wxFrameView* pView )
|
||||||
{
|
{
|
||||||
wxNode* pNode = mViews.First();
|
wxNode* pNode = mViews.GetFirst();
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
while ( pNode )
|
while ( pNode )
|
||||||
{
|
{
|
||||||
if ( (wxFrameView*)pNode->Data() == pView )
|
if ( (wxFrameView*)pNode->GetData() == pView )
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
++n;
|
++n;
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@@ -228,7 +228,7 @@ void wxFrameManager::EnableMenusForView( wxFrameView* pView, bool enable )
|
|||||||
|
|
||||||
void wxFrameManager::SyncAllMenus()
|
void wxFrameManager::SyncAllMenus()
|
||||||
{
|
{
|
||||||
wxNode* pNode = mViews.First();
|
wxNode* pNode = mViews.GetFirst();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while ( pNode )
|
while ( pNode )
|
||||||
@@ -237,7 +237,7 @@ void wxFrameManager::SyncAllMenus()
|
|||||||
|
|
||||||
EnableMenusForView( (wxFrameView*)pNode->GetData(), FALSE );
|
EnableMenusForView( (wxFrameView*)pNode->GetData(), FALSE );
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
EnableMenusForView( GetView( mActiveViewNo ), TRUE );
|
EnableMenusForView( GetView( mActiveViewNo ), TRUE );
|
||||||
@@ -264,16 +264,16 @@ void wxFrameManager::Init( wxWindow* pMainFrame, const wxString& settingsFile )
|
|||||||
mSettingsFile = settingsFile;
|
mSettingsFile = settingsFile;
|
||||||
mpFrameWnd = pMainFrame;
|
mpFrameWnd = pMainFrame;
|
||||||
|
|
||||||
wxNode* pNode = mViews.First();
|
wxNode* pNode = mViews.GetFirst();
|
||||||
|
|
||||||
while ( pNode )
|
while ( pNode )
|
||||||
{
|
{
|
||||||
wxFrameView* pView = (wxFrameView*)pNode->Data();
|
wxFrameView* pView = (wxFrameView*)pNode->GetData();
|
||||||
|
|
||||||
pView->OnInit();
|
pView->OnInit();
|
||||||
pView->OnInitMenus();
|
pView->OnInitMenus();
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !ReloadViews() )
|
if ( !ReloadViews() )
|
||||||
@@ -281,19 +281,19 @@ void wxFrameManager::Init( wxWindow* pMainFrame, const wxString& settingsFile )
|
|||||||
// if loading of settings file failed (e.g. was not found),
|
// if loading of settings file failed (e.g. was not found),
|
||||||
// do recreation of items in each view
|
// do recreation of items in each view
|
||||||
|
|
||||||
pNode = mViews.First();
|
pNode = mViews.GetFirst();
|
||||||
|
|
||||||
while ( pNode )
|
while ( pNode )
|
||||||
{
|
{
|
||||||
wxFrameView* pView = (wxFrameView*)pNode->Data();
|
wxFrameView* pView = (wxFrameView*)pNode->GetData();
|
||||||
|
|
||||||
pView->OnRecreate();
|
pView->OnRecreate();
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( mActiveViewNo >= mViews.Number() )
|
if ( mActiveViewNo >= mViews.GetCount() )
|
||||||
mActiveViewNo = -1;
|
mActiveViewNo = -1;
|
||||||
|
|
||||||
ActivateView( GetView( ( mActiveViewNo == -1 ) ? 0 : mActiveViewNo ) );
|
ActivateView( GetView( ( mActiveViewNo == -1 ) ? 0 : mActiveViewNo ) );
|
||||||
@@ -321,15 +321,15 @@ int wxFrameManager::GetActiveViewNo()
|
|||||||
|
|
||||||
wxFrameView* wxFrameManager::GetActiveView()
|
wxFrameView* wxFrameManager::GetActiveView()
|
||||||
{
|
{
|
||||||
wxNode* pNode = mViews.Nth( mActiveViewNo );
|
wxNode* pNode = mViews.Item( mActiveViewNo );
|
||||||
|
|
||||||
if ( pNode ) return (wxFrameView*)pNode->Data();
|
if ( pNode ) return (wxFrameView*)pNode->GetData();
|
||||||
else return NULL;
|
else return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxNode* wxFrameManager::GetActiveViewNode()
|
wxNode* wxFrameManager::GetActiveViewNode()
|
||||||
{
|
{
|
||||||
return mViews.Nth( mActiveViewNo );
|
return mViews.Item( mActiveViewNo );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFrame* wxFrameManager::GetParentFrame()
|
wxFrame* wxFrameManager::GetParentFrame()
|
||||||
@@ -344,9 +344,9 @@ wxWindow* wxFrameManager::GetParentWindow()
|
|||||||
|
|
||||||
wxFrameView* wxFrameManager::GetView( int viewNo )
|
wxFrameView* wxFrameManager::GetView( int viewNo )
|
||||||
{
|
{
|
||||||
wxNode* pNode = mViews.Nth( viewNo );
|
wxNode* pNode = mViews.Item( viewNo );
|
||||||
|
|
||||||
if ( pNode ) return (wxFrameView*)pNode->Data();
|
if ( pNode ) return (wxFrameView*)pNode->GetData();
|
||||||
else return NULL;
|
else return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,6 +444,6 @@ bool wxFrameManager::ReloadViews()
|
|||||||
|
|
||||||
bool wxFrameManager::ViewsAreLoaded()
|
bool wxFrameManager::ViewsAreLoaded()
|
||||||
{
|
{
|
||||||
return ( mViews.Number() != 0 );
|
return ( mViews.GetCount() != 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
inline static GCItem& node_to_item( wxNode* pNode )
|
inline static GCItem& node_to_item( wxNode* pNode )
|
||||||
{
|
{
|
||||||
return *( (GCItem*)(pNode->Data()) );
|
return *( (GCItem*)(pNode->GetData()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
GarbageCollector::~GarbageCollector()
|
GarbageCollector::~GarbageCollector()
|
||||||
@@ -44,13 +44,13 @@ GarbageCollector::~GarbageCollector()
|
|||||||
|
|
||||||
void GarbageCollector::DestroyItemList( wxList& lst )
|
void GarbageCollector::DestroyItemList( wxList& lst )
|
||||||
{
|
{
|
||||||
wxNode* pNode = lst.First();
|
wxNode* pNode = lst.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
delete &node_to_item( pNode );
|
delete &node_to_item( pNode );
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
lst.Clear();
|
lst.Clear();
|
||||||
@@ -58,7 +58,7 @@ void GarbageCollector::DestroyItemList( wxList& lst )
|
|||||||
|
|
||||||
wxNode* GarbageCollector::FindItemNode( void* pForObj )
|
wxNode* GarbageCollector::FindItemNode( void* pForObj )
|
||||||
{
|
{
|
||||||
wxNode* pNode = mAllNodes.First();
|
wxNode* pNode = mAllNodes.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
@@ -66,7 +66,7 @@ wxNode* GarbageCollector::FindItemNode( void* pForObj )
|
|||||||
|
|
||||||
return pNode;
|
return pNode;
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
int avoidCompilerWarning = 0;
|
int avoidCompilerWarning = 0;
|
||||||
@@ -77,15 +77,15 @@ wxNode* GarbageCollector::FindItemNode( void* pForObj )
|
|||||||
|
|
||||||
wxNode* GarbageCollector::FindReferenceFreeItemNode()
|
wxNode* GarbageCollector::FindReferenceFreeItemNode()
|
||||||
{
|
{
|
||||||
wxNode* pNode = mAllNodes.First();
|
wxNode* pNode = mAllNodes.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
if ( node_to_item( pNode ).mRefs.Number() == 0 )
|
if ( node_to_item( pNode ).mRefs.GetCount() == 0 )
|
||||||
|
|
||||||
return pNode;
|
return pNode;
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -93,18 +93,18 @@ wxNode* GarbageCollector::FindReferenceFreeItemNode()
|
|||||||
|
|
||||||
void GarbageCollector::RemoveReferencesToNode( wxNode* pItemNode )
|
void GarbageCollector::RemoveReferencesToNode( wxNode* pItemNode )
|
||||||
{
|
{
|
||||||
wxNode* pNode = mAllNodes.First();
|
wxNode* pNode = mAllNodes.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
wxList& refLst = node_to_item( pNode ).mRefs;
|
wxList& refLst = node_to_item( pNode ).mRefs;
|
||||||
wxNode* pRefNode = refLst.First();
|
wxNode* pRefNode = refLst.GetFirst();
|
||||||
|
|
||||||
while( pRefNode )
|
while( pRefNode )
|
||||||
{
|
{
|
||||||
if ( pRefNode->Data() == (wxObject*)pItemNode )
|
if ( pRefNode->GetData() == (wxObject*)pItemNode )
|
||||||
{
|
{
|
||||||
wxNode* pNext = pRefNode->Next();
|
wxNode* pNext = pRefNode->GetNext();
|
||||||
|
|
||||||
refLst.DeleteNode( pRefNode );
|
refLst.DeleteNode( pRefNode );
|
||||||
|
|
||||||
@@ -112,31 +112,31 @@ void GarbageCollector::RemoveReferencesToNode( wxNode* pItemNode )
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else pRefNode = pRefNode->Next();
|
else pRefNode = pRefNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GarbageCollector::ResolveReferences()
|
void GarbageCollector::ResolveReferences()
|
||||||
{
|
{
|
||||||
wxNode* pNode = mAllNodes.First();
|
wxNode* pNode = mAllNodes.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
GCItem& item = node_to_item( pNode );
|
GCItem& item = node_to_item( pNode );
|
||||||
|
|
||||||
wxNode* pRefNode = item.mRefs.First();
|
wxNode* pRefNode = item.mRefs.GetFirst();
|
||||||
|
|
||||||
while( pRefNode )
|
while( pRefNode )
|
||||||
{
|
{
|
||||||
pRefNode->SetData( (wxObject*) FindItemNode( (void*)pRefNode->Data() ) );
|
pRefNode->SetData( (wxObject*) FindItemNode( (void*)pRefNode->GetData() ) );
|
||||||
|
|
||||||
pRefNode = pRefNode->Next();
|
pRefNode = pRefNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ void GarbageCollector::ArrangeCollection()
|
|||||||
// append it to the list, where items are contained
|
// append it to the list, where items are contained
|
||||||
// in the increasing order of dependencies
|
// in the increasing order of dependencies
|
||||||
|
|
||||||
mRegularLst.Append( pItemNode->Data() );
|
mRegularLst.Append( pItemNode->GetData() );
|
||||||
|
|
||||||
mAllNodes.DeleteNode( pItemNode );
|
mAllNodes.DeleteNode( pItemNode );
|
||||||
|
|
||||||
@@ -187,13 +187,13 @@ void GarbageCollector::ArrangeCollection()
|
|||||||
// otherwise, what is left - all nodes, which
|
// otherwise, what is left - all nodes, which
|
||||||
// are involved into cycled chains (rings)
|
// are involved into cycled chains (rings)
|
||||||
|
|
||||||
wxNode* pNode = mAllNodes.First();
|
wxNode* pNode = mAllNodes.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
mCycledLst.Append( pNode->Data() );
|
mCycledLst.Append( pNode->GetData() );
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
mAllNodes.Clear();
|
mAllNodes.Clear();
|
||||||
|
@@ -53,7 +53,7 @@ struct cbRectInfo
|
|||||||
|
|
||||||
static inline cbRectInfo& node_to_rect_info( wxNode* pNode )
|
static inline cbRectInfo& node_to_rect_info( wxNode* pNode )
|
||||||
{
|
{
|
||||||
return *( (cbRectInfo*) (pNode->Data()) );
|
return *( (cbRectInfo*) (pNode->GetData()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Implementation for class cbSimpleUpdatesMgr *****/
|
/***** Implementation for class cbSimpleUpdatesMgr *****/
|
||||||
@@ -276,13 +276,13 @@ void cbGCUpdatesMgr::UpdateNow()
|
|||||||
|
|
||||||
void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
|
void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
|
||||||
{
|
{
|
||||||
wxNode* pNode1 = items.First();
|
wxNode* pNode1 = items.GetFirst();
|
||||||
|
|
||||||
while( pNode1 )
|
while( pNode1 )
|
||||||
{
|
{
|
||||||
cbRectInfo& info = node_to_rect_info( pNode1 );
|
cbRectInfo& info = node_to_rect_info( pNode1 );
|
||||||
|
|
||||||
wxNode* pNode2 = items.First();
|
wxNode* pNode2 = items.GetFirst();
|
||||||
|
|
||||||
// and node itself
|
// and node itself
|
||||||
|
|
||||||
@@ -305,10 +305,10 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
|
|||||||
mGC.AddDependency( &info, &otherInfo );
|
mGC.AddDependency( &info, &otherInfo );
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode2 = pNode2->Next();
|
pNode2 = pNode2->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode1 = pNode1->Next();
|
pNode1 = pNode1->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
mGC.ArrangeCollection(); // order nodes according "least-dependency" rule,
|
mGC.ArrangeCollection(); // order nodes according "least-dependency" rule,
|
||||||
@@ -318,7 +318,7 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
|
|||||||
// they stand in linear (not cyclic) dependency with other
|
// they stand in linear (not cyclic) dependency with other
|
||||||
// regular nodes).
|
// regular nodes).
|
||||||
|
|
||||||
wxNode* pNode = mGC.GetRegularObjects().First();
|
wxNode* pNode = mGC.GetRegularObjects().GetFirst();
|
||||||
|
|
||||||
while ( pNode )
|
while ( pNode )
|
||||||
{
|
{
|
||||||
@@ -330,12 +330,12 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
|
|||||||
else
|
else
|
||||||
info.mpPane->SizeBar( info.mpBar );
|
info.mpPane->SizeBar( info.mpBar );
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
// cycled item nodes, need to be both resized and repainted
|
// cycled item nodes, need to be both resized and repainted
|
||||||
|
|
||||||
pNode = mGC.GetCycledObjects().First();
|
pNode = mGC.GetCycledObjects().GetFirst();
|
||||||
|
|
||||||
while ( pNode )
|
while ( pNode )
|
||||||
{
|
{
|
||||||
@@ -380,20 +380,20 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
|
|||||||
pWnd->Refresh();
|
pWnd->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
// release data prepared for GC alg.
|
// release data prepared for GC alg.
|
||||||
|
|
||||||
pNode = items.First();
|
pNode = items.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
cbRectInfo* pInfo = (cbRectInfo*)(pNode->Data());
|
cbRectInfo* pInfo = (cbRectInfo*)(pNode->GetData());
|
||||||
|
|
||||||
delete pInfo;
|
delete pInfo;
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
mGC.Reset(); // reinit GC
|
mGC.Reset(); // reinit GC
|
||||||
|
@@ -423,19 +423,19 @@ void cbRowDragPlugin::OnDrawPaneBackground ( cbDrawPaneDecorEvent& event )
|
|||||||
|
|
||||||
int cbRowDragPlugin::GetHRowsCountForPane( cbDockPane* pPane )
|
int cbRowDragPlugin::GetHRowsCountForPane( cbDockPane* pPane )
|
||||||
{
|
{
|
||||||
wxNode* pNode = mHiddenBars.First();
|
wxNode* pNode = mHiddenBars.GetFirst();
|
||||||
|
|
||||||
int maxIconNo = -1;
|
int maxIconNo = -1;
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->Data();
|
cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->GetData();
|
||||||
|
|
||||||
if ( pHBInfo->mAlignment == pPane->mAlignment )
|
if ( pHBInfo->mAlignment == pPane->mAlignment )
|
||||||
|
|
||||||
maxIconNo = wxMax( maxIconNo, pHBInfo->mIconNo );
|
maxIconNo = wxMax( maxIconNo, pHBInfo->mIconNo );
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ( maxIconNo + 1 );
|
return ( maxIconNo + 1 );
|
||||||
@@ -805,7 +805,7 @@ void cbRowDragPlugin::ExpandRow( int collapsedIconIdx )
|
|||||||
|
|
||||||
cbRowInfo* pNewRow = new cbRowInfo();
|
cbRowInfo* pNewRow = new cbRowInfo();
|
||||||
|
|
||||||
wxNode* pNode = mHiddenBars.First();
|
wxNode* pNode = mHiddenBars.GetFirst();
|
||||||
|
|
||||||
int rowNo = 0;
|
int rowNo = 0;
|
||||||
|
|
||||||
@@ -813,7 +813,7 @@ void cbRowDragPlugin::ExpandRow( int collapsedIconIdx )
|
|||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->Data();
|
cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->GetData();
|
||||||
|
|
||||||
if ( pHBInfo->mAlignment == mpPane->mAlignment &&
|
if ( pHBInfo->mAlignment == mpPane->mAlignment &&
|
||||||
pHBInfo->mIconNo == collapsedIconIdx )
|
pHBInfo->mIconNo == collapsedIconIdx )
|
||||||
@@ -831,7 +831,7 @@ void cbRowDragPlugin::ExpandRow( int collapsedIconIdx )
|
|||||||
|
|
||||||
// remove bar info from internal list
|
// remove bar info from internal list
|
||||||
|
|
||||||
wxNode* pNext = pNode->Next();
|
wxNode* pNext = pNode->GetNext();
|
||||||
|
|
||||||
delete pHBInfo;
|
delete pHBInfo;
|
||||||
mHiddenBars.DeleteNode( pNode );
|
mHiddenBars.DeleteNode( pNode );
|
||||||
@@ -848,7 +848,7 @@ void cbRowDragPlugin::ExpandRow( int collapsedIconIdx )
|
|||||||
|
|
||||||
--pHBInfo->mIconNo;
|
--pHBInfo->mIconNo;
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -249,25 +249,25 @@ void cbSimpleUpdatesMgr::UpdateNow()
|
|||||||
|
|
||||||
// step #2 - do ordered refreshing and resizing of bar window objects now
|
// step #2 - do ordered refreshing and resizing of bar window objects now
|
||||||
|
|
||||||
wxNode* pNode = mBarsToRefresh.First();
|
wxNode* pNode = mBarsToRefresh.GetFirst();
|
||||||
wxNode* pPaneNode = mPanesList.First();
|
wxNode* pPaneNode = mPanesList.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
cbBarInfo* pBar = (cbBarInfo*) pNode->Data();
|
cbBarInfo* pBar = (cbBarInfo*) pNode->GetData();
|
||||||
cbDockPane* pPane = (cbDockPane*)pPaneNode->Data();
|
cbDockPane* pPane = (cbDockPane*)pPaneNode->GetData();
|
||||||
|
|
||||||
pPane->SizeBar( pBar );
|
pPane->SizeBar( pBar );
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
pPaneNode = pPaneNode->Next();
|
pPaneNode = pPaneNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode = mBarsToRefresh.First();
|
pNode = mBarsToRefresh.GetFirst();
|
||||||
|
|
||||||
while( pNode )
|
while( pNode )
|
||||||
{
|
{
|
||||||
cbBarInfo* pBar = (cbBarInfo*)pNode->Data();
|
cbBarInfo* pBar = (cbBarInfo*)pNode->GetData();
|
||||||
|
|
||||||
if ( pBar->mpBarWnd )
|
if ( pBar->mpBarWnd )
|
||||||
{
|
{
|
||||||
@@ -278,7 +278,7 @@ void cbSimpleUpdatesMgr::UpdateNow()
|
|||||||
//info.mpBarWnd->Show(TRUE);
|
//info.mpBarWnd->Show(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
pNode = pNode->Next();
|
pNode = pNode->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( clientWindowChanged )
|
if ( clientWindowChanged )
|
||||||
|
Reference in New Issue
Block a user