Logo2
Logo
bigstockphoto_Businesswoman_Sit_With_Noteboo_227734
 

The Opus Editors

Directory Opus provides a number of specialist editors and
requesters to allow you to customise various objects such as
buttons, Toolbars, menus etc. With Opus 5.5, these have been
completely revised and many features have been added. Drag and
drop support has been extended and more clipboard support has
been added. Most of the editors now have extra menus to add
some of the extra but less used functions.
The Function Editor
At the heart of Opus lies the power to configure your own
commands or functions. An internal command or function tells
Opus what to do when an event happens, such as a mouse click.
Functions can be attached to any of the custom buttons, toolbar
buttons, Filetype actions, menus, Hotkeys and Scripts. Each of
these has its own configuration requester with unique aspects, for
example, the title and colours used on a custom button.
The unique aspects of the various editors are described in turn in
the following sections, but they all have a common portion,
referred to as the Function Editor, which allows you to edit the
Function attached to the specific object, button, menu and so on.
When in doubt, try drag and drop within Function Editors; either
to swap function lines around within the one editor or to copy
function lines to another editor. If you hold down shift while you
drag a function line from one editor to another, the entire function
will be copied.
At the top of display is the Function List which shows the
commands associated with this function. Beneath this list is a
cycle button so you can select the function type and below this are
buttons to allow you to modify the order and effectiveness of these
commands.
Add: Adds a new Command to the end list.
Insert: Inserts a new Command at the highlight.
Delete: Deletes the highlighted line from the list.
To edit a line in the function list, simply click on it. The Command
string will be copied to the field below the list for you to edit it.

