\begindata{text,539031256}
\textdsversion{12}
\template{help}
\define{global
}
\define{footnote

attr:[Flags OverBar Int Set]
attr:[FontSize PreviousFontSize Point -2]}
\chapter{Figure: a Drawing Editor

}
\section{What Figure is

}
\leftindent{Figure is a program for creating and viewing drawings.  A Figure 
document is a field on which you can place lines, circles, boxes, and other 
insets, and then move them around, reshape them, etc. (That is, Figure is the 
same sort of program as MacDraw, xfig, idraw, etc. For a painting program 
(like MacPaint, dxpaint, etc) in ATK, see \italic{\helptopic{raster}}.)

You can use Figure as a stand-alone program or you can include Figure insets 
in text documents or tables.   For more information on creating and editing 
Figure as an inset, see the  \italic{\helptopic{insets}}  help document.   

}
\section{Starting Figure

}\leftindent{
\subsection{Starting Figure in its own window.}  To start Figure as a 
stand-alone program in its own window, type 


\leftindent{\bold{ez}  \italic{filename.\bold{fi}}}


at the Typescript prompt, and press Enter.  Using the \bold{.}\italic{fi} 
extension automatically tells EZ to create a Figure document. }


\leftindent{You can also type 


\leftindent{\bold{figure} \italic{filename.\bold{fi}}}


and press Enter to get a Figure window.}


\leftindent{If you type \bold{figure} without specifying a filename, the 
Figure program prompts you on the message line for a filename; you cannot 
begin editing until you provide one. The filename you enter should have a 
 \italic{.fi} extension.}


\leftindent{\subsection{Starting Figure as a inset.}  You can create a figure 
drawing as an inset in an EZ text document by moving to the desired location 
for the drawing, typing Esc-Tab and specifying "figure" at the "Data object to 
insert here:" prompt. 


To create a Figure drawing as an inset in a table, select a cell and then 
either type Esc-Tab or choose \bold{Imbed} from Table's \italic{Cells} menu 
card.  Type "figure" at the "Data object to enter here:" prompt.  (See the 
 \italic{\helptopic{insets} }and\italic{ \helptopic{table} }help documents for 
details about adding insets.)  

}
\section{Browsing a Figure document}

\leftindent{
When you first open a Figure document, you are in "browse mode". In this mode 
you can scroll around in the document, and zoom in and out; however, you 
cannot add or change objects in it. 

If you are browsing a document you just created, it will be empty. Browsing an 
empty document, as you might expect, is less than exciting. See the section 
"Editing a Figure Document" if you want to start adding and changing things.


\subsection{Panning and scrolling}


In browse mode, you can "pan" around the document using the mouse. Press the 
left or right mouse button; panning crosshairs will appear at the mouse 
position. Then drag the mouse to another location, and release the mouse 
button. The document will shift position, as if you had grabbed it at the 
first location and slid it sideways to the second location.


You can also use the scroll bars to pan around the document. See the 
\italic{\helptopic{scrolling}} help document.


The "Pan to Origin" menu option, on the \italic{Figure} menu card, will return 
the document to its standard position in the window. This is how the document 
appears when it is loaded, and when it is printed out.


\subsection{Zooming}


The "Zoom In" and "Zoom Out" menu options, on the \italic{Figure} menu card, 
can be used to change the size that the document appears in the window. You 
can also type Escape-Z to zoom in, or Escape-z to zoom out. (That's an 
upper-case and lower-case Z, respectively.)


The "Normal Size" menu option, on the \italic{Figure} menu card, will return 
the document to its standard size. This is how the document appears when it is 
loaded, and when it is printed out.


\subsection{Editing insets}


Browse mode is also used for editing the contents of insets placed in the 
document. (This is not a particularly good place to put this function, but 
nowhere else is really any better.) See the section on "Insets" in the "Using 
Tools and Creating Objects" section of this document.


}
\section{Editing a Figure document: the Toolset Window}

