Files
envi-code/SourceCode/Code2026/tg_shs/shs_blklib/GJKWorkspace.h
T

176 lines
6.1 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#if !defined(AFX_GJKWORKSPACE_H__32D32E41_E97D_42B5_B270_376DAE36DDEC__INCLUDED_)
2026-09-28 15:28:50 +08:00
#define AFX_GJKWORKSPACE_H__32D32E41_E97D_42B5_B270_376DAE36DDEC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// GJKWorkspace.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CGJKWorkspace dialog
#include "Resource.h"
#include "adui.h"
#include "acui.h"
#include "xySplitterWnd.h"
#include "XToolBarCtrl.h"
#include "SlideStatic.h"
#include "TKTreeCtrl.h"
#include "RenameDlg.h"
class CGJKWorkspace : public CAcUiDialog
{
// Construction
public:
CGJKWorkspace(CWnd* pParent = NULL); // standard constructor
CGJKWorkspace(const TCHAR* szTKWName, const TCHAR* szTKName, const TCHAR* szRecord,int nOpenMode,CWnd* pParent = NULL); // standard constructor
~CGJKWorkspace();
DECLARE_DYNAMIC(CGJKWorkspace)
// Dialog Data
//{{AFX_DATA(CGJKWorkspace)
enum { IDD = IDD_DLG_GJK };
CScrollBar m_vsBar;
CStatic m_ctrlDescription;
CSlideStatic m_ImageBox;
CGJKTreeCtrl m_treeCtrl;
CListCtrl m_listCtrl;
//}}AFX_DATA
BOOL InsertBlock(const TCHAR* szTKName, const TCHAR* szDrawing);
BOOL ReplaceBlk(const TCHAR* szTKName, const TCHAR* szDrawing);
BOOL ReplaceBlk1(const TCHAR* szTKName, const TCHAR* szDrawing);
//void SetWorkType(int iMode){m_iWorkType=iMode;}//add by whl
int AddImage2Dwb(const TCHAR* szTKName, const TCHAR* szDrawing, BOOL bIsRebuild = FALSE);
int AddImage2DwbForBlkRebuild(const TCHAR* szTKName,const TCHAR* szDrawing,BOOL bIsRebuild);
CString m_csCurTKWFile, m_csCurRecord;
CString m_csLastTKName, m_csLastType, m_csRet;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGJKWorkspace)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
CListCtrl* m_pDragList; //Which ListCtrl we are dragging FROM
CListCtrl* m_pDropList; //Which ListCtrl we are dropping ON
CImageList* m_pDragImage; //For creating and managing the drag-image
BOOL m_bDragging; //T during a drag operation
int m_nDragIndex; //Index of selected item in the List we are dragging FROM
int m_nDropIndex; //Index at which to drop item in the List we are dropping ON
CWnd* m_pDropWnd; //Pointer to window we are dropping on (will be cast to CListCtrl* type)
void DropItemOnList(CListCtrl* pDragList, CListCtrl* pDropList);
2026-10-04 00:04:20 +08:00
void AdjustImage(); //调整图片
BOOL ModifyDatabaseFile(); //修改文件数据
void OnSort(UINT nID); //排序
2026-09-28 15:28:50 +08:00
2026-10-04 00:04:20 +08:00
int m_nOpenMode; //打开方式 0: ARX命令 1:LISP命令
//int m_iWorkType;//0:正常,1:立剖门窗替换时控制点对齐方法add by whl
2026-09-28 15:28:50 +08:00
XToolBarCtrl m_ToolBar;
CySplitterWnd m_ySplitter;
CxSplitterWnd m_xSplitter;
CImageList m_imageList;
CImageList m_imageTree;
BOOL m_bEditLabel; //add by cwk on 060907
2026-10-04 00:04:20 +08:00
BOOL m_bInitSize; // 得到对话框尺寸
CSize m_sizeDlg; // 对话框尺寸
2026-09-28 15:28:50 +08:00
UINT m_nOldSizeX, m_nOldSizeY;
2026-10-04 00:04:20 +08:00
int m_nPageRow; // 行数
int m_nPageColumn; // 列数
2026-09-28 15:28:50 +08:00
BOOL m_bLock;
CMenu *m_pOpenMenu;
XStringList m_lstBlbNames;
//add by xlc on 080827
CMenu m_menu;
2026-10-04 00:04:20 +08:00
//动态添加图库菜单 add by xlc on 090728
2026-09-28 15:28:50 +08:00
CMenu m_cMenu;
void AddDynMenu(BOOL bCreate);
void OpenFileByMenu(CString csCommand);
2026-10-04 00:04:20 +08:00
void ResetSize(long nIncX, long nIncY); // 当对话框大小改变时
BOOL InitVSBar(); //初始化滚动条
void OnLayout(UINT nID); //图块布局
void InitToolBar(); //初始化工具条
void ResetImage(BOOL bReservePage = FALSE); //刷新幻灯显示
2026-09-28 15:28:50 +08:00
void HideDialog(BOOL Flag);
int RebuildSld(const TCHAR* szTKName);
BOOL IsInRect(UINT CtrlID, CPoint point);
void ResetListData();
BOOL IsLock();
void ResetStateText();
2026-10-04 00:04:20 +08:00
// 获得块尺寸
2026-09-28 15:28:50 +08:00
BOOL GetBlockSize(XString sBlockName, double &width, double &high);
public:
void SaveStatus();
void LoadStatus();
int GetOpenMode(){ return m_nOpenMode;}//add by cwk on 061128
// Generated message map functions
//{{AFX_MSG(CGJKWorkspace)
virtual BOOL OnInitDialog();
virtual void OnOK();
afx_msg void OnClose();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
afx_msg void OnItemchangedTkList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnClickTkList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnSelchangedTkTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnToolbarDropDown(NMHDR* pnmh, LRESULT* plRes);
afx_msg void OnEndlabeleditTkList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnBeginlabeleditTkList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnBlkRename();
afx_msg void OnBlkSort();
afx_msg void OnBlkDel();
afx_msg void OnBlkLayout();
afx_msg void OnTkPopupRenamekind();
afx_msg void OnTkPopupNew();
afx_msg void OnTkPopupDel();
afx_msg void OnBlkDelkind();
afx_msg void OnBlkPagedown();
afx_msg void OnBlkPageup();
afx_msg void OnBlkUpgrade();
afx_msg void OnBlkNewdwg();
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnBlkReplace();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnBlkRebuild();
//}}AFX_MSG
//add by xlc on 070906
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBegindragList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnRclickList(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelectOpeningLib();
afx_msg void OnSelectColLib();
afx_msg void OnSelectStairLib();
afx_msg void OnSelectBalLib();
afx_msg void OnSelectStepLib();
afx_msg void OnSelectSheetLib();
afx_msg void OnSelectOtherLib();
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GJKWORKSPACE_H__32D32E41_E97D_42B5_B270_376DAE36DDEC__INCLUDED_)