Overview
Guide Interface Language (GIL) is the save format used by the Sun Microsystems product Devguide.
Porting GIL Interfaces to Motif
Builder Xcessory reads GIL files and imports the interface generated from Devguide into a Motif interface. However, Devguide is a tool for developing OPEN LOOK interfaces, and many differences between the interface objects provided by OPEN LOOK and those provided by Motif prevent the conversion from being completely automated.
GIL Version Information
Builder Xcessory's Import GIL option (Browser:File) reads GIL version 3 (GIL-3) files exclusively.
GIL Options
Builder Xcessory imports a GIL file similarly to the way it reads a UIL file. The interface is added to the interface currently in Builder Xcessory. You can also customize certain options when importing a GIL file.
Setting GIL options
Select GIL Options from the Browser Options menu to display the GIL Options dialog:
Strategies for Importing Your GIL Documents
When you import a GIL file, you must decide whether to port the interface with as few changes as possible (thus saving a Motif program that mostly conforms to the OPEN LOOK style guide) or to allow Builder Xcessory to match the interface as closely as possible to Motif look and feel. The Import GIL dialog allows you to specify whether to match the interface to Motif or OPEN LOOK look and feel.
Matching interface geometry
The Motif versions of OPEN LOOK objects also alter the geometry of the GIL interface. The GIL Options dialog allows you to specify whether Builder Xcessory should try to lay out the interface based on the size changes.
Inserting Motif manager widgets
Both options are likely to result in some overlapping or misaligned objects, but you can easily reposition the objects from within Builder Xcessory. In many cases, the best way to align and position objects is to insert managers such as Forms and RowColumns into the hierarchy. A good understanding of how the different Motif managers work is necessary.
Groups
In Devguide, you can use Groups to group objects together. Builder Xcessory imports Groups as Motif bulletin boards.
Glyphs
When there are glyphs in the GIL file that are stored in the Sun Microsystems, Inc. Icon format, Builder Xcessory automatically imports the Icon files in an XBM format. If Builder Xcessory cannot find the Icon file to be converted, a message specifies the commands required to convert the file, once you locate it.
Devguide List
Certain Devguide objects map well to collections of Motif 1.2 widgets. The Devguide List with a label maps to a frame widget with scrolled list and label children. However, Motif 1.1 does not support multiple children of a Frame widget. If you are using Motif 1.1, use a form widget in place of the frame. Builder Xcessory does the Motif 1.2 version of the import by default, unless you have specified Motif 1.1 code generation on the General tab of the User Preferences dialog.
Actions
Devguide actions are imported as Motif callbacks when possible. User-defined actions in Devguide are imported as the equivalent predefined callback. For example, "Show" is imported as BxManageCB.
Builder Xcessory displays a warning when it attempts to import Devguide actions that do not correspond to an equivalent Motif callback.
Non-converted Objects
Drop targets and group anchors are ignored when a GIL file is imported by Builder Xcessory. The differences between Devguide/OPEN LOOK and Motif are significant enough that importing these objects is not useful.
A number of OPEN LOOK features are not provided in Motif. Builder Xcessory ignores the following features during the import:
· The label-bold field for labels
· The label attribute on menus
· XView and PostScript drawing models for canvases
Conversion Conventions
You should also be aware of the conversion conventions described in the following sections.
Numeric Textfields
Numeric textfields are created as Motif text field widgets with a modifyVerify callback set to BxVerifyNumericCB. This callback allows only digits to be entered into the text field. It does not support Devguide attributes such as minimum and maximum range, nor the increment and decrement arrow buttons.
OPEN LOOK Menus
Builder Xcessory creates a MenuBar for every OPEN LOOK menu that it encounters, because menus under the OPEN LOOK Style Guide are commonly distributed throughout an interface. Motif interfaces typically have all of their menus in a single menu bar at the top of the window.
Consequently, after importing a GIL file the first thing that you will often do is to combine the various MenuBar/CascadeButton combinations into a single MenuBar with multiple cascadeButton children. Also consider creating a single MainWindow widget at the top of your object instance hierarchy and having it contain the main MenuBar and a manager widget that controls all of the other widgets in the window.