WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall I_LDINP(window_id, [channel], window_name, [D_NOPLC], [search], [error] & [, saved_name])
Returned with the ID of the input window. (n)
(optional) The channel of the window library. If not passed, g_utlib is used. (n)
The name of the window to load (a maximum of 15 characters). (a)
(optional) Don’t place the loaded input window on the screen. (n)
(optional) The search variable. (n)
(optional) The error return variable. (n)
(optional) The name of the window when it was originally saved. (a)
I_LDINP loads an input window from a library. An input window must be loaded before it can be referenced by any other I_xxx routine.
When an input window is loaded, all associated selection windows are also loaded. These selection windows are marked as being owned by the input window. When you delete the window (with U_WINDOW or E_EXIT), the selection windows using the .FIELD SELECT qualifier are also deleted. (Those using the .FIELD SELWND qualifier are not.)
If you pass a null string (“ ”) for window_name, Toolkit assigns a unique window name in the form _W_nnn, where nnn is the window ID. You must pass saved_name in this case.
If you want to create multiple instances of the same window, you can call I_LDINP as many times as you need, using window_name to give each succeeding window a new unique name. You must also pass saved_name, if window_name is different than the name under which the window was saved.
If you place the window (you omit D_NOPLC), the window must fit on the screen or you will receive a “Window manager error” when Toolkit loads the window.
If search is present, I_LDINP searches for an existing window with the specified name before attempting to load the window. If the window is found, a successful load is simulated, window_id is set to the ID of the window that was found, and the search variable is set to true. If the window is not found, the search variable is cleared and loading continues normally.
You can use search to make your subroutines more modular. If you have written your routines to call E_ENTER on entry and E_EXIT before returning, use the search variable with I_LDINP within your subroutines to load windows.
Search will find the window, if already loaded, or it will enable I_LDINP to load it if it can’t find it. Since the window will be a local window in the latter case, E_EXIT will delete it when it returns to the calling routine. If search finds the window already loaded and if it was loaded at a prior level, E_EXIT will leave it loaded when it returns.
If error is present, it is returned with one of the following values:
- 0 (false) if the requested window was found in the specified library.
- 1 (true) if the window was not found.
- -1 if the window (window_id) has an associated selection window that cannot be loaded. You can use %U_GETWNDERR to get the text of the error: “Window name not found in library channel,” where name is the name of the missing selection window, and channel is the channel number passed to I_LDINP (or the value of g_utlib if no channel was passed).
A fatal error occurs if error is not present and the window (window_id) or an associated selection window cannot be found.
- M_LDCOL routine for information on loading menu columns
- U_LDWND routine for information on loading general windows and for information on directly loading selection windows that may not be associated with input windows
In the first example, the subroutine attempts to load the window named cusmas from the library opened on channel g_utlib. The variable inpid is returned with the ID of the input window. If the window isn’t in the library, a fatal error occurs.
xcall i_ldinp(inpid,, "cusmas")
In the second example, I_LDINP attempts to load but does not place the window artran from the library opened on libchn. Again, inpid is returned with the ID of the input window. The success of the operation is reported in errcode. If the window already exists, an error occurs.
xcall i_ldinp(inpid, libchn, "artran", D_NOPLC,, errcode)
In the third example, I_LDINP searches for the window named cusmas before it attempts to load it and place it on the screen. If it finds the window, it will store the window ID in inpid and set find to true; otherwise, it will load the window named cusmas. If the window is loaded successfully, errcode is returned with a value of false.
xcall i_ldinp(inpid,, "cusmas",, find, errcode)