git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21360
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
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;
void wxFrameLayout::DestroyBarWindows()
{
void wxFrameLayout::DestroyBarWindows()
{
- wxNode* pSpy = mBarSpyList.First();
+ wxNode* pSpy = mBarSpyList.GetFirst();
- cbBarSpy& spy = *((cbBarSpy*)pSpy->Data());
+ cbBarSpy& spy = *((cbBarSpy*)pSpy->GetData());
if ( spy.mpBarWnd->GetEventHandler() == &spy )
if ( spy.mpBarWnd->GetEventHandler() == &spy )
+ pSpy = pSpy->GetNext();
void wxFrameLayout::ShowFloatedWindows( bool show )
{
void wxFrameLayout::ShowFloatedWindows( bool show )
{
- wxNode* pNode = mFloatedFrames.First();
+ wxNode* pNode = mFloatedFrames.GetFirst();
- cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
+ cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
+ pNode = pNode->GetNext();
if ( mpNECursor )
delete mpNECursor;
if ( mpNECursor )
delete mpNECursor;
- wxNode* pSpy = mBarSpyList.First();
+ wxNode* pSpy = mBarSpyList.GetFirst();
- cbBarSpy& spy = *((cbBarSpy*)pSpy->Data());
+ cbBarSpy& spy = *((cbBarSpy*)pSpy->GetData());
if ( spy.mpBarWnd->GetEventHandler() == &spy )
if ( spy.mpBarWnd->GetEventHandler() == &spy )
+ pSpy = pSpy->GetNext();
}
for ( i = 0; i != mAllBars.Count(); ++i )
}
for ( i = 0; i != mAllBars.Count(); ++i )
{
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();
- cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
+ cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
if ( pFFrm->GetBar() == pBar )
{
if ( pFFrm->GetBar() == pBar )
{
pFFrm->Destroy(); break;
}
pFFrm->Destroy(); break;
}
+ pNode = pNode->GetNext();
}
// FOR NOW:: excessive!
}
// FOR NOW:: excessive!
{
if ( !(mFloatingOn && pBar->mFloatingOn)) return;
{
if ( !(mFloatingOn && pBar->mFloatingOn)) return;
- wxNode* pNode = mFloatedFrames.First();
+ wxNode* pNode = mFloatedFrames.GetFirst();
- cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
+ cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
if ( pFFrm->GetBar() == pBar )
{
if ( pFFrm->GetBar() == pBar )
{
+ pNode = pNode->GetNext();
cbBarInfo::cbBarInfo(void)
: mpRow( NULL ),
cbBarInfo::cbBarInfo(void)
: mpRow( NULL ),
- mpPrev( NULL ),
- mFloatingOn( TRUE )
{}
cbBarInfo::~cbBarInfo()
{}
cbBarInfo::~cbBarInfo()
int range = lowerY - upperY;
int oneThird = range / 3;
int range = lowerY - upperY;
int oneThird = range / 3;
- wxNode* pRow = mRows.First();
+ wxNode* pRow = mRows.GetFirst();
int row = 0;
int curY = 0;
int row = 0;
int curY = 0;
- int rowHeight = GetRowHeight( (wxList*)pRow->Data() );
+ int rowHeight = GetRowHeight( (wxList*)pRow->GetData() );
if ( upperY >= curY &&
lowerY < curY ) return row;
if ( upperY >= curY &&
lowerY < curY ) return row;
++row;
curY += rowHeight;
++row;
curY += rowHeight;
+ pRow = pRow->GetNext();
void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst )
{
void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst )
{
- if ( pLst->First() == NULL )
+ if ( pLst->GetFirst() == NULL )
- wxNode* pData = pLst->First();
+ wxNode* pData = pLst->GetFirst();
size_t i;
for ( i = 0; i != pRow->mBars.Count(); ++i )
size_t i;
for ( i = 0; i != pRow->mBars.Count(); ++i )
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.mLenRatio = data.mLenRatio;
bar.mBounds = data.mBounds;
bar.mLenRatio = data.mLenRatio;
+ pData = pData->GetNext();
{
DeactivateCurrentView();
{
DeactivateCurrentView();
- wxNode* pNode = mViews.First();
+ wxNode* pNode = mViews.GetFirst();
- delete (wxFrameView*)pNode->Data();
+ delete (wxFrameView*)pNode->GetData();
+ pNode = pNode->GetNext();
}
if ( mActiveViewNo != -1 && GetParentFrame() )
}
if ( mActiveViewNo != -1 && GetParentFrame() )
int wxFrameManager::GetViewNo( wxFrameView* pView )
{
int wxFrameManager::GetViewNo( wxFrameView* pView )
{
- wxNode* pNode = mViews.First();
+ wxNode* pNode = mViews.GetFirst();
int n = 0;
while ( pNode )
{
int n = 0;
while ( pNode )
{
- if ( (wxFrameView*)pNode->Data() == pView )
+ if ( (wxFrameView*)pNode->GetData() == pView )
+ pNode = pNode->GetNext();
void wxFrameManager::SyncAllMenus()
{
void wxFrameManager::SyncAllMenus()
{
- wxNode* pNode = mViews.First();
+ wxNode* pNode = mViews.GetFirst();
int i = 0;
while ( pNode )
int i = 0;
while ( pNode )
EnableMenusForView( (wxFrameView*)pNode->GetData(), FALSE );
EnableMenusForView( (wxFrameView*)pNode->GetData(), FALSE );
+ pNode = pNode->GetNext();
}
EnableMenusForView( GetView( mActiveViewNo ), TRUE );
}
EnableMenusForView( GetView( mActiveViewNo ), TRUE );
mSettingsFile = settingsFile;
mpFrameWnd = pMainFrame;
mSettingsFile = settingsFile;
mpFrameWnd = pMainFrame;
- wxNode* pNode = mViews.First();
+ wxNode* pNode = mViews.GetFirst();
- wxFrameView* pView = (wxFrameView*)pNode->Data();
+ wxFrameView* pView = (wxFrameView*)pNode->GetData();
pView->OnInit();
pView->OnInitMenus();
pView->OnInit();
pView->OnInitMenus();
+ pNode = pNode->GetNext();
// if loading of settings file failed (e.g. was not found),
// do recreation of items in each view
// if loading of settings file failed (e.g. was not found),
// do recreation of items in each view
- pNode = mViews.First();
+ pNode = mViews.GetFirst();
- wxFrameView* pView = (wxFrameView*)pNode->Data();
+ wxFrameView* pView = (wxFrameView*)pNode->GetData();
+ pNode = pNode->GetNext();
- if ( mActiveViewNo >= mViews.Number() )
+ if ( mActiveViewNo >= mViews.GetCount() )
mActiveViewNo = -1;
ActivateView( GetView( ( mActiveViewNo == -1 ) ? 0 : mActiveViewNo ) );
mActiveViewNo = -1;
ActivateView( GetView( ( mActiveViewNo == -1 ) ? 0 : mActiveViewNo ) );
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;
}
wxNode* wxFrameManager::GetActiveViewNode()
{
else return NULL;
}
wxNode* wxFrameManager::GetActiveViewNode()
{
- return mViews.Nth( mActiveViewNo );
+ return mViews.Item( mActiveViewNo );
}
wxFrame* wxFrameManager::GetParentFrame()
}
wxFrame* wxFrameManager::GetParentFrame()
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();
bool wxFrameManager::ViewsAreLoaded()
{
bool wxFrameManager::ViewsAreLoaded()
{
- return ( mViews.Number() != 0 );
+ return ( mViews.GetCount() != 0 );
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()
void GarbageCollector::DestroyItemList( wxList& lst )
{
void GarbageCollector::DestroyItemList( wxList& lst )
{
- wxNode* pNode = lst.First();
+ wxNode* pNode = lst.GetFirst();
while( pNode )
{
delete &node_to_item( pNode );
while( pNode )
{
delete &node_to_item( pNode );
+ pNode = pNode->GetNext();
wxNode* GarbageCollector::FindItemNode( void* pForObj )
{
wxNode* GarbageCollector::FindItemNode( void* pForObj )
{
- wxNode* pNode = mAllNodes.First();
+ wxNode* pNode = mAllNodes.GetFirst();
+ pNode = pNode->GetNext();
}
int avoidCompilerWarning = 0;
}
int avoidCompilerWarning = 0;
wxNode* GarbageCollector::FindReferenceFreeItemNode()
{
wxNode* GarbageCollector::FindReferenceFreeItemNode()
{
- wxNode* pNode = mAllNodes.First();
+ wxNode* pNode = mAllNodes.GetFirst();
- if ( node_to_item( pNode ).mRefs.Number() == 0 )
+ if ( node_to_item( pNode ).mRefs.GetCount() == 0 )
+ pNode = pNode->GetNext();
void GarbageCollector::RemoveReferencesToNode( wxNode* pItemNode )
{
void GarbageCollector::RemoveReferencesToNode( wxNode* pItemNode )
{
- wxNode* pNode = mAllNodes.First();
+ wxNode* pNode = mAllNodes.GetFirst();
while( pNode )
{
wxList& refLst = node_to_item( pNode ).mRefs;
while( pNode )
{
wxList& refLst = node_to_item( pNode ).mRefs;
- wxNode* pRefNode = refLst.First();
+ wxNode* pRefNode = refLst.GetFirst();
- if ( pRefNode->Data() == (wxObject*)pItemNode )
+ if ( pRefNode->GetData() == (wxObject*)pItemNode )
- wxNode* pNext = pRefNode->Next();
+ wxNode* pNext = pRefNode->GetNext();
refLst.DeleteNode( pRefNode );
refLst.DeleteNode( pRefNode );
- else pRefNode = pRefNode->Next();
+ else pRefNode = pRefNode->GetNext();
+ pNode = pNode->GetNext();
}
}
void GarbageCollector::ResolveReferences()
{
}
}
void GarbageCollector::ResolveReferences()
{
- wxNode* pNode = mAllNodes.First();
+ wxNode* pNode = mAllNodes.GetFirst();
while( pNode )
{
GCItem& item = node_to_item( pNode );
while( pNode )
{
GCItem& item = node_to_item( pNode );
- wxNode* pRefNode = item.mRefs.First();
+ wxNode* pRefNode = item.mRefs.GetFirst();
- pRefNode->SetData( (wxObject*) FindItemNode( (void*)pRefNode->Data() ) );
+ pRefNode->SetData( (wxObject*) FindItemNode( (void*)pRefNode->GetData() ) );
- pRefNode = pRefNode->Next();
+ pRefNode = pRefNode->GetNext();
+ pNode = pNode->GetNext();
// append it to the list, where items are contained
// in the increasing order of dependencies
// append it to the list, where items are contained
// in the increasing order of dependencies
- mRegularLst.Append( pItemNode->Data() );
+ mRegularLst.Append( pItemNode->GetData() );
mAllNodes.DeleteNode( pItemNode );
mAllNodes.DeleteNode( pItemNode );
// otherwise, what is left - all nodes, which
// are involved into cycled chains (rings)
// otherwise, what is left - all nodes, which
// are involved into cycled chains (rings)
- wxNode* pNode = mAllNodes.First();
+ wxNode* pNode = mAllNodes.GetFirst();
- mCycledLst.Append( pNode->Data() );
+ mCycledLst.Append( pNode->GetData() );
+ pNode = pNode->GetNext();
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 *****/
void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
{
void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
{
- wxNode* pNode1 = items.First();
+ wxNode* pNode1 = items.GetFirst();
while( pNode1 )
{
cbRectInfo& info = node_to_rect_info( pNode1 );
while( pNode1 )
{
cbRectInfo& info = node_to_rect_info( pNode1 );
- wxNode* pNode2 = items.First();
+ wxNode* pNode2 = items.GetFirst();
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,
// they stand in linear (not cyclic) dependency with other
// regular nodes).
// they stand in linear (not cyclic) dependency with other
// regular nodes).
- wxNode* pNode = mGC.GetRegularObjects().First();
+ wxNode* pNode = mGC.GetRegularObjects().GetFirst();
else
info.mpPane->SizeBar( info.mpBar );
else
info.mpPane->SizeBar( info.mpBar );
+ 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();
+ pNode = pNode->GetNext();
}
// release data prepared for GC alg.
}
// release data prepared for GC alg.
+ pNode = items.GetFirst();
- cbRectInfo* pInfo = (cbRectInfo*)(pNode->Data());
+ cbRectInfo* pInfo = (cbRectInfo*)(pNode->GetData());
+ pNode = pNode->GetNext();
}
mGC.Reset(); // reinit GC
}
mGC.Reset(); // reinit GC
int cbRowDragPlugin::GetHRowsCountForPane( cbDockPane* pPane )
{
int cbRowDragPlugin::GetHRowsCountForPane( cbDockPane* pPane )
{
- wxNode* pNode = mHiddenBars.First();
+ wxNode* pNode = mHiddenBars.GetFirst();
int maxIconNo = -1;
while( pNode )
{
int maxIconNo = -1;
while( pNode )
{
- cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->Data();
+ cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->GetData();
if ( pHBInfo->mAlignment == pPane->mAlignment )
maxIconNo = wxMax( maxIconNo, pHBInfo->mIconNo );
if ( pHBInfo->mAlignment == pPane->mAlignment )
maxIconNo = wxMax( maxIconNo, pHBInfo->mIconNo );
+ pNode = pNode->GetNext();
}
return ( maxIconNo + 1 );
}
return ( maxIconNo + 1 );
cbRowInfo* pNewRow = new cbRowInfo();
cbRowInfo* pNewRow = new cbRowInfo();
- wxNode* pNode = mHiddenBars.First();
+ wxNode* pNode = mHiddenBars.GetFirst();
- cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->Data();
+ cbHiddenBarInfo* pHBInfo = (cbHiddenBarInfo*)pNode->GetData();
if ( pHBInfo->mAlignment == mpPane->mAlignment &&
pHBInfo->mIconNo == collapsedIconIdx )
if ( pHBInfo->mAlignment == mpPane->mAlignment &&
pHBInfo->mIconNo == collapsedIconIdx )
// remove bar info from internal list
// remove bar info from internal list
- wxNode* pNext = pNode->Next();
+ wxNode* pNext = pNode->GetNext();
delete pHBInfo;
mHiddenBars.DeleteNode( pNode );
delete pHBInfo;
mHiddenBars.DeleteNode( pNode );
+ pNode = pNode->GetNext();
// 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* pPaneNode = mPanesList.First();
+ wxNode* pNode = mBarsToRefresh.GetFirst();
+ wxNode* pPaneNode = mPanesList.GetFirst();
- cbBarInfo* pBar = (cbBarInfo*) pNode->Data();
- cbDockPane* pPane = (cbDockPane*)pPaneNode->Data();
+ cbBarInfo* pBar = (cbBarInfo*) pNode->GetData();
+ cbDockPane* pPane = (cbDockPane*)pPaneNode->GetData();
- pNode = pNode->Next();
- pPaneNode = pPaneNode->Next();
+ pNode = pNode->GetNext();
+ pPaneNode = pPaneNode->GetNext();
- pNode = mBarsToRefresh.First();
+ pNode = mBarsToRefresh.GetFirst();
- cbBarInfo* pBar = (cbBarInfo*)pNode->Data();
+ cbBarInfo* pBar = (cbBarInfo*)pNode->GetData();
//info.mpBarWnd->Show(TRUE);
}
//info.mpBarWnd->Show(TRUE);
}
+ pNode = pNode->GetNext();
}
if ( clientWindowChanged )
}
if ( clientWindowChanged )