📄 text.h
字号:
#ifndef _ENTITY_H_
#define _ENTITY_H_
#include "base.h"
#define MDATA 0x00
#define MTIME 0x01
#define MTEXT 0x02
#define MNO 0x03
#define MTIMEDATA 0x04
class CText: public CObject
{
public:
DECLARE_SERIAL(CText)
COLORREF m_color;
UINT m_linetype;
int m_linewidth;
CPoint m_begin;
UINT m_high;
UINT m_width;
UINT m_far;
CString m_text;
BOOL m_type;
LOGFONT m_lf;
int m_datatype;
int m_timetype;
public:
BOOL Pick(const CPoint& pos);
void GetBox(BOX2D* pBox);
CText();
CText(const CPoint& begin,UINT high,UINT width,UINT far,CString text,int type,LOGFONT lf);
~CText();
CPoint GetBeginPos();
CPoint GetEndPos();
int GetHigh();
CString GetText();
int GetFar();
int GetType();
int GetWidth();
void Init();
void Draw(CDC* pDC,int drawMode);
void Serialize(CArchive& ar);
};
/*
class CTextArray :public CObArray
{
DECLARE_SERIAL(CTextArray)
public:
CText m_text;
// CObArray m_cobarray;
public:
CPoint GetBeginPos();
CPoint GetEndPos();
int GetHigh();
CString GetText();
int GetFar();
int GetType();
int GetWidth();
// virtual CRuntimeClass* GetRuntimeClass( ) const;
// Construction
/* CTextArray();
// Attributes
int GetSize() const;
int GetUpperBound() const;
void SetSize(int nNewSize, int nGrowBy = -1);
// Operations
// Clean up
void FreeExtra();
void RemoveAll();
// Accessing elements
CObject* GetAt(int nIndex) const;
void SetAt(int nIndex, CObject* newElement);
CObject*& ElementAt(int nIndex);
// Direct Access to the element data (may return NULL)
const CObject** GetData() const;
CObject** GetData();
// Potentially growing the array
void SetAtGrow(int nIndex, CObject* newElement);
int Add(CObject* newElement);
int Append(const CObArray& src);
void Copy(const CObArray& src);
// overloaded operator helpers
CObject* operator[](int nIndex) const;
CObject*& operator[](int nIndex);
// Operations that move elements around
void InsertAt(int nIndex, CObject* newElement, int nCount = 1);
void RemoveAt(int nIndex, int nCount = 1);
void InsertAt(int nStartIndex, CObArray* pNewArray);
// Implementation
protected:
CObject** m_pData; // the actual array of data
int m_nSize; // # of elements (upperBound - 1)
int m_nMaxSize; // max allocated
int m_nGrowBy; // grow amount
public:
~CTextArray();
void Serialize(CArchive&);
};
*/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -