BROWSEv2.5 -- Full Screen Browser & User Interaction Commands.


Contents.
===============================================================================================


This library contains the following 7 commands:

 1.- BROWSE:    Full screen CHOOSE replacement, medium font.

 2.- browse:    Full screen CHOOSE replacement, small font.
                (and here's a joke that'll ruin your day: What do you call a clairvoyant midget
                 who just broke outta jail?) [*]

 3.- confirmYN: Routine to ask the user a Yes/No question.

 4.- WARNBOX:   MSGBOX replacement which beeps and shows a warning sign along with the message.

 5.- SINPUT:    Replacement for the built-in INPUT command which returns a 0/1 flag indicating
                whether the user has acknowledged the input (via [ENTER]) or aborted it (via
                [CANCEL]).

 6.- TXTBROWSE: It's a word-wrapping, scrollable text viewer (i.e. you can't edit).

 7.- ABOUT:     Displays information about this library.



Change History.
===============================================================================================


Changes from v2.4:

 + Bug fixed in BROWSE, which prevented the multiple selection mode of returning
   all the checked items. This bug had been introduced in v2.3a.

 + Bug fixed in BROWSE, which would make the calc go haywire if you tried to use it
   as a viewer (selected item = 0) in multiple selection mode. Apparently this had been
   around since v1.0 but wasn't noticed until recently.

Changes from v2.3a:

 + TXTBROWSE has been added.

Changes from v2.3:

 + BROWSE and 'browse' have been modified to operate on lists exactly as CHOOSE.

Changes from v2.2:

 + SINPUT has been added.

Changes from v2.1:

 + WARNBOX has been added.

Changes from v2.0:

 + confirmYN now uses an internal Yes/No menu, which makes the function shorter.

Changes from v1.0:

 + BROWSE now performs the functions of both the old BROWSE and BROWSECHK routines, thus
 + BROWSECHK has been eliminated from the library.
 + confirmYN has been added.



Usage.
===============================================================================================


  1.- BROWSE

Arguments (single-choice):
3: "Title"           @ Title string
2: { c1 c2 ... cn }  @ Items
1: p                 @ Initial position

Results (if OK'd):              Results: (if CANCELed):
2: cp  @ selected item
1: 1                            1: 0

Arguments (multiple-choice):
3: "Title"             @ Title string
2: { c1 c2 ... cn }    @ Items
1: { p chk1 ... chkn } @ p is init. pos., chk1...chkn items initally checked

Results                         Results:
(if OK'd, but                   (if OK'd, and
 no items checked):              items checked):
2: cp  @ selected item          2: { chk1 ... chkn }
1: 1                            1: 1

Results (if CANCELed):
1: 0


  2.- browse: As CHOOSE, but uses small font and full screen.

browse DOES NOT support multiple-choice mode.

  3.- confirmYN:

Arguments:
1: "string"   @ this is the prompt string, may have line breaks.

Results:                                 Results:
(if the user hits 'yes')                 (if the user hits 'no', or CANCEL)
1: 1                                     1: 0

If the user hits any key other than 'yes', 'no' or CANCEL, it'll simply beep.
Basically the good thing is that it catches CANCEL so the user can't interrupt
execution without the program being able to handle it.

  4.- WARNBOX:

Arguments:
1: "string"

Results:
returns nothing to stack

  5.- SINPUT:

Arguments:
Same as built-in INPUT command. See manual for details.

Results (if OK'd):              Results: (if CANCELed):
2: "result_string"
1: 1                            1: 0

  6.- TXTBROWSE:

Arguments:
3: "Title"         @ Title string
2: any object      @ String, or any object, to view. If not a string converts into one.
1: 1/0             @ Font size: 0 = medium, 1 = small.

Results:
returns nothing to stack


---

Checksum: # 22054d
Bytes:      1258.5

Provided AS IS. Use at your own risk.

Comments to: <dberge@mx2.redestb.es> / <dberge@geocities.com>

(c)1999 Diego Berge
1999-05-30 01:56 UTC

[*] A small medium at large. :|