Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

htcurses.h

Go to the documentation of this file.
00001 /* 
00002  *      HT Editor
00003  *      htcurses.h (DJGPP implementation)
00004  *
00005  *      Copyright (C) 1999-2002 Stefan Weyergraf (stefan@weyergraf.de)
00006  *
00007  *      This program is free software; you can redistribute it and/or modify
00008  *      it under the terms of the GNU General Public License version 2 as
00009  *      published by the Free Software Foundation.
00010  *
00011  *      This program is distributed in the hope that it will be useful,
00012  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *      GNU General Public License for more details.
00015  *
00016  *      You should have received a copy of the GNU General Public License
00017  *      along with this program; if not, write to the Free Software
00018  *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #ifndef __HTCURSES_H__
00022 #define __HTCURSES_H__
00023 
00024 #include "htio.h"
00025 #include "common.h"
00026 
00027 #define CHAR_LINEV (unsigned char)'\xb3'
00028 #define CHAR_LINEH (unsigned char)'\xc4'
00029 #define CHAR_LINEV_DBL (unsigned char)'\xba'
00030 #define CHAR_LINEH_DBL (unsigned char)'\xcd'
00031 #define CHAR_LINEH_BU (unsigned char)'\xdf'
00032 #define CHAR_LINEH_BL (unsigned char)'\xdc'
00033 #define CHAR_BORDERTL (unsigned char)'\xc3'
00034 #define CHAR_BORDERTR (unsigned char)'\xb4'
00035 #define CHAR_BORDERTU (unsigned char)'\xc2'
00036 #define CHAR_BORDERTD (unsigned char)'\xc1'
00037 #define CHAR_CORNERUL (unsigned char)'\xda'
00038 #define CHAR_CORNERLL (unsigned char)'\xc0'
00039 #define CHAR_CORNERUR (unsigned char)'\xbf'
00040 #define CHAR_CORNERLR (unsigned char)'\xd9'
00041 #define CHAR_CORNERUL_DBL (unsigned char)'\xc9'
00042 #define CHAR_CORNERLL_DBL (unsigned char)'\xc8'
00043 #define CHAR_CORNERUR_DBL (unsigned char)'\xbb'
00044 #define CHAR_CORNERLR_DBL (unsigned char)'\xbc'
00045 #define CHAR_FILLED_L (unsigned char)'\xb0'     /* FILLED, low density */
00046 #define CHAR_FILLED_M (unsigned char)'\xb1'     /* FILLED, medium density */
00047 #define CHAR_FILLED_H (unsigned char)'\xb2'  /* FILLED, high density */
00048 #define CHAR_FILLED_F (unsigned char)'\xdb'  /* FILLED, filled entirely */
00049 #define CHAR_FILLED_HU (unsigned char)'\xdf' /* FILLED, upper half - filled entirely */
00050 #define CHAR_FILLED_HL (unsigned char)'\xdc' /* FILLED, lower half - filled entirely */
00051 #define CHAR_QUAD_SMALL (unsigned char)'\xfe'
00052 #define CHAR_ARROW_UP (unsigned char)'\x18'
00053 #define CHAR_ARROW_DOWN (unsigned char)'\x19'
00054 #define CHAR_ARROWBIG_UP (unsigned char)'\x1e'
00055 #define CHAR_ARROWBIG_DOWN (unsigned char)'\x1f'
00056 #define CHAR_ARROWBIG_LEFT (unsigned char)'\x11'
00057 #define CHAR_ARROWBIG_RIGHT (unsigned char)'\x10'
00058 #define CHAR_RADIO      (unsigned char)'\x7'
00059 
00060 class screendrawbuf: public genericdrawbuf {
00061 protected:
00062         unsigned short *buf;
00063         int screensel;
00064         int cursorx, cursory;
00065         bool cursorhidden;
00066         bool cursoroverwrite;
00067 public:
00068         screendrawbuf(char *title);
00069         ~screendrawbuf();
00070         virtual void b_fill(int x, int y, int w, int h, int c, int ch);
00071         virtual void b_printchar(int x, int y, int c, int ch);
00072         virtual int b_lprint(int x, int y, int c, int l, char *text);
00073         virtual int b_lprintw(int x, int y, int c, int l, int *text);
00074         virtual void b_resize(int rw, int rh);
00075         virtual void b_rmove(int rx, int ry);
00076         virtual void b_setbounds(bounds *b);
00077 /* new */
00078         void drawbuffer(drawbuf *buf, int x, int y, bounds *clipping);
00079         void    show();
00080         void getcursor(int *x, int *y);
00081         void hidecursor();
00082         void showcursor();
00083         void setcursor(int x, int y);
00084         void setcursormode(bool override);
00085 };
00086 
00087 #endif /* !__HTCURSES_H__ */

Generated on Fri May 7 21:15:32 2004 by doxygen 1.3.5