4glWorks reference: Scrollers

dtb_looks

file idtbs.4gl
declaration
function dtb_looks(frm, dsc, p)
    define frm	char(14),		# form file name
	   dsc	char(40),		# form description
	   p	smallint		# pane length
returns nothing
purpose Sets appearence attributes for the dtb scroller
example none
notes The form needs to have a screen array named s_dtb containing 4 character fields (names unimportant)

dtb_scroller

file idtbs.4gl
declaration
function dtb_scroller(im, ip)
    define im, ip	smallint
returns a message
services Upstream:
  • MB_init to MB_maxupstream
  • MB_prevrec (detailed display only)
  • MB_nextrec (detailed display only)
  • MB_display (detailed display only)
Downstream:
  • MB_display
  • MB_open
  • MB_declare
  • MB_exit
  • All messages serviced by browse_filter
  • MB_reloadset
  • MB_brief
  • MB_deleterec (asks for confirmation, and passes it down on a positive answer)
purpose A scroller suitable for many to many relations maintenance
example none
notes
  • The scroller uses a select statement as specified in the search global variable
  • the current row is held in globals code1 and code2

mlt_create

file imlts.4gl
declaration
function mlt_create()
returns nothing
purpose (Re)creates the temporary table used by the mlt scroller for data display
example none
notes none

mlt_delete

file imlts.4gl
declaration
function mlt_delete(type_rec, link_rec)
    define type_rec	char(1),		# The type of the record
	   link_rec	integer			# The primay key of the record
returns nothing
purpose Removes from the mlt temporary table text related to a record tracked by the mlt scroller
example none
notes Normally used when deleting or updating records

mlt_downstream

file imlts.4gl
declaration
function mlt_downstream(im, ip)
    define im, ip	smallint
returns a message
services
  • MB_display
  • MB_open
  • MB_declare
  • MB_exit
  • All messages serviced by scroll_filter
  • MB_changerec (highlights record, asks for confirmation, and passes it down on a positive answer)
  • MB_deleterec (highlights record, asks for confirmation, and passes it down on a positive answer)
  • MB_prevrec
  • MB_nextrec
purpose The downstream filter of the mlt_scroller
example none
notes none

mlt_head_tail

file imltr.4gl
declaration
function mlt_head_tail(h, t)
    define h	char(78),
	   t	char(40)
returns nothing
purpose Used to set head and tail for mlt scroller printouts
example none
notes none

mlt_looks

file imlts.4gl
declaration
function mlt_looks(frm, p)
    define frm	char(14),		# form file name
	   p	smallint		# pane lenght
returns nothing
purpose Sets appearence attributes for the mlt scroller
example none
notes The form needs to have a screen array named s_mlt containing 1 character field (name unimportant)

mlt_newline

file imlts.4gl
declaration
function mlt_newline(txt, num_ord)
    define txt		char(78),		# The actual text
	   num_ord	smallint		# The line number
returns nothing
purpose Adds a new text line to a record being created
example none
notes num_ord is disregarded if the auto increment flag is in effect for the record being currently created

mlt_newrec

file imlts.4gl
declaration
function mlt_newrec(tr, lr, dr, ai, maxl)
    define tr	char(1),		# Table type
	   lr	integer,		# Record primary key
	   dr	date,			# A date, for time sorting purposes
	   ai,				# The line auto increment flag
	   maxl	smallint		# The highest line number in the record
returns nothing
purpose Prepares the mlt scroller for the creation of a new record
example none
notes none

mlt_op_filter

file imlts.4gl
declaration
function mlt_op_filter(m, t)
    define m	smallint,	# message body
	   t	char(10)	# list of record types
returns nothing
purpose Specifies a list of record types on which a particular message is disallowed
example none
notes The mlt scroller supports message disabilitation per record type, ie a certain message, though originally enabled, will only be so if the current record is not listed in t above.< Successive calls to this function allow to specify multiple concurrently controlled messages. The limit of concurrent messages is at present set to 4.

mlt_open

file imlts.4gl
declaration
function mlt_open(new_ord, cpos)
    define new_ord,			#new display order
	   cpos		smallint	#cursor position
returns nothing
purpose Specifies a new data display order
example none
notes currently the following orderings are supported:
  • -1: date_rec desc, link_rec desc
  • 0: link_rec
  • 1: date_rec, type_rec, link_rec
  • 2: date_rec desc, type_rec desc, link_rec
  • 3: type_rec, date_rec, link_rec
  • 4: type_rec desc, date_rec desc, link_rec
  • 11: date_rec, link_rec, type_rec
  • 12: date_rec, type_rec, link_rec #=1, but needed
  • 13: link_rec, type_rec, date_rec
  • 14: type_rec, link_rec, date_rec
the cursor position on reopening could be:
  • 1: last line
  • 2: current record
  • 3: current line number
  • any other value: first line
Note that the new order does not take effect until a MB_declare is issued, and that the repositioning of the cursor cannot be guaranteed if control is passed back to the menu structure before such message is issued.

mlt_recdone

file imlts.4gl
declaration
function mlt_recdone()
returns nothing
purpose Terminates the creation of a record
example none
notes none

mlt_retrieve

file imlts.4gl
declaration
function mlt_retrieve(r)
    define r	integer
returns txt, char(78), row contents
purpose Returns the contents of a particular line.
example none
notes Although the mlt scroller services print requests, for multi pane viewers, it may be necessary to write more complex reports. mlt_retrieve comes handy in such circumstances

