HB_Alert

HB_Alert

Displays a text-mode dialog box with a message.

Syntax

      HB_Alert( <xMessage>, [<aOptions>], [<cColor>], [<nDelay>] ) --> nChoice

Arguments

<xMessage> : The message to display. May be any data type. Character string may be divided display lines by the semicolon

<aOptions> : An array with available response as character strings. Default is { “Ok” }.

<cColor> : A string as color codes. Default color is “W+/R”.

<nDelay> : Number of seconds to wait to user response before abort. Default value is 0, that wait forever.

Returns

A numeric value indicating the ordinal position within <aOption> selected by the user. Zero value means that user pressed escape key.

If <nDelay> is specified and this number of seconds has elapsed without a key press, the return value is 1.

Description

HB_Alert() displays a dialog box and lets the user select an option. The user can move a highlight bar using arrow keys or the TAB key. To select an option, the user can press ENTER, SPACE or the first letter of an option.

HB_Alert() is extended version of Alert() to support all variables types (not just strings) is passed as first parameter.

Example

      // This example displays a message with two line : file name and 'not found' message.
      // After 15 seconds without user response, assumed 'Abort' selected.

      FUNCTION FNFMessage( cFileName )

         LOCAL cMessage, aOptions, nChoice

         aMessage := { cFileName, 'Not found !' }
         aOptions :=  { 'Abort', 'Retry', 'Skip' }

         nChoice := HB_Alert( aMessage, aOptions, , 15 )

      RETURN nChoice // FNFMessage()

Seealso

@…PROMPT, AChoice(), Alert(), DispBox(), DispOut(), MENU TO

@…TO

@…TO

Draw a single- or double-line box

Syntax

       @ <nTop>, <nLeft>
              TO <nBottom>, <nRight> [DOUBLE] [COLOR <cColorString>]

Arguments

<nTop>, <nLeft>, <nBottom>, and <nRight> define the coordinates of the box. @…TO draws the box using row values from zero to MAXROW() and column values from zero to MAXCOL(). <nBottom> and <nRight> can be larger than the screen size, but output is clipped at MAXROW() and MAXCOL().

DOUBLE draws the box with a double line. If not specified, the box is drawn with a single line.

COLOR <cColorString> defines the display color of the drawn box. If not specified, the box is drawn using the standard color setting of the current system color as defined by SETCOLOR(). Note that <cColorString> is a character expression containing the standard color setting. If you specify a literal color setting, enclose it within quote marks.

Description

@…TO draws a single- or double-line box on the screen. If <nTop> and <nBottom> are the same, a horizontal line is drawn. If <nLeft> and <nRight> are the same, a vertical line is drawn.

After @…TO finishes drawing, the cursor is located in the upper-left corner of the boxed region at <nTop> + 1 and <nLeft> + 1. ROW() and COL() are also updated to reflect the new cursor position.

@…TO is like @…BOX except that @…BOX lets you define the characters of the box and supports a fill character. @…TO, however, is recommended for portability since it does not require the specification of hardware-dependent graphics characters.

Examples

       .  This example erases a region of the screen, then draws a box
       of the same size:

       @ 10, 10 CLEAR TO 20, 40
       @ 10, 10 TO 20, 40 DOUBLE COLOR "BG+/B"

Seealso

@…BOX, @…CLEAR, DISPBOX()

@…BOX

@…BOX

Draw a box on the screen

Syntax

       @ <nTop>, <nLeft>, <nBottom>, <nRight>
              BOX <cBoxString> [COLOR <cColorString>]

Arguments

<nTop>, <nLeft>, <nBottom>, <nRight> define the coordinates of the box. @…BOX draws a box using row values from zero to MAXROW(), and column values from zero to MAXCOL(). If <nBottom> and <nRight> are larger than MAXROW() and MAXCOL(), the bottom-right corner is drawn off the screen.

BOX <cBoxString> defines a string of eight border characters and a fill character. If <cBoxString> is specified as a single character, that character draws the whole box.

COLOR <cColorString> defines the display color of the drawn box. If not specified, the box is drawn using the standard color setting of the current system color as defined by SETCOLOR(). Note that <cColorString> is a character expression containing the standard color setting. If you want to specify a literal color setting, enclose it within quote marks.

Description

