|
|
1.1 root 1: #ifndef _BOX_HXX_
2: #define _BOX_HXX_
3:
4: #include "font.hxx"
5: #include "grid.hxx"
6:
7: //====== CTextField =============================
8: class CTextField
9: {
10: public:
11: CTextField(TCHAR *sz);
12: void Paint(CCanvas &canvas, int x, int y);
13: void GetExtent(CCanvas& canvas, SIZE *psize);
14: void SetFont(HFONT hfont);
15: UINT Hittest(CCanvas& canvas, POINT pt);
16: protected:
17: HFONT _font;
18: TCHAR *_sz;
19: };
20:
21: //====== CBoxFormat =============================
22: class CBoxFormat : public CBlockFormat
23: {
24: public:
25: CFont _fontAlias;
26: CFont _fontCtype;
27: CBoxFormat(SIZE sizeChar);
28: };
29:
30:
31: //====== CBox ===================================
32: class CBox
33: {
34: public:
35: CBox( CBoxFormat &bxf, UINT iChar, HFONT hfont ) ;
36: // CBox(CBoxFormat &bxf, UINT iChar);
37: //~CBox();
38: void Paint(CCanvas &canvas, POINT pt, RECT rc);
39: UINT Hittest(CCanvas &canvas, POINT pt);
40: SIZE& GetSize() { return _sizeBox; };
41: protected:
42: CCharBlock _Block;
43: SIZE _sizeBox;
44:
45: CFont _fontBlock;
46: CTextField _Alias;
47: UINT _iChar;
48: CBoxFormat &_bxf;
49: };
50:
51: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.