|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "item.h"
|
|
|
|
|
|
//#include "PropertiesDlg.h"
|
|
|
|
|
|
|
|
|
|
|
|
class CSigmaDoc;
|
|
|
|
|
|
namespace NItem
|
|
|
|
|
|
{
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
|
|
struct ProportionData
|
|
|
|
|
|
{
|
|
|
|
|
|
double x;
|
|
|
|
|
|
double y;
|
|
|
|
|
|
// double ScaleFactor; // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
double ScaleLength; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
double ScaleHeight; // <20><><EFBFBD><EFBFBD><EFBFBD>߶<EFBFBD>
|
|
|
|
|
|
int ViewMode; // <20><>ʾģʽ
|
|
|
|
|
|
int num; // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
int Unit; // <20><><EFBFBD>ȵ<EFBFBD>λ
|
|
|
|
|
|
int ColorR; // <20><>ɫ R
|
|
|
|
|
|
int ColorG; // <20><>ɫ G
|
|
|
|
|
|
int ColorB; // <20><>ɫ B
|
|
|
|
|
|
|
|
|
|
|
|
double TextScale; // <20>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int TextSpace; // <20>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
int TextAlign; // <20>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
double TextWidth; // <20>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
double TextHeight; // <20>ı<EFBFBD><C4B1>߶<EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
|
|
|
|
class CItemProportion : public CItem
|
|
|
|
|
|
{
|
|
|
|
|
|
protected:
|
|
|
|
|
|
BOOL m_bLButtonDown;
|
|
|
|
|
|
CProportion*m_pBakProportion;
|
|
|
|
|
|
int m_nAlignsH;
|
|
|
|
|
|
static int m_bAlone;
|
|
|
|
|
|
int m_nProportionMode;
|
|
|
|
|
|
//CPropertiesDlg* m_pDlg;
|
|
|
|
|
|
CSize8 m_size;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
CItemProportion(CSigmaDoc * ppDoc);
|
|
|
|
|
|
virtual ~CItemProportion(void);
|
|
|
|
|
|
void SetProportion(CProportion* pProportion);
|
|
|
|
|
|
void OnLButtonDown(CDC *pDC, UINT nFlags, CPoint point, int vk) override;
|
|
|
|
|
|
void OnDraw(CXyDC* pDC) override;
|
|
|
|
|
|
void DrawAssistant(CDC * pDC, int mouseX, int mouseY) override;
|
|
|
|
|
|
virtual BOOL DoSelectEnd(void);
|
|
|
|
|
|
void SetPos(POSITION pos) override;
|
|
|
|
|
|
void OnOK(void) override;
|
|
|
|
|
|
void OnCancel(void) override;
|
|
|
|
|
|
|
|
|
|
|
|
void InsertProportion(void);
|
|
|
|
|
|
int ChangeScale(double scale);
|
|
|
|
|
|
int ChangeScaleHeight(double height);
|
|
|
|
|
|
int ChangeNumber(int number);
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>:mode 0--<2D><>ͨʽ 1--<2D>ִ<EFBFBD>ʽ 2--<2D><><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
|
int ChangeShowMode(int mode);
|
|
|
|
|
|
int ChangeUnit(int unit);
|
|
|
|
|
|
int ChangeColor(int r, int g, int b);
|
|
|
|
|
|
int ChangeTextScale(double scale);
|
|
|
|
|
|
int ChangeAlign(int align);
|
|
|
|
|
|
int ChangeTextHeight(int height);
|
|
|
|
|
|
int ChangeTextWidth(int width);
|
|
|
|
|
|
int ChangeTextHeightAlone(int alone);
|
|
|
|
|
|
int ChangeCoordinate(double x, double y);
|
|
|
|
|
|
int Add();
|
|
|
|
|
|
int GetScale();
|
|
|
|
|
|
int GetData(ProportionData * data);
|
|
|
|
|
|
void SetParameter(ProportionData * data);
|
|
|
|
|
|
void InvalideOne();
|
|
|
|
|
|
private:
|
|
|
|
|
|
COLORREF m_color;
|
|
|
|
|
|
CProportion* m_pProportion;
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|