Function Editor Menus
For Opus 5.5, a new set of menus provide extended clipboard
support allowing you to Cut, Copy and Paste to and from the
clipboard plus export the command lines as ASCII to a file.
Edit Fields
Below the Command list is a group of editing tools. These tools
allow you to edit active Function entries. When you click on an
entry in the Command List it becomes active, or an empty one is
created when you select Add or Insert.
Command Type
The cycle button immediately beneath the function list allows you
to specify which kind of Function is to be used. When you click on
this button, it will cycle through the following types:-
Command AmigaDOS Workbench
Script ARexx
Each of these functions is described below.
When you click on the small folder button just to the right of the
Command Type button, a requester appears allowing you to pick
an appropriate entry for the selected function type. Each of the
following descriptions indicates the kind of requester which will
appear.
Command: These are internal commands, built into Directory
Opus. Many of these Commands can take parameters from
buttons and menus as well as from ARexx. Internal
Commands are documented in the Chapter Eight. The folder
button brings up a list of internal commands.
AmigaDOS: Represents normal AmigaDOS programs. Such
executables are launched as if you were running them
manually from the CLI. Thus, with an output window
enabled, they can receive keyboard input from the user and
display output on the screen. The folder button brings up a file
requester from which you may select the full command path to
the application program.
Workbench: Workbench programs are also executable
programs. However, they are launched as if you were doubleclicking
on their icons from Workbench. This can be an
advantage, since many programs do not take arguments, or do
not work at all if run from the CLI.
If the selected Workbench program is a tool (i.e., an executable
program), Opus will look for its icon file to determine the
necessary stack size to give to the program. If the icon cannot
be located, Opus 5 will use a default stack size.
If the selected Workbench program is a project (a nonexecutable
file created by another program), Opus will look for
its icon file to find its Default Tool, the actual program needed
to load the file. If the icon cannot be found, or a Default Tool
can not be loaded successfully, Directory Opus will not launch
the file. The project's icon is also used to determine stack size.
Workbench programs can also take arguments from Opus
using the {f} and similar sequences. This can be very useful.
DeluxePaint, for instance, does not accept arguments if run
from the CLI; therefore you would be unable to select a picture
file for DeluxePaint to load from Opus if you were running it
as an executable.
If, however, you have the command defined as:
DPaint {f}
and have the Command type set to 'Workbench', DeluxePaint
will be run as a Workbench program. From the Workbench,
DeluxePaint will accept arguments, so the first file you selected
would be loaded into DPaint automatically. The folder button
brings up a file requester.
Script: Script files, also called batch files, are files that you
might run with the Run command, or with the DOS Execute
command from the CLI. Selecting a Function type as Script
will cause the file to be executed as a script file. The folder
button brings up a file requester which is initially set to S:
because this is where script files usually reside by default.
ARexx: This type indicates that the Function is an ARexx
script. The script will only be launched if ARexx is active in the
system. The folder button brings up a file requester which
initially shows the DOpus5:Arexx directory where most ARexx
examples for Opus should be stored.
+  The address of the ARexx port is NOT set
automatically. Scripts should use the ARexx ADDRESS
instruction to address the command correctly to Directory
Opus.
{ }
This button is located next to the Function Edit Field. For all but
internal commands, it displays a list of the arguments variables
with a brief description of each variable. Function strings can
contain many different command sequences to do different things
with files and directories. The definition of each of these variables
is discussed in detail below on page 163.
For internal commands, this button displays the template or
options for this command. For example, for the Play command
you would see a list with 'NAME' and 'QUIET/S'. For details of
the different command templates, please refer to the specific
command in the Chapter Eight.
Flags
Below the Command list is the Flags list. This is a list of all the
flags available for custom Commands. These flags apply to all
Commands in the Command list.
+ If the optional command arguments, such as {s!} etc, are used,
setting some flags may cause the command to fail. See Special
Arguments below.
The flags are:-
CD destination: If this is turned on, the current directory of
the custom function will be set to the current DEST directory.
CD source: If this is turned on, the current directory of the
custom function will be sent to the current SRCE directory.
Do all files: This causes the function to act on each selected
entry in turn, instead of just the first entry. It is used for
commands which do not support multiple filenames on the
command line, where {F} to send all selected entries, would not
work.
No file quote: This option enables Directory Opus to operate
correctly with some older or poorly written software.
Normally, whenever Opus sends a filename to a custom
Command with the flags such as {f}, {o}, etc., the filename is
enclosed in quotation marks. This allows you to use filenames
containing spaces with external programs. However, some
software does not interpret the quotation marks correctly. If
you find this is the case with any program, simply select the No
file quote flag.
Output to reader: Redirects all output from the function to a
temporary file in T: directory, which is then read via the Opus
text reader. This allows you to read the output of a program
thoroughly, and even to print it. Note that if you are sending
output to a file, the function cannot receive input from the
keyboard.
Output to window: Opens a window for output from these
function commands. The window will open on the Opus
screen with the size and position as set from the Environment /
Output Window settings.
Recursive dirs: Allows the function access to files within
subdirectories. Normally used whenever a {f} or {F} or similar
sequence would result in the name of a directory being
included in the same way as a file. In other words, the function
would not act recursively on all files within the directory.
If this option is enabled, the names of all files within that
directory, and within subdirectories within the directory, and
so on, are included in the program's parameters. This allows
the function to act on all files in the directory and not just on
the directory itself.
Reload each file: Causes Opus to rescan a file after it has been
acted upon by a function, and updates the size, datestamp,
comment and protection bits of the file. You can therefore
reflect changes in size, for instance, made by a text editor to a
file.
Rescan dest: This flag makes Opus reload the destination
directory when the function terminates. This, and the option
below, allows Opus to display correctly any changes made to
either directory window by external programs, such as
archivers.
Rescan source: Makes Opus reload the source directory when
the function terminates.
Run asynchronously: Indicates that the functions are to be
launched as a new process, and Directory Opus is not to wait
for it to return.
Window close button: Tells Opus to wait until you click on the
output window close button before closing any output
window.
Window on Workbench: Tells Opus to open an output
window (if one is required) on the Workbench screen (actually
the default Public screen), instead of on the Opus custom
screen. If the Opus screen has been set to be the Default
Pubscreen, this setting becomes irrelevant.
Key
Allows you to set a shortcut or hot key sequence to activate this
function. Pressing the shortcut key will act exactly as if you
selected this function from a button, menu or with other action.
You may use any combination of Shift, Alt, Ctrl, or Amiga qualifiers
plus any key. With Opus 5.5, key sequences are automatically
recognised. Just press the key combination, for example 'left shift
+ left Amiga + A' and Opus will insert the correct commands for
'lshift lcommand a'.
If for some reason you wish to enter your own key sequence, lock
the Caps Lock key down first, then enter the desired command
string. If you wish to delete a previously entered hot key, you will
need to depress the Caps Lock key to enter string mode first then
delete the entry for the key.

