Category : Pascal Source Code
Archive   : PULL5X.ZIP
Filename : P5X-VAR.INC

 
Output of file : P5X-VAR.INC contained in archive : PULL5X.ZIP
{ =========================================================================== }
{ P5x-var.inc - Variables for Multi-level pull-down menus. ver 5.X, 01-07-89 }
{ }
{ This file contains all the variables needed for PULL5X.TPU. You cannot }
{ change this file unless you have the complete PULL5X.PAS source code. }
{ Copyright (c) 1987-1989 James H. LeMay, All rights reserved. }
{ =========================================================================== }

{ ================== Data Structure Configuration Constants ================= }
const
NumOfMainMenus = 8; { 1 - 255 }
NumOfSubMenus = 5; { 1 - 255 }
MaxMenuLines = 15; { For Main and Sub menus }
MaxCharsPerLine = 20; { For Main and Sub menus, and Data Window titles }

NumOfDataWndws = 14; { 1 - 255 }
NumOfDataEntries = 10; { 1 - 255 }
DataStrSize = 100; { Max chars in data entry string }

NumOfHelpWndws = 14; { 1 - 255 }
TotalHelpLines = 87; { 1 - 65535 }
HelpCharsPerLine = 50; { 1 - Screen limit }

NumOfMsgLines = 11; { 1 - 255 }
CrtStrSize = 80; { Screen limit for sizing strings }
NumOfErrMsgLines = 7; { 1 - 65535 }
ErrStrSize = 60; { Error messages are usually short }

{ ========================= Declarations for Menus ========================== }
type
MenuModeType = (ExecChoice, SingleChoice, MultipleChoice);
LineModeType = (Choice, ExecOnly, Comment, Partition,
ToDataWndw, ToSubMenu, ToUserWndw);
ProcPtrType = pointer;
Toggle = (Off, On, No, Yes);
CrtStrType = string[CrtStrSize];
SeqStrType = string[MaxWndw];
MenuRec =
record
Title: string[MaxCharsPerLine];
CmdLtrs: string[MaxMenuLines];
Line: array[1..MaxMenuLines] of string[MaxCharsPerLine];
LineMode: array[1..MaxMenuLines] of LineModeType;
Flagged: array[1..MaxMenuLines] of boolean;
LinkNum: array[1..MaxMenuLines] of byte;
ProcPtr: array[1..MaxMenuLines] of ProcPtrType;
ParentDir,
LinkDir: DirType;
MenuMode: MenuModeType;
MenuLines: byte;
NameCol: byte;
Row, Col, Rows, Cols: byte;
DefaultLine, HiLiteLine, SingleFlagLine: byte;
Battr, Wattr, Hattr, Lattr, Cattr: byte;
Border: Borders;
BackToDefault, Changed: boolean;
MsgLineNum, HelpWndwNum: byte;
end;
MenuRecs = array[1..NumOfMainMenus] of MenuRec;

var
MainMenu: ^MenuRecs;
TopMenu: MenuRec;
MRI: word; { Top menu record index }
LastMainMenu: byte; { <= NumOfMainMenus }
TopLineStr: CrtStrType;
TopLineRow,
MainMenuRow,

InitAttr,
TopLineAttr,
TopLineHattr,
TopLineLattr,
MainMenuWattr,
MainMenuBattr,
MainMenuHattr,
MainMenuLattr,
MainMenuCattr: byte;
MainMenuBrdr: Borders;

Key: char;
ExtKey: boolean;

{ -- Control Flags to Pull/Pop the menus. -- }
PullDown,
Pop,
PopToWorkWndw,
PopToTop,
PopAndProcess: boolean;
PopLevels: byte;

{ -- Variables to indicate location of menus and windows. -- }
TopCmdLtrs: string[NumOfMainMenus];
CmdSeq,
MoreCmdSeq: SeqStrType; { Sequence of keys pressed. }
MPulled,
SPulled,
HiLited: byte;
AccessedWorkWndw,
AccessedMenus: boolean;
WorkWndwStep: word;
TopWorkWndwName: WindowNames;

{ -- These are addresses for the indirect forward calls out of PULL.TPU -- }
AddrGetUserPullStats,
AddrGetOverrideStats,
AddrCheckGlobalKeys,
AddrWorkWndw,
AddrKbdIdle: pointer;

const
InWorkWndw: boolean = true;
Quit: boolean = false;
WaitForKbd: boolean = true;

{ -- Function keys -- }
HelpKey = #59; { F1 }
PopKey = #60; { F2 }
TopKey1 = #68; { F10 } { Extended function key }

{ -- Data Entry keys -- }
NullKey = #00;
RetKey = #13; { ^M }
BSKey = #08;
EscKey = #27; { ^[ }
HomeKey = #71;
UpArrKey = #72;
PgUpKey = #73;
LArrKey = #75;
RArrKey = #77;
EndKey = #79;
DnArrKey = #80;
PgDnKey = #81;
InsKey = #82;
DelKey = #83;
CtrlLArrKey = #115;
CtrlRArrKey = #116;
CtrlEndKey = #117;
CtrlPgDnKey = #118;
CtrlHomeKey = #119;
CtrlPgUpKey = #132;
TabKey = #9;
ShiftTabKey = #15;

