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.

83 lines
3.0 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "SmartPtr.h"
#include "ObjBase.h"
#include "GlobalDefine.h"
#include "ObjContainer.h"
#include "EnumDirection.h"
class CLayer
{
public:
CLayer(void);
~CLayer(void);
CMFCPropertyGridProperty *CreatSpecialGridProperty(CModule *pModule);
void Serialize(CArchive& ar);
void Draw(CDC* pDC);
void XorRedrawObj(CDC* pDC,bool bNeedSel = true);
void AddObject(CObjBase *pMarkObject);
void AddObject(Sptr<CObjBase> p);
void AddObject(CObjContainer &ObjContainer);
void AddTmpObject(Sptr<CObjBase> p);
void DelSelObj();
void DelObj(Sptr<CObjBase> p);
void DelObj(CObjContainer &ObjContainer);
void ClearTmpObj();
bool SelObjectInRect(DbRect rect,bool bNeedAllIn);
void SelAllObj();
void DelAllObj();
void NotSelAllObj();
void RevSelAllObj();
bool HasSelObjectInRect(DbRect rect);
bool HasObjSel();
MOUSE_TOOL JudgeMouseToolType(Dbxy pt);
void OperateObj(SObjOperatePar &par,bool bAll);
DbRect GetSelObjRect();
void OnRotato(double Angle);
void OnMirror(X_OR_Y xy);
void OnMove(double MoveX,double MoveY,bool bAddUndo = true);
void GetLineInRect(DbRect &rect,vector<DbLine> &DataPtLineVec,bool bCatchTemp);
void CloneObj(CObjContainer &ObjContainer,bool bNeedSel);
Sptr<CObjBase> GetFirstObjInRect(DbRect &rect);
Sptr<CObjBase> GetFirstNodeObjInRect(DbRect &rect);
bool HasObjectInRect(DbRect rect);
void GetIntersectPoint(DbLine &line,vector<Dbxy> &PointVec);
bool HasObjIntersectWithLine(DbLine &line);
void OnReverseSelObj();
bool OnJoin();
void OnExplode();
bool HasSelNodeInRect(DbRect rect);
void BindingSelObjToDlg();
bool HasObj(){return !m_ObjContainer->Empty();};
CObjContainer &GetObjContainer(){return *m_ObjContainer;};
void FillObj(SFillPar FillPar,bool bNeedSel = true);
void OnSpecialPropertyChanged();
void BindObjContainer(CObjContainer &Container);
void GetAllPointObjPt(vector<Dbxy> &PtVec);
void SetSelObjPenNum(int num);
void SelborderObj(bool bNext);
void SetbShowObjIdx(bool b){m_bShowObjIdx = b;};
void SelectedObjInsertToIdx(int idx);
void ReverseSelObj();
void SelFirstObj();
void SetbDrawObj(bool b){m_bDrawObj = b;};
bool IsbDrawObj(){return m_bDrawObj;};
void ResetAllMarkObj();
void Rotato(double Angle);
void CreatCircleByThreePt();
void OffsetRotatoObj(COffsetRotatoPar OffsetRotatoPar);
void MoveScanObj(DIRECTION dir,double Dis);
void CreatOneLineObj(double Len);
void ResetAllObjScaned();
private:
void DrawAllObj(CDC* pDC);
private:
bool m_bShowObjIdx;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾobj <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>idx
bool m_bDrawObj;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>obj
CObjContainer *m_ObjContainer;//obj <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CObjContainer m_TmpObjContainer;//<2F><>ʱobj <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><>Ҫ<EFBFBD><D2AA><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD>ʱ<EFBFBD><CAB1>׽)
};
extern CLayer gLayer;