home *** CD-ROM | disk | FTP | other *** search
- /*******************************************************************
-
- Turbo Prolog Toolbox
- (C) Copyright 1987 Borland International.
-
- Demo of the virtual screen handler
- *******************************************************************/
-
- code=1500
-
- include "tdoms.pro"
-
- DOMAINS
- FNAME=SYMBOL
- TYPE = int(); str(); real()
-
- DATABASE
- /* Database declarations used in scrhnd */
- insmode /* Global insertmode */
- actfield(FNAME) /* Actual field */
- screen(SYMBOL,DBASEDOM) /* Saving different screens */
- value(FNAME,STRING) /* value of a field */
- field(FNAME,TYPE,ROW,COL,LEN) /* Screen definition */
- txtfield(ROW,COL,LEN,STRING)
- windowsize(ROW,COL).
- notopline
-
- /* Database declarations used in vscrhnd */
- windowstart(ROW,COL)
- mycursord(ROW,COL)
-
- /* Database declarations used in lineinp */
- lineinpstate(STRING,COL)
- lineinpflag
-
- include "tpreds.pro"
- include "menu.pro"
- include "status.pro"
- include "lineinp.pro"
- include "vscrhnd.pro"
-
- CLAUSES
- /* Use default definitions for the screen predicates */
- field_action(_):-fail.
- field_value(FNAME,VAL):-value(FNAME,VAL),!.
- noinput(_):-fail.
-
- GOAL
- consult("xvirtual.scr"), /* Load the screen definition */
- createwindow(on), /* Make the window */
- makestatus(112," Type in some values"),
- scrhnd(on,_). /* Call screen handler */