#ifndef _SYMBOLANNOTATE_JIG_H_ #define _SYMBOLANNOTATE_JIG_H_ #include "EdJigEx.h" #include "ElevDlg.h" #include "IndexDimDlg.h" #include "LeaderTextDlg.h" #include "coorddlg.h" #include "SectionDlg.h" //以下类是从EditSymbolAnnotate.cpp文件中分离出来 by lgy 20120109 extern TARCH_IMPEXP int g_bTextAdjust; //extern AcDbObjectId InitTextStyle(const TCHAR *pszStyle); extern GEOAPI int DragPickSet(PickSet &ss, XPoint &ptBase); //extern TARCH_IMPEXP int DragMovePickSet(PickSet &ss, const TCHAR *pszPrompt, const XPoint &ptBase, XPoint &ptFinal); extern int TARCH_IMPEXP g_nSymbArrowStyle; // sg add 090119,JIG过程中支持预览箭头样式 extern XPoint pptfirst; static double sAngle; extern XPoint pptfirst_; // [11/12/2007 nsh] extern double sAngle_; // Command:作法标注 class TComposingEdJig : public TSymbEdJig { public: enum TComposingOper {kNone=0, kTextLine=1, kTurnPoint=2,}; protected: TComposingOper m_nOperCode; // I/O TDbSymbComposing *m_pDrawEnt; public: TComposingEdJig(TDbSymbComposing *); virtual int DoIt(int *pKeyIndex=NULL); DragStatus GetPoint(XPoint &pt); protected: virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: void SetOperCode(TComposingEdJig::TComposingOper opCode) { m_nOperCode=opCode; } }; // add by xly on 100916 有圆点时的jig方式 class TComposingAddOtherPtJig : public TSymbEdJig { public: TComposingAddOtherPtJig(XPoint ptStart, XPoint ptBase); public: AcGePoint3d m_ptLeader; // 引线的拐点 AcGePoint3d m_ptFirstVertexes; // 引线的端点 AcDbLine m_line; // 引线 public: int DoIt(int *pKeyIndex = NULL); virtual DragStatus GetPoint(AcGePoint3d &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; }; // Command: 指向索引 class TIndexPointerEdJig : public TSymbEdJig { public: enum TIndexOper { kNone = 0, kSourceExtent = 1, kTurnPoint = 2, kTextBasePoint = 3, kViewDirection = 4, kAddedTurn = 5, // 剖切线中多出来的那个点 kMoreCuts = 6, // 其他剖切点 }; double m_dFixAngle; // add by cwk on 060706,固定角度值 bool m_bFixAngle; protected: TIndexOper m_nOperCode; TDbSymbIndexPointer *m_pDrawEnt; // I/O AcDbCircle m_drawEnt; CArray m_arCutAdded; XLine m_cutCurrDrag; CIndexDimDlg *m_pDlg; // public: TIndexPointerEdJig(TDbSymbIndexPointer *); int DoIt(int *pKeyIndex = NULL); void AttachDlg(CIndexDimDlg* pDlg) {m_pDlg = pDlg;} // 根据索引初始化索引线 void InitCutLine(); protected: virtual AcEdJig::DragStatus GetPoint(XPoint &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: void SetOperCode(TIndexPointerEdJig::TIndexOper opCode) { m_nOperCode = opCode; } }; // Add by lcf on 2005-06-24 ///////////////////////////////////////////////////////////// // Command:箭头引注 class TArrowEdJig : public TSymbEdJig { public: enum TArrowOper {kNone=0, kLinePoint=1, kArcPoint=2, kArcMidPoint=3, kArcRadius=4}; protected: TArrowOper m_nOperCode; TDbSymbArrow *m_pDrawEnt; BOOL m_bFirst; public: TArrowEdJig(TDbSymbArrow *); virtual int DoIt(int *pKeyIndex = NULL); virtual DragStatus GetPoint(XPoint &pt); protected: virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: void SetOperCode(TArrowEdJig::TArrowOper opCode) { m_nOperCode = opCode; } TArrowOper GetOperCode() {return m_nOperCode;} }; ////////////////////////////////////////////////////////////////////////// // 坐标标注 // [10/22/2007 nsh] static CString dAngle; // 保存角度 static XPoint savePoint; // 保存第一点的坐标 // --end-- class TCoordEdJig : public TSymbEdJig { protected: // I/O TDbSymbCoord *m_pDrawEnt; public: TCoordEdJig(TDbSymbCoord *); virtual int DoIt(); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: // [10/19/2007 nsh] double m_dFixAngle; // 得到固定的角度值 BOOL m_bFixAngle; // 判断时候选定了固定角度的选项 // --end-- XPoint m_saveFirstPt; // sg add 120618,记忆第1点坐标,主要为了接收外面传过来的值,给savePoint赋值 }; // Add by lcf 2005-06-30 // 图名标注 class TDrawingNameJig : public AcEdJig { public: TDrawingNameJig(TDbDrawingName *pEnt); int start(int *pKeyIndex = NULL); AcDbEntity* entity() const; DragStatus sampler(); Adesk::Boolean update(); void SetPrompt(const TCHAR *pszPrompt); void SetKeyword(const TCHAR *pszKeyword); private: const TCHAR *m_pszPrompt; //提示信息 const TCHAR *m_pszKeyword; //关键字 TDbDrawingName *m_pDrawEnt; //临时实体 AcGePoint3d m_ptIns; }; class TLeaderEdJig : public TSymbEdJig { public: enum TLeaderOper { kNone=0, kLeader=1, kTextLine=2, kVertex=3, }; // add by cwk double m_dFixAngle; BOOL m_bFixAngle; protected: // 输入 TLeaderEdJig::TLeaderOper m_nOperCode; // I/O TDbSymbMultiLeader *m_pDrawEnt; public: TLeaderEdJig(TDbSymbMultiLeader *); int DoIt(int *pKeyIndex = NULL); virtual DragStatus GetPoint(XPoint &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; XPoint GetDragPoint() const; XPoint GetBasePoint() const; //add by lgy 20120206 引出标注角度固定角度不起作用 void SetDlg(CLeaderDlg *pLeadDlg); CLeaderDlg *m_pDlg; public: void SetOperCode(TLeaderEdJig::TLeaderOper nCode) { m_nOperCode = nCode; } }; // sg add 090330,引出标注,添加其他点时使用 class TLeaderAddOtherPtJig : public TSymbEdJig { public: AcGePoint3d m_ptLeader; AcGePoint3d m_ptFirstVertexes; AcDbLine m_line; BOOL m_bUpdateDlg; // 兼顾对象编辑和绘制对话框,标志是否时时获取对话框上的“多点共线” CLeaderDlg *m_pDlg; BOOL m_bAllOnLine; double m_nLayoutRotation;//引线平行 add by lxb on 111229 BOOL m_bLeaderParall; //对象编辑时,对象是否带有引线平行属性 public: TLeaderAddOtherPtJig(CLeaderDlg *pDlg, XPoint ptStart, XPoint ptBase,double dLayoutRotation); // 绘制函数调用 TLeaderAddOtherPtJig(BOOL bAllPtsOnLine, XPoint ptStart, XPoint ptBase,double dLayoutRotation,BOOL b); // 对象编辑调用 int DoIt(int *pKeyIndex = NULL); virtual DragStatus GetPoint(XPoint &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; }; //绘制索引编号的JIG类TDrawingIndexEdJig //add by lxb on 2011/12/21 class TDrawingIndexEdJig:public AcEdJig { public: TDrawingIndexEdJig(TDbSymbDrawingIndex *pEnt,TCHAR *pszPormat,TCHAR *pszKeyWord); ~TDrawingIndexEdJig(); virtual AcEdJig::DragStatus sampler(); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; AcEdJig::DragStatus doIt(); private: TDbSymbDrawingIndex *m_pEnt; AcGePoint3d m_ptCur; //鼠标当前坐标 AcGePoint3d m_ptLast; TCHAR *m_pszPormat; //提示语 TCHAR *m_pszKeyWord; }; class TElevEdJig : public TSymbEdJig { public: enum TElevOper { kNone=0, kDirection=1, kBaseLine=2, kLeader=3, kMove=4}; double m_dPointX; AcGePoint3d m_ptBase; double m_fBaseElev; // M protected: // 输入 TElevEdJig::TElevOper m_nOperCode; // I/O TDbSymbElevation *m_pDrawEnt; public: TElevEdJig(TDbSymbElevation *); virtual int DoIt(int *pKeyIndex=NULL); virtual DragStatus GetPoint(XPoint &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; XPoint GetDragPoint() const; XPoint GetBasePoint() const; public: void SetOperCode(TElevEdJig::TElevOper nCode) { m_nOperCode = nCode; } }; // 指北针 class TNorthThumbEdJig : public TSymbEdJig { public: enum TNorthOper {kNone=0, kCenter=1, kDirection=2, }; protected: TNorthOper m_nOperCode; // I/O TDbSymbNorthThumb *m_pDrawEnt; public: TNorthThumbEdJig(TDbSymbNorthThumb *); virtual int DoIt(int *pKeyIndex=NULL); virtual DragStatus GetPoint(XPoint &pt); virtual BOOL IsPosChanged(XPoint ptNew) const; virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: void SetOperCode(TNorthThumbEdJig::TNorthOper opCode) { m_nOperCode=opCode; } }; // 对称轴 class TSymmetryEdJig : public TSymbEdJig { protected: // I/O TDbSymbSymmetry *m_pDrawEnt; public: TSymmetryEdJig(TDbSymbSymmetry *); virtual DragStatus GetPoint(XPoint &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; }; // 剖面剖切 class TSectionEdJig : public TSymbEdJig { public: enum TSectionOper {kNone=0, kSectPoint=1, kSectPointOther=2, kViewDirection=3}; protected: int GetRetCode(int nRetCode, int *kewyIdx=NULL) const; protected: TSectionOper m_nOperCode; int m_iFlag2; //add by lgy 20120320 添加改变量控制那种方式jig剖面符号 int m_nMode; CSectionDlg *m_pDlg; // I/O TDbSymbSection *m_pDrawEnt; TDbSymbSection m_drawEnt; public: TSectionEdJig(TDbSymbSection *); int DoIt(int *pKeyIndex=NULL); //add by lgy 20120320 设置剖面符号绘制的方式 void SetJigMode(int nMode); void SetJigDlg(CSectionDlg *pDlg); //设置与jig交互的对话框 protected: virtual AcEdJig::DragStatus GetPoint(XPoint &pt); virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; public: void SetOperCode(TSectionEdJig::TSectionOper opCode) { m_nOperCode=opCode; } int GetiFlag2(); }; //add by lgy 20120410 9.0新功能绘制云线 class TCloudLineJig : public TSymbEdJig { public: TCloudLineJig(TDbSymbModi *pModi, XPoint ptFirst, double dMax, double dMin); ~TCloudLineJig(); public: virtual int DoIt(int *pKeyIndex = NULL); virtual DragStatus GetPoint(XPoint &pt); protected: virtual Adesk::Boolean update(); virtual AcDbEntity* entity() const; private: XPoint m_ptFirst; double m_dMax; double m_dMin; XPoly2D m_pline; TDbSymbModi *m_pModi; }; #endif