Argument Variables {}

AmigaDOS, ARexx and other external commands launched from
Directory Opus 5 support control sequences to insert special
information in the command line. These control sequences are in
the form of codes enclosed within braces. These codes can appear
anywhere in the command line, and will be replaced with the
appropriate information when the command is executed. If the
codes cannot be parsed correctly, Opus may refuse to execute the
command. The variable names are case sensitive.
The variables are as follows:-
{f} First selected entry (with path)
Insert the path and filename of the first selected entry. The
entry will then be deselected. If you specify a minus sign (-)
after the letter "f", the filename will be stripped of any suffix it
has. For example,
AmigaDOS Rename {fu} {f-}.lzx
would replace any suffix the selected file had with a .lzx suffix.
That is, "ram:test.lha" would become "ram:test.lzx".
{fu} First entry (with path, do not deselect)
The same as {f} except that the entry is not deselected after its
name is used. This allows you to use the same filename more
than once in a command invocation. The {fu} command may
be used multiple times, and should be followed by a {f} to
signify that you are done with this file. This command also
supports a minus ('-') sign to strip any filename suffix.
{F} All selected entries (with paths)
Insert the path and filenames of all selected entries. The entries
will then be deselected.
There is a nominal limit of 512 characters for each command
line. Therefore, if the length of a command exceeds 512
characters because of a {F} sequence (or indeed for any reason),
another command line will be created for the next group of
entries, and so on until there are no remaining selected files.
{o} First selected entry (name only)
The same as {f} except that only the filename is used, not the
complete pathname. This command also supports a minus ('-')
sign to strip any filename suffix.
{ou} First entry (name only, do not deselect)
The same as {fu} except that only the names of the selected
entry is used, not the complete pathname. It is quite ok to
intermix {fu} and {ou}, and follow with a {f} or a {o}. This
command also supports a minus ('-') sign to strip any filename
suffix.
{O} All selected entries (names only)
The same as {F} except that only the names of the selected
entries are used, not the complete pathnames.
{d} Destination directory window's path
This will insert the path of the destination directory window.
Only one destination is supported and any locked destinations
are ignored.
{s} Source directory window's path
This will insert the path of the source directory window. Only
one source is supported and any locked sources will be ignored.
{v} Environment variable
This will insert the value of a global environment variable in
the command line. The format of this command is
{v<varname>}, where <varname> is the name of the
environment variable to insert. For example:-
AmigaDos echo Using Kickstart {vKickstart}
{Rd} Directory requester
{Rf} File requester
{RF} File requester in save mode
These three commands allow you to access the Amiga file
requester from a function to accept the name of a directory or
full path for a filename as required.
{Qa} Query argument
This allows you to access an argument string from selected
functions.
For Disk inserted and Disk removed scripts, you could have the
following function for the Disk inserted script :
Command Confirm Disk inserted in {Qa}. Read it?
Command Scandir new {Qa}
Opus knows about CrossDOS, and so will return PCx: instead
of DFx: if an MS-Dos disk is inserted. For disk removed, DFx:
is always returned. Only diskchange on the four floppy drives
is supported. For Bad disk inserted scripts when you insert a
non-DOS (and non-MSDOS if CrossDos is running) disk in any
floppy, you might want a function such as :
Command Confirm Non-DOS disk inserted in {Qa}. Format?
Command Format {Qa}
The lister handle of a newly opened lister or the name of a
button bank or group is available to script functions in {Qa}.
{Qd} Query destination lister
This will insert the handle of the destination lister.
{Ql} Query source lister
This will insert the handle of the source lister.
{Qs} Query screen name
This will insert the name of the public screen Opus 5 is
currently open on. This will usually be DOPUS.1, but it may be
DOPUS.2, Workbench, or indeed any other public screen you
have configured Opus to open on. Use this to make external
programs open their window on the Opus screen (without
having to turn on the Default PubScreen option). For example:-
AmigaDOS sys:tools/calculator pubscreen={Qs}
{Qp} Query port name
This will insert the name of the Opus 5 ARexx port. This will
usually be DOPUS.1, but may be DOPUS.2, DOPUS.3, etc,
depending on the number of copies of Opus you have running
at once. Note that while the ARexx port name may be the same
as the public screen name, it is quite possible for them to be
different. You will want to use this command whenever you
launch ARexx scripts, to pass the script the name of the port it
must communicate with. For example:-
ARexx DOpus5:arexx/myscript.dopus5 {Qp}
{Rs} Request String
This will display a requester to the user asking for text input.
The complete format of this command is {Rs<title>:<default>}.
<title> is the optional title of the requester, and <default> is the
optional default string to display. Either of these can be
omitted (if you specify <default> you must precede it with a
colon).
The <default> string can contain control sequences of its own.
These are:-
[o] inserts the last filename used by a {f}, {o}, etc
[f] inserts the last used filename, including the full path
[s] inserts the source directory window's path
[d] inserts the destination directory window's path
For example, it would be possible to have your own custom
rename button with the following function:-
AmigaDOS Rename {f} {RsEnter new filename:[o]}
In this case a string requester would open with the title "Enter
new filename" and the default value of the string field would
be the original name of the file.

