Files
envi-code/SourceCode/Code2026/tg_shs/shs_public/InsTextDlg.h
T
2026-09-28 15:28:50 +08:00

104 lines
2.8 KiB
C++

#if !defined(AFX_INSTEXTDLG_H__FA6B9462_8FCD_432C_9C0E_3663CF9EC4F1__INCLUDED_)
#define AFX_INSTEXTDLG_H__FA6B9462_8FCD_432C_9C0E_3663CF9EC4F1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// InsTextDlg.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CInsTextDlg dialog
#include "Resource.h"
//#include <ModelessDialog.h>
#include "EdJigEx.h"
#include "DbText.h"
class CInsTextDlg;
class TTextEdJig : public TSymbEdJig {
protected:
TDbText *m_pText;
AcDbText *m_pAcadText;
static XExplodeDraw::TextAlignment m_AlignList[];
public:
TTextEdJig(CInsTextDlg *dlg, XPoint pt);
TTextEdJig(BOOL bIsTg, XPoint pt, double nHeight, const TCHAR*szText, AcDbObjectId idStyle, double nRotation);
~TTextEdJig();
virtual int DoIt(int *pKeyIndex=NULL);
DragStatus GetPoint(XPoint &pt);
CInsTextDlg *m_pDlg;
BOOL m_bIsTgText;
XPoint m_ptRef, m_ptAcadAlign;
AcGeMatrix3d m_mat;
AcDbObjectId m_idStyle;
void SetWHScale(double nWHScale);
void SetAlign(AcDb::TextVertMode vertMode, AcDb::TextHorzMode horzMode);
void SetAlign(XExplodeDraw::TextAlignment Align);
void SetAlignPoint(XPoint ptAlignPoint);
protected:
virtual Adesk::Boolean update();
virtual AcDbEntity* entity() const;
};
class CInsTextDlg : public CModelessDialog
{
// Construction
public:
CInsTextDlg(CWnd* pParent = NULL); // standard constructor
DECLARE_DYNAMIC(CInsTextDlg)
// Dialog Data
//{{AFX_DATA(CInsTextDlg)
enum { IDD = IDD_INSERT_TEXT };
CEdit m_edit;
CComboBox m_comboStyle;
CComboBox m_comboHeight;
CListBox m_listContent;
CListBox m_listType;
CString m_csContent;
int m_iAlign;
CString m_csHeight;
int m_iStyle;
//}}AFX_DATA
static CString m_csSel;
static CString m_csType;
XStringList m_lstAll, m_lstType;
CString m_csTextStyle;
int m_iRunMode;
void SetTextStyle(const TCHAR* szStyle);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CInsTextDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CInsTextDlg)
// afx_msg LONG onAcadKeepFocus(UINT, LONG);
virtual BOOL OnInitDialog();
afx_msg void OnSelchangeListType();
afx_msg void OnSelchangeListContent();
afx_msg void OnClose();
afx_msg void OnChangeEditSel();
afx_msg void OnSelchangeComboTextstyle();
afx_msg void OnButtonAdd();
afx_msg void OnButtonDel();
afx_msg void OnButtonReplace();
afx_msg void OnButtonPick();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_INSTEXTDLG_H__FA6B9462_8FCD_432C_9C0E_3663CF9EC4F1__INCLUDED_)