@…BOX draws a box on the screen using configurable border and fill characters. @…BOX draws the box using <cBoxString> starting from the upper left-hand corner, proceeding clockwise and filling the screen region with the ninth character. If the ninth character is not specified, the screen region within the box is not painted. Existing text and color remain unchanged.

After @…BOX executes, the cursor is located in the upper corner of the boxed region at <nTop> + 1 and <nLeft> + 1. ROW() and COL() are also updated to reflect the new cursor position.

Examples

       .  These examples draw two boxes using box manifest constants
       defined in the supplied header file, Box.ch.  The first example draws
       a box using the specified characters for the border, but leaves all
       other areas of the screen intact.  The second example draws the same
       box filling the box region with space characters.

       #include "Box.ch"
       // Draw a box with a double-line top with a
       // single-line side
       @ 1, 1, 22, 79 BOX B_DOUBLE_SINGLE
       // Draw the same box filling the box region with
       // spaces
       @ 1, 1, 22, 79 BOX B_DOUBLE_SINGLE + SPACE(1)

Files

Header file is Box.ch.

Seealso

@…CLEAR, @…TO, DISPBOX(), SCROLL()

SP_SBUNSHADOW

SBUNSHADOW()

  Short:
  ------
  SBUNSHADOW() Removes shadow drawn with SBSHADOW()

  Returns:
  --------
  Nil

  Syntax:
  -------
  SBUNSHADOW(aSaved)

  Description:
  ------------
  Removes a shadow around a box created with
  SBSHADOW(). SBSHADOW() returns an array containing the
  coordinates and saved screens for each side of the shadow.
  SBUNSHADOW uses this array to restore the previous screens.

  Examples:
  ---------
   Dispbox(10,10,20,20)
   aSaved := sbshadow(10,10,20,20,3,8)
             // draws a shadow in the lower right
                              // of color gray on black
   sbunshadow(aSaved)         // restore old screen

  Source:
  -------
  S_BOXES.PRG

 

SP_SBSHADOW

SBSHADOW()

  Short:
  ------
  SBSHADOW() Draw a shadow around a box

  Returns:
  --------
  <aSaved> => an array containing the two saved screen
  sections

  Syntax:
  -------
  SBSHADOW(nTop,nLeft,nBottom,nRight,nShadowPos,nShadowAtt)

  Description:
  ------------
  Draws a shadow for box described in coordinates
  <nTop,nLeft,nBotton,nRight>

  The shadow is of color <nShadowAtt> and is at
  position <nShadowPos>, which is one of the following:

      LOWER LEFT    1
      LOWER RIGHT   3
      UPPER LEFT    7
      UPPER RIGHT   9

  Returns an array with the saved screens for each side
  of the shadow.

  This array can be passed to SBUNSHADOW() for
  restoring the previous screen.

  Examples:
  ---------
   Dispbox(10,10,20,20)
   aSaved := sbshadow(10,10,20,20,3,8)
              // draws a shadow in the lower right
              // of color gray on black
   sbunshadow(aSaved)         // restore old screen

  otes

  Source:
  -------
  S_BOXES.PRG

 

SP_CLS

CLS()

  Short:
  ------
  CLS() Clear the screen with optional color,character

  Returns:
  --------
  Nothing

  Syntax:
  -------
  CLS([nAttribute],[cChar])

  Description:
  ------------
  Clear the screen.

  Optional color [nAttribute] and character [cChar].

  Examples:
  ---------
   CLS()   // clears screen with current color

   CLS(48) // clears screen with black on cyan

   CLS(8,chr(177))  // clears screen grey on black
                    // with character 177

  Notes:
  -------
  Of course in Clipper 5.01 you can also do:
  dispbox(0,0,24,79,repl(chr(177),9),"+N/N") and get the same
  result.

  Source:
  -------
  S_CLS.PRG

 

C5_DISPBOX

 DISPBOX()
 Display a box on the screen
