UpPreviousNext

Resource Editor

Overview

From the Resource Editor ( Builder Xcessory Resource Editor ), you view and edit the resources and attributes of currently selected UI object to control both the appearance and behavior of your application and its interface. You can edit attributes such as color, font, layout policy and object position, resize behavior, and application actions (callbacks, class methods, or both, depending on your choice of language). Changes made to your object attributes are immediately visible. Refer to Resource Editor for a complete description of the Resource Editor.


Note: In this manual, the term "resource" includes Java attributes.
 

Builder Xcessory Resource Editor

Resource Editor Menus

Component

Allows you to modify several basic characteristics of the selected object by performing the following operations:

· Set the default state of the selected objects to be visible or hidden

· With Motif, specify whether the selected object(s) should be created as a widget or as a gadget

· With C, specify a creation routine for the selected object and control the scope of the widget ID (local, global, or other).

View

Allows you to control the appearance of the Resource Editor by performing the following operations:

· Update the Edit/Display Area to show the resources for the currently selected object

· Show/hide the different areas of the Resource Editor

· Select the set of resources displayed by the Resource Editor

Options

The Options Menu allows you to perform the following operations:

· Control whether the Resource Editor automatically updates itself when a new object is selected, or waits for you to manually update it from the View menu or from a Toolbar button. Disabling automatic updates can save time on a slower computer system.


Hint: Double-clicking on an object or its Browser representation updates the Resource Editor.

· Arrange the resources in alphabetical order or according to type.

· With Motif, set the default resource placement (see Resource placement ) on a per resource-type basis. This allows you to automatically place all Color resources, for example, in an app-defaults file.

Toolbar

The Toolbar, optionally shown with the Resource Editor View menu, allows you to place frequently used menu items within easy reach.

Adding an item to the Toolbar

To place an item on the Toolbar, hold the Shift key down while selecting the desired menu item.

Removing an item from the Toolbar

To remove an item from the Toolbar, hold the Shift key down while selecting the desired Toolbar item.

Header Data

Instance Name

The Instance Name text field displays the instance name of the currently selected object. Type directly into the field to change the name. Builder Xcessory automatically assigns a default name to every object instance as it is created, typically a lower-case version of the class name appended with a number.


Note: You should assign your own instance name to every object in your interface. Not only does this simplify development documentation and application maintenance, but it guarantees that Builder Xcessory will not reassign and change the instance name during subsequent work sessions.

Class Name

The Class Name text field displays the class name of the currently selected object. You can edit this field to change the type of UI object. Builder Xcessory automatically checks to ensure that the new class exists and is allowed. For example, it does not allow you to change a container with children into an object that does not allow children.

Style

The Style text field displays the name of the style, if any, currently applied to the selected object(s). You can enter a style name into this field, applying the style to the currently selected UI object(s). A style is a collection of resource:value pairs that you create. Styles allow you to set resources on arbitrary groups of objects, and change all objects simultaneously by editing the style definition. Styles are created in parent-child relationships giving you considerable power and flexibility. The style manager is accessed with the Browser Managers menu. For more on styles, see Styles .

Interface File Menu

Builder Xcessory allows you to place UI objects, constants, resources, procedures and styles in different files. This feature is very useful when working with large projects, simplifying development and maintenance.

The Interface File menu in the upper right-hand corner of the Resource Editor allows you to select the file in which to save the object information. Select the proper file from the menu. Use the File Manager (Browser:Managers:UIL Files) to create new files and view and manipulate your existing file system. For more information, see UIL File Manager .

Edit/Display Area

Resources

This area displays the values of resources, which can be edited. The Resource Editor displays resource values for a single object, or for a group of objects. Next to the resource name is one of the following:

· Text field

· Pulldown menu

· Toggle buttons

To edit the resource value, type into the field, or select a value as appropriate. You can also set a resource value with a Builder Xcessory extended editor (see the section Extended editors ).


Note: When displaying values for a group of objects, Builder Xcessory adds a " !=" (not equal) symbol to every resource that differs among the objects in the selected group. Click on this symbol for a list of all the differing values for that resource.

Search area

To rapidly locate a particular resource, type a portion of the resource name into the search area at the base of the Resource Editor window. Pressing the Return key cycles through all of the resources that match your entry. You can also cycle through them by clicking on the arrow keys at the right-hand side of the search area.


Hint: Type any portion of the resource name into the search area. For example, typing " man" matches resources such as AutoUnmanage . This is very helpful when you are not sure of the precise resource name.

Extended editors

In addition to directly entering a resource value, Builder Xcessory has extended editors that provide additional ways of selecting a value. The editors are accessed by clicking the pushbutton labeled with an ellipsis (...), located to the right of the resource value. As long as an extended editor remains open, you can use it to change that resource on multiple objects without updating the Resource Editor. This makes it easy to set, for example, the label string on a number of different objects, even if they are of differing class types.

Refer to Extended Editors for more detailed information about the extended editors.

Resource placement

This option menu is located on the right side of the Edit/Display area. It allows you to use a constant, identifier, or expression as the resource value. It also allows you to reset the value to the object's default ( None ), to the Class default ( Class ), or to the Style default ( Style ). When creating or editing classes, this menu also allows you to specify a resource as eligible for modification on a per instance basis ( Expose ).

With Motif, this menu allows you to specify, on a per resource basis, whether to write the value to an X Resource file ( App ), or hardcode the value into your application ( Code ). You can also set the default placement on a per resource-type basis with the Resource Editor Options menu.

UpPreviousNext