Browser File Menu

Allows you to create new files, open files, merge other files with your project, save your interface, save and load classes, import GIL files, generate code, print, or exit Builder Xcessory. Select File from the Browser menu bar, either with the mouse or with a mnemonic, to display the following menu:

Browser File Menu (with C as the Selected Language)

The following sections describe the items available from the File menu.

New (Ctrl+N)

Clears all current objects and switches to the default language. If any pixmaps, styles, procedures, identifiers, user-defined types or constants will be destroyed by the clear operation, Builder Xcessory displays the following warning message dialog:

Retain After New Warning Dialog

Retain

If you set the Retain toggle, Builder Xcessory retains the listed items while clearing the interface. If your interface changed since your last save, the following dialog is displayed:

New Interface Warning Dialog

Clicking the Yes button prompts you to save your interface. Clicking the No button discards any changes to the interface since the last save. Click Cancel to return to Builder Xcessory and discontinue the new operation.

Open (Ctrl+O)


Note: Available only when an interface is not present on your display (for example, when you first startup Builder Xcessory, or when you select New).

Displays the File Selection dialog:

File Selection Dialog

Using the File Selection dialog

You can use the File Selection dialog to specify the following UIL files:

· UIL file generated by Builder Xcessory

· Existing UIL file written by hand

· Existing UIL files written with another user interface design tool


Note: When you open a UIL file not generated by Builder Xcessory 4.0 or later, the current language becomes the language associated with the UIL file.

Filter field

By default, the Filter field of the File Selection dialog contains the name of the directory from which you are running Builder Xcessory.

Directories box

To display the contents of a different directory, enter the directory name in the Filter field and click the Filter button. You can specify match strings using regular expressions. For example, *.uil will list only files ending in characters .uil. Click OK to open the specified file or Cancel to remove the File Selection dialog.

Files box

The Files box lists the files in the directory which match the file filter, set to *.uil by default.

Selection field

Enter the full pathname in this field to select a file.

Selecting a File

To select a file, click on the file name in the File box or enter the full pathname in the Selection field.

If you open a file from a directory different from the one in which you started Builder Xcessory executable, Builder Xcessory changes to the current working directory.

Open imports a UIL file along with information specific to Builder Xcessory, such as generated code routine names and routine generation status. For example, if you change the Main file from main-c.c to mymain.c, this information is imported along with the file. If you disable code generation of a file, this information is also incorporated. However, this information is not imported during a Read operation.


Note: Builder Xcessory does not change to the new directory when you "Read" files.

Name conflict warning dialog

When Builder Xcessory attempts to Open the selected file, it may display a warning dialog with the message "Name conflict between loaded style and new style". A resource style that exists currently in the Builder Xcessory Style Manager has the same name as a different resource style defined for the file that you are attempting to open.

The three push buttons perform the following operations:

· Use Loaded

Overrides the style in the file being opened with the information in the style that already exists in the Builder Xcessory Style Manager.

· Rename New

Allows you to rename the style in the new file. Rename Style dialog is displayed. Enter the new style name in the text field. Click Cancel Read to cancel the opening of the new file without renaming any styles. Click OK to rename the style and remove the Rename Style dialog. If the new style name also conflicts with an existing style name, the Rename Style dialog is displayed again.

· Cancel Read

Cancels the opening of the file. Has same function as Cancel Read push button on the Rename Style dialog. Any styles, constants, procedures, identifiers, and types in the new file are added to their respective managers. Refer to Managers for more detailed information.

Read (Ctrl+F)

Displays the same File Selection dialog as shown in Open (Ctrl+O) . However, invoking the File Selection dialog from Read allows the following option and additional operations:

· You can add the interface specified in the UIL file to an existing interface on your display.

· Builder Xcessory classes, styles, constants, procedures, identifiers, and types in the new file are added to their respective managers.

· The contents of the read file are added to the current UIL file, and the read file is subsumed by the current UIL file.