------------------------------------------------------------------------------
 Syntax

     DISPBOX(<nTop>, <nLeft>, <nBottom>, <nRight>,
        [<cnBoxString>], [<cColorString>]) --> NIL

 Arguments

     <nTop>, <nLeft>, <nBottom>, and <nRight> define the
     coordinates of the box.  DISPBOX() draws a box using row values from
     zero to MAXROW(), and column values from zero to MAXCOL().  If <nBottom>
     and <nRight> are larger than MAXROW() and MAXCOL(), the bottom-right
     corner is drawn off the screen.

     <cnBoxString> is a numeric or character expression that defines the
     border characters of the box.  If specified as a numeric expression, a
     value of 1 displays a single-line box and a value of 2 displays a
     double-line box.  All other numeric values display a single-line box.

     If <cnBoxString> is a character expression, it specifies the characters
     to be used in drawing the box.  This is a string of eight border
     characters and a fill character.  If <cnBoxString> is specified as a
     single character, that character is used to draw the whole box.

     If this argument is not specified, a single-line box is drawn.

     <cColorString> defines the display color of the box that is drawn.
     If not specified, the box is drawn using the standard color setting of
     the current system color as defined by SETCOLOR().

 Returns

     DISPBOX() always returns NIL.

 Description

     DISPBOX() is a screen function that draws a box at the specified display
     coordinates in the specified color.  If you specify <cnBoxString>,
     DISPBOX() draws a box on the screen using configurable border and fill
     characters.  DISPBOX() draws the box using <cnBoxString> starting from
     the upper left-hand corner, proceeding clockwise and filling the screen
     region with the ninth character.  If the ninth character is not
     specified, the screen region within the box is not painted.  Existing
     text and color remain unchanged.

     In cases where cnBoxString respects Clipper conventions, the behavior
     of DISPBOX() is unchanged.  The behavior of this function can easily be
     modified to take advantage of graphic mode.  For example, you can
     replace the standard window frames using single or double lines with new
     graphical frames that have an impressive 3-D look.  Simply replace the
     cBoxString parameter using the following:

     CHR(2) + CHR(nColor+1) // draws a box of thickness 16x8x16x8
     CHR(3) + CHR(nColor+1) // draws a box of thickness 8x8x8x8
     CHR(4) + CHR(nColor+1) // draws a box of thickness

                            // 16x16x16x16
     CHR(5) + CHR(nColor+1) // draws a box of thickness 16x8x8x8

     Note that <nColor> is a numeric color representation.  You must add 1 to
     this value.

     In general, CHR(2) + CHR(nColor+1) can be used instead of Clipper's
     B_SINGLE or B_DOUBLE defines.

     Clipper graphics comes with two #defines LLG_BOX_GRAY_STD and
     LLG_BOX_GRAY_SQUARE to allow gray (nColor=7) boxes of width 16x8 or
     16x16.

     You can completely customize the box by passing chr(1) + ... as the
     first parameter:

     CHR(1)             + ;  // Box entirely defined
     CHR(nBackColor+1)  + ;  // Color used as background fill
     CHR(nLightColor+1) + ;  // Color used to lighten the frame
     CHR(nDarkColor+1)  + ;  // Color used to darken the frame
     CHR(nWidthUp)      + ;  // Thickness of upper edge of box
     CHR(nWidthRight)   + ;  // Thickness of right edge of box
     CHR(nWidthDown)    + ;  // Thickness of lower edge of box
     CHR(nWidthLeft)         // Thickness of left edge of box

     After DISPBOX() executes, the cursor is located in the upper corner of
     the boxed region at <nTop> + 1 and <nLeft> + 1.  ROW() and COL() are
     also updated to reflect the new cursor position.

     Note that Box.ch, located in \CLIP53\INCLUDE, provides constants for
     various border configurations.

 Notes

     The number of colors available depends on the current video mode setting
     ( SET VIDEOMODE ).

 Examples

     .  This code example displays a double-line box using a numeric
        value to specify the box border:

        #define B_SINGLE   1
        #define B_DOUBLE   2
        //
        DISPBOX(1, 1, 10, 10, B_DOUBLE, "BG+/B")

     .  This example displays a single-line top and double-line side
        box by specifying border characters with a manifest constant defined
        in Box.ch:

        #include "Box.ch"
        //
        DISPBOX(1, 1, 10, 10, B_SINGLE_DOUBLE, "BG+/B")

     .  This example displays a box with a 3-D look.  It can be used
        for graphic mode:

        // Display a box with a 3D look of constant width 16x16x16x16
        DISPBOX( nTop, nLeft, nBottom, nRight, LLG_BOX_GRAY_SQUARE )
        // Write some transparent text in the 3D frame
        GWRITEAT(  nLeft * GMODE()[LLG_MODE_FONT_COL] ,;
        nTop  * GMODE()[LLG_MODE_FONT_ROW] ,;
        "This is some Text...",;
        4,;
        LLG_MODE_SET; )

 Files   Library is LLIBG.LIB, header file is Llibg.ch.

