EGL library ConsoleLib

The Console library provides the consoleUI functionality to EGL programs. Using the ConsoleLib qualifier (for example, ConsoleLib.activateWindow) is optional.

Function Description
activateWindow (window ) Makes the specified window the active window, and updates the ConsoleLib variable activeWindow accordingly.
activateWindowByName (name) Makes the specified window the active window, and updates the ConsoleLib variable activeWindow accordingly.
cancelArrayDelete () Terminates the current delete operation in progress during the execution of a BEFORE_DELETE OpenUI event code block.
cancelArrayInsert () Terminates the current insert operation in progress during the execution of a BEFORE_INSERT OpenUI event code block.
clearActiveForm () Clears the display buffers of the all of the fields.
clearActiveWindow () Removes all displayed material from the active window.
clearFields ([consoleField{, consoleField}]) Clears the display buffers of the specified fields in the active form. If no fields are specified, all fields of the form are cleared.
clearFieldsByName (fieldName{, fieldName}) Clears the display buffers of the named fields in the active form. If no fields are named, all fields of the form are cleared.
clearForm (consoleForm) Clears the display buffers of the all of the fields.
clearWindow (window) Removes all displayed material from the specified window.
clearWindowByName (name) Removes all displayed material from the specified window.
closeActiveWindow () Clears the window from the screen, releases the resources associated with that window, and activates the previous active window.
closeWindow (window) Clears the window from the screen, releases the resources associated with that window, and activates the previous active window.
closeWindowByName (name) Clears the window from the screen, releases the resources associated with that window, and activates the previous active window
result = currentArrayCount () Returns the number of elements in the dynamic array that is associated with the current active form
result = currentArrayDataLine () Returns the number of the program record within the program array that is displayed in the current line of a screen array during or immediately after the OpenUI statement.
result = currentArrayScreenLine () Returns the number of the current screen record in its screen array during an OpenUI statement.
displayAtLine (text, line) Displays a string to a specified place within the active window.
displayAtPosition (text, line, column) Displays a string to a specified place within the active window.
displayError (msg) Causes the error window to be created and shown and displays the error message in that window.
displayFields ([consoleField{, consoleField}]) Displays form field values to the Console.
displayFieldsByName (consoleFieldName{, consoleFieldName}) Displays form field values to the Console.
displayForm (consoleForm) Displays the form to the active window.
displayFormByName (formName) Displays the form to the active window.
displayLineMode (text) Displays a string in line mode rather than form/window mode .
displayMessage (msg) Displays a string to a specified place within the active window and uses the messageLine settings of the active window to identify where to display the string.
drawBox (row, column, depth, width) Draws a rectangle in the active window with the specified location and dimensions.
drawBoxWithColor (row, column, depth, width, Color) Draws a rectangle in the active window with the specified location, dimensions, and color.
result = getKey () Reads a key from the input and returns the integer code for the key.
result = getKeyCode (keyName) Returns the key integer code of the named key in the String.
result = getKeyName (keyCode) Returns the name that represents the integer key code.
gotoField (consoleField) Moves the cursor to the specified form field.
gotoFieldByName (name) Moves the cursor to the specified form field.
gotoMenuItem (item) Moves the menu cursor to the specified menu item.
gotoMenuItemByName (name) Moves the menu cursor to the specified menu item.
hideAllMenuItems () Hides all menu items in the currently displayed menu.
hideErrorWindow () Hides the error window.
hideMenuItem (item) Hides a specified menu item so that a user cannot select it.
hideMenuItemByName (name) Hides a specified menu item so that a user cannot select it.
result = isCurrentField (consoleField) Returns true if the cursor is in the specified form field; otherwise it returns false.
result = isCurrentFieldByName (name) Returns true if the cursor is in the specified form field; otherwise it returns false.
result = isFieldModified (consoleField) Returns true if the user changed the contents of the specified form field; a false return indicates that the field has not been edited.
result = isFieldModifiedByName (name) Returns true if the user changed the contents of the specified form field; a false return indicates that the field has not been edited.
result = lastKeyTyped () Returns the integer code of the last physical key that was pressed on the keyboard.
nextField () Moves the cursor to the next form field according to the defined field travel order.
openWindow (window) Makes a window visible and adds it to the top of the window stack. The form is displayed in the window.
openWindowByName (name) Makes a window visible and adds it to the top of the window stack.
openWindowWithForm (Window, form) Makes a window visible and adds it to the top of the window stack. The Window size will change to hold the specified form if the window size was not defined when the window was declared.
openWindowWithFormByName (windowName, formName) Makes a window visible and adds it to the top of the window stack.
previousField () Moves the cursor to the previous form field according to the defined field travel order.
result = promptLineMode (prompt) Displays a prompt message to the user in a line mode environment.
scrollDownLines (numLines) Scrolls the on-screen data toward the bottom of the data by the specified number of lines.
scrollDownPage () Scrolls the on-screen data one page toward the bottom of the data.
scrollUpLines (numLines) Scrolls the on-screen data toward the top of the data by the specified number of lines.
scrollUpPage () Scrolls the on-screen data one page toward the top of the data.
setArrayLine (recordNumber) Moves the selection to the specified program record. The data table is scrolled in the display if necessary to make the selected record visible.
setCurrentArrayCount (count ) Sets how many records exist in the program array. Must be called prior to the OpenUI statement.
showAllMenuItems () Shows the all menu items for user selection.
showHelp (helpkey) Displays the ConsoleUI help screen during execution of the EGL program.
showMenuItem (item) Shows the specified menu item for user selection.
showMenuItemByName(name) Shows the specified menu item for user selection.
updateWindowAttributes(attribute {, attribute}) Updates the current active window one or more attributes.
Variables Description
activeForm The most recently displayed form in the active window.
activeWindow The topmost window, and it is the target for window operations when no window name is specified.
commentLine The window line where comment messages are displayed.
CurrentDisplayAttrs Settings applied to elements displayed through the display functions.
currentRowAttrs Highlight attributes applied to the current row.
cursorWrap If true, the cursor wraps around to the first field on the form; if false, the statement ends when the cursor moves forwards from the last input field on the form.
defaultDisplayAttributes Default settings of presentation attributes for new objects.
defaultInputAttributes The default settings of presentation attributes for input operations.
deferInterrupt If true, the program catches INTR signals and logs them in the interruptRequested variable, which the program is then responsible to monitor. On Windows®, the signal is simulated when the logical INTERRUPT key is pressed, which is CONTROL_C by default.
deferQuit If true, the program catches QUIT signals and logs them in the interruptRequested variable, which the program is then responsible to monitor. On Windows, the signal is simulated when the logical QUIT key is pressed, which is CONTROL_\ by default.
definedFieldOrder If true, the up and down arrow keys move to the previous and next fields in the traversal order. If false, up and down move to the field in that direction physically on the screen.
errorLine The window where error messages are displayed.
errorWindow The window location where error messages are displayed in the ConsoleUI screen.
errorWindowVisible If true, the error window is currently being displayed to the screen
formLine The window line where forms are displayed.
interruptRequested This indicates that an INTR signal has been received (or simulated).
key_accept Key for successful termination of OpenUI statements. Default key is ESCAPE.
key_deleteLine Key for deleting the current row from a screen array. Default key is F2.
key_help Key for showing context sensitive help during OpenUI statements. default key is CTRL_W.
key_insertLine Key for inserting a row into a screen array. Default key is F1.
key_interrupt Key for simulating an INTR signal. Default key is CTRL_C.
key_pageDown Key for paging forwards in a screen array (data table). Default key is F3.
key_pageUp Key for paging backwards in a screen array (data table). Default key is F4.
key_quit Key for simulating a QUIT signal. Default key is CTRL_\.
menuLine The window line where menus are displayed.
messageLine The window line where messages are displayed.
messageResource The file name of the resource bundle.
promptLine The number of the line at which prompts are displayed in a window
quitRequested Indicates that a QUIT signal has been received (or simulated).
screen Automatically-defined, default, borderless window; the dimensions are equal to the dimensions of the available display surface.
sqlInterrupt If yes, the user can interrupt SQL statements being processed. If no, the user can only interrupt OpenUI statements. Used in combination with the deferInterrupt and deferQuit variables.
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.