Introduction

In this section:

FOCUS Window Painter is a tool that helps you design and create your own menus and screens for attractive and easy-to-use applications.

Many window types and features are available, and you can implement horizontal menus and multi-input windows as part of your FOCUS application. Horizontal menus can also have pull-down menus associated with each menu item.

You can perform a string search in an active window by entering any pattern followed by a blank and pressing Enter. Within the pattern:

FOCUS tries to locate the line matching the pattern starting from the line following the current line. The search concludes at the line preceding the current line. If no match is found, a beep sounds and the cursor remains at the current position.

The windows you can design with FOCUS Window Painter look just like the menus and screens you see in the FOCUS Talk Technologies, such as TableTalk and PlotTalk, but you can customize each to fit your application. You can design user-friendly menus and display convenient and eye-catching instructions onscreen.

FOCUS Window Painter itself guides you step by step, using windows like those you created.

On the windows you create, you can prompt users to:

You can also simply display explanations and instructions.

Window Painter is flexible enough to design the many different types of windows you might need for any application written with FOCUS.

You can also upload window files from FOCUS running in one operating environment, such as PC/FOCUS, and edit them using Window Painter for use on another operating environment, such as z/OS.

How Do Window Applications Work?

Window Painter stores the windows you design in window files. Window files work in conjunction with FOCEXEC procedures that use Dialogue Manager.

There are two major parts in any window application, each of which is a step for the developer:

You can invoke Window Painter to create and edit windows by typing

WINDOW [PAINT]

at the FOCUS prompt, and pressing Enter.

You can invoke the Window facility in your FOCEXEC by including the Dialogue Manager command -WINDOW in the FOCEXEC. The -WINDOW command provides the name of the window file, and the name of the individual window that should be displayed first. When the -WINDOW command is executed by Dialogue Manager, control in the FOCEXEC passes to the Window facility.

The user is moved through the window file by goto values. A goto value tells the Window facility which window to display next.

You specify goto values when creating the windows with Window Painter. When your window is a menu with several items, you may assign a different goto value for each menu item, so that the next window depends on the user's selection.

When you create the windows, you also specify return values. As with goto values, you may assign a different return value to each item on a menu. Return values are collected as the user moves through the windows, and are substituted for "amper variables" which can be used later in the window file or in the FOCEXEC when control passes back. (Amper variables are Dialogue Manager variables of the format &variablename.)

When the selected value is inserted in the FOCEXEC, you may test it with a Dialogue Manager IF...THEN command and branch accordingly to a label in the FOCEXEC. In this way, you move the user through a series of windows, collecting return values for amper variables, using only one command in your FOCEXEC.

You can use windows to collect amper variable values in place of any other method of prompting available through Dialogue Manager.

For a complete discussion of the Dialogue Manager facility, see Managing Flow of Control in an Application. For details of integrating a FOCEXEC with the Window facility using return and goto values, see Integrating Windows and the FOCEXEC.


Information Builders