See Also: GFRAME() GMODE() SET VIDEOMODE

 

C5 UI Commands & Functions

C5 User Interface Commands and Functions

Global Settings :

SET CENTURY :

Modify the date format to include or omit century digits

SET CENTURY on | OFF | <xlToggle>

SET COLOR* :

Define screen colors

SET COLOR | COLOUR TO [[<standard>]
    [,<enhanced>] [,<border>] [,<background>]
    [,<unselected>]] | (<cColorString>)

SET CONFIRM :

Toggle required exit key to terminate GETs

SET CONFIRM on | OFF | <xlToggle>

SET CONSOLE :

Toggle console display to the screen

SET CONSOLE ON | off | <xlToggle>

SET CURSOR :

Toggle the screen cursor on or off

SET CURSOR ON | off | <xlToggle>

SET DATE :

Set the date format for input and display

SET DATE FORMAT [TO] <cDateFormat>
SET DATE [TO] AMERICAN | ansi | british | french
    | german | italian | japan | usa

SET DECIMALS :

Set the number of decimal places displayed

SET DECIMALS TO [<nDecimals>]

SET DELIMITERS :

Toggle or define GET delimiters

SET DELIMITERS on | OFF | <xlToggle>
SET DELIMITERS TO [<cDelimiters> | DEFAULT]

SET DEVICE :

Direct @…SAYs to the screen or printer

SET DEVICE TO SCREEN | printer

SET EPOCH :

Control the interpretation of dates with no century digits

SET EPOCH TO <nYear>

SET FIXED :

Toggle fixing of the number of decimal digits displayed

SET FIXED on | OFF | <xlToggle>

SETBLINK() :

Toggle asterisk (*) interpretation in SET COLOR

SETBLINK([<lToggle>]) --> lCurrentSetting

SETCOLOR() :

Return the current colors and optionally set new colors

SETCOLOR([<cColorString>]) --> cColorString

SETCURSOR() :

Set the cursor shape

SETCURSOR([<nCursorShape>]) --> nCurrentSetting

SETMODE() :

Change display mode to specified number of rows and columns

SETMODE(<nRows>, <nCols>) --> lSuccess

SETPOS() :

Move the cursor to a new position

SETPOS(<nRow>, <nCol>) --> NIL

User Input :

CLEAR TYPEAHEAD :

Empty the keyboard buffer

CLEAR TYPEAHEAD

INKEY() :

Extract a character from the keyboard buffer

 
INKEY( [ <nSeconds> ] ) --> nInkeyCode

KEYBOARD :

Stuff a string into the keyboard buffer

KEYBOARD <cString>

LASTKEY() :

Return the INKEY() value of the last key in the buffer

LASTKEY() --> nInkeyCode

NEXTKEY() :

Read the pending key in the keyboard buffer

NEXTKEY() --> nInkeyCode

SET TYPEAHEAD :

Set the size of the keyboard buffer

SET TYPEAHEAD TO <nKeyboardSize>

Basic :

?/?? :

Display one or more values to the console

? | ?? [<exp list>]

@…BOX :

Draw a box on the screen

@ <nTop>, <nLeft>, <nBottom>, <nRight>
  BOX <cBoxString> [COLOR <cColorString>]

@…CLEAR :

Clear a rectangular region of the screen

@ <nTop>, <nLeft> [CLEAR
  [TO <nBottom>, <nRight>]]

@…SAY :

Display data at a specified screen or printer row and column

@ <nRow>, <nCol>
    [SAY <exp>
    [PICTURE <cSayPicture>]
    [COLOR <cColorString>]]
    GET <idVar>
    [PICTURE <cGetPicture>]
    [COLOR <cColorString>]
    [WHEN <lPreExpression>]
    [RANGE* <dnLower>, <dnUpper>] |
    [VALID <lPostExpression>]

@…TO :

Draw a single or double line box

@ <nTop>, <nLeft>
    TO <nBottom>, <nRight> [DOUBLE] [COLOR
    <cColorString>]

ACCEPT :

Place keyboard input into a memory variable

ACCEPT [<expPrompt>] TO <idVar>

INPUT :

Enter the result of an expression into a variable

INPUT [<expPrompt>] TO <idVar>

 

ALERT() :

Display a simple modal dialog box

ALERT( <cMessage>, [<aOptions>] ) --> nChoice

CLEAR SCREEN :

Clear the screen and home the cursor

CLEAR [SCREEN] | CLS

COL() :

Return the screen cursor column position

COL() --> nCol

COLORSELECT()

                Activate attribute in current color settings

   COLORSELECT(<nColorIndex>) --> NIL

DEVOUT() :

Write a value to the current device

DEVOUT(<exp>, [<cColorString>]) --> NIL

DEVOUTPICT() :

Write a value to the current device using a picture clause

DEVOUTPICT(<exp>, <cPicture>, [<cColorString>]) --> NIL

           DEVPOS() :

Move the cursor or printhead to a new position depending on the

current device

        DEVPOS(<nRow>, <nCol>) --> NIL

DISPBEGIN() :

Begin buffering screen output

DISPBEGIN() --> NIL

DISPBOX() :

Display a box on the screen

DISPBOX(<nTop>, <nLeft>, <nBottom>, <nRight>,
    [<cnBoxString>], [<cColorString>]) --> NIL

DISPCOUNT() :

Return the number of pending DISPEND() requests

DISPCOUNT() --> nDispCount

DISPEND() :

Display buffered screen updates

DISPEND() --> NIL

DISPOUT() :

Write a value to the display

DISPOUT(<exp>, [<cColorString>]) --> NIL

OUTERR() :

Write a list of values to the standard error device

OUTERR(<exp list>) --> NIL

OUTSTD() :

Write a list of values to the standard output device

OUTSTD(<exp list>) --> NIL

QOUT() :

Display a list of expressions to the console

QOUT([<exp list>]) --> NIL
QQOUT([<exp list>]) --> NIL

RESTORE SCREEN* :

Display a saved screen

RESTORE SCREEN [FROM <cScreen>]

RESTSCREEN() :

Display a saved screen region to a specified location

RESTSCREEN([<nTop>], [<nLeft>],
    [<nBottom>], [<nRight>], <cScreen>) --> NIL

ROW() :

Return the screen row position of the cursor

ROW() --> nRow

SAVE SCREEN* :

Save current screen to a buffer or variable

SAVE SCREEN [TO <idVar>]

SAVESCREEN() :

Save a screen region for later display

SAVESCREEN([<nTop>], [<nLeft>],
    [<nBottom>], [<nRight>]) --> cScreen

SCROLL() :

Scroll a screen region up or down

SCROLL([<nTop>], [<nLeft>],
     [<nBottom>], [<nRight>], [<nVert>] [<nHoriz>])
 --> NIL

TYPE :

Display or print the contents of a text file

TYPE <xcFile> [TO PRINTER] [TO FILE <xcOutFile>]

Advanced :

ACHOICE() :

Execute a pop-up menu

ACHOICE(<nTop>, <nLeft>, <nBottom>, <nRight>,
    <acMenuItems>,
    [<alSelectableItems> | <lSelectableItems>],
    [<cUserFunction>],
    [<nInitialItem>],
    [<nWindowRow>]) --> nPosition

BROWSE()* :

Browse records within a window

BROWSE([<nTop>], [<nLeft>],
    [<nBottom>], [<nRight>]) --> lSuccess

DBEDIT() :

Browse records in a table format

DBEDIT( [<nTop>], [<nLeft>],
    [<nBottom>], <nRight>],
    [<acColumns>],
    [<cUserFunction>],
    [<acColumnSayPictures> | <cColumnSayPicture>],
    [<acColumnHeaders> | <cColumnHeader>],
    [<acHeadingSeparators> | <cHeadingSeparator>],
    [<acColumnSeparators> | <cColumnSeparator>],
    [<acFootingSeparators> | <cFootingSeparator>],
    [<acColumnFootings> | <cColumnFooting>]) --> NIL

DISPLAY :

Display records to the console

DISPLAY <exp list>
    [TO PRINTER] [TO FILE <xcFile>]
    [<scope>] [WHILE <lCondition>]
    [FOR <lCondition>] [OFF]

LIST :

List records to the console

LIST <exp list>
    [TO PRINTER] [TO FILE <xcFile>]
    [<scope>] [WHILE <lCondition>]
    [FOR <lCondition>] [OFF]

LABEL FORM :

Display labels to the console

LABEL FORM <xcLabel>
    [TO PRINTER] [TO FILE <xcFile>] [NOCONSOLE]
    [<scope>] [WHILE <lCondition>] [FOR <lCondition>]
    [SAMPLE]

