1 // Text class
2 
3 #ifndef _text_
4 #define _text_
5 
6 #include "basic.h"
7 #include "Kfont.h"
8 
9 extern GC _igc;
10 extern Kfont* _kf;
11 
12 class text : public basic
13 {
14 public:
15   text(container* parent, long, char* = 0, Bool = True, int = 1, Bool = False);
16   int out(char* str, int x, int y);
17   void out(char*, int, int, int, int);
18   void out(char, char, char, int, int);
19   int text_width(char*);
20   int char_height();
21   int char_ascent();
kcwidth()22   int kcwidth() { return _kf->kcwidth(); }
ecwidth()23   int ecwidth() { return _kf->ecwidth(); }
igc()24   GC igc() { return _igc; }
25 };
26 
out(char * str,int x,int y)27 inline int text::out(char* str, int x, int y)
28 {
29   return _kf->out(this, str, x, y);
30 }
31 
out(char * str,int x,int y,int sx,int ex)32 inline void text::out(char* str, int x, int y, int sx, int ex)
33 {
34   _kf->out(this, str, x, y, sx, ex);
35 }
36 
out(char f,char m,char l,int x,int y)37 inline void text::out(char f, char m, char l, int x, int y)
38 {
39   _kf->out(this, f, m, l, x, y);
40 }
41 
text_width(char * str)42 inline int text::text_width(char* str)
43 {
44   return _kf->text_width(str);
45 }
46 
char_height()47 inline int text::char_height()
48 {
49   return _kf->char_height();
50 }
51 
char_ascent()52 inline int text::char_ascent()
53 {
54   return _kf->char_ascent();
55 }
56 
57 #endif // _text_
58