#pragma once #include "item.h" namespace NItem { class CItemSelectElement : public CItem { public: CItemSelectElement(CSigmaDoc * ppDoc); virtual ~CItemSelectElement(void); class SELECT_ITEM { public: POSITION pos; CPoint2D point; SELECT_ITEM() { pos=NULL; }; }; CList SelectList; protected: CList RedoList; BOOL m_nCompareIdea; //在已选择曲线中查找是否已选中过,-1=不比较,0=比较首尾,1=比较全部 int m_SelectType; UINT m_SelectID; int num; //选择的个数 BOOL m_bRedraw; int m_countSelected; public: void OnDraw(CXyDC* pDC) override; void OnDraw(CXyDC* pXyDC, CDC* pDC) override; void OnLButtonDown(CDC* pDC, UINT nFlags, CPoint point, int vk) override; int OnMouseMove(CDC* pDC, UINT nFlags, CPoint point) override; virtual void DrawSelectItem(POSITION pos); virtual void DrawSelectItem(SELECT_ITEM& item); virtual BOOL DoSelectEnd(void); virtual BOOL SelectItem(POSITION pos,CPoint2D point); virtual BOOL Select(POSITION pos, CPoint2D point); virtual BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); virtual void Redo(void); virtual void Undo(void); virtual BOOL IsElementType(POSITION pos, int type); virtual BOOL IsCanSelected(POSITION pos); virtual BOOL IsSelectItem(POSITION pos); void RemoveAllSelect(); //void InvalidateOne(POSITION pos); BOOL IsMoveSelect(void); BOOL IsCanRedo(void); BOOL IsCanUndo(void); POSITION GetSelectItem(int nIndex); void RemoveAt(int nIndex); int GetSelectCount(void); void SetNumber(int nNum); void SetSelectInfo(int nType,UINT nInfoID); void SetCompareIdea(int nIdea); void InvalidateSelect(void); void EnableDraw(BOOL bEnable); int GetCountSelected(); }; };