REPORT FORM :

Display a report to the console

REPORT FORM <xcReport>
    [TO PRINTER] [TO FILE <xcFile>] [NOCONSOLE]
    [<scope>] [WHILE <lCondition>] [FOR <lCondition>]
    [PLAIN | HEADING <cHeading>] [NOEJECT] [SUMMARY]

TEXT :

Display a literal block of text

TEXT [TO PRINTER] [TO FILE <xcFile>]
    <text>...
ENDTEXT

GET System :

Standard :

@…GET :

Create a new Get object and display it on the screen

@ <nRow>, <nCol>
    [SAY <exp>
    [PICTURE <cSayPicture>]
    [COLOR <cColorString>]]
    GET <idVar>
    [PICTURE <cGetPicture>]
    [COLOR <cColorString>]
    [WHEN <lPreExpression>]
    [RANGE* <dnLower>, <dnUpper>] |
    [VALID <lPostExpression>]

CLEAR GETS :

Release Get objects from the current GetList array

CLEAR GETS

READ :

Activate full-screen editing mode using Get objects

READ [SAVE]

READEXIT() :

Toggle Uparrow and Downarrow as READ exit keys

READEXIT([<lToggle>]) --> lCurrentState

READINSERT() :

Toggle the current insert mode for READ and MEMOEDIT()

READINSERT([<lToggle>]) --> lCurrentMode

READKEY()* :

Determine what key was used to terminate a READ

READKEY() --> nReadkeyCode

READMODAL() :

Activate a full-screen editing mode for a GetList

READMODAL(<aGetList>) --> NIL

READVAR() :

Return the current GET/MENU variable name

READVAR() --> cVarName

SET ESCAPE :

Toggle Esc as a READ exit key

SET ESCAPE ON | off | <xlToggle>

SET FORMAT :

Activate a format when READ is executed

SET FORMAT TO [<idProcedure>[.<ext>]]

SET INTENSITY :

Toggle enhanced display of GETs and PROMPTs

SET INTENSITY ON | off | <xlToggle>

SET SCOREBOARD :

Toggle the message display from READ or MEMOEDIT()

SET SCOREBOARD ON | off | <xlToggle>

UPDATED() :

Determine if any GET changed during a READ

UPDATED() --> lChange

Getsys.prg Functions :

GETACTIVE() :

Return the currently active Get object

GETACTIVE() --> objGet

GETAPPLYKEY() :

Apply a key to a Get object from within a Get reader

GETAPPLYKEY(<oGet>, <nKey>) --> NIL

GETDOSETKEY() :

Process SET KEY during Get editing

GETDOSETKEY(<oGet>) --> NIL

GETPOSTVALIDATE() :

Postvalidate the current Get object

GETPOSTVALIDATE(<oGet>) --> lSuccess

GETPREVALIDATE() :

Prevalidate a Get object

GETPREVALIDATE(<oGet>) --> lSuccess

GETREADER() :

Execute standard READ behavior for a Get object

GETREADER(<oGet>) --> NIL

READFORMAT() :

Return, and optionally set, the format file code block

READFORMAT([<bFormat>]) --> bCurrentFormat

READKILL() :

Return, and optionally set, the READ terminate flag

READKILL([<lKillRead>]) --> lCurrentSetting

READUPDATED() :

Return, and optionally set, whether a Get changed

READUPDATED([<lChanged>]) --> lCurrentSetting

GET Class :

Class Function :

GetNew() : Create a new Get object

Exported Instance Variables :

badDate : Indicates if the editing buffer contains an invalid date
block : Code block to associate Get with a variable
buffer : Character value that defines the editing buffer
cargo : User-definable variable
changed : Indicates whether the Get:buffer has changed
clear : Indicates whether the editing buffer should be cleared
col : Get column number
colorSpec : Display attributes string
decPos : Decimal point position within the editing buffer
exitState : Means by which the user exited the Get
hasFocus : Indicates whether or not the Get object has input focus
minus : Indicates whether or not a minus sign has been entered
name : Get variable name
original : Character string containing the original value of the Get
picture : PICTURE string
pos : Current cursor position within the editing buffer
postBlock : Code block to validate a newly entered value
preBlock : Code block to decide if editing is permitted
reader : Contains a block to affect READ behavior on a Get object
rejected : Indicates if last insert/overStrike character was rejected
row : Get row number
subscript : Information about array Get objects .
type : Get variable data type
typeOut : Indicates attempt to move the cursor out of editing buffer