{ ========================= SubMenu Declarations ============================ }
{$ifdef UseSubMenuCode }
type
SubMenus = array[1..NumOfSubMenus] of MenuRec;

var
SubMenu: ^SubMenus;
LastSubMenu: byte; { <= NumOfSubMenus }
SubMenuWattr,
SubMenuBattr,
SubMenuHattr,
SubMenuLattr,
SubMenuCattr: byte;
SubMenuBrdr: Borders;
LocationWarning: boolean;
{$endif }

{ ====================== Message Line Declarations ========================== }
{$ifdef UseMsgLineCode }
type
ErrMsgStrType = string[ErrStrSize];

const
CurrentMsgLineNum: word = 0; { Index of the message currently shown. }
EnableKeyStatus: boolean = true;

var
MsgLine: array[1..NumOfMsgLines] of CrtStrType;
ErrMsgLine: array[1..NumOfErrMsgLines] of ErrMsgStrType;
MsgLineRow,
CapsLockCol,
ErrMsgAttr,
KeyStatusAttr,
MsgLineAttr: byte;
{$endif }

{ ======================== Help Window Declarations ========================= }
{$ifdef UseHelpWndwCode }
type
HelpWndwRec =
record
FirstLine, LastLine: byte;
LinesToShow: byte;
Row, Col, Rows, Cols: byte;
Battr, Wattr: byte;
Border: Borders;
HWmodes: byte;
MsgLineNum: byte
end;

var
HelpWndw: array[1..NumOfHelpWndws] of HelpWndwRec;
HelpLine: array[1..TotalHelpLines] of string[HelpCharsPerLine];
HelpBottomRow,
HelpWndwModes,
HelpMsgLineNum,
HelpWndwWattr,
HelpWndwBattr: byte;
HelpWndwBrdr: Borders;
{$endif }


{ ======================== Data Windows and Data Entry ====================== }
{$ifdef UseDataEntryCode }
type
TypeOfDataType = (
Bytes,Words,ShortInts,Integers,LongInts,Reals,UserNums,Chars,Strings);
SetNames = (
NoSet,UnsignedSet,SignedSet,RealSet,CharSet,HexSet,FileNameSet,PathSet,
MaskSet);
EntrySetArray = array[UnsignedSet..MaskSet] of set of char;
DataEntryRec =
record
VarAddr: pointer;
TypeOfData: TypeOfDataType;
Row,Col,Field,MaxField: byte;
Decimals: shortint;
SetName: SetNames;
TranslateProc,
CheckRangeProc: ProcPtrType;
JustifyOutput: DirType;
Oattr, Iattr,
MsgLineNum, HelpWndwNum: byte;
end;
DataWndwRec =
record
Title: string[MaxCharsPerLine];
DWrow,DWcol: byte;
Battr: byte;
Border: Borders;
Entry: DataEntryRec;
end;
DataWndws = array[1..NumOfDataWndws] of DataWndwRec;
DataEntries = array[1..NumOfDataEntries] of DataEntryRec;
DataStrType = string[DataStrSize];
DataPadRec =
record
StoreMode,Valid,DataStored,NewData,PullDW: boolean;
FieldIndex,CursorOfs,Hattr: integer;
ErrMsg: word;
Flex: byte;
Justify: DirType;
case TypeOfDataType of
Bytes: (Bdata: byte);
Words: (Wdata: word);
ShortInts: (SIdata: shortint);
Integers: (Idata: integer);
LongInts: (Ldata: longint);
Reals: (Rdata: real);
UserNums: (UNdata: DataStrType);
Chars: (Cdata: char);
Strings: (Sdata: DataStrType);
end;

const
{ -- Filter sets for valid data entry characters -- }
EntrySet: EntrySetArray = (
{ -- Reserved sets -- }
{ UnsignedSet: } ['0'..'9'],
{ SignedSet: } ['0'..'9','-','+'],
{ RealSet: } ['0'..'9','-','+','.','E','e'],
{ CharSet: } [' '..'~'],
{ -- User customized sets -- }
{ HexSet: } ['0'..'9','A'..'F','a'..'f'],
{ FileNameSet: }
['!','#'..')','-'..'.','0'..'9','@'..'Z','^'..'{','}'..'~'],
{ PathSet: }
['!','#'..')','-'..'.','0'..':','@'..'Z','^'..'{','}'..'~','\'],
{ MaskSet: }
['!','#'..'*','-'..'.','0'..':','?'..'Z','^'..'{','}'..'~','\']);

var
DWI: word; { Top data window record index }
DEI: word; { Top data entry record index }
TopDataWndw: DataWndwRec;
TopEntry: DataEntryRec;
DataWndw: ^DataWndws;
DataEntry: ^DataEntries;
DataStr: DataStrType;
DataStrL: byte absolute DataStr; { length of DataStr }
DataPad: DataPadRec;
AutoTab,
AutoNumLock: boolean;

{$endif UseDataEntryCode }


  3 Responses to “Category : Pascal Source Code
Archive   : PULL5X.ZIP
Filename : P5X-VAR.INC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/