home *** CD-ROM | disk | FTP | other *** search
- {
- Copyright (c) 1988 BittWare Computing, ALL RIGHTS RESERVED
- }
-
- unit menuvars;
- {$v-}
- interface
- uses
- dos,
- crt;
- const
- SynVarW = 9;
- MaxTextRow = 25;
- VarListMax = 3;
- MaxErrors = 20;
- NoError = 0;
- InvalidInput = 1;
- PathNotFound = 2;
- FileNotFound = 3;
- SeekPastHelp = 4;
- MaxIntHelp = 4;
- MaxHelpLines = 4;
- HelpLineWidth = 70;
- MaxHelpPages = 5;
- menu_min = 1;
- MonoLo = 7;
- MonoHi = 15;
- MaxTextWidth = 15;
- MaxMenuVarWidth = 14;
- MenuMax = 11;
- HdrWidth = 13;
- HdrMax = 6;
- PickListWidth = 14;
- PickListStrW = 13; {Width - 2 for separation}
- PickListMaxStr = 50;
- MaxPathLength = 50;
-
- InitYes = true;
- InitNo = false;
- AutoOn = true;
- AutoOff = false;
-
- Undef = 0;
- RealCode = 1;
- IntCode = 2;
- LongintCode = 3;
- StringCode = 4;
-
- FilePicked = 0;
- NoFilePicked = 1;
- NoFileFound = 2;
-
- type
- linestrg = string[80];
- title_type = string[60];
- FileString = string[12];
- PathString = string[MaxPathLength];
- MenuString = string[MenuMax];
- HelpMessType = record
- NextRec:integer; {NextRec = 0 if last, else}
- {NextRec = Seek Number of Next "Page" of Message}
- Str :array[1..MaxHelpLines] of string[HelpLineWidth];
- end;
-
- HelpFileType = file of HelpMessType;
-
- screenptr = ^screentype;
- screentype = array[1..25,1..80] of record
- ch :byte;
- at :byte;
- end;
-
- HalfScreenPtr = ^HalfScreenType;
- HalfScreenType = array[1..2240] of byte;
-
- QuarterScreenPtr = ^QuarterScreenType;
- QuarterScreenType = array[1..1000] of byte;
-
- EighthScreenPtr = ^EighthScreenType;
- EighthScreenType = array[1..500] of byte;
-
- ConfirmScreenPtr = ^EighthScreenType;
- ConfirmScreenType = array[1..200] of byte;
-
- InpStrPtr = ^InpStrType;
- InpStrType = array[1..MenuMax] of record
- Str :string[MaxMenuVarWidth];
- Typ :byte;
- VarWidth :byte;
- end;
-
- VarListPtr = ^VarListType;
- VarListType = record
- Str :array[1..VarListMax] of string[MaxTextWidth];
- Sel :array[1..MenuMax] of byte;
- Max :byte;
- end;
-
- MenuPtr = ^MenuPtrType;
- MenuPtrType = record
- str :array[1..MenuMax] of string[MaxTextWidth];
- SelPattern :MenuString;
- PickKey :string[MenuMax];
- max :byte;
- EnLtRt :boolean;
- sel :byte;
- x :byte;
- y :byte;
- width :byte;
- TxtLen :byte;
- BorderBg :byte;
- BorderFg :byte;
- Fg :byte;
- NoSelFg :byte;
- SelBg :byte;
- SelFg :byte;
- NoSelBg :byte;
- VarBg :byte;
- VarFg :byte;
- title :title_type;
- ScreenBufPtr :Pointer;
- VarPtr :Pointer;
- OldWindMin :word;
- OldWindMax :word;
- end;
- HdrPtr = ^HdrPtrType;
- HdrPtrType = record
- str :array[1..HdrMax] of string[HdrWidth];
- max :integer;
- sel :byte;
- PickKey :string[HdrMax];
- end;
- PickListPtr = ^PickListPtrType;
- PickListPtrType = record
- str :array[1..PickListMaxStr] of string[PickListStrW];
- max :integer;
- maxX :byte;
- sel :byte;
- y :byte;
- x :byte;
- title :title_type;
- ScreenBufPtr :Pointer;
- OldWindMin :word;
- OldWindMax :word;
- BorderBg :byte;
- BorderFg :byte;
- Fg :byte;
- SelBg :byte;
- NoSelBg :byte;
- NoSelFg :byte;
- end;
-
- MessagePtr = ^MessagePtrType;
- MessagePtrType = record
- x :byte;
- y :byte;
- dx :byte;
- dy :byte;
- title :title_type;
- ScreenBufPtr :Pointer;
- OldWindMin :word;
- OldWindMax :word;
- BorderBg :byte;
- BorderFg :byte;
- Fg :byte;
- Bg :byte;
- VarFg :byte;
- VarBg :byte;
- OldX :byte;
- OldY :byte;
- end;
- ch_set = set of char;
-
- var
- Regs :registers;
- NumCharsSet :ch_set;
- PickListMaxX :integer;
- PickListMaxY :integer;
- ErrorNum :integer;
- HelpNum :integer;
-
- {auto, if true windows are not pulled open}
- {used for command files to pre-select menu choices}
- Auto :boolean;
-
- MaxHelps :longint;
- HelpFile :file of HelpMessType;
- HelpVar :HelpMessType;
- HelpFileFound :boolean;
-
- DirInfo :SearchRec;
-
- ErrorMessStr :array[1..MaxErrors] of linestrg;
- MenuSel :byte;
- PickListSel :byte;
-
- {crt vars}
- Rtn2Main :boolean;
- TxtFg,TxtBg :byte;
- screen :ScreenPtr;
- HelpList :MessagePtr;
- ErrorList :MessagePtr;
- SkinnyIO :MessagePtr;
- SkinnySave :QuarterScreenPtr;
- MenuBorderBg :byte;
- MenuBorderFg :byte;
- MenuSelFg :byte;
- PickKeyFg :byte;
- MenuHiFg :byte;
- MenuLoFg :byte;
- MenuSelBg :byte;
- MenuNoSelBg :byte;
- MenuNoSelFg :byte;
- MenuVarBg :byte;
- MenuVarFg :byte;
- VarInpFg :byte;
- VarInpBg :byte;
- MainFg :byte;
- MainBg :byte;
- BottomFg :byte;
- BottomBg :byte;
-
- CursStart :byte;
- CursEnd :byte;
-
- implementation
- begin
- NumCharsSet := ['+','-','.','0'..'9','E',#13,#27,#8];
- Auto := false;
- MainFg := White;
- MainBg := Blue;
- end.
-
-
-