Optional Arguments
Option arguments are a new feature of Opus 5.5 which allow
variable argument to fail gracefully if there are no selected files
and/or no SRCE or DEST arguments.
With normal arguments, if the arguments cannot be parsed
correctly the command will fail and Opus will not execute the
command script at all. This is done for safety. It can be very
dangerous if you have used destructive commands, such as Delete,
and have incorrectly given the command the wrong arguments.
However, there are many cases when you may wish to call an
AmigaDos program with or without arguments. With Opus 5.5
we have added a special exclamation mark qualifier. If this
follows the argument variable then the argument will be treated as
optional and the command will be executed even if the variable
parsing fails. These argument variables are
{s!} - uses source path if present, but doesn't require it
{d!} - same for destination
{f!} - first file if present, but not required
{o!}
{F!} - etc...
Example 1: A button to run DPaint with a filename if one is
selected, or without a filename if not..
Workbench Apps:Gfx/DPaint {f!}
Using the old {f} command, the function would only be launched if
there was a selected file.
Example 2: To call CygnusED with or without a file selected, use
AmigaDOS ED {f!}
+ Note that if these optional arguments are used, it is sill possible for
the command parsing to fail because of an incorrectly set flag. With
Example 2, if you had set the 'CD Source' flag and did not have a valid
SRCE Lister, the command would fail before Opus even looked at the
argument variable.