Note: When Builder Xcessory attempts to Open the selected file, a warning dialog with the message "Name conflict between loaded style and new style" might be displayed. Refer to Name conflict warning dialog for more detailed information.

Differences between Read and Open

Read differs from Open in the following ways:

· Read does not change the current working directory.

· All code generation options stored in the Read file are overridden by the current settings in Builder Xcessory.

· Read merges the UIL file into the currently opened project. Any association to the original UIL file is not maintained.

Save (Ctrl+S)

Writes your interface to the currently specified UIL file. Select one of the following options to display and edit the directory path and file name:

· Save As from the Browser File menu.

· Code Generation Preferences from the Browser Options menu.

Save As (Ctrl+A)

Displays a File Selection dialog:

Save As File Selection Dialog

The Directory Path field is non-editable. You can rename the UIL file, or re-specify the directory path.

Editing the Filter text field

To edit the Filter text field, use one of the following methods:

· Double-click with the Directories list to navigate up and down directory paths.

· Click the Filter button to update the Directories list for the directory specified in the Directory Path field (which simply echoes what you specified in the Filter text field).


Note: Edits to the File Name text field change the name of the UIL file.

Class

Displays the following menu:

Class Option Menu from the Browser File Menu

Read Class

Reads in a class already created and saved as an include file by using the Save Class menu item.

When you select Read Class, a File Selection dialog is displayed. Specify the include file name or re-specify the directory path and click on the OK button in the File Selection dialog.

Builder Xcessory reads in the include file and adds it to the Palette.

Save Class

Writes out a selected class in your application to a separate UIL include file. If you Save, the class definition is saved into an include file instead of the application's UIL file, allowing you to easily add the class to other projects.


Note: The dialog displays the name of the class with .uil by default

Use Save Class when you have a class that you want to share with other developers or use in more than one application. Once you write a class to its own include file, other users can read that class into Builder Xcessory using Read Class.

Using Save Class

To use Save Class, use the following procedure:

1. Switch to Classes View in the Browser to display all current classes.

2. Select one class, then select Save Class.

The first time you save a class, a File Selection dialog is displayed for you to specify the path and filename of the include file in which that class will be saved.

3. Enter a filename for the include file in the File Name text field at the bottom of the dialog, and click OK.

The class is then written to the UIL include file you specified and can be read into Builder Xcessory by other users.

Loading a class automatically at startup

To save a class that will automatically be loaded into your Builder Xcessory at startup:

1. Select the class in Classes View

2. Select Save Class (see Save Class )

3. Drag icon of the class from its current location (probably Project Classes) on the Palette to a Private Classes group

Loading a class automatically at startup for a group

To save a class that will automatically be loaded into everyone's Builder Xcessory at startup, drag the icon of that class from its current location (probably Project Classes) on the Palette to a Public Classes group.

Once you save a class, you can rename the file using Save Class As, described in the following section.


Note: You must have write permission for the {BX}/XCESSORY/classes directory to drag the icon onto the Group. If you do not have write permission, ask someone with the proper permissions to move the file to the {BX}/xcessory/classes directory.

Save Class As

Displays a File Selection dialog:

File Selection Dialog


Note: The dialog displays the name of the class with .uil by default

You can rename the include file which contains a class that you saved separately from your application. You can also specify the directory path.

Lock Class

Makes the selected class read-only (you cannot edit the class). You must select a class before you click on this option. Builder Xcessory displays a warning dialog asking if you want to save the class before locking it:

1. Click OK to display a File Selection dialog (if you have not yet saved the class).

2. Enter the pathname of the file and click OK.


Note: Once you lock a class, a lock symbol is displayed in the Resource Editor when you click on any object in class. The lock symbol indicates that you cannot edit any attributes of the class or its constituent parts.

When you save your application, this file will not be overwritten.

Removing a lock

To remove the lock:

1. Reselect the class.

2. Click on the Class option of the File menu.

The Lock Class option now reads Unlock Class. Select Unlock Class to remove the lock.


