IconEditorDoc.Tioga
Last Edited by: Ken Pier, May 31, 1985 10:48:02 am PDT
Mike Spreitzer July 29, 1986 9:29:49 am PDT
THE CEDAR ICON EDITOR
THE CEDAR ICON EDITOR
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
Cedar Icon Editor
Release as: [Cedar]<Cedar6.0>Documentation>IconEditorDoc.Tioga

© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: The Icon Editor is a tool which enables users to create and modify icons and to register icons with the Cedar Icon Registry for use by all users. This document is a user's guide for the Icon Editor Tool in Cedar 6.
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
Introduction
The Icon Editor is a tool which enables users to create and modify icons and to register icons with the Cedar Icon Registry for use by all users. The commands in the Icon Editor menu are explained below.
Getting started
All the files necessary for running the icon editor may be retrieved using the [Cedar]<Cedar®>Top>IconEditor.DF file. Use the command

IconEditor

to get things started.
What each command does
Close, Grow <-->, Destroy, Reset, Save and Load operate in exactly the same way they do in a normal viewer.
RotateDisplay: This rotates the icons on display, including those icons which exist but are not visible on the screen. Currently the limit on icons which can be displayed on the screen is 20. But it is possible to have more than 20 icons in a file. Clicking the RotateDisplay button with the red/left mouse button will rotate the icons one at a time; clicking with any other mouse button will rotate the icons four at a time. Icons will rotate to the "right" if Shift is held down while clicking; without shift, icons will rotate to the "left".
DeleteIcon: This deletes the current icon. The current icon is the one which is displayed on the Drawing Board.
CreateIcon: This creates a new blank icon. If clicked with the left or middle mouse buttons, the new icon appears at the end of the list of icons; if clicked with the right mouse button, it is inserted before the current icon.
ShowLabel: Sketches the boundaries on the label area of the icon. A MessageWindow message is printed if the icon does not have a label.
CreateFilledIcon: This creates a new blank icon and then invokes the display bounding box utility. When the cursor turns to a bullseye, the user can sweep out an arbitrary rectangular area of the screen. The new icon will be filled with the upper left 64X64 square pixels of enclosed screen bitmap.
The following commands require that a rectangle be marked first. A rectangle can be marked by holding down the yellow mouse button and marking the diagonal of the rectangle.
ShiftUp, ShiftDn, ShiftLf, ShiftRt: Shifts (actually, rotates) the contents of the rectangle by one or four rows or columns in the desired direction. "Clicking" the Shift buttons with the red mouse button will shift the contents by one; "Clicking" the Shift buttons with the blue mouse button will shift the contents by 4. NOTE: if no rectangle has been marked, it is assumed that the entire icon will be shifted. WARNING: If your icon has a desk-top gray background, do not shift it by any other increment than 4, otherwise the gray pattern will be off.
Mirror: Achieves the effect of holding the marked rectangle to a mirror.
SetLabel: Stores the coordinates of the rectangle which has been marked as the label for the icon.
White, DeskTopGray, DarkGray, Black: fills in the marked rectangle with the selected color.
InvertColor: Simply inverts the black and white pixels in the marked rectangle.
The following command requires that a line be marked first. The mark a line, hold down the control key and the yellow mouse button and draw the desired line.
DrawLine: Uses a line drawing algorithm to draw the desired line.
The following commands are global commands.
UNDO: Undoes the following operations: ShiftUp, ShiftDn, ShiftLf, ShiftRt, Mirror, White, DeskTopGray, DarkGray, Black, InvertColor and DrawLine. UNDO only keeps track of one level of operations, so don't perform a series of operations and expect to get back to where you started from.
UnSetLabel: Removes the coordinates of the rectangle which had been marked as the label for the icon.
Register: Causes the icon to be registered with the Icon Registry using the name in the Icon Name window.
WhiteLabel: Sets a bit in the internal icon representation which tells the Viewers world to invert the text it paints on the icon when it labels the icon. This is useful when you have an icon which has a lot of black area and you wish to have the label painted in white on the black area..
BlackLabel: Resets a bit in the internal icon representation which tells the Viewers world to invert the text it paints on the icon when it labels the icon. This will result in black text in the label.
FetchIcon: This can be used to retrieve an icon from another icon file or to rearrange the order of the icons in the current file. Before using the Fetch Icon Button, a number must be typed into the Number window (Number[0-...]). The ordering of the icons is not always clear (i.e. - which number corresponds to the icon you want.) Immediately after loading, when the icons are displayed above the drawing board, the icon in the top left corner is #0 and the one to the right of it is #1. When the icons are displayed to the right of the drawing board, again the top left icon is #0, and the one to the right of it is again, #1.
If the FetchIcon button is pushed while depressing the Shift key, the bit array for the newly fetched icon is ORed into the current icon, without changing any of the other current icon parameters.
How to use the icons you have created:
Ah yes. When creating the container that you wish your icon to represent, set
container.icon ← IconRegistry.GetIcon[iconName: <name of registered icon>];
or
container.icon ← Icons.NewIconFromFile[<filename of file containing icons>, index];
Other useful features:
IconEditorDefs.BitMapToCurrentIcon[<ref to bitmap>] never did work, and this feature is now implemented via the CreateFilledIcon menu item. If you have a bitmap displayed anywhere on screen, you can place it directly into an icon using CreateFilledIcon.