A Simple Example
The following is an example of a relatively simple function. It is
the function from the default configuration that allows you to
create LHA archives. The {Rs} sequence opens a requester asking
the user to enter the name of the archive to create. The {d}
sequence in front of this causes the path of the destination to be
prepended to the requested filename. The final {O} causes the
filenames of all selected files to be added to the list for archiving.
Because the CD source flag is turned on, {O} can be used instead
of {F} (since full pathnames are not required). This allows more
filenames to be added per line (remember the maximum line
length of 512 characters), and will result in the LHA program
having to be invoked fewer times.
Function definition:
AmigaDOS lha -e -x a {d}{RsEnter archive name} {O}
Flags turned on are:-
CD source, Output to window, Recursive dirs,
Run asynchronously
An example output of this command:-
cd "work:"
lha -e -x a "ram:test.lha" "file1.c" "file2.c" "foo/file3.c"
A Complex Example
The following is an example of a complex function. It
demonstrates the power and flexibility that the argument
parameter codes make available to you.
This function will automatically convert any selected LHA
archives into LZX archives. The .LHA suffix is removed
automatically from the filename and replaced with a .LZX suffix.
The original LHA archive is first extracted into a temporary
directory in T:. It is then re-archived using LZX. The original
LHA archive and the extracted files in the T: directory are then
deleted. All selected LHA archives are processed in turn, due to
the Do all files flag being turned on. At the end of the process, the
source directory is rescanned automatically (the Rescan source
flag).
Of course, you need to have both the LHA and LZX programs in
your path for this function to work.
Function definition :
AmigaDOS makedir t:lzxtemp
AmigaDOS lha -x -M x {fu} t:lzxtemp/
AmigaDOS cd t:lzxtemp
AmigaDOS lzx -e -x -r a {fu-}.lzx #?
AmigaDOS delete {f} quiet force
AmigaDOS cd ram:
AmigaDOS delete t:lzxtemp all quiet force
Flags turned on :
Do all files, Output to window, Rescan source
An example output of this command :
makedir t:lzxtemp
lha -x -M x "dload:foobarbaz.lha" t:lzxtemp/
cd t:lzxtemp
lzx -e -x -r a "dload:foobarbaz.lzx" #?
delete "dload:foobarbaz.lha" quiet force
cd ram:
delete t:lzxtemp all quiet force

The Button Editor
The button editor is displayed whenever you wish to edit a
button in a custom Button Bank or in a ToolBar. From the Button
Bank editor, either double-click the desired button, or highlight it
and select 'Edit' to display the Button Editor.
The Button Editor allows you to change the following features of
a button:-
Functions: The listview gadget gives you the choice of setting
a function to be activated by the Left, Right or Middle mouse
buttons and, for button banks, additional pop-up menu items.
Any function which is actually defined will have a check mark
displayed next to it.
Add: For button banks only, you may add any number of
additional pop-up menu items to any button. These functions
will initially be named’new function’ , but you should give
them a meaningful name which will appear in the pop-up
menu.
Del: For the left, right, and middle mouse button functions,
this will delete the function and related items from this entry.
For pop-up menu entries in button banks, the entry itself will
also be deleted from the listview.
+ You can use drag and drop to rearrange the entries in the
listview, and even to copy an entry to another Button Editor,
Menu Editor, or Function Editor.
Name: When editing a custom button, enter the name you
wish to appear for the button. The name you choose for the
left mouse button will be the initially displayed name on the
button, but you may also set different names for each mouse
action as well as for each pop-up selection.
Image: When editing a graphical button bank or the Lister
Toolbar, you select the file which contains the image for the
button. Clicking on the list button, immediately to the left of
the word Image, will display a file requester. Select either the
name of an IFF brush file or an icon file (.info file) and Opus
will load the image and use it for the selected button. Alternate
select images for graphical buttons are nowsupported. That is,
if you are using an icon for a button image, the selected
imagery of the icon will be shown when you click on the
button. For IFF images, you can supply an AnimBrush, the
second frame of which will be used for the selected imagery. If
the name of a file used as a button image ends in '.noremap',
that image will not be colour re-mapped. Image buttons
inherit their image from the left button function if they don't
have an image explicitly defined. If the image specified for a
button is not found, a default image will be used.
+ Hint: You should attempt to keep the images used for each
button or toolbar image at approximately the same size. Opus
will calculate the size of each button from the largest image.
Label: When editing a text button, this is the text that you
will see printed on the button. The Label and Name fields will
usually be the same. In fact, if you fill out one of these fields
when the other is empty, the text will appear in both fields
automatically.
Edit Function: Selecting this button displays the Function
Editor so you may add, change or delete the command
function you wish to use with this button. See the Function
Editor on page 157 for more details.
Palette: For button banks only, this displays a colour
requester where you may set the colours for your buttons.
The number of colours displayed in the colour requester will
be determined by the depth of the screen you have chosen for
Opus and the number of User colours you have defined in the
Environment.
For text buttons, you may select a different foreground
colour (the one used for the text) and background colour
(the base colour of the button) for each mouse button type.
For image buttons, you may select the background colour
only. The foreground colours come from the image and
may only be changed by editing the image itself.
For Toolbar buttons, neither the foreground nor
background colours may be set.
Button: This area shows you the image or label of the selected
function. You can drop an IFF brush file or an icon file here to
add an image to the function if you are editing a graphic
button. You can also copy the whole button by dragging this
image or label onto another button, button editor, menu editor
etc.
Use: Accept any changes you have made to this button
Cancel: Cancel any changes you made to this button.

