home *** CD-ROM | disk | FTP | other *** search
- Documentation for Version 5.3 of ReadASG.TPU
-
- The procedures in this unit allow full screen editing of data entry. Up to
- 64 of the twelve AtSayGet (V 5.3) procedures can be joined on one "page" to
- be "read" together, and up to 10 pages of ASG procedures can be active at a
- time.
- The full screen editing commands will be familiar to WordStar/dBase/Side-
- Kick users. In fact, the ReadASG editor is more intuitive than dBase. For
- example dBase will just move to the previous field if a ^E or Up Arrow key
- is pressed, whereas ReadASG will move to the field above the current one --
- even if that field is not the previous field. In the following diagrams the
- fields are numbered in the order that they should be entered on the page
- (left to right and top to bottom). This is also the order in which data will
- be entered if each field is filled or the ENTER or TAB key is pressed.
- Pressing the Shift Tab keys causes the entry screen to back up to the pre-
- vious field; In the diagram below Shift Tab would move from 6 to 5, 5 to 4,
- etc. The effect of the arrow keys is shown in the following two diagrams:
-
- UP ARROW or ^E DOWN ARROW or ^X
- ┌───────────────────────────────────┐ ┌───────────────────────────────────┐
- │ ┌─^G ─┐ ┌<─<─<─<─<─<─<─<─<┐ │ │ │
- │ v ^ v ^ │ │ │
- │ [ field 1 ] [ field 2 ] │ │ [ field 1 ] [ field 2 ] │
- │ ^ ^ │ │ v v │
- │ ^ ^ │ │ v v │
- │ ^ [ field 3 ] │ │ v [ field 3 ] │
- │ ^ ^ │ │ v v │
- │ ^ ^ │ │ v v │
- │ [ field 4 ] [ field 5 ] │ │ [ field 4 ] [ field 5 ] │
- │ ^ │ │ ^ v v │
- │ ^ │ │ └─ ^G <─┘ v │
- │ └─[ field 6 ] │ │ [ field 6 ]<─<─<─<┘ │
- │ │ │ v │
- │ │ │ v │
- │ │ │ exit │
- └───────────────────────────────────┘ └───────────────────────────────────┘
-
- The ReadASG unit interface follows:
-
- {$F+,V-}
- UNIT ReadASG;
- INTERFACE
- USES
- AtSayGet, {from ASG53.ARC/ZIP}
- CRT;
-
- CONST
- BadPage = -8; { ASGExit code if ASGEntry page is not full }
- FullPage = -9; { ASGExit code if ASGEntry page w/b over-full. See also the
- ASGExit codes described in the AtSayGet.DOC file. }
- TYPE
- MaxFields = 1..64; { Number of ASG fields allowed per page. }
- Pages = 1..10; { Each "field" on a page consumes 250 bytes of heap
- space. The page space is released on exit or under
- program control using the FreeASGHeapPage proc.
- If all 10 pages are used, each editing 64 different
- variables, 160000 bytes of the heap will be used.
- One page can be re-used to edit many different sets
- of data -- Multiple pages are only for convenience}
-
-
- {Procedures to create and dispose of HeapPages:}
-
- PROCEDURE { Makes a page on the heap to store "Field" information. }
- MakeASGHeapPage(PageIndex : Pages; {1..10}
- NumOfFields : MaxFields ); {1..64}
-
-
- PROCEDURE { Frees the heap of an un-neaded edit page. }
- FreeASGHeapPage(PageIndex : Pages); {1..10}
-
-
-
- {Procedures to add an ASG procedure to a HeapPage:
-
- NOTE -- Except for the additional 1st parameter - PageID - all of the
- following procedures follow the syntax of the corresponding AtSayGet
- procedures described in the AtSayGet.DOC file. The only other deviation is
- that the address of the variable being edited (not the variable itself) is
- the parameter.
- }
-
- PROCEDURE AddASGB { Add an AtSayGetBoolean procedure to the page. }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetBoolean: POINTER);
-
-
- PROCEDURE AddASGCP { Add an AtSayGetCharPic procedure to the page. }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetChar : POINTER;
- Pic : CHAR);
-
-
- PROCEDURE AddASGSL { Add an AtSayGetStrLen procedure to the page }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetStr : POINTER;
- Len : BYTE);
-
-
- PROCEDURE AddASGSP { Add an AtSayGetStrPic procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetStr : POINTER;
- Pic : FieldTxt);
-
-
- PROCEDURE AddASGByte { Add an AtSayGetByte procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetByte : POINTER;
- Len : MaxFL);
-
-
- PROCEDURE AddASGR { Add an AtSayGetReal procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetReal : POINTER;
- Len,DecPl : MaxFL);
-
-
- PROCEDURE AddASGI { Add an AtSayGetInt procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetInt : POINTER;
- Len : MaxFL);
-
-
- PROCEDURE AddASGLI { Add an AtSayGetLongInt procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetLongInt: POINTER;
- Len : MaxFL);
-
-
- PROCEDURE AddASGW { Add an AtSayGetWord procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetWord : POINTER;
- Len : MaxFL);
-
-
- PROCEDURE AddASGRR { Add an AtSayGetRealRange procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetReal : POINTER;
- Len,DecPl : MaxFL;
- Min,Max : REAL);
-
-
- PROCEDURE AddASGIR { Add an AtSayGetIntRange procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetInt : POINTER;
- Len : MaxFL;
- Min,Max : INTEGER);
-
-
- PROCEDURE AddASGLIR { Add an AtSayGetLongIntRange procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetLongInt: POINTER;
- Len : MaxFL;
- Min,Max : LongInt);
-
-
- PROCEDURE AddASGWR { Add an AtSayGetWordRange procedure }
- (PageID : Pages;
- X : Xrange;
- Y : Yrange;
- Say : FieldTxt;
- GetWord : POINTER;
- Len : MaxFL;
- Min,Max : WORD);
-
-
-
- {Procedure to activate FULL SCREEN EDITING:
-
- After "Making" your entry page(s) and "Adding" a full list of ASG procedures
- to each, you can call the following procedure to manage each edit page. Once
- built, you can call ReadPage(#) to edit any number of records or sets of
- variables. To see how simple it is to use these procedures see ReadDemo.PAS
- }
-
-
- PROCEDURE ReadPage(PageID : Pages);