Files
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

112 lines
3.7 KiB
C++

#if !defined(AFX_DRAWLANDSCAPE_H__)
#define AFX_DRAWLANDSCAPE_H__
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Resource.h"
#include "afxwin.h"
#include "LandScapeStyle.h"
#include "GsPreviewCtrl.h"
// CDrawLandScape dialog
namespace
{
struct blockName//图块名
{
CString strOldName;//原始名字
CString strNewName;//调整的名字
};
}
class CDrawLandScapeDlg :public CModelessDialog
{
DECLARE_DYNAMIC(CDrawLandScapeDlg)
public:
CDrawLandScapeDlg(CWnd* pParent = NULL); // standard constructor
virtual ~CDrawLandScapeDlg();
// Dialog Data
enum { IDD = IDD_DLG_LANDSCAPE };
public:
void UpdatePreview(); //预览
double GetRoadWidth(); //获取路宽
double GetGap(); //获取间距
int GetWidthPercent(); //获取百分比
int GetDrawType(); //获取绘制类型
double GetUnitRealWidth(); //获取计算后的路宽
BOOL GetRoadLineState(); //获取是否绘制路边线
BOOL GetAutoAdjustState(); //获取是否自调
double GetBlockWidth(); //获取图块宽
double GetBlockLen(); //获取图块长
double GetRoadWidthMM();
BOOL GetIsUnitPercent(){return m_bIsUnitPercent;}
AcDbObjectId GetLandScapeId(); // 获得图块的ID
void layerInit(); //创建图层
BOOL IsBlockInCurDwg(AcDbObjectId& blockId);
BOOL AddTip(UINT idControl,const TCHAR *str);
virtual BOOL PreTranslateMessage(MSG* pMsg);
afx_msg BOOL OnToolTipText( UINT, NMHDR * pNMHDR, LRESULT * pResult );
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
afx_msg void OnBnClickedBtnSelectpath();
afx_msg void OnBnClickedBtnDynamicdraw();
afx_msg void OnStnClickedStaticShowpic();
afx_msg void OnBnClickedBtnRoadwidth();
afx_msg void OnBnClickedChkUnitwidthpercent();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnEnKillfocusEdtRoadwidth();
afx_msg void OnBnClickedChkDrawroadline();
afx_msg void OnBnClickedChkAutoAdjust();
afx_msg void OnEnKillfocusEdtUnitgap();
afx_msg void OnBnClickedChkAutoadjust();
afx_msg void OnEnKillfocusEdtUnitwidthpercent();
afx_msg void OnClose();
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP()
virtual BOOL OnInitDialog();
CString setFormatStyle(double dData);
CString blockNameAdjust(CString& stroldName);//图块名调整处理函数
void blocknameInit(std::vector<blockName>& name);//图块名vector初始化
void SetButtonCheck(int nbtnSerial);
void SetPicture();
BOOL JudgeBlockFile(); //判断图库是否存在
CToolTipCtrl m_wndToolTip;
protected:
double m_dUnitGap; //间距
double m_dRoadWidth; //路宽
double m_dRoadWidthMM; //路宽(毫米单位)
CString m_csRoadWidth;
double m_dUnitRealWidth; //单元路况百分比
static CString m_edtStyles; //样式名称
int m_edtPercent; //单元宽百分比
BOOL m_bRodaLine; //是否路边线
BOOL m_bAutoAdjust; //是否自调
BOOL m_bIsUnitPercent; //是否单元宽百分比
double m_dBlockWidth; //块长宽
double m_dBlockLen; //图块长
static CString m_strBlockName; //图块名 xx(YYYY)
static int m_iDrawType; //绘制类型
CEdit m_wndEdtRoadWidth; //路宽
CEdit m_wndEdtGap; //间距
public:
CGsPreviewCtrl m_PreviewCtrl; // 预览类
CImageDC m_imgPreview; // 幻灯片预览的DC
AcDbDatabase m_PreviewDb; // 预览数据库
static AcDbObjectId m_idLandScapeRoadStyle; // 图块的ID
static CDrawLandScapeDlg *g_pCurDlg;
BOOL m_bExit; //退出标识
};
#endif //AFX_DRAWLANDSCAPE_H__