示例#1
0
/*

// replaced with use of nwxTimerReceiver

void CMDIfileManager::OnTimer(wxTimerEvent &e)
{
  CMDI_WF::iterator itr;
  for(itr = m_mapWindowFile.begin();
      _IteratorOK(itr);
      ++itr)
  {
    itr->first->OnTimer(e);
  }
}
*/
void CMDIfileManager::InsertWindow(CMDIFrame *pWin, COARfile *pFile)
{
  CMDI_WF::iterator itr = m_mapWindowFile.find(pWin);
  bool bDone = false;
#ifdef __WINDOW_LIST__
  bool bAddToList = true;
#endif
  if(!_IteratorOK(itr))
  {}
  else if(itr->second == pFile)
  {
    bDone = true;
  }
  else
  {
    _RemoveIterator(itr);
#ifdef __WINDOW_LIST__
    bAddToList = false;
#endif
  }
  if(!bDone)
  {
    m_mapWindowFile.insert(CMDI_WF::value_type(pWin,pFile));
    _InsertCOARfile(pFile,pWin);
#ifdef __WINDOW_LIST__
    if(bAddToList)
    {
      _AddWindowToLists(pWin);
    }
#endif
  }
}
示例#2
0
/*

// replaced with use of nwxTimerReceiver

void CMDIfileManager::OnTimer(wxTimerEvent &e)
{
  CMDI_WF::iterator itr;
  for(itr = m_mapWindowFile.begin();
      _IteratorOK(itr);
      ++itr)
  {
    itr->first->OnTimer(e);
  }
}
*/
void CMDIfileManager::InsertWindow(CMDIFrame *pWin, COARfile *pFile)
{
  CMDI_WF::iterator itr = m_mapWindowFile.find(pWin);
  bool bDone = false;
  if(!_IteratorOK(itr))
  {}
  else if(itr->second == pFile)
  {
    bDone = true;
  }
  else
  {
    _RemoveIterator(itr);
  }
  if(!bDone)
  {
    m_mapWindowFile.insert(CMDI_WF::value_type(pWin,pFile));
    _InsertCOARfile(pFile,pWin);
  }
}