Note: The Browser must be in Classes View to enable the Lock Class feature. See Browser in Classes View for more information.

Refer to Classes and Methods in the Builder Xcessory User's Guide for more detailed information about using classes.

Import

Displays a menu that contains only the Import Gil option.

Import GIL

Displays the same File Selection dialog as shown in Open (Ctrl+O) and Read (Ctrl+F). See Open (Ctrl+O) for more detailed information about the File Selection dialog. The File Selection dialog filter defaults to a .G file suffix.

The File Selection dialog allows you to add the interface specified in a GIL (Guide Interface Language) file to an existing interface on your display. You can set certain options before importing a GIL file. See the section GIL Import Preferences for more detailed information.


Note: Builder Xcessory does not generate GIL files.This option is intended as an aid for OPEN LOOK to Motif interface conversions.

Generate {Lang} (Ctrl+G)

Writes the files for your application. {Lang} is the language you selected for this particular project file, or the language you selected as your default language at the beginning of your Builder Xcessory session. If you want to choose a different language, refer to Choose A Language for more detailed instructions.

Once you save your application, you can generate your application code outside Builder Xcessory in scripts or makefiles with the following command on the command line:

cgx50 -gen {lang} -path {BX}/XCESSORY -file {file.uil}

The following sections describe how files are generated in each available language.

Generate C++

Writes the C++ files for your application. Additional files are generated if you included classes in your interface. See Code Generation Preferences for more detailed information about filenames and options for the files to be generated.


Note: Builder Xcessory only generates files which have changed since the last code generation. For example, for the class MyClass, the files MyClass. C and MyClass.h are regenerated only if they are different from the previous code generation.

Files generated
for C++

The following list describes the C++ files generated by Builder Xcessory when you select Generate C++, or execute the cgx50 -gen CXX command on the command line (default names are in parentheses):

· Imakefile (Imakefile)

Imakefile that specifies C++ imake information.

· Makefile (makefile-C)

C++ makefile.

· Class Tree Root (UIComponent)

Contains the root class from which all C++ classes created in Builder Xcessory are derived.

· Main (main-C.C)

Initializes the Motif toolkit and calls the Widget creation routine. Builder Xcessory creates an unrealized applicationShell and creates all topLevelShell children for all top-level windows.

· Constants (defs-C.h)

Contains pixmaps, declarations of constants, and global instances of widgets or classes used in the interface.

· Utilities (bxutils-C.C)

Contains convert functions.

· Callbacks (callbacks-C)

Contains any callback information for non-class widgets.

· App Defaults (app-defaults)

File that includes all resources with app-defaults value set to App. The user can change an app-default resource value by editing the app-defaults resource file, overriding the file from a local resource file, or entering the toolkit

· A header file and source file for every class in the interface

Generate ViewKit

Writes the C++ files that use the IRIS ViewKit/ViewKit ObjectPak classes for your application.

To generate your application code outside Builder Xcessory, use the following flag in the cgx50 command on the command line:

cgx50 -gen VK -file <filename>

Files generated
for ViewKit

The following list describes the ViewKit files generated by Builder Xcessory when you select Generate ViewKit, or execute the cgx50 -gen VK command on the command line (default names are in parentheses):

· Imakefile (Imakefile)

Imakefile that specifies ViewKit imake information.

· Makefile (makefile-vk)

ViewKit makefile for the current platform.

· Main (main-vk)

Initializes the toolkit and creates the Window classes.

· Constants (defs-vk)

Contains any pixmaps, declarations of constants, and global instances of widgets or classes used in the interface.

· Utilities (bxutils-vk)

Contains convert functions.

· Callbacks (callbacks-vk)

Contains any callback information for non-class widgets.

· App Defaults (app-defaults)

File that includes all resources with app-defaults value set to App. The user can change an app-default resource value by editing the app-defaults resource file, overriding the file from a local resource file, or using the -xrmflag on the applications command line.

· A header file and source file for every class in the interface.

Generate C

Writes the C files for your application. To generate your application code outside Builder Xcessory, use the following flag in the cgx command:

cgx50 -genC -file >filename>

Files generated
for C

The following list describes the C files generated by Builder Xcessory when you select Generate C, or execute the cgx50 -gen C command on the command line (default names are in parentheses):

· Imakefile ( Imakefile )

Imakefile that specifies C imake information.

· Makefile ( makefile-c )

C makefile for the current platform.

· Main ( main-c.c )

Initializes the toolkit and calls the Widget Creation routine.

· Creation ( creation-c.c )

Contains code to create the widget hierarchy. Functions in this file are called by the Main file.

· Callbacks ( callbacks-c.c )

Contains any callback stubs for any callbacks defined in Builder Xcessory. When you write out the Callbacks file to a directory with an existing file of the same name, Builder Xcessory scans the existing file for the names of functions, and appends callback stubs for undefined callbacks only. Callbacks are never removed from this file and are never overwritten. Stubs for timers, event handlers, and work procedures are also output in this file.

· Constants ( creation-c.h )

Contains any pixmaps, declarations of constants, and global instances of widgets or classes used in the interface.

· Utilities ( bxutil-c.c )

Contains convert functions, predefined callback code, and required xpm functions.

· App Defaults (app-defaults)

Includes all resources with app-defaults value set to App. The user can change an app-default resource value by editing the app-defaults resource file, overriding the file from a local resource file, or entering the toolkit.

Generate UIL

Generates code for your application using a combination of C and UIL. Builder Xcessory generates your interface in a set of UIL files specified with the UIL File Manager. Other files are generated to compile, invoke, and run your UIL from outside Builder Xcessory.

Files generated
for UIL

The following list describes the UIL files generated by Builder Xcessory when you select Generate UIL, or execute thecgx50 -gen C_UIL command (default names are in parentheses):

The following lists the C files generated by Builder Xcessory when you select Generate C, or execute the cgx50 -gen C_UIL command on the command line (default names are in parentheses):

· Imakefile ( Imakefile )

· Imakefile that specifies both UIL and C imake information. Makefile ( makefile-uil )

Makefile for the current platform. Has targets for UIL as well as the associated C files.

· Main ( main-uil.c )

Initializes the toolkit, initializes Mrm, and makes Mrm calls in order to create widgets. This file is intended as a template to enable you to immediately compile the interface output from Builder Xcessory, it will not be adequate for all applications. In particular, Builder Xcessory creates an unrealized applicationShell and creates all topLevelShell children for all top-level windows, as recommended in Asente, Converse, and Swick's X Window System Toolkit.

Note: You can modify this file within the specified user code blocks. However, changes made outside these blocks are not preserved between code generation sessions.

· UIL File ( uil.uil )

Contains a description of the widgets. Compiled to a .uid file which is then read by the Mrm calls at run-time to create the interface. Builder Xcessory generates a backup file whenever it overwrites an existing UIL file. Automatic backup is provided for the default filename uil.uil or any customized filename. If, for example, you write the renamed UIL file new_uil.uil, and a copy of this file already exists, Builder Xcessory generates the backup file new_uil.uil~. These UIL files are identical to the files generated when you select Save from the Browser File menu.

· Callbacks (callbacks-uil.c)

Contains callback stubs. When you write out the Callbacks file to a directory with an existing file of the same name, Builder Xcessory scans the existing file for the names of functions and appends callback stubs for undefined callbacks only. Callbacks are never removed from this file and are never overwritten. Stubs for timers, event handlers, and work procedures are also output in this file.

· Constants (main-uil.h)

Contains declarations of constants, and global instances of widgets or classes used in the interface.

· Utilities (bxutil-uil.c)

Contains convert functions and predefined callback code.

· App Defaults (app-defaults)

File that includes all resources with app-defaults value set to App. The user can change an app-default resource value by editing the app-defaults resource file, overriding the file from a local resource file, or entering the toolkit

You can change any filename, and disable or enable the generation of a particular file from the File Names tab of the Code Generation Preferences dialog (Browser Options menu). Any changes made in the Output File Names dialog will be reflected in subsequent generation of code.

Generate Java

Writes the Java files for your application.

To generate your application code outside Builder Xcessory, use the following flag in the cgx50 command:

-cgx50 -gen JAVA

Files generated
for Java

The following list describes the Java files generated by Builder Xcessory when you select Generate Java, or execute the cgx50 -gen JAVA command on the command line (default names are in parentheses):

· A source file for every user-defined class and top-level object in your interface (name_of_class.java and
name_of_top_level_object.java)

· Makefile (makefile-java)

Java makefile for current platform.

· Main (MainApp)

Main file which instantiates all top level objects,

Note: If you have only one top level object you might want to unset file generation of the main file on the File Names tab of the Generation Preferences dialog.

· HTML (MainApp)

HTML file for the MainApp Class that allows the application to run in a browser or an applet viewer.

· Constants (Def)

Contains any pixmaps, declarations of constants, and global instances of objects or classes used in the interface.

Print Setup

Displays the Print Setup dialog:

Print Setup Dialog

The toggles set on this dialog specify the options which are used when you select Print Hierarchy from the Browser File menu.

Destination

The radio buttons in the Destination field adjust whether the output of Print Hierarchy will go to a file, a viewer window, or a printer.

· To File

Allows you to print to a file. Enter the name of the file or select the name in a file selection box accessed by clicking the (...) button.

· To Window

Allows you to print to a viewer window. When you select Print Hierarchy, the print viewer window is displayed and the hierarchy is printed to that window:

Print Viewer

Clear this window, save as an ASCII file, or print it.

· To Printer

Allows you to print a hierarchy using the Print Command specified at the bottom of the dialog.

Options

The toggles in the Options field adjust the format and content of the print output:

· Include Instance Names

Includes the name of each object instance in the output.

· Include Class Names

Includes the class name of each object instance in the output.

· Expand Classes

Includes information for the full membership of classes in the output; if unset, only information about the class itself is included.

· Append Output to Window

Specifies not to clear the viewer between outputs. If unset, the viewer will be overwritten with each output.

· Indent Offset

Number of spaces each level of the hierarchy is indented (text field).

Hierarchy View

The toggles in Hierarchy View allow you to print either the Browser or the XtIntrinsic view of the widget hierarchy:

· Browser View

Mirrors the contents of the Browser, showing the logical hierarchy of the objects in the interface.

· Xt Intrinsic View

Shows the literal hierarchy from the Xt perspective.

Note: When using Java as the code generation language, the Xt Intrinsics View option will display the widget hierarchy that Builder Xcessory uses to emulate the Java AWT objects. This is not always useful.

Example

For example, the Browser hierarchy for a menu bar with a pulldown menu child is the following:

topLevelShell (TopLevelShell)
menuBar (XmMenuBar)
cascadeButton (XmCascadeButton)
pulldownMenu (XmPulldownMenu)
pushButton (XmPushButton)

The Xt hierarchy for the same collection is the following:

topLevelShell (TopLevelShell)
menuBar (XmRowColumn)
cascadeButton (XmCascadeButton)
pulldownMenuMenuShell (XmMenuShell)
pulldownMenu (XmRowColumn)
pushButton (XmPushButton)

Selection

· Selected

Allows you to print only the tree whose root is the currently selected object.

· All

Allows you to print the entire interface.

Print Command

Specifies the printer command appropriate for your system.

Print Hierarchy

Executes the print command as specified by the options in the Print Setup dialog.

Exit

Exits the Builder Xcessory. If you have made changes to your interface since last writing out the UIL file, Builder Xcessory displays a warning dialog that allows you to save your changes, quit your changes, or cancel the exit operation.


Note: Exiting Builder Xcessory does not initiate an exit of any development environment tools started from Builder Xcessory.

 

Documentation: