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

68 lines
1.9 KiB
C++

// TSheetEdJig.h: interface for the TSheetEdJig class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_TSHEETEDJIG_H__99D3D187_6247_4DE9_AEDD_9B3F6C42069C__INCLUDED_)
#define AFX_TSHEETEDJIG_H__99D3D187_6247_4DE9_AEDD_9B3F6C42069C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TipWnd.h"
#include <DbGridSheet.h>
class TELAPI TSheetEdJig : public AcEdJig
{
public:
TSheetEdJig();
virtual ~TSheetEdJig();
enum TSheetOper { kNone=0, kSingleRow=1, kMultCell=2, kSingleCell=3, kSingleCol=4};
int DoIt(int *pKeyIndex=NULL);
virtual DragStatus sampler();
virtual Adesk::Boolean update();
virtual AcDbEntity* entity() const;
int GetRetCode(int nRetCode, int *kewyIdx=NULL) const;
protected:
XString m_sPrompt; //提示信息
XString m_sKeyword;
TSheetEdJig::TSheetOper m_nOperCode;
XPoint m_ptInput;
int m_iOldToRow, m_iOldToCol;
// 中间结果
AcDbSolid m_entDraw;
// 结果和输入
AcDbObjectId m_idSheet;
CTipWnd *m_TextDlg;
BOOL m_bNeedPlus;
public:
// 结果
XPoint m_ptResult;
void UpdateRegion(XPoint ptTopLeft, double nWidth, double nHeight, double nAng);
AcDbObjectId GetHitColumn(int &nColFrom) const;
AcDbObjectId GetHitRow(int &nRowFrom) const;
BOOL GetHitCells(const TDbSheet *pSheet, int &nRowFrom, int &nColFrom, int &nRowTo, int &nColTo) const;
void SetPrompt(const TCHAR *s) {
m_sPrompt=s;
}
void SetKeyword(const TCHAR *k) {
m_sKeyword=k;
}
void SetOperCode(TSheetEdJig::TSheetOper nCode) {
m_nOperCode=nCode;
}
void SetPoint1(XPoint pt) {
m_ptInput=pt;
}
void SetSheetId(AcDbObjectId id) {
m_idSheet=id;
}
void SetNeedPlus(BOOL bNeedPlus) {
m_bNeedPlus=bNeedPlus;
}
};
#endif // !defined(AFX_TSHEETEDJIG_H__99D3D187_6247_4DE9_AEDD_9B3F6C42069C__INCLUDED_)