61 lines
1.2 KiB
C++
61 lines
1.2 KiB
C++
#include "stdafx.h"
|
|
#include "ThunderDocReactor.h"
|
|
#include "ThunderDbReactor.h"
|
|
#include "LightningRodData.h"
|
|
#include "ThunderXData.h"
|
|
#include "LayPinDlg.h"
|
|
#include "ThunderCmdGroup.h"
|
|
|
|
TelThunderDocReactor::TelThunderDocReactor()
|
|
{
|
|
m_pThunderDbReactor = NULL;
|
|
}
|
|
|
|
TelThunderDocReactor::~TelThunderDocReactor()
|
|
{
|
|
|
|
}
|
|
|
|
//创建文件
|
|
void TelThunderDocReactor::documentCreated(AcApDocument* pDocCreating)
|
|
{
|
|
|
|
}
|
|
|
|
//文件将要被销毁
|
|
void TelThunderDocReactor::documentToBeDestroyed(AcApDocument* pDoc)
|
|
{
|
|
acdbCurDwg()->removeReactor(m_pThunderDbReactor);
|
|
}
|
|
|
|
//文件被销毁
|
|
void TelThunderDocReactor::documentDestroyed(const TCHAR* fileName)
|
|
{
|
|
|
|
}
|
|
|
|
void TelThunderDocReactor::SetThunderDbReactor(CThunderDbReactor *pReactor)
|
|
{
|
|
m_pThunderDbReactor = pReactor;
|
|
}
|
|
|
|
void TelThunderDocReactor::SetThunderDraw2D(CDrawThunderTools* pDraw2D)
|
|
{
|
|
m_pDraw2D = pDraw2D;
|
|
}
|
|
|
|
void TelThunderDocReactor::documentActivated(AcApDocument* pActivatedDoc)
|
|
{
|
|
CThunderDbReactor* pReactor = NULL;
|
|
if (acdbCurDwg())
|
|
{
|
|
if (!m_mapDocToReactor.Lookup(acdbCurDwg(), (void*&)pReactor))
|
|
{
|
|
acdbCurDwg()->addReactor(m_pThunderDbReactor);
|
|
m_mapDocToReactor.SetAt(acdbCurDwg(), m_pThunderDbReactor);
|
|
ThunderContainer->MapCurrentDwg();
|
|
FoldManager->FilterAllFoldPin();
|
|
}
|
|
}
|
|
}
|