Digital Unix: Common Desktop Environment: Application Builder User's Guide
Digital Unix: Common Desktop Environment: Application Builder User's Guide
March 1996
Product Version:
Please
Recycle
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
1. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Object Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
11
To Save a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
iii
12
To Rename a Project. . . . . . . . . . . . . . . . . . . . . . . . . .
13
14
To Close a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
15
15
16
To Save a Module . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
To Rename a Module . . . . . . . . . . . . . . . . . . . . . . . . .
18
To Export a Module . . . . . . . . . . . . . . . . . . . . . . . . . .
18
19
20
20
21
21
23
24
24
24
26
iv
28
28
To Paste Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
To Delete Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
30
30
31
33
34
34
35
36
37
37
41
42
Child Panes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
42
Layered Panes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
43
44
Paned Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
44
45
46
Contents
vi
46
47
47
To Create a Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49
To Edit a Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
52
54
55
56
57
59
Message Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
59
61
To Edit a Message . . . . . . . . . . . . . . . . . . . . . . . . . . .
62
63
64
65
67
71
71
72
To Create Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
72
74
75
76
76
78
78
79
80
81
82
83
85
87
90
93
Grouping Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
94
To Create a Group . . . . . . . . . . . . . . . . . . . . . . . . . . .
94
95
96
97
Attaching Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
97
Attachments Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
98
Contents
vii
113
113
114
viii
Preface
This manual introduces the Application Builder (referred to throughout
this document as App Builder) and shows you how best to use it. See
Overview of the App Builder Process on page 4 for a summary
description.
ix
Typographic Conventions
Meaning
Example
Monospace
Italic
Command-line placeholder:
replace with a real name or
value
Italic
Code samples are included in boxes and may display the following:
%
xi
xii
Getting Started
Object Types
1
Application Builder Primary Window
The Application Builder primary window, shown below, is the starting point
for creating a user interface. See App Builder Primary Window on
page 120, for a detailed description of the primary window.
The basic method for creating an App Builder user interface is to drag and
drop objects from the App Builder primary window onto the workspace or
onto other App Builder objects. See Chapter 3, Laying Out a User
Interface, for details.
1
Starting and Exiting App Builder
Getting Started
1
Overview of the App Builder Process
The basic process of building and maintaining a user interface with App
Builder is simple and straightforward. There are many variations on this
formula, but the process is similar for any application.
1. Start App Builder. See Starting and Exiting App Builder on page 3.
2. Open a new project and a new module. See Creating, Opening, and
Saving Projects on page 9.
3. Drag and drop windows (main windows and custom dialogs) to the
workspace, creating a new module for each window, in most cases. See
Dragging and Dropping Palette Objects on page 24.
4. Drag and drop panes onto main windows or custom dialogs. See
Dragging and Dropping Palette Objects on page 24.
5. Drag and drop controls (buttons, choice objects, text fields, for example)
onto control panes. See Dragging and Dropping Palette Objects on
page 24.
6. Create pane objects, menus, and message dialogs. See Chapter 5,
Creating and Editing Panes, Menus, and Messages.
7. Create help dialogs. See Creating Help and Help Connections on
page 71.
8. Edit the properties of interface objects. See Chapter 4, Editing
Properties of Interface Objects.
9. Make functional connections between objects in the user interface. See
Chapter 6, Adding Functionality to the Interface.
10. Go into test mode to test menus, help, and connections. See Chapter 8,
Testing Menus, Help, and Connections.
11. Display the Code Generator to generate code and make the user
interface. See Chapter 9, Generating Code and Building an
Application.
12. Add user code to the code generated by App Builder. See Adding User
Code to Generated Code on page 117.
13. Debug the code, make and run the application.
1
14. Repeat the process to modify and maintain the user interface.
Getting Started
1
Object Types
There are three basic types of objects on the primary window: windows,
panes, and controls. See App Builder Primary Window on page 120, for
descriptions of each of the objects.
The windows in App Builder are:
Main window
Custom dialog
File selection dialog
Control pane
Text pane
Draw area pane
Term pane
Button
Check box (Choice object)
Combo box
Gauge
Label
List (scrolling list)
Menu bar*
Menu button
Option menu (Choice object)
Radio box (Choice object)
Scale
Separator
Spin box
Text Field
Note *The menu bar is not a control, but it is on the Controls palette. It
can only be dropped on a main window.
1
Rules for Dropping Objects
The rules for dragging and dropping the three types of App Builder objects
are explained below. An error message will be displayed if you attempt to
drop an object on an illegal target.
Windows (main window, custom dialog, file selection dialog) can be dropped
anywhere on the workspace except for the App Builder primary window.
Panes (control pane, text pane, draw area pane, term pane) can be dropped
on a main window, a custom dialog, or on another pane. See Creating and
Editing Pane Entities on page 42 for more information.
Controls (buttons, menus, boxes, for example) can be dropped on a control
pane or a group.
Note As noted above, a menu bar is on the Controls palette, but it is not
really a control. It can only be dropped on a main window. A menu bar can
be dropped anywhere on a main window; it will always appear at the top of
the window.
Getting Started
When you use App Builder to create a graphical user interface, you are
working on a project, which is comprised of one or more modules. App
Builder, which was built with itself, was a single project comprising over 30
modules.
Creating, Opening, and Saving Projects
15
20
If you have made changes to the current project since you last saved it, a
message dialog box will be displayed first, giving you the option to
discard the changes and create the new project or to cancel the New
Project operation.
Click Discard Changes to throw out the changes and close the current
project.
Click Cancel if you want to save the current project. Save the current
project before creating the new project.
2. Type a name (all lowercase) for the project and click Apply.
The name of the project (with .bip added as a suffix) will be displayed
in the title bar at the top of the App Builder primary window. Every
module you create or import will be part of the current project until you
open another project.
Note Project names should be all lowercase so that there is no conflict
between the name of the project resource file and the project executable file.
The name of the resource file created when you generate code is the same
as the name of the project, minus the .bip suffix, but it is given an initial
capital letter.
10
11
2
4. In the module array of the Project Organizer, select the modules you
want to display and choose Show from the Module menu to display the
module interfaces.
See To Show a Hidden Module on page 20 for detailed instructions.
To Save a Project
A project is only saved when you explicitly choose to save it, so be sure to
save often and regularly.
1. Choose Save Project from the File menu of the App Builder primary
window or Save from the Project menu of the Project Organizer.
If you have saved the project before, the project will be saved without
comment.
If this is the first time you have saved the project, the Save Project
dialog box will be displayed.
2. Change to the appropriate folder.
You will normally want a separate folder for each project you work on.
You are apt to have Makefile problems otherwise.
3. Type a file name in the Enter file name field.
You do not have to append .bip to the project name; this is done
automatically when you save a project.
4. Click Save.
The project will be saved.
12
2
1. Choose Save Project As from the File menu of the App Builder primary
window or Save As from the Project menu of the Project Organizer.
The Save Project dialog box will be displayed, with the current project
name in the Enter file name field.
2. Change to another folder.
3. Type a name in the Enter file name field.
4. Click Save.
The projectthe project file (.bip suffix) and all of the module files
(.bil suffixes)has been copied to another folder. The original project
and module files are not affected. The new project will now be the
current project; its name will be displayed in the title bar of the App
Builder primary window.
To Rename a Project
Do the following to give the current project a different name. The modules
that comprise the current project will become part of a new project with a
new name and the current project will no longer exist. See To Save a
Version of a Project above if you want to save a version of the the current
project.
1. Choose Save Project As from the File menu of the App Builder primary
window or Save As from the Project menu of the Project Organizer.
The Save Project dialog box will be displayed, with the current project
name in the Enter file name field.
2. Modify the name or type in a new name in the Enter file name field.
3. Click Save.
A message dialog box will be displayed for each module in the project,
telling you that the module exists and giving you the option to overwrite
it or cancel the operation.
13
2
4. Click Overwrite for each module if you want to rename the project and
save the module.
Click Cancel if you do not want to rename the project and overwrite the
current module.
If you click Overwrite for each of the modules the project will be
renamed; the new project name will be displayed in the title bar of the
App Builder primary window. The old project file (.bip suffix) will still
be in the folder, but it will not be the active project file. If you generate
code for the project and run make in the folder, the new project name will
be used.
14
To Close a Project
Choose Close Project from the File menu of the App Builder primary window
or Close from the Project menu of the Project Organizer.
If you have made changes since saving the project a message dialog box
will be displayed, giving you the chance to discard the changes or to
cancel the close operation.
15
Note If you drag and drop a window on the workspace after creating a
new project, the Module Name dialog box will be displayed, just as if you
had chosen New Module from the File menu.
2. In the dialog box, type in the name you want to give the new module.
3. Click Apply or press Return.
The name of the new module will appear in the Editing Module field at
the bottom of the App Builder primary window. Any windows you drag
from the Windows palette and drop on the workspace will be part of the
new module.
16
2
4. Change Import By method, if necessary.
By default, Import By Copy is selected. If you want to import the
module by reference rather than making a copy of it, click the Reference
button.
Note Import By Reference, which causes module files to be shared, can be
dangerous, since the actual module file may be changed or deleted
inadvertantly.
5. Double-click on the module to be imported in the Files list.
Or, select the file and click Import.
The module will be added to the current project the next time you save
the project.
To Save a Module
All modules in a project are saved when you save the project. If you want to
save individual modules, you can do so in the Project Organizer.
1. Display the Project Organizer by choosing Project Organizer from the
File menu of the App Builder primary window.
2. In the module array of the Project Organizer select the module you want
to save.
17
2
3. Choose Save from the Module menu.
If you have saved the module previously during this App Builder session,
the module will be saved without comment.
If this is the first time you have saved the module, the Save BIL File
dialog box will be displayed, with the name of the selected module (with
a .bil suffix) in the Enter file name field.
4. Change to the folder where you want to save the module, if necessary.
5. Click Save or press Return.
To Rename a Module
Use Save As from the Module menu of the Project Organizer to rename a
module. When you save the current project, the new module name will
replace the old name in the project (.bip) file. The original module will still
be in the project folder, but it will not be part of the project. To save a
module without affecting the project, see To Export a Module on page 18.
1. Display the Project Organizer by choosing Project Organizer from the
File menu of the App Builder primary window.
2. Select the module you want to rename.
3. Choose Save As from the Module menu.
The Save BIL File dialog box will be displayed, with the name of the
selected module (with a .bil suffix) in the Enter file name field.
4. Type a file name in the Enter file name field.
5. Click Save or press Return.
The new module name will replace the old name in the project (.bip) file
the next time you save the project.
To Export a Module
Do the following to save a copy of a module in the current project. The
current project is not affected when you export a module. A new module is
created, which is not part of the current project; the original module
remains as part of the project.
18
2
1. From the File menu of the App Builder primary window choose Export
Module and select one of the currently open modules from the submenu
displayed.
Or, in the Project Organizer select the module to be exported in the
module array and choose Export from the Module menu.
The Export File dialog box will be displayed, with the selected module
name in the Enter file name field.
2. Type a new file name in the Enter file name field
Or, change to the folder where you want to save the module and type a
file name in the Enter file name field.
If you want to save a version of the module in the current folder, do not
change folders. Simply give the module a different name.
3. Click Export or press Return.
A copy of the selected module has been created.
19
2
5. Click Export or press Return.
The file will be saved with a .uil suffix.
20
2
Note If a module you want to show is in a different project, you will first
have to open the other project. See To Open an Existing Project on
page 11 for instructions.
21
22
The basic App Builder process for laying out an interface is to drag objects
from the App Builder primary window and drop them on the workspace or
on other App Builder objects.
See Appendix A, App Builder Windows and Dialog Boxes for a full
description of the primary window and its elements, and for a description of
the Module Browser.
Dragging and Dropping Palette Objects
24
24
26
28
28
To Paste Objects
29
30
23
3
Dragging and Dropping Palette Objects
The rules for dropping palette objects are simple; they are enforced by error
messages when they are violated.
Windows (main window, custom dialog, file selection dialog) are dropped
on the workspace.
Panes (control, draw area, text, and term) are dropped on windows or on
other panes.
Controls (buttons, boxes, choice objects, and others) are dropped on a
control pane. The menu bar, which is on the Controls palette, is not
strictly a control; it is dropped on a main window only.
24
3
1. Drag a control pane from the Panes palette and drop it on the top-left
corner of the main window or custom dialog.
2. Drag the bottom-right corner of the control pane (an arrow pointing
towards a corner will be displayed) beyond the bottom-right corner of the
window and release mouse button 1.
The control pane will be attached to the four sides of the window. If you
resize the window, the control pane will be resized with it.
See To Attach Objects in an Interface on page 103 for details about
attachments.
25
3
Selecting Interface Objects
For many actions, including editing, moving, aligning, and grouping, you
need to select one or more objects in an interface. You can only multiplyselect siblingsobjects that are children of the same parent. (All windows
in a project are siblings, for instance, as are panes in a window and control
objects in a single control pane. Panes that are dropped on a control pane
and created as children of the control pane function like control objects in
the control pane.)
You can select objects in the interface or in the Module Browser. See
Module Browser on page 132 for a description of the Browser. See
Editing Objects in the Interface or in the Browser on page 28 for
information about cutting, copying, and pasting interface objects.
Only control objects can be grouped or aligned (using the Align and
Distribute functions).
26
Note When you have selected a number of objects in the interface, all the
objects will move if you press mouse button 1 on one of the objects and
move the mouse. A rectangular border will be drawn around the objects as
you move the mouse.
27
3
Editing Objects in the Interface or in the Browser
Once you have created an interface by dragging and dropping objects on the
workspace or on other App Builder objects, you may want to edit the
interface in various ways. You can cut, copy, paste, and delete objects, and
you can undo the last editing function performedand you can perform
these functions in the interface or in the Module Browser, or between the
interface and the Browser. See Module Browser on page 132 for a
description of the Browser.
You can copy or cut any object you can selectfrom a single control to a
complex window with multiple panes and many controlsand you can
paste that object in any open module.
Note Objects selected in the interface are also selected in the Browser,
and vice versa. See To Select Control Objects in the Interface or the
Browser on page 26 for instructions for selecting objects. When you edit
objects in the Module Browser, be sure to check to see what is happening in
the interfaceespecially if you are cutting and pasting.
28
To Paste Objects
Once you have placed objects in the edit buffer by cutting or copying, you
can paste the objects in the interface with the Paste function.
1. Select the paste location.
Window: Windows can be pasted if any App Builder object is selected.
Pane: Panes can be pasted if an App Builder window or control pane is
selected.
Control: Controls can be pasted if an App Builder control pane or control
object is selected. If a control object is selected, the controls will be
pasted in the parent control pane.
2. Choose Paste from the Edit menu in the App Builder primary window,
from the Edit menu in the Module Browser, or from the pop-up menu in
either the primary window or the Browser (displayed by pressing mouse
button 3 in the interface or the Browser).
The objects will be added to the current module and will be displayed
appropriately in the interface.
Note Pasted objects may obscure other objects; you may have to do some
moving and aligning after the paste. See Aligning and Distributing Objects
in an Interface on page 30 for instructions.
Choose Undo before performing any other function to cancel the paste
operation.
To Delete Objects
1. Select the objects you want to delete in the interface or the Browser.
2. Choose Delete from the Edit menu in the App Builder primary window,
from the Edit menu in the Module Browser, or from the pop-up menu in
either the primary window or the Browser (displayed by pressing mouse
button 3 in the interface or the Browser).
The objects will be deleted from the interface.
Choose Undo before performing any other function to cancel the delete
operation.
29
3
Aligning and Distributing Objects in an Interface
This section describes static alignment and distribution of objects: the
objects are aligned or distributed one time only. See Chapter 7, Grouping
and Attaching Objects, for instructions to find out how to group and attach
objects for dynamic alignment.
Note If you select objects that are arranged horizontally and choose a
vertical alignment (or vice versa), the objects will end up on top of one
another. You can unstack the objects by choosing Distribute from the pop-
30
3
up menu immediately after the align function (the objects will still be
selected). See To Distribute Control Objects Evenly on page 31 for
instructions.
31
32
All objects dragged from the App Builder palettes have properties that can
be edited. These properties include object name, color, and a variety of
other characteristics, depending on the object type. Once you have dropped
an object or have created an object in the interface, you will want to
customize the object by editing it in the Revolving Property Editor. See
Appendix B, Revolving Property Editor, for an illustration of a property
editor and descriptions of each of the elements in all of the property editors.
34
34
35
37
33
Or, select an object in the interface or in the Module Browser and choose
Props (Revolving or Fixed) from the pop-up menu (displayed by pressing
mouse button 3 in the interface or the Browser) to open the property
editor with the object selected.
Or, choose Properties from the Editors menu in the App Builder primary
window.
The Revolving Property Editor will be displayed, with the object most
recently selected in the interface or the Module Browser selected in the
Revolving Property Editor.
34
4
Note List item editing: once you have the appropriate number of items
in the list, the easiest way to perform item editing in those property editors
that have an item list* is to select the first item in the list, thus selecting it
in the label text field. Type a new name for the item and click Return. The
new name will be displayed in the item list and the next item in the list
will be selected. Continue down the list with this select, type, Return
sequence until all items are completed.
*Property editors with item lists include the choice objects (Radio Box,
Check Box, Option Menu), Combo Box, List, Menu, Menubar, and Spin Box.
4. Click the Apply button to apply the changes and leave the property
editor displayed.
Click the OK button to apply the changes and close the property editor.
Click Reset to reset all changed elements to their values at the last
Apply.
Click Cancel to reset all elements to their values at the last Apply and
close the property editor.
See Example: Editing Main Window Properties on page 37 for specific
instructions for editing the properties of a main window.
35
4
Or
1. Choose the object type you want to edit in the Object Type menu of the
Revolving Property Editor.
2. Click the Tear-off button at the top-right of the Revolving Property
Editor.
A fixed version of the property editor for the selected object type will be
displayed.
36
4
3. Click OK to select the color and dismiss the Color Chooser.
The selected color will be displayed in the rectangle next to the
Background or Foreground menu and the name of the color will be
displayed in the text field next to the colored rectangle.
4. Repeat the process for Background or Foreground, if desired.
5. Click Apply in the property editor to apply the changes.
The background or foreground of the object in the interface will display
the selected color.
37
4
4. Type the names of an Icon File, an Icon Mask File, and an Icon Label, if
you want an icon to represent the window when it is minimized.
The Icon File and Icon Mask File must be xpm or xbm graphics files.
5. Change the User Resize Mode, if appropriate.
This determines if a user can resize the window in the compiled
application.
6. Select Menubar, Toolbar, and Footer, as appropriate, to add these
functional areas to the window.
If you select Menubar, you will want to create menus after you finish
editing main window properties. See Creating and Editing Menus on
page 47 for instructions.
Note Selecting Menubar is the same as dragging a menu bar from the
Controls palette and dropping it on a main window.
If you select Toolbar or Footer, you will want to edit the properties of the
control panes that comprise these objects after you finish editing main
window properties. You can drop controls on the control panes, make
connections to programmatic actions, and do other things that can be
done to any control pane.
7. Change the Size Policy and Size, as appropriate.
Note For all main windows and custom dialogs you will probably want to
leave the Size Policy as Fixed while you are creating the application, and
change it to Fit Contents as you finish the application, for
internationalization and other purposes. When Size Policy is Fit Contents,
the window will change size to accommodate changes in the size of objects
as the text in the objects changesor if the font size changes, for example.
8. Set Initial State to Iconic if you want the application to appear as an
icon when it is started.
9. If you want the main window to be invisible when the application is
started, deselect the visible setting for Initial State.
If the Visible check box is checked, click it to deselect it.
38
4
10. Set Background and Foreground colors, if appropriate.
Type in a color name if you know it or press mouse button 1 on the
Background or Foreground menu button and choose Color Chooser to
display the Color Chooser. Select a color and click OK. Background sets
the color of the blank pane area of the window. Foreground does nothing
that is visible in the completed interface.
11. Click Help Text to add on item help, if appropriate.
See To Create Help on page 72 for instructions.
12. Click OK to apply the changes and dismiss the Revolving Property
Editor.
Unless you are creating a primary main window, you are finished with
this task.
13. If you are creating a primary main window, choose Application
Framework Editor from the Editors menu.
14. Type a Vendor Name and Version number in the Application section of
the Application Framework Editor, if appropriate.
See To Establish Application Framework Behavior on page 90 for
details about the editor.
15. Click OK in the Application Framework Editor to apply the changes and
close the editor.
39
40
Most App Builder objects are dragged from the windows, panes, or controls
palettes. Some objects (layered panes, paned windows, menus, and
messages) are created objects. This chapter explains how to create, use, and
edit these objects.
Creating and Editing Pane Entities
42
Layered Panes
43
Paned Windows
44
47
47
59
Message Editor
59
64
41
5
Creating and Editing Pane Entities
There are four types of pane objects on the Panes palette of the App Builder
primary window: control pane, text pane, draw area pane, and term pane.
In addition, there are three types of created pane entities: child panes,
layered panes, and paned windows.
Child Panes
A child pane is a text pane, term pane, or draw area pane that has been
dropped on a control pane and made a child of the control pane. In App
Builder, for example, the Label field in the Label Property Editor is a text
pane that is a child of a control pane.
42
5
Layered Panes
A layered pane is a stack of two or more panes, one on top of the other. In
App Builder, for example, the Revolving Property Editor, which is used to
display the properties of each of the interface objects, is a layered pane.
43
Paned Windows
A paned window is a combination of two or more panes (control, text, draw
area, or term panes, in any combination) into one virtual window with
multiple panes, one above the other, separated by a movable sash. While
the paned window maintains a constant height, the individual panes
become smaller or larger as you move the sash between them.
A paned windows initial size and position are determined by the position
and size of its panes: the left margin of the paned window is determined by
the left (West) edge of the pane that is furthest to the left. The width of the
paned window is determined by the width of its widest pane.
44
5
You can set limits on the minimum and maximum heights of any of the
panes by setting Pane Height in the Paned Window property editor. See
Appendix B, Revolving Property Editor, for more details.
Once you have created a paned window you can resize the panes by
pressing mouse button 1 or mouse button 2 on the sash and moving it up or
down.
45
5
attachments and that the East attachment has been set to that of the
rightmost pane. You can adjust the right attachment in the Attachments
Editor. Click OK.
46
5
Creating and Editing Menus
A menu is a list of items with meaningful labels. Each item is connected to
a function which is performed when the menu is displayed and the item is
selected. This section explains how to create and edit menus, how to attach
menus to objects, and how to connect menu items to programmatic
functions.
Menus can be attached to menu buttons, menubar items, lists, and any of
the four types of panes. A menu is automatically attached to an option
menu, so there is no need to attach a menu to it.
Edit
Tearoff
47
5
Separator menu item is used to create a visual
division in a menu, such as that seen in the Editors
menu of the App Builder primary window.
Item Mnemonic
Accelerator
48
Line Style
Item SubMenu
A menu button and a text field for attaching, deattaching, creating, or editing a submenu for the
selected item in the Items list. If a submenu is
attached to the selected item, the name of the
submenu will be displayed in the text field. Not valid
for separator item type.
To Create a Menu
This description assumes you are creating a menu and attaching it to an
interface object as two separate procedures. To combine these procedures,
see To Create and Attach a Menu on page 54.
Note Menus are available within modules only. Be sure the menu created
is in the same module as the object you wish to attach the menu to. Menus
are created in the current module, which is determined by what is selected
in the interface. The Editing Module field in the object information area of
the App Builder primary window indicates the current module.
1. Display the Menu Property Editor by choosing Menus from the Editors
menu in the App Builder primary window.
Or, display the Revolving Property Editor and choose Menu as the Object
Type.
Choosing Menus from the Editors menu in the primary window is the
same as clicking the Tear-off button in the Revolving Property Editor
when the Object Type is Menu.
See Menu Property Editor on page 47 for a description of the editor.
If no menus exist in the current project, the Menu Objects list will be
blank and only the Add New Menu and Edit buttons will be active.
If any menus exist in the current project, they will be listed in the Menu
Objects list. One of the menus will be selected in the list and the menus
properties will be displayed for editing.
2. Click Add New Menu.
A menu will be created with a default Object Name (menu, menu2,
and so on, depending on how many menus there are in the current
module), and with two items in the Items list (Item1 and Item2). The
menu will be added to the end of the Menu Objects list, with the name of
49
5
the current module preceding the menu name. The menu will have
default values for Object Name, Tearoff, Items, Item Label Type, Label,
and Item State.
If you know you are going to need a number of menus, you could create
them all at the same time by clicking Add New Menu the appropriate
number of times. You can also create menus that will be used as
submenus, to be attached to menu items, at this time.
3. Edit the menu, as described in To Edit a Menu on page 50.
You can edit the menu immediately after creating it or you can edit it
later.
After you have created and edited a menu you will want to attach it to an
interface object and make the menu functional by creating connections
between menu items and specific actions. See To Attach an Existing Menu
to an Object on page 52 and Connecting Menu Items to Actions on
page 78 for instructions. See To Attach an Existing Submenu to a Menu
Item on page 55 if you want to attach a submenu to a menu item.
To Edit a Menu
After creating a menu you will need to edit the menu: add menu items, give
the menu items meaningful names, add submenus, and so on.
1. Display the Menu Property Editor by choosing Menus from the Editors
menu in the App Builder primary window.
Or, display the Revolving Property Editor and choose Menu as the Object
Type.
See Menu Property Editor on page 47 for a description of the editor.
2. Change Object Name, if necessary.
The automatically-generated Object names, which are unique within
modules, do not usually need to be changed.
3. Click Enabled to enable the Tearoff function, if necessary.
This will make the menu postable, meaning that if you click on the
Tearoff indicator (a dotted line) the menu will not be dismissed as soon
as you select a menu item. The menu will remain posted until you
dismiss it.
50
5
4. Add menu items to the Items list, if necessary.
Click Add Item to add an item after the selected item; choose from the
Edit menu button to perform other edit functions.
5. Change Item Label Type for menu items in the Items list, if necessary.
Choices are String (text), Graphic, or Separator. Label becomes Graphic
Filename if Graphic is chosen; Line Style becomes active if Separator is
chosen.
6. Type a different Label or Graphic Filename for the selected item, if
necessary.
Note The easiest way to edit labels for menu items is to select the first
one in the Items list, thus selecting it in the Label field. Type a new name
and click Return. The new name will be displayed in the Items list and the
next item in the list will be selected. Continue down the list with this
select, type, Return process until all labels are completed.
If Graphic Item Label Type was chosen, the Graphic Filename must be
an xpm or xbm graphic file.
7. Type an Item Mnemonic, if necessary.
Type one of the letters in the item label. That letter will be underlined in
the menu item label. If the menu is posted, pressing that key will cause
the action connected with the menu item to be performed.
Note The same mnemonic letter, regardless of case, cannot be used more
than once in a menu.
8. Type an Accelerator, if necessary.
An accelerator is comprised of a prefix (Ctrl, Alt, Meta, or Shift), <key>,
and a letter (uppercase or lowercase). See Menu Property Editor on
page 47 for more information.
9. Choose a Line Style, if Item Label Type is Separator.
See Menu Property Editor on page 47 for the list of choices.
51
5
10. Attach an Item Submenu, if appropriate.
See To Attach an Existing Submenu to a Menu Item on page 55 for
instructions.
11. Change Item State, if necessary.
By default the item state is Active. If you want the menu item to be
inactive when the application is started, click the Active check box to
deselect it.
12. Select Background and Foreground Colors, if necessary.
Type in a color or choose Color Chooser from the menu and select a color
from the Color Chooser. See To Select Colors from the Color Chooser on
page 36 for details.
13. Click Connections to add programmatic connections to menu items, as
necessary.
See Connecting Menu Items to Actions on page 78 for instructions.
14. Click Apply or OK to apply the changes.
If you click Apply the property editor will remain displayed.
52
5
2. Select a menu to attach to the selected object.
Click mouse button 2 or press mouse button 1 or 3 on the Popup Menu or
Pulldown Menu menu button. Choose the appropriate menu from the
Menus submenu.
The name of the selected menu will be displayed in the text field of the
Popup Menu or Pulldown Menu.
3. Click OK or Apply.
The menu will be attached to the selected object. See Making
Connections Between Objects on page 76 for instructions for making the
menu functional.
Note If you attach a menu to one of the pane objects or to a list, the menu
will be a pop-up menu, displayed in test mode or in the compiled
application by pressing mouse button 3 with the cursor on the pane or the
list.
53
54
The name of the selected menu will be displayed in the text field of the
Item SubMenu.
5. Click OK or Apply.
The submenu will be attached to the selected menu item. See Making
Connections Between Objects on page 76 for instructions for making the
submenu functional.
55
56
57
5
6. Click OK or Apply in the Revolving Property Editor.
The Help menu has been attached to the Help item in the menu bar. The
Revolving Property Editor will be dismissed if you click OK.
58
5
Creating and Editing Messages
This section describes the Message Editor and explains how to create and
edit message dialog boxes.
Message Editor
The Message Editor is used to create various types of messages to be
displayed at appropriate times in the compiled application. It is shown in
Figure 5-1 and then described. See To Create a Message Dialog Box on
page 61 and To Edit a Message on page 62 for instructions on its use.
Type menu
Message text pane
Messages
Module menu
59
5
Add Message
Delete Message
Name
Dialog Title
Type
60
Connections
Help Text
5
Show Dialog
See Property Editor: Common Buttons on page 143 for descriptions of the
buttons at the bottom of the editor.
61
5
7. Type the message text in the message text pane, pressing Return when
you want a new line to start in the compiled message.
8. Specify which buttons will appear in the message dialog box by clicking
the check boxes below the message text pane and typing the labels you
want on the Action1, Action2, and Action3 buttons.
Each of the message types includes a default set of buttons that you can
modify:
Error: Action2
Information: Action1
Working: Action1
Question: Action1
Warning: Action2
10. Click the Help Text button and create help text, as appropriate.
See To Create Help on page 72 for instructions.
11. Click OK or Apply to apply the changes.
The Message Editor will be dismissed if you click OK.
To Edit a Message
1. Choose Messages from the Editors menu of the App Builder primary
window to display the Message Editor.
2. Select the message you want to edit in the Messages list.
3. Edit the message, as appropriate.
62
5
To delete a message, click Delete Message.
To modify the dialog box title, click in the Dialog Title text field and
type the new label.
To change the message type, choose a different Type icon.
To modify the message text, click in the message text pane and type
the appropriate changes.
To change the available buttons, select the check boxes and type new
button labels, if appropriate.
To change the default button, choose another from the Default Button
menu.
To modify help text, click Help Text, make the changes in the Help
Editor, and click OK in the Help Editor.
4. Click OK or Apply to apply the changes.
The Message Editor will be dismissed if you click OK.
63
5
5. Choose a When item (Action1, Action2, Action3, or Cancel Activated,
depending on which buttons were checked in the Message Editor).
6. Type the name of the Function to be called when the selected button is
selected.
When code is generated, this function is created in
<module_name>_stubs.c. You will have to substitute appropriate code
before running make.
7. Click Connect to create the connection.
The connection will be displayed in the View list at the bottom of the
Connections Editor.
8. Repeat the previous three steps for each button except Help.
9. Click Cancel to dismiss the Connections Editor.
dtb_show_modal_message()
dtb_show_message()
64
5
button the corresponding callback is called. Since modal dialogs are
blocking, the button callbacks are not called. Instead, the value is returned
by dtb_show_modal_message, which indicates which button is pressed by
the user.
You can then examine the return value (for example via a switch
statement) and execute the appropriate piece of code.
Here's an example of displaying a message modally. Say that you have
created a simple application, named foo. The project is named foo.bip
and consists of one module, foo.bil. The module foo.bil consists of a
main window, control pane, and two text fields, one for the user to enter a
person's first name and the other to enter the last name. If the user types
digits, an error message will be posted, informing the user that digits are
not allowed, and giving the user a couple of options. The user can start
over, which means the text entered will be erased, or the user can continue,
which means that the text entered will be left intact, giving the user
discretion as to how to modify the text.
65
5
A call-function connection is made for both text fields, which will be called
each time the user types something. The function for the first text field will
check if the character typed is a digit. If so, it will post the error message
modally:
void
verify_first_nameCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
char
*text = (char *)NULL;
int
textlen = 0;
DTB_MODAL_ANSWER
answer = DTB_ANSWER_NONE;
DtbFooMainwindowInfo instance = (DtbFooMainwindowInfo) clientData;
/*** DTB_USER_CODE_END
^^^ Add C variables and code above ^^^ ***/
66
void
verify_last_nameCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
char
*text = (char *)NULL;
int
textlen = 0;
DtbFooMainwindowInfo instance = (DtbFooMainwindowInfo) clientData;
/*** DTB_USER_CODE_END
67
5
/*** DTB_USER_CODE_END
}
void
start_overCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
DtbFooMainwindowInfo instance = (DtbFooMainwindowInfo) clientData;
/*** DTB_USER_CODE_END
void
continueCB(
Widget widget,
XtPointer clientData,
XtPointer callData
)
{
/*** DTB_USER_CODE_START vvv Add C variables and code below vvv ***/
/*** DTB_USER_CODE_END
^^^ Add C variables and code above ^^^ ***/
/*** DTB_USER_CODE_START vvv Add C code below vvv ***/
/*** DTB_USER_CODE_END
^^^ Add C code above ^^^ ***/
}
68
5
if (mbr->action1_callback != (XtCallbackProc) NULL)
XtAddCallback(msg_dlg, XmNokCallback, mbr->action1_callback, NULL);
if (mbr->cancel_callback != (XtCallbackProc) NULL)
XtAddCallback(msg_dlg, XmNcancelCallback, mbr->cancel_callback, NULL);
if (mbr->action2_callback != (XtCallbackProc) NULL)
{
action_btn = dtb_MessageBoxGetActionButton(msg_dlg, DTB_ACTION2_BUTTON);
if (action_btn != NULL)
XtAddCallback(action_btn, XmNactivateCallback,
mbr->action2_callback, NULL);
}
if (mbr->action3_callback != (XtCallbackProc) NULL)
{
action_btn = dtb_MessageBoxGetActionButton(msg_dlg, DTB_ACTION3_BUTTON);
if (action_btn != NULL)
XtAddCallback(action_btn, XmNactivateCallback, mbr->action3_callback, NULL);
}
The structure mbr contains all the necessary information for the message.
The structure is filled in with the values specified in the Message Editor
when the message object was created via the dtb_&_&_initialize()
routinein this example, dtb_foo_message_initialize().
69
70
Once you have laid out an interface you may want to add help to interface
elements, make programmatic connections between objects, specify drag
and drop behavior, and specify application framework behavior (including
internationalization, resource file creation, session management, and
ToolTalk message handling).
Creating Help and Help Connections
71
76
78
81
83
87
71
6
menu or by clicking More in a help dialog box. See the Help System
Author's and Programmer's Guide, which is included in the desktop Help
Developer's Kit, for instructions for creating a help volume.
See To Test On Item Help on page 107 for instructions for testing On Item
help. If help is not available for a particular child object (a control or a
pane) but is available for the parent of the child object (a pane or a
window), help for the parent object is displayed.
To Create Help
1. Display the Revolving Property Editor.
2. Choose the Object Type for which you want to write help.
3. Select the object for which you want to write help.
4. Click Help Text to display the Help Editor with the appropriate object
selected.
72
73
6
8. Click OK or Apply to apply the changes.
If you want to add help to other objects, choose the appropriate Object
Type in the menu, select the appropriate object, and repeat the previous
two steps.
The Help Editor will be dismissed if you click OK.
74
6
8. Click Connections to display the Connections Editor.
The Connections button is at the bottom of the Menu Property Editor.
9. Choose Menu Item in the Source menu.
10. Select the On Item Help item in the Source list.
11. Choose Activate On Item Help from the Action Type menu.
12. Click Connect.
When you choose the On Item Help item in the Help menu in test mode or
in the compiled application, the cursor will become an arrow with a
question mark. Move the cursor over an object and click mouse button 1 to
display On Item help for the selected object (or for one of its parent objects
if no help is available for the object itself). See To Test On Item Help on
page 107 for more information.
75
6
Making Connections Between Objects
In its simplest form a connection is a programmatic relationship between a
source object and a target object: when I click on Button A I want Dialog
Box B to be displayed. This type of connection is described below in To
Make a Connection between Two Objects.
Different types of connections from menu items are described in To
Connect a Menu Item to a Predefined Action on page 78, To Connect a
Menu Item to a Call Function on page 79, and To Connect a Menu Item to
an Execute Code Action on page 80.
Other types of connections (to On Item Help and to a help volume) were
discussed in To Connect a Help Menu to On Item Help on page 74 and in
To Connect a Help Menu to a Help Volume on page 75. In To Connect a
Non-Modal Message to a Function on page 63, a message dialog box is
connected to the function which causes the dialog box to be displayed.
76
6
Note If you select an object in the Revolving Property Editor and click
the Connections button, the Connections Editor will be displayed with the
selected object selected in the Source list.
77
6
4. Click Connect to make the connection.
The connection will be displayed in the View list at the bottom of the
Connections Editor.
5. Click Cancel to dismiss the Connections Editor.
78
6
5. Choose the appropriate type of object from the Target menu.
This is the type of object that will be acted on when the When action is
performed on the source menu item.
6. Select an object in the list of Target items.
This is the specific object that will be acted on when the When action is
performed on the source menu item.
7. Choose a When action for the Source menu item.
Choices are Activated, Created, and Destroyed.
8. Choose a target action from the option menu to the right of Action Type.
The choices vary depending on the target type.
9. Click Connect to make the connection.
The connection will be displayed in the View list at the bottom of the
Connections Editor.
10. Click Cancel to dismiss the Connections Editor.
The designated target action will be performed in the compiled application
when the When action is performed on the menu item.
Depending on the source When and target action, you may be able to test
the connection in Test mode. See To Test Menus in a Module on page 108
for instructions.
79
6
2. Choose Menu Item from the Source menu.
All of the menu items in the current project will be listed.
3. Select a menu item from the list below the Source menu.
This is the item from which the connection will be made.
4. Choose Call Function as the target action type from the Action Type
menu.
The Function text field will be activated.
5. Type the name of the function to be called in the Call Function text
field.
This is the function that will be called when the When action is
performed on the source menu item. See Adding User Code to
Generated Code on page 117 for information about incorporating user
code into the generated code.
6. Choose a When action for the Source menu item.
Choices are Activated, Created, and Destroyed.
7. Click Connect to make the connection.
The connection will be displayed in the View list at the bottom of the
Connections Editor.
8. Click Cancel to dismiss the Connections Editor.
80
6
2. Choose Menu Item from the Source menu.
All of the menu items in the current project will be listed.
3. Select a menu item from the list below the Source menu.
This is the item from which the connection will be made.
4. Choose a When action for the Source menu item.
Choices are Activated, Created, and Destroyed.
5. Choose Execute Code as the target action type from the Action Type
menu.
The Execute Code Editor will be displayed.
6. Type the code to be executed in the Execute Code Editor.
The Execute Code Editor will be displayed. Type the code in the editor.
See Adding User Code to Generated Code on page 117 for information
about incorporating user code into the generated code.
7. Click OK in the Execute Code Editor to apply the changes and dismiss
the editor.
8. Click Connect in the Connections Editor to make the connection.
The connection will be displayed in the View list at the bottom of the
Connections Editor.
9. Click Cancel to dismiss the Connections Editor.
The code will be executed in the compiled application when the When
action is performed on the menu item.
81
82
6
Establishing Drag and Drop Behavior
Use the Drag and Drop Editor to establish drag and drop behavior for
interface objects. See To Establish Drag and Drop Behavior on page 85 for
instructions.
Object Type
83
6
Objects
Drag Operations
Cursor Filename
84
Data Types
Drag Connection
Drop Operations
Data Types
Drop on Children
Drop Connection
85
6
16. Click Drop Connection to display the Connections Editor.
17. Choose Dropped On as the When action in the Connections Editor.
18. Choose Call Function as the Action Type in the Connections Editor.
19. Type a name for the called function in the Function text field in the
Connections Editor.
This is the name of the function that will be called when a drop
operation is performed. You will have to edit the stubs.c file to make
the called function do something useful. See Adding User Code to
Generated Code on page 117 for information.
20. Click Connect in the Connections Editor.
21. Click Cancel to dismiss the Connections Editor.
22. Click OK or Apply in the Drag and Drop Editor to apply the changes.
The Drag and Drop Editor will be dismissed if you click OK.
86
6
Establishing Application Framework Behavior
Use the Application Framework Editor to specify basic functionality in the
application for internationalization, resource file attributes, session
management, and ToolTalk message handling. See To Establish
Application Framework Behavior on page 90 for instructions.
87
6
Application Vendor Name
A text field for typing an optional string, which will
be stored in the source code. Used in the call to
initialize ToolTalk (if ToolTalk is enabled).
Application Version
88
6
Geometry: X, Y, Width, Height, all attachment
attributes
Other Strings
Other
Session Management Method
An option menu for specifying the method of session
management (None, Command Line, Session File, or
Both), and two push buttons (Session Save
Connection, Session Restore Connection) for
displaying the Connections Editor and making
appropriate connections.
ToolTalk Desktop Message Handling
An option menu for specifying what level of the
ToolTalk Desktop Message Alliance protocol the
application will participate in, and a push button
(Advanced ToolTalk Connections) for displaying the
Connections Editor. The ToolTalk desktop protocol is
a set of predefined ToolTalk messages which
communicate desktop-type events or requests to a
running application. App Builder support for
ToolTalk is provided at three levels: None, Basic, or
Advanced, as described below.
None. There is no participation in the ToolTalk
Desktop Protocol; no ToolTalk code is generated.
Basic. The ToolTalk library responds to Desktop
messages in categories 1-3 in a predefined and
standard way. Code is generated in main() which
initializes ToolTalk and calls the function which tells
ToolTalk to handles these messages. At this level,
you do not need to write any special application
code.
Advanced. The ToolTalk library responds to
messages in categories 1 and 2, but the application
is notified (via callback) when messages in categories
3 & 4 are received.
If you choose Advanced, you must use the
Connections Editor to identify which messages the
application wishes to handle. If you click the
Advanced ToolTalk Connections button, the
Connections Editor will be displayed with
89
6
Application as the Source object type. The When
option menu lists four ToolTalk choices: ToolTalk Do
Command, ToolTalk Get Status, ToolTalk
Pause/Resume, and ToolTalk Quit. The only valid
action type for a ToolTalk connection is Call
Function; your callback function will be called when
the ToolTalk message is received.
At this level code is generated in [project].c:main()
which initializes ToolTalk and sets up the Desktop
Protocol so that the callbacks defined in the
Connections Editor will be called when the
corresponding message is received. Each userdefined callback contains descriptive comments
describing what the application is expected to do in
response to the message. These callbacks are also
generated in [project].c.
90
6
7. Select Session Save Connection and/or Session Restore Connection, as
appropriate, to make connections in the Connections Editor.
8. Choose a Desktop Message Handling level (None, Basic, or Advanced) in
the ToolTalk section, as appropriate.
See Establishing Application Framework Behavior on page 87 for more
about ToolTalk message handling.
9. If you did not choose Advanced in the previous step, click OK to apply
the changes made and dismiss the Application Framework Editor.
10. Click Advanced ToolTalk Connections if you chose Advanced in the
previous step.
11. Choose the appropriate ToolTalk function from the When menu in the
Connections Editor.
12. Choose Call Function as the Action Type.
13. Type in the name of the appropriate call function.
This is the name of the function that will be called when a ToolTalk
operation is performed. You will have to edit the stubs.c file to make
the called function do something useful. See Adding User Code to
Generated Code on page 117 for information.
14. Click Connect to make the connection.
15. Click Cancel to dismiss the Connections Editor.
16. Click OK in the Application Framework Editor to apply the changes and
dismiss the editor.
91
92
94
To Create a Group
94
95
96
97
Attaching Objects
97
Attachments Editor
98
103
104
93
7
Grouping Objects
A group is a collection of objects that can be treated as a unit. Once the
objects in a group are positioned as desired, the group can be moved,
maintaining the relative positioning of the individual objects. Because
groups use dynamic layout for positioning objects, spacing and alignment in
the group are maintained if any of the objects in the group change size.
.See Group Property Editor on page 149 for a description of the editor and
each of its elements
To Create a Group
1. Select the control objects you want to be part of the group.
You can select the objects either in the interface or the Module Browser,
and you can select the objects in whatever manner is most convenient.
See To Select Control Objects in the Interface or the Browser on
page 26 for instructions.
2. Choose Group from the Layout menu or the pop-up menu (displayed by
pressing mouse button 3 with the cursor in the window interface or in
the Module Browser).
A rectangular box will be drawn around the group in the interface,
indicating that the group is selected. Note that Ungroup is active in the
Layout and pop-up menus; this is only true when a group is selected.
A new object will be displayed and selected in the Module Browseran
object called "group" (or "group2," and so on, if other groups exist in the
module). The group object is the parent of the objects that comprise the
group. Group members cannot be moved independently. Any attempt to
move an object in a group will cause the entire group to move.
94
95
7
8. Designate vertical spacing (if either vertical alignment or row-column
layout type was chosen).
The absolute values are in pixels; 10 is the default.
9. Choose a horizontal alignment (if either horizontal alignment or rowcolumn layout type was chosen).
The choices are align on top edge of objects (the default), align on middle
of objects, or align on bottom edge of objects.
10. Designate horizontal spacing (if either horizontal alignment or rowcolumn layout type was chosen).
The absolute values are in pixels; 10 is the default.
11. Deselect Visible if you do not want the objects in the group to be visible
when the application is opened.
12. Deselect Active if you do not want the objects in the group to be active
when the application is opened.
13. Click OK or Apply to apply the changes.
The Revolving Property Editor or Group Property Editor will be
dismissed if you click OK.
96
Attaching Objects
Attachments (and groups, which are based on attachments) establish
dynamic layout behavior for objects in the interface. Dynamic layout
behavior ensures that objects will maintain consistent relationships during
resize activities. Attachments enable an internationalized application to
work well in a number of locales.
All child objects are attached by their top and left edges to the top and left
edge of their parent object, by default. Thus a control pane dropped on a
main window is attached by its left and top edges to the left and top edges
of the main window. Similarly, a button dropped on the control pane is
attached to the control pane.
If the parent object is resized in an upward or leftward direction, the child
object moves with the parent, maintaining the distance from the top and
left edge of the parent.
If a pane object is dropped on the top or left edge of its parent it will be
attached to that edge with an offset of 0. If it is dropped some distance to
the right and below the left and top edges of its parent, it will have positive
offsets.
97
7
If a pane object is resized from its right and bottom edges so that it spans
its parent object, it will be attached to the right and bottom edges of its
parent.
Attachments Editor
Used to attach objects to each other for layout purposes, the Attachments
Editor is described below.
98
7
Object Type
Objects
Parent
Children
99
7
The selected object is shown in the center of its four
possible attachments. The attachments, starting at
the top and going clockwise, are top edge of selected
object, right edge of selected object, bottom edge of
selected object, and left edge of selected object.
Top- and left-edge attachments are illustrated and
described below; by default an object is attached at
its top and left edges to the top and left edges of its
parent. The selected object (the object at the center
of the four Attach To boxes) is the controlling
object: if you move this controlling object, the pixel
or percentage offset is changed; click Reset to see
current values after moving an attached object.
If an attached parent object is resized, its child
objects will retain their pixel or percentage offsets
from the edges of their parent. The offsets will
change if a child object is moved.
Sibling icons (two small squares) are inactive if the
selected object has no siblings.
An ascending line from the top edge of a small
square to the top edge of its surrounding box
represents an absolute (pixel offset) attachment of
the top edge of the selected object to the top edge of
its parent.
A descending line from the top edge of a small
square to the bottom edge of its surrounding box
represents an absolute (pixel offset) attachment of
the top edge of the selected object to the bottom edge
of its parent. This value will be negative, since y
values are positive as they ascend and negative as
they descend.
Two vertically-aligned squares connected by a
vertical line represent an absolute (pixel offset)
attachment of the top edge of the selected object to
the bottom edge of its sibling. The offset will change
if the selected object is moved. This value will be
negative if the top edge of the selected object is
above the bottom edge of its sibling.
100
7
Two horizontally-aligned squares connected by a
horizontal line to the centers of their top edges
represent an absolute (pixel offset) attachment of the
vertical center of the selected object to the vertical
center of its sibling. The offset will change if the
selected object is moved. This value will be negative
if the center of the selected object is above the center
of its sibling.
A square with a two-headed arrow and a percentage
sign above it represents a percentage offset
attachment of the top edge of the selected object to
the top edge of its parent. The offset will change if
the selected object is moved.
A square with a percentage sign above it and a twoheaded arrow between the center line of the square
and the top of the surrounding box represents a
percentage offset attachment of the center of the
selected object to the top edge of its parent. The
offset will change if the selected object is moved.
A circle with a diagonal line through it represents no
attachment from the edge (top, left, bottom, or right)
to another object. By default a dropped object has no
right or bottom edge attachments.
Note Descriptions of the attachments to the bottom edge of the selected
object are correlatives of the descriptions of the top-edge attachments
above. Substitute "bottom" for "top" and "top" for "bottom" for bottom-edge
attachments. Normally you will want top- and left-edge attachments only.
A horizontal line from the left edge of the
surrounding box to the left edge of a small square
represents an absolute (pixel offset) attachment of
the left edge of the selected object to the left edge of
its parent. The offset will change if the selected
object is moved.
A horizontal line from the right edge of the
surrounding box to the left edge of a small square
represents an absolute (pixel offset) attachment of
the left edge of the selected object to the right edge
of its parent. The offset will change if the selected
101
7
object is moved. This value will be negative, since x
values are positive to the left and negative to the
right.
Two horizontally-aligned squares connected by a
horizontal line represent an absolute (pixel offset)
attachment of the left edge of the selected object to
the right edge of its sibling. The offset will change if
the selected object is moved. This value will be
negative if the left edge of the selected object is left
of the right edge of its sibling.
Two vertically-aligned squares connected by a
vertical line to the centers of their left edges
represent an absolute (pixel offset) attachment of the
horizontal center of the selected object to the
horizontal center of its sibling. The offset will change
if the selected object is moved. This icon is inactive if
the selected object has no siblings. This value will be
negative if the center of the selected object is left of
the center of its sibling.
A square with a two-headed arrow and a percentage
sign above it represents a percentage offset
attachment of the left edge of the selected object to
the left edge of its parent. The offset will change if
the selected object is moved.
A square with a percentage sign to its left and a twoheaded arrow between the center line of the square
and the left of the surrounding box represents a
percentage offset attachment of the center of the
selected object to the left edge of its parent. The
offset will change if the selected object is moved.
Note Descriptions of the attachments to the right edge of the selected
object are correlatives of the descriptions of the left-edge attachments
above. Substitute "right" for "left" and "left" for "right" for right-edge
attachments. Normally you will want top- and left-edge attachments only.
102
103
7
Attachment Example: Custom Dialog
Drag and drop an App Builder custom dialog object to see an example of
attachments. Each of the buttons at the bottom of the custom dialog are
attached to the top and sides of their enclosing dialog panel. They are
attached five pixels from the top of the panel and varying percentages from
the left edge of the panel (Button1 left edge 10%, right edge 30%; Button2
40% and 60%; Button3 70% and 90%).
The left edge of Button1 will always be 10% from the edge of the panel and
the right edge of Button1 will always be 30% from the edge of the panel.
Button1 will therefore always be as wide as 20% of the total width of the
panel. Button2's edges are 40% and 60% from the left edge of the panel;
Button3's edges are 70% and 90% from the left edge of the panel.
The three buttons will grow and shrink as the panel grows and shrinks,
and the distance between them will always be 10% of the total width of the
panel.
104
Many functions of your interface can be tested without generating code and
making the application. In both Test Shown Modules and Test Project
mode, all build windows except the App Builder primary window are closed,
and the App Builder primary window is inactive except for the Build button
and the Help menu.
If your project is small, you will probably want to test the entire project. If
it is large, you may want to test only selected modules, thus saving the
time it takes to load a large project. In Test Project mode the entire project
is available. Windows that are designated as not visible at startup (as are
custom dialogs by default, for instance) will not be visible.
See To Show a Hidden Module on page 20 for instructions if you are going
to use Test Shown Modules.
To Test a Project or Selected Modules
106
106
107
108
109
105
106
8
Help Connections on page 71 for instructions for creating help and
making connections to it. Dismiss the help window when you are
finished with it.
4. Click Build to return to build mode.
107
8
6. Click the More button in the quick-help window, if it is active.
The help volume will be displayed, at the location specified in the
Location ID for the selected object in the Help Editor. Dismiss the help
window when you are finished with it.
7. Click the Close button in the quick help window to dismiss it.
8. Click Build to return to build mode.
108
8
6. Click Build to return to build mode.
Show
Hide
Set Value
Set Text
Access Help Volume
Activate On Item Help
Enable
Disable
109
110
This chapter describes the Code Generator and its use to generate code,
add user code to generated code, make the application, and run the
compiled application. See Code Generator Window on page 134 for an
illustration of the Code Generator window and descriptions of its elements.
112
113
114
117
116
111
9
Making and Running an Application
Two scenarios are described below. In the first scenario, you build and run
an application in one step. In the second scenario, you generate code,
compile the code, and run the application in separate steps.
In either case, if you have made changes to the project that have not been
saved, a message dialog box will be displayed, telling you that you have
unsaved edits and giving you the choice of cancelling the generate code
process or saving the project. If you choose to save the project, you will
have to specify where to save the project if it has not been saved before.
112
113
9
3. Select one of the Generate Code For options (Entire Project, Main Only,
Specific Modules Only, Specific Modules and Main).
If you select Specific Modules or Specific Modules and Main, the list of
modules is active. Select the names of the modules you want to generate
code for in the list.
4. Click Don't Merge if you do not want your hand-edited code merged with
the generated code.
Note Do not select Dont Merge unless you are sure you want to destroy
the user code.
5. Choose a different message reporting option if you wish.
Choices are Report Normal Messages, Be Silent, and Be Verbose.
6. Type Make Arguments, if appropriate.
These arguments will be included when you click Make or Make & Run.
7. Type Run Time Arguments, if appropriate.
These arguments will be included when you click Run or Make & Run.
8. Click Reset to Defaults to set all fields to their default values.
Default values are Generate Code For Entire Project, Merge user code
with generated code, and Report Normal Messages.
9. Click OK or Apply to make the changes.
The Options dialog box will be dismissed if you click OK.
114
9
4. Click Get to display the current value for the variable in Variable Name.
The value of the variable will be displayed in the Value pane.
5. Make a change to Value and click Set to change the value of the variable.
This change is made for this App Builder session only.
6. Click Reset to reset Value to its value outside this session of App Builder.
7. Click Cancel to dismiss the dialog box.
115
116
-help (-h)
-main
-changed
* -merge
-nomerge
* -project (-p)
-noproject (-np)
+ -showall
* -noshowall
-silent (-s)
-verbose (-v)
9
Adding User Code to Generated Code
When you generate code for the interface you have developed by clicking
Generate Code in the Code Generator window or running dtcodegen from
the command line, a number of files are generated in the project folder. If
your project is called test and it has one module, called mod1, for
instance, the following files will be created:
The area between the START and END comments are considered a user
segment. Any text (even non-C code) may be added within a user segment,
and the code generator will preserve this code in all future versions of the
code. Each user segment begins with a comment that suggests what type of
code should be added in that segment, or what state the application is in
when that segment is executed. These suggestions are purely
informational, and may be ignored.
Neither App Builder nor the code generator verify that the code added by
you is legal C code. It is your responsibility to ensure that any file you
modify can be processed satisfactorily by your compiler.
117
9
If you wish to destroy all of the hand-edited code, you must either explicitly
select Don't Merge from the Options dialog of the Code Generator Window,
or run dtcodegen with the -nomerge option. This should be done only
with great caution, as large amounts of work may be lost.
Under no circumstances should the generated comments be modified. If
they are modified, code generation will fail, and the resulting file will very
likely be uncompilable. A backup file, with the extension .BAK, is preserved
in the current directory to help recover from such mistakes.
The user code segments appear in strategic places in the code, to allow you
a great deal of freedom in customizing the generated application. All code
related to main() and application-wide data and structures are defined in
<projectname>.h and <projectname>.c. In these files, fields may be added
to the Xt resource data structure for the application, new developer-defined
data types and variables may be added, and the applications startup
procedures may be amended.
Each <modulename>_stubs.c file contains user segments for modifying
the effects of generated connections. Your code may be added both before
and after the automatically-generated code is executed.
In addition, each file contains a user segment at the top of each file that
can be used to add a custom header or copyright notice.
118
This appendix describes the major windows and dialog boxes in App
Builder, including illustrations of the windows and dialog boxes and
descriptions of the window and dialog box elements.
App Builder Primary Window
120
Windows Palette
122
Panes Palette
125
Controls Palette
128
Project Organizer
131
Module Browser
132
134
119
A
App Builder Primary Window
Title bar
Mode bar
Controls palette
Windows palette
Panes palette
Object
information area
The App Builder primary window is the starting point for building a
graphical user interface. The interface is created by dragging objects from
the App Builder object palettes (Windows, Panes, and Controls) to the
workspace, editing the properties of the resultant interface objects, and
adjusting the layout of the interface. See Overview of the App Builder
Process in Chapter 1, Getting Started, for a summary of the steps
involved in creating an interface.
120
Title bar
Mode bar
A
Test Project is for testing help, menus, and
connections in the current project. Objects for
which the initial state is not set to Visible will
not be shown.
Windows palette
Panes palette
Controls palette
121
A
Windows Palette
The Windows palette contains three objects: main window, custom dialog,
and file selection dialog.
Main Window
122
A
Custom Dialog
A custom dialog is a window for displaying information or providing a popup for a specific task within an interface. It is created by dropping a custom
dialog icon on the workspace. A custom dialog might be "connected" to a
button or a menu in a main window, causing the pop-up dialog to be
displayed when the button is clicked or a menu item is chosen. A custom
dialog cannot be closed to an icon.
The status region includes the name of the module the dialog is part of and
indicates when the dialog object is selected. It does not appear in the
compiled application.
Examples of custom dialogs used in building App Builder include the File
Selection Dialog, the Project Name and Module Name dialog boxes, all of
the editors, and the message dialog boxes.
123
A
File Selection Dialog
124
A
Panes Palette
The Panes palette contains four objects: control pane, text pane, draw area
pane, and term pane. All panes can be dropped on a main window, a custom
dialog, or another pane. If a pane is dropped on a pane, the dropped pane
will become a child of the first pane or a layered pane will be created. See
To Create a Layered Pane in Chapter 5, Creating and Editing Panes,
Menus, and Messages, for more information.
Control Pane
A control pane is the drop site for App Builder controls. It is created by
dropping a control pane icon on a main window, a custom dialog, or another
pane. In the figure above, a control pane has been dropped on the top-left
corner of a main window, in anticipation of resizing it to fill the entire
canvas.
Examples of control panes used in building App Builder include the pane
on which the three panes palettes reside on the App Builder primary
window and the pane beneath the controls on each of the property editors.
125
A
Text Pane
126
A
Examples of the use of draw area panes in building App Builder include the
panes displaying modules and module objects in the Module Browser, and
the pane displaying modules in the Project Organizer.
Term Pane
A term pane is a terminal emulation object which accepts user input and
echoes standard output. It is created by dropping a term pane icon on a
main window, custom dialog, or another pane.
127
A
Controls Palette
The Controls palette contains 14 objects, including buttons, lists, text
fields, and a menu bar. To find out how to edit the properties of these
objects, see Chapter 4, Editing Properties of Interface Objects. To find out
how to create menus and submenus and attach them to objects, see
Creating and Editing Menus in Chapter 5, Creating and Editing Panes,
Menus, and Messages.
128
Button
Menu Button
Combo Box
Option Menu
Radio Box
A
selected (hence the term "radio button," named for
the type of buttons on an automobile radio). A radio
box is an exclusive-choice object.
Check Box
Gauge
Scale
Separator
Menu Bar
Text Field
Label
Scrolling List
Spin Box
129
A
Object Information Area
The object information area provides information about the object directly
beneath the cursoreither on one of the primary window palettes or in the
user interface. It includes the following information fields:
130
Object Type
Object Name
Position
Size
Cursor Position
A
comprised of more than one widget, have multiple
coordinate systems; a custom dialog, for instance,
includes a control pane, a tool bar, and buttons, each
with its own coordinate system.
Editing Module
Project Organizer
The Project Organizer is used to open, save, or close a project, and to save,
show, hide, import, export, or remove modules.
Location
Module Array
131
A
Module Browser
The Module Browser (also called the browser) provides a hierarchical, tree
view of a module. Use it to view modules, edit the interface, group or
ungroup objects, create connections, and display object property editors for
editing. About the only things you cant do in the Browser that you can do
in the interface is move or align objects.
To display the Browser, choose Module Browser from the View menu in the
App Builder primary window and select a module in the pull-right menu
displayed or select an object in the interface and Choose Browse from the
pop-up menu (displayed by pressing mouse button 3 in the interface).
132
A
Edit menu
View menu
Module name
Top-level view
133
A
Detailed tree view
Note When you group objects or edit the interface in the Browser, be sure
to check the interface to see that you havent obscured any objects. In
particular, if you group objects, the rectangular group created may hide an
object behind it.
134
Path
Output Pane
A
Generate Code
Make
Run
Abort
Term Pane
135
A
Code Generator Options Dialog Box
The Code Generator Options dialog box, accessible from the Options menu
in the Code Generator window, is used to set options that determine what
will happen when various Code Generator functions are performed.
136
Project
A
Don't Merge
Make Arguments
Reset to Defaults
Variable Name
137
138
Value
Get
Set
Reset
Cancel
140
141
143
144
139
B
The property editor for a separator, which includes the properties common
to almost all property editors, is shown below, with common elements
noted.
Tear-off button
Object list
Object name
140
Object Type
Objects
Object Name
B
Initial State, Visible
Color: Background
Color: Foreground
Geometry
Graphic Filename
141
142
Items
Label (Object/Item)
Label Type
Menu Title
Position (Label)
Position [XY]
B
Scrollbars
Size
Size Policy
Note List item editing: once you have the appropriate number of items
in the list, the easiest way to perform item editing in those property editors
that have an item list* is to select the first item in the list, thus selecting it
in the label text field. Type a new name for the item and click Return. The
new name will be displayed in the item list and the next item in the list
will be selected. Continue down the list with this select, type, Return
sequence until all items are completed.
*Property editors with item lists include the choice objects (Radio Box,
Check Box, Option Menu), Combo Box, List, Menu, Menubar, and Spin Box.
143
B
Add Item
Edit
Attachments
Help Text
Connections
OK
Apply
Reset
Cancel
Help
144
Label Alignment
Arrow Direction
145
B
Choice Type
Rows/Columns
146
Selected
Width
B
Control Pane Property Editor
There are no properties unique to a control pane. See Property Editor:
Universal Properties on page 140 for descriptions of Object Type, Objects,
Object Name, Initial State, and Color. See Property Editor: Common
Properties on page 141 for descriptions of Border Frame, Size Policy,
Geometry, Popup Menu, and Menu Title.
Window Parent
Dialog Areas
Default Button
Help Button
147
B
Draw Area Pane Property Editor
Only the one property unique to a draw area pane object is described here.
See Property Editor: Universal Properties on page 140 for descriptions of
Object Type, Objects, Object Name, Initial State, and Color. See Property
Editor: Common Properties on page 141 for descriptions of Scrollbars,
Border Frame, Geometry, Popup Menu, and Menu Title.
Total Canvas Size
Dialog Title
Initial Directory
148
B
OK Button Label
Popdown Behavior
Layout Type
Rows Columns
149
B
Vert Alignment
Specifies left-edge, colon/label, center-line, or rightedge alignment of the objects in the selected group.
Active only if Layout Type is Vertical or
Row/Column.
Spacing
Horiz Alignment
150
B
In Single Select mode, only one item can be selected,
by clicking mouse button 1.
In Browse Select mode, one item can be selected, but
you can press mouse button 1 and drag through the
list until the item you want is selected.
In Multiple Select mode, you can make multiple,
discontiguous selections with mouse button 1.
In Browse Multiple Select mode, you can drag the
cursor over items to make multiple, contiguous
selections, and you can make a multiple, contiguous
selection between a selected item and the cursor
location with Shift-mouse button 1.
Selected
Width
Height
Icon File
151
B
The icon mask acts like a stencil, allowing only the
pixels in the icon that correspond to pixels in the
mask to be visible.
152
Icon Label
Window Areas
B
Menu Property Editor
Used to create menus, the Menu Property Editor can be displayed by:
Choosing Menus from the Editors menu of the App Builder primary
window
Note Choosing Menus from the Editors menu in the App Builder primary
window is the same as clicking the Tear-off button in the Revolving
Property Editor when the Object Type is Menu.
Or, choosing Menu from the Revolving Property Editor Object Type
option menu
Or, choosing Create New Menu from the Popup Menu option menu in a
property editor.
A menu, unlike most of the objects edited in the Revolving Property Editor,
is a created object and is not available from an object palette.
Only properties unique to a menu object are described here. See Property
Editor: Universal Properties on page 140 for descriptions of Object Type,
Objects, Object Name, and Color. See Property Editor: Common
Properties on page 141 for descriptions of Items, Label, and Item State
(Active).
Add New Menu
Edit
Tearoff
153
B
active. A Separator menu item is used to create a
visual division in a menu, such as that seen in the
Editors menu of the App Builder primary window.
154
Item Mnemonic
Accelerator
Line Style
Item SubMenu
A menu button and a text field for attaching, deattaching, creating, or editing a submenu for the
selected item in the Items list. If a submenu is
attached to the selected item, the name of the
submenu will be displayed in the text field.
B
Menubar Property Editor
Only properties unique to a menu bar object are described here. See
Property Editor: Universal Properties on page 140 for descriptions of
Object Type, Objects, Object Name, Initial State, and Color. See Property
Editor: Common Properties on page 141 for descriptions of Items, Item
Label Type, Label, Pulldown Menu, and Item State (Active).
Item Mnemonic
Pane Geometry
Pane Height
155
B
Scale Property Editor
Only properties unique to a scale or gauge object are described here. See
Property Editor: Universal Properties on page 140 for descriptions of
Object Type, Objects, Object Name, Initial State, and Color. See Property
Editor: Common Properties on page 141 for descriptions of Label Type,
Position (Label), Label, and Geometry.
156
Scale Type
Orientation
Direction
Value Range
Decimal Points
Initial Value
Show Value
B
Separator Property Editor
Only properties unique to a separator object are described here. See
Property Editor: Universal Properties on page 140 for descriptions of
Object Type, Objects, Object Name, Initial State, and Color. See Property
Editor: Common Properties on page 141 for a description of Geometry.
Orientation
Line Style
Arrow Style
Value Range
Initial Value
157
B
Decimal Points
Selected
158
Operation
Maximum Chars
Initial Value
B
Text Pane Property Editor
Only properties unique to a text pane object are described here. See
Property Editor: Universal Properties on page 140 for descriptions of
Object Type, Objects, Object Name, Initial State, and Color. See Property
Editor: Common Properties on page 141 for descriptions of Border Frame,
Position [XY], Size, Popup Menu, and Menu Title.
Operation
Word Wrap
Initial Value
159
160
Index
A
accelerator for menu item, 48, 154
Add Item button, 144
adding
footer to window, 152
items to Items list, 144
menu bar to window, 152
menu to list of menus, 153
pane to paned window, 46
tool bar to window, 152
aligning objects, 30
alignment choices, 30
App Builder
exiting, 3
icon, 3
overview of process, 4
primary window, 2, 120
quitting, 3
starting, 3
application
building, 113
building and running in one
step, 112
generating code for, 113
quitting, 113
running, 113
setting behavior of, 90 to 91
Application Framework Editor, 90
B
background color, 36, 141
border
creating for single object, 97
setting frame style for groups, 95
types of, 141
Border Frame property, 141
browser, 132
editing objects, 28
building application, 113
button control, 128
properties of, 145
Button property editor, 145
161
C
Cancel button, 144
check box control, 129
child pane, 42
choice objects, 146
Choice property editor, 145
closing projects, 15
Code Generator, 112, 134
environment options, 137
options, 113
Code Generator Options dialog box, 136
color
background, 141
foreground, 141
Color Chooser, 36
combo box control, 128, 146
Combo Box property editor, 146
connecting
menu item and Call Function
action, 79
menu item and Execute Code
action, 80
menu item and predefined
action, 78
menu item to help topic, 75
message to function, 63
On Item help to Help menu item, 74
two objects, 76 to 78
connections
drag, 85
drop, 85
editing, 82
On Item help menu item, 74
selecting objects through draglinking, 76
selecting objects through the
Connections Editor, 76
testing, 109
Connections button, 144
Connections Editor, 77
control objects
selecting, 26
control pane, 125
162
D
default button sets for messages, 62
default buttons
for custom dialog, 147
for messages, 62
deleting objects, 29
deselecting objects, 27
displaying
fixed property editor, 35
help, 72
layered panes, 44
distributing objects evenly, 31
drag and drop, 2
rules, 7
setting behavior for, 85 to 86
Drag and Drop Editor, 85
drag connection, 85
drag operations, 85
drag-link connection, 76
drag-select, 27
draw area pane, 126
size of canvas in, 148
Draw Area Pane property editor, 148
drop connection, 85
drop operations, 85
drop rules
for controls, 7
for panes, 7
for windows, 7
dtappbuilder command, 3
E
Edit button, 144
editing
browser, 28
connections, 82
group properties, 95 to 96
interface, 28
Index
interface objects, 28
menu properties, 50 to 52
message properties, 62
object properties, 34
editor
See also property editor
Application Framework, 90
Attachments, 103
Connections, 77
Drag and Drop, 85
Help, 73
Message, 59 to 61
retaining on workspace, 143
encapsulated project file, 14
environment options, Code
Generator, 114, 137
exporting
module in UIL format, 19
modules, 18
F
file selection dialog, 124
properties of, 148 to 149
File Selection Dialog property
editor, 148
fixed property editor, displaying, 35
foreground color, 36, 141
G
gauge control, 129
properties of, 156
generating code for application, 113
Geometry property, 141
Graphic Filename property, 141
Group Property Editor, 95 to 96, 149
grouping and attaching objects, 93
groups
creating, 94
editing properties of, 95 to 96
naming, 95
properties for, 149 to 150
setting border frame style for, 95
163
undoing, 96
H
help
displaying, 72
specifying menu bar item as, 155
Help Editor, 73
Help menu, 75
connecting On Item help to, 74
Help Text button, 144
help volume, 75
hiding modules, 21
I
importing
module in UIL format, 16
modules, 16
Initial State property
active, 141
Iconic, 38
Visible, 38, 141
interface
creating, 2
overview of creating and
maintaining, 4
internationalization of application, 90
Item Label Type property, 47, 141
item mnemonic, 48, 154, 155
Item State property, 142
L
label control, 129
alignment of, 150
Label property, 142
Label property editor, 150
Label Type property, 142
labels
arrow direction for, 145
for buttons, ?? to 145
for OK button in file selection
dialog, 149
164
M
main window
creating, 24
definition of, 122
editing properties of, 37 to 39
Main Window property editor, 151
menu bar control, 129
properties of, 155
menu button control, 128
menu items
accelerator for, 48
attaching help topic to, 75
connecting to Call Function
action, 79
connecting to Execute Code
action, 80
connecting to predefined action, 78
mnemonics for, 48
Menu Property Editor, 47, 153
Menu Title property, 142
Menubar property editor, 155
menus
attaching to objects, 52
creating, 49 to 50
creating and attaching in one
procedure, 54
definition of, 47
editing properties of, 50 to 52
Item Label Type for, 47
and modules, 49
properties of, 153 to 154
property for attaching, 142
N
naming
application icon, 152
custom dialog, 147
groups, 95, 149
messages, 61
modules, 16
projects, 10
resource files, 10
Index
O
object information area, 130 to 131
object types, 6
objects
adding to selection, 27
aligning, 30
attaching, 103
button, 128
check box, 129
choice, 146
combo box, 128
creating border for, 97
cut or copy, 28
deleting, 29
deselecting, 27
distributing evenly, 31
draw area pane, 126
editing, 28
editing properties of, 34
gauge, 129
grouping and attaching in one
procedure, 93
label, 129
label setting for, 142
label type for, 142
menu bar, 129
menu button, 128
option menu, 128
paste, 29
position in relation to parent, 142
radio box, 128
rules for dropping, 7
scale, 129
scrolling list, 129
selecting, 26
separator, 129
setting fixed size, 143
setting size to fit contents, 143
spin box, 129
term pane, 127
text field, 129
text pane, 126
165
P
palette
Controls, 128 to 129
Panes, 125
Windows, 122
Paned Window property editor, 155
paned windows
adding pane to, 46
creating, 45
definition of, 44
properties of, 155
unmaking, 46
panes
adding to paned window, 46
attaching a scroll bar to, 143
drop rules, 7
setting absolute width and height
for, 143
pasting objects, 29
Position property, 142
primary main window
editing properties of, 37 to 39
setting for application, 90
Project Organizer, 131
projects
closing, 15
creating, 10
naming, 10
opening existing, 11
removing a module from, 21
renaming, 13
166
saving, 12
saving as encapsulated file, 14
saving in different folder, 12
testing, 106
property editor
Button, 145
Choice, 145
Combo Box, 146
Control Pane, 147
Custom Dialog, 147
Draw Area Pane, 148
File Selection Dialog, 148
Group, 95 to 96, 149
Label, 150
List, 150
Main Window, 151
Menu, 153
Menubar, 155
opening, 34
Paned Window, 155
Scale, 156
Separator, 157
Spin Box, 157
Term Pane, 158
Text Field, 158
Text Pane, 159
Q
quitting
App Builder, 3
application, 113
R
radio box control, 128
removing module from project, 21
renaming
modules, 18
projects, 13
Reset button, 144
resource file
attributes written to, 90
naming, 10
Revolving Property Editor
S
saving
module in UIL format, 19
modules, 17
project, 12
project to different folder, 12
project to encapsulated file, 14
scale control, 129
properties of, 156
Scale property editor, 156
Scrollbars setting, 143
scrolling list control, 129
selecting
colors, 36
message type, 61
multiple objects, 27
objects, 26
single object, 26
separator, 129
properties of, 157
Separator property editor, 157
session management method, 90
setting
background color, 36
border frame style for groups, 95
Code Generator options, 113
environment options, 114
foreground color, 36
internationalization, 90
primary main window for
application, 90
vendor name for application, 90
version number for application, 90
showing modules, 20
Index
size
of draw area canvas, 148
of lists, 151
of pane in paned window, 155
setting for combo box, 146
to fit contents, 143
of window, 152
Size Policy property, 38, 143
Size property, 143
spanning control pane
creating, 25
description of, 24
spin box control, 129
properties of, 157 to 158
Spin Box property editor, 157
starting App Builder, 3
submenus
attaching to menu items, 55
creating and attaching in one
procedure, 56
property for attaching, 142
T
Tear-off button, 143
Tearoff menu property, 47, 153
tear-off property editor, displaying, 35
term pane, 127
process string for, 158
Term Pane property editor, 158
testing
connections, 109
menus, 108
projects, 106
text field control, 129
properties of, 158
Text Field property editor, 158
text pane
definition of, 126
properties of, 159
Text Pane property editor, 159
title bar, 120
ToolTalk message handling, 91
167
types of objects, 6
U
UIL format
importing modules in, 16
saving module in, 19
ungrouping objects, 96
unmaking
layered panes, 43
paned windows, 46
user interface, See interface
User Resize Mode, 38
V
vendor name, setting for application, 90
version number, setting for
application, 90
viewing layered panes, 44
W
windows
adding footer, 152
adding menu bar, 152
adding tool bar, 152
creating main, 24
drop rules, 7
main, 37, 122
naming, 37, 151
parent for custom dialog, 147
primary, 37
setting absolute width and height
for, 143
setting size of, 143
spanning control pane, 24
Windows palette, 122
168