Note: This guide is intended for developers using Zim on Windows Platforms. It describes how to migrate a Zim for Windows application to run in a Zim text-based environment.
Zim for Windows 2.0 designed to be backward-compatible with earlier Zim versions.
The data dictionary and development center environment are automatically upgraded (on request) when you first access any of the development tools (e.g., DC, Screen Painter) in Zim for Windows. Once the object dictionary and development center environments have been upgraded or you begin to use the new features in Zim for Windows, you should no longer run the application with previous versions of Zim.
This is a Common User Interface ( CUI) version of DC, and contains enhancements to the Development Center that were distributed with Zim for Windows. Common User Interface refers to Zim's ability to display the same form on both GUI and TUI environments; Zim achieves this by storing GUI coordinates separately from TUI coordinates.
The enhanced development center provides new features that enable you to create Common User Interfaces for your applications. In addition, new high-powered development tools, such as a CUI screen painter enable you to paint windows and menus as well as forms and displays.
The new services provided in the Development Center are
The create and compile commands operate identically in all environments. Code that runs under Windows can be run without any changes on text based environments with the following exceptions:
System commands need to be altered.
The following Zim functions are ignored in text-based environments:
The following Zim commands are ignored in text-based environments:
The following window attributes are either unsupported or changed in text-based environments:
| Features | Comments |
| Parent | NOT SUPPORTED |
| Clipped Windows | NOT SUPPORTED |
| DM | Italic maps to blink. |
| Blended colors | RGB colors are approximated to Zim colors by default The use rgb colors configuration option permits them to be ignored and background (BC), foreground colors (FC) used instead. |
| Font | NOT SUPPORTED |
| TopMost | NOT SUPPORTED |
| Icon | NOT SUPPORTED |
| Ctrl+R Key Combination | Refreshes screen (in case system command or output to backscreen has overwritten the screen). |
| Alt+F6 Key Combination | Cycles the user through all available windows during form input mode. |
| Scroll | Supported only if window contains graphical forms; windows receiving document input (due to WINDOW SET INPUT ON) ignore mouse clicks. |
The following widget attributes are either unsupported or changed in text-based environments:
| Features | Comments |
| Clipboard | NOT SUPPORTED |
| Scrollbars | Does NOT SUPPORT non-standard size. |
| Graphics | Ignores graphics other than line and rectangle. |
| Pushbuttons | Default pushbutton attribute is the surrounding angle brackets if the widgets width is 4 or more greater than its text width. Push buttons can display a shadowed border style on text-based environments. |
| Font/ Displaymode differences | Does NOT SUPPORT fonts and the strikeout and italic displaymodes. |
| Images, image pushbuttons and toggles | Displays a rectangular area containing the field value. If the widget contains a label or a FORM SET (LABEL .. is performed, the label appears centered in the field. |
The following menu attributes are unsupported:
| Features | Comments |
| Horizontal Separators | NOT SUPPORTED |
| Predefined menuitems | Supported actions are exit, break, about and help. Other actions are ignored. |
If an application is to run on both Windows and text-based environments, it can be built using the following methods:
When an existing window or form is brought into the Screen Painter and the Coordinate system is set to Text, its twip values are converted to appropriate row and column character cells. If the window or form is saved, only its row and column character cell values are written back. Zim for text-based systems uses the character cell values of a widget if they are present.
Once a window or form contains both character cell and twip values, the Screen Painter in text -based mode uses only the character cell values (and graphical mode uses only the twip values). Thus a form can contain two sets of unrelated positions and dimensions: those used in a Windows environment and those used on text-based environments.
Note: Sometimes, an existing window or form contains some character cell dimensions that are no longer in use. The row, col, wdth and hght fields can contain invalid values that cause the text-based version of Zim to display the widget inappropriately. When this is the case, the Screen Painter's coordinates menu provides an option to "Adapt Text from Graphical"; this option is equivalent to setting the row, col, wdth and hght fields to $null so that the Screen Painter's text mode can initialize them to appropriate values.
If a widget contains both an RGB and a standard Zim color number, the Zim for Windows uses the RGB value, while the text-based version uses the standard Zim color number.
The first time a graphical form is brought into the Screen Painter in text mode, the Painter attempts to choose appropriate character cell positions and dimensions. However, tailoring is usually required.
The configuration issues described in the attached Release Notes permit a developer to turn off the default behavior of Zim. The Use Twip Dimensions Yes configuration option can be helpful when widgets contain inappropriate character cell values and a developer wants to get an idea of what a GUI application would look like when it is run in a text-based environment without any tailoring.
Development of a text-based application can still be performed under Windows. The Zim for Windows Screen Painter utilizes features not available in text-based Screen Painter, including split screens, image buttons, drag and drop, print, and a structure chart.
Whether the application runs on Windows or UNIX, the Windows development environment can target them all. Applications developed by the Zim Application Generator are designed for both graphical and text-based environments The Windows Screen Painter can design screens for both graphical and text-based environments by setting the coordinate system during the painting session.
Once an application is developed under Windows, it can be exported to other environments using DC's Import/Export Wizards. DC's Import/Export Utilities are found on the DC Tools pulldown. These wizards enable specialized import/exports used by multi-user development environments; however, component and entire application import/exports are less complex.
There are several features unique to the Text Mode of Operation of the Screen Painter: