User Interface Manager Directory
Directory .ZIPThese commands are examples of command shells for many of the most useful User Interface Manager (UIM) APIs. Using UIM in CL programs may seem unusual, but the results can be excellent. The simple fact that you aren't limited to a single DCLF for a *dspf is a starting point.
I've placed a "complete" UIM demonstration application into the UIM Demo App folder here. The app. performs spelling verification over a word or phrase and can present UIM lists of alternative spellings. It's complete in the sense that it does everything I wanted it to do and it can stand completely alone, outside of any other application. But I'd hardly call it useful.
Except possibly for its value as a demonstration, that is. It not only demonstrates how many of the UIM APIs can be used (through the command shells given here), but also shows a basic use of the Check Spelling (QTWCHKSP) and Aid Spelling (QTWAIDSP) APIs. By the way, I give extremely limited discussion of the spelling APIs in the programs. You'll have to work a lot of that out for yourself.
Please read the @GENERAL DISCLAIMER document for any items you should be aware of if you download any of these items.
CMDs
ADDLSTE -- Add List Entry (QUIADDLE):
The command definition object source for QUIADDLE. This adds one new entry to a list. The new entry is inserted immediately before or immediately after the entry identified by the current entry pointer for the list. The new entry can also be inserted at the beginning or at the end of the list. On return to the application program, the current entry points to the newly inserted entry. This command is similar to an RPG WRITE that would add a record to a subfile.ADDPOPWDW -- Add Pop-Up Window (QUIADDPW):
The command definition object source for QUIADDPW. This establishes the environment to display panels within a pop-up window. All subsequent panel displays for the open application remain in the pop-up window until the Remove Pop-up Window (QUIRMVPW) API (or the RMVPOPWDW command) is called, or until the QUIADDPW API (or the ADDPOPWDW command) is called again to add another pop-up window. The maximum number of pop-up windows that can be added to an open application is 20.CLOAPP -- Close Application (QUICLOA):
The command definition object source for QUICLOA. This command closes a UIM application that was opened using the Open Display Application (QUIOPNDA) API (or the OPNDSPAPP command) or the Open Print Application (QUIOPNPA) API. The open and close APIs or commands must be used in pairs to open and close each UIM application.DLTLST -- Delete List (QUIDLTL):
The command definition object source for QUIDLTL. This command deletes an active list and provides a way for the application to start over with a new list.DSPHLPPNL -- Display Help (QUHDSPH):
The command definition object source for QUHDSPH. This command displays help information. The command displays only the extended form because of the use of constants for the 'Number of help identifiers' and 'Help type' parameters that are passed to the API. It can be formatted as a full display or in a window.For a simple example, note these variations:
Prompt the DSPUSRPRF command and notice the parameter names. Also, display the DSPUSRPRF command using DSPCMD and notice the name of the 'Help identifier'. Together, those help illustrate how the Display Help (QUHDSPH) API, or the DSPHLPPNL command, works.DSPHLPPNL HLPIDARY('DSPUSRPRF/OUTPUT'/*LIBL/QHSYCMD1) DSPHLPPNL HLPIDARY(DSPUSRPRF/*LIBL/QHSYCMD1)DSPLNGTXT -- Display Long Text (QUILNGTX):
The command definition object source for QUILNGTX. This command displays a pop-up window containing the string of text that is passed to it.The QUILNGTX API apparently does not provide any kind of formatting and this seriously limits its use. But it is handy for pop-up tips in some cases. If facilities such as <:/N> for <new-line> or <:/P> for <paragraph> were available such as with SNDDST *LMSG, I'd use this much more often.
The Display Help (QUHDSPH) API, or the DSPHLPPNL command, can be a better choice for static displays. However, DSPLNGTXT has the advantage of being dynamic. I will often use DSPLNGTXT during testing of a CLP rather than SNDPGMMSG *EXT to display values of variables.
DSPPNL -- Display Panel (QUIDSPP) -- Short version:
The command definition object source for QUIDSPP. This command displays a panel and waits for the user to press either a function key or the Enter key. This is similar to an RPG WRITE or EXFMT that would display a *dspf record format. For a list, this would be similar to WRITEing the subfile control record to cause the subfile to display.DSPPNLLNG -- Display Panel (QUIDSPP) -- Long version:
The command definition object source for QUIDSPP. This command displays a panel and waits for the user to press either a function key or the Enter key.This is the "long" version, including many optional parameters not included with DSPPNL.
GETDLGVAR -- Get Dialog Variable (QUIGETV):
The command definition object source for QUIGETV. This command allows a program to obtain the value of one or more dialog variables by specifying the application program's variable buffer and the name of a variable record defined in the panel group for the open application. This might be used after a panel was displayed and user input had happened in order to retrieve that input.GETLSTE -- Get List Entry (QUIGETLE):
The command definition object source for QUIGETLE. This command accesses an entry in a list and optionally updates the corresponding dialog variables to the values in the list entry.OPNDSPAPP -- Open Display Application (QUIOPNDA):
The command definition object source for QUIOPNDA. This command initiates a UIM display application by opening the panel group that the application program specifies. The QUIOPNDA API (or the OPNDSPAPP command) and the Close Application (QUICLOA) API (or the CLOAPP command) must be used in pairs to open and close each UIM display application.PUTDLGVAR -- Put Dialog Variable (QUIPUTV):
The command definition object source for QUIPUTV. This command updates the value of one or more dialog variables by specifying the variable buffer of the application program and naming the variable record defined in the panel group for the open application. This is used before displaying a panel in order to put values where UIM can get them to place on the panels. This is similar to MOVEing values into fields in a record format before WRITEing that format.RMVPOPWDW -- Remove Pop-Up Window (QUIRMVPW):
The command definition object source for QUIRMVPW. This command removes the pop-up window created by the Add Pop-Up Window (QUIADDPW) API (or the ADDPOPWDW command). After calling the QUIRMVPW API (or the RMVPOPWDW command), subsequent calls to the Display Panel (QUIDSPP) API (or the DSPPNL command) display either a full-screen panel or a panel in a pop-up window defined by a previous call of the QUIADDPW API (or the ADDPOPWDW command).SETLSTATR -- Set List Attributes (QUISETLA):
The command definition object source for QUISETLA. This command sets the following list attributes:
- The list contents attribute, which indicates whether or not all entries are present in the list and which entries are missing if it is incomplete
- The name of the dialog variable that identifies the program the UIM calls when additional entries are needed in an incomplete list
- The display position attribute, which is the list entry handle for the entry presented at the top row of a list area displaying the list
- An attribute indicating whether or not the UIM trims the list if the maximum list size is exceeded when adding a new entry to the list.
SETSCRIMG -- Set Screen Image (QUISETSC):
The command definition object source for QUISETSC. This command establishes the screen image for a UIM application. This API is used when a pop-up window is displayed over a panel that was not displayed using the same UIM application. Think of this as being related to RSTDSP(*YES) for display files.