50 lines
1.3 KiB
C++
50 lines
1.3 KiB
C++
//-------------------------------------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TArchDocReactor 类
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TArchDocReactor 定义
|
|
// = Maintainers:
|
|
//
|
|
//-------------------------------------------------------------------------------------------------------+
|
|
#include "StdAfx.h"
|
|
#include "TArchDocReactor.h"
|
|
#include "TArchAppDocGlobals.h"
|
|
|
|
TArchAppDocGlobals* TArchDocReactor::g_pTArchAppDocGlobals = NULL;
|
|
|
|
TArchDocReactor::TArchDocReactor()
|
|
{
|
|
|
|
}
|
|
|
|
void TArchDocReactor::documentToBeActivated(AcApDocument *pDoc)
|
|
{
|
|
#if (ADS>19)
|
|
if (1 == acDocManagerPtr()->documentCount())
|
|
return;
|
|
#endif
|
|
g_pTArchAppDocGlobals->InitDocGlobals(pDoc);
|
|
}
|
|
|
|
void TArchDocReactor::documentActivated(AcApDocument* pActivatedDoc)
|
|
{
|
|
#if (ADS>19)
|
|
if (0 == acDocManagerPtr()->documentCount())
|
|
return;
|
|
if (!curDoc())//当前文档为新选项卡时
|
|
return;
|
|
#endif
|
|
DocStatus();
|
|
}
|
|
|
|
void TArchDocReactor::documentCreated(AcApDocument *pDoc)
|
|
{
|
|
g_pTArchAppDocGlobals->InitDocGlobals(pDoc);
|
|
}
|
|
|
|
void TArchDocReactor::documentToBeDestroyed(AcApDocument *pDoc)
|
|
{
|
|
g_pTArchAppDocGlobals->RemoveDocGlobals(pDoc);
|
|
}
|