// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
- #pragma implementation "frmview.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
if ( mDoToolUpdates )
{
- int o = 0; //glt
- ++o;
-
// TBD::
}
}
void wxFrameView::CreateLayout()
{
- mpLayout = new wxFrameLayout( GetParentFrame(), mpFrameMgr->GetClientWindow(), FALSE );
+ mpLayout = new wxFrameLayout( GetParentFrame(), mpFrameMgr->GetClientWindow(), false );
}
wxFrameLayout* wxFrameView::GetLayout()
/***** Implementation for class wxFrameManager *****/
-void wxFrameManager::DoSerialize( wxObjectStorage& store )
+void wxFrameManager::DoSerialize( wxObjectStorage& WXUNUSED(store) )
{
#if 0
store.AddInitialRef( mpFrameWnd );
{
DeactivateCurrentView();
- wxNode* pNode = mViews.First();
+ wxObjectList::compatibility_iterator pNode = mViews.GetFirst();
while ( pNode )
{
- delete (wxFrameView*)pNode->Data();
+ delete (wxFrameView*)pNode->GetData();
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
if ( mActiveViewNo != -1 && GetParentFrame() )
int wxFrameManager::GetViewNo( wxFrameView* pView )
{
- wxNode* pNode = mViews.First();
+ wxObjectList::compatibility_iterator pNode = mViews.GetFirst();
int n = 0;
while ( pNode )
{
- if ( (wxFrameView*)pNode->Data() == pView )
+ if ( (wxFrameView*)pNode->GetData() == pView )
return n;
++n;
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
return -1;
if ( !pMenuBar )
return;
- wxStringListNode* pNode = pView->mTopMenus.GetFirst();
+ wxStringList::compatibility_iterator pNode = pView->mTopMenus.GetFirst();
int i;
while ( pNode )
void wxFrameManager::SyncAllMenus()
{
- wxNode* pNode = mViews.First();
+ wxObjectList::compatibility_iterator pNode = mViews.GetFirst();
int i = 0;
while ( pNode )
{
if ( i != mActiveViewNo )
- EnableMenusForView( (wxFrameView*)pNode->GetData(), FALSE );
+ EnableMenusForView( (wxFrameView*)pNode->GetData(), false );
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
- EnableMenusForView( GetView( mActiveViewNo ), TRUE );
+ EnableMenusForView( GetView( mActiveViewNo ), true );
}
/*** public methods ***/
mSettingsFile = settingsFile;
mpFrameWnd = pMainFrame;
- wxNode* pNode = mViews.First();
+ wxObjectList::compatibility_iterator pNode = mViews.GetFirst();
while ( pNode )
{
- wxFrameView* pView = (wxFrameView*)pNode->Data();
+ wxFrameView* pView = (wxFrameView*)pNode->GetData();
pView->OnInit();
pView->OnInitMenus();
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
if ( !ReloadViews() )
// if loading of settings file failed (e.g. was not found),
// do recreation of items in each view
- pNode = mViews.First();
+ pNode = mViews.GetFirst();
while ( pNode )
{
- wxFrameView* pView = (wxFrameView*)pNode->Data();
+ wxFrameView* pView = (wxFrameView*)pNode->GetData();
pView->OnRecreate();
- pNode = pNode->Next();
+ pNode = pNode->GetNext();
}
}
- if ( mActiveViewNo >= mViews.Number() )
+ if ( mActiveViewNo >= (int)mViews.GetCount() )
mActiveViewNo = -1;
ActivateView( GetView( ( mActiveViewNo == -1 ) ? 0 : mActiveViewNo ) );
pFrmView->mpFrameMgr = this; // back ref.
}
-void wxFrameManager::RemoveView( wxFrameView* pFrmView )
+void wxFrameManager::RemoveView( wxFrameView* WXUNUSED(pFrmView) )
{
// TBD::
- wxFAIL_MSG("wxFrameManager::RemoveView() has not been implemented yet.");
+ wxFAIL_MSG( _T("wxFrameManager::RemoveView() has not been implemented yet.") );
}
int wxFrameManager::GetActiveViewNo()
wxFrameView* wxFrameManager::GetActiveView()
{
- wxNode* pNode = mViews.Nth( mActiveViewNo );
+ wxObjectList::compatibility_iterator pNode = mViews.Item( mActiveViewNo );
- if ( pNode ) return (wxFrameView*)pNode->Data();
+ if ( pNode ) return (wxFrameView*)pNode->GetData();
else return NULL;
}
-wxNode* wxFrameManager::GetActiveViewNode()
+wxObjectList::compatibility_iterator wxFrameManager::GetActiveViewNode()
{
- return mViews.Nth( mActiveViewNo );
+ return mViews.Item( mActiveViewNo );
}
wxFrame* wxFrameManager::GetParentFrame()
wxFrameView* wxFrameManager::GetView( int viewNo )
{
- wxNode* pNode = mViews.Nth( viewNo );
+ wxObjectList::compatibility_iterator pNode = mViews.Item( viewNo );
- if ( pNode ) return (wxFrameView*)pNode->Data();
+ if ( pNode ) return (wxFrameView*)pNode->GetData();
else return NULL;
}
GetParentFrame()->PushEventHandler( pFrmView );
- EnableMenusForView( pFrmView, TRUE );
+ EnableMenusForView( pFrmView, true );
}
void wxFrameManager::SetClinetWindow( wxWindow* pFrameClient )
if ( pView->mpLayout )
pView->mpLayout->Deactivate();
- EnableMenusForView( pView, FALSE );
+ EnableMenusForView( pView, false );
}
void wxFrameManager::SaveViewsNow()
bool wxFrameManager::ReloadViews()
{
- return FALSE;
+ return false;
// TBD: ????
#if 0
if ( mSettingsFile == "" || !wxFileExists( mSettingsFile ) )
- return FALSE;
+ return false;
DestroyViews();
mStore.SetDataStream( stm );
DoSerialize( mStore );
- return TRUE;
+ return true;
#endif
}
bool wxFrameManager::ViewsAreLoaded()
{
- return ( mViews.Number() != 0 );
+ return ( mViews.GetCount() != 0 );
}