#pragma once #include ".\itemfocusrect.h" #include "DrawOperator\CurveForInName.h" namespace NItem { class CItemEditCurveCenterName : public CItemFocusRect { public: CItemEditCurveCenterName(CSigmaDoc * ppDoc); virtual ~CItemEditCurveCenterName(void); void OnDraw(CXyDC* pXyDC, CDC* pDC) override; void OnLButtonDown(CDC *pDC, UINT nFlags, CPoint point, int vk) override; void OnLButtonUp(CDC* pDC,UINT nFlags, CPoint point, int vk) override; int OnMouseMove(CDC* pDC, UINT nFlags, CPoint point) override; BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) override; virtual void BeginEdit(void); protected: CXy* m_pXyNameRange; POSITION m_posCurEdit; CCurveForInName* m_pBakCurCurve; virtual void DrawCurrentCurveHandle(CXyDC* pDC); virtual void DrawCurrentCurve(CXyDC* pDC); virtual void SelectCurve(POSITION pos); virtual void DoLButtonUp(void); void ActionBackup(POSITION posDoc, UINT nID); virtual CXy* GetXY(void); //重新生成一条曲线内部名称的范围线 void RecreateCenterName(POSITION posDoc); //根据指针删除其列表名称范围线,返回值为修饰中pNameCurve所在的索引号 int DeleteCenterNameCurve(CCurveEx* pParentCurve, CCurveForInName* pNameCurve); //根据偏移重新设置曲线的修饰(由类别修饰变为了个性修饰) int ResetCurveCenterName(POSITION posDoc, int nCurveNameIndex, double ox, double oy); int m_nUndoStep; int m_nRedoStep; public: BOOL IsCanRedo(void); BOOL IsCanUndo(void); void Undo(void); void Redo(void); void Clear(void); }; }