Exported Methods :

State Change Methods :

assign() : Assigns the editing buffer contents to the Get variable
colorDisp() : Changes a Get object’s color and then redisplay it
display() : Displays the Get on the screen .
killFocus() : Takes input focus away from the Get object
reset() : Resets the internal state information of the Get
setFocus() : Gives input focus to the Get object
undo() : Sets the Get variable back to Get:original
unTransform() : Converts character value to its original data type
updateBuffer() : Updates the editing buffer and redisplays the Get
varGet() : Returns the current value of the Get variable
varPut() : Sets the Get variable to the passed value

Cursor Movement Methods :

end() : Moves the cursor to the rightmost position
home() : Moves the cursor to the leftmost position
left() : Moves the cursor left one character
right() : Moves the cursor right one character
toDecPos() : Moves the cursor to the immediate right of Get:decPos
wordLeft() : Moves the cursor left one word
wordRight() : Moves the cursor right one word

Editing Methods :

backspace() : Moves the cursor to the left and deletes one character
delete() : Deletes the character under the cursor
delEnd() : Deletes from current cursor position to the end of the Get
delLeft() : Deletes the character to the left of the cursor
delRight() : Deletes the character to the right of the cursor
delWordLeft() : Deletes the word to the left of the cursor
delWordRight() : Deletes the word to the right of the cursor

Text Entry Methods :

insert() : Inserts characters into the editing buffer
overStrike() : Overwrites characters in the editing buffer

Menu System :

@…PROMPT :

Paint a menu item and define a message

@ <nRow>, <nCol> PROMPT <cMenuItem>
     [MESSAGE <cExpression>]

MENU TO :

Execute a lightbar menu for defined PROMPTs

     MENU TO <idVar>

          MENUMODAL :

Activate a top bar menu

         MENUMODAL(<oTopBar>, <nSelection>, <nMsgRow>,
             <nMsgLeft>, <nMsgRight>, <cMsgColor>) --> MenuID

SET MESSAGE :

Set the @…PROMPT message line row

SET MESSAGE TO [<nRow> [CENTER | CENTRE]]

SET INTENSITY :

Toggle enhanced display of GETs and PROMPTs

SET INTENSITY ON | off | <xlToggle>

SET WRAP :

Toggle wrapping of the highlights in MENUs

SET WRAP on | OFF | <xlToggle>

Browse Classes :

TBrowse :

Provides objects for browsing table-oriented data.

Description :

A TBrowse object is a general purpose browsing mechanism for table-oriented data. TBrowse objects provide a sophisticated architecture for acquiring, formatting, and displaying data. Data retrieval and file positioning are performed via user-supplied code blocks, allowing a high degree of flexibility and interaction between the browsing mechanism and the underlying data source. The format of individual data items can be precisely controlled via the TBColumn data retrieval code blocks; overall display formatting and attributes can be controlled by sending appropriate messages to the TBrowse object.

A TBrowse object relies on one or more TBColumn objects. A TBColumn object contains the information necessary to define a single column of the browse table (see TBColumn class in this chapter).

During operation, a TBrowse object retrieves data by evaluating code blocks. The data is organized into rows and columns and displayed within a specified rectangular region of the screen. The TBrowse object maintains an internal browse cursor. The data item on which the browse cursor rests is displayed in a highlighted color. (The actual screen cursor is also positioned to the first character of this data item.)

Initially, the browse cursor is placed on the data item at the top left of the browse display. Messages can then be sent to the TBrowse object to navigate the displayed data, causing the browse cursor to move. These messages are normally sent in response to user keystrokes.

New data is automatically retrieved as required by navigation requests. When navigation proceeds past the edge of the visible rectangle, rows or columns beyond that edge are automatically brought into view. When new rows are brought into view, the underlying data source is repositioned by evaluating a code block.

Note: TBrowse objects do not clear the entire window before output during redisplay operations. Part of the window may still be cleared when data from the existing display is scrolled.

Class Functions :

TBrowseNew() :

Create a new TBrowse object

 TBrowseNew(<nTop>, <nLeft>, <nBottom>, <nRight>)
 --> objTBrowse

Returns a new TBrowse object with the specified coordinate settings. The TBrowse object is created with no columns and no code blocks for data positioning. These must be provided before the TBrowse object can be used.