The Menu Editor
The Menu Editor is invoked when you wish to edit the Lister
Menu or the global User Menus.
The three lists represent the various levels for the menus, the
menu items, and the sub-items respectively. Only one Lister Menu
is allowed, but you may define any number of User Menus that
will fit on your screen. Beneath each list there are a series of
buttons:-
Add: Adds a blank menu item at the end of the list. If you
hold down SHIFT when pressing Add, the new item will be
added at the current position instead of at the end of the list.
Copy: Creates a new entry identical to the highlighted item
and adds it to the end of the list. If you hold down SHIFT
when pressing Copy, the new item will be added at the current
position instead of at the end of the list.
Del: Removes the highlighted item from the list and moves
the remaining items up one place.
Edit: Displays the Function Editor and allows you to edit the
functions attached to this menu item.
Up: Moves the highlighted item up one place.
Down: Moves the highlighted item down one place.
+ To edit any entry quickly, just double-click on it.
As well as these buttons, there are some extra controls for the
menu editor:-
Drag & drop moves the item.
Drag & drop with shift held down copies the item.
Tab/Shift Tab to change to the next/previous active list as
indicated by a dotted rectangle.
Cursor up/down to change selection in active list.
SHIFT + Cursor up/down to move the selected item up or
down.
Return to edit the selected item in the active list.
+ to add an item to the current listview.
DEL to delete current item from the listview.
+ Drag and drop is very powerful in the menu editor. You can
use it to rearrange items in each list, to copy an item from one
list to another, to copy an item to a different Menu Editor, or
even to different editors such as the Button, Hotkey, Script, and
Function Editors.

Adding Menu Separators
When creating menus, it is often a good idea to visually separate
the menus into groups of related items. This makes reading a
menu list much easier. Traditionally in the Amiga, we use a
special flag called NM_BARLABEL to tell the Amiga OS to put in
a special separator bar. If you wish to add these separators to
your custom menus, simply put in a row of minus signs,
minimum of three such as '---', and Directory Opus will interpret
this as an instruction to place a separator at this position in the
menu list.

Menu Hot Keys
If you have a hot key set for any User Menu item of rcommand
plus key, or rcommand plus shift plus key, the hot key will be
displayed in the menu using the standard amiga menu symbol.
Note that letters can only be uppercase, and the case is actually
ignored when you press the key. This is an Amiga OS limitation,
not Opus.

The Menu Editor Menus
Just as with the other editors in Opus 5, there are extra options
provided by menus. These are:-
The Project Menu
New: Creates a new blank menu list.
Open: Displays a file requester allowing you to select and
load a new set of menus.
When first run, Opus uses a default filename for both the
Lister Menu and the User Menus. Once you load a new set of
menus using a different name, this new name will be kept and
used internally as the reference to that set of menus. If you
subsequently save the particular set of menus, it will be saved
under this name unless you use the SaveAS option. If you
save the Environment, this 'new' filename will be stored.
Save: Saves the displayed set of menus to disk under the
current name.
SaveAs: Saves the current set of menus but allows you to
select a new filename.
Quit: Same as Cancel above.
The Edit Menu
Reset to Default: Attempts to reset the particular set of
menus to the default set as defined when you installed
Directory Opus 5. Because there are many settings, these
defaults are not actually built-in to Opus 5, instead Opus will
look for and load special default files. For correct operation of
Opus, you should never overwrite any files in the Buttons
drawer with the name ending in '_default'. Otherwise you
will have to reinstall Opus to recover the default settings.
Last Saved: Reloads the last saved set of menus and resets the
display.
Restore: Restores the displayed menus to the state when you
first opened the Menu Editor.