\leftindent{
The first thing you must do if you want to edit a Figure document is to call 
up the toolset. To do this, select "Toolset" on the \italic{Figure} menu card. 
Lo! You now have a large window full of editing tools. Use the "Remove 
Toolset" menu option to get rid of it; the toolset will disappear and you will 
be returned to browse mode.


Let us take a closer look at the toolset. \smaller{\smaller{(Oh, let's!)}}


The toolset window is divided into several panels: Tools, Commands, Grid Snap, 
Shades, Colors, Line Width, Round Corner, and four Font panels.


\subsection{Tools}

This panel lists the various Figure editing tools, and displays which one is 
active. Notice that, since you are still in Browse mode, the "Browse" tool is 
highlighted. Click on different tools to activate them. 

See the "Using Tools and Creating Objects" section of this document to see 
what they do.


\subsection{Commands}

This panel shows various commands.


\leftindent{\paragraph{Select all}: Select every object in the document. (See 
"Select" in the "Using Tools and Creating Objects" section of this document.)


\paragraph{Zoom in, Zoom out, Normal size}: These are the same as the zooming 
menu options in the Figure menu cards. See "Zooming" in the previous section 
of this document.


\paragraph{Pan to origin}: This is the same as the "Pan to Origin" option in 
the Figure menu cards. See "Panning and Scrolling" in the previous section of 
this document.


\paragraph{Refresh}: Redraw the document window, in case it's gotten trashed 
somehow. You can also do this by hitting control-L in the document window.


\paragraph{Group selection}: Create a group containing all selected objects. 
See the "Working with Groups of Objects" section later in this document.


\paragraph{Move to front, move to back}: These move all selected objects to 
the front or back of the Figure document. 


\paragraph{Keep creating}: This command is used if you want to create several 
objects in a row without continually clicking on the object tool in the Tools 
panel. See the "Using Tools and Creating Objects" section of this document.

}
\subsection{Grid Snap}

This panel lets you constrain the mouse coordinates to points on a grid. This 
makes it easier to create precisely-sized objects.

The panel shows three choices for grid size, plus the "snap off" option (no 
mouse constraint.) Click on a measurement to select it. 

By default, the grid measurements are in inches (1/8 inch, 1/4 inch, 1/2 
inch.) You can also display measurements in centimeters and points. (A point 
is 1/72 inch, the size of a pixel on most computer screens.) Click on 
"inches", "cms", or "points" to select a measurement unit.

If you want a grid size other than 0.5, 0.25, or 0.125 inches, you can click 
on "<other>". Enter the desired grid size in the message line, in the 
currently selected unit of measurement. 


\subsection{Shades, Colors, Linewidths, Round Corners, Fonts}

These panels display object attributes. They all work about the same. Click on 
an attribute to select it. When you create an object, all the selected 
attributes apply to it. If you select a single object, its attributes appear 
in the toolset panels, and you can change the object's attributes by selecting 
new ones in the toolset. 

Many of the attribute panels have "<other>" options. You can click on these to 
enter new values.

All of the attribute panels have "<default>" options. If you are a novice 
user, or only want to create simple documents, don't worry about them; giving 
an object a <default> attribute will be the same as actually setting attribute 
to it's default value. For the more devious uses of this option, see the 
"Working with Groups of Objects" section of this document.


\leftindent{\paragraph{Shades}: This sets a gray-scale value for filling 
closed objects such as rectangles and polygons. "Clear" means to leave the 
object transparent; "white", "black", or the "grey" options mean to fill it 
with white, black, or a shade of grey. (Higher numbers mean darker shades.) 
The default shade is "clear".


\paragraph{Colors}: This sets the color of objects. It affects both the border 
and (if the object is filled) the interior. Colors are given by name; you can 
use the "<other>" option to enter new ones. (If you are running ATK under the 
X window system, X color names are used.) The default color is "black". 

If you have a monochrome monitor, colored objects will be displayed in shades 
of grey. Similarly, if you print colored objects to a black and white printer, 
they will come out in shades of grey.

If you set the shade of a filled object which is also colored, what happens? 
Well, the same thing as when you set the shade of an object whose color is 
black, only not in black. Say you have a red rectangle. Setting its shade to 
"black" will make it solid red. Setting the shade to "white" will make the 
interior white. Selecting one of the "grey" shades will make the interior a 
shade of red, somewhere between red and white. Got that? No? Go experiment.


\paragraph{Line widths}: This sets the width of lines, polylines, the borders 
of rectangles, etc. The widths are measured in points (1/72 inch, the size of 
a pixel.) (Of course, if you zoom in, a 1-point-wide line will look wider.) 
You can use the "<other>" option to enter new values. The default width is 0.

A line width of 0 means that the line is a hairline; it will be drawn as thin 
as possible, no matter how much you zoom in. On a high-resolution printer, 
this can be awfully thin.


\paragraph{Round corners}: This sets the radius of the round corners on 
rounded rectangles. The radii are measured in points (1/72 inch, the size of a 
pixel.) You can use the "<other>" option to enter new values. The default 
value is 10.


\paragraph{Text position}: This sets the justification of text objects -- 
left-justified, right-justified, or centered. The default is centered.


\paragraph{Fonts}: This panel is divided into four subpanels; three are font 
attribute panels, and the fourth displays a sample of the selected font.

\paragraph{Font size}: The size of the font, in points. You can use the 
"<other>" option to enter new values. The default is 12.

\paragraph{Font family}: The font family. You have the usual diverse ATK list 
of fonts: "Andy" (Times), "AndySans" (Helvetica), and "AndyType" (Courier). 
The default is "Andy".

\paragraph{Font styles}: The style of the font. Bold, italic, both, or plain 
(none of the above). The default is plain.

}}
\section{Selecting Objects}


\leftindent{Several of the tools in the "Tools" panel allow you to select 
objects; specifically, the Reshape, Add Points, and Delete Points tools. You 
select objects in order to copy them, cut them, update their attributes, or 
otherwise edit them. You can tell when objects are selected because they have 
little spots drawn on their edges and corners. These spots are called handles; 
they are used to reshape and resize the objects.


In Reshape, Add Points, or Delete Points, you select objects using these mouse 
actions:


If you click on an unselected object with the left button, that object will be 
selected (and all others will be unselected.) The click should be on the edge 
of the object, not in the interior. 

If you press the left button, drag the mouse, and then release the button, you 
will drag out a rectangle. Any objects that are entirely within the rectangle 
will be selected, and all others will be deselected.

Pressing the left button on an already-selected object will do something to 
the object, depending on what tool you are using.

If you click on an object with the right button, that object will be selected 
if it was not selected, or unselected if it was. Other objects are not 
affected. This allows you to select several objects by right-clicking on each 
one in turn.

If you press the right button, drag the mouse, and then release the button, 
you will drag out a rectangle. Any objects entirely within the rectangle will 
be selected if they were not selected, or unselected if they were.


If exactly one object is selected, its attributes (color, line width, etc.) 
will be highlighted in the toolset window. You can then change the attributes 
by clicking on new values.

If you select several objects, you can force them to all have the attributes 
shown in the toolset by selecting the "Apply to Selection" menu option in the 
toolset menu cards.

}
\section{Using Tools and Creating Objects

}\leftindent{
The "Tools" panel contains two types of tools: tools to modify objects or the 
document (Browse, Reshape, Add Points, Delete Points) and tools to create new 
objects (everything else.)


\subsection{Browse}: Selecting this tool switches back into Browse mode, as 
described in the "Browsing a Figure Document" section above. Clicking and 
dragging on the document in this mode will pan around.


\subsection{Reshape}: 

This tool lets you move and reshape objects. 

You select objects as described in the previous section.

If you press the left button on a handle of a selected object, you can drag 
that handle around the window. The object will change shape accordingly.

If you press the left button on a selected object, but not on one of its 
handles, you can drag \italic{all} selected objects around the window. The 
objects will not change shape, only move around.


\subsection{Add Points}:

This tool lets you add points to a line, polyline, polygon, or spline. 

You select objects as described in the previous section.

If you press the left button on a handle of a selected object, a new handle 
will be added at that location. You can drag the new handle around the screen, 
and then place it by releasing the mouse button.

If you press the left button on the edge of a selected object, between 
handles, a new handle will be added there. Drag and release the mouse button 
to place it.


\subsection{Delete Points}:

This tool lets you add points to a line, polyline, polygon, or spline. 

You select objects as described in the previous section.

If you press the left button on a handle of a selected object, that handle 
will be deleted. Two handles is the minimum for lines, polylines, polygons, 
and splines; if the object has only two handles left, you cannot delete 
either.


\subsection{\italic{The Object Creation Tools}}:

When you select one of these tools, the next click on the document begins to 
build it. Some objects, like rectangles, are built in one mouse action; others 
can take several mouse clicks. The created object will have all the attributes 
(color, line width, etc) that are selected in the toolset.

In general, when you finish creating an object, the object is selected and you 
are immediately switched into Reshape mode, so that you can move it around or 
do whatever to it. 

This makes it somewhat annoying to create several objects in a row, since you 
keep getting kicked out of object-creation mode. If you want to keep creating 
objects, select an object-creation tool and click on the "Keep creating" 
command in the toolset "Commands" panel. You will then stay in that tool until 
you select a different one.

This is all somewhat arbitrary, especially since you are \italic{not} kicked 
back to Reshape mode if the object you are creating fails or is cancelled for 
some reason. So, in general, you should keep an eye on the toolset, and pay 
attention to which mode you're in. Otherwise you may find yourself doing the 
wrong thing.


\subsection{Rectangle}:

To build a rectangle, left-click where you want one corner to be, drag the 
mouse to the other corner, and release the button. Pop -- a rectangle. (If you 
click and release the mouse button in one place, the program will complain 
about zero-size rectangles, and not create anything.)

A rectangle has nine handles: four at the corners, four on the edges, and one 
in the center. Dragging them with the "Reshape" tool does the obvious thing to 
the rectangle. (The one in the center moves the whole rectangle.)

The "Add Points" and "Delete Points" tools do not affect rectangles (or 
ellipses, or rounded rectangles, or text, or insets).

Rectangles use the color, shade, and line width attributes.


\subsection{Ellipse}:

Ellipses are built the same way rectangles are, and have the same nine 
handles. They also use the color, shade, and line width attributes.


\subsection{Round Rect}:

Rounded rectangles are built the same way rectangles are, and have the same 
nine handles. They use the round-corner, color, shade, and line width 
attributes.


\subsection{Line}:

To build a line, left-click where you want one end to be, drag the mouse to 
the other end, and release the button. If you click and release the mouse 
button in one place, the program will assume that is one endpoint, and ask you 
to click again elsewhere for the other endpoint.

A line has two handles, one at each end. You can add more using the "Add 
Points" tool; the line then becomes a polyline.

Lines use the color and line width attributes.


\subsection{Polyline}:

To build a polyline, left-click at where you want one endpoint to be. You then 
left-click at each successive point. When you press the right button or type 
control-G, the object is finished. (Finishing the object does not add a final 
point, even if you do it by right-clicking. The final endpoint of the polyline 
is the last place you released the left mouse button.)

A polyline has one handle at each endpoint and internal point. You can drag 
them around independently with the "Reshape" tool. You can add more points 
with the "Add Points" tool, or delete them with the "Delete Points" tool. If 
you delete points until there are only two left, the polyline becomes a line. 

A polyline also has four extra handles, at the four corners of a rectangle 
enclosing the polyline. These handles are shown as open spots, rather than 
solid ones. If you click on one of these with the "Reshape" tool, you can drag 
it around, scaling or reversing the entire polyline proportionally. If you 
don't understand what the heck I mean, try it.

Polylines use the color and line width attributes.


\subsection{Polygon}:

Polygons are built the same way polylines are; the only difference is that 
they are automatically closed (the first and last points are joined) and they 
can be filled in by setting the shade attribute. Polygons have the same 
handles as polylines do, and are affected by tools the same way. They use the 
color, shade, and line width attributes.


\subsection{Regular N-gon}:

This tool allows you to create regular polygons more easily. Left-click where 
you want the center to be, drag to where you want a vertex, and release the 
mouse button. By default, this creates hexagons, but you can change the shape 
by clicking a second time on the "Regular N-gon" tool and typing a number at 
the prompt.

Note that once the polygon is created, it's just like any other polygon; if 
you go to the "Reshape" tool and drag a vertex, only that vertex will move.


\subsection{Spline}:

Splines are just like polylines, except that they curve smoothly from point to 
point. They use the color and line width attributes.


\subsection{Closed Spline}:

Closed splines are just like polygons, except that they curve smoothly. To put 
it another way, they are just like splines, except that they are automatically 
closed and can be filled 
in.\footnote{\
\begindata{fnote,539315976}
\textdsversion{12}
To put it another way, they are just like woolly mammoths, except that they're 
not.\
\enddata{fnote,539315976}
\view{fnotev,539315976,806,0,0}} They use the color, shade, and line width 
attributes.


\subsection{Text}:

To build a text object, click where you want the text to be centered. Then 
start typing. You can use the basic Emacs cursor movement keys -- delete, 
arrow keys, ctrl-A, ctrl-E, ctrl-B, ctrl-F, ctrl-D, ctrl-K, ctrl-T. Hitting 
return will start a new line in the text object. To complete the text object, 
hit escape-return or ctrl-G, or right-click, or switch to a different tool.

Text objects have four handles, one at each corner. They use the color 
attribute, the text position attribute, and the three font attributes (family, 
size, and style.)


\subsection{Inset}:

To build an inset, left-click where you want one corner to be, drag the mouse 
to the other corner, and release the button. Then enter the name of an inset 
at the prompt in the message line.

Insets have the same nine handles as rectangles. They are not affected by any 
attributes (they are always opaque, and control their own colors and fonts. 
See the \italic{\helptopic{insets}} help file, and the help files on that 
various inset types.)

To edit an inset, you must select the "Browse" tool. In browse mode, if you 
click on an inset, it will receive the input focus; you can then use its 
keyboard and menu commands, as described in its help file. Click outside the 
inset or select a different toolset tool to go back to editing the main Figure 
document.

If you click on the inset with the "Reshape" tool, you can drag it around or 
reshape it, but not edit it. The "Add Points" and "Delete Points" tools will 
do nothing.


}\section{Cutting, Copying, Pasting

}
\leftindent{This works about the same as copying and pasting in any other ATK 
application. To copy, select an object (or a bunch of objects) and select 
"Copy" on the front menu card, or type Escape-w. To cut, select "Cut" or type 
ctrl-w. To paste back, select "Paste" or type ctrl-y. You can paste Figure 
objects back into the Figure document, or into another Figure document; you 
can also paste them into a text or table window, in which case they'll appear 
inside a Figure inset.


You cannot paste other kinds of data (text, rasters, etc) directly into a 
Figure document. First create an inset of the appropriate type, switch into 
Browse mode, click on the inset, and paste the data into it.


If you select an inset, you can also use the "Copy Inset Contents" menu 
option. This copies the contents of the inset, but not the Figure inset object 
itself. What difference does this make? Well, say you have a raster inset in 
your Figure document, and you want to copy the raster out and paste it into a 
text file. If you select the inset and "Copy" and "Paste" that, you'll get a 
Figure inset containing a raster inset, rather than a raster inset alone. If 
 you use "Copy Inset Contents", it'll do what you want.

}
\section{Working with Groups of Objects

}\leftindent{
Figure allows you to create several objects and then link them into a group, 
which can then be moved around or copied as a unit. To do this, create the 
objects, select them all using one of the selection tools, and click on the 
"Group Selection" command. The document will look nearly the same, but the 
objects will no longer be individually selected; instead, an invisible group 
surrounding all of them will be selected, with a handle visible at each 
corner.


A group acts like a single object. You can select or deselect it by clicking 
on any object inside it; the whole group will be selected or deselected. If 
selected, you can drag it around with the "Reshape" tool. (Click inside the 
group to do this; dragging the handles will have no effect.)


The objects in a group are always stacked right next to each other. You cannot 
have an ungrouped object which is in front of some objects in a particular 
group but behind other objects in that group.


If you want, you can put groups within other groups. Whee!


\subsection{Setting the attributes of objects in groups}


You can set the attributes (color, line width, etc.) of a group, but this will 
not normally affect the objects inside it. Since you cannot select individual 
objects in a group, there is no simple way to set their attributes, so you 
should set all the objects' attributes before you group them together.

However, there is a way to set up a group so that all of its objects can be 
altered together. This involves setting various object attributes to 
"<default>". For ungrouped objects, "<default>" means to use the usual default 
value for that attribute; but for an object in a group, "<default>" means to 
use the \italic{group}'s attribute value. 

An example: create several objects, and set the line width attribute of each 
one to "<default>". Then group them together. The group will then be selected, 
so try selecting various line widths in the toolset; the objects will all 
inherit the line width you set.


Of course, you need not set every object in a group to "<default>". You can 
set some objects to inherit line width from the group, and others to have 
specific line widths. Any attributes can be set to "<default>", including the 
font attributes. 


You can also set the group itself to have a "<default>" attribute. You can 
then nest that group in another group along with other groups and objects. 
This lets you set up complicated hierarchies of groups and objects, where 
whole sections of the document can be easily changed to the attributes you 
desire. In fact, this whole inheritance thing is amazingly powerful and 
complicated, especially considering that nobody will ever use it all that 
much.


}\section{Figure Menu Commands

}
\leftindent{\subsection{Zoom In, Zoom Out, Normal Size, Pan to Origin}: See 
the section on "Browsing a Figure document".


\subsection{Toolset, Remove Toolset}: See the section on "Editing a Figure 
document".


\subsection{Expert Mode}: See the "Expert Mode" section.


\subsection{Set Print Scale}:

This allows you to determine how large the Figure document will be when 
printed. The default is 1.000 (print out at the same size the document appears 
on the screen.) 

A print scale of 2.000 would cause the document to be twice as large on paper 
as on the screen, 0.500 would print it out at half-size, and so forth. 

You can specify different width and height scale factors, if you want.

The print scale only affects the size of printed output and PostScript file 
output. It never affects what you see on the screen.


\subsection{Write as PostScript}:

This option writes the Figure document out to a PostScript file. 


\subsection{Show / Hide Print Area}

This option shows the position that the page boundaries will be when the 
document is printed. Anything outside these boundaries will not be visible. If 
your document is too large, you can use the "Set Print Scale" menu option to 
set a smaller print scale; the page boundaries will then be larger in 
comparison to your document.


}
\section{Toolset Menu Commands

}\leftindent{
\subsection{Apply to Selection}:

This applies all of the attributes shown in the toolset to every selected 
object.


\subsection{Smooth / Unsmooth}:

This option turns any selected polygons into closed splines, and polylines 
into splines, and vice versa. The control points and attributes of the objects 
stay the same; they just go from straight lines to curves, or from curves to 
lines.


\subsection{Cancel Object}:

This finishes or cancels any object currently being built. In general, the 
object is finished and left in the document if there is enough of it there. If 
there isn't (say, a line with only one endpoint, or a text object with no text 
in it) it is aborted and removed.


\subsection{Quit}:

This removes the toolset and returns Figure to browse mode, just like the 
"Remove Toolset" menu option in the document window.


}\section{Expert Mode}


\leftindent{This section is about the complicated bits. (Yes, more complicated 
than the attribute inheritance tree.) The things described herein are 
sufficiently complicated to confuse the casual user. Therefore, they are not 
accessible at all until you select the "Expert Mode" menu option on the 
"Figure" menu card. If you don't understand expert mode, don't use it. If you 
want to experiment with expert mode, don't experiment on the Computer 
Architecture diagram you spent four hours creating. 


If you do understand these tools, you can set a preference so that Figure 
always runs in expert mode. See the "Preferences" section.


\subsection{The Focus Group}


The first neat thing you can do in expert mode is to play around with the 
contents of groups without breaking them apart. The idea is that one group in 
the document is the "focus" group. You can select objects in the focus group, 
edit them, add new objects to the focus group, etc; but you cannot do anything 
to objects not in the focus group.

Most of the time, the focus "group" is the entire document. (This is why you 
normally can't select or edit objects nested inside groups; they're not in the 
focus.)

However, in expert mode, you can change that. You do this with the arrow keys. 
When the focus is on the whole document, it is not shown; when the focus is on 
some group, that group is highlighted with a rectangular outline.


\paragraph{Down-arrow}: shift the focus group "down"; one group in the current 
focus group will be highlighted. 

\paragraph{Left and right-arrow}: shift the focus "sideways"; another group in 
the same group as the current focus will be highlighted. 

\paragraph{Up-arrow}: move the focus "up", to the group containing the current 
focus. If you hit up-arrow enough, the focus will return to the whole 
document.


When a group has the focus, many Figure commands behave differently:


Any objects created or pasted will be placed in the focus group.

You can only select objects in the focus group.

If you select several objects and group them, the new group will be placed in 
the focus group.

If you select objects and use the "Move to front/back" commands, they will 
move to the front or back of the focus group, not the entire document.


\subsection{Deep Selection}


Remember what you were just told, that there was no way to select objects not 
in the current focus group? It's a lie.

In expert mode, if you click on the "Reshape" tool when you're already in 
reshape mode, you'll see a message "Deep selection mode on." In this mode, you 
can select an object in a group without changing the focus to that group. (The 
object still has to be nested somewhere in the focus group -- you can't select 
something above the current focus -- but it can be nested under as many groups 
as you like.)

This enables you to do spot modifications to deeply-buried objects without 
hunting around the group tree. It also allows you to select several objects 
that are not all in the same group.


\subsection{Anchors and Resizing}


When you are in expert mode, several new tools and commands appear in the 
toolset, dealing with "anchors" and "resizing". They are described in the next 
section.


\subsection{Warnings}:


You can cause some strange effects with deep selection. Avoid dragging objects 
around if they're in different groups. Especially avoid dragging a group 
around if some of its contents are also selected; the objects will drift. 
Don't use the "Move to front" or "Move to back" commands when you have objects 
from other groups selected; they'll get pulled from wherever they are and 
stuffed into the focus group. "Group selection" can behave oddly too.


Also, it's quite easy to delete all the objects from a group, leaving an empty 
group. This can be confusing, because when the focus is on an empty group, the 
focus highlight is invisible. However, the arrow keys will still work 
normally. When you move the focus to an empty group, a warning will appear in 
the message line. 

You can create new objects in an empty group, but that's about all you can do 
with it -- you can't select it or delete it, unless you put something in it 
first. 

Since it's easy to overlook empty groups, Figure automatically filters them 
out when saving to a file or copying or cutting a selection. The easiest way 
to get rid of all empty groups in a document is to save it, quit, and load it 
back up.

}
\section{Anchors and Automatic Resizing}

\leftindent{
Figure provides a facility for making documents that will automatically adjust 
themselves to the window size. This is particularly helpful if the document is 
intended to be a graphical interface.

These tools are only available under expert mode. Be careful; the tools in 
this section can distort your document suddenly and without warning, if you 
don't understand what they're doing.


\subsection{An Introduction to Anchors}


Automatic resizing is done by attaching anchors to the various handles of the 
objects in your document. Whenever a group is moved or resized, the anchors on 
the objects in it are dragged around; this drags the object handles, and so 
the object changes shape. The anchors always move proportionally with the 
group. That is, if an anchor is created in the center of a group, it will stay 
in the center no matter how the group is scaled; if an anchor is created 
one-third of the way down the left edge, it will always be one-third of the 
way down that edge.


What makes this complicated is that a handle does not have to be right on its 
anchor. You can, for example, have a handle which is one inch to the left of 
its anchor; the handle will always stay one inch to the left of the anchor, no 
matter how the anchor moves. 


When an object with anchors is selected, the anchors are visible as large 
squares connected to their handles with straight lines. (If an anchor is right 
underneath its handle, the large square will surround the handle spot.) If it 
makes things easier to visualize, think of that straight line as rigid and 
unrotating; when the group resizes, that line will remain the same length and 
direction. The anchor end (the large square) will be moved to the 
proportionally correct position in the group; the handle will be dragged 
wherever it winds up, given the length and direction of the rod.


Note that it is quite legal to have anchors or handles (or both) outside the 
boundaries of a group. If an anchor is positioned above the top edge of a 
group by a distance of half the group's height, it will stay at that 
proportional position; and if its handle is a half-inch above that, that will 
stay fixed also.


Anchors cannot force an object to resize if it doesn't want to. For example, 
the minimum size of a text object is determined by the font and the text in 
it; it cannot be resized smaller than this. A non-resizable group (see below) 
cannot be resized at all. The nine handles of a rectangle or ellipse will 
always form a rectangle or square, even if anchors are trying to pull them in 
other directions. 


So what happens if you set anchors that try to do impossible things, or set 
too many anchors on an object, so that they work against each other? Well, 
it's hard to say. All the anchors will try to move; either some of them will 
win, or they'll come to some compromise. It probably won't be the compromise 
you want, though. 

Moral: don't use too many anchors. A non-resizable object should only have 
one; a resizable object should have four in the centers of the edges, or two 
on opposite corners. Polylines or splines can have one on each internal 
handle, since those can move freely, but if you try to use the corner handles 
as well, you may run into trouble. Experiment.


\subsection{Non-Resizable Groups and Resizable Groups}


How is it that you can drag groups around in a normal document without 
worrying about expert mode or what's anchored where? Well, by default all of 
this anchor stuff is ignored. Every group (including the root group) is either 
resizable or non-resizable; by default, non-resizable. This allows the 
document to behave sensibly for non-experts, while still being flexible for 
experts. The two kinds of groups behave very differently.


\leftindent{\paragraph{Non-Resizable Groups:}


The group is always exactly big enough to surround all its contents. If you 
add, delete or move an object, the group's size adjusts accordingly.

If you grab and drag a handle of the group, the whole group moves; it does not 
change size.

When you move the group, all objects within it are dragged that distance; 
their sizes and relative positions are not changed.

The anchors of objects in the group are ignored.

If the focus group is non-resizable, it is indicated by a highlighted 
rectangle surrounding it (unless the root group is the focus, in which case no 
highlight is drawn.)


\paragraph{Resizable Groups:}


The group's size is constant, unless you resize it yourself or create anchors 
to do it. If you add or move an object, it may be partially or entirely 
outside the group boundaries. If you delete or move an object, the group 
boundaries may be left sticking out.

If you grab and drag a handle of the group, the group changes size, in the 
same way that a rectangle object is.

When the group is moved or resized, the objects in it respond according to 
their anchors. An object with \italic{no} anchors will not move or change at 
all! This can be disconcerting. All the objects in a resizable group should 
have at least one anchor, or the group will go winging off without them.

If the root group is resizable, it will always be exactly the size of the 
Figure window (or Figure inset, if it's an inset in a larger document.)

If the focus group is resizable, the focus highlight is drawn to surround the 
group boundaries and all the group contents. In addition, the group handles 
are drawn; this indicates where the group boundaries are. (This makes the 
focus group look like it is selected, even though it is not. Just remember 
that the focus group's handles are visible when it is resizable, and invisible 
when it is not.)

}
Note that it is quite possible to have resizable and non-resizable groups in 
the same document. If you have a resizable root group containing a 
non-resizable subgroup, for example, the subgroup will always be the same 
size, but it will be dragged around by its anchors if the window is resized. 
Since the subgroup is non-resizable, when it is dragged around, all its 
contents will be too.


\subsection{New Commands}


\paragraph{Resizing on}: This makes the focus group resizable. (The focus 
group, \italic{not} a selected group -- this is an easy mistake to make.) The 
group handles will become visible, to indicate that it is resizable. 

If you do this when the root group is the focus -- that is, when the focus 
rectangle is not visible -- the root group will immediately resize to fit the 
window or inset. (The group handles will be visible at the corners and edges 
of the window.) If any objects in the root group have anchors, they will 
resize also. Therefore, if you are laying out objects in the root group, you 
should make it resizable before you start creating anchors.


\paragraph{Resizing off}: This makes the focus group non-resizable. The group 
handles will become invisible again.

Again, if you make the root group non-resizable, it will shrink down so that 
it surrounds the objects inside it. However, because the group has become 
non-resizable, its contents will not resize, even if they have anchors. 


\paragraph{Clear anchors}: All selected objects will have all their anchors 
removed.


\paragraph{Standard anchors}: All selected objects will have anchors set, 
according to a rather simplistic standard. The rule is that each part of each 
object will be anchored to be a constant distance from the nearest edge of a 
group. This means that a small object near one edge of the group will remain 
the same size and the same distance from that edge. A larger object that 
straddles the center of a group will change size when the group does, since 
its opposite sides will be remaining a constant distance from the opposite 
sides of the group.


\paragraph{Propor. anchors}: All selected objects will have anchors set 
directly under their handles. This means that they will resize proportionally 
with the group, as best they can.


\subsection{New Tools}


\paragraph{Set Anchors}: This tool lets you set anchors yourself. You select 
and deselect objects as described in the section on "Selecting Objects". To 
set an anchor, move the mouse to any handle of a selected object and press the 
left mouse button. Then drag the mouse to the desired location, and release 
the button to place the anchor. If you just press and release the button on a 
handle, the anchor will be set underneath the handle.

You can also move an already-set anchor, by clicking and dragging the large 
square that marks the anchor end.

In this tool (unlike the Reshape, Add Points, and Delete Points tools) you can 
resize the focus group to test the effects of your anchors. To do this, 
left-click and drag the handles of the focus group (which will be visible if 
the focus group is resizable.) You may not resize the root group this way, 
since the root group is always fills the window (if it's resizable at all.) To 
test resizing of the root group, resize the window using your standard window 
manager tools.


\paragraph{Delete Anchors}: This tools lets you unset anchors. You select and 
deselect objects as usual. If you left-click on a handle of a selected object, 
or on the end of the anchor attached to that handle, the anchor will 
disappear.

This tool allows you to resize the root group, like the Set Anchors tool.



}\section{Converting Zip Documents to Figure

}\leftindent{
Figure includes a command to read in a Zip document, converting it to Figure 
format as cleanly as possible. Since Zip is rarely used, this command is not 
normally bound to a keystroke or menu option.


To make it available, add the following line to your .atkinit:

\typewriter{\smaller{addmenu figview-read-zip-file "File,Read Zip File~18"}}


You can also run the procedure directly if you are using the \italic{metax} 
package (see the help file on \italic{\helptopic{metax}}.) To do this, type 
Esc-x, and then enter \typewriter{\smaller{figview-read-zip-file}} at the 
"Function:" prompt.


When you run the conversion procedure, you will be prompted for the name of a 
file to convert. (It must be a straight Zip file; text or table documents with 
Zip insets will not be converted.) When that has been entered, you will be 
prompted for a ratio to scale the Zip document by. This allows you to choose 
an appropriate size, since Zip documents resize automatically and have no 
default scale.


The Zip file will then be read in, and appropriate Figure objects will be 
created in the document. (If you are in expert mode, and the focus is on a 
group, the objects read in will be put in that group.) All the objects that 
are read in will appear selected, so that you may group them all or drag them 
with the "Reshape" tool.


\subsection{Warnings:}

Zip symbols will be ignored in the conversion process.

Zip arcs will become complete circles or ellipses.

Shades of grey will not look exactly the same after conversion.

Rounded rectangles may have incorrect corner arc radii. You should go back and 
adjust them with the toolset.

Zip freehand curves will be converted into polylines with lots of segments. It 
may be more efficient to delete most of the points, and then convert it to a 
spline.

Text objects will lose any vertical positioning (whether the text is aligned 
by top, baseline, center, or bottom) when converted.

Text objects and insets will sometimes be inappropriate sizes. This can be 
adjusted by deleting the objects and converting the Zip document again with a 
different scale ratio.

All objects will appear, regardless of their Zip zoom level.


}\section{Preferences

}\leftindent{
\bold{*.FigureExpertMode: \italic{no}}


If this preference is set to \italic{yes}, Figure will be in expert mode as 
soon as you run it. This is not recommended until you understand all the 
functionality of expert mode.


}\section{Program Author}

\leftindent{
Andrew Plotkin, ap1i+@andrew.cmu.edu.}


\section{Recent changes to Figure

}\leftindent{
Recently, Figure was written.

Originally, it was called Vel, but we don't talk about that any more. 

}
\section{Related tools}  


Select (highlight) one of the italicized names and choose "Show Help on 
Selected Word" from the pop-up menu to see the help file for:

\leftindent{
\helptopic{\italic{Andrew}}	(the tour)\helptopic{\italic{

insets

scrolling

raster

}}}

\begindata{bp,537558784}
\enddata{bp,537558784}
\view{bpv,537558784,808,0,0}
Copyright 1992 Carnegie Mellon University and IBM.  All rights reserved.

\smaller{\smaller{$Disclaimer: This software is part of version 6.1 of the 

Andrew User Interface System and is 

the property of IBM, Carnegie Mellon University, 

and the other copyright holders.  The source 

code of this version is for the sole use of 

the individual named in ./config/allsys.h.  

This source code is not to be redistributed.  

Binary object code compiled or derived from 

these sources is not to be distributed to non-

members.  Members may have additional 

distribution rights granted by prior written 

permission of Carnegie Mellon University.



IBM, CARNEGIE MELLON UNIVERSITY, 

AND THE OTHER COPYRIGHT HOLDERS

 DISCLAIM ALL WARRANTIES WITH 

REGARD TO THIS SOFTWARE, INCLUDING 

ALL IMPLIED WARRANTIES OF MERCHANT-

ABILITY AND FITNESS. IN 

NO EVENT SHALL  IBM, CARNEGIE 

MELLON UNIVERSITY, OR ANY OTHER 

COPYRIGHT HOLDER BE LIABLE FOR 

ANY SPECIAL, INDIRECT OR CONSE-

QUENTIAL DAMAGES OR ANY DAMAGES 

WHATSOEVER RESULTING FROM LOSS OF

USE, DATA OR PROFITS, WHETHER IN AN

ACTION OF CONTRACT, NEGLIGENCE OR

OTHER TORTIOUS ACTION, ARISING OUT 

OF OR IN CONNECTION WITH THE USE OR

PERFORMANCE OF THIS SOFTWARE.

 $

}}\enddata{text,539031256}
