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.

65 lines
2.2 KiB
C

#pragma once
#include "GlobalDefine.h"
#include "ObjContainer.h"
#include "WorkData.h"
#include "SmartPtr.h"
#include "ObjComponent.h"
class CProduct;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
class CMarkArea
{
public:
CMarkArea();
CMarkArea(Dbxy pt,DbSize size);
~CMarkArea(void);
void Serialize(CArchive& ar);
void WriteWorkFile(vector<CLab> &LabVec);
void ReadWorkFile(CLabVecRang &LabVecRang);
void Draw(CDC* pDC,bool bSel);
DbRect GetRect();
Dbxy GetBasePt(){return m_BasePt;};
void SetBasePt(Dbxy pt);
DbSize GetSize(){return m_Size;};
void CollectWorkData(bool bNeedSel);
bool HasWorkData();
vector<vector<Dbxy>> &GetDataVec(){return m_WorkData.GetDataVec();};
CWorkData &GetWorkData(){return m_WorkData;};
void SetSelState(bool b){m_bSel = b;};
bool IsSelected(){return m_bSel;};
bool IsPtInArea(Dbxy pt);
void UpdateSize();
void AdjustByObj();
Dbxy GetRealBasePt();//<2F><>ȡʵ<C8A1><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
void SetRealBasePt(Dbxy pt){m_RealBasePt = pt;};
int GetAreaIdx(){return m_AreaIdx;};
void SetAreaIdx(int n){m_AreaIdx = n;};
int GetAreaPenNum(){return m_AreaPenNum;};
private:
void CollectLayerObjExt(CObjContainer &ObjContainer,bool bNeedSel);
void CollectComponentObj(vector<vector<Dbxy>> &vec,bool bNeedSel);
bool DrawObjComponentVec(vector<Sptr<CObjComponent>> &vec,CDC* pDC,bool bSel);
void CollectObjExt(Sptr<CObjComponent> &pObj,DbRect &rect);
void ResetObjCollectState();
void Init();
private:
Dbxy m_BasePt;//<2F><><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD>׼<EFBFBD><D7BC>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>)
Dbxy m_RealBasePt;//<2F><><EFBFBD><EFBFBD>area <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD>Ļ<EFBFBD>׼<EFBFBD><D7BC>,<2C><><EFBFBD>ڱ<EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>񾵵<EFBFBD><F1BEB5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӹ<EFBFBD>
DbSize m_Size;//<2F><><EFBFBD><EFBFBD><EFBFBD>ijߴ<C4B3>
Dbxy m_Offset;//<2F><><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF>ƫ<EFBFBD><C6AB>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD>
bool m_bSel;//ѡ<><D1A1>״̬
CWorkData m_WorkData;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD><EFBFBD>)
CObjContainer m_ObjContainer;//Ҳ<><D2B2><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>ͼ<EFBFBD><CDBC>obj <20><><EFBFBD><EFBFBD>
int m_AreaIdx;//<2F><><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
int m_AreaPenNum;//<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>obj <20>ıʺ<C4B1>
};