U_WINDOW
Place/move/remove/delete windows
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
xcall U_WINDOW (D_PLACE, window_id, [row_placement], [col_placement]) xcall U_WINDOW (D_MOVE, window_id, [row_movement], [col_movement]) xcall U_WINDOW (D_REMOVE, remove_window_id [, ...]) xcall U_WINDOW (D_DELETE, delete_window_id [, ...])
Arguments
D_PLACE
Place a window. (n)
D_MOVE
Move a window. (n)
Remove a window. (n)
D_DELETE
Delete a window. (n)
window_id
The ID of the window to be placed or moved. (n)
row_placement
(optional) The row, relative to the screen body, where the window will be placed. (n)
col_placement
(optional) The column, relative to the screen body, where the window will be placed. (n)
row_movement
(optional) The number of rows up or down that the window will be moved. Default is 0. (n)
col_movement
(optional) The number of columns left or right that the window will be moved. Default is 0. (n)
remove_win_id
The ID of the window to remove or D_ALL (all windows), D_GLOBAL (all global windows), or D_LOCAL (all local windows). (n)
delete_win _id
The ID of the window to delete or D_LOCAL to delete all local windows. (n)
Discussion
The U_WINDOW subroutine manipulates windows within the screen body. You can combine the operations (D_PLACE, D_MOVE, etc.) in one call, with each operation followed by its arguments. See the examples below.
D_PLACE places a window relative to the screen body, not the entire screen. This means that the position (1,1) is the leftmost position immediately under the menu bar (in the first row). Placement is limited by the menu bar and information line; the window is adjusted so that it doesn’t interfere with either of these screen sections. If row_placement or col_placement is not passed, the previous placement value is used. Placing a window that was previously hidden restores the window to its previous state which, by default, is normal. If row_placement and col_placement are both set to 0, the window is centered in the application window.
D_MOVE moves a window relative to the screen body (rather than the entire screen) and places the window if it is not placed. Negative values move the window up or to the left. Positive values move it down or to the right. Zero specifies the current position (row, column, or both), unless you pass both row_movement and col_movement as zero for an unplaced window. In this case, D_MOVE places the window at the top of all other placed windows. The position is automatically adjusted if necessary to prevent the window from occluding the menu bar or information line.
D_REMOVE removes one or more windows from the screen. You can specify qualifiers to remove all windows, all global windows, or only windows that belong to the current environment.
D_DELETE deletes one or more windows. Specify D_LOCAL to delete all windows that belong to the current environment. You can only delete windows placed at the current display level or windows “unplaced” in any environment. A fatal error occurs if you try to delete a window placed at a prior display level. If you try to delete an unallocated window ID, the deletion will be ignored.
Examples
The following example places the window whose ID is stored in custdata at position (1,1) of the screen body.
xcall u_window(D_PLACE, custdata, 1, 1)
In this example, the window whose ID is stored in custdata is moved to the top of the window pile.
xcall u_window(D_REMOVE, custdata, D_MOVE, custdata, 0, 0)
The following example removes all local windows.
xcall u_window(D_REMOVE, D_LOCAL)
The following example deletes the window whose ID is stored in passid.
xcall u_window(D_DELETE, passid)
The following example moves the window whose ID is stored in custdata 20 places down and 40 places to the right, places the window whose ID is stored in empdata at position (1,1) of the screen body, and removes the windows whose IDs are stored in taxinfo and date.
xcall u_window(D_MOVE, custdata, 20, 40, D_PLACE, empdata, 1, 1, & D_REMOVE, taxinfo, date)