mlt_scroller

file imlts.4gl
declaration
function mlt_scroller(im, ip)
    define im, ip	smallint
returns a message
services Upstream: see mlt_upstream
Downstream: see mlt_downstream
purpose A complex scroller used to maintain and view in textual form and with different sorting orders records from multiple disjoint tables
example none
notes none

mlt_upstream

file imlts.4gl
declaration
function mlt_upstream(im, ip)
    define im, ip	smallint
returns a message
services
  • MB_init to MB_maxupstream
  • MB_notfound
  • MB_print
purpose The upstream filter of the mlt scroller
example none
notes none

stb_looks

file istbs.4gl
declaration
function stb_looks(frm, dsc, p)
    define frm	char(14),		# form file name
	   dsc	char(40),		# form description
	   p	smallint		# pane lenght
returns nothing
purpose Sets appearence attributes for the stb scroller
example none
notes The form needs to have a screen array named s_stb containing 2 character fields (names unimportant)

stb_open

file istbs.4gl
declaration
function stb_open(fname, cond)
    define fname	char(3),
	   cond		char(250)
returns nothing
purpose A convenient tool to quickly initialize the search global variable
example none
notes none

stb_scroller

file istbs.4gl
declaration
function stb_scroller(im, ip)
    define im, ip	smallint
returns a message
services Upstream:
  • MB_init to MB_maxupstream
  • MB_prevrec (detailed display only)
  • MB_nextrec (detailed display only)
  • MB_display (detailed display only)
Downstream:
  • MB_display
  • MB_open
  • MB_declare
  • MB_exit
  • All messages serviced by browse_filter
  • MB_reloadset
  • MB_brief
  • MB_deleterec (asks for confirmation, and passes it down on a positive answer)
purpose A scroller suitable for single table maintenance
example none
notes
  • The scroller uses a select statement as specified in the search global variable
  • the current row is held in global code1

uni_create

file iunis.4gl
declaration
function uni_create()
returns nothing
purpose Allocates memory for the text variable used by the uni scroller
example none
notes see uni_setid for more info on how to use multiple panes

uni_downstream

file iunis.4gl
declaration
function uni_downstream(im, ip)
    define im, ip	smallint
returns a message
services
  • MB_display
  • MB_open
  • MB_declare
  • MB_exit
  • All messages serviced by scroll_filter
purpose The downstream filter of the uni scroller
example none
notes none

uni_getlength

file iunis.4gl
declaration
function uni_getlength()
returns l (integer), number of lines in text
purpose returns the length in lines of the text tracked by the uni scroller.
example none
notes see uni_setid for more info on how to use multiple panes

uni_gettext

file iunis.4gl
declaration
function uni_gettext(t)
    define t	text
returns nothing
purpose Makes a copy of the text tracked by the uni scroller into the text variable t
example none
notes see uni_setid for more info on how to use multiple panes

uni_looks

file iunis.4gl
declaration
function uni_looks(frm, p)
    define frm	char(14),		# form file name
	   p	smallint		# pane lenght
returns nothing
purpose Sets appearence attributes for the uni scroller
example none
notes
  • The form needs to have a screen array containing one character field (name unimportant) for each of the panes tracked by the scroller. The name of the array is dependent on the id of the pane: s_uni if 1, s_uni<id> for all other id's.
  • see uni_setid for more info on how to use multiple panes

uni_newline

file iunis.4gl
declaration
function uni_newline(txt)
    define txt	char(78)
returns nothing
purpose Adds a new line to the text being displayed by the uni scroller
example none
notes see uni_setid for more info on how to use multiple panes

uni_retrieve

file iunis.4gl
declaration
function uni_retrieve(r)
    define r	integer
returns txt, char(78), row contents
purpose Returns the contents of a particular line.
example none
notes
  • Although the uni scroller services print requests, for multi pane viewers, it may be necessary to write more complex reports. uni_retrieve comes handy in such circumstances
  • see uni_setid for more info on how to use multiple panes

uni_scroller

file iunis.4gl
declaration
function uni_scroller(im, ip)
    define im, ip	smallint
returns a message
services Upstream: see uni_upstream
Downstream: see uni_downstream
purpose A simple text scroller
example none
notes none

uni_setid

file iunis.4gl
declaration
function uni_setid(p)
    define p	smallint
returns nothing
purpose Sets identity of the pane used by most uni_scroller routines
example none
notes uni_setid provides a mechanism to name and address different uni_scroller panes, when more than one is in use. Rather than addressing them by pane id, they are given a unique id by calling uni_setid prior to adding a new pane with uni_looks. Each pane is then addressed by invoking uni_setid prior to the invocation of the appropriate routine. The advantage of this scheme is that panes can be added to /dropped from/ shuffled in the viewer without affecting the identity of each, thus eliminating the need to correct for the changed id in the code. uni_setid can be safely skipped when the uni_Scroller is in control of only one pane.

uni_settext

file iunis.4gl
declaration
function uni_settext(t)
    define t	text
returns nothing
purpose Sets the text to be displayed by the uni scroller
example none
notes see uni_setid for more info on how to use multiple panes

uni_upstream

file iunis.4gl
declaration
function uni_upstream(im, ip)
    define im, ip	smallint
returns a message
services
  • MB_init to MB_maxupstream
  • MB_print
purpose The upstream filter of the uni scroller
example none
notes none


Please address questions or comments to marco greco
(last updated Thu, 28 March 2002 16:09:46 GMT)