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.

95 lines
4.0 KiB
C

#pragma once
#include "GlobalDefine.h"
#include "SmartPtr.h"
#include "ObjBase.h"
//Ԫ<><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
class CObjComponent
{
friend class CDlgObjComponent;
public:
CObjComponent();
CObjComponent(Dbxy pt,DbSize size);
~CObjComponent(void);
void Draw(CDC* pDC);
DbRect GetRect();
Dbxy GetBasePt(){return m_BasePt;};
void SetBasePt(Dbxy pt){m_BasePt = pt;};
void SetSize(DbSize s){m_Size = s;};
DbSize GetSize(){return m_Size;};
void SetBase(bool b){m_bBase = b;};
bool IsBase(){return m_bBase;};//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>׼Ԫ<D7BC><D4AA>
bool IsInRect(DbRect rect,bool bCenterIn =false);
void SetSelected(bool b);
bool IsSelected(){return m_bSel;};
void SetbCollected(bool b){m_bCollected = b;};//<2F><><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD>״̬
bool IsCollected(){return m_bCollected;};
void CollectWorkData(DbRect &rect,vector<vector<Dbxy>> &vec);
bool IsCircle(){return m_bCircle;};
void SetIsCircle(bool b){m_bCircle = b;};
void SetColorIdx(int idx){m_ColorIdx = idx;};
void SetObjMarkIdx(bool b);
int GetObjMarkIdx(){return m_ObjMarkIdx;};
void SetbMarkObj(bool b){m_bMarkObj = b;};
bool IsMarkObj(){return m_bMarkObj;};
void SetMarkSidewardObj(){m_bMarkSidewardObj = true;};
void SetObjLineIdx(int idx){m_ObjLineIdx = idx;};
int GetObjLineIdx(){return m_ObjLineIdx;};
void SetbAutoCreatObj(){m_bAutoCreatObj = true;};
bool IsbAutoCreat(){return m_bAutoCreatObj;};
void SetIndex(IntXY idx){m_Index = idx;};
IntXY GetIndex(){return m_Index;};
void SetbView(bool b){m_bView = b;};
void SetRealBasePt(Dbxy pt){m_RealBasePt = pt;};
Dbxy GetRealBasePt(){return m_RealBasePt;};
void SetbViewed(bool b){m_bViewed = b;};
bool IsbViewed(){return m_bViewed;};
void AddObjShape(Sptr<CObjBase> p);
void SetbMarked(bool b){m_bMarked = b;};
bool IsbMarked(){return m_bMarked;};
void NotCollect(){m_bCollecteData = false;};//<2F><>Ҫ<EFBFBD>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD>
bool IsbCollecteData(){return m_bCollecteData;};
void SetShapeLockState(bool b);
void SetColor(COLORREF c){m_Color = c;};
void SetVal1(double val){m_Val1 = val;};
void SetVal2(double val){m_Val2 = val;};
double GetVal1(){return m_Val1;};
double GetVal2(){return m_Val2;};
private:
void Reset();
COLORREF GetObjColorByIdx(int Idx);
private:
bool m_bBase;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA>׼Ԫ<D7BC><D4AA>
bool m_bSel;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ѡ<EFBFBD><D1A1>
bool m_bCircle;//<2F>Ƿ<EFBFBD>ΪԲ<CEAA><D4B2>
bool m_bCollected;//<2F><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8>ռ<EFBFBD>
bool m_bMarked;//<2F>Ƿ񱻼ӹ<F1B1BBBC><D3B9><EFBFBD><EFBFBD><EFBFBD>
bool m_bCollecteData;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>Ҫ<EFBFBD>ռ<EFBFBD><D5BC>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD>(false <20><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD>obj <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
bool m_bMarkObj;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD>ǵ<EFBFBD>obj (<28><><EFBFBD><EFBFBD>CCD <20><>λ)
Dbxy m_BasePt;//Ԫ<><D4AA><EFBFBD>Ļ<EFBFBD>׼<EFBFBD><D7BC>(<28><><EFBFBD>ĵ<EFBFBD>)
DbSize m_Size;//Ԫ<><D4AA><EFBFBD>ijߴ<C4B3>
int m_TempIdx;//ʹ<>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int m_ColorIdx;//<2F><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>ֵ
int m_ObjMarkIdx;//obj <20><><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ񿪿<C7B7>
int m_ObjLineIdx;//obj <20><>line <20>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>ֵ,<2C><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>line <20><>obj <20>Ĺ<EFBFBD>ϵ
bool m_bAutoCreatObj;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>obj
bool m_bMarkSidewardObj;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>obj <20>Աߵ<D4B1>obj
vector<Sptr<CObjBase>> m_ObjShapeVec;//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>obj (<28><><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD>)
//LPS -ISP3000--------------------------------------------------------------------------------------
IntXY m_Index;//obj <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bool m_bView;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ڹ۲<DAB9>
bool m_bViewed;//<2F>Ƿ񱻹۲<F1B1BBB9><DBB2><EFBFBD><EFBFBD><EFBFBD>
Dbxy m_RealBasePt;//Ԫ<><D4AA><EFBFBD>Ļ<EFBFBD>׼<EFBFBD><D7BC>(<28><><EFBFBD>ĵ<EFBFBD>) ʵ<>ʵ<EFBFBD>ֵ(<28><><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD>ʾֵ<CABE><D6B5>һ<EFBFBD><D2BB>)
DbSize m_RealSize;//Ԫ<><D4AA><EFBFBD>ijߴ<C4B3> ʵ<>ʵ<EFBFBD>ֵ(<28><><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD>ʾֵ<CABE><D6B5>һ<EFBFBD><D2BB>)
COLORREF m_Color;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
double m_Val1;//<2F><>¼ֵ1(<28><><EFBFBD><EFBFBD>w)
double m_Val2;//<2F><>¼ֵ2(<28><EFBFBD>)
};