home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
INCLUDE
/
MENUPRIV.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-05-30
|
4KB
|
128 lines
/*
menupriv.h
% private header for menu object
C-scape 3.2
Copyright (c) 1986 - 1990, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
11/28/88 jmd reorganized headers
12/11/88 jmd changed FindUp args
12/14/88 jmd field_get is now menu_GetField
5/23/89 jdc made tb_setcursor menu_setcursor
3/28/90 jmd ansi-fied
4/05/90 jdc added fspec_isquotable macro
5/30/90 jdc made menu_InsRowTB a function (in menuirow.c)
*/
#define NO_WRITEABLES -1
#define NO_FIELDS -1
/* -------------------------------------------------------------------------- */
/* function prototypes */
/* MENU.C */
extern boolean menu_Ok(menu_type menu);
/* MENUUNPF.C */
extern char *menu_UnPrintf(menu_type menu, int fieldno, char *buf, int row, int col, int dflag);
/* MENUFIND.C */
extern int menu_FindUpField(menu_type menu, int fieldno);
extern int menu_FindDownField(menu_type menu, int fieldno);
extern int menu_FindLeftField(menu_type menu, int fieldno);
extern int menu_FindRightField(menu_type menu, int fieldno);
/* MENUAFTG.C */
extern boolean menu_AddFieldToGrid(menu_type menu, int fieldno, int row, int col);
/* MENUTFFG.C */
extern void menu_TakeFieldFromGrid(menu_type menu, int fieldno);
/* TBSTR.C */
extern int menu_strcpy(menu_type dmenu, int drow, int dcol, tb_type stb, int srow, int scol, long len, int mode);
extern long menu_strdel(menu_type menu, unsigned row, unsigned col, long len);
extern int menu_DelRowTB(menu_type menu, int row, int col);
/* MENUPUTB.C */
extern int menu_setcursor(menu_type menu);
/* MENUIROW.C */
extern boolean menu_InsRowTB(menu_type menu, int row, int col);
/* -------------------------------------------------------------------------- */
/* macros */
#define menu_SetFieldRegAttr(menu, fieldno, attr) \
field_SetRegAttr(menu_GetField(menu, fieldno), attr)
#define menu_SetFieldSelAttr(menu, fieldno, attr) \
field_SetSelAttr(menu_GetField(menu, fieldno), attr)
#define menu_SetFieldRight(menu, fieldno, right) \
field_SetRight(menu_GetField(menu, fieldno), right)
#define menu_SetFieldLeft(menu, fieldno, left) \
field_SetLeft(menu_GetField(menu, fieldno), left)
#define menu_SetFieldGCol(menu, fieldno, gcol) \
field_SetGCol(menu_GetField(menu, fieldno), gcol)
#define menu_IncFieldGCol(menu, fieldno) \
field_IncGCol(menu_GetField(menu, fieldno))
#define menu_SetFieldRow(menu, fieldno, r) \
field_SetRow(menu_GetField(menu, fieldno), r)
#define menu_SetFieldCol(menu, fieldno, c) \
field_SetCol(menu_GetField(menu, fieldno), c)
#define menu_DecFieldGCol(menu, fieldno) \
field_DecGCol(menu_GetField(menu, fieldno))
#define menu_SetFieldXoffset(menu, fieldno, x) \
field_SetXoffset(menu_GetField(menu, fieldno), x)
#define menu_SetFieldWidth(menu, fieldno, w) \
field_SetWidth(menu_GetField(menu, fieldno), w)
#define menu_SetVHeight(menu, h) ((menu)->vheight = (h))
#define menu_SetVWidth(menu, w) ((menu)->vwidth = (w))
#define menu_GetVHeight(menu) \
(((menu)->vheight < 0) ? menu_GetHeight(menu) : (menu)->vheight)
#define menu_GetVWidth(menu) \
(((menu)->vwidth < 0) ? menu_GetWidth(menu) : (menu)->vwidth)
#define menu_GetFa(menu) ((menu)->fa)
#define menu_Puts(menu, row, col, s, slen, color, old_c) \
menu_putTB((menu), (row), (col), (s), 0x00, (slen), (color), (old_c), TB_COLOR)
#define menu_Putc(menu, row, col, chr, slen, color, old_c) \
menu_putTB((menu), (row), (col), NULL, (chr), (slen), (color), (old_c), TB_COLOR)
#define menu_Adds(menu, row, col, s, slen) \
menu_putTB((menu), (row), (col), s, 0x00, (slen), 0x00, 0x00, TB_SAMECOLOR)
#define menu_Addc(menu, row, col, chr, slen) \
menu_putTB((menu), (row), (col), NULL, (chr), (slen), 0x00, 0x00, TB_SAMECOLOR)
/* bob macros */
#define menu_GetBobCount(menu) ((menu)->bobcount)
#define menu_GetBobFieldNo(menu, bobno) (ia_Get((menu)->boba, bobno))
#define menu_GetBob(menu, bobno) \
menu_GetFieldBob(menu, menu_GetBobFieldNo(menu, bobno))
/* macro to determine what to quote for menu_UnPrintf'ing */
#define fspec_isquotable(c) ((c) == '@' || (c) == ']' || (c) == '%')