160 lines
4.4 KiB
C++
160 lines
4.4 KiB
C++
#if !defined(AFX_SINGLEROWTEXT_H__BD962549_8A08_4345_A12E_C67079D7846F__INCLUDED_)
|
|
#define AFX_SINGLEROWTEXT_H__BD962549_8A08_4345_A12E_C67079D7846F__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// SingleRowText.h : header file
|
|
//
|
|
|
|
#include "CharToolbarDlg.h"
|
|
#include "afxwin.h"
|
|
#include "GsPreviewCtrl.h"
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CSingleRowText dialog
|
|
|
|
class CSingleRowText : public CCharToolbarDlg
|
|
{
|
|
// Construction
|
|
public:
|
|
DECLARE_DYNAMIC(CSingleRowText)
|
|
CSingleRowText(BOOL bEdit, CWnd* pParent = NULL); // standard constructor
|
|
|
|
// Dialog Data
|
|
//{{AFX_DATA(CSingleRowText)
|
|
enum { IDD = IDD_SINGLEROW_TEXT };
|
|
CComboBox m_comboAlign;
|
|
CComboBox m_comboHistory;
|
|
CComboBox m_comboStyleName;
|
|
|
|
// modify by xly on 101014 记录文字样式
|
|
//CString m_strFontStyle;
|
|
static CString m_strFontStyle;
|
|
BOOL m_bTextMask;
|
|
//}}AFX_DATA
|
|
static CString m_strHeight;
|
|
static CString m_strRotation;
|
|
|
|
XStringList m_lstStyle, m_lstHistory;
|
|
BOOL m_bEditObj;
|
|
bool m_bChangeCurTextStyle;
|
|
CEdit m_editInputText;
|
|
void LoadTextStyle();
|
|
virtual void Dlg2Obj(TDbText *pText);
|
|
virtual void Obj2Dlg(TDbText *pText);
|
|
void LoadHisText();
|
|
// Add by lcf on 2005-06-30
|
|
static BOOL m_bContinue;
|
|
BOOL m_bPost;
|
|
void GetTextHeight();
|
|
void GetTextAngle();
|
|
void AddToRecent();
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CSingleRowText)
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
virtual const TCHAR *GetHistoryFileName();
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CSingleRowText)
|
|
virtual BOOL OnInitDialog();
|
|
virtual void OnOK();
|
|
afx_msg void OnSelchangeComboHistoryText();
|
|
virtual void OnCancel();
|
|
afx_msg void OnSelchangeComboFongstyle();
|
|
afx_msg void OnButtonTextHeight();
|
|
afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
|
|
afx_msg void OnClose();
|
|
afx_msg void OnBnClickedButtonAngle();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
// Modify by lcf on 2005-06-30
|
|
////////////////////////////////////////////////////////
|
|
// CDrawingNameDlg
|
|
class CDrawingNameDlg : public CCharToolbarDlg
|
|
{
|
|
// Construction
|
|
public:
|
|
DECLARE_DYNAMIC(CDrawingNameDlg)
|
|
CDrawingNameDlg(BOOL bEdit, CWnd* pParent = NULL); // standard constructor
|
|
|
|
// Dialog Data
|
|
//{{AFX_DATA(CDrawingNameDlg)
|
|
enum { IDD = IDD_DRAWING_NAME, IDD1 = IDD_DRAWING_NAME1 };
|
|
CComboBox m_comboName;
|
|
CComboBox m_comboScale;
|
|
CComboBox m_comboStyleName1;
|
|
CComboBox m_comboStyleName2;
|
|
|
|
static CString m_csScaleText;
|
|
static CString m_strFontStyle1;
|
|
static CString m_strFontStyle2;
|
|
static CString m_strHeight1;
|
|
static CString m_strHeight2;
|
|
static int m_nStyle;
|
|
static BOOL m_bNoScale;
|
|
static BOOL m_bContinue;
|
|
//}}AFX_DATA
|
|
BOOL m_bPost;
|
|
bool m_bChangeCurTextStyle;
|
|
XStringList m_lstStyle, m_lstHistory;
|
|
|
|
double GetTextHeight2(){return _tstof(m_strHeight2);}//ok
|
|
void Dlg2Obj(TDbDrawingName* pDrawingName);
|
|
void Obj2Dlg(TDbDrawingName* pDrawingName);
|
|
void GetTextHeight();
|
|
void AddToRecent();
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CDrawingNameDlg)
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
virtual BOOL OnInitDialog();
|
|
virtual void OnOK();
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
public:
|
|
virtual BOOL DestroyWindow();
|
|
protected:
|
|
CGsPreviewCtrl mPreviewCtrl;
|
|
AcDbDatabase mPreviewDb;
|
|
bool bPreviewReady;
|
|
int m_nHeightType;
|
|
|
|
void UpdatePreview();
|
|
void Draw(AcDbBlockTableRecord*pSpace,AcGePoint3d¢er,double&length,double &width);
|
|
virtual const TCHAR *GetHistoryFileName();
|
|
void LoadHisText();
|
|
void LoadTextStyle();
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CDrawingNameDlg)
|
|
afx_msg void OnBnClickedUpdate();
|
|
afx_msg void OnCbnSelchangeComboHeight1();
|
|
afx_msg void OnCbnSelchangeComboHeight2();
|
|
afx_msg void OnButtonTextHeight1();
|
|
afx_msg void OnButtonTextHeight2();
|
|
|
|
afx_msg void OnCbnSelchangeNameList();
|
|
afx_msg void OnCbnSelchangeScaleList();
|
|
|
|
afx_msg void OnBnClickedNoScale();
|
|
afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
|
|
afx_msg void OnClose();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_SINGLEROWTEXT_H__BD962549_8A08_4345_A12E_C67079D7846F__INCLUDED_)
|