home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d496
/
ruler
/
ruler.doc
< prev
next >
Wrap
Text File
|
1991-06-06
|
7KB
|
161 lines
Ruler Version 5.00
©1989, 1991 by Dave Schreiber, Chad Netzer, and Thad Floryan
Ruler is a small utility designed to assist in the alignment or
constrainment of text; specificially, it was originally conceived as a
method of insuring that filename lengths didn't exceed the maximum length
allowable by the Amiga filesystem. The program opens a borderless window,
initially on the Workbench screen, that displays a ruler with ticks one
character (of the size of the default font) apart. The window can be moved
to any position on any screen, and to any other screen currently open. The
initial size can be specified in the CLI version, as can the tick width;
both can be changed once the program is running.
There are two versions of Ruler supplied. The first is in the CLI
directory, and is meant for use from the command line. It has the
following command line options available:
-z<size> -- Width of the ruler, in ticks.
-s<scale> -- Width between the ruler ticks, in pixels.
Either, or both, can be specified; neither are required. If the scale
isn't given, the width of characters in the default font is used. If the
size isn't given, the default is 30. You can also just type the size
and scale (in that order) without typing the switches. Typing 'Ruler ?'
will give you a short listing of these options.
The second version of Ruler is in the Workbench directory. It
won't open a secondary window when from the Workbench, and since it isn't
meant to be used from the command line (in fact, it will crash the machine
if you run it from the CLI), it doesn't have the command line options
available. You can, however, specify a default size and scale by changing
the tool types within the Information requester from Workbench. To do so,
click on Ruler's icon, then select "Info" or "Information" (depending on
what version of Workbench you're running) from the Workbench menus.
There are two tool types that can be edited. To change the default
size, change the number after the SIZE= tool type to reflect the desired
ruler width (in ticks). To change the default scale, put the width (in
pixels) after the SCALE= tool type. Deleting either (or both) causes Ruler
to use the defaults specified two paragraphs up.
Once you're in Ruler, there are a number of actions you can perform.
Moving and sizing the window are, of course, two of those options (even
though the sizing gadget is invisible; click where it should be, and
you'll be able to size as usual). Clicking on the close gadget will
cause the program to exit.
There are four menu items that control other actions. The Project
menus has two items: About opens a small, informational window (which can
be closed by use of the close gadget on that window), and Quit will stop
the program (it has the same effect as clicking on the close gadget in
Ruler's main window). The Change menus also has two choices: Scale will
let you change the current tick width. To do so, select Scale, then click
on a window. The width of the default font in that window will become the
width between the ticks (NOTE: the font in the window must not be
proportional; if it is, Ruler will print an error and refuse to change the
tick width). Finally, the Screen item will let you move Ruler's window
from screen to screen; to move the window, select the Screen item, then
click on the destination screen. The window will shrunk if necessary to
fit it on that screen.
That's it. If you have any questions/comments/etc., please don't
hestitate to get it touch with me via one of the e-mail addresses below.
-Dave Schreiber
The following is the revision history, compilation instructions, and e-mail
addresses of the authors. A copy of this can be found in the source code
file Ruler.c.
Version 5.0 ??-Apr-1991 ©1991 Dave Schreiber, Chad Netzer, and
Thad Floryan
Based upon code from:
Version 4.0 29-Dec-1989 ©1989 Chad Netzer and Thad Floryan
Based upon code, idea, and logic from:
Version 1.0 7-Nov-1988 ©1988 Thad Floryan
Revision history:
14-April-1991 - (Ver. 5.00) (DKS):
1 Window is sized to make room for > 8 point fonts in the
title bar and main window (for compatibility with AmigaOS
2.x)
2 Added the ability to put Ruler's window on any screen at
will.
3 Added the ability to get the font scale from any window.
4 Added menus for:
* About
* Quit
* Change Screen (#2)
* Change Font (#3)
These menus are layed out by the 2.x function
LayoutMenusA(). This function is called only if Ruler
is running under 2.0 or later (i.e. Ruler is 1.3
compatible).
5 The ARP version is no longer being supported (the purpose
for the support, so as to gain access to a shared printf
function, is no longer an issue; printfs have been
expunged from version 5.00).
6 There are, though, two versions: one for the command line,
and another for the Workbench (the Workbench version is
slightly smaller, and doesn't open a console window when
run from it's icon.
29-December-1989 - (Ver. 4.0) - Added an offset so that you can
just stick the window on the left edge of the workbench
screen, and it will automatically be lined up with the
characters. Fixed some more minor bugs and rearranged the
code a bit. Added ARP support for those who want it. (CFN)
09-March-1989 - (Ver. 3.1) - Fixed a visual bug so that scale can
no longer be less than eight. (CFN)
06-Dec-1988 - (Ver. 3.0) - Added support for measuring fonts of
varying widths (selectable scale). (CFN)
22-Nov-1988 - (Ver. 2.2) - More adjustments to code, No major
changes. Program size is slightly smaller. (CFN)
14-Nov-1988 - (Ver. 2.1) - Fixed a few minor (harmless) bugs.
The right edge of the ruler is now always redrawn after
resizing. I got rid of that GOTO statement (which in 'C', is
considered a bug. :-) Version 2.1 now lets you open a ruler
to be as low as 12 characters wide, which 2.0 only
advertised. (CFN)
13-Nov-1988 - (Ver. 2.0) - I added minor enhancements, most
noteably, the ability to resize the window, and support for
overscanned screens. (CFN)
Feel welcome to use this program for any non-commercial purposes or
for your personal learning. Commercial users are requested to
contact Thad at either:
UUCP: thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad
BBS: BBS-JC, 415/961-7250 (300/1200/2400), "Thad Floryan" | "SYSOP"
Chad at:
UUCP: chad@ucscb.ucsc.edu (during school term)
UUCP: chad@cup.portal.com (holidays, summer, etc.)
BBS: BBS-JC, 415/961-7250 (300/1200/2400), "Chad Netzer"
or Dave at:
UUCP: davids@ucscb.ucsc.edu
BBS: BBS-JC, "Dave Schreiber"
Building instructions (SAS/C V5.10):
lc -Lcd Ruler5