Open topic with navigation
UI Toolkit is a set of routines and utility programs that gives you the tools you need to create user interfaces for your applications. Toolkit helps you provide a user interface that is easy to use and includes the following:
The UI Toolkit environment establishes and maintains input, prompts, messages, menus, help, and other user interface details—so you don’t have to write such code yourself. Toolkit utilities handle the user‑interface details for you and ensure consistency throughout your application.
UI Toolkit is structured to support large applications. Its design assumes that the major functions of your application will be supported by individual routines, while the main routine will consist primarily of a small decision apparatus that makes the appropriate calls to these routines. These routines and programs interact with window library files that UI Toolkit creates when it processes the script files you have written.
To use UI Toolkit, you first create a user interface window script file with Composer or a text editor. Next, you compile the script file with one of Toolkit’s utility programs: Composer, Proto, or Script. These utility programs build the windows and store their definitions in a window library file. (Proto also allows you to preview your window script.) In the final step, you write a Synergy program that calls Toolkit routines. Figure 1 illustrates this basic procedure.
At the heart of the UI Toolkit windowing system are window script files, which enable you to quickly create general windows, input windows, menu columns, selection windows, and list classes from your own editable text files.
You provide the “script” to build a window, using script commands and arguments. The commands and arguments control the overall window characteristics and the items the window will contain.
You can create your script automatically with Composer, which enables you to interactively design windows, fields, buttons, and so on, in a graphical UI. Once your design looks exactly like you want it, you select the “Save script” option and Composer will translate your design into a script file.
Once your script file is created, you merely run a script processing utility or program (Script or Proto), or select “Compile Script” in Composer to build the window definitions. This processing also saves these definitions in a window library file.
Using UI Toolkit routines, your Synergy program can restore windows from the window library when they are needed. (The routines and script files do not interact directly. Rather, at runtime, the routines open and use the window library that was created when the script file was processed.)
Using window scripts has a distinct advantage. Each window is in a window library file, instead of being hard‑coded into your programs. Because these libraries can be maintained outside your programs, you can modify window parameters and text without changing or recompiling your Synergy routines.
The UI Toolkit utility programs
UI Toolkit contains three utility programs: Composer, Script, and Proto.
Composer creates and modifies window script files with a graphical user interface, enabling you to do the following:
Composer is available on Windows only. For more information, see the Designing Your User Interface chapter of Getting Started with Synergy/DE.
The Script program processes all forms of window script files, batch‑style, to generate windows. In one step, it does the following for you:
See Script for more information.
Proto performs all the actions that Script does, except that it also enables you to interactively process window scripts. Proto lets you display windows, too. Using it, you can do the following:
See Proto for more information.
Figure 2 illustrates how these utilities work together.
The UI Toolkit routines
The main component of UI Toolkit is a set of routines. These routines link your application and the windowing system. They handle menu processing, input processing, text processing, selection processing, list processing, toolbar processing, tab set processing, environment maintenance, and more. These routines are based on a set of low‑level Synergy windowing routines (the “W_” routines) that are part of the Synergy runtime.
The specific attributes of menus, input windows, and other window elements are defined in window script files and stored in window libraries, external to your application. You can also set display renditions, and define control and function key sequences externally.
The UI Toolkit window debugger gives you information and the current status of the windowing environment. Using the debugger you can view the following:
See to Toolkit Debugger for more information.