home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
INCLUDE
/
SEDDECL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-18
|
23KB
|
696 lines
/*
seddecl.h
% public header for sed object
written by stephen ng.
rewritten repeatedly by Joe DeSantis until ...
C-scape 3.2
Copyright (c) 1986-1989, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
11/13/86 sng Changed sed_GoEnd for new variable length fields.
11/15/86 jmd added sed_IsProtectedField() Macro.
11/18/86 jmd replaced sed_Up, Down, Left, and RightField()
11/25/86 jmd removed references to toggled_in_exit
11/25/86 jmd added sed label
12/08/86 jmd moved mdisplay into sed_struct
1/22/87 jmd added new borders.
3/09/87 jmd added xoffset to sed_struct.
3/28/87 jmd added cursor_state and active flag to sed_struct
9/01/87 jmd added NO_PROTO option
9/03/87 jmd moved color #define's to csutils1.h
9/14/87 jmd made sed_SetRecord a macro
9/23/87 jmd moved field_funcs definition
11/18/87 jmd changed names of some low-level funcs
4/05/88 jmd added special function to sed
4/08/88 jmd removed fieldcount from sed
4/10/88 jmd added field moves and deletes
4/11/88 jmd added scrollable fields (changed GetLastFieldCol)
4/30/88 jmd added menu scratch pad
5/09/88 jdc added parens to some macros
5/31/88 jmd added sed_DrawText
6/23/88 jmd converted generic pointers to VOID*
6/29/88 jmd added windows
7/07/88 jmd removed row and col
7/09/88 jmd added new borders
8/09/88 jmd revised to use new object stuff
8/12/88 jmd added explode flag
8/17/88 jmd changed explode flag to explode func
9/12/88 jmd added _arg macros
9/19/88 jmd added field name support
10/08/88 jmd added Flags for sed_Draw
10/19/88 jdc added sed bob
11/14/88 jmd added newest border scheme
sed_SetBorder is now a macro
11/15/88 jmd added prompt redirection, fixed sed_SetFieldName
11/19/88 jmd added mouse stuff
11/28/88 jmd reorganized headers
12/02/88 jmd added nextwin
12/08/88 jmd removed voffset, added sed_ReallyOpen
12/16/88 jmd added currfield, made some macros into functions
added sed_GetCurrFieldData
2/02/89 jdc added move_method typedef
2/08/89 jdc removed sed_MarkField() (now menu_MarkField())
3/24/89 jmd removed back attr, added Aux function
3/29/89 jmd converted seds to 'pure' objects
3/31/89 jmd added the sed_GetTextbuf() macro
4/06/89 jmd made ctype a cursortype, spc_func a boolean
4/11/89 jmd added single field paint optimization
4/13/89 jmd put field array into sed_xd as well
4/23/89 jdc added sedmou_Pulldown to mouhandler list
4/26/89 jmd added Aux support
4/29/89 jdc added attr support to sed_GetTB (now a macro)
5/10/89 gam added sed_Center
5/12/89 jmd changed bord_Open to win_SetBorder
5/23/89 jmd added sed_GetAncestor
5/29/89 jmd simplified paint flags
6/06/89 gam added aux_func "last" message
6/20/89 jmd fixed sed_UpdateFields macro, removed sed_Clear
6/22/89 jmd added set border feature
6/26/89 jmd changed mouse operation (again)
7/15/89 ted Converted '_func' prototypes from typedef to macro.
7/15/89 ted Changed disp_SetNextWin to win_SetNextWin.
8/06/89 ted Removed explode function stuff to window layer.
8/11/89 jmd Moved SD paint flags to win level and renamed
8/23/89 jmd Added cache flag
9/05/89 jmd Fixed bob_GetSed macro
11/27/89 ted Removed obsolete references to SEDBM_ & WINBOBM_ msgs.
12/10/89 jmd added new aux messages: SED_GO
12/12/89 jmd added field hiliting stuff, sed (object) name macros
12/17/89 jdc fixed SetFieldHiChar macro
12/21/89 jmd moved bob owner stuff up to OWL
1/04/90 jmd removed jump window
1/24/90 jmd added SED_GETVALUE message for future C-cell interaction
1/24/90 ted added sedmou_ClickField & sedmev_greedyclip prototypes.
2/03/90 jmd added new aux messages: SED_CLOSE
2/14/90 jdc played with aux functions some more
3/17/90 jmd added new aux messages: SED_PREFEXIT, SED_POSTFEXIT
3/28/90 jmd ansi-fied
4/23/90 jmd changed class to winclass
4/25/90 jmd moved generic data pointer to window object
5/08/90 jmd added underscores to func macros for vms compiler
7/29/90 jmd move aux to obj, made sed_DoAux a macro
8/04/90 jmd redefined aux messages
8/13/90 jmd added sed_IsFieldName
8/13/90 ted changed references from sed_SetMouseCode to kb_Stuff.
8/13/90 mla changed mcode to code in sed_SetMouseCode macro
8/24/90 mla removed proto for sd_setnamevar
added sed_SetNameVar, sed_SetNameVarValue, sed_SetVarValue
8/26/90 jdc removed the macro sed_SetNameVar!
10/18/90 jmd added SED_POSTFENTER message
*/
#define CSCAPE_3 /* The C-scape version number */
#define CSCAPE /* The C-scape product name */
typedef win_type sed_type;
/*** move_method ***/
#define move_func(fname) boolean fname(sed_type _sed, int _row, int _col)
typedef move_func ((*move_method));
/*** special funcs ***/
#define spc_func(fname) boolean fname(sed_type _sed, int _scancode)
typedef spc_func ((*spc_fptr));
/* The screen editor object xdata type. */
typedef struct _sedxd {
win_xd wd; /* win superclass xdata */
/** state information **/
int fieldno;
int fieldpos;
int yoffset;
int xoffset;
field_type currfield; /* the current field */
unsigned exit_toggle:1;
unsigned active:1;
unsigned cache:1;
/** cursor information **/
cursortype ctype; /* cursor type */
int row; /* cursor pos (teds) */
int col;
/** permanent information **/
menu_type menu;
xarray fa; /* the menu's field xarray */
/** window information **/
win_type prompt_win; /* window to which border prompts are sent */
/** paint flag **/
int paint_flag; /* paint optimize flag */
/** colors **/
byte reg; /* regular fields */
byte sel; /* selected fields */
byte hireg; /* highlighted regular fields */
byte hisel; /* highlighted selected fields */
/** misc. information **/
int baton; /* the baton */
int label; /* numeric label (for help) */
/* special function */
spc_fptr special;
/* ted cursor move method function */
move_method move;
} sed_xd;
#define sed_getxd(sed) ((sed_xd *) win_getxd(sed))
/* -------------------------------------------------------------------------- */
/*** sedwin object stuff ***/
extern class_func (sedwin_Class);
extern classinit_func (sedwin_MouseInit);
extern classinit_func (sedwin_LoadInit);
extern classinit_func (sedwin_SaveInit);
#define sedwin_ClassInit() sedwin_MouseInit()
/*** Sed Window messages ***/
#define SEDWM_LASTMSG (WINM_LASTMSG + 22)
/*** sed bob object stuff ***/
#define bob_GetSed(bob) (bob_IsSed(bob) ? (bob) : NULL)
#define sed_CreateBob(sed, flag) win_CreateBob(sed, flag)
#define sed_GetAncestor(sed) bob_GetAncestor(sed)
/*** values returned by field motion functions ***/
#define SED_MOVED 22
#define SED_STUCK 1
#define SED_INVALID 0
/*** baton values ***/
#define SED_FIRST -21
#define SED_ABORT -22
/*** sed Aux function messages ***/
#define SED_PRESENTER 1000
#define SED_POSTSENTER 1001
#define SED_PRESEXIT 1002
#define SED_POSTSEXIT 1003
#define SED_PREFENTER 1004
#define SED_PREFEXIT 1005
#define SED_POSTFEXIT 1006
#define SED_POSTFENTER 1007
/* for backwards compat */
#define SED_FEXIT SED_POSTFEXIT
#define SED_FENTER SED_PREFENTER
/*** mouse handlers ***/
/* SDMOUCKF.C */
extern mouhandler_func (sedmou_ClickField);
/* SDMOUCLK.C */
extern mouhandler_func (sedmou_Click);
/* SDMOUFRM.C */
extern mouhandler_func (sedmou_Framer);
/* SDMOUGCK.C */
extern mouhandler_func (sedmou_GreedyClick);
/* SDMOUGTK.C */
extern mouhandler_func (sedmou_GreedyTrack);
/* SDMOUPUL.C */
extern mouhandler_func (sedmou_Pulldown);
/* SDMOUTRK.C */
extern mouhandler_func (sedmou_Track);
/* SDMOUDRG.C */
extern mouhandler_func (sedmou_Drag);
/* SDMEVACC.C */
extern int sedmev_acceptoffer(sed_type sed, mev_struct *mev, boolean goanyway);
extern int sedmev_greedyclip(sed_type sed, mev_struct *mev);
/* -------------------------------------------------------------------------- */
/* Function prototypes */
/* SD1STFLD.C */
extern int sed_GotoFirstField(sed_type sed);
/* SDALLOC.C */
extern boolean sd_alloc(sed_type sed, boolean dobobs);
/* SDCENTER.C */
extern void sed_Center(sed_type sed);
/* SDCURS.C */
extern void sed_SetCursorType(sed_type sed, cursortype ctype);
extern cursortype sed_GetCursorType(sed_type sed);
/* SDDECCHR.C */
extern boolean sed_DecChar(sed_type sed);
/* SDDECFLD.C */
extern int sed_DecField(sed_type sed);
/* SDDELFLD.C */
extern void sed_DeleteField(sed_type sed, int fieldno);
/* SDDELROW.C */
extern void sed_DeleteRows(sed_type sed, int row, int count);
/* SDDISP.C */
extern void sed_Draw(sed_type sed, unsigned mode);
extern void sd_refresh_field(sed_type sed, int fieldno);
/* SDDSEXIT.C */
extern void sed_DoSexits(sed_type sed);
/* SDFINDF.C */
extern int sd_findfield(sed_type sed, ocbox *boxp, int pref, int prot);
/* SDGETBHW.C */
extern int sed_GetBorderHeight(sed_type sed);
extern int sed_GetBorderWidth(sed_type sed);
/* SDGETCLR.C */
extern void sed_GetColors(sed_type sed, byte *fore, byte *back, byte *high);
/* SDGETCOR.C */
extern void sed_GetCorners(sed_type sed, int *ul_row, int *ul_col, int *lr_row, int *lr_col);
extern void sed_GetBordCorners(sed_type sed, int *ul_row, int *ul_col, int *lr_row, int *lr_col);
/* SDGETFRC.C */
extern int sed_GetFieldRow(sed_type sed, int fieldno);
extern int sed_GetFieldCol(sed_type sed, int fieldno);
extern int sed_GetFieldLastCol(sed_type sed, int fieldno);
/* SDGETHW.C */
extern int sed_GetHeight(sed_type sed);
extern int sed_GetWidth(sed_type sed);
/* SDGETPOS.C */
extern void sed_GetPosition(sed_type sed, int *rowmin, int *colmin);
/* SDGETSIZ.C */
extern void sed_GetSize(sed_type sed, int *hgt, int *wid);
/* SDGETTB.C */
extern unsigned int _sed_gettb(sed_type sed, char *buf, unsigned buf_len, int mode, byte *attr);
/* SDGFLD.C */
extern int sed_MoveGField(sed_type sed, int direction);
/* SDGO.C */
extern void sed_DoFieldFenter(sed_type sed, int fld);
extern void sed_DoFieldFkey(sed_type sed, int fld);
extern boolean sed_DoFieldFexit(sed_type sed, int fld);
extern void sed_DoFieldSenter(sed_type sed, int fld);
extern void sed_DoFieldSexit(sed_type sed, int fld);
extern boolean sed_DoSpecial(sed_type sed, int key);
/* SDGOHOME.C */
extern void sed_GoHome(sed_type sed);
extern void sed_GoEnd(sed_type sed);
/* SDGRID.C */
extern int sed_GotoGridField(sed_type sed, int row, int col);
extern int sed_GetGridField(sed_type sed, int row, int col);
extern int sed_GetGridRow(sed_type sed, int fieldno);
/* SDGTFCLR.C */
extern void sed_GetFieldColors(sed_type sed, int fieldno, byte *reg, byte *sel);
/* SDGTOCHR.C */
extern void sed_GotoChar(sed_type sed, int fieldpos);
/* SDGTOFLD.C */
extern int sed_GotoField(sed_type sed, int fieldno);
/* SDINCCHR.C */
extern boolean sed_IncChar(sed_type sed);
/* SDINCFLD.C */
extern int sed_IncField(sed_type sed);
/* SDINSROW.C */
extern boolean sed_InsertRows(sed_type sed, int row, int count);
/* SDISFNAM.C */
extern boolean sed_IsFieldName(sed_type sed, int fieldno, char *name);
/* SDLSTFLD.C */
extern int sed_GotoLastField(sed_type sed);
/* SDMOVFLD.C */
extern void sed_MoveField(sed_type sed, int fieldno, int row, int col);
/* SDNAME.C */
extern int sed_GotoNameField(sed_type sed, char *name);
/* SDNAMVAR.C */
extern VOID *sed_GetNameVar(sed_type sed, char *name);
extern boolean sed_SetNameVar(sed_type sed, char *name, VOID *var);
extern boolean sed_SetNameVarValue(sed_type sed, char *name, VOID *var);
extern boolean sed_SetVarValue(sed_type sed, int fld, VOID *var);
/* SDOPEN.C */
extern sed_type sed_ReallyOpen(menu_type menu, class_fptr winclass);
extern boolean sed_Init(obj_type sed, menu_type menu);
extern void sed_RewindTB(sed_type sed);
extern field_type sed_GetField(sed_type sed, int fld);
/* SDOVRWRT.C */
extern char sed_Overwrite(sed_type sed, int scancode);
/* SDPGDN.C */
extern int sed_PageDown(sed_type sed);
/* SDPGLT.C */
extern int sed_PageLeft(sed_type sed);
/* SDPGRT.C */
extern int sed_PageRight(sed_type sed);
/* SDPGUP.C */
extern int sed_PageUp(sed_type sed);
/* SDPULLLT.C */
extern char sed_PullLeft(sed_type sed);
/* SDPULLRT.C */
extern char sed_PullRight(sed_type sed);
/* SDPUSHLT.C */
extern char sed_PushLeft(sed_type sed, int scancode);
/* SDPUSHRT.C */
extern char sed_PushRight(sed_type sed, int scancode);
/* SDRPTFLD.C */
extern void sed_RepaintField(sed_type sed, int fieldno);
/* SDSCRLDN.C */
extern int sed_ScrollDown(sed_type sed, int lines);
/* SDSCRLLT.C */
extern int sed_ScrollLeft(sed_type sed, int lines);
/* SDSCRLRT.C */
extern int sed_ScrollRight(sed_type sed, int lines);
/* SDSCRLUP.C */
extern int sed_ScrollUp(sed_type sed, int lines);
/* SDSETCLR.C */
extern void sed_SetColors(sed_type sed, byte reg, byte back, byte sel);
/* SDSETFW.C */
extern void sed_SetFieldWidth(sed_type sed, int fieldno, int width);
/* SDSETHGT.C */
extern void sed_SetHeight(sed_type sed, int height);
/* SDSETMOU.C */
extern void sed_SetMouse(sed_type sed, mouhandler_fptr mhandler);
/* SDSETTB.C */
extern boolean sed_SetTB(sed_type sed, char *text, unsigned len);
/* SDSETWID.C */
extern void sed_SetWidth(sed_type sed, int width);
/* SDSRCH.C */
extern int sed_SearchMerge(sed_type sed, char c);
/* SDWIN.C */
extern boolean bob_IsSed(bob_type bob);
/* SDXFLDS.C */
extern void sed_ExchangeFields(sed_type sed, int f1, int f2);
/* -------------------------------------------------------------------------- */
/* macros */
#define sed_Alloc(sed) sd_alloc(sed, TRUE)
#define sed_Go(sed) win_Go(sed)
#define sed_Close(sed) win_Close(sed)
#define sed_DoAux(sed, msg, indata, outdata) \
obj_DoAux(sed, msg, indata, outdata)
#define sed_SetAux(sed, aux) obj_SetAux(sed, aux)
#define sed_Open(menu) sed_ReallyOpen(menu, sedwin_Class)
#define sed_Top(sed) win_Top(sed)
#define sed_PutUnder(sed, over) win_PutUnder(sed, over)
#define sed_SetPosition(sed, row, col) bord_SetPosition(sed, row, col)
#define sed_GetWin(sed) (sed)
#define sed_SetNextWin(sed, win) win_SetNextWin(sed, win)
/* Note: sed_SetMouseCode is now obsolete. */
#define sed_SetMouseCode(sed, code) kb_Stuff(code)
/* sed_Push does nothing (for 2.0 users) */
#define sed_Push(sed)
#define sed_Pop(sed) win_UnEmploy(sed)
#define sed_GetTB(sed, buf, len, mode) \
_sed_gettb(sed, buf, len, mode, NULL)
#define sed_GetAttrTB(sed, buf, len, mode, attr) \
_sed_gettb(sed, buf, len, mode, attr)
#define sed_Repaint(sed) sed_Draw(sed, WPD_FIELDS | WPD_TEXT | WPD_BORDER | WPD_SENTER)
#define sed_Update(sed) sed_Draw(sed, WPD_FIELDS | WPD_TEXT | WPD_BORDER)
#define sed_RepaintFields(sed) sed_Draw(sed, WPD_FIELDS | WPD_SENTER)
#define sed_DoSenters(sed) sed_Draw(sed, WPD_SENTER)
#define sed_RepaintBorder(sed) sed_Draw(sed, WPD_BORDER)
#define sed_RepaintText(sed) sed_Draw(sed, WPD_TEXT)
#define sed_UpdateFields(sed) sed_Draw(sed, WPD_FIELDS)
#define sed_UpdateField(sed, fieldno) sd_refresh_field(sed, fieldno)
#define sed_UpdateCurrField(sed) sd_refresh_field(sed, sed_GetFieldNo(sed))
#define sed_SetShadow(sed, s) win_SetShadow(sed, s)
#define sed_SetShadowAttr(sed, a) win_SetShadowAttr(sed, a)
#define sed_UpField(sed) sed_MoveGField(sed, OAK_UP)
#define sed_DownField(sed) sed_MoveGField(sed, OAK_DOWN)
#define sed_RightField(sed) sed_MoveGField(sed, OAK_RIGHT)
#define sed_LeftField(sed) sed_MoveGField(sed, OAK_LEFT)
#define sed_SwapFields(sed, fn1, fn2) \
menu_SwapFields(sed_GetMenu(sed), (fn1), (fn2))
#define sed_ClearTB(sed) menu_ClearTB(sed_GetMenu(sed))
#define sed_SetData(sed, d) win_SetData(sed, d)
#define sed_GetData(sed) win_GetData(sed)
#define sed_ToggleExit(sed) ((sed_getxd(sed))->exit_toggle = TRUE)
#define sed_SetBaton(sed,c) ((sed_getxd(sed))->baton = (c))
#define sed_SetLabel(sed,n) ((sed_getxd(sed))->label = (n))
#define sed_SetSpecial(sed, fun) ((sed_getxd(sed))->special = (fun))
#define sd_setaux(sed, fun) ((sed_getxd(sed))->aux = (fun))
#define sed_SetExplode(sed, xfunc) win_SetExplode(sed, xfunc)
#define sed_GetBob(sed) (sed)
#define sed_GetYoffset(sed) ((sed_getxd(sed))->yoffset)
#define sed_GetXoffset(sed) ((sed_getxd(sed))->xoffset)
#define sed_IsActive(sed) ((sed_getxd(sed))->active == TRUE)
#define sed_GetActive(sed) ((sed_getxd(sed))->active)
#define sed_SetActive(sed, mode) ((sed_getxd(sed))->active = (mode))
#define sed_GetExit(sed) ((sed_getxd(sed))->exit_toggle)
#define sed_SetExit(sed, mode) ((sed_getxd(sed))->exit_toggle = (mode))
#define sed_GetScratchPad(sed) menu_GetScratchPad(sed_GetMenu(sed))
#define sed_GetScratchSize(sed) menu_GetScratchSize(sed_GetMenu(sed))
#define sed_GetRecordPos(sed) ((sed_getxd(sed))->fieldpos)
#define sed_GetFieldNo(sed) ((sed_getxd(sed))->fieldno)
#define sed_GetMenu(sed) ((sed_getxd(sed))->menu)
#define sed_GetFieldCount(sed) (menu_GetFieldCount(sed_GetMenu(sed)))
#define sed_GetTextbuf(sed) menu_GetTextbuf(sed_GetMenu(sed))
#define sed_GetBaton(sed) ((sed_getxd(sed))->baton)
#define sed_GetLabel(sed) ((sed_getxd(sed))->label)
#define sed_GetMenuHeight(sed) menu_GetHeight(sed_GetMenu(sed))
#define sed_GetMenuWidth(sed) menu_GetWidth(sed_GetMenu(sed))
/*** field macros ***/
#define sed_GetCurrField(sed) ((sed_getxd(sed))->currfield)
#define sed_SetRecord(sed, string, fieldno) \
field_SetString(sed_GetField(sed, fieldno), string)
#define sed_SetCurrRecord(sed, string) \
field_SetString(sed_GetCurrField(sed), (string))
#define sed_SetFieldData(sed, fieldno, datano, data) \
field_SetData(sed_GetField(sed, fieldno), datano, data)
#define sed_SetVar(sed, fieldno, var) \
field_SetVar(sed_GetField(sed, fieldno), var)
#define sed_SetFuncs(sed, fieldno, funcs) \
field_SetFuncs(sed_GetField(sed, fieldno), funcs)
#define sed_MarkField(sed, fldno, reg, sel) \
menu_MarkField(sed_GetMenu(sed), fldno, reg, sel)
#define sed_UnMarkField(sed, fieldno) \
field_SetMarked(sed_GetField(sed, fieldno), FALSE)
#define sed_ProtectField(sed, fieldno) \
field_SetProtected(sed_GetField(sed, fieldno), TRUE)
#define sed_UnProtectField(sed, fieldno) \
field_SetProtected(sed_GetField(sed, fieldno), FALSE)
#define sed_GetRecord(sed, fieldno) \
field_GetRecord(sed_GetField(sed, fieldno))
#define sed_GetMerge(sed, fieldno) \
field_GetMerge(sed_GetField(sed, fieldno))
#define sed_GetMergePos(sed) \
field_GetR2M(sed_GetCurrField(sed), sed_GetRecordPos(sed))
#define sed_GetCurrMerge(sed) field_GetMerge(sed_GetCurrField(sed))
#define sed_GetCurrRecord(sed) field_GetRecord(sed_GetCurrField(sed))
#define sed_GetCurrVar(sed) field_GetVar(sed_GetCurrField(sed))
#define sed_GetFuncs(sed, n) field_GetFuncs(sed_GetField(sed, n))
#define sed_GetVar(sed, n) field_GetVar(sed_GetField(sed, n))
#define sed_GetVarSize(sed, n) menu_GetVarSize(sed_GetMenu(sed), n)
#define sed_GetFieldData(sed, fieldno, datano) \
field_GetData(sed_GetField(sed, fieldno), datano)
#define sed_GetCurrFieldData(sed, datano) \
field_GetData(sed_GetCurrField(sed), datano)
#define sed_IsHome(sed) \
(field_PrevChar(sed_GetCurrField(sed), sed_GetRecordPos(sed)) == AT_END)
#define sed_IsEnd(sed) \
(field_NextChar(sed_GetCurrField(sed), sed_GetRecordPos(sed)) == AT_END)
#define sed_GetGridCol(sed, fieldno) \
field_GetGCol(sed_GetField(sed, fieldno))
#define sed_GetCurrChar(sed) \
(sed_GetCurrRecord(sed)[sed_GetRecordPos(sed)])
#define sed_GetChar(sed, pos) (sed_GetCurrRecord(sed)[pos])
#define sed_GetFieldChar(sed, fieldno, pos) (sed_GetRecord(sed, fieldno)[pos])
#define sed_IsProtectedField(sed, fieldno) \
field_GetProtected(sed_GetField(sed, fieldno))
#define sed_IsMarkedField(sed, fieldno) \
field_GetMarked(sed_GetField(sed, fieldno))
#define sed_GetFieldDataCount(sed, fieldno) \
field_GetDataCount(sed_GetField(sed, fieldno))
#define sed_GetRecordLen(sed, fieldno) \
field_GetRecordLen(sed_GetField(sed, fieldno))
#define sed_GetCurrRecordLen(sed) \
field_GetRecordLen(sed_GetCurrField(sed))
#define sed_GetMergeLen(sed, fieldno) \
field_GetMergeLen(sed_GetField(sed, fieldno))
#define sed_GetFieldWidth(sed, fieldno) \
field_GetWidth(sed_GetField(sed, fieldno))
#define sed_GetFieldXoffset(sed, fieldno) \
field_GetXoffset(sed_GetField(sed, fieldno))
#define sed_GetFieldBob(sed, fieldno) \
field_GetBob(sed_GetField(sed, fieldno))
#define sed_SetFieldBob(sed, fldno, bob) \
menu_SetFieldBob(sed_GetMenu(sed), fldno, bob)
/*** name macros ***/
#define sed_GetNameNo(sed, name) \
menu_GetNameNo(sed_GetMenu(sed), name)
#define sed_GetFieldName(sed, fieldno) \
menu_GetFieldName(sed_GetMenu(sed), fieldno)
#define sed_SetFieldName(sed, fld, name) \
menu_SetFieldName(sed_GetMenu(sed), fld, name)
/*** sed border macros ***/
#define sed_SetBorder(sed, func) win_SetBorder(sed, func)
#define sed_SendBorderMsg(sed, msg, indata, outdata) \
bord_SendMsg(sed, msg, indata, outdata)
#define sed_BorderPrompt(sed, prompt) \
bord_SendMsg((sed_getxd(sed))->prompt_win, BDM_PROMPT, (VOID *) prompt, NULL)
#define sed_SetBorderTitle(sed, title) \
bord_SendMsg(sed, BDM_SETTITLE, title, NULL)
#define sed_RedirectPrompt(oldsed, newsed) \
((sed_getxd(oldsed))->prompt_win = (newsed))
#define sed_SetBorderColor(sed, color) bord_SetAttr(sed, color)
#define sed_GetBorderColor(sed) bord_GetAttr(sed)
#define sed_GetBorderFunc(sed) win_GetBorderFunc(sed)
#define sed_BorderExists(sed) (win_GetBorderFunc(sed) != FNULL)
#define sed_SetBorderFeature(sed, f) bord_SetFeature(sed, f)
#define sed_FindField(sed, box, pref) sd_findfield(sed, box, pref, FALSE)
#define sed_SetHiColors(s, hreg, hsel) \
((sed_getxd(s))->hireg = (hreg), (sed_getxd(s))->hisel = (hsel))
#define sed_SetFieldHiChar(sed, fld, no) \
menu_SetHiChar(sed_GetMenu(sed), fld, no)
#define sed_GetHiSelAttr(sed) ((sed_getxd(sed))->hisel)
#define sed_GetHiRegAttr(sed) ((sed_getxd(sed))->hireg)
#define sed_GetName(sed) obj_GetName(sed)
#define sed_SetName(sed, n) obj_SetName(sed, n)
#define sed_Find(n) obj_Find(n)