TBrowseDB() :

Create a new TBrowse object for browsing a database file

 TBrowseDB(<nTop>, <nLeft>, <nBottom>, <nRight>)
 --> objTBrowse

Returns a new TBrowse object with the specified coordinate settings and default code blocks for data source positioning within database files. The default code blocks execute the GO TOP, GO BOTTOM, and SKIP operations.

Note that TBrowseDB() creates an object with no column objects. To make the TBrowse object usable, you must add a column for each field to be displayed

Exported Instance Variables:

autoLite : Logical value to control highlighting
cargo : User-definable variable
colCount : Number of browse columns
colorSpec : Color table for the TBrowse display
colPos : Current cursor column position
colSep : Column separator character
footSep : Footing separator character
freeze : Number of columns to freeze
goBottomBlock : Code block executed by TBrowse:goBottom()
goTopBlock : Code block executed by TBrowse:goTop()
headSep : Heading separator character
hitBottom : Indicates the end of available data
hitTop : Indicates the beginning of available data
leftVisible : Indicates position of leftmost unfrozen column in display
nBottom : Bottom row number for the TBrowse display
nLeft : Leftmost column for the TBrowse display
nRight : Rightmost column for the TBrowse display
nTop : Top row number for the TBrowse display
rightVisible : Indicates position of rightmost unfrozen column in display
rowCount : Number of visible data rows in the TBrowse display
rowPos : Current cursor row position
skipBlock : Code block used to reposition data source
stable : Indicates if the TBrowse object is stable

Exported Methods:

Cursor Movement Methods :

down() : Moves the cursor down one row
end() : Moves the cursor to the rightmost visible data column
goBottom() : Repositions the data source to the bottom of file
goTop() : Repositions the data source to the top of file
home() : Moves the cursor to the leftmost visible data column
left() : Moves the cursor left one column
pageDown() : Repositions the data source downward
pageUp() : Repositions the data source upward
panEnd() : Moves the cursor to the rightmost data column
panHome() : Moves the cursor to the leftmost visible data column
panLeft() : Pans left without changing the cursor position
panRight() : Pans right without changing the cursor position
right() : Moves the cursor right one column
up() : Moves the cursor up one row

Miscellaneous Methods :

addColumn() : Adds a TBColumn object to the TBrowse object
colorRect() : Alters the color of a rectangular group of cells
colWidth() : Returns the display width of a particular column
configure() : Reconfigures the internal settings of the TBrowse object
deHilite() : Dehighlights the current cell
delColumn() : Delete a column object from a browse
forceStable() : Performs a full stabilization .
getColumn() : Gets a specific TBColumn object
hilite() : Highlights the current cell
insColumn() : Insert a column object in a browse
invalidate() : Forces redraw during next stabilization
refreshAll() : Causes all data to be refreshed during the next stabilize
refreshCurrent() : Causes the current row to be refreshed on next stabilize
setColumn() : Replaces one TBColumn object with another
stabilize() : Performs incremental stabilization

TBColumn :

Provides the column objects TBrowse objects.

Description :

A TBColumn object is a simple object containing the information needed to fully define one data column of a TBrowse object (see the TBrowse reference in this chapter). TBColumn objects have no methods, only exported instance variables.

Class Function :

TBColumnNew() :

Create a new TBColumn object.

TBColumnNew(<cHeading>, <bBlock>) --> objTBColumn

Exported Instance Variables :

block : Code block to retrieve data for the column
cargo : User-definable variable
colorBlock : Code block that determines color of data items
colSep : Column separator character
defColor : Array of numeric indexes into the color table
footing : Column footing
footSep : Footing separator character
heading : Column heading
headSep : Heading separator character
width : Column display width

Example :

This example is a code fragment that creates a TBrowse object and adds some TBColumn objects to it:

USE Customer NEW
//
// Create a new TBrowse object
objBrowse := TBrowseDB(1, 1, 23, 79)
//
// Create some new TBColumn objects and
// add them to the TBrowse object
objBrowse:addColumn(TBColumnNew( "Customer", ;
                    {|| Customer->Name} ))
objBrowse:addColumn(TBColumnNew( "Address", ;
                    {|| Customer->Address} ))
objBrowse:addColumn(TBColumnNew( "City", ;
                    {|| Customer->City} ))
.
. <statements to actually browse the data>
.
CLOSE Customer

For a simple and working sample look at here.