Arbortext Command Language - ACL DESIGN
Arbortext Command Language - ACL DESIGN
ACL Designer
Version 1.0
ArborText, Inc.
1000 Victors Way
Ann Arbor, Michigan USA 48108-2700
Telephone: +1 313.997.0200
FAX: +1 313.997.0201
Website: www.arbortext.com
Email: [email protected]
ii Contents
Copyright © 1997, 1998 by ArborText, Inc.. All rights reserved. No part of this work covered by the copyright herein
may be reproduced or used in any form or by any meansgraphic, electronic, or mechanical, including photocopying,
recording, taping, or information storage and retrieval systemswithout the written consent of ArborText, Inc.
Portions of this manual copyright 1994 Visix Software Inc. 11440 Commerce Park Drive, Reston, VA 22091. Used
with permission.
Unpublished rights reserved under the copyright laws of the United States.
Software Licensing
ArborText, Inc. holds right, title, and interest in the software described herein. The software, or any copies thereof,
may not be made available to, or distributed to, any person or installation without the written consent of ArborText, Inc.
Software Status
The software described by this publication is subject to change without notice.
Restricted Rights Legend
Use, duplication, or disclosure by the Government is subject to restrictions as set forth in the Rights in Technical Data
and Computer Software clause at DFARS 252.2277013, the Commercial Computer Software-Restricted Rights clause
at FAR 52.22719 or subparagraphs (c)(1) and (2) of the Commercial Computer Software-Restricted Rights at 48 CFR
52.22719 as applicable.
Trademarks
The ArborText ADEPT Series, ADEPT•Editor, ADEPT•Publisher, Document•Architect, ACL Designer, TurboParser,
are trademarks of ArborText, Inc..
Third-Party Trademarks
API Toolkit is a trademark of InterCAP Graphics Systems, Inc.
Carberry software is a registered trademark of Carberry Technologies, Inc.
DEC is a registered trademark of Digital Equipment Corporation.
Documentum and Documentum WorkSpace are trademarks of Documentum, Inc.
Elan License Manager and Softlock are trademarks of Elan Computer Group, Inc.
Galaxy Application Environment is a licensed trademark of Visix Software, Inc.
HP and Hewlett-Packard are trademarks of Hewlett-Packard Company.
IBM is a registered trademark of International Business Machines Corporation.
IslandDraw and IslandPaint are trademarks of Island Graphics Corporation.
OSF/Motif and Motif are trademarks of the Open Software Foundation, Inc.
Oracle is a registered trademark of Oracle Corporation
PostScript is a registered trademark of Adobe Systems Incorporated.
Proximity and Linguibase are registered trademarks of Proximity Technology, Inc.
SGI is a trademark of Silicon Graphics Incorporated.
SPARC is a registered trademark of SPARC International, Inc. Products bearing the SPARC trademarks are based on
an architecture developed by Sun Microsystems, Inc.
SPARCstation is a trademark of SPARC International Inc., licensed exclusively to Sun Microsystems, Inc.
Sun, SunOS, Solaris, NFS, and OpenWindows are trademarks of Sun Microsystems, Inc.
TeX is a trademark of the Mathematical Society.
UNIX is a registered trademark.
Windows, Windows for WorkGroups, and Windows NT and Windows95 are registered trademarks of Microsoft, Inc.
X Window System is a trademark of X Consortium, Inc.
All trademarks and registered trademarks are the property of their respective owners.
iii
iv Contents
NOTE: Some information in this manual is obsolete due to updates in recent versions of
Adept and Epic. Keep the following points in mind while using this manual:
• The term “ADEPT” is used throughout this manual. However, this manual’s
information applies to both the Adept and Epic series of products.
• The information in this manual can still be used to create toolbars, to create form
regions, and to modify existing forms by removing controls.
• Arbortext recommends that you do not use ACL Designer to create dialogs.
Instead, use a programming language such as Java or Visual Basic.
• In releases of Epic 4.0 and later, replace references to "adept.vr" with
"epic.vr".
This manual includes the following information regarding the ADEPT Series ACL Designer.
• Installation instructions
• Reference information
• Information on modifying the ADEPT interface
1
2 Chapter 1 Introduction
Look-and-Feel Considerations
The screen shots used in this manual are from a UNIX workstation running X Windows under
the Motif look-and-feel. Several of the screen shots in this manual refer to the Visual Resource
Builder. The Visual Resource Builder is a third party application on which ACL Designer is
based.
CHAPTER
2
Installing ACL Designer
Platforms
This guide includes instructions for installing ACL Designer on the following systems:
• Sun™ workstation running Solaris 2.5.1 or SunOS 4.1.3
• HP™ 9000 Series 700 and 800 workstations running HP-UX 9.0.3 or 10.2
• IBM® RS/6000 running AIX 4.1
• DEC® 3000 Alpha AXP running Digital UNIX 3.2
• Silicon Graphics workstations (SGI™) running IRIX 6.2
• An IBM-compatible PC running either Windows NT 4.0, Windows 95, Windows for
Workgroups 3.11, Windows 3.1, or OS/2 Warp 3.x or 4.x
This guide also includes information for installing ACL Designer/Global (for use with
ADEPT•Editor/Global and ADEPT•Publisher/Global) on the following systems:
• Sun™ workstation running Solaris 2.5.1
• HP™ 9000 Series 700 and 800 workstations running 10.2
• IBM® RS/6000 running AIX 4.1
• An IBM-compatible PC running either Windows NT 4.0, or Windows 95
3
4 Chapter 2 Installing ACL Designer
On IRIX, type:
tar xvf /CDROM/unix/standard/irix/acldes10.tar
To install ACL Designer on AIX, type:
tar xvf /cdrom/unix/standard/aix/acldes10.tar
To install ACL Designer/Global on AIX, type:
tar xvf /cdrom/unix/global/aix/acldes10.tar
On HP-UX v.9, type:
tar xvf ’/cdrom/UNIX/STANDARD/HPPA9/ACLDES10.TAR;1’
To install ACL Designer on HP-UX v.10, type:
tar xvf ’/cdrom/UNIX/STANDARD/HPPA10/ACLDES10.TAR;1’
To install ACL Designer/Global on HP-UX v.10, type:
tar xvf ’/cdrom/UNIX/GLOBAL/HPPA10/ACLDES10.TAR;1’
On Digital UNIX, type:
tar xvf ’/cdrom/UNIX/STANDARD/ALPHA/ACLDES10.TAR;1’
If the mount directory is remote:
Type the following to extract ACL Designer from a remote mount directory for
SunOS:
rsh remote-host -n dd if=/cdrom/unix/standard/sunos/
acldes10.tar | tar xvf -
Type the following to extract ACL Designer from a remote mount directory for Solaris:
rsh remote-host -n dd if=/cdrom/cdrom0/unix/standard/
solaris/acldes10.tar | tar xvf -
Type the following to extract ACL Designer/Global from a remote mount directory for
Solaris:
rsh remote-host -n dd if=/cdrom/cdrom0/unix/global/
solaris/acldes10.tar | tar xvf -
Type the following to extract ACL Designer from a remote mount directory for HP-
UX v.9:
rsh remote-host -n dd if=’/cdrom/UNIX/STANDARD/HPPA9/
ACLDES10.TAR;1’ | tar xvf -
Type the following to extract ACL Designer from a remote mount directory for HP-
UX v.10:
rsh remote-host -n dd if=’/cdrom/UNIX/STANDARD/HPPA10/
ACLDES10.TAR;1’ | tar xvf -
Type the following to extract ACL Designer/Global from a remote mount directory for
HP-UX v.10:
rsh remote-host -n dd if=’/cdrom/UNIX/GLOBAL/HPPA10/
ACLDES10.TAR;1’ | tar xvf -
Type the following to extract ACL Designer from a remote mount directory for AIX:
rsh remote-host -n dd if=/cdrom/unix/standard/aix/
acldes10.tar | tar xvf -
Type the following to extract ACL Designer/Global from a remote mount directory for
AIX:
rsh remote-host -n dd if=/cdrom/unix/global/aix/
acldes10.tar | tar xvf -
Preparing to Install ACL Designer on Windows 7
Type the following to extract ACL Designer from a remote mount directory for Digital
UNIX:
rsh remote-host -n dd if=’/cdrom/UNIX/STANDARD/ALPHA/
ACLDES10.TAR;1’ | tar xvf -
Type the following to extract ACL Designer from a remote mount directory for IRIX:
rsh remote-host -n dd if=/CDROM/unix/standard/irix/
acldes10.tar | tar xvf -
6. Unmount the CD-ROM.
With Solaris, use the eject command:
eject cdrom
Otherwise, type:
umount /cdrom
3. Open an Explorer window (File Manager for Windows 3.1/3.11 users) on the CD-
ROM and open the windows folder. This folder should contain several folders (e.g.,
Disk1, Disk2, Disk3, etc.).
4. Map the network drive (where you want to copy the installation files) to a local drive
letter (e.g., F:\).
5. Create a folder on the network drive to hold the installation files (e.g., F:\acldes).
6. Copy all the files in the CD-ROM’s windows directory to the desired folder on the
network server.
7. When the copy is complete, your users will be able to install ACL Designer by running
X:\netpath\Disk1\setup.exe, where X:\netpath is the drive and
directory where you copied the installation files.
3. Open a Windows Explorer window on the CD-ROM drive. Open the CD-ROM and
highlight the windows folder.
4. Choose the File->Sharing menu option; the Sharing tab of the Properties dialog
appears. Make the following adjustments in this dialog.
Click the Shared As: radio button.
Enter the desired Share Name (e.g., ACL Designer).
Enter the desired Comment (e.g., ACL Designer Installation Files).
Click the OK button.
5. Notify your users of the hostname for the computer with the distribution CD-ROM and
the Share Name you gave the windows directory on the CD-ROM. After your users
map a network drive to the shared location with the installation files, they can install
ACL Designer by running /Disk1/Setup.exe in the shared location.
2. Open an Explorer window (File Manager for Windows 3.1/3.11 users) on the CD-
ROM and open the windows folder. This folder should contain several folders (e.g.,
Disk1, Disk2, Disk3, etc.).
3. Open the Disk1 folder inside the CD-ROM’s windows folder.
3. Label a diskette ACL Designer Disk 1 and place the diskette in the floppy drive.
4. Select the entire contents of the Disk1 folder inside the CD-ROM’s windows folder,
and copy the files to the ACL Designer Disk 1 diskette.
5. Repeat the steps above for the remaining Disk# folders in the CD-ROM’s windows
folder.
6. If you will be installing ACL Designer on Windows 3.1/3.11 computers which are not
already running Win32s, repeat the steps above for the Win32s130\Disk1 and
Win32s130\Disk2 folders in the CD-ROM’s windows folder. Label these two
diskettes Win32s Disk 1 and Win32s Disk 2.
7. Notify your users that they can install ACL Designer by starting the Setup.exe
program located on the ACL Designer Disk 1 diskette. If the installation program tells
them to do so, they should install Win32s by starting the Setup.exe program located
on the Win32s Disk 1 diskette.
Installing ACL Designer on Windows 11
3. As the ACL Designer Setup program completes the install, follow the instructions in
the dialog boxes as they appear.
If you wish to retain your ACL Designer preference changes from session to session, remove
the leading semicolon from the Disable VR Copy=1 line in the acldes.ini file. This
will prevent ACL Designer from using a new copy of the default resource/configuration file
each time you start the program. To restore the default behavior, replace the semicolon.
NOTE: ACL functions and commands are described in the online help that ships with
ADEPT. There are a few new functions which do not appear in the online help; these
are described in Chapter 15, “ACL Designer ACL Functions” on page 155.
For example, you can use the dialog editor to create a dialog for an application. ACL Designer
provides a set of standard dialog items to place into your dialog, or you can create your own
dialog items as needed. Editors and choosers are available to create menus, import or create
images, import fonts, create custom cursors, and more.
ACL Designer itself, with its different editors and choosers, illustrates the variety and
sophistication of resources that can be created. For example, the File Chooser, shown in Figure
1, is used by ACL Designer to select resource files for editing. It is an example of a dialog, with
component resources, that you can create with ACL Designer.
15
16 Chapter 3 Overview of ACL Designer
Acme
Ad Copy File/Directory List
<
Appointments
Archive
Arrow Buttons
Bin
bin
> Budget
Client List
Open:
Budget/ Path Entry Text Item
Resources
A resource is the basic unit of storage provided by ACL Designer. Basic resources can be any
of the following fundamental types, which correspond to standard data types as shown in the
following table:
Boolean vbool
Character vchar
Integer int
Opaque vbyte[ ]
Untyped void *
NOTE: User interface resources, such as dialogs and buttons, are usually class-based
resources; they are derived by subclassing other resources. However some user
interface resources, such as images, are type-based. These resources are not derived
from other classes, but instead have their own type.
Resource Files
A resource file is a top-level dictionary stored on a disk. The name of a resource file usually
ends with the extension .vr. When you open a resource file for editing, a resource editor
appears depicting the contents of the dictionary. Resources added to the file appear in the editor.
(This editor is called a Dictionary Editor, and is discussed in Chapter 5, “Dictionaries” on page
39.)
18 Chapter 3 Overview of ACL Designer
An application typically stores its entire user interface (dialogs, associated controls, strings, and
error messages) in one or more resource files. The user interface is kept separate from the
ADEPT Command Language (ACL) code, making it straightforward to modify the interface,
translate text strings into another language, or move the application to another platform.
Resources of the same type can be grouped together in resource files, making it easier to locate
specific resources. For example, a resource file could have a “Dialogs” dictionary (or array) to
hold all of its dialogs, another for menus, and another for images.
cua
motif
windows
windows2d (2d specifies look-and-feel for monochrome monitors)
windows3d (3d specifies look-and-feel for color monitors)
† Normally you can open resource files and quit ACL Designer using the File Menu from any resource
editor. You can also close and save a resource file using the File Menu from any resource editor for a
resource in the file.
When altFileMenus is specified, there is only one place to open and save resource files and to
quit ACL Designer. Using altFileMenus, you can only open resource files and quit ACL
Designer from the File Menu in the Main Window. Also, you can only save resource files from the
File Menu in the Dictionary Editor for a resource file.
File View
Opening a resource file opens a Dictionary Editor that displays the contents of the file. If a
Dictionary Editor for a resource file is hidden, you can bring it to the front by double-clicking
on the file name or its icon in the Main Window.
closes.
• Double-click on the selected file. The Dictionary Panel for the selected file opens
and the File Chooser closes.
• Click Apply. The Dictionary Panel for the selected file opens and the File Chooser
remains open.
• Click Cancel to close the File Chooser without opening a resource file.
These confirmation buttons may vary, depending on your current look-and-feel.
NOTE: The File Chooser has a Filter Menu automatically enabled to display .vr resource
files and directories only. For detailed information on using the File Chooser, see
Chapter 13, “The File Chooser” on page 143.
Setting Preferences
The following sections discuss setting preferences for working with ACL Designer, such as
display preferences (including color, font, and window placement) and automatic file saving.
NOTE: By default, ACL Designer resets its preferences during startup. UNIX and OS/2
users can alter their startup script/command file. Windows users should refer to the
section “Editing the acldes.ini file on Windows” on page 11.
Custom Attributes
In the Application Preferences dialog you can open choosers to specify the foreground color,
background color, and the font for ACL Designer. The Preview Box lets you view any new color
or font settings before applying them. Additionally, you can enable an auto-save feature and
specify the interval between automatic saves. There is also an option to save the window
position of various dialogs used in ACL Designer.
NOTE: Preferences specified in the Application Preferences dialog apply only to ACL
Designer. They do not apply to an application using a resource file you created with
ACL Designer. Colors and fonts for an application’s resource file are specified in
resource editors. The next chapter, Chapter 4, “Resource Editor Overview” on page
33, discusses how to specify colors and fonts for an application’s resources.
To override this type of default window placement, select Save Window Positions from the
Application Preferences dialog. When this check box is enabled, ACL Designer saves the
position of all windows, including those formerly bound to other dialogs. The placement of
windows during future editing sessions will be at the saved positions.
The Save Window Positions preference is saved from one editing session to the next. If Save
Window Positions had previously been selected and you wish to disable it, unselect Save
Window Positions from the Application Preferences dialog.
Windows Overview
Resources are created and edited in various editing windows. These windows are resource
editors, panels, choosers, or other dialogs. The following section introduces the primary editing
windows with a brief description of their functions. These windows are covered in detail in later
chapters.
Main Window
The Main Window, shown in Figure 4, is the first window to appear when ACL Designer starts.
It is primarily used to open new or existing resource files, or to access information about ACL
Designer.
File View
New0.vr
Dictionary Editor
The Dictionary Editor lists the resources contained in a dictionary. Additional resources for
editing can be created in the Dictionary Panel, and added to the list. Basic resources, such as
boolean, character, and integer, are edited directly in the list; composite resources are edited by
double clicking on the resource’s type field to call up a resource editor for the composite
resource. (Resource editors are discussed in the next section.) Figure 5 shows a Dictionary
Editor displaying the contents of a typical resource file.
Resource Editors 25
PuzzleDialog Dialog
PuzzleImage Image
SolveDialog Dialog
vobjectInheritancDictionary 4 Components
Resource Editors
Resource editors are used to edit resources for your application and can have one or more views,
or panels. These panels are used to create or edit specific properties of a resource, and often
reflect the modifiable attributes inherited from a parent class.
When an editor contains more than one panel, you can toggle between the panels by using menu
commands from the editor, or by using predefined accelerator keys. The accelerator keys are
listed in any Panels menu of an editor.
Figure 6 shows the two panels for a Slider Bar Editor—the first panel is the Dialog Item Panel
and the second is the Slider Panel. In the Dialog Item Panel, you name the slider bar and define
its appearance in your application. In the Slider Panel, you define the behavior of the slider bar.
ABCDEF
Figure 6. Slider Bar Editor: Dialog Item Panel and Slider Panel
The following sections introduce several commonly used resource editors and panels. These are
discussed in detail in later chapters.
26 Chapter 3 Overview of ACL Designer
Dialog Panel
A dialog consists of several resources of varying types. These component resources are referred
to as dialog items, and are created in the Dialog Editor. The Dialog Editor has three panels: the
Dialog Panel, the Order Items Panel, and the Window Panel. The Dialog Panel is usually
accompanied by the Item Palette.
A dialog is built by dragging icons representing dialog items from the Item Palette to the Dialog
Panel or by selecting dialog items from the Dialog Menu. Items placed in the dialog can be
positioned, sized, and grouped in the Dialog Panel as needed. The dialog can be tested from
within the Dialog Panel at any time.
Figure 7 shows a dialog editor with a Dialog Panel containing two dialog items: a button item
and a radio group item. The Item Palette, discussed in the next section, is also shown. The dialog
being edited is represented by the inner rectangular area containing the dialog items. The Button
and Exclusive Group were placed in the Dialog Editor by dragging their icons from the Item
Palette.
Item Palette
Not really a resource editor, the Item Palette is a customizable tool used to add dialog items to
dialogs. The Item Palette, shown in Figure 7, contains icons representing the most common
dialog items, such as buttons, scrolling lists, and images. Icons representing additional dialog
items can be added or removed from the Item Palette.
When a Dialog Editor is opened for editing, an Item Palette automatically opens with it. Drag
the icons from the Item Palette to the Dialog Panel to add dialog items to a dialog.
Resource Editors 27
Button
Exclusive Group
Choice 1
Choice 2
Choice 3
ABCDEF
Menu Panel
Menus and any corresponding submenus are created in the Menu Panel of the Menu Editor.
Menus can be created for use with any dialog item, but are most commonly created for the Menu
Bar and Option Menu items. The Menu Panel has a command that lets you test menus as you
create them. Figure 9 shows a Menu Panel for editing a “File” menu. Three menu items, Open,
Close, and Save, have been added to the menu, and mnemonic and accelerator keys have been
defined.
File
Menu
Open
Title: File
Close
Save Tag: FileMenu
Mnemonic: F
Pinnable Disabled
Item
Title: Open
Tag:
Key:
Mnemonic: O
Disabled Default On
Image Editor
In ACL Designer, images can be associated with dialogs and dialog items. The Image Editor is
the tool used to create, import, export, and edit images. The Cursor Editor, a variation of the
Image Editor, is used to create custom cursors. Figure 10 shows an image placed in the Image
Editor for editing.
Connection Window
The Connection Window is usually used with the Dialog Panel; it controls the size and relative
placement of dialog items in a dialog. A dialog item’s springs and struts define its size and
placement in a dialog. By manipulating the springs and struts in a Connection Window, shown
in Figure 11, a dialog item’s position and resizing behavior is precisely defined. (Springs and
struts are discussed in detail in Chapter 6, “Dialogs” on page 51.)
Tag: Button
To: (Border)
To Edge: Left Length: 124
Natural Base
Fixed Base
Value: 124
Drag Lock
Stretch
Close
Choosers
Choosers in ACL Designer are used to make specific selections, such as selecting resource files,
fonts, or colors. They are used in conjunction with other editors in ACL Designer.
The Font Chooser, shown in Figure 12, is used to specify fonts for an application’s resources.
The File Chooser, shown in Figure 13, is used to open and save selected files. The Color
Chooser, shown in Figure 14, is used to specify background and foreground colors for dialogs,
dialog items, and other resources. It is also used to add colors to the Color Palette of an Image
Editor.
Choosers contain a series of confirmation buttons which may vary depending on your current
look-and-feel. The choosers in the following figures contain the OK, Apply, and Cancel buttons
consistent with the Motif look-and-feel.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
1234567890
OK Apply Cancel
hal/
Acme
Ad Copy
<
Appointments
Archive
Bin
bin
> Budget
Client List
Open:
Budget/
OK Apply Cancel
Views Options
Light: 79.61 %
Hue: 180.78 %
Saturation: 79.35 %
Saved Colors:
OK Apply Cancel
Default Attributes
A resource editor opens with default attributes set for the resource. As a convenience, ACL
Designer defines its default attributes so resources can easily be incorporated into your
application. It also sets the default values of the spring and strut positioning devices to define
the spring solution for dialog items. (A dialog’s spring solution is the combination of springs
and struts that specify the relative positions of dialog items in a dialog.)
For example, a menu bar created from the Item Palette automatically snaps to the top of a dialog
and has the File and Edit menus predefined. Creating dialog items with the Item Palette is
discussed in Chapter 6, “Dialogs” on page 51.
33
34 Chapter 4 Resource Editor Overview
Save Template
Revert Editor Ctrl+R
Open File...
The Open File... command lets you open a resource file from any editor. Selecting this command
opens the File Chooser. Select the resource file you want to open with the File Chooser. For
more information about using the File Chooser, see Chapter 13, “The File Chooser” on page
143.
Close Editor
The Close Editor command closes a resource editor and any windows associated with it. With
the exception of the Dictionary Editor, closing a resource editor does not discard changes made
in the editor. Changes made in an editor are still active during the editing session, and can be
saved to disk later with the Save command. The Dictionary Editor exception pertains to closing
a Dictionary Editor for a resource file. If the file is not saved, all changes are lost. (ACL
Designer always prompts you to save changes before closing a Dictionary Editor for a resource
file.)
Save File
The Save File command saves a newly created resource file, or saves any changes to a
previously saved resource file.
Using the File Menu 35
Save Template
The Save Template command saves the position and preferences of a resource editor. When
ACL Designer is opened in future editing sessions, the resource editor is positioned and
displayed according to the settings saved with this command.
NOTE: This command is currently enabled for the Dictionary Editor and Image Editor.
Future releases will enable this command for additional resource editors.
Revert Editor
The Revert Editor command discards any unsaved changes made to a resource editor, and
returns you to a previous version. If you saved any changes to the editor while it was open, you
are returned to the last saved version. If you haven’t saved any changes, you are returned to the
contents of the editor when it was last opened.
Quit
The Quit command is used to exit ACL Designer and close all windows. If changes have been
made, but not saved, a confirmation dialog is displayed.
36 Chapter 4 Resource Editor Overview
Yes No Cancel
NOTE: Normally you can use the File Menu from any resource editor to open resource files
and quit ACL Designer. You can also close and save a resource file using the File
Menu from any resource editor for a resource in the file.
If you want to have only one place to open and save resource files and to quit ACL
Designer, specify altFileMenus when starting ACL Designer. When
altFileMenus is specified, you can only open resource files and quit ACL
Designer from the File Menu in the Main Window. Also, you can only save resource
files from the File Menu in the Dictionary Editor for a resource file. For details on
specifying altFileMenus (and other options) see “Starting and Quitting ACL
Designer” on page 18.
Undo Ctrl+Z
Redo Ctrl+Y
Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
Clear Ctrl+B
Duplicate Ctrl+D
Undo
The Undo command reverses the most recent editing action. Use it repeatedly to undo a series
of actions. The Undo command identifies the most recent action that can be undone. For
example, after dragging an item in a Dialog Editor, the command reads “Undo Drag.”
Redo
The Redo command restores the most recent editing action reversed by the Undo command. Use
it repeatedly to redo a series of actions.
Cut
The Cut command removes one or more selected items from the resource editor and places it on
the Editing Clipboard.
Copy
The copy command makes a copy of one or more selected items in the resource editor and places
it on the Editing Clipboard. Items copied are not removed from the resource editor.
Paste
The Paste command places the contents of the Editing Clipboard into the active resource editor.
A copy of the contents remain on the Editing Clipboard.
Clear
The Clear command removes one or more selected items from the resource editor. The items are
not placed on the Editing Clipboard.
Duplicate
The Duplicate command makes a copy of one or more selected items in the resource editor, and
places it in the editor. The items are not placed on the Editing Clipboard.
38 Chapter 4 Resource Editor Overview
Window
Order Items
Dialog
PuzzleDialog Dialog
PuzzleImage Image
SolveDialog Dialog
vobjectInheritancDictionary 13 Components
39
40 Chapter 5 Dictionaries
Figure 20 shows the same resource file with the inheritance dictionary displayed in expanded
view. (Inheritance dictionaries are explained later in this chapter.)
PuzzleDialog Dialog
PuzzleImage Image
SolveDialog Dialog
vobjectInheritancDictionary 13 Components
vcontainerGrouTag vcontainer
Creating Resources
Basic resources, such as strings or integers, can be created directly in dictionaries, but often are
created and stored in arrays. Composite resources, such as dialogs or images, must be created
and stored in dictionaries or dictionary arrays. (A dictionary array is a special case of array and
is covered in the next section.)
To create a resource:
1. Select Resource from the menu bar in the Dictionary Editor.
The Resource Menu appears.
2. Select New from the Resource Menu.
The New Menu appears. Figure 21 shows the New Menu.
3. Select a resource from the New Menu.
The resource you select is added to the resource list in the Dictionary Editor.
Creating Resources 41
Boolean
Character
Command Space
Confirm
Container
Cursor
Dialog
Dictionary
Fixed
Float
Image
Integer
Keystroke Item
Menu
Notice
Opaque
Palette
String
Tag
Window
Boolean
Character
Dictionary
Fixed
Float
Integer
Opaque
String
Tag
Dictionary Arrays
A dictionary array is a structure whose elements can only be dictionaries. Since class-based
composite resources are a type of dictionary, a dictionary array can contain various composite
resources as elements. For example, a dictionary array can contain a dialog as one element, a
button as another, and a dictionary as a third. As with any array, an element of a dictionary array
is referenced by its offset.
Viewing Dictionaries
User interface resources in ADEPT are composite resources. The component resources of a
composite resource can be viewed by selecting Expand from the View Menu. An expanded
view can be collapsed by selecting Collapse from the View Menu. Figure 23 shows the View
Menu.
Expand Ctrl+Shift+E
Collapse Ctrl+Shift+C
Select Parent
Select Next Entry
Select Previous Entry
Resource Type
Resource Contents
The components of a composite resource can be edited directly from the expanded view in the
Dictionary Editor. However, it is best to use the expanded view for viewing resources only. To
edit a component resource, you should open the resource editor for the parent at the highest level
in a dictionary or array. For more information on editing resources, see Editing Resources on
page 44.
Figure 24 shows an expanded view of a dialog resource. Composite resources in this expanded
view can also be expanded to view their contents.
PuzzleDialog Dialog
Flags Integer 8
Directional Arrow ItemList Dictionary 2 Components
Style Integer 63
vdialogFlags Integer 0
PuzzleImage Image
SolveDialog Dialog
The following commands are available from the View Menu to select component resources of
a composite resource in expanded view.
Select Parent
The Select Parent command automatically selects the parent resource of the currently selected
resource in expanded view.
NOTE: You can use the up and down arrow keys from the keyboard to change the selection
in any view of a Dictionary Editor.
Editing Resources
Resources are edited directly in the Dictionary Editor or in resource editors provided by ACL
Designer for that resource. Basic resources, such as integers and strings, can only be edited in
the Dictionary Editor. Composite resources, such as dialogs and images, are usually edited from
resource editors.
The tag name of a resource is the name an application uses to load the resource from a resource
file. Edit the tag name of a resource in the Dictionary Editor. The contents field of basic
resources is also edited in the resource file list. Arrays and dictionaries must be in expanded
view to edit their contents. The contents of composite resources are usually edited by opening a
resource editor from the Dictionary Editor. (Using resource editors is covered in later chapters.)
CAUTION: Composite resources can be expanded in a Dictionary Editor and any
component resource that is a basic resource can be edited. However, without a
technical understanding of ADEPT, it would be difficult to edit composite
resources from the Dictionary Editor. Instead, use the resource editors provided
for composite resources. Resource editors provide visual interactive editing of
resources—the effect of editing changes are viewed as you make them.
Editing Resources 45
To open a resource editor for a composite resource using the resource list:
1. Double-click on the type or contents field of a composite resource (or on its icon) in
the resource list.
A resource editor for the composite resource opens.
46 Chapter 5 Dictionaries
Finding Resources
Use the Find Dialog, shown in Figure 25, to locate the position of resources in a dictionary.
Cursor
Dialog
Dialog Item
Save
Matches:
/ PuzzleDialog
/SolveDialog
Cancel Find
The Find Dialog can locate a resource when you specify its type or tag name. Specify the type
and tag names individually or together.
To find a resource:
1. Select Resource/Find Resource... from the menu bar in the Dictionary Editor.
The Find Dialog opens.
2. Select:
Find By Resource Type
The scrolling list of resources is enabled.
Find By Tag Name
The Tag Name text field is enabled.
Find By Resource Type and Find By Tag Name
Both fields are enabled.
3. Select a resource type from the Resource Type list and/or enter a tag name in the Tag
Name text field.
4. Click Find.
Any resources that match your specifications are displayed in the list of matched
resources.
Copying and Moving Resources 47
Boolean
Box Item
Button
Character
Check Box
Color Palette
Color Specification
Combo
Subclass
The Add Resource Types... dialog lists all the resources available to add to your application
from ACL Designer. A check next to a resource indicates that the resource is listed in the New
Menu. If a resource in the Add Resource Types... dialog is selected (with a mouse click), its class
name and display name appear in the text fields below the resource list. The class name is the
class of the selected resource.The display name is the name used by ACL Designer when
referencing the resource.
48 Chapter 5 Dictionaries
The display name is not used by your application. Edit this field to create your own display
name for a resource. The display name you select is saved by ACL Designer and appears in
future editing sessions.
You can also use the Class Name text field to search for a resource by its class name. For
example, if you want to find the resource for the class vtextitem, type vtextitem in the
Class Name text field and press Enter. The scrolling list then displays the text item resource.
To add a resource to the New Menu, select the field to the left of the resource in the Add
Resource Types... dialog. A check appears, indicating the resource has been added to the New
Menu. To verify that it has been added, select New from the Resource Menu. Selecting the
check removes the resource from the New Menu. You can also add (or remove) resources to the
New Menu with the Add to New Menu option in the Resource Menu.
NOTE: A resource can be added to a dictionary or a Dialog Panel directly from the Add
Resource Types... dialog without adding it to the New Menu. Select a resource from
the resource list and drag it from the chooser to the dictionary or the Dialog Panel.
See Chapter 6, “Dialogs” on page 51 for details on the Dialog Panel.
Note: The Add Resources Types... option is not useful for ADEPT Command Language
(ACL) developers.
Generating Files
ACL Designer can generate .c and .h files to help incorporate your resource file into your
application source code. Once created, these files should never be edited, since any new source
code generated by ACL Designer will overwrite any editing changes.
Note: The files created by the Generate Files... option are not used by ADEPT.
CAUTION: There is normally no need to edit the inheritance dictionary. If the contents of
this dictionary changes, your application may not be able to find the resources
it needs from your resource file.
50 Chapter 5 Dictionaries
CHAPTER
6
Dialogs
The Dialog Editor, together with the Item Palette and other tools, is used to create dialogs for
your application. Figure 27 shows the Dialog Panel of a Dialog Editor. Figure 28 shows the Item
Palette.
Container
Label Item
Bounds of Dialog
Being Edited
Button
51
52 Chapter 6 Dialogs
The Dialog Panel contains a rectangular area representing the dialog currently being edited. In
Figure 27, a container item and a button item have been placed in the dialog. The container
contains a label item and a check box. (A container is a dialog item used to hold other dialog
items. Dialog items placed inside a container function as a unit.)
The Item Palette contains icons representing dialog items. A dialog item is placed in a dialog by
dragging the item’s icon from the Item Palette to the Dialog Editor. (Dialog items can also be
placed in a dialog with menu commands.)
A dialog item’s position in a dialog is specified by a series of positioning devices called springs
and struts. A dialog’s spring solution is the combination of springs and struts that specify the
relative positions of dialog items in a dialog. The spring solution for a dialog can be defined
directly in the Dialog Panel, from the Dialog Panel’s Arrange and Connection menus, or with
the Connection Window. (The Connection Window is an editing tool opened from the Dialog
Panel.)
Using the Try Dialog command from the Dialog Menu, you can interactively test dialogs as you
create them. The Try Dialogs command opens a copy of the dialog being edited. Use this copy
to “try out” the current version of the dialog.
• Order Items
• Dialog
Use the Window Panel to define the appearance of a dialog and set attributes defining its
behavior. The Order Items Panel lists the dialog items contained in a dialog, and provides
options to define their behavior within the dialog. Use the Dialog Panel to place dialog items
into a dialog and open resource editors for them. The Try Dialog menu option in the Dialog
Panel allows you to test (“try out”) a dialog.
When a Dialog Editor opens, the Dialog Panel is displayed. Use the Panels Menu to change
panels in the Dialog Editor. (For information on changing panels in a resource editor, see
Chapter 4, “Resource Editor Overview” on page 33.)
Custom
Attributes
Border Maximizable Iconifiable Movable
ABCDEF
The tag name of a dialog is the name your application uses to access the dialog after the resource
file is loaded into memory. Tag names must be unique throughout your application, and are used
by ADEPT Command Language (ACL) functions to reference specific dialogs/dialog items.
The title is the name displayed in the title bar of a dialog. (The title bar includes the text field in
the top border of a window.)
54 Chapter 6 Dialogs
Screen Bounds
H = 150
Offset (in pixels) - X
50 Dialog
W = 200
(50,100)
100
(0,0)
Origin
Offset (in pixels) - Y
Attribute If enabled
Border The dialog is outlined with a border.
Movable The dialog can be moved on the display by dragging the dialog with a mouse.
Resizable The dialog can be resized by the user.
Modal The dialog is the only active window in the application. A user must respond or perform some
action in the dialog to change the focus.
Pinnable The dialog can be pinned to the display, depending on the look-and-feel.
Iconifiable The dialog can be minimized to an icon on a display.
The Item Palette 55
Attribute If enabled
Maximizable The dialog can be enlarged to the size of the display.
A series of choosers and editors are available by enabling the check boxes in the Custom group
of the Window Panel. Selecting a check box for Foreground or Background activates a button
to open the Color Chooser. Use the Color Chooser to define the colors of your dialog. The check
box for Font activates a button to open the Font Chooser. Use the Font Chooser to specify the
font used in your dialog. Selecting the check boxes for Cursor and Icon activates buttons to open
the Image Editor. Use the Image Editor to specify a cursor or icon for your dialog.
Creating a Dialog
Dialogs are created in the Dialog Panel of the Dialog Editor. You can place a dialog item in a
dialog by selecting an item from the Dialog/New Item Menu, dragging an icon from the Item
Palette to the dialog, or by dragging an item from the Add Resources Type... dialog opened from
a Dictionary Editor. Dialog items placed in a dialog can be selected for positioning and further
editing. Resource editors can be opened to edit dialog items placed in a dialog.
56 Chapter 6 Dialogs
Box Item
Button
Check Box
Combo
Container
Control
Dialog Item
Domain Item
Domain View
Exclusive Group
Grouped Container
Icon View
Keystroke Item
Label Item
Line Item
List Item
List View
Menu Bar
Option Menu
Palette
Popdown Combo
Ruler
Scroll Bar
Slider
Spinner
Text Item
Text Ruler
Text Spinner
Text View
Figure 31. New Item Menu (actual ACL Designer menu contains additional selections)
To place a dialog item in a dialog using the Add Resource Types... dialog:
1. Drag a dialog item from the resource list in the Add Resource Types... dialog (opened
from a Dictionary Editor).
The dialog item is added to the dialog and is selected for further editing. For more
information on the Add Resource Types... dialog, see “Adding Resources to the New
Menu” on page 47.
Creating a Dialog 57
Undo Ctrl+Z
Redo Ctrl+Y
Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
Clear Ctrl+B
Duplicate Ctrl+D
Place In Container
Place in Grouped Container
Place in Exclusive Container
Remove From Container
Set Foreground...
Set Background...
Set Font...
Reset to Defaults
These commands are covered in detail in Chapter 4, “Resource Editor Overview” on page 33.
Additional features of the Dialog Panel’s Edit Menu are described in the following sections.
Select All
At times you may want to select all of the items in a dialog. For example, you may want to copy
all of the items in one dialog to another dialog, or clear all of the items from the Dialog Panel.
Using the Dialog Panel’s Edit Menu 59
NOTE: Dragging and dropping of fonts and colors is supported from the Font and Color
Choosers. For more information on using these choosers, see Chapter 11, “The Font
Chooser” on page 129, and Chapter 12, “The Color Chooser” on page 131.
60 Chapter 6 Dialogs
Bring to Front
Bring Forward
Send Backward
Send to Back
Align Left
Align Horizontal Centers
Align Right
Align Top
Align Vertical Centers
Align Bottom
Distribute Horizontally
Distribute Vertically
Dialog items have a relative “front to back” position in a dialog. When a new item is placed in
a dialog it is placed in front of, relatively speaking, other dialog items previously placed in the
dialog. This is apparent if you try to drag a newly created dialog item behind another item
already in the dialog. The front to back relationship reflects the order of the items in the Order
Items Panel. To change the relative position of dialog items in a dialog, use the following
commands from the Arrange Menu.
Table 4 lists the commands in the Arrange Menu for aligning items:
Command Result
Align Left Left sides of all items line up with the left side of the leftmost item.
Align Horizontal Centers Horizontal centers of all items line up on the same vertical line; item positions change
horizontally.
62 Chapter 6 Dialogs
Command Result
Align Right Right sides of items line up with the right side of the rightmost item.
Align Top Top sides of all items line up with the top side of the topmost item.
Align Vertical Centers Vertical centers of all items line up on the same horizontal line; item positions change
vertically.
Align Bottom Bottom sides of items line up with the bottom side of the bottom-most item.
Distribute Horizontally Items are distributed evenly between the right and left items; item positions do not
change vertically.
Distribute Vertically Items are distributed evenly between the top and bottom items; item positions do not
change horizontally.
For example, to line up the left sides of four dialog items, select the four items and then select
Align Left from the Arrange Menu. To make the vertical spacing for the items even between
the top item and the bottom item, select Distribute Vertically.
To edit the default springs and struts of the item associated with an icon:
1. Select an icon in the Item Palette.
2. Select Edit in the Item Palette Menu.
3. Select Edit Connections.
A chooser opens specifying the default springs and struts for the item. Use this chooser,
shown in Figure 35, to change the default settings. For more on connections see
“Working with Connections” on page 65.
OK Cancel
Outside Strut
Inside Strut
Spring
Selected Spring
Dialog items have inside and outside connections. Inside connections are contained within a
dialog item, connecting opposite sides of the item. The inside connections of a dialog item
determine the size of an item. Outside connections link a dialog item to the border of the dialog
window or to another dialog item. The outside connections determine the relative positions of
dialog items in a dialog, including the positions of the items if the dialog is resized.
66 Chapter 6 Dialogs
Springs and struts function much as their names imply. A spring stretches to fill the available
space; a strut has a specific length. For example, consider the spring solution in Figure 36. The
outside connection on the left of the dialog item is a strut; the outside connection on the right is
a spring. With the spring solution shown, the dialog item is always positioned a specific distance
from the left border of the dialog, even if the dialog is resized. However, if both the left and right
outside connections were springs, as in Figure 37, the dialog item would always be centered
between the left and right borders of the dialog. Now if the dialog is resized, the dialog item
would remain centered, left and right, in the dialog.
A combination spring/strut connection sets the minimum length of a spring. This is useful
when you want an item to be a minimum distance from another item or from the border of the
dialog.
The inside connections of a dialog item can be used to make an item natural-sized. A natural-
sized item adjusts it size according to its contents. For example, the inside connections of a
button dialog item can be defined as natural-sized struts. The size of the button is then
determined by the size of its contents (the title displayed on the button).
A chain is a series of connections between dialog items. A chain is in one direction, horizontal
or vertical, and must always have at least one spring connection. If a chain does not have at least
one spring connection, the spring solution cannot stretch to fit a resized dialog.
Connections have a direction determined by the connection’s source and destination. The
source for outside connections is always a dialog item; the destination is another dialog item or
the border of a dialog. The source for inside connections is one edge of a dialog item; the
destination is the opposite edge of the item. The direction of a connection helps determine the
behavior of the connection.
Working with Connections 67
When an item is initially placed in a dialog, with few exceptions, the outside connections on the
top and left sides of the item are struts. The outside connections on the bottom and right sides
of the item are springs. The inside connections are often natural-sized struts, but may vary,
depending on the dialog item.
Box Item
Button
Figure 39 shows the same Dialog Panel after connecting an outside strut of the button to the box
item.
Box Item
Button
Tag: Button
To: (Border)
To Edge: Left Length: 124
Natural Base
Fixed Base
Value: 124
Drag Lock
Stretch
Close
Field Description
Tag Displays the tag name of the selected item.
To Displays the name of the destination for the selected connection. If the destination is another
dialog item, the tag name of the item is displayed. If the destination is the border of the dialog,
“(Border)” is displayed.
To Edge Indicates the location of the connection on the destination item. The location is expressed as the
top, bottom, left, or right edge of the destination item.
Connection Display Graphically displays the inside and outside connections of a selected dialog item. If more than
Area one dialog item is selected, the connections displayed represent all the connections in the same
relative position on the selected items.
Length Displays the length of a connection.
Natural Base Changes a strut to its natural size.
Changes a combination spring/strut connection to a spring connection.
This field is always enabled for spring connections, which are natural-sized.
The size of a natural-sized connection is indicated in the Length field.
Fixed Base Resizes a strut to the size indicated in the Value field.
Converts a spring to a combination spring/strut connection. The size of the strut portion of the
combination is indicated in the Value field.
Value Sets the length of a strut or the length of the strut section of a combination spring/strut
connection.
Drag Lock Locks the length of a strut to the length specified in the Value field. When the length of a dialog
item’s strut is locked, it cannot be dragged while editing.
Stretch Converts a strut to combination spring/strut connection.
A spring, by definition, is a stretch connection. Unselecting Stretch for a spring converts the
spring to a strut.
Close Closes the Connection Window.
spring.
If the Value is not set to 0, the strut changes to a combination spring/strut
connection and the strut part of the connection has a length equal to Value (see
“To set a combination spring/strut connection:” on page 72).
To change a spring to a strut or a strut to a spring:
Double-click on the connection you want to change in the Connection Window or
in the Dialog Panel.
NOTE: If you define a chain that does not contain a spring connection, you will get
an “error strut.” A chain must always contain at least one spring connection
so it can stretch to fit a resized dialog. Error struts are outlined; on color
monitors they are also displayed in red.
You can set the length of a strut by dragging an item to the desired position in the Dialog Panel
or by setting the size of the strut in the Connection Window. When you set the size of a strut in
a chain, the spring in the chain stretches to fill the remaining space.
Chaining Items
Chaining refers to forming connections between two or more dialog items. The Chain option of
the Connection Menu provides a convenient way to chain items in a Dialog Panel.
You can chain items in the following ways:
• Bottoms to tops
• Left sides
• Right sides
• Left sides and right sides
• Left sides to right sides
• Top sides
• Bottom sides
• Bottom sides and top sides.
To chain items:
1. Select the items you want to chain in the Dialog Panel.
You must select two or more items for the Chain command to be enabled.
2. Select Chain from the Connection Menu.
The Chain submenu appears. Icons are displayed next to each option in the submenu
to illustrate the type of chains you can form.
3. Select an option from the Chain Submenu.
The selected items are chained according to your selection.
To unchain items:
1. Select the items you want to unchain in the Dialog Panel.
2. Select Reset from the Connection Menu.
The selected items are unchained and their connections are reset to the default
connections.
Following a Connection
You can change the selection from the currently selected dialog item to an item connected to it
with the Follow option in the Connection Menu.
75
76 Chapter 7 Dialog Items
For additional information on the Item Palette and dialogs, see page 51. For information on
subclassing resources, see “Creating Subclassed Resources,”on page 48.
The resource editor for each dialog item contains a Dialog Item Panel, shown in Figure 42. The
resource editors for many dialog items contain additional panels.
ABCDEF
Figure 42. Dialog Item Panel for the slider dialog item
Use the Dialog Item Panel to define the tag and title names of an item, and to specify its size
and placement within a dialog. The tag name is the name an application uses to access the
dialog item after the resource file is loaded into memory. The title name is displayed with the
dialog item in an application. (Not all dialog items display the title name, even if the name is
specified in the Dialog Item Panel.)
The position of a dialog item is determined by its X and Y coordinates; its size by its W and H
coordinates. The X and Y coordinates specify the offset (in pixels) from the lower left corner of
a dialog to the lower left corner of a dialog item. The W and H coordinates set the width and
height (in pixels) of the dialog item. Refer to Figure 43 for a diagram of these coordinates.
78 Chapter 7 Dialog Items
Dialog Bounds
H = 75
Offset (in pixels) - X
25 Dialog Item
W = 125
(25, 50)
50
(0,0)
Origin
Offset (in pixels) - Y
Attribute If selected
Enabled Makes the dialog item available for use in the dialog. Items that are not enabled appear dimmed.
Visible Displays the dialog item in the dialog. Items that are not visible are still associated with the dialog,
but are not displayed.
Border Outlines the dialog item with a border.
Click Focusable Activates the dialog item when a user clicks it with a mouse.
Focusable Enables the item for “tabbing.” A user can “tab through” the focusable items in a dialog.
Image Mask Uses the dialog item’s image attribute as a 1-bit mask to draw the item. The “on” bits of the mask are
drawn and the remainder of the bits are not drawn.
Use the Mnemonic field to specify a mnemonic key for a dialog item. A mnemonic key allows
the user to enable a dialog item by pressing a specified key in combination with the mnemonic
key modifier from the keyboard. (The mnemonic key modifier is platform dependent but is
Dialog Item Attributes 79
usually the Alt key. ) Only one alphanumeric character can be specified as the mnemonic key.
If the specified key is in the title of the Dialog Item, the corresponding letter is underlined on
the display.
CAUTION: Although the same mnemonic key can be defined for more than one dialog item
in a dialog, only one of the items will ever be enabled with the mnemonic key
selection. It is up to the application developer to provide unique mnemonic key
definitions to items in a dialog.
The user does not specify the case of a mnemonic key when making a selection
from the keyboard. This means the upper case and lower case version of a
character are not unique mnemonic key specifications.
You can further define attributes for a dialog item in the Dialog Item Panel by opening the
choosers and editors associated with a series of check boxes. Table 7 lists the choosers and
editors available in the Dialog Item Panel. Selecting one of these check boxes enables the button
associated with it. Click the button to open the chooser or editor associated with the button.
NOTE: Menu selection here means creating a dialog item using the New Menu of the
Dictionary Editor, the New Item Menu of the Dialog Panel, or dragging an item from
the Add Resource Types dialog or the Dictionary Editor. For details on creating
Dialog Items, see Chapter 5, “Dictionaries” on page 39, and Chapter 6, “Dialogs” on
page 51.
File Edit
ABCDEF
File Edit
Title: Button W: 80 H: 25
ABCDEF
Figure 46. Exclusive Group Panel for the exclusive group item
The Exclusive Group Panel contains a list of the items in the exclusive group. Use the Container
Menu in this panel to add to and edit items in the group. Use the Edit Menu to remove or
rearrange items in the group.
When an exclusive group is created from the Item Palette, the group contains three toggle items
with a predefined spring solution. You can override the default spring solution and perform
additional editing on items in the group by adding a Container Panel to the Exclusive Group
Editor. For more on the Container Panel, see “The Container and Adept Toolbar Items” on page
95.
The Adept check box is a toggle with values for on and off. The Adept scroll bar and Adept
slider items specify a range in a text field or a view from a list of items. The Adept option menu
is a pop-up menu that allows a user to specify one action from a series of options.
The resource editor for each control item contains the Control Panel shown in Figure 47.
Min: 0 Page: 1
Max: 1 Increment: 1
Value: 0
Feature Description
Min Defines the minimum value for the control item.
Max Defines the maximum value for the control item.
Value Defines the default placement within the control values.
Vertical Defines the orientation of a control item. The default is horizontal. (This option is not enabled for the
Option Menu and Check Box items.)
Exclusive Specifies that an item is drawn to represent an exclusive item, as represented in an exclusive group.
This option only applies to check box (toggle) control items.
Increment Sets the amount that a control value can be incremented.
Page Sets the amount that a scroll bar or slider pages.
Alternate Style Specifies an alternate style. Some look-and-feels have alternate ways to represent items. Currently,
this option only applies to the slider and check box under OPEN LOOK.
NOTE: The control values for Min, Max, and Value correspond to a position in a range of
values. For the nth position in a range, set the control value to n-1.
Not every feature from the Control Panel applies to every control dialog item. For example, the
page value has a specific meaning for the scroll bar and slider items, but has no meaning for the
check box and option menu items. Table 9 defines the valid features for each control item.
Table 9. Control dialog items
Text Field
Feature Description
Selectable Enables the user to select the text field.
Modifiable Enables the user to modify text in the text field. Disabling this option converts the text field into a
static text field.
Wrap Automatically wraps text according to the specifications in the text ruler.
One Line Limits the text to one line.
Set Style... Opens the Style Chooser. Use the style chooser to select a font and attributes for the text.
Text Ruler Use the text ruler to set margins, tabs, justification, and line spacing for the text field.
Text Field Text entered here is displayed in your application.
Use the Text View Panel, shown in Figure 49, to add vertical and horizontal scroll bars to text
items. You can also define the scrolling attributes of text and specify the styles for highlighted
and unhighlighted text. (Highlighted text is text selected for editing; unhighlighted text is
selected text in a window that no longer has the focus.)
Dialog Items on the Item Palette 87
Feature Description
Hilite Style Defines the appearance of highlighted text. The options are Default, Invert, Line, Box, None, and
Dotted Line.
Unhilite Style Defines the appearance of highlighted text when the dialog containing the text does not have focus.
The options are Default, Invert, Line, Box, None, and Dotted Line.
Auto-Scroll Automatically scrolls text in the editable text item.
Scroll Locked Disables the horizontal and/or vertical scrolling of text.
Scroll Bars Places horizontal and/or vertical scroll bars into the text field.
Style Chooser
Use the Style Chooser, shown in Figure 50, to apply styles and fonts to selected text in a text
item. Styles specified with the Style Chooser are only applied to text highlighted in the text field
of the Text Item Panel.
Attributes
Set Font Set Color
Bold
Italic
Ascent: Auto
Underline
Hidden
Descent: Auto
Strikethru
Font
Size: Auto
Color
OK Apply Cancel
The following text attributes are selected using tri-state check boxes:
• Bold
• Italic
• Underline
• Hidden
• Strikethru
Tri-state check boxes have three states–select, unselect, or no selection. The select state applies
the specified text attribute to highlighted text. The unselect state removes the specified attribute.
The no selection, or “fuzzy” state, leaves the current attribute unchanged. (The shading in the
check box appears gray when it is in the fuzzy state.)
The Style Chooser also contains two check boxes for Font and Color. Selecting Font or Color
enables the Set Font or Set Color buttons. Select these buttons to open the Font Chooser and
Color Chooser. Use these choosers to further define the appearance of selected text in the text
field. For more information on the Font Chooser and the Color Chooser, see “The Font
Chooser” on page 129., and “The Color Chooser” on page 131.
The Style Chooser has three fields to define the ascent, descent, and size of selected text in a
text item. Ascent is the amount type rises above the base line; descent is the amount type
descends below the base line. Size represents the font size. These fields are initially set to Auto;
the default values of the font define the attribute. To override the default values for selected text,
enter a value, in points, in the appropriate fields. To return to the default values, reenter Auto.
Dialog Items on the Item Palette 89
File Edit
ABCDEF
If a menu bar is created from the Item Palette, “File” and “Edit” menus are predefined for the
menu bar. Additionally, a spring solution is predefined to place the menu bar at the top of a
dialog.
90 Chapter 7 Dialog Items
NOTES: The Menu Bar Editor itself has File and Edit menus. These menus are used in the
editor, and should not be confused with menus you are creating.
When creating a menu for a menu bar, use the Menu Bar Editor, and not the Set
Menu button in the Dialog Item Panel. Set Menu is used to create pop-up menus for
dialog items.
File Edit
Title: Image W: 64 H: 58
ABCDEF
From the Image Editor you can edit, create, or import images. Image formats supported are GIF,
XBM, PGM, PPM, PBM, ICO, DIB, and BMP. (Run-length encoded DIB formats are not
supported.) For more information on the Image Editor, see Chapter 10, “Images” on page 115.
When the image dialog item is created from the Item Palette, it is a naturally-sized item; its size
is determined by the size of its image.
NOTE: The image dialog item should not be confused with an image item. An image item
is a typed resource that is an actual image. An image dialog item is a subclassed
resource that has an image item defined as one of its attributes.
Use the List Editor to define the appearance and behavior of a list item. You must use ACL calls
to specify the value of cells in a list.
The List Editor contains four panels:
• Dialog Item
• List View
• String List
• List Item
Vertical Vertical
Options
Auto-Scroll Keyboard Selection
Feature/Item Description
Scroll Bars
Horizontal Places a horizontal scroll bar into the list view.
Vertical Places a vertical scroll bar into the list view.
Show Grid
Horizontal Draws a line between each row in the list.
Vertical Draws a line between each column in the list.
ADEPT does not support List Items with multiple columns.
Options
Auto-Scroll Enables scrolling for a list item. A user scrolls through a list by dragging the pointer to
the edge of a list view. If Auto-Scroll is disabled, the user cannot use the pointer to
scroll to items beyond the border of a list view.
Traverse Wrap Enables the user to travel backward and forward from one end of the list to the other. If
Traverse Wrap is disabled, the user cannot move beyond an end of the list.
Keyboard Selection Enables the user to select highlighted items in the list by pressing Return.
Keyboard Traversal Enables a user to travel through a list by using the arrow keys of the keyboard.
Rearrangeable
None Disables rearranging of rows and columns of a list.
Dialog Items on the Item Palette 93
Feature/Item Description
Rows Enables the user to select and drag rows to new positions in the list.
Columns Enables the user to select and drag columns to new positions in the list.
ADEPT does not support List Items with multiple columns.
Use the Natural Number of Rows and Auto-Calculate Widths options to determine the size of
natural-sized list items. (By default, list items are not natural-sized. To make a list item natural-
sized, edit its inside connections. See Chapter 6, “Dialogs” on page 51 for details on editing the
inside connections of a dialog item.)
The Natural Number of Rows is the number of rows used to calculate the natural height of a
list item. A natural-sized list item displays the number of rows entered here. A value of zero
means all the rows are used to calculate the natural height.
The default width of a column in a list is equal to the width of the list item. Selecting Auto-
Calculate Widths overrides this default size. When this option is selected, the width of a
column is determined by the greater of these two values:
• Width of the largest item in a list
• Width of the list item
The default height of a row in a string list is determined by the size of the font used in the list.
You cannot override the default height in the List Editor.
Use the Selection Method radio buttons to specify a selection method for a list. Four selection
methods are available:
• None No cell from a list can be chosen.
• Only One No more than one cell can be selected at any time.
• Free Any cell, or combination of cells, can be selected at any time.
• Rectangular The selection always forms a rectangle of contiguous cells.
94 Chapter 7 Dialog Items
Select the At Least One Selection check box if you want at least one item in the list to be
selected at all times.
Modifiable
New String0
New String1
New String2
Use the New command from the Combo Menu to insert new text items into a Combo Box’s list.
The first item, by default, is named New String0. Additional items are consecutively
numbered. For example, the next two items would be named New String1 and New
String2. Use the Text field to edit selected items from the list.
Dialog Items from the New Item Menu 95
If the list of items is too large to be completely displayed in the Combo Box, scroll bars appear.
You can change the size of the list by resizing the Combo Box; edit the W and H coordinates in
the Dialog Item Panel or drag a corner of the Combo Box in the Dialog Panel to resize the
Combo Box.
Normally, the text field of a combo box is modifiable; the user can make a selection from the
list by typing an entry in the text field. Unselect the Modifiable check box in the Combo Panel
to make the text field a static text field. Now the text field displays the current selection, but
cannot be used to make selections from the list. The user must make a selection by clicking an
item in the scrolling list of the combo box.
The Container Editor has an Order Items Panel, shown in Figure 59. This panel is similar to the
Order Items Panel of a Dialog Editor.
The Dialog Item Panel of the Container Editor, shown in Figure 60, defines the appearance of
a container in a dialog. (Since dialogs are subclassed from windows, a Dialog Editor defines its
appearance with a Window Panel.)
ABCDEF
Use the Container Attributes Panel, shown in Figure 61, to define scroll bars for a container
and define keyboard traversal behavior.
To define the keyboard traversal or “tabbing” behavior of a container use the Flat Check Box.
If this option is enabled, a user can “tab through” any items in the container to other dialog items
in the dialog. If this option is not selected, a user can tab into the container, but not out.
NOTE: Containers are usually created in a Dialog Editor. Dialog items placed in the Dialog
Panel are selected and placed in a container with the Place in Container menu
commands from the Edit Menu. For more information on the Place in Container
commands, “Placing Items in Containers” on page 59.
Items:
NOTE: Spin boxes are commonly used to prompt the user for frequently used information,
such as the day of the week. If you need to display the options available to a user,
consider using the combination box described on page 94.
Spinners, (sometimes called numeric spinners), accept only integer values from the user. Any
value in the defined range is allowed. If the user enters a value outside the range, the value of
the spinner resets to the closest legal value. The increment for a spinner can be changed to allow
the user to quickly scroll through a large range.
In the Control Panel for a spinner, displayed in Figure 64, Min and Max define the range for the
spinner. Increment defines the amount to change the value of the spinner during a scroll
operation. Value is the default value of the spinner, and is displayed when the spinner opens. For
more on the Control Panel and control items see “Control Dialog Items” on page 83.
Min: 0 Page: 1
Max: 1 Increment: 1
Value: 0
The Spinner Panel, displayed in Figure 65, defines the modifiable and wrap properties of a
spinner. Normally, the entry field of a spinner is modifiable; the user can make a selection by
typing a numeric value in the entry field. Unselect the Modifiable check box in the Spinner
Panel to make the entry field static. Now the entry field displays the current selection, but cannot
be used to make further selections. The user must make a selection by scrolling through the
values of the spinner.
100 Chapter 7 Dialog Items
Modifiable
Wrap
Modifiable Wrap
Text:
Normally, the text field of a text spinner is modifiable; the user can make a selection from the
list by typing an entry in the text field. Unselect the Modifiable check box in the Text Spinner
Panel to make the text field a static text field. Now the text field displays the current selection,
but cannot be used to make selections from the list. The user must make a selection by scrolling
through the values of the text spinner.
If the Wrap option is enabled, the user can scroll backward and forward from one end of the
list to the other. Otherwise, the user can only scroll to the ends of the list.
Feature/Item Description
Custom Styles
Major Tab Side Controls location of top level tabs (Pages and Sections).
Minor Tab Side Controls location of second level tabs (Pages).
Tabs Controls the visual appearance of the tabs.
Folio Places “Page 1 of X” label at the bottom edge of the notebook.
Folio Placement Controls where the Folio label appears.
Page Buttons Places scroll buttons for changing pages at the lower right corner of the notebook.
Pages Wrap If on, user can scroll directly from the last page to the first page.
Page Borders If on, a border appears around the page inside the notebook.
Tab Style Controls the outer profile of the tabs (Rectangular, Rounded, Beveled).
Vertical Tabs For tabs at the sides of the notebook; controls whether the tabs are level or rotated 90
degrees.
Page Count Controls the number of virtual notebook pages displayed.
Page Step Number of pixels between virtual notebook pages.
Page Inset Controls how close pages are to the edge of the notebook.
102 Chapter 7 Dialog Items
Feature/Item Description
Page Inset Border Controls the inset of the Page Borders (if enabled).
Tab Buttons Centered Controls whether tab buttons are centered with respect to the notebook.
Tab Buttons Placement Controls visual placement of tab buttons.
Allow Partial Tabs If on, allows background tabs to overlap.
The Notebook Pages section of the Notebook Panel lists the Sections and Pages you’ve added
to the table (in order). Use the Notebook menu items to add Pages and Sections to your
notebook. To change the order of the menu items, use the center mouse button (three-button
mouse) or both mouse buttons (two button mouse) to drag the Pages/Sections into different
locations.
Sections appear in the list as single items. To edit the pages within a section, double-click on the
desired section entry.
The following items are available from the Notebook menu:
• Edit - Displays the Page/Section panel for the currently selected Page/Section. You can
also display the Page/Section panel by double-clicking on the desired Page/Section entry
in the Notebook Pages list.
• Edit Tab... - By default, the Title field in a Page’s/Sections’s Dialog Panel determines the
name on the tab. If you want a different name, you can display a separate Dialog Item panel
for the tab corresponding to the currently selected page/section. On the tab’s Dialog Item
panel, you can change the font and name that displays on the tab.
• New Page - Adds a new page to the list on the Notebook Panel.
• New Section - Adds a new section to the list on the Notebook Panel.
• Current Page - Sets the currently selected page as the default page in the notebook.
CHAPTER
8
Windows and Other Resources
Overview of Windows
A window is a rectangular display area with various attributes that define its appearance and
behavior. A window by itself is not often used in an application, but it forms the basis for
subclassing other commonly used resources. For details on subclassing resource see “Creating
Subclassed Resources” on page 48.
Editors for the following resources, all subclassed from windows, are opened from a Dictionary
Editor:
• Dialog
• Menu
• Confirm
• Notice
The Dialog Editor is discussed in detail in Chapter 6, “Dialogs” on page 51. The Menu Editor
is covered in Chapter 9, “Menus” on page 109. This chapter discusses the Window, Confirm,
and Notice Editors.
103
104 Chapter 8 Windows and Other Resources
File Edit
Attributes
Border Maximizable Iconifiable Movable
ABCDEF
The tag name of a window is the name an application uses to access the window after the
resource file is loaded into memory. The title of a window is displayed in its title bar.
You can define the appearance of a window by activating the choosers and editors associated
with a series of check boxes in the Custom group of the Window Panel. Table 14 lists the
choosers and editors available. Selecting one of these check boxes enables the button associated
with it. Select the button to activate the chooser or editor associated with that button.
Attribute If selected
Border The window is outlined with a border.
Movable The window can be moved on the display by dragging it with a mouse.
Resizable The window can be resized by the user.
Modal The window is the only active window in the application. A user must respond to or perform
some action in this window to change the focus.
Pinnable Depending on the look-and-feel, enables pinning a window on the display.
Iconifiable The window can be minimized to an icon on a display.
Maximizable The window can be expanded to fill a display screen.
The confirm dialog is subclassed from a dialog. The Confirm Editor contains the following
panels:
• Window
• Confirm Attributes
• Order Items
• Confirm
The Window Panel, Order Items Panel, and Confirm panels are similar to corresponding panels
in the Dialog Editor. Use the Confirm Panel to place additional dialog items into a confirm
dialog. By adding additional dialog items, you can create a confirmation dialog with added
functionality. For more information on using the Window, Order Item, and Confirm Panels, see
Chapter 6, “Dialogs” on page 51.
Use the Confirm Attributes Panel, shown in Figure 68, to define, name, and edit the various
buttons in a confirm dialog.
Buttons:
Ok
Cancel
Reset
Defaults
Apply
Help
The confirm dialog, by default, includes the required buttons for the current look-and-feel. The
OK and Cancel buttons are required under all look-and-feels except OPEN LOOK. The Apply
button is required under OPEN LOOK and is optional for other look-and-feels. The OK and
Cancel buttons close the confirm dialog after notifying the application of the action taken. The
behavior of the Apply button is look-and-feel dependent.
The Reset and Defaults buttons are optional under all look-and-feels; their behavior is look-and-
feel dependent. The Help button is an optional button that activates the help system defined for
your application. To add an optional button to a confirm dialog, select the check box for the
optional button.
Some look-and-feels require standard titles for confirmation buttons. However, you can
override the standard titles and create new titles for the buttons using the Override Standard
Titles option in the Confirm Attributes Panel. If you change the title of a button and select the
Override Standard Titles option, the title is changed even if the title violates a look-and-feel
standard. If you change the title, but don’t select the Override Standard option, the title is
changed only when allowed by the look-and-feel.
The Notice Dialog 107
In the Confirm Attributes Panel, you can add new confirmation buttons to a confirm dialog,
open a dialog item panel to further edit a confirmation button, and specify vertical arrangement
for the buttons.
There are two types of notices available to applications. The warning notice is typically used to
display information. The warning notice contains the following:
• Text for the notice
• OK button
• Cancel button (optional)
The caution notice is used when the user has a choice of actions or can cancel the current
operation. The caution notice contains the following:
• Text for the notice
• Yes button
• No button
• Cancel button (optional)
The notice dialog contains two panels, the Window Panel and the Notice Panel. Use the Window
Panel to set the attributes for the notice dialog. See “The Window Resource” on page 103 for
details on using the Window Panel. The Notice Panel, shown in Figure 69, is used to define the
type of notice and to enter text for it.
Notice type:
Text:
Feature Description
Notice type
Caution Creates a caution notice. A caution notice contains a Yes button and a
No button.
Warning Creates a warning notice. A warning notice contains an OK button.
Cancel Button Adds a Cancel button to the notice.
Text Contains a static text field. Text in this field is displayed in the notice.
After creating a notice, use the Try Out option in the Notice Menu to test the Notice.
CHAPTER
9
Menus
Overview of Menus
Menus provide a way for users to issue commands in an application. Each command in a menu
is represented on the menu as a menu item.
Menus are usually built upon a menu bar, a dialog item with an ordered list of menus. However,
a pop-up menu can be associated with any dialog item. (A pop-up menu is opened with the
menu button of the mouse.) The option menu is a specially defined pop-up menu that provides
a convenient way to place a menu within a dialog. See Chapter 6, “Dialogs” on page 51 for
details on the menu bar, pop-up menu, and option menu.
NOTE: The Menu Editor creates menus for the custom dialogs you wish to use with ADEPT.
The Menu Editor does not affect the pull-down menus in the ADEPT edit window.
There are ADEPT Command Language (ACL) commands to manipulate the pull-
down menus in the ADEPT edit window.
109
110 Chapter 9 Menus
Attributes
Border Maximizable Iconifiable Movable
ABCDEF
In the Window Panel, you can open the available editors and choosers to define the appearance
of the menu. You can also define the tag and title name for the menu in the Window Panel,
although this is usually done in the Menu Panel. Certain features of the Window Panel are
disabled. (Attributes such as modal and resizable do not normally apply to menus.) For more
information on using the Window Panel, see Chapter 8, “Windows and Other Resources” on
page 103.
Item
Title: Open
Tag:
Key:
Mnemonic: O
Disabled Default On
Menus
Use the Menu group of the Menu Panel to assign attributes for a menu. Table 17 lists the
attributes you can define in the Menu group.
Attribute Description
Title Defines a name for the menu. The title specified here is displayed in the Title Display Field of the
Menu Item List. The name also appears when testing the menu.
Tag Defines a tag name for the menu. The tag name of a menu is the name an application uses to access
the menu after a resource file is loaded into memory.
Mnemonic Defines a mnemonic key a user can use to open the menu. This is a one-character field. The character
entered must match a character in the title name. All mnemonic keys for menus in a menu list must
be unique. See page 112 for more on mnemonic keys.
Pinnable Defines the menu as pinnable. A user can place a pinnable menu on the display to keep it open.
Disabled Defines a menu as disabled. Disabled menus appear dimmed.
Menu Items
Use the Menu Menu of the Menu Panel to add menu items to a menu, remove accelerator keys
defined for a menu item, and try out a menu. Figure 72 shows the Menu Menu.
Remove Accelerator
at a time.
• New Submenu Item to create a submenu item in the Menu Item List. The menu
item is displayed with an arrow, indicating to a user that further menu options are
available. Double-click on the submenu item to open another Menu Editor. Define
the options for the submenu with the newly opened Menu Editor.
When a menu item is created, the Item group of the Menu Panel is enabled. Use the Item group
to assign attributes to menu items. Table 18 lists the features of the Menu Item group.
Feature Description
Title Defines a name for the menu item. By default, new menu items are named “New.” Use this text field
to edit the name of a menu item.
Tag Defines a tag name for the menu item. The tag name of a menu item is the name an application uses
to access the menu item after a resource file is loaded into memory.
Key Defines an accelerator key for the menu item. In the Key field, type the key sequence you want to use
as an accelerator in the menu (for example, Ctrl+K, or ^K). In the Menu Panel, the Menu Menu has a
Remove Accelerator command that removes an accelerator key assigned to a menu item. Accelerator
keys must be unique among all menu options available.
Mnemonic Defines a mnemonic key a user can use to select the menu item from the keyboard. This is a one
character field. The character entered must match a character in the title name. All mnemonic keys
defined for menu items in a set of menus must be unique. See below for more on mnemonic keys.
Disabled Defines a menu item as disabled. Disabled menu items appear dimmed.
Default Defines the default selection for a menu. Only one menu item in a menu can be marked as the
default.
On Defines a check menu item or a group menu item as selected. The menu item appears selected when
a user opens the menu. (This feature is only available for the check and group menu items.)
Mnemonic Keys
Use the Mnemonic fields in the Menu and Item Groups to specify a mnemonic key for a menu
or a menu item. A mnemonic key allows the user to open a menu or invoke a menu command
by pressing the specified key in combination with the mnemonic key modifier from the
keyboard. (The mnemonic key modifier is platform dependent but is usually the Alt key. ) Only
one alphanumeric character can be specified as the mnemonic key. If the specified key is in the
title of the menu or menu item, the corresponding letter is underlined on the display.
It is up to the application developer to provide unique mnemonic key definitions to menus in a
menu list and menu items on a menu. Additionally, the mnemonic keys for menus on a menu
bar must be unique with respect to all mnemonic keys defined for dialog items in the dialog
containing the menu bar.
NOTE: The user does not specify the case of a mnemonic key when making a selection from
the keyboard. This means the upper case and lower case version of a character are
not unique mnemonic key specifications.
Testing a Menu
In the Menu Panel you can view and test a menu as you create it.
To test a menu:
1. Select Try Out Menu from the Menu Menu.
A version of your menu appears on the menu bar of the Menu Panel.
2. Select your menu from the menu bar of the Menu Panel.
The features you have defined for your menu are visible. Your menu remains on the
menu bar until you select Try Out Menu again. You can make changes to your menu
while the Try Out Menu option is enabled; changes you make appear in your menu.
NOTE: You can also test your menu with the Try Dialog feature available from the
Windows Menu in the Dialog Panel. For more information, see section
“Testing Your Dialog” on page 64.
114 Chapter 9 Menus
CHAPTER
10
Images
Color Palette
Tool Palette
Line Width
Palette
115
116 Chapter 10 Images
To import an image:
1. Select Import... from the Image Menu in the Image Panel.
The File Chooser appears.
2. In the Filters Menu of the File Chooser, select a filter for the image format you are
importing.
The File Chooser lists only directories and files specified by the filter selected.
3. Use the File Chooser to navigate through the file system and select the file name of the
image you want to import.
or
Type the full or relative pathname of the image in the Name field.
To export an image:
1. Select Export... from the Image Menu in the Image Panel.
A File Chooser appears.
2. To specify an image format, select Export in the Export Menu.
The default format is GIF. Select a format from the options available.
3. Type the file name you want for the exported image. Include the path, if necessary.
4. Click OK in the File Chooser.
The image is written to the specified file.
Image Size
Width: 40
Height: 40
OK Cancel
Zoom In Ctrl+Shift+I
Zoom Out Ctrl+Shift+O
Command Description
Fat Bits Magnifies the image in the Image Editing Area so each pixel can be viewed. When Fat Bits is
disabled, the image returns to its actual size. (The default magnification is 5 times the size of the
image.)
Draw From Defines the starting point for certain drawing tools. Normally, the line, ellipse, and rectangle tools
Center begin drawing an item from the end (or perimeter) of the item. Draw From Center specifies that
drawing begins at the center of the item.
Show Grid Displays the image in a grid. Individual pixels are outlined with the grid pattern. When the bit size
displayed is smaller than 3 pixels, the grid is not shown.
Show Position Displays the coordinates of an image above the Image Editing Area. The coordinates provide
information on the position, direction, and size of editing operations (refer to Table 8-2 for more
information).
Preview Displays the entire image in a separate Preview Window (see “Viewing an Image” on page 123 for
more information). If you use the Hand Tool to pan through an oversize image in the Image Editing
Area, the area currently in the Image Editing Area is outlined in the Preview Window.
Zoom In Magnifies the image in the Image Editing Area. Select repeatedly to continually increase the
magnification.
Zoom Out Decreases the magnification of the image in the Image Editing Area. Select repeatedly to continually
decrease the magnification.
Specification Description
X: The position of the item on the X axis.*
Y: The position of the item on the Y axis.*
DX: The change in X as you draw or move an item.
DY: The change in Y as you draw or move an item.
Len: The distance between the starting point of the operation and the current position.
Ang: The arc, in degrees, described from the starting point as you draw or move an item.
*The origin of the image is the lower left corner of the image.
However, you can use the Save Template command from the File Menu to save the changes to
a view before closing the Image Editor. When the Image Editor subsequently reopens, the
options you previously set are active. The options you can save with the Save Template
command are:
• Bit Size
• Draw From Center
• Show Grid
• Show Position
• Preview
Creating an Image
Images are created and edited in the Image Editing Area with a set of 14 tools from the Tool
Palette. Table 21 lists the tools from the Tool Palette.
Tool Description
Hand Tool Repositions the visible part of the image when an oversize image is in the Image Editing Area. Select
and drag the oversize image with the Hand Tool to reposition the image.
Dropper Tool Picks up the color from a pixel in the image. Click anywhere in the Image Editing Area to pick up a
color. The color you pick up is displayed in the Color Palette and the Foreground Color Box. To pick
up a background color, press the Control key when you click the Dropper Tool.
Selection Tool Selects a rectangular area of an image for editing. Drag the mouse with the Selection Tool to describe
the selected area of the image. To select the entire Image Editing Area, double-click the Selection
Tool in the Tool Palette.
Lasso Tool Selects any area of an image for editing. Drag the mouse with the Lasso Tool to surround the area
you want to select.
Fill Tool Fills any enclosed area of an image with the foreground color. Click an enclosed area of the image
with the Fill Tool to fill the area with the foreground color.
Spray Can Tool Draws the foreground color with a “spray” pattern. Drag the Spray Can Tool across the image to
draw the pattern.
Eraser Tool Replaces the color of an image with the background color. Drag the Eraser Tool over the area you
want to erase. Press the Shift key before erasing to constrain the Eraser Tool horizontally or
vertically. To clear the entire editing area, click in the Image Editing Area, and then double-click the
Eraser Tool in the Tool Palette.
Text Tool Places text into the image. Click in the Image Editing Area with the Text Tool to open an Image Text
Window. Text entered in the Image Text Window appears as a selection in the image.
Pencil Tool Draws or erases one pixel at a time. Click in the Image Editing Area with the Pencil Tool to draw or
erase a pixel. If the area clicked is the foreground color, it becomes the background color. Otherwise,
an area clicked becomes the foreground color. Drag the Pencil Tool to draw a continuous line.
Line Tool Draws straight lines. Drag the Line Tool in the Image Editing Area to draw a straight line. Press the
Shift key during the drag operation to constrain the line horizontally, vertically, or to a 45-degree
angle.
Ellipse Tool Draws an ellipse. Drag the Ellipse Tool in the Image Editing Area to draw an ellipse. Press the Shift
key during the drag operation to constrain the ellipse to a circle.
Filled Ellipse Tool Draws a solid ellipse. Drag the Filled Ellipse Tool in the Image Editing Area to draw a solid ellipse.
Press the Shift key during the drag operation to constrain the ellipse to a circle.
Rectangle Tool Draws a rectangle. Drag the Rectangle Tool in the Image Editing Area to draw a rectangle. Press the
Shift key during the drag operation to constrain the rectangle to a square.
120 Chapter 10 Images
Tool Description
Filled Rectangle Draws a solid rectangle. Drag the Filled Rectangle Tool in the Image Editing Area to draw a solid
Tool rectangle. Press the Shift key during the drag operation to constrain the rectangle to a square.
2. Click OK.
The text appears where you clicked in the Image Editing Area. The text is selected for
a move operation.
3. Move the selected text to position it in the Image Editing Area.
Viewing an Image
Use the Preview Window to observe changes to an image as you make them. You can also use
the Preview Window to select an area of an oversize image for viewing in the Image Edit Area.
New Delete
Pick... Ramp
Blend Contrast
Lighter Darker
Warmer Cooler
Selected colors can be edited with a series of options available in the Color Palette Editor. Table
22 lists these options.
Option Description
New Adds a new color to the palette. You can keep adding colors until the grid contains 256 colors.
126 Chapter 10 Images
Option Description
Delete Removes a color or range of colors.
Pick Opens the Color Chooser. Use the Pick option to redefine an individual color on the palette. For more
information on the Color Chooser, see Chapter 12, “The Color Chooser” on page 131.
Ramp Creates a range of colors, from white to black. The first color selected in a series is the middle color
of the ramp.
Blend Modifies a series of colors so that the colors range gradually from the first color in the original series
to the last color in the original series.
Contrast Changes the selected colors to its complement.
Lighter Adds white to the selected color.
Darker Adds black to the selected color.
Warmer Adds red to the selected color.
Cooler Adds blue to the selected color.
Install Adds the displayed color palette to the image.
Cancel Cancels any editing performed and closes the Color Palette Editor.
Remap to Closest Matches the colors of the current palette to the closest colors of a new palette. If you want to
Color minimize changes to an image when installing a new palette use Remap to Closest Color. If Remap
to Closest Color is not enabled, the colors on the newly installed palette are mapped according to
their position on the palette.
Selected colors can also be edited with the Cut, Copy, and Paste commands from the Edit Menu.
Colors can be copied or moved across different Color Palette Editors with these commands.
NOTE: The Undo command from the Edit Menu of the Color Palette Editor can be used to
undo any editing action in the Color Palette Editor. However, only the last editing
action can be undone.
To delete a palette:
1. Select Palettes from the Color Palette Editor Menu.
A list of color palettes is displayed in the Palettes Menu. A Delete option is also listed.
2. Select Delete from the Palettes Menu.
A list of modified or imported palettes is displayed.
3. Select the palette you want to delete.
The palette is deleted.
Creating an Image Transparency 127
To install a palette:
1. Select a palette from the Palettes Menu.
2. Modify its contents as needed.
3. Select Remap To Closest Color if you want the values from the two palettes to match
as closely as possible.
NOTE: If you do not remap, colors are reassigned only on the basis of their relative
position in the color palette grid.
To remove a transparency:
1. Select Delete Transparency from the Options Menu.
The cursor is drawn in the Image Editing Area on the left. Use the center editing area to define
the hot spot for your cursor. The hot spot for a cursor is represented as a specially colored bit in
the Hot Spot Editing Area. Use the editing area on the right to create a mask for the cursor. A
mask must be specified to make a cursor visible in an application.
The default image size for a cursor is 16 pixels by 16 pixels. Adjust the size of the cursor with
the Set Size... option of the Cursor Menu.
To create a cursor:
1. Draw a cursor in the Cursor Image Editing Area.
Draw or import an image just as you would in the Image Editor.
2. In the Hot Spot Area, drag the specially colored bit to your cursor’s hot spot.
The Hot Spot determines the active bit of the cursor in your application.
3. Double-click the Selection Tool in the Tool Palette.
This selects the entire cursor image for masking.
5. Select Mask Selection from the Edit Menu.
This creates a mask for the selected area. Edit the mask if necessary. When editing a
transparency, the foreground color is always set to black and the background color is
always set to white.
6. Select Try Cursor from the Cursor Menu.
A copy of your cursor appears in the Cursor Panel. Select Try Cursor again to return
to your normal cursor.
CHAPTER
11
The Font Chooser
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
1234567890
OK Apply Cancel
129
130 Chapter 11 The Font Chooser
Feature Description
Font Display Displays the current font selection.
Family Displays the type families available on your display.
Face Displays the typefaces available for the family selected in the Family List.
Size Displays the selected point size in the Size List. Edit this field to specify a size not listed in the
Size List.
Size List Displays point sizes available for the selected font.
To select a font:
1. In the Font Chooser, select the type family you want from the Family List.
Your selection appears in the Font Display.
2. Select the typeface you want from the Face List.
Your selection appears in the Font Display.
3. Select the size you want from the Size scrolling list or enter the size in the Size text
field.
Your selection appears in the Font Display.
4. Click one of the following confirmation buttons:
OK to change the font and close the Font Chooser
Apply to change the font without closing the Font Chooser
Cancel to close the Font Chooser without making any changes to the font
These confirmation buttons may vary, depending on your current look-and feel.
Views Options
Color Box
HLS Color Wheel
Color Component
Slider Bar Light: 79.61 %
Hue: 180.78 %
Saturation: 79.35 %
Saved Colors Palette
Saved Colors:
OK Apply Cancel
131
132 Chapter 12 The Color Chooser
The HLS color model specifies a color using a combination of the color’s hue, lightness, and
saturation components. This is the default color model in ACL Designer.
The RGB and CMY color models define colors by specifying a mixture of primary colors. The
RGB model mixes the additive primary colors: red, green, and blue. The CMY model mixes the
subtractive primary colors: cyan, magenta, and yellow.
The Grayscale model is used to define shades of gray for black and white or monochrome
monitors.
Color Box
The Color Box displays the colors selected for use in the Color Chooser. The bottom half of the
Color Box displays the current color selection. The top half of the Color Box displays the
previous color selection. You can revert the current selection to the previous selection by
clicking in the top half of the Color Box. Colors can be dragged and dropped from the Color
Box to resource editors.
The Color Wheel/Plane displays a graphic representation, or map, of the selected color model.
In the HLS color model, this map is represented as a Color Wheel; in the RGB and CMY color
models, it is a Color Plane. Specify colors for your application directly from the map. (The map
is not used with the Grayscale model; selections are made using the Grayscale slider bar.)
Named Colors displays a scrolling list of predefined colors. Select colors for your application
directly from the list of Named Colors.
Color Tolerances displays a set of tools used to define the appearance of colors on a display.
You define the appearance of colors by specifying a method for dithering. (Dithering is the
process of approximating a color not available on a display by combining available colors in a
particular pattern.)
Slider Bars 133
Slider Bars
The three slider bars are used in conjunction with percentage fields to specify individual
components of a color. The color components represented by the slider bars varies with each
color model. Each slider bar has an indicator that defines the value of a color component. There
are several ways to specify a value with a slider bar. You can drag the indicator to the desired
location on the slider, enter the value directly into the percentage field for the slider, or click an
area in the slider to select a new value.
The appearance and behavior of the slider bars can be defined in two ways. By default, the slider
bars dynamically reflect the appearance of the color being selected. As you drag the indicator
to a new position on any component, the appearance of the other components change to reflect
your selection. However, if you want the slider bars to represent an unchanging scale of values
for each component, unselect Reform Slider Images from the Options Menu. Now the
appearance of the slider bars do not change to reflect the color being selected.
134 Chapter 12 The Color Chooser
Large Dither
Small Dither
Solid
Precise Large Dither
Precise Small Dither
Precise Solid
CAUTION: Care should be taken when selecting Solid or Precise Solid from the Color
Tolerance Menu. These selections specify that no dithering take place. On most
displays, selecting too many colors that are not dithered limits the number of
colors available for other uses.
For most applications, the color tolerances available in the Default Color Tolerances Menu are
sufficient to define your colors. However, if you require more precision in defining a color, use
the Color Tolerances view from the Views Menu. Figure 82 shows the Color Tolerances view
for the HLS color model.
Using the HLS Color Model 135
Views Options
Dither Area
Dither Area: 8 X 8 Option Menu
Color Method: HLS
Delta Values
H: 0.78 %
S: 1.56 %
Distance
D: %
Light: 50.00 %
Hue: 228.71 %
Saturation: 100.00 %
Saved Colors:
OK Apply Cancel
Figure 82. Color Tolerances View for the HLS color model
Use the Dither Area option menu to select a dithering matrix. Use the Delta Values sliders to
specify a delta value for each component individually. Use the Distance slider to specify a delta
value, or distance, applied equally to all components.
CAUTION: When selecting a dithering matrix, be careful about specifying no dithering for
a color. On most displays, selecting too many colors that are not dithered limits
the number of colors available for other uses.
Hue
Lightness 90˚
Axis
180˚ 0˚ (Red)
Saturation
Axis
270˚
The hue component defines a color’s position in a continuous color spectrum, and is represented
as the angle around the circumference of the cone. Hue is measured in degrees and ranges from
zero to 360. Zero represents red. The lightness component defines the density of a color and is
represented by the vertical axis. Lightness ranges from zero for black, to 100 for white.
Saturation defines the intensity of a color and is represented by the distance from the vertical
axis to the perimeter of the cone. Saturation ranges from zero to 100.
r b
g
g
b
(0,0,0)
Views Options
Red: 63.43 %
Green: 95.37 %
Blue: 95.79 %
Saved Colors:
OK Apply Cancel
The plane selected for viewing can be changed to reflect the mapping of any two primary colors
against a value for the third primary color in the RGB or CMY color models.
Dithering for a color can be defined using the Default Color Tolerances
submenu from the Options Menu or the Color Tolerances View from the
Views Menu. See “Defining Color Tolerances” on page 134 for more on
color tolerances.
(r, g, b | r=g=b) r
g
b
(0,0,0)
Named Colors
The Color Chooser comes with a set of predefined colors available for use in an application.
These predefined colors can be selected from the scrolling list in the Named Colors view, shown
in Figure 87.
Views Options
alice blue
Color Method: HLS antique white
aquamarine
azure
beige
bisque
black
blanched almond
blue
blue violet
Light: 50.00 %
Hue: 228.71 %
Saturation: 100.00 %
Saved Colors:
OK Apply Cancel
Saved Colors
Use the Saved Colors Palette to save frequently used colors. Up to 16 colors can be saved on
this palette. When a color is saved, the color tolerance values for dithering are saved with it.
Saved colors are automatically saved with the Color Chooser and are available for future editing
sessions.
To save a color on the Saved Color Palette (using the Arrow Keys):
1. Select a color in the Color Chooser.
Use any of the previously outlined methods to select a color.
2. Click on the Saved Colors Palette.
The border of the Saved Colors Palette is highlighted indicating it has been focused.
3. Using the left and right Arrow keys, move the cell indicator to select a cell to hold the
saved color.
4. Select Add Saved Color from the Options Menu.
The color has been added to the selected cell.
Applying Colors
Selected colors can be applied in the Color Chooser using the chooser’s confirmation buttons:
• Click OK to apply the color selection and close the Color Chooser
• Click Apply to apply the color selection and leave the Color Chooser open
• Click Cancel to close the Color Chooser without applying the color selection
These confirmation buttons may vary, depending on your current look-and-feel.
142 Chapter 12 The Color Chooser
Use the File Chooser to navigate through your file system when opening or saving files. Note
that the default file chooser on Windows platforms is the native Windows file chooser provided
with the system. To use the file choose shown here on Windows systems, use the
-nonativefilechooser command line option when starting ADEPT.
hal/
Acme
Ad Copy
<
Appointments
Archive
Bin
bin
> Budget
Client List
Open:
Budget/
OK Apply Cancel
143
144 Chapter 13 The File Chooser
Use the View Menu of the File Chooser to change the way files are listed. You can change your
current directory using any of the following:
• History menu
• Path pop-up menu
• Scrolling list
• Arrow buttons
• Name text field
Open a file using any of the following:
• Scrolling list
• Name text field
To mark a directory:
1. Change the current directory to the directory you want to mark.
You can only mark the current directory.
2. Select Mark from the Special Menu.
The current directory is placed in the marked directory list in the lower part of the
History Menu.
To unmark a directory:
1. Change the current directory to a marked directory.
You can only unmark a directory if it is the current directory.
2. Select Unmark from the Special Menu.
The current directory is removed from the marked directory list in the lower part of the
History Menu. It is still visible as a “most recently visited” directory in the upper part
of the History Menu.
Additional Menus
Depending on the context of the File Chooser, additional options are available for handling files.
For example, if the File Chooser is being used to open resource files from the Main Window, a
Filter Menu is available. Use the Filter Menu to filter out entries that are not resource files or
directories.
Using ACL Designer, the three basic ways to modify the ADEPT interface are:
• To create a form region that becomes an integral part of the ADEPT window.
• To create a toolbar that becomes an integral part of the ADEPT window.
• To modify existing forms by removing controls.
Creating dialogs
NOTE: Arbortext recommends that you do not use ACL Designer to create dialogs. Instead,
use a programming language such as Java or Visual Basic for creating dialogs.
149
150 Chapter 14 Modifying the ADEPT Interface
Creating toolbars
A Toolbar is a special kind of ADEPT interface item. Toolbars are attached to a specific area of
the ADEPT window. In the default ADEPT application, there are three toolbars both consisting
of sets of buttons.
A Toolbar is an excellent place to give the user access to often-used functions. ACL Designer
ships with a sample toolbar. The sample toolbar is located in the ACL Designer installation
directory in the samples/toolbar/ directory. The toolbar sample consists of two files.
toolbar.cmd - contains the ADEPT Command Language (ACL) code which places the
toolbar in toolbar.vr in the ADEPT edit window and sets up its callbacks.
toolbar.vr - is the ACL Designer resource file for the toolbar.
Upon opening the toolbar.vr file, you’ll notice that a toolbar region isn’t a dialog, but rather
a container. The dialog items within the container are placed just as they would be for a dialog.
When creating a toolbar, keep the following in mind:
Creating toolbars 151
NOTE: Before editing the adept.vr file, make sure you have an unedited copy available
in case your changes are not satisfactory. If you wish, you can set the APTVR
environment variable to point at the .vr file you wish to use with ADEPT.
If you plan to edit adept.vr, we suggest taking a few moments and inspecting the
organization of the resources in this file. The following information serves a quick tour of the
adept.vr file.
• All ADEPT edit window structures, including toolbars, are found in the AdeptEditor
dictionary.
• The default structure for the tags and entity pull down menus (as accessed from the toolbar),
are located in the aptDropdown dictionary.
• Cursors used in ADEPT are located in the Cursors dictionary.
• The default color definitions for UNIX platforms are located in the DefaultPreferences
dictionary. There is a Windows dictionary inside the DefaultPreferences dictionary which
contains the default color definitions for the Windows platforms.
• The interface resources for the equation editor are inside the EquationEditor dictionary.
Editing the ADEPT interface 153
• The object icons which appear in ADEPT (predominately in the Document Map) are
located in the IconImages dictionary. Other images, including those used by the Object
Browser, are located in the Images dictionary.
• All ancillary dialogs are found in the PopUpDialogs dictionary. This includes (among
many others) the Find, Print, Open, Save, Preferences, and Spelling dialogs.
• The interface resources for the table editor are inside the TableEditor dictionary.
• The status messages and tooltips, which appear when you place your mouse pointer over a
toolbar button, are found in the Tooltips dictionary. The Tooltips dictionary has a specific
structure which must be followed closely. Refer to the Creating Toolbars section (earlier
in this chapter) for details.
A sample procedure for changing an existing dialog appears below.
Overview
Several design tools can be used together to create a custom ADEPT application:
• Use ACL Designer to create dialogs.
• Use a text editor to create ADEPT Command Language (ACL) code. The code will locate
dialogs and widgets on the dialogs, attach callbacks, and implement application-specific
functionality within the callbacks.
This chapter assumes that you have a working knowledge of ACL.
155
156 Chapter 15 ACL Designer ACL Functions
• The callbacks on the dialog item's callback list are called in order.
• The callbacks on the dialog's callback list are called in order.
Dialog items have attributes that can be accessed from ACL. The set of available attributes
varies depending on the type of the dialog item. The section on dialog items attributes (later in
this chapter) describes the set of attributes.
An ACL Designer resource file (.vr) can contain an arbitrary hierarchy of dialogs and dialog
items. Dialogs can be nested within dictionaries, and dialogs can directly contain dialog items,
or they can contain containers which in turn could contain other containers or actual dialog
items. In keeping with the goal of simplicity, this hierarchy will be made invisible to the
developer.
The hierarchy contained within the resource file is effectively flattened so that all dialogs appear
to be at the top level of the file, and all dialog items appear at the top level of the dialog. This
places some responsibility on the developer, since all names assigned within the file must be
unique within their scope. The effect of this flattening behavior is to simplify the programming
interface.
ACL calls which encounter an error situation will set the main::$ERROR global variable and
return a distinctive value. This "fail soft" behavior allows developers to incrementally build and
test new ADEPT applications.
Attributes
Dialog attributes
All dialogs have the following dialog attributes:
CALLBACKS - A string: a comma-delimited list of callbacks for the dialog, in the order that the
callbacks are used.
DIALOG_PTR - An integer: The internal ACL Designer identifier for the dialog. Cannot be
changed by the application.
TITLE - A string: the title of the dialog item. Not all dialog items display their title.
VALUE - A string: the value of the dialog item.
VISIBLE - An integer: non-zero if the dialog item is visible, zero if the dialog item is not
visible. A visible dialog item is shown when its dialog is open.
Callbacks
Any window or dialog item can have a list of callbacks attached to it. Callbacks are regular ACL
functions that take a fixed set of arguments. Callbacks should always be set using a fully
qualified name to avoid ambiguity. The callbacks are called to inform the application that
various interesting events have occurred. There are four types of callbacks:
• Window notify
• Dialog item
• Outline list expansion
• Menu enable
Dialog item callbacks are called first, then window callbacks are called. Within a callback list,
callbacks are called starting at the first element in the list. A callback has no opportunity to
interrupt the normal flow of processing or to prevent the event it is called for from taking effect.
In other words, window and dialog item callbacks are purely informational in nature.
NOTE: This differs from the existing "quit" callback used for windows.
Outline lists also have a special callback specified by the EXPAND attribute. This callback is
called to construct the hierarchy within the list on an as-needed basis. Menu bars also have a
special callback specified by the ENABLE attribute. This callback is used to enable and disable
menu items immediately prior to the time that the menu is opened.
Window notify callbacks are called with the following arguments:
WindowCallback(window, dlgitem, event, data)
Where window is the window where the event happened, dlgitem is either the tag name of
the dialog item where the event happened or NULL if the event is a window-level event, and
event is the event code (see section later in this chapter). The data argument contains event-
specific information. The callback need not return a value.
Dialog item callbacks are called with the following arguments:
158 Chapter 15 ACL Designer ACL Functions
Each list is identified by a unique list tag. The pointer references are maintained internally; the
corresponding list tags can be obtained as follows:
top = dlgitem_get_sublisttag(window, dlgitem) will return the list tag
identified as (1).
B1 = dlgitem_get_sublist(window, dlgitem, top, 2) will return the list tag
identified as (2).
B2A = dlgitem_get_sublist(window, dlgitem, B1, 2) will return the list tag
identified as (3).
C1 = dlgitem_get_sublist(window, dlgitem, top, 3) will return the list tag
identified as (4).
160 Chapter 15 ACL Designer ACL Functions
Image Handling
Certain ACL Designer dialog items use their Image attribute as a background image for the
item. To support this, the IMAGE attribute is provided. It is important to note that not all items
will display their image, and that items which do display their image may appear different under
each supported look and feel. The image item will always display its image.
The IMAGE attribute can be set programmatically to affect a change in the displayed image.
Potential images are stored in an ACL Designer dictionary named "Images" at the root level of
the resource file where the dialog containing the dialog item was found. Setting the IMAGE
attribute of an item to the special string “_NONE” will display no image for the item. Setting the
IMAGE attribute of an item to the special string “_ORIGINAL” will display any image that is
specified in the resource file for the item.
dlgitem_set_active_at
ret = dlgitem_set_active_at(window, listtag, row, activestatus)
Activates or deactivates the specific outline list entry row in the outline list listtag in
window. If listtag does not refer to a outline list list tag, $ERROR is set and zero (0) is
returned. Otherwise, one (1) is returned.
The window parameter is a window identifier. The listtag parameter is an outline list list
tag (case sensitive). The row parameter is an offset into listtag (starting from one). The
activestatus parameter sets the enabled/disabled status of the list entry (1=enabled;
0=disabled).
Example
$ret = dlgitem_set_active_at(win, "Hierarchy", 3, 0)
deactivates the third item in the outline list item Hierarchy.
dlgitem_set_appdata_at
ret = dlgitem_set_appdata_at(window, listtag, row, appdata)
Associates application-specific appdata with the outline list entry row in the outline list
listtag in window. If listtag does not refer to an outline list list tag, $ERROR is set and
zero (0) is returned. Otherwise, one (1) is returned.
The window parameter is a window identifier. The listtag parameter is an outline list list
tag (case sensitive). The row parameter is an offset into listtag (starting from one). The
appdata parameter is the string of application data to associate with the list item.
Notes
The application data is passed to dialog item and outline list expansion callbacks.
Example
dlgitem_set_branch_image_at 161
dlgitem_set_branch_image_at
ret = dlgitem_set_branch_image_at(window, listtag, row, image)
Associates an ACL Designer image resource image with the outline list entry row in the
outline list listtag in window. The image appears at the front of the list item. Use this
specific function to set the image for list items that have children. If you were to create a file
browser using an outline list, you may use folder and disk drive icons as your branch images. If
listtag does not refer to an outline list list tag, $ERROR is set and zero (0) is returned.
Otherwise, one (1) is returned.
The window parameter is a window identifier. The listtag parameter is an outline list list
tag (case sensitive). The row parameter is an offset into listtag (starting from one). The
image parameter specifies the ACL Designer image resource to place at the front of the list
item.
Example
ret = dlgitem_set_branch_image_at(win, "Hierarchy", 3, "Folder")
sets the image for the third item in the outline list item Hierarchy to the Folder image.
dlgitem_set_extra_image_at
ret = dlgitem_set_extra_image_at(window, listtag, row, image)
Associates a second ACL Designer image resource image with the outline list entry row in the
outline list listtag in window. The image appears at the front of the list item, just to the
right of the leaf image set by the dlgitem_set_leaf_image_at function. If listtag
does not refer to an outline list list tag, $ERROR is set and zero (0) is returned. Otherwise, one
(1) is returned.
The window parameter is a window identifier. The listtag parameter is a outline list list tag
(case sensitive). The row parameter is an offset into listtag (starting from one). The image
parameter specifies the second ACL Designer image resource to place at the front of the list
item.
Example
ret = dlgitem_set_extra_image_at(win, "Hierarchy", 3, "Padlock")
sets the image for the third item in the outline list item Hierarchy to the Padlock image.
dlgitem_set_leaf_image_at
ret = dlgitem_set_leaf_image_at(window, listtag, row, image)
Associates an ACL Designer image resource image with the outline list entry row in the
outline list listtag in window. The image appears at the front of the list item. If listtag
does not refer to an outline list list tag, $ERROR is set and zero (0) is returned. Otherwise, one
(1) is returned.
The window parameter is a window identifier. The listtag parameter is an outline list list tag
(case sensitive). The row parameter is an offset into listtag (starting from one). The image
parameter specifies the ACL Designer image resource to place at the front of the list item.
162 Chapter 15 ACL Designer ACL Functions
Example
ret = dlgitem_set_leaf_image_at(win, "Hierarchy", 3, "File")
sets the image for the third item in the outline list item Hierarchy to the File image.
dlgitem_set_refresh
ret = dlgitem_set_refresh(window, dlgitem, refreshstatus)
Activates or deactivates the automatic refresh for outline list dlgitem in window. Turning
off the refresh is good if you are executing a routine which would redraw the list several times
(e.g., fill the list, resort the list, etc.). If dlgitem does not refer to an outline list list tag,
$ERROR is set and zero (0) is returned. Otherwise, one (1) is returned.
The window parameter is a window identifier. The dlgitem parameter is an outline list name
(case sensitive). The refreshstatus parameter sets the refresh/no refresh status of the list
entry (1=refresh; 0=no-refresh).
Example
ret = dlgitem_set_refresh(win, "Filelist", 0)
deactivates automatic refresh for the outline list Filelist.
Index B
Background color 142
dialog item attribute 79
dialog items 79
drawing with Image Editor 121
Background colors 142
Symbols Basic resources 17
.vr extension 17 arrays 41
editing contents 45
Before you begin
on UNIX platforms 3
A Binary directories, adding to search path 7
Blend color palette option 126
ACL Designer 1
BMP image format 91
Dialog Editor 26
Border dialog item attribute 78
Dictionary Editor 24
Box dialog item 89
Main Window 24
Bring To Front/Bring Forward Commands 61
preferences 21
Button item 81
quitting 19
resource editors 25
starting 18
ACLDESHOME environment variable 14 C
Add Resource Types Dialog 47
Add Resource Types dialog 56, 80 Cancel
Adding color palette option 126
dialog items to dialogs 26 CD-ROM
elements to a dictionary array 42 extracting files from (UNIX) 5
elements to an array resource 42 installing from (PC) 11
resources to a dictionary or a Dialog Panel 48 CD-ROMsharing (PC) 9
resources to the New Menu 47 Chains
Additive primary colors 137 series of connections 66
ADEPT program icon Changing
creating on OS/2 13 connections 70, 73
ADEPTdirectory, creating 4 current directory 144, 147
AIX tabbing order for a dialog 62
extracting files on 5 Choosers 31
Alignment commands Add Resource Types dialog 47, 80
dialog items 61 Color Chooser 131
Alternate File Menus preference 19, 36 File Chooser 143
Applications Font Chooser 80, 129
user interfaces 15 Style Chooser 87
Arranging Class names 47
items in a dialog 60 Class-based composite resources 17
Array resource Classes
adding elements 42 searching 48
Arrays 17 Clear command 37
basic resources 41 Click-Focusable dialog item attribute 78
dictionary 42 Client/server installation (PC) 8
Automatic file saving preference 23 Close Editor command 34
CMY color model 104, 132, 137
Color Chooser 31, 131
163
164 Index
D Directories
displaying several 146
Darker color palette option 126 filtering 145
Default attributes 33 history list 144
Delete color palette option 126 marking 145
Dialog Editor 26, 51 sorting 145
opening 52 Disabled menu attribute 111
panels 52 Diskettes, installation 11
Dialog item creating 9
attributes 104 Display names 47
Dialog Item Panel 28, 76 Displaying
Dialog Items connections 73
placing in dialog fromItem Palette 56 connections for an item 67
Dialog items 75 dlgitem_set_active_at function 160
aligning in dialog 61 dlgitem_set_appdata_at function 160
attributes 78 dlgitem_set_branch_image_at function 161
button 81 dlgitem_set_extra_image_at function 161
chaining in dialog 74 dlgitem_set_leaf_image_at function 161
connections 65 dlgitem_set_refresh function 162
control 83 Documentation
default attributes 80 conventions 12
editing 57 Dragging and dropping colors 142
exclusive group 82 Drawing
label 81 line width 122
menu bar 89 setting colors 120
option menu 109 Dropper tool
repositioning 61 Image Editor 119
setting attributes 59 Duplicate command 37
sizing in the Dialog Panel 60
Dialog Panel 26, 51
Edit Menu 58
sizing dialog items 60 E
Dialogs
Edit Menu 36
arranging items 60
Dialog Panel 58
confirm 105
Editing
creating 55
color palettes 125
notice 107
dialog items 57
setting window attributes 53
panels 33
testing 64
resources 44
DIB image format 91
Editors
Dictionaries 17
color palette 125
viewing 43
Cursor Editor 127
Dictionary arrays 42
Image Editor 115
Dictionary editor 24, 39
Ellipse tool
customizing the view 48
Image Editor 119
Digital UNIX
Enable dialog item attribute 78
extracting files on 5
Environment variables
ACLDESHOME 14
LIBPATH 14
Eraser tool
Image Editor 119
Erasing 124
166 Index
Items N
aligning in dialog 61
button 81 Named colors 132, 140
chaining in dialog 74 Natural size struts 72
exclusive group 82 Natural-sized items 66
label 81 New color palette option 125
menu bar 89 Notice dialog 107
minimum spacing in dialog 66 Notice Panel 108
placing in containers 59 Numeric spinners 99
L O
Label item 81 Open File command 34
Lasso tool Opening
Image Editor 119 Dialog Editors 52
Lighter color palette option 126 existing resource files 20
Line item 98 files 143
Line tool Item Palette 55
Image Editor 119 resource files 20
Line width 122 Option menu dialog item 109
List dialog item 91 Order Items Panel 62
List Editor 92 OS/2
List Item Panel 93 ACLDESHOME environment variable 14
List View Panel 92 creating program icons 13
Login, for UNIX install 4 installing on 12, 13
LIBPATH environment variable 14
Outside connections 65
Overview of resource editors 33
M
Main Window 24
Marking directories 145 P
Menu attributes 111
Menu bar dialog item 89 Palettes
Menu Bar Editor 89 color 124
Menu Bar Panel 89 installing 127
Menu bars 109 Item 75
Menu dialog item attibute 79 modifying 125
Menu group 112 Tool Palette for Image Editor 119
Menu Item List 113 Panels
Menu items 109, 111 Dialog Item 76
Menu Panel 29, 110 Exclusive Group 82
Menus 109 resource editors 33
pop-up 109 Text View 86
testing 113 Panels Menu 38
Mnemonic Paste command 37
dialog item attribute 78 PBM image format 91
menu attribute 111, 112 Pencil tool
menu item attribute 112 Image Editor 119
Mounting, CD-ROM 5 Permissions, for UNIX install 4
Moving resources 47 PGM image format 91
Pick color palette option 126
168 Index
Text X
adding to images 122
Text Item Panel options 86 XBM image format 91
Text spinner 100
Text Spinner Panel 100
Text tool 119
Text View Panel 86
Text View Panel options 87
Title menu attribute 111
Title names 77
Titles 104
Tool Palette
Image Editor 119
Tools
drawing 120
Try Dialog command 65
Try Out Menu command 113
Trying out dialogs 65
Type-based composite resources 17
U
Undo command
resource editors 37
Undoing changes 124
User interfaces 15
Using Undo 124
V
View Menu commands 118
Viewing
dictionaries 43
images 123
Visible dialog item attribute 78
vobjectInheritance Dictionary 49
W
Warmer color palette option 126
Window attributes
setting for dialogs 53
Window Panel 53, 103, 109
attributes 105
Window resource 103
Windows
overview 103
170 Index