![]() |
|
![]() |
procedure CopyScreen
(const FileName : array of char); stdcall;
exports CopyScreen name 'Display_CopyScreen';
procedure DefineKeyExitRange
(const startOfRange : char;
const endOfRange : char); stdcall;
exports DefineKeyExitRange name 'Display_DefineKeyExitRange';
procedure AutoClearField
(const enabled : boolean); stdcall;
exports AutoClearField name 'Display_AutoClearField';
//*
// AutoClearField - Automatically clear field, on new data entry.
//
//
// This procedure alters the default editing mode behavior for
// 'display/entry' type fields on SAGE forms. When 'AutoClearField'
// mode is disabled (the default SAGE mode), form 'display/entry' type
// fields operate in an 'overwrite' type mode. When the cursor
// enters a form field that contains existing data, the user may
// overwrite part of the field data, without affecting the remaining
// data. When the user exits the field, the current field data is
// accepted and processed by the form logic.
//
// When 'AutoClearField' mode is enabled, form 'display/entry' type
// fields operate in a 'clear and overwrite' type mode. When the cursor
// enters a form field, if a non SAGE function type key is pressed,
// the field is automatically cleared, and the typed character is
// displayed in the field. (SAGE function keys include such keys
// as 'rightArrow', 'leftArrow', etc.) If the user enters a SAGE
// function key (such as rightArrow) as the first key in the field,
// the field will not be cleared and will behave as if the
// 'AutoClearField' mode were disabled. Thus, to achive an
// 'overwrite' on existing field data (while 'AutoClearField' is
// enabled), the user may type a 'rightArrow', 'leftArrow' combination,
// before entering the new field data. (The leftArrow key is only
// required if you want to start editing in the first character position
// of the field.)
//
// CALLING SEQUENCE -
//
// AutoClearField (True)
//
// ENTRY -
//
// Enabled : boolean
// If Enabled = True, enable the 'AutoClearField' mode for form
// 'display/entry' type fields. Otherwise, disable the
// 'AutoClearField' mode.
//
procedure ChangeFormField
(const FormName : array of char;
const Relation : array of char;
const Field : array of char;
const entryType : integer;
const standardAppearance : integer;
const highlightAppearance : integer); overload; stdcall;
exports ChangeFormField (const FormName : array of char;
const Relation : array of char;
const Field : array of char;
const entryType : integer;
const standardAppearance : integer;
const highlightAppearance : integer) name 'Display_ChangeFormField';
//*
// ChangeFormField - Change attributes of a form field.
//
//
// This procedure allows the changing of the attributes of a field
// on the form for as long as the form appears in memory. Since
// the changed values are only true as long as the form is in
// memory, it should be used while already in a form or just prior
// to displaying a form. Otherwise, accessing other relations or
// displaying other forms may cause the form in question to be
// released from memory and thus revert back to the original form's
// definition.
//
// CALLING SEQUENCE -
//
// ChangeFormField (formName, relation, field, entryType,
// standardAppearance, highlightAppearance)
//
// ENTRY -
//
// formName : array of char
// Name of form which contains fields to change.
//
// relation : array of char
// Name of relation in which specified field resides
//
// field : array of char
// Name of field (repeat value in [] is optional) from
// the indicated relation.
//
// entryType : integer
// New value of field entry type -
// -1 = keep current entry type
// 0 = display only
// 1 = entry and display
// 2 = highlighted
//
// standardAppearance : integer
// New appearance for the field (0 .. 255) or (-1) if
// the current standard appearance should be used without
// change.
//
// highlightAppearance : integer
// New highlight appearance for the field (0 .. 255) or (-1) if
// the current highlight appearance should be used without
// change.
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure ChangeFormField
(const FormName : string;
const Relation : string;
const Field : string;
const entryType : integer;
const standardAppearance : integer;
const highlightAppearance : integer); overload; stdcall;
exports ChangeFormField (const FormName : string;
const Relation : string;
const Field : string;
const entryType : integer;
const standardAppearance : integer;
const highlightAppearance : integer) name 'Display_STRChangeFormField';
//*
// STRChangeFormField - See documentation of ChangeFormField.
//
procedure ClearColorScheme; stdcall; exports ClearColorScheme name 'Display_ClearColorScheme'; //* // ClearColorScheme - Clear the color scheme table. // // // This procedure clears the color scheme table of all entries. // For an explanation of this refer to the 'DefineColorScheme' // procedure. // // CALLING SEQUENCE - // // ClearColorScheme; //
procedure DefineColorScheme
(const schemeName : array of char;
const replacementColor : cardinal); stdcall;
exports DefineColorScheme name 'Display_DefineColorScheme';
//*
// DefineColorScheme - Change a named standard color on forms.
//
//
// This procedure causes the colors on forms to be displayed to be
// redefined. Any color on a form which is displayed after this
// procedure is executed and which corresponds to the original
// 'schemeName' color will be converted to the 'replacementColor'.
// To deactiviate this replacement process, execute the
// 'ClearColorScheme' procedure.
//
// The color characters are 8 bit entities with each bit
// having a meaning as follows:
//
// BIT MEANING (1=ON, 0=OFF)
// - -
// 0 Foreground blue
// 1 Foreground green
// 2 Foreground red
// 3 Foreground intensity (1=hi, 0=lo)
// 4 Background blue
// 5 Background green
// 6 Background red
// 7 Foreground blinking
//
// By using a combination of settings, various colors and effects
// may be generated. For example :
//
// COLOR BITS set char. #
// - -
// light red on black 2 3 12
// dark green on yellow 1 5 6 98
// yellow on black 1 2 3 14
// cyan on red 0 1 3 6 75
// magenta on black 0 2 3 13
// white on black 0 1 2 3 15
// black on white 4 5 6 112
//
// CALLING SEQUENCE -
//
// DefineColorScheme (schemeName, replacementColor)
//
// ENTRY -
//
// schemeName : array of char
// The standard scheme name which represents the color to
// be changed on the forms.
//
// replacementColor : cardinal
// The color to replace the 'schemeName' color wherever it
// appears on the form.
//
// EXIT -
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure DefineColorSwap
(const originalColor : cardinal;
const replacementColor : cardinal); stdcall;
exports DefineColorSwap name 'Display_DefineColorSwap';
//*
// DefineColorSwap - Define a color element of the standard color table.
//
//
// This procedure defines a color element of the standard color
// table which is used to redefine colors on forms to be displayed.
// Any 'originalColor' on a form which is displayed after this
// procedure is executed will be converted to the 'replacementColor'.
// To deactiviate this replacement process, execute this procedure
// with the same value for the 'originalColor' and the
// 'replacementColor'.
//
// The color characters are 8 bit entities with each bit
// having a meaning as follows:
//
// BIT MEANING (1=ON, 0=OFF)
// - -
// 0 Foreground blue
// 1 Foreground green
// 2 Foreground red
// 3 Foreground intensity (1=hi, 0=lo)
// 4 Background blue
// 5 Background green
// 6 Background red
// 7 Foreground blinking
//
// By using a combination of settings, various colors and effects
// may be generated. For example :
//
// COLOR BITS set char. #
// - -
// light red on black 2 3 12
// dark green on yellow 1 5 6 98
// yellow on black 1 2 3 14
// cyan on red 0 1 3 6 75
// magenta on black 0 2 3 13
// white on black 0 1 2 3 15
// black on white 4 5 6 112
//
// CALLING SEQUENCE -
//
// DefineColorSwap (originalColor, replacementColor)
//
// ENTRY -
//
// originalColor : cardinal
// The color to be replaced wherever it appears on the
// form.
//
// replacementColor : cardinal
// The color to replace the 'originalColor' wherever it
// appears on the form.
//
procedure DefineFormIntercept
(const InterceptProc : SageSpec.IProcType); stdcall;
exports DefineFormIntercept name 'Display_DefineFormIntercept';
//*
// DefineFormIntercept - Define procedure to intercept form input.
//
//
// This procedure allows the specification of a user supplied
// procedure to be executed during form input processing. This
// procedure is called during normal form processing within Sage
// during the time that a user keystroke is being awaited.
//
// The form intercept capability is deactivated by the
// 'RemoveFormIntercept' procedure in Sage.
//
// CALLING SEQUENCE -
//
// DefineFormIntercept (InterceptProc)
//
// ENTRY -
//
// InterceptProc : IProcType
// The name of the procedure to execute. This procedure
// has the following params -
//
// formName - array of char
// The name of the current form from which the user
// supplied procedure is called.
//
// priorKeyPressed - boolean
// This is the first time the procedure ('FormInt' in
// the example) was called since the user last pressed
// a key. If True, 'forcedKeyFunc' and 'forcedChar'
// will contain the definition of the user pressed
// key. This is intercepted before it is acted upon,
// and may, therefore, be changed if desired.
//
// formFunction - cardinal
// The function selected by the user (if 'priorKeyPressed'
// is True).
//
// formChar - char
// The character key pressed by the user which corresponds
// to 'forcedKeyFunc' (if 'priorKeyPressed' is True).
//
// Param Exit Values -
//
// inhibitIntercept - boolean
// Inhibit any calls to this procedure during the current
// session for this form.
//
// formFunction - cardinal
// Force a key function (see availble key functions listed
// for the 'Sage.DefineFunctionKey' procedure). (0=not
// used, or 1 .. n). The form will process this function
// just as if it were requested from the keyboard.
//
// formChar - char
// Force a character key pressed if the 'forcedKeyFunc'
// is not used. (asciix.nul = character not supplied)
// The form will process this character just as if it
// were received from the keyboard.
//
procedure DefineFormFieldEntryProc
(const FieldEntryProc : SageSpec.EProcType); stdcall;
exports DefineFormFieldEntryProc name 'Display_DefineFormFieldEntryProc';
//*
// DefineFormFieldEntryProc - Define procedure to be executed upon field entry.
//
//
// This procedure allows the definition of a procedure to be executed
// each time a new field on a form is entered.
//
// CALLING SEQUENCE -
//
// DefineFormFieldEntryProc (FieldEntryProc)
//
// ENTRY -
//
// EntryProc : EProcType
// The name of the procedure to execute.
//
// The param arguments are -
//
// relName - string
// The relation name for the field which the cursor
// has just entered.
//
// fldName - string
// The field name for the field on the form which the
// cursor has just entered.
//
procedure DefineFunctionKey
(const keyNumber : cardinal;
const c1Char : char;
const c2Char : char); stdcall;
exports DefineFunctionKey name 'Display_DefineFunctionKey';
//*
// DefineFunctionKey - Redefine a key used in the forms.
//
//
// This procedure allows the redefinition or assignment of a key to
// a form function. A function key may not be defined using an
// ASCII key including or above 32 (blank). It must therefore be
// defined as a special ASCII character (c1Char<=32, c2Char=0) or a special
// key which is a combination of two keys such as F1 (c1Char=0, c2Char>0).
// The following table gives an example of the C1Char and C2Char values for
// various keys.
//
// key name C1Char C2Char
// -------- ------- ------
// cr ASCIIX.cr ASCIIX.nul
// esc ASCIIX.esc ASCIIX.nul
// F1 ASCIIX.nul Chr (59)
// shift/F1 ASCIIX.nul Chr (84)
// ctrl/F1 ASCIIX.nul Chr (94)
// insert key ASCIIX.nul Chr (82)
//
// The following are the functions by number.
//
// 1 forward move cursor forward 1 position
// 2 backward move cursor back 1 position
// 3 up move cursor up 1 line
// 4 down move cursor down 1 line
// 5 tab tab to next field
// 6 backtab back tab to previous field
// 7 restore restore field to orginal value
// 8 helpexit exit to associated help form
// 9 home go to first field on form
// 10 exit leave form
// 11 clearall clear all fields on the form
// 12 clearfield clear field from cursor
// 13 bw flip black & white toggle
// 14 help help with keys
// 15 insert insert character
// 16 delete delete character
// 17 copyscreen copy screen file SCREEN.CPY
// 18 pagedown variable field page down
// 19 pageup variable field page up
// 20 helpabort abort help
// 21-30 exit1-exit10 special exit functions
// 31 firstpage variable field top page
// 32 lastpage variagle field bottom page
// 33 genhelpexit exit to general help form
// 34 fieldInfo form/record/field information
// 36 autoHelp auto help toggle
// 37 haltForms exit all stacked forms
// 38 userHelp invoke special user help
// 39 exitAndReset exit the form and reset to prior values
// 40 clearStart go to start of field and clear field
// 41-60 exit11-exit30 special exit functions
//
// CALLING SEQUENCE -
//
// DefineFunctionKey (keyNumber, c1Char, c2Char)
//
// ENTRY -
//
// keyNumber : cardinal
// Number of key function to redefine.
//
// c1Char : char
// The character used to define the specified function. If
// this is set to nul, then the second char (c2) is always
// set to non nul. Many of the IBM keys (such as the function
// keys) send a character pair when pressed, the first of
// which is a nul (ASCIIX.nul) character. If the first character
// is not nul, the second character (c2) doesn't matter.
//
// c2Char : char
// The second character of the pair if the first is nul.
//
procedure GetFunctionKey
(const keyNumber : cardinal;
var c1Char : char;
var c2Char : char); stdcall;
exports GetFunctionKey name 'Display_GetFunctionKey';
//*
// GetFunctionKey - Get the key for the function.
//
//
// This procedure gets the key value that is currently associated
// with a function. If both values are nul then the function does
// not currently have a key assigned to it. However some key values
// have the first character as nul so both characters must be checked
// to ensure that this is the case.
//
// See the DefineFunctionKey documentation for more information
// about function keys.
//
// CALLING SEQUENCE -
//
// GetFunctionKey (keyNumber, c1Char, c2Char)
//
// ENTRY -
//
// keyNumber : cardinal
// Number of key function to redefine.
//
// EXIT -
//
// c1Char : char
// The first character used to define the specified function.
// If this is set to nul, then the second char has to be checked
// to see if it is nul.
//
// c2Char : char
// The second character of the pair.
//
procedure DefineUserHelp
(const HelpProc : SageSpec.HProcType); stdcall;
exports DefineUserHelp name 'Display_DefineUserHelp';
//*
// DefineUserHelp - Define the user help procedure.
//
//
// This procedure provides for the definition of a user help
// procedure whenever the USERHELP function is invoked by
// the user in one of the following ways -
//
// 1) A help form with the reserved name, USERHELP, is
// defined and then encountered during form processing
// by the user.
//
// 2) The 'userHelp' function key (# 38) has been activated
// by the current program using 'Display.DefineFunctionKey'
// and the user presses the associated key.
//
// Any normal procedure calls may be made within this procedure
// (HelpProc) to display additional forms, operate on a data base,
// etc. When this procedure is terminated, the program control will
// return to the same form location from which the USERHELP was
// invoked just as if a normal help form were requested and
// terminated.
//
// The USERHELP option may be deactivated using the
// 'Display.RemoveUserHelp' procedure.
//
// CALLING SEQUENCE -
//
// DefineUserHelp (HelpProc)
//
// ENTRY -
//
// HelpProc : HProcType
// The procedure to be executed when USERHELP is invoked. The
// procedure has the following params -
//
// currentForm - array of char
// Name of the form from which the USERHELP was requested.
//
// currentRelation - array of char
// The relation associated with the field in which the
// was resident when USERHELP was requested.
//
// currentField - array of char
// The field in which the was resident when USERHELP
// was requested.
//
// fieldRepeat - cardinal
// The repeat number of the 'currentField' in which the
// cursor resides. If the field was not defined as a
// repeating field within the data dictionary (.DFL file),
// then this value will always be 1.
//
// occurrenceNumber - cardinal
// The occurrence number of this field on the form starting
// with the top-left most field. If this field only
// appears on the form once, this number will always be 1.
//
procedure DefineVariableArray
(const FormName : array of char;
const VPROC : SageSpec.VProcType;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : array of char;
const variableField : array of char); overload; stdcall;
exports DefineVariableArray (const FormName : array of char;
const VPROC : SageSpec.VProcType;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : array of char;
const variableField : array of char) name 'Display_DefineVariableArray';
//*
// DefineVariableArray - Define an array to drive a variable field form.
//
//
// This procedure allows the definition of an array to drive the
// variable fields of a form. This is useful if the form is a help
// form and can not be defined by calling the 'FormV' procedure.
// As many form/array pair ups may be made by successive calls to
// this procedure before 'FormV' is called. 'FormV' uses these
// definitions if any of the forms so defined are invoked. 'FormV'
// then releases all form/array pair definitions.
//
// CALLING SEQUENCE -
//
// DefineVariableArray (formName, vProc, recordSize, recordNum,
// variableRecord, variableField)
//
// ENTRY -
//
// formName : array of char
// Name of form.
//
// vProc : VProcType
// A procedure which returns the address of the data to be
// shown on the form. This procedure must be of the following
// general format -
//
// recordNumber - Number of first record needed to be displayed
// on the form
// recordTotal - Total number of records needed to be
// displayed
// dataLoc - Returned starting address of the requested
// record. The total size beginning at this
// address should be at least
// 'recordTotal' X 'recordSize'
//
// recordSize : cardinal
// The character size of each record in the fieldBuffer.
//
// recordNum : ModSys.INT32
// The number of records of size 'recordSize'.
//
// variableRecord : array of char
// The record part of the variable field definition.
//
// variableField : array of char
// The name of the field (s) on the form to have their
// contents varried by the contents of the fieldBuffer.
// This field must be a highlighed field.
//
// EXIT -
//
// Sage.SageError : cardinal
// Error status return
//
procedure DefineVariableArray
(const FormName : string;
const VPROC : SageSpec.VProcType;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : string;
const variableField : string); overload; stdcall;
exports DefineVariableArray (const FormName : string;
const VPROC : SageSpec.VProcType;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : string;
const variableField : string) name 'Display_STRDefineVariableArray';
//*
// STRDefineVariableArray - See documentation of DefineVariableArray.
//
procedure DefineWindowLoc
(const FormName : array of char;
const row : cardinal;
const col : cardinal); stdcall;
exports DefineWindowLoc name 'Display_DefineWindowLoc';
//*
// DefineWindowLoc - Reset the location of the form window.
//
//
// This procedure allows the relocation of a given form location on
// the screen. The form's height and width can not be changed from
// the original definition. If the new location will not allow
// enough space for the form, it's position is not redefined and a
// 27 error is returned. This procedure must be called just before
// the 'DisplayForm' procedure is called since it does not change
// the original form location on the schema file and dynamic
// loading is always occurring in the Sage system.
//
// CALLING SEQUENCE -
//
// DefineWindowLoc (FormName, row, coluerror)
//
// ENTRY -
//
// FormName : array of char
// Name of requested form.
//
// row : cardinal
// New row for the top row of the form.
//
// col : cardinal
// New column for the left column of the form.
//
// EXIT -
//
// error : cardinal
// Error status return (27 if it will not fit).
//
procedure DisableMouse; stdcall; exports DisableMouse name 'Display_DisableMouse'; //* // DisableMouse - Disable the mouse for use within SAGE. // // // This procedure disables an installed mouse for use within // SAGE. The mouse may be enabled when required using the // 'Display.EnableMouse' function. When disabled, the mouse does // not appear nor is usable within SAGE forms. //
procedure DisplayBackground
(const FormName : array of char;
const TheDefault : boolean); overload; stdcall;
exports DisplayBackground (const FormName : array of char;
const TheDefault : boolean) name 'Display_DisplayBackground';
//*
// DisplayBackground - Display a background form.
//
//
// This routine loads and displays a form on the screen. The
// routine does not wait for user input. The user must have
// created the form with the form editor and have opened the data
// base prior to this call. The user may optionally cause the
// record buffers associated with a form to be initialized to their
// default values.
//
// CALLING SEQUENCE -
//
// DisplayBackground (FormName, TheDefault)
//
// ENTRY -
//
// FormName : array of char
// The name of the form to be displayed.
//
// TheDefault : boolean
// A flag indicating whether the default values should
// be set in the record buffers associated with this
// form.
//
// EXIT -
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure DisplayBackground
(const FormName : string;
const TheDefault : boolean); overload; stdcall;
exports DisplayBackground (const FormName : string;
const TheDefault : boolean) name 'Display_STRDisplayBackground';
//*
// STRDisplayBackground - See documentation of DisplayBackground.
//
procedure DisplayBackgroundV
(const FormName : array of char;
const TheDefault : boolean;
var fieldBuffer : array of char;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : array of char;
const variableField : array of char); overload; stdcall;
exports DisplayBackgroundV (const FormName : array of char;
const TheDefault : boolean;
var fieldBuffer : array of char;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : array of char;
const variableField : array of char) name 'Display_DisplayBackgroundV';
//*
// DisplayBackgroundV - Display a form.
//
//
// This routine loads and displays a form on the screen. The user
// must have created the form with the form editor and have opened
// the data base prior to this call. The user may optionally cause
// the record buffers associated with a form to be initialized to
// their default values. This differs from the normal
// 'DisplayBackground' because of the defined variable field.
//
// This differfrom the 'DisplayFormV' procedure, since it only
// displays the form along with highlighted areas updated from the
// buffer and does not require user input before leaving.
//
// CALLING SEQUENCE -
//
// DisplayBackgroundV (FormName, TheDefault, fieldBuffer,
// recordSize, recordNum, variableRecord, variableField)
//
// ENTRY -
//
// FormName : array of char
// The name of the form to be displayed.
//
// TheDefault : boolean
// A flag indicating whether the default values should
// be set in the record buffers associated with this
// form.
//
// fieldBuffer : array of char
// Array containing the contents of the variable definition
// fields on the form.
//
// recordSize : cardinal
// The character size of each record in the fieldBuffer.
//
// recordNum : ModSys.INT32
// The number of records of size 'recordSize' in the
// 'fieldBuffer'.
//
// variableRecord : array of char
// The record part of the variable field definition.
//
// variableField : array of char
// The name of the field (s) on the form to have their
// contents varried by the contents of the fieldBuffer.
// This field must be a highlighed field.
//
// EXIT -
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure DisplayBackgroundV
(const FormName : string;
const TheDefault : boolean;
var fieldBuffer : array of char;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : string;
const variableField : string); overload; stdcall;
exports DisplayBackgroundV (const FormName : string;
const TheDefault : boolean;
var fieldBuffer : array of char;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : string;
const variableField : string) name 'Display_STRDisplayBackgroundV';
//*
// STRDisplayBackgroundV - See documentation of DisplayBackgroundV.
//
procedure DisplayError
(const errorNum : cardinal;
const Bell : boolean); stdcall;
exports DisplayError name 'Display_DisplayError';
//*
// DisplayError - Display a message.
//
//
// This routine loads and displays a message on the screen. The
// user may select whether the bell is rung prior to displaying the
// message and whether the message is to blink.
//
// CALLING SEQUENCE -
//
// DisplayError (errorNum, Bell)
//
// ENTRY -
//
// errorNum : cardinal
// The sage error message number (see Sage.SageError).
//
// Bell : boolean
// A flag indicating whether the bell is to be rung
// prior to the message.
//
procedure DisplayForm
(const FormName : array of char;
const Relation : array of char;
const Field : array of char;
const TheDefault : boolean); overload; stdcall;
exports DisplayForm (const FormName : array of char;
const Relation : array of char;
const Field : array of char;
const TheDefault : boolean) name 'Display_DisplayForm';
//*
// DisplayForm - Display a form.
//
//
// This routine loads and displays a form on the screen. The user
// must have created the form with the form editor and have opened
// the data base prior to this call. The user may optionally cause
// the record buffers associated with a form to be initialized to
// their default values.
//
// CALLING SEQUENCE -
//
// DisplayForm (FormName, Relation, Field, TheDefault)
//
// ENTRY -
//
// FormName : array of char
// The name of the form to be displayed.
//
// Relation : array of char
// The name of a relation on the form to position
// the cursor in. The default is the first relation
// and field on the form from top to bottom.
//
// Field : array of char
// The name of a field on the form to position the
// cursor in.
//
// TheDefault : boolean
// A flag indicating whether the default values should
// be set in the record buffers associated with this
// form.
//
// EXIT -
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure DisplayForm
(const FormName : string;
const Relation : string;
const Field : string;
const TheDefault : boolean); overload; stdcall;
exports DisplayForm (const FormName : string;
const Relation : string;
const Field : string;
const TheDefault : boolean) name 'Display_STRDisplayForm';
//*
// STRDisplayForm - See documentation of DisplayForm.
//
procedure DisplayFormV
(const FormName : array of char;
const Relation : array of char;
const Field : array of char;
const TheDefault : boolean;
var fieldBuffer : array of char;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : array of char;
const variableField : array of char); overload; stdcall;
exports DisplayFormV (const FormName : array of char;
const Relation : array of char;
const Field : array of char;
const TheDefault : boolean;
var fieldBuffer : array of char;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : array of char;
const variableField : array of char) name 'Display_DisplayFormV';
//*
// DisplayFormV - Display a form.
//
//
// This routine loads and displays a form on the screen. The user
// must have created the form with the form editor and have opened
// the data base prior to this call. The user may optionally cause
// the record buffers associated with a form to be initialized to
// their default values. This differs from the normal
// 'DisplayForm' because of the defined variable field.
//
// When the user is presented with a form with this option, the
// PgUp and PgDn keys are used to vary the contents of the
// highlighted fields defined by the 'variableRecord' and
// 'variableField' parameters. The data to fill the fields is taken
// from the 'fieldBuffer'.
//
// CALLING SEQUENCE -
//
// DisplayFormV (FormName, Relation, Field, TheDefault, fieldBuffer,
// recordSize, recordNum, variableRecord, variableField)
//
// ENTRY -
//
// FormName : array of char
// The name of the form to be displayed.
//
// Relation : array of char
// The name of a relation on the form to position
// the cursor in. The default is the first relation
// and field on the form from top to bottom.
//
// Field : array of char
// The name of a field on the form to position the
// cursor in.
//
// TheDefault : boolean
// A flag indicating whether the default values should
// be set in the record buffers associated with this
// form.
//
// fieldBuffer : array of char
// Array containing the contents of the variable definition
// fields on the form.
//
// recordSize : cardinal
// The character size of each record in the fieldBuffer.
//
// recordNum : ModSys.INT32
// The number of records of size 'recordSize' in the
// 'fieldBuffer'.
//
// variableRecord : array of char
// The record part of the variable field definition.
//
// variableField : array of char
// The name of the field (s) on the form to have their
// contents varried by the contents of the fieldBuffer.
// This field must be a highlighed field.
//
// EXIT -
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure DisplayFormV
(const FormName : string;
const Relation : string;
const Field : string;
const TheDefault : boolean;
var fieldBuffer : array of char;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : string;
const variableField : string); overload; stdcall;
exports DisplayFormV (const FormName : string;
const Relation : string;
const Field : string;
const TheDefault : boolean;
var fieldBuffer : array of char;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : string;
const variableField : string) name 'Display_STRDisplayFormV';
//*
// STRDisplayFormV - See documentation of DisplayFormV.
//
procedure DisplayFormVIP
(const FormName : array of char;
const Relation : array of char;
const Field : array of char;
const TheDefault : boolean;
const VPROC : SageSpec.VProcType;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : array of char;
const variableField : array of char); overload; stdcall;
exports DisplayFormVIP (const FormName : array of char;
const Relation : array of char;
const Field : array of char;
const TheDefault : boolean;
const VPROC : SageSpec.VProcType;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : array of char;
const variableField : array of char) name 'Display_DisplayFormVIP';
//*
// DisplayFormVIP - Display a form using variable input procedure.
//
//
// This routine loads and displays a form on the screen. The user
// must have created the form with the form editor and have opened
// the data base prior to this call. The user may optionally cause
// the record buffers associated with a form to be initialized to
// their default values. This differs from the normal
// 'DisplayForm' because of the defined variable field and the
// procedure which locates the data to be written to the screen.
//
// When the user is presented with a form with this option, the
// PgUp and PgDn keys are used to vary the contents of the
// highlighted fields defined by the 'variableRecord' and
// 'variableField' parameters. The data to fill the fields is
// determined by the user supplied 'vProc' procedure which returns
// an address of the data to be shown on the screen within the
// highlighted fields.
//
// CALLING SEQUENCE -
//
// DisplayFormVIP (FormName, Relation, Field, TheDefault, fieldBuffer,
// recordSize, recordNum, variableRecord, variableField)
//
// ENTRY -
//
// FormName : array of char
// The name of the form to be displayed.
//
// Relation : array of char
// The name of a relation on the form to position
// the cursor in. The default is the first relation
// and field on the form from top to bottom.
//
// Field : array of char
// The name of a field on the form to position the
// cursor in.
//
// TheDefault : boolean
// A flag indicating whether the default values should
// be set in the record buffers associated with this
// form.
//
// vProc : VProcType
// A procedure which returns the address of the data to be
// shown on the form. This procedure must be of the following
// general format -
//
// recordSize - cardinal
// The character size of each record in the fieldBuffer.
//
// recordNum - ModSys.INT32
// The number of records of size 'recordSize' in the
// 'fieldBuffer'.
//
// variableRecord - array of char
// The record part of the variable field definition.
//
// variableField - array of char
// The name of the field (s) on the form to have their
// contents varried by the contents of the fieldBuffer.
// This field must be a highlighed field.
//
// EXIT -
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure DisplayFormVIP
(const FormName : string;
const Relation : string;
const Field : string;
const TheDefault : boolean;
const VPROC : SageSpec.VProcType;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : string;
const variableField : string); overload; stdcall;
exports DisplayFormVIP (const FormName : string;
const Relation : string;
const Field : string;
const TheDefault : boolean;
const VPROC : SageSpec.VProcType;
const recordSize : cardinal;
const recordNum : ModSys.INT32;
const variableRecord : string;
const variableField : string) name 'Display_STRDisplayFormVIP';
//*
// STRDisplayFormVIP - See documentation of DisplayFormVIP.
//
procedure DisplayMessage
(const Message : array of char;
const Bell : boolean); overload; stdcall;
exports DisplayMessage (const Message : array of char;
const Bell : boolean) name 'Display_DisplayMessage';
//*
// DisplayMessage - Display a message.
//
//
// This routine loads and displays a message on the screen. The
// user may select whether the bell is rung prior to displaying the
// message and whether the message is to blink.
//
// CALLING SEQUENCE -
//
// DisplayMessage (Message, Bell)
//
// ENTRY -
//
// Message : array of char
// The message to be displayed.
//
// Bell : boolean
// A flag indicating whether the bell is to be rung
// prior to the message.
//
// EXIT -
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure DisplayMessage
(const Message : string;
const Bell : boolean); overload; stdcall;
exports DisplayMessage (const Message : string;
const Bell : boolean) name 'Display_STRDisplayMessage';
//*
// STRDisplayMessage - See documentation of DisplayMessage.
//
function EnableMouse
() : boolean; stdcall;
exports EnableMouse name 'Display_EnableMouse';
//*
// EnableMouse - Enable the use of the mouse in SAGE.
//
//
// This procedure enables the use of the mouse in SAGE forms.
// If the mouse has not been initialized, it is done
// at this point. If it has already been initialized, it makes
// it available within SAGE display procedures. To use a mouse
// within SAGE, a mouse driver must have already been installed
// during or after boot up of your system.
//
// The 'Display.DisableMouse' procedure deactivates the mouse for
// use within SAGE.
//
// CALLING SEQUENCE -
//
// m := EnableMouse ();
//
// EXIT -
//
// m : boolean
// The mouse was enabled (True), or a mouse and driver is
// not detected nor available (False);
//
procedure ForceFieldCheck
(const autoCheck : boolean); stdcall;
exports ForceFieldCheck name 'Display_ForceFieldCheck';
//*
// ForceFieldCheck - Force a check on form fields whether changed or not.
//
//
// This procedure causes the system to check the contents of every
// field on a form when leaving that field regardless of whether
// any changes have been made or not. The default when Sage is
// first entered is False (fields are only checked if a changed
// is made). This procedure is often useful for various functions
// involved using the 'DefineFieldCheck' procedure (s).
//
// CALLING SEQUENCE -
//
// ForceFieldCheck (autoCheck)
//
// ENTRY -
//
// autoCheck : boolean
// Check every field of a form when attempting to leave
// that field (True) or, check the contents of the field
// only if changes were made (False).
//
procedure ForcedHelpReturn
(const forceReturn : boolean); stdcall;
exports ForcedHelpReturn name 'Display_ForcedHelpReturn';
//*
// ForcedHelpReturn - Force exit key (s) to always return from help form.
//
//
// This procedure causes an exit key to always return from a
// current help form to the form which invoked it. The default for
// this is False. With this default, an exit key will instead
// invoke a further help form under the following conditions -
//
// 1) You are currently in a help form
// 2) You are currently in a highlighted field of that help form
// 3) A further help form is defined for the current field
//
// When all of these conditions are met, an exit key acts just like
// the help key. To override this, the ForcedHelpReturn procedure
// may be called setting the 'forcedReturn' to True.
//
// CALLING SEQUENCE -
//
// ForcedHelpReturn (forceReturn)
//
procedure FormFieldOverflow
(const overFlow : boolean); stdcall;
exports FormFieldOverflow name 'Display_FormFieldOverflow';
//*
// FormFieldOverflow - Turn field entry overflow ON or OFF.
//
//
// This procedure allow the turning ON or OFF the field entry
// overflow (default is ON). This is the property of a field on a
// form where the cursor will automatically be positioned at the
// beginning of the following field after the last character of the
// current field is typed in. If this is turned OFF, then the
// cursor remains at the last character position of the current
// field regardless of how many characters are typed into that
// position until one of the movement keys (arrow, tab, etc.) are
// pressed.
//
// CALLING SEQUENCE -
//
// FormFieldOverflow (overFlow)
//
// ENTRY -
//
// overFlow : boolean
// Overflow option ON (True) or OFF (False).
//
procedure GetColorMode
(var colorMode : cardinal); stdcall;
exports GetColorMode name 'Display_GetColorMode';
//*
// GetColorMode - Get the current color mode.
//
//
// This procedure retrieves the current color status.
// One of three status modes apply -
//
// 0 - Color
// 1 - Interpreted black and white (from the original color)
// 2 - Fixed black and white (fields white, background black)
//
// If using a monochrome adapter card, only options 1 and 2 are
// available.
//
// CALLING SEQUENCE -
//
// GetColorMode (colorMode)
//
// EXIT -
//
// colorMode : cardinal
// The current mode in which the system operates. (0 .. 2)
//
function KeyFunctionNumber
(const c1Char : char;
const c2Char : char) : cardinal; stdcall;
exports KeyFunctionNumber name 'Display_KeyFunctionNumber';
//*
// KeyFunctionNumber - Return the function number of keyboard characters.
//
//
// This procedure returns the defined function number of the
// given set of keyboard characters.
//
// CALLING SEQUENCE -
//
// n := KeyFunctionNumber (c1Char, c2Char)
//
// ENTRY -
//
// c1Char : char
// The first character used to define the specified function.
//
// c2Char : char
// The second character of the pair if the first is ASCIIX.nul.
//
// EXIT -
//
// n : cardinal
// function number associated with the given characters
// (0 = no function number found)
//
// 1 forward move cursor forward 1 position
// 2 backward move cursor back 1 position
// 3 up move cursor up 1 line
// 4 down move cursor down 1 line
// 5 tab tab to next field
// 6 backtab back tab to previous field
// 7 restore restore field to original value
// 8 helpexit exit to associated help form
// 9 home go to first field on form
// 10 exit leave form
// 11 clearall clear all fields on the form
// 12 clearfield clear field from cursor
// 13 bw flip black & white toggle
// 14 help help with keys
// 15 insert insert character
// 16 delete delete character
// 17 copyscreen copy screen file SCREEN.CPY
// 18 pagedown variable field page down
// 19 pageup variable field page up
// 20 helpabort abort help
// 21-30 exit1-exit10 special exit functions
// 31 firstpage variable field form - first page
// 32 lastpage variable field form - last page
// 33 genhelpexit exit to general help form
// 34 fieldInfo form/record/field information
// 36 autoHelp auto help toggle
// 37 haltForms exit all stacked forms
// 41-60 exit11-exit30 special exit functions
//
// EXAMPLE -
//
// functionNum : cardinal;
//
// begin
// functionNum := KeyFunctionNumber (ASCIIX.esc, ASCIIX.nul);
//
function LastExitChar
() : char; stdcall;
exports LastExitChar name 'Display_LastExitChar';
//*
// LastExitChar - Return the exit character last used to exit a form.
//
//
// This procedure returns the last exit character used to exit a
// form. The valid exit characters are defined by the exit
// character range of the current keyboard. If an exit character
// is used to terminate a form, then the 'Display.LastExitFunction'
// function value is irrelavant and will be returned as 0.
//
// CALLING SEQUENCE -
//
// c := LastExitChar ()
//
// EXIT -
//
// c : char
// The character used to exit the last form. This will be
// in the exit character range as defined in the current
// keyboard set. If an exit character was not used, this
// value will be returned as an ASCIIX.nul.
//
function LastExitFunction
() : cardinal; stdcall;
exports LastExitFunction name 'Display_LastExitFunction';
//*
// LastExitFunction - Return the function number last used to exit a form.
//
//
// This procedure returns the key number last used to exit a form.
// If the form was terminated with an exit char (see
// 'Display.LastExitChar'), then this function will return a 0.
//
// CALLING SEQUENCE -
//
// k := LastExitFunction ();
//
// EXIT -
//
// k : cardinal
// The function number of the key last used to exit a form.
// Of all the function keys possible in a form, the following
// may be used to exit -
//
// 10 . .. normal exit
// 21 . .. special exit 1
// 22 . .. special exit 2
// .
// .
// .
// 30 . .. special exit 10
// 41 . .. special exit 11
// 42 . .. special exit 12
// .
// .
// .
// 50 . .. special exit 30
//
procedure RefreshCheckScreen
(const refreshOn : boolean); stdcall;
exports RefreshCheckScreen name 'Display_RefreshCheckScreen';
//*
// RefreshCheckScreen - Refresh the fields after calling field check.
//
//
// This procedure allows the refresh flag to be set or reset. This
// flag causes the fields of the current form to be refreshed
// (displayed) after the user supplied defined field checking
// procedure is called.
//
// By default, the fields are refreshed.
//
// CALLING SEQUENCE -
//
// RefreshCheckScreen (refreshOn)
//
// ENTRY -
//
// refreshOn : boolean
// Refresh all of the fields after the user supplied field
// checking procedure is called (see DefineFieldCheck).
// Default condition is True.
//
procedure RemoveFormIntercept; stdcall; exports RemoveFormIntercept name 'Display_RemoveFormIntercept'; //* // RemoveFormIntercept - Remove the form intercept request. // // // This procedure remove the current form intercept procedure // execution defined by the 'DefineFormIntercept' procedure. This // is the default case. // // CALLING SEQUENCE - // // RemoveFormIntercept //
procedure RemoveUserHelp; stdcall; exports RemoveUserHelp name 'Display_RemoveUserHelp'; //* // RemoveUserHelp - Deactivate the USERHELP procedure. // // // This procedure deactiviates the USERHELP procedure defined using // 'Display.DefineUserHelp'. After this procedure is called, no // procedure will be called when the user invokes the USERHELP // option as described in the 'DefineUserHelp' procedure. // // CALLING SEQUENCE - // // RemoveUserHelp; //
procedure ResetForm
(const FormName : array of char); stdcall;
exports ResetForm name 'Display_ResetForm';
//*
// ResetForm - Reloads the indicated form from the schema file.
//
//
// This procedure resets the indicated form by reading in the
// original definition from the .DFL file.
//
// CALLING SEQUENCE -
//
// ResetForm (formName);
//
// ENTRY -
//
// formName : array OR char
// Name of form to be reset.
//
procedure RestoreKeyDefinitions
(const keyTable : SageSpec.KeyboardDef); stdcall;
exports RestoreKeyDefinitions name 'Display_RestoreKeyDefinitions';
//*
// RestoreKeyDefinitions - Restore a saved keyboard definition.
//
//
// This procedure restores saved keyboard definition settings
// which have been saved using the 'SaveKeyDefinitions'.
//
// CALLING SEQUENCE -
//
// RestoreKeyDefinitions (keyTable);
//
// ENTRY -
//
// keyTable : SageSpec.KeyboardDef
// The table of keyboard definitions (see the
// description of the Display.SaveKeyDefinitions
// procedure).
//
// EXAMPLE -
//
// IMPORT Display;
//
// var
//
// keys : SageSpec.KeyboardDef;
// begin
// SaveKeyDefinitions (keys);
// RestoreKeyDefinitions (keys);
//
procedure RestoreScreen
(const screenNumber : cardinal); stdcall;
exports RestoreScreen name 'Display_RestoreScreen';
//*
// RestoreScreen - Restore a saved screen.
//
//
// This procedure restores a screen which was previously saved and
// referenced by an assigned number using 'SaveScreen'. If the
// aging scheme for Sage has caused the requested screen to be
// released, it can not be restored. (note the explanation for the
// 'SaveScreen' procedure)
//
// CALLING SEQUENCE -
//
// RestoreScreen (screenNumber)
//
// ENTRY -
//
// screenNumber : cardinal
// Number of screen to restore.
//
procedure SaveKeyDefinitions
(var keyTable : SageSpec.KeyboardDef); stdcall;
exports SaveKeyDefinitions name 'Display_SaveKeyDefinitions';
//*
// SaveKeyDefinitions - Save the current keyboard definition.
//
//
// This procedure saves the current keyboard definition settings
// for possible restoration using the 'restoreKeyDefinitions'
// procedure.
//
// CALLING SEQUENCE -
//
// SaveKeyDefinitions (keyTable);
//
// EXIT -
//
// keyTable : SageSpec.KeyboardDef
// The current table of keyboard definitions (see the
// description of the Display.DefineFunctionKey
// procedure).
//
// EXAMPLE -
//
// IMPORT Display;
//
// var
//
// keys : SageSpec.KeyboardDef;
// begin
// SaveKeyDefinitions (keys);
// RestoreKeyDefinitions (keys);
//
procedure SaveScreen
(const screenNumber : cardinal); stdcall;
exports SaveScreen name 'Display_SaveScreen';
//*
// SaveScreen - Save the current screen.
//
//
// This procedure saves the contents of the currently displayed screen
// and references it by the assigned number. This screen may be
// restored later using the 'RestoreScreen' function. Multiple
// screens may be saved for later retrieval.
//
// A screen may be stored in one of two ways. If the 'screenNumber'
// is less than 100, then the screen may be aged out as are the normal
// forms. For this reason, the aging scheme for forms may cause
// screens to be released from memory if the number of forms called
// upon to be displayed after the 'SaveScreen' execution reaches the
// number defined as a maximum when 'OpenSystem' (the 'MaxScreens'
// argument) was first called. After a saved screen is aged and
// released from memory, it can no longer be restored using
// 'RestoreScreen'.
//
// If the 'screenNumber' if greater than or equal to 100, then the
// screen is saved until it is restored. This takes up one form
// space for each screen saved. To successfully display a form, at
// least one form space must be left after this kind of permanent
// screen saving.
//
// CALLING SEQUENCE -
//
// SaveScreen (screenNumber)
//
// ENTRY -
//
// screenNumber : cardinal
// Number to assign to the saved screen. If this number is
// 1 .. 99, then the screen may be aged out if too many
// forms are displayed before the 'RestoreScreen' is
// called. If the number is 100 .. n, then the screen will
// persist until 'RestoreScreen' is called.
//
procedure ScrollEnumerationList
(const scrollOptionOn : boolean); stdcall;
exports ScrollEnumerationList name 'Display_ScrollEnumerationList';
//*
// ScrollEnumerationList - Allow the up and down functions to scroll list.
//
//
// This option allows the user to scroll through the values
// of the enumeration list if in an entry field for an
// enumerated field by using the up and down functions (3 and
// 4) which are normally the up and down arrow keys.
//
// By default, this function is set to False (arrow keys do
// not scroll through the enumeration list).
//
// CALLING SEQUENCE -
//
// ScrollEnumerationList (scrollOptionOn)
//
// ENTRY -
//
// scrollOptionOn : boolean
// The up and down keys scroll through the enumeration list
// (True).
//
procedure ScrollForm
(const outerForm : array of char;
const innerEntry : array of char;
const innerDisplay : array of char;
var cursorPos : ModSys.INT32;
const TotalRecords : ModSys.INT32;
const RecordToForm : LodProc;
const FormToRecord : ULodProc); overload; stdcall;
exports ScrollForm (const outerForm : array of char;
const innerEntry : array of char;
const innerDisplay : array of char;
var cursorPos : ModSys.INT32;
const TotalRecords : ModSys.INT32;
const RecordToForm : LodProc;
const FormToRecord : ULodProc) name 'Display_ScrollForm';
//*
// ScrollForm - Variable scroll of multiple entry forms.
//
//
// This procedure displays and allows scrolling through multiple
// copies of an entry form. Two forms are requested. The outer
// form is shown as a background form. The inner form is repeated
// from 1 .. n times depending upon the invisible space defined in
// the outer form. Both an inner form into which data is entered
// and an inner form that is displayed may be provided by the user.
// This allows the current form (of the 1 .. n total inner forms) to
// be given a different appearance and more and/or different
// fields.
//
// If enough width is allowed for more than one column, it is used.
// As noted, the outer form should have invisible space defined
// within it to designate where the inner form is scrolled. This
// need not be contiguous space, but each invisible area must be at
// least large enough to contain an inner form.
//
// This procedure uses special exits 22 .. 30 (key functions 52 .. 60)
// for its processes. Any other exits may be defined using
// 'DefineFunctionKey' before 'ScrollForm' is executed. ANY KEYBOARD
// SETTINGS WHICH WERE DEFINED BEFORE ENTRANCE INTO 'ScrollForm' WILL
// STILL BE DEFINED UPON LEAVING THIS procedure.
//
// The up and down arrow keys are redefined within 'ScrollForm' to act
// in a special way. In normal operation, they will cause the cursor
// to move from one field to another within the same entry form IF
// THE FIELDS LINE UP OVER EACH OTHER. Otherwise, these arrow keys
// will move the cursor from one entry form to the other. This will
// also be the case if the cursor is resident in a field at the bottom
// of the entry form and the down arrow is pressed, or the reverse
// condition is true for the up arrow. There are two special exit
// functions (special exits 25 and 26 corresponding to functions 55 and
// 56) which always cause the cursor to move between entry forms when
// pressed. These are not normally defined, but may be predefined by
// the user. If defined with the up and down arrows (against function
// 55 and 56 respectively), then this type of up and down movement will
// override the normal operation of the up and down arrows as previously
// described.
//
// Special Exits used by ScrollForm
//
// Number Name Des
// ------------ ----------- ----------------------------
// 52 exit22 Optionally user defined - search key
// 53 exit23 Predefined motion
// 54 exit24 Predefined motion
// 55 exit25 Optionally user defined - up 1 form
// 56 exit26 Optionally user defined - down 1 form
// 57 exit27 Predefined motion
// 58 exit28 Predefined motion
// 59 exit29 Predefined motion
// 60 exit29 Predefined motion
//
// CALLING SEQUENCE -
//
// ScrollForm (outerForm, innerEntry, innerDisplay, cursorPos,
// totalRecords, RecordToForm, FormToRecord,
// SearchRecords);
//
// ENTRY -
//
// outerForm : array of char
// The name of the form which defines the outer mask for
// the display.
//
// innerEntry : array of char
// The name of the form in which the cursor will reside
// for data entry purposes. This form should have the
// same size and shape as the 'innerDisplay' form.
//
// innerDisplay : array of char
// The name of the form in which data will be displayed.
// This form will appear within the 'outerForm' from
// 1 .. n times depending upon the spaces provided in
// the outer form.
//
// cursorPos : ModSys.INT32
// The record number in which the cursor is requested to
// reside when the display is first shown (1 .. n).
//
// totalRecords : ModSys.INT32
// The total number of records through 'ScrollForm' will
// be allowed to scroll.
//
// RecordToForm : LoadProc
// The procedure which will be called when the memory
// record information for a record is to be located and
// loaded so that it can be displayed within the current
// inner form. This procedure acts as both a method to
// load a record and a search mechanism. If the
// 'recordNumber' is non zero, then a specific record
// is required by 'ScrollForm' and should be supplied.
// If the 'recordNumber' is zero (0), then one of two
// different different search conditions is in effect -
//
// 1) Key function number 52 (exit22) has been defined
// and was pressed by the user.
//
// 2) No entry or highlight fields exist in the 'innerEntry'
// form and a key other than a motion key was pressed.
// This causes the 'searchLine' to be loaded with the
// additional character and supplied to you for searching
// purposes.
//
// recordNumber - ModSys.INT32
// This contains the record number requested
// by 'ScrollForm'. If this number is given
// as zero (0), then you are being requested
// to perform a non-positional search. You
// may used the 'searchLine' or detect the
// 'LastExitFunction' and then request search
// information from the user. You then may
// set the 'recordNumber' to the appropriate
// number which matches the results of your
// search. If you return this number as a
// zero (0), it will remain in the current
// position on the screen.
//
// entryForm - boolean
// If the 'recordNumber' was non-zero, this
// variable indicates whether the information
// being requested is for the 'innerEntry' form
// (True) or an 'innerDisplay' form (False).
//
// searchLine - array of char
// A string which contains the user entered
// values so far. You may use this string
// to search for the requested record so
// far and/or set it to empty or any other
// values. 'ScrollForm' will append to it
// when another key is pressed.
//
// FormToRecord : ULodProc
// The procedure which will be called each time an inner entry
// form has been shown and left. This may be when scrolling
// from one record to another using the arrows or paging keys
// or when an exit key is pressed. If the change flag
// ('fieldsChanged' in the following example), you may use
// this procedure to update the changed data (ReWriteRecord,
// etc.). A format example of this procedure is -
//
// recordNumber - ModSys.INT32
// The record whose values were changed.
// You may wish to change this value to
// indicate the position of the current entry
// form upon returning from this procedure.
//
// fieldsChanged - boolean
// A change in the values within the
// inner entry form was detected (True),
// or not (False).
//
// refreshForm - boolean
// A boolean variable returned from your
// procedure which tells ScrollForm that
// the keyed field used to present the
// records in a sorted order was changed.
// This change could possibly change the
// presentation order of the records as
// currently presented on the form. When
// you request a form to be refreshed
// (True), then all records which should
// be on the current screen are displayed.
//
// exitTheProc - boolean
// A boolean variable returned from your
// procedure which tells 'ScrollForm' to
// terminate (True), or not (False). You
// may use the 'LastExitFunction' procedure
// within this procedure to determine if
// an exit key has been pressed which
// requires this kind of exit. Note that
// only the normal exit (function 10) causes
// 'ScrollForm' to terminate regardless
// of the value of this variable.
//
// totalRecords - ModSys.INT32
// This will be set to the number of records
// being accessed within 'ScrollForm'. You
// may reset this value to be greater than
// or less than the current number of records.
// The original number for this is the
// 'totalRecords' argument used in the
// initial execution of 'ScrollForm'. An
// important area where this may be necessary
// is when one or more records are added or
// deleted during a 'ScrollForm' session.
//
// EXAMPLE -
//
//
// MODULE Sample;
//
// IMPORT Strings;
// IMPORT Sage;
// IMPORT Display;
// IMPORT Strings;
//
// var
//
// recPos : ModSys.INT32;
// recTot : ModSys.INT32;
//
// procedure RecordToForm
// (var recNum : ModSys.INT32;
// entryForm : boolean;
// var searchString : array of char);
// begin
// -- A record has been requested. Read it.
//
// if (recNum > 0) then begin
// Sage.ReadRecordN ('SAMPLE', 'KEYFIELD', recNum);
//
// -- A search key has been pressed. Find a match and return.
//
// end else if (Strings.Length (searchString) > 0) then begin
// Sage.ReadRecordA ('SAMPLE', 'KEYFIELD', Sage.GE, searchString);
// if (Sage.SageError = SageErrs.OpOk) then begin
// Sage.GetKeyPosition ('SAMPLE', 'KEYFIELD', recNum);
// else
// recNum := 0;
// Strings.NulFill ('', searchString);
// end;
// end;
// end; // RecordToForm
//
// procedure FormToRecord
// (var recNum : ModSys.INT32;
// changed : boolean;
// var refresh : boolean;
// var exitProc : boolean;
// var recTot : ModSys.INT32);
// begin
// if (changed) then begin
// Sage.ReWriteRecord ('SAMPLE');
// refresh := True;
// end;
// end; // FormToRecord
//
// begin
// Sage.OpenSystem ('SAMPLE.DFL', 3, 3, 5000);
// Sage.OpenRelation ('SAMPLE', True);
//
// recPos := 1;
// recTot := Sage.TotalRecords ('SAMPLE');
// Display.ScrollForm ('OuterF', 'InnerE', 'InnerD', recPos, recTot,
// RecordToForm, FormToRecord);
//
// Sage.CloseRelation ('SAMPLE');
// Sage.CloseSystem;
// end; // Sample.
//
procedure ScrollForm
(const outerForm : string;
const innerEntry : string;
const innerDisplay : string;
var cursorPos : ModSys.INT32;
const TotalRecords : ModSys.INT32;
const RecordToForm : LodProc;
const FormToRecord : ULodProc); overload; stdcall;
exports ScrollForm (const outerForm : string;
const innerEntry : string;
const innerDisplay : string;
var cursorPos : ModSys.INT32;
const TotalRecords : ModSys.INT32;
const RecordToForm : LodProc;
const FormToRecord : ULodProc) name 'Display_STRScrollForm';
//*
// STRScrollForm - See documentation of ScrollForm.
//
procedure ScrollFormBackground
(const outerForm : array of char;
const innerDisplay : array of char;
const TotalRecords : ModSys.INT32;
const RecordToForm : LodProc); stdcall;
exports ScrollFormBackground name 'Display_ScrollFormBackground';
//*
// ScrollFormBackground - Background display version of ScrollForm.
//
function ScrollFormQueueSize
() : cardinal; stdcall;
exports ScrollFormQueueSize name 'Display_ScrollFormQueueSize';
//*
// ScrollFormQueueSize - Return remaining inner forms to display in queue.
//
//
// This procedure returns the number of inner forms yet to be displayed
// with associated requested data in the current request queue of
// ScrollForm. This is useful when using MultSage to read in the data
// and some form of lock such as ExclusiveWriteLock is used to
// speed up the process of paging within ScrollForm. When the queue
// size returned is greater than zero (0), then ScrollForm will
// immediately request information for n records (n = queue size)
// before any user intervention is allowed.
//
// CALLING SEQUENCE -
//
// s := ScrollFormQueueSize ();
//
// EXIT -
//
// s : cardinal
// The number of inner form requests remaining in the ScrollForm
// queue. If zero (0), the current form was the last one and
// no more remain.
//
// EXAMPLE -
//
//
// MODULE Sample;
//
// IMPORT Strings;
// IMPORT MultSage;
// IMPORT Display;
// IMPORT Strings;
//
// var
//
// recPos : ModSys.INT32;
// recTot : ModSys.INT32;
//
//
// xLocked : boolean;
//
// procedure RecordToForm
// (var recNum : ModSys.INT32;
// entryForm : boolean;
// var searchString : array of char);
// begin
//
// if (recNum > 0) then begin
//
// -- Exclusively lock the relation if more records will be
// -- immediately requested after the current one.
//
// if (Display.ScrollFormQueueSize () > 0) and not xLocked then begin
// MultSage.ExclusiveWriteLockRelation ('SAMPLE', 300);
// xLocked := (Sage.SageError = SageErrs.OpOk);
// end;
//
// -- Read the requested record.
//
// MultSage.ReadRecordN ('SAMPLE', 'KEYFIELD', recNum);
//
// -- Unlock the relation if this record is the last one in a
// -- series and the relation has been exclusively locked.
//
// if (Display.ScrollFormQueueSize () = 0) and xLocked then begin
// MultSage.ExclusiveUnlockRelation ('SAMPLE');
// xLocked := False;
// end;
// end;
// end; // RecordToForm
//
// procedure FormToRecord
// (var recNum : ModSys.INT32;
// changed : boolean;
// var refresh : boolean;
// var exitProc : boolean;
// var recTot : ModSys.INT32);
// begin
// end; // FormToRecord
//
// begin
// MultSage.OpenSystem ('SAMPLE.DFL', 3, 3, 5000);
// MultSage.OpenRelation ('SAMPLE', True);
//
// xLocked := False;
// recPos := 1;
// recTot := MultSage.TotalRecords ('SAMPLE');
// Display.ScrollForm ('OuterF', 'InnerE', 'InnerD', recPos, recTot,
// RecordToForm, FormToRecord);
//
// MultSage.CloseRelation ('SAMPLE');
// MultSage.CloseSystem;
// end; // Sample.
//
procedure SelectDefaultKeyboard; stdcall; exports SelectDefaultKeyboard name 'Display_SelectDefaultKeyboard'; //* // SelectDefaultKeyboard - Set to the default keyboard. // // // This procedure resets the keyboard to the default. This // default should have been defined within the current // data dictionary (.DFL) file. // // CALLING SEQUENCE - // // SelectDefaultKeyboard //
procedure SelectKeyboard
(const keyboardName : array of char); stdcall;
exports SelectKeyboard name 'Display_SelectKeyboard';
//*
// SelectKeyboard - Select a named keyboard set.
//
//
// This procedure allows the selection of a predefined keyboard
// set. If the set is not defined (available), then a Sage.SageError
// of 61 is returned.
//
// CALLING SEQUENCE -
//
// SelectKeyboard (keyboardName)
//
// ENTRY -
//
// keyboardName : array of char
// The name of the keyboard to be selected.
//
// EXIT -
//
// Sage.SageError : cardinal
// An error flag indicating the result of the operation.
//
procedure SetColorMode
(const colorMode : cardinal); stdcall;
exports SetColorMode name 'Display_SetColorMode';
//*
// SetColorMode - Set the current color mode.
//
//
// This procedure allows the setting of the current color status.
// One of three status modes apply -
//
// 0 - Color
// 1 - Interpreted black and white (from the original color)
// 2 - Fixed black and white (fields white, background black)
//
// If using a monochrome adapter card, only options 1 and 2 are
// available.
//
// CALLING SEQUENCE -
//
// SetColorMode (colorMode)
//
// ENTRY -
//
// colorMode : cardinal
// The mode in which the system should operate. (0 .. 2)
//
procedure SetMessageColor
(const messageColor : integer); stdcall;
exports SetMessageColor name 'Display_SetMessageColor';
//*
// SetMessageColor - Set the color of the message.
//
//
// This procedure sets the color of the standard message which is
// displayed at the bottom of the screen.
//
// CALLING SEQUENCE -
//
// SetMessageColor (messageColor)
//
// ENTRY -
//
// messageColor : integer
// The appearance of the standard messages shown at the bottom of
// the screen. (0 .. 255) or -1 to reset to the default appearance.
//
// A list of the message colors follows -
//
// msg. col. foreground background
// --------- ---------- ----------
// 0 black black
// 1 blue black
// 2 green black
// 3 cyan black
// 4 red black
// 5 magenta black
// 6 brown black
// 7 white black
// 8 gray black
// 9 light blue black
// 10 light green black
// 11 light cyan black
// 12 light red black
// 13 light magenta black (default)
// 14 yellow black
// 15 light white black
// 16 .. 31 (same as 0 .. 15) blue
// 32 .. 47 (same as 0 .. 15) green
// 48 .. 63 (same as 0 .. 15) cyan
// 64 .. 79 (same as 0 .. 15) red
// 80 .. 95 (same as 0 .. 15) magenta
// 96 .. 111 (same as 0 .. 15) brown
// 112 .. 127 (same as 0 .. 15) white
// 128 .. 255 (same as 0 .. 127 except blink foreground)
//
procedure UnloadForm
(const FormName : array of char); overload; stdcall;
exports UnloadForm (const FormName : array of char) name 'Display_UnloadForm';
//*
// UnloadForm - Unload the indicated form from memory.
//
//
// This procedure unloads the indicated form from the memory
// area.
//
// CALLING SEQUENCE -
//
// UnloadForm (formName);
//
// ENTRY -
//
// formName : array OR char
// Name of form to be unloaded.
//
procedure UnloadForm
(const FormName : string); overload; stdcall;
exports UnloadForm (const FormName : string) name 'Display_STRUnloadForm';
//*
// STRUnloadForm - See documentation of UnloadForm.
//
procedure UnloadAllForms; stdcall; exports UnloadAllForms name 'Display_UnloadAllForms';
function VariableIndex
() : ModSys.INT32; stdcall;
exports VariableIndex name 'Display_VariableIndex';
//*
// VariableIndex - Return the index to the last variable form array.
//
//
// This procedure returns the index within the array used by the
// last call to the 'FormV' procedure of the selected value. When
// another 'FormV' call is made or a form using variable
// highlighted fields is called within a help sequence, the
// variable index is updated to reflect it and the old setting is
// lost. If a zero (0) is returned, then a form using variable
// fields was called but none of the presented fields were
// selected.
//
// CALLING SEQUENCE -
//
// i := VariableIndex ()
//
// EXIT -
//
// i : ModSys.INT32
// Record number within the variable array used (1 .. n) or zero
// if none were selected.
//
procedure GetFormAlias
(const FormName : array of char;
var alias : array of char); stdcall;
exports GetFormAlias name 'Display_GetFormAlias';
//*
// GetFormAlias - Get the form's associated alias name.
//
//
// This procedure returns the alias name associated with the
// given form name. If there is no associated alias name,
// a null string is returned.
//
// CALLING SEQUENCE -
//
// GetFormAlias (formName, alias)
//
// ENTRY -
//
// formName : array of char
// The form name for which an alias is requested.
//
// EXIT -
//
// alias : array of char
// The alias associated with the given form name. If
// insufficient space is available in the 'alias' variable,
// then a Sage.SageError of SageErrs.ArrayTooSmall will be
// set and 'alias' will be returned as a null string.
//
procedure ConvertFormAliasToName
(const alias : array of char;
var TheName : array of char); stdcall;
exports ConvertFormAliasToName name 'Display_ConvertFormAliasToName';
//*
// ConvertFormAliasToName - Convert a form alias to its standard name.
//
//
// This procedure converts a form's alias name to its standard
// name. If the alias has no standard name association, then a
// null string is returned.
//
// CALLING SEQUENCE -
//
// ConvertFormAliasToName (alias, TheName)
//
// ENTRY -
//
// alias : array of char
// The alias name to find.
//
// EXIT -
//
// TheName : array of char
// The associated standard name.
//
procedure SetMessageStyle
(const MessageStyle : MessageStyleType); stdcall;
exports SetMessageStyle name 'Display_SetMessageStyle';
//*
// SetMessageStyle - Sets the message style in SageTerms.
//
//
// This procedure sets the message style for SageTerms. If
// the setting is SageTermStyle then messages show on the 25th
// screen line. If set to WindowsStyle they show up as a
// separate dialog.
//
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance