home *** CD-ROM | disk | FTP | other *** search
- #ifndef WINTEXT_H
- #define WINTEXT_H
- /*
- * wintext.h - version 0.1
- *
- * Header for font-independent window-text system, which allows
- * writing of text based on character positions.
- *
- * MWS 3/92.
- */
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
-
- #ifndef MIN
- #define MIN(a,b) ((a) > (b) ? (b) : (a))
- #endif
-
- typedef struct wintext {
- struct wintext *next; /* next WINTEXT */
- char *text; /* actual text to be rendered */
- UWORD lpos, tpos; /* character coordinates of 1st char in string */
- UWORD pen, mode; /* color and drawmode for text */
- UWORD columns; /* number of columns to render;
- /* -1 implies to edge of text window */
- } WINTEXT;
-
- typedef struct wintextinfo {
- struct Window *window; /* window this wintextinfo is for */
- struct TextAttr *tattr; /* screen's default font - we'll use this */
- char *spaces; /* string of spaces of size columns */
- UWORD rows, columns; /* size of text window */
- UWORD font_x, font_y; /* dimensions of default font */
- UWORD font_baseline; /* baseline of font */
- BYTE loffset, toffset, /* origin (in pixels) for text rendering */
- roffset, boffset; /* and right and bottom border widths */
- } WINTEXTINFO;
-
- BOOL InitWinTextInfo(WINTEXTINFO *, struct NewWindow *, UWORD rows, UWORD columns);
- void FinishWinText(WINTEXTINFO *);
- void WinText(WINTEXTINFO *, char *text, UWORD lpos, UWORD tpos, UWORD pen, UWORD mode);
- void RenderWinTexts(WINTEXTINFO *, WINTEXT *);
- void RenderWinTextsFmt(WINTEXTINFO *, WINTEXT *, char *, ...);
-
- #endif WINTEXT_H
-