Introduction to the utility routines

In addition to the routines that handle menus, input windows, text windows, selection windows, and lists, UI Toolkit includes many other routines which simplify and standardize your application. These are classified as “utility” routines.

Two of the most important Toolkit utility routines are U_START and U_FINISH, which initialize and shut down the UI Toolkit environment. U_START must be called before any other Toolkit routine.

A subset of the utility routines enables you to load and manipulate windows. These routines are U_GBLWND, U_LDWND, U_LOGWND, U_SAVE, U_WINDOW, U_UPDATE, and U_REDRAW. The routines U_CHR and U_FLD accept a character or field of input from the terminal.

File I/O and channel maintenance are managed using U_CHNINF, U_CLOSE, U_FNDFIL, U_GBLCHN, U_GETCHN, U_OPEN, and U_RLSCHN.

The routines U_DIALOG, U_FLASH, U_MESSAGE, U_POPUP, U_ABORT, U_BAR, and the function %U_MSGBOX enable you to standardize error and status messages.

Key mapping can be performed using U_EDITKEYS.

Rendition utilities are provided through U_EDITREND, U_HELPREND, U_LDREND, U_MODREND, U_REND, U_RSTREND, U_SAVREND, and U_STOREND.

Scroll bars for UNIX and OpenVMS may be defined and manipulated using U_CHARSB, U_CREATESB, U_UPDATESB, and U_RESIZESB.

A subset of the utility routines supports Windows‑specific features. %U_GETFILENAME displays a standard Windows “Open” or “Save As” dialog box. You can set window icons with %U_ICON. %%U_PRINTQUERY retrieves printer information, and %U_PRINTSETUP displays a standard Windows “Print Setup” dialog box. Initialization settings can be written to synergy.ini or synuser.ini using %U_SAVELOG and %U_SAVESETTINGS. Providing Help in a Windows environment can be done with %U_WINHELP. %U_WNDEVENTS allows you to associate methods with various mouse events, and %U_WNDFONT displays the standard Windows “Font” dialog for changing the font at runtime.

Additional utility routines provide for conversion of date and time values, access to the text message file, access to the Toolkit version number, and access to the Toolkit window debugger.