You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.2 KiB
C++
71 lines
2.2 KiB
C++
#pragma once
|
|
#include "itemfocusrect.h"
|
|
#include "itemselectcurve.h"
|
|
#include "itemcurve.h"
|
|
|
|
namespace NItem
|
|
{
|
|
|
|
/**
|
|
* 曲线打断类
|
|
*/
|
|
class CItemBreakCurve : public CItemFocusRect
|
|
{
|
|
public:
|
|
CItemBreakCurve(CSigmaDoc * ppDoc);
|
|
virtual ~CItemBreakCurve(void);
|
|
|
|
void OnLButtonDown(CDC *pDC, UINT nFlags, CPoint point, int vk) override;
|
|
int OnMouseMove(CDC *pDC, UINT nFlags, CPoint point) override;
|
|
void OnRButtonDown(UINT nFlags, CPoint point) override;
|
|
void DoLButtonUp(CDC *pDC) override;
|
|
void OnDraw(CXyDC* pDC) override;
|
|
void OnDraw(CXyDC* pXyDC, CDC *pDC) override;
|
|
virtual int ProcessCurve(CCurveEx* pCurve, COne* pOne, CPoint2D* pPoint);
|
|
int GetSubMenu() override;
|
|
virtual void Clear(void);
|
|
void BreakAllEditableCurve(CPositionList& list);
|
|
bool IsBreaked();
|
|
int GetSelectCount();
|
|
void HightLightFirstCurve();
|
|
protected:
|
|
void ProcessLButtonUp(void);
|
|
int BreakOne(COne* pBaseOne, CPtrList& allBaseCurveList);
|
|
void BreakCurve(CCurveEx* pCurve, CPositionList& list, CRect8* pRect);
|
|
void BreakCurveWithAction(CCurveEx* pCurve, CPositionList& list, CRect8* pRect);
|
|
POSITION AddCurve(COne* pBaseOne);
|
|
POSITION AddCurve(COne* pBaseOne, CCurveEx* pCurve);
|
|
void sort_location(CList<CCrossPoint,CCrossPoint> &xy,CCrossPoint &cp,int nSortIndex);
|
|
void SortLocation(CList<CCrossPoint,CCrossPoint> &xy, int nSortIndex);
|
|
CItemSelectCurve *m_pSelectCurve; // 存储打断线
|
|
POSITION curPos;
|
|
CList<dfPoint,dfPoint> PointList;
|
|
BOOL m_bRange;
|
|
CPositionList AddList, DelList;
|
|
UINT m_nActionID; //undo信息ID
|
|
BOOL m_bAutoDelete;
|
|
int m_bCountSelected;
|
|
protected:
|
|
BOOL m_bNoLineValue; //不进行线性插值,在最近节点处打断
|
|
bool m_bBreak;
|
|
};
|
|
|
|
class CItemBreakCurveDirect : public CItemBreakCurve
|
|
{
|
|
public:
|
|
CItemBreakCurveDirect(CSigmaDoc * ppDoc);
|
|
virtual ~CItemBreakCurveDirect(void);
|
|
|
|
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;// , BYTE*& destBuffer, int& destLen);
|
|
void OnLButtonUp(CDC* pDC, UINT nFlags, CPoint point, int vk) override;
|
|
void OnRButtonDown(UINT nFlags, CPoint point) override;
|
|
BOOL OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) override;
|
|
virtual void Clear(void);
|
|
protected:
|
|
CItemCurve * m_pItemCurve;
|
|
};
|
|
|
|
};
|