00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __HTCURSES_H__
00022 #define __HTCURSES_H__
00023
00024 #include "config.h"
00025
00026 #include CURSES_HDR
00027 #undef clear
00028 #undef move
00029 #undef getstr
00030
00031 #include "htio.h"
00032 #include "common.h"
00033
00034 #define CHAR_LINEV ACS_VLINE
00035 #define CHAR_LINEH ACS_HLINE
00036 #define CHAR_LINEV_DBL ACS_VLINE
00037 #define CHAR_LINEH_DBL ACS_HLINE
00038 #define CHAR_BORDERTL ACS_LTEE
00039 #define CHAR_BORDERTR ACS_RTEE
00040 #define CHAR_BORDERTU ACS_TTEE
00041 #define CHAR_BORDERTD ACS_BTEE
00042 #define CHAR_BORDERTL_DBL ACS_LTEE
00043 #define CHAR_BORDERTR_DBL ACS_RTEE
00044 #define CHAR_BORDERTU_DBL ACS_TTEE
00045 #define CHAR_BORDERTD_DBL ACS_BTEE
00046 #define CHAR_CORNERUL ACS_ULCORNER
00047 #define CHAR_CORNERLL ACS_LLCORNER
00048 #define CHAR_CORNERUR ACS_URCORNER
00049 #define CHAR_CORNERLR ACS_LRCORNER
00050 #define CHAR_CORNERUL_DBL ACS_ULCORNER
00051 #define CHAR_CORNERLL_DBL ACS_LLCORNER
00052 #define CHAR_CORNERUR_DBL ACS_URCORNER
00053 #define CHAR_CORNERLR_DBL ACS_LRCORNER
00054 #define CHAR_FILLED_L ACS_CKBOARD
00055 #define CHAR_FILLED_M ACS_CKBOARD
00056 #define CHAR_FILLED_H ACS_CKBOARD
00057 #define CHAR_FILLED_F ACS_BLOCK
00058 #define CHAR_FILLED_HU '#'
00059 #define CHAR_FILLED_HL ' '
00060 #define CHAR_QUAD_SMALL 'x'
00061 #define CHAR_ARROW_UP ACS_UARROW
00062 #define CHAR_ARROW_DOWN ACS_DARROW
00063 #define CHAR_ARROWBIG_UP ACS_UARROW
00064 #define CHAR_ARROWBIG_DOWN ACS_DARROW
00065 #define CHAR_ARROWBIG_RIGHT '>'
00066 #define CHAR_ARROWBIG_LEFT '<'
00067 #define CHAR_RADIO ACS_BULLET
00068
00069 class screendrawbuf: public genericdrawbuf {
00070 public:
00071 screendrawbuf(char *title);
00072 ~screendrawbuf();
00073 virtual void b_fill(int x, int y, int w, int h, int c, int ch);
00074 virtual void b_printchar(int x, int y, int c, int ch);
00075 virtual int b_lprint(int x, int y, int c, int l, char *text);
00076 virtual int b_lprintw(int x, int y, int c, int l, int *text);
00077 virtual void b_resize(int rw, int rh);
00078 virtual void b_rmove(int rx, int ry);
00079 virtual void b_setbounds(bounds *b);
00080
00081 void drawbuffer(drawbuf *buf, int x, int y, bounds *clipping);
00082 void show();
00083 void getcursor(int *x, int *y);
00084 void hidecursor();
00085 void showcursor();
00086 void setcursor(int x, int y);
00087 void setcursormode(bool override);
00088 };
00089
00090 extern int xres, yres;
00091
00092 #endif
00093