#pragma once #include "resource.h" #include "afxcmn.h" #include "afxwin.h" #include "BtnST.h" #include "EarThwormDef.h" class CScrollHelper; class CEquipmentMakeDlg : public CDialog { DECLARE_DYNAMIC(CEquipmentMakeDlg) public: CEquipmentMakeDlg(AcDbObjectId id, CWnd* pParent = NULL); virtual ~CEquipmentMakeDlg(); void SetAdoDb(CUIISQLiteServer *pDb); enum { IDD = IDD_EQUIPMAKEDLG }; void ShowWEquipmentOnTree(); protected: virtual void DoDataExchange(CDataExchange* pDX); virtual BOOL OnInitDialog(); virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); afx_msg void OnBnClickedOk(); afx_msg void OnBnClickedCancle(); afx_msg void OnBnClickedBtneweqp(); afx_msg LONG_PTR onAcadKeepFocus( UINT_PTR, LONG_PTR); afx_msg void OnBnClickedButtonbox(); afx_msg void OnBnClickedButtoncln(); afx_msg void OnBnClickedButtoncone(); afx_msg void OnBnClickedButtonpyrm(); afx_msg void OnBnClickedButtonspere(); afx_msg void OnBnClickedButtondish(); afx_msg void OnBnClickedButtoncirtor(); afx_msg void OnBnClickedButtonrector(); afx_msg void OnBnClickedBtactiveinf(); afx_msg void OnBnClickedBtlocate(); afx_msg void OnBnClickedBtreset(); afx_msg void OnBnClickedBtapply(); afx_msg void OnBnClickedBtmodiprm(); afx_msg void OnBnClickedBtdelprm(); afx_msg void OnBnClickedBtapply2(); afx_msg void OnBnClickedBtreset2(); afx_msg void OnDestroy(); afx_msg void OnTvnSelchangedTreeequip(NMHDR *pNMHDR, LRESULT *pResult); afx_msg void OnBnClickedButtonscln(); afx_msg void OnBnClickedButtonextru(); afx_msg void OnBnClickedButtonrevo(); afx_msg void OnBnClickedBtundolocate(); afx_msg void OnBnClickedButtonreload(); afx_msg void OnBnClickedBtselasmove(); afx_msg void OnBnClickedBtselasalign(); afx_msg void OnStnClickedStaticsel(); afx_msg void OnStnClickedStaticagn(); afx_msg void OnBnClickedButtontydf(); afx_msg void OnBnClickedButtonhidearo(); afx_msg void OnBnClickedButtonaddnoz(); afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message); afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar); afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnBnClickedButtonmovex(); afx_msg void OnBnClickedButtonmovey(); afx_msg void OnBnClickedButtonmovez(); afx_msg void OnBnClickedButtonmovea(); afx_msg void OnBnClickedButtonrotx(); afx_msg void OnBnClickedButtonroty(); afx_msg void OnBnClickedButtonrotz(); afx_msg void OnBnClickedButtonrota(); afx_msg void OnBnClickedButtonsavefile(); afx_msg void OnBnClickedButtonuserdata(); afx_msg void OnBnClickedButtonopen(); afx_msg void OnBnClickedButtonpublic(); afx_msg void OnNMRclickTreeequip(NMHDR *pNMHDR, LRESULT *pResult); afx_msg void OnBnClickedBtshowx(); afx_msg void OnBnClickedBtshowy(); afx_msg void OnBnClickedBtshowz(); afx_msg void OnNMDblclkTreeequip(NMHDR *pNMHDR, LRESULT *pResult); afx_msg void OnBnClickedSavetodb(); afx_msg void OnBnClickedButtonRvt(); afx_msg void OnBnClickedButtonSweep(); afx_msg void OnBnClickedButtonLoft(); afx_msg void OnBnClickedBtshowx2(); afx_msg void OnBnClickedBtshowy2(); afx_msg void OnBnClickedBtshowz2(); afx_msg void OnClose(); afx_msg void OnBnClickedButtonMovePoint(); afx_msg void OnBnClickedButtonStart(); afx_msg void OnBnClickedButtonNext(); afx_msg void OnBnClickedButtonPrev(); afx_msg void OnBnClickedButtonEnd(); afx_msg void OnBnClickedButtonsave(); afx_msg LRESULT OnRefreshHlightEntityMsg(WPARAM, LPARAM); afx_msg void OnNMClickTreeequip(NMHDR *pNMHDR, LRESULT *pResult); afx_msg void OnBnClickedButtoncopy(); afx_msg void OnBnClickedButtonmirr(); afx_msg void OnBnClickedButtonins(); afx_msg void OnBnClickedButtonname(); DECLARE_MESSAGE_MAP() virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); public: struct compare_subent { bool operator () (const AcDbSubentId &id1, const AcDbSubentId &id2) const { return id1.index() < id2.index(); } }; protected: void modifyColor(); void Test(); void AddNozz(DWORD dwSubiD, AcGeVector3d& vtDir, AcGePoint3d& ptGe,AecEqui::XNozz* pNozzData, const int &clr); void DoPopularMenu(HTREEITEM hItem,CPoint point); BOOL SaveEquipFile(LPCTSTR pszFile); void Impmove(double dMove,int nPos,double dIMove = 0.0); AcDbObjectId GetEquIDByTree(); void enableWindows(bool bEnble, const std::set &exceptions); void enableMoveRotateUI(); void showEntity(bool bShow); void refreshHlightEntity(); bool getSelectItems(std::vector &items); bool PickHitPoint(DWORD dwSubiD, AcGeVector3d &vtMove, AcGeVector3d &vtDir); public: CButtonST m_wndBtBox; CButtonST m_wndBtCln; CButtonST m_wndBtCone; CButtonST m_wndBtPyrm; CButtonST m_wndBtSpere; CButtonST m_wndBtDish; CButtonST m_wndBtCirtor; CButtonST m_wndBtRector; CButtonST m_wndBtTydf; CButtonST m_wndBtExtru; CButtonST m_wndBtRevo; CButtonST m_wndBtSweep; CButtonST m_wndBtLoft; CButtonST m_wndBtRvt; CButtonST m_wndBtEqu; public: CString m_sName; CImageList m_ImageTreelist; CImageList m_ImageBtnlist; CTreeCtrl m_wndEquipPrmTree; double m_dXMove; double m_dYMove; double m_dZMove; double m_dXRot; double m_dYRot; double m_dZRot; double m_dIMove; double m_dIRot; DWORD m_dwIDSel; DWORD m_dwIDAgn; CButton m_wndBtShowX; CButton m_wndBtShowY; CButton m_wndBtShowZ; CButton m_wndBtShowX2; CButton m_wndBtShowY2; CButton m_wndBtShowZ2; CUIISQLiteServer *m_pDb; AcDbObjectId m_HligthtID; // 选择tree上的item时,高亮的临时实体 // 平面定位 AcDbObjectId m_idSolidTemp; std::map m_SolidSubentIds; AcArray m_SolidGeFaces; int m_iFaceIdx; // 几何体id缓存 std::set m_idBuffer; public: AcDbObjectId m_MainID; afx_msg void OnBnClickedButtonClose(); afx_msg void OnBnClickedButtonLoadDWG(); };