// TBlockInsertEdJig.h: interface for the TBlockInsertEdJig class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_TBLOCKINSERTEDJIG_H__9EE9C132_159C_4FAB_9385_73AA87D1C671__INCLUDED_) #define AFX_TBLOCKINSERTEDJIG_H__9EE9C132_159C_4FAB_9385_73AA87D1C671__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "EdJigEx.h" //////////////////////////////////////////////////////////////// // 图块拖动 class TBlockInsertEdJig2 : public TSymbEdJig { public: enum TInsertOper {kNone=0, kMove=1, kRotate=2, kDragCorner=3,}; protected: TInsertOper m_nOperCode; XPoint m_ptRef; // I/O AcDbEntity *m_pBackup; AcDbEntity *m_pDrawEnt; public: TBlockInsertEdJig2(AcDbEntity *pDrag, XPoint ptRef); ~TBlockInsertEdJig2() { if(m_pBackup) delete m_pBackup; } int DoIt(int *pKeyIndex=NULL); protected: virtual AcEdJig::DragStatus GetPoint(XPoint &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: void SetOperCode(TBlockInsertEdJig2::TInsertOper opCode) { m_nOperCode=opCode; } void Backup() { CopyObject(*m_pDrawEnt, *m_pBackup); } void SetRefPoint(XPoint ptRef) { m_ptRef=ptRef; } void SetBlockId(AcDbObjectId idBlock); AcDbEntity *GetBackup() { return m_pBackup; } }; #endif // !defined(AFX_TBlockInsertEdJig2_H__9EE9C132_159C_4FAB_9385_73AA87D1C671__INCLUDED_)