home *** CD-ROM | disk | FTP | other *** search
- /*
- cmwinobj.h 3/15/88
-
- % Cmap window routines header.
- by Ted.
-
- OWL 1.2
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 8/09/88 jmd revised to use new object stuff
- 9/12/88 jmd Added in and out data to objects
- 4/22/89 ted Added bcwin class.
- 7/12/89 ted Converted '_func' prototypes from typedef to macro.
- 3/28/90 jmd ansi-fied
- 3/05/90 ted Added cmap resizing flag & macros.
- */
-
- #ifndef OAK_CMWINOBJ
- #define OAK_CMWINOBJ
-
- /* #include "winobj.h" - already included via odisp.h */
-
- /* -------------------------------------------------------------------------- */
-
- #define CMWINM_LASTMSG (WINM_LASTMSG)
-
- extern class_func (cmwin_Class);
- extern classinit_func (cmwin_MouseInit);
-
- typedef struct _cmwinxd {
- win_xd wd;
-
- /* Declared VOID * so everyone won't have to include cmapdecl.h */
- VOID *cmap;
-
- int rowoffs;
- int coloffs;
-
- boolean resize; /* Flag for automatic cmap resizing w/ win resize */
- } cmwin_xd;
-
- #define cmwin_getxd(win) ((cmwin_xd *) win_getxd(win))
-
- #define cmwin_GetRowoffs(win) (cmwin_getxd(win)->rowoffs)
- #define cmwin_SetRowoffs(win, row) (cmwin_getxd(win)->rowoffs = (row))
- #define cmwin_GetColoffs(win) (cmwin_getxd(win)->coloffs)
- #define cmwin_SetColoffs(win, col) (cmwin_getxd(win)->coloffs = (col))
- #define cmwin_GetResize(win) (cmwin_getxd(win)->resize)
- #define cmwin_SetResize(win, rsz) (cmwin_getxd(win)->resize = (rsz))
- /* -------------------------------------------------------------------------- */
-
- #define cmwin_DrawStringAttr(win, row, col, string, attrbuf, slen) \
- cmwin_dsa(win, row, col, string, attrbuf, 0, slen)
-
- #define cmwin_DrawString(win, row, col, string, attr, slen) \
- cmwin_dsa(win, row, col, string, NULL, attr, slen)
-
- /* -------------------------------------------------------------------------- */
- /*** Functions ***/
-
- /* CMWINDRA.C */
- extern int cmwin_GetStringAttr(win_type win, int row, int col, char *charbuf, byte *attrbuf, int maxlen);
- extern char *cmwin_dsa(win_type win, int row, int col, char *string, byte *attrbuf, byte attr, int slen);
- extern char *cmwin_DrawChar(win_type win, int row, int col, char c, byte attr);
- extern void cmwin_DrawBox(win_type win, char *boxcp, ocbox *cboxp, byte attr);
- extern void cmwin_DrawHzLine(win_type win, char *linecp, int row1, int col1, int length, byte attr);
- extern void cmwin_DrawVtLine(win_type win, char *linecp, int row1, int col1, int length, byte attr);
- extern void cmwin_ScrollBoxVt(win_type win, ocbox *cboxp, int n);
- extern void cmwin_ScrollBoxHz(win_type win, ocbox *cboxp, int n);
- extern void cmwin_ClearBox(win_type win, ocbox *cboxp, byte attr);
- extern void cmwin_Clear(win_type win, byte attr);
-
- /* CMWINTTY.C */
- extern void cmwin_PlotTTY(win_type win, char *string);
-
- /* -------------------------------------------------------------------------- */
- /* Blank char window class */
-
- #define BCWINM_LASTMSG (WINM_LASTMSG)
-
- extern class_func (bcwin_Class);
-
- typedef struct _bcwinxd {
- win_xd wd;
-
- char bchar;
- } bcwin_xd;
-
- #define bcwin_getxd(win) ((bcwin_xd *) win_getxd(win))
-
- #define bcwin_GetChar(win) (bcwin_getxd(win)->bchar)
- #define bcwin_SetChar(win, bc) (bcwin_getxd(win)->bchar = (bc))
- /* -------------------------------------------------------------------------- */
- #endif
-