The Button Bank Editor
Directory Opus 5 allows you to create any number of custom
Button Banks and Lister Toolbars containing your favourite
commands. You create and edit these custom buttons from the
Button Bank Editor.
The Button Bank editor will appear automatically when you create
a new button bank via the Buttons/New menu item. To edit an
existing button bank, select it, then choose the Buttons/Edit menu
item, or choose Edit from the button bank's pop-up menu. You can
also edit a button directly by holding down the Alt key and
clicking on the button.
The current Lister Toolbar can be edited via the Listers/Edit Lister
Toolbar menu item, or by holding down the Alt key and clicking
the Toolbar button. With Opus 5.5, Toolbars are now edited with
the normal Button Bank Editor as with normal buttons, but with
one or two restrictions as discussed below.
From this editor you can edit any button in any button bank on the
screen. Although it is not generally a good idea, you can even edit
multiple buttons at once. But this can be useful when you wish to
compare the function commands you have assigned to different
buttons.
A button bank is defined as either text or graphical buttons
arranged in a series of rows or columns. Once you have created a
bank, you may resize the window to display as many of the
buttons as you wish. For text buttons, the button bank window
can be resized to any horizontal width and Opus will stretch the
button width to fit the available columns. The vertical size is
restricted by the height of the chosen font.
When using Graphical (or image) buttons, the horizontal and
vertical size of the bank is limited by the sizes of the button images
themselves.
When the Button Bank Editor is displayed, select the bank of
buttons you wish to edit and the editor will display the details of
that bank. Selecting a specific button will cause the button to flash
to indicate the row, column and button being edited. A doubleclicking
on a button will invoke the Button Editor directly.
The Button Bank Editor is divided into three sections: Bank,
Button, and Appearance.
The options presented in the bank section allow you to control the
shape and font of the button bank as follows:-
Add: Adds another blank row or column to the selected button
bank. New columns are added to the right-hand side of the
current bank while new rows are added the bottom. When you
add rows or columns, you may need to resize the window to
reveal them.
Insert: Inserts a new blank row or column at the highlighted
position.
Delete: Deletes the row or column underneath the highlighted
button. Care! This will delete the complete row or column and
all the details attached to the buttons therein.
Xform: A very special button! This function allows you to
convert rows into columns and vice versa, while attempting to
preserve the total number of buttons in the bank. It uses a
simple integer method to swap buttons between rows and
columns.
Font: Select the font and size to be used for the text in all
buttons in the selected text button bank.
The Button section of the editor provides editing and clipboard
operations.
Edit: Displays the Button Editor allowing you to set the
command functions, colours and other parameters for the
selected button.
Copy: Copies the highlighted button to the Button Clipboard.
Cut: Deletes the highlighted button from the bank and places
it in the Button Clipboard for later reference.
Erase: Deletes the highlighted button from the button bank.
The button is discarded and not stored in the clipboard as with
the Cut action.
Paint Mode: A toggle switch which provides a quick method
of setting the foreground (text buttons only) and background
colours of buttons directly rather than through the button
editor itself. When selected, a palette selector is displayed.
Select the desired foreground or background colours and then
click on a given button to change the colour directly.
Show Clipboard: Toggles the clipboard window on and off.
The clipboard is always present and can be used via the above
buttons, this switch merely provides a drag and drop interface
to the clipboard.
When enabled, the clipboard is a small window with a
scrolling button area. This is a temporary scratch pad for use
while editing buttons. You may copy (or drag and drop)
buttons to and from this temporary area.
Clear: This button on the clipboard is used to clear the
clipboard of all temporary button definitions.
The Appearance section provides several new options for Opus 5.5
to allow you to customise the look and feel of each button bank.
Full Border: With this flag turned on, the button bank will use
a normal window with close, zoom, depth, iconify, sizing, and
scrolling gadgets. When turned off, the button bank uses a
compact, streamlined window with only a thin dragbar. The
horizontal drag bar on these button banks is size-adjusted for
the current screen mode, so it is half the height on a lo-res
screen. This drag bar can also be used to bring the window to
the front, by double-clicking on it. If you want to access the
button banks' pop-up menu, you must have the pointer over
this dragbar when you press the right mouse button. The only
drawback with the new-look button banks is that since they
have no scroll-bars, you cannot have more buttons than will fit
on the screen.
Dragbar Orientation: With the Full Border option turned off
you may set the dragbar to be a narrow horizontal bar at the
top of the button bank, or a narrow vertical bar on the left side
of the button bank. You can also set this to automatic, in which
case Opus will determine whether a horizontal or vertical
dragbar would be more compact.
Borderless Buttons: When you turn this option on, the button
bank will be made more compact by removing the borders
between each row and column of buttons. This may be
particularly useful if you wish to use custom button images
that have borders already drawn into them.
SimpleRefresh: This option changes the method used by
Opus to refresh the button bank imagery if it has been
damaged. Normally this is left up the Amiga graphics system.
With SimpleRefresh, Opus will perform the refresh directly.
SimpleRefresh uses less memory but may be slower depending
on your system.
No 'Dog ears': Enable this option if you wish to suppress the
'dog ears' which are normally used to indicate that a button
has extra functions attached to it for the right or middle mouse
buttons, or for extra pop-up menu items.

