#ifndef __EDJIGEX_H #define __EDJIGEX_H class TARCH_EXP TSymbEdJig : public AcEdJig { protected: int GetRetCode(int nRetCode, int *kewyIdx=NULL) const; protected: //输入 XString m_sPrompt; //提示信息 XString m_sKeyword; XPoint m_ptResult; public: TSymbEdJig() {} virtual int DoIt(int *pKeyIndex=NULL); virtual DragStatus GetPoint(XPoint &pt); virtual BOOL IsPosChanged(XPoint ptNew) const; virtual DragStatus sampler(); public: void SetPrompt(const TCHAR *s) { m_sPrompt=s; } void SetKeyword(const TCHAR *k) { m_sKeyword=k; } XPoint GetPickPoint() const { return m_ptResult; } }; class TARCH_EXP TPolyEdJig : public TSymbEdJig { public: enum TPolyOper {kNone=0, kLinePoint=1, kArcPoint=2, kArcMidPoint=3, kArcRadius=4}; protected: TPolyOper m_nOperCode; // I/O AcDbPolyline *m_pDrawEnt; public: TPolyEdJig(AcDbPolyline *); virtual int DoIt(int *pKeyIndex=NULL); DragStatus GetPoint(XPoint &pt); protected: virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: void SetOperCode(TPolyEdJig::TPolyOper opCode) { m_nOperCode=opCode; } TPolyOper GetOperCode() { return m_nOperCode; } }; class TARCH_EXP TBlockInsertEdJig : 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: TBlockInsertEdJig(AcDbEntity *pDrag, XPoint ptRef); ~TBlockInsertEdJig() { 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(TBlockInsertEdJig::TInsertOper opCode) { m_nOperCode=opCode; } void Backup() { CopyObject(*m_pDrawEnt, *m_pBackup); } void SetRefPoint(XPoint ptRef) { m_ptRef=ptRef; } AcDbEntity *GetBackup() { return m_pBackup; } }; #endif