96 lines
2.4 KiB
C++
96 lines
2.4 KiB
C++
#include "dbjig.h"
|
|
#include "DbRect.h"
|
|
#include "NewUI.h"
|
|
#include "resource.h"
|
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//矩形对话框类
|
|
class CCubicSetDlg : public CUIDlg
|
|
{
|
|
protected:
|
|
bool bCreate;//当前状态是编辑还是创建.
|
|
bool bInit,bDlgClosing;//对话框状态,用于OnEdited()
|
|
public:
|
|
bool bEditChanged;
|
|
public:
|
|
CCubicSetDlg(bool bCreating=true); // standard constructor
|
|
BOOL Create();
|
|
~CCubicSetDlg();
|
|
void Init(TDbRect&rect,bool bOut=true);
|
|
void CreateToolBar();
|
|
bool IsInsertMode(){return makeMode==1;}
|
|
void UpdateMakeMode(int mode);
|
|
void ResetBaseType();
|
|
void UpdateSize(double l,double w);
|
|
bool IsContinue(){return bMore==TRUE;}
|
|
// Dialog Data
|
|
//{{AFX_DATA(CCubicSetDlg)
|
|
enum { IDD = IDD_CUBIC_SET };
|
|
//}}AFX_DATA
|
|
static BOOL b3D,bMore;
|
|
static int basePointType;//0~4//基点类型
|
|
static short makeMode;
|
|
static short crossMode;
|
|
static double elev;
|
|
static double length;
|
|
static double width;
|
|
static double height;
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CCubicSetDlg)
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
CToolBarCtrl m_toolbar;
|
|
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CCubicSetDlg)
|
|
|
|
afx_msg void OnLeftUp();
|
|
afx_msg void OnLeftDown();
|
|
afx_msg void OnRightUp();
|
|
afx_msg void OnRightDown();
|
|
afx_msg void OnCenter();
|
|
|
|
afx_msg void On3d();
|
|
afx_msg void OnNoCross();
|
|
afx_msg void OnCrossA();
|
|
afx_msg void OnCrossB();
|
|
afx_msg void OnCrossC();
|
|
afx_msg void OnMore();
|
|
afx_msg void OnDragMode();
|
|
afx_msg void OnInsertMode();
|
|
afx_msg void OnClose();
|
|
afx_msg void OnEdited();
|
|
virtual BOOL OnInitDialog();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
afx_msg BOOL OnToolTipText(UINT nID, NMHDR* pNMHDR, LRESULT* pResult);
|
|
};
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////
|
|
//矩形拖制类
|
|
class TRectJig:public AcEdJig
|
|
{
|
|
protected:
|
|
TDbRect*pRect;
|
|
int ptCount;
|
|
int nRetKey;
|
|
XPoint pt,oldPoint,distVector;
|
|
CCubicSetDlg *pDlg;
|
|
public:
|
|
TRectJig(CCubicSetDlg*pD);
|
|
|
|
void UpdateData(XPoint ptInsert);
|
|
int DoIt();
|
|
void MakeIt();
|
|
void SetStandardBaseType(int iType);//0,1,2,3,4,(左上,右上,右下,左下,中心)
|
|
|
|
//override
|
|
virtual DragStatus sampler();
|
|
virtual Adesk::Boolean update();
|
|
virtual AcDbEntity* entity() const;
|
|
};
|