Moving a Button Bank
Normally, to move a button bank to a new position on the screen,
you simply use the window drag bar gadget in the Window title
area. However, because this area also contains the close window,
zoom, window depth, and iconify gadgets, it is possible to create a
button bank (especially if using small graphic imagery for the
buttons) that is too narrow to permit access to all the title bar
gadgets, especially the drag bar. For such cases, we have also
added a window drag gadget on the very left-hand edge of each
button bank. If you click and hold the left border, you will be able
to drag the bank to the new position.

Editing the Lister ToolBar
As you have seen by now, the Opus 5 Listers may have an optional
toolbar showing a series of small icons. Each of these icon images
is actually a standard Opus 5 action button for which you may
define separate actions for left, middle and right mouse clicks.
Since toolbars are just versions of Opus button banks, with Opus
5.5 the toolbars are edited with the standard Button Editor.
The Directory Opus 5 installation comes with a few sample
toolbars for you to choose from but you can readily edit both the
images and the actions as you desire. By default, Opus 5 will load
the file 'Buttons/ToolBar'. But, you may define your own toolbar if
you desire. It is also possible to set a different toolbar in each
Lister if desired. (See the SET command.)
The sample toolbar which is supplied with Opus 5 is shown above
with the associated functions attached to left and right mouse
clicks respectively. You may easily edit these to your own
requirements or create a complete new Toolbar of your own.

Editing the ToolBar
To edit the ToolBar, select 'Lister/Edit Lister Toolbar' from the global
menu or hold down the Alt key and click on a specific icon in the
toolbar. The later action will allow you to edit a specific button
immediately. This will display the Button Editor but provide some
extra menus for the ToolBar. These are:-
The Project Menu
New: Creates a new blank toolbar.
Open: Displays a file requester allowing you to select and load
a different toolbar configuration.
When first run, Opus uses a default file name for the lister
toolbar. However, once you load a toolbar under a different
name, this new name will be kept and used internally as the
reference to the current toolbar. If you subsequently save the
toolbar, it will be saved under this name unless you use the
SaveAS option to change it. If you save the Environment, this
'new' filename will be stored and used next time you load
Directory Opus.
Save: Saves the current toolbar to disk using the current
filename.
SaveAs: Saves the current toolbar but allows you to select a
new filename.
Quit: Same as Cancel above.
The Edit Menu
Reset to Default: Attempts to reset the toolbar to the default
set as defined when you installed Directory Opus 5. Because
there are many settings, these defaults are not actually built-in
to Opus 5, instead Opus will look for and load a file called
'Buttons/Toolbar_Default'. It will also reload the image files
defined therein. For correct operation of Opus, you should
never save over this default file. Otherwise you will have to
reinstall Opus to recover the default settings.
Last Saved: Reloads the last saved set of toolbar buttons and
resets the display.
Restore: Restores the buttons to the state when you first opened
the Lister ToolBar Editor.