00001
00002
00003
00004
00005
00006 #ifdef USE_TILE
00007 #ifndef TILEREG_TEXT_H
00008 #define TILEREG_TEXT_H
00009
00010 #include "tilereg.h"
00011
00012 class TextRegion : public Region
00013 {
00014 public:
00015 TextRegion(FontWrapper *font);
00016 virtual ~TextRegion();
00017
00018 virtual void render();
00019 virtual void clear();
00020
00021
00022
00023
00024
00025 static int print_x;
00026 static int print_y;
00027 static int text_col;
00028
00029 static class TextRegion *text_mode;
00030
00031 static int cursor_flag;
00032 static class TextRegion *cursor_region;
00033 static int cursor_x;
00034 static int cursor_y;
00035
00036
00037 static void cgotoxy(int x, int y);
00038 static int wherex();
00039 static int wherey();
00040
00041 static void _setcursortype(int curstype);
00042 static void textbackground(int bg);
00043 static void textcolor(int col);
00044
00045
00046 void clear_to_end_of_line(void);
00047 void putch(unsigned char chr);
00048 void writeWChar(unsigned char *ch);
00049
00050 unsigned char *cbuf;
00051 unsigned char *abuf;
00052
00053 int cx_ofs;
00054 int cy_ofs;
00055
00056 void addstr(char *buffer);
00057 void addstr_aux(char *buffer, int len);
00058 void adjust_region(int *x1, int *x2, int y);
00059 void scroll();
00060
00061 protected:
00062 virtual void on_resize();
00063 FontWrapper *m_font;
00064 };
00065
00066 #endif
00067 #endif