The original version of FormEd can only be described as functional. This is an attempt to rectify some of its deficiencies and provide some useful extensions. In the following description (essentially of the differences) some familiarity with FormEd is assumed.
The original code contained a number of interesting features ...
i) A sprite editor (not up to !Paint standard but obviously sufficiently functional to design !Paint itself!). In current versions of FormEd the relevant procedure calls have simply been REMmed out leaving the code intact. Most significantly, FormEd claims a large amount of memory simply as a large (non-dynamic) sprite buffer (FormEd in effect uses the Wimp to store the windows themselves). Hence taking out sprite editing references has allowed the program to be trimmed significantly.
A corollary to this is that all sprites are assumed to be in the Wimp's common pool rather than allowing private sprite areas (indirected sprite icons in imported windows are changed if necessary); in any case 'private' sprites had to be dereferenced before the templates were saved. Dragging a sprite file onto FormEdII simply merges it with the common pool making its sprites available. 'Private' sprites must be indirected and the sprite pointer set to the user sprite area before the window is created from the template file - this is standard practice anyway.
ii) Support for previous versions of the Wimp from Arthur up. Such compatability bodges are of historical interest only and have been excised.
iii) Similarly FormEdII only handles windows that use the 'New format' window flags. Any windows with the old format are (permanently) converted to the new.
iv) A few printer support routines had been scratched together but these were not 'connected' and were far from working in any case. Full printer has now been included but note that it hasn't been tested at all at time of writing and can be guaranteed to fall over.
v) FormEd behaves much more like a standard editor - it will query quit attempts with unsaved templates. Deleting and creating default windows/icons doesn't not constitute a significant change; amending a window or icon definition causes the file to be flagged as unsaved. Note that an 'unmodified' file will be stamped with the current time - strictly speaking, an editor should stamp the file with its 'old' date-stamp in this case.
Main menu
==========
Create window - create (optionally named) blank window {unchanged}; this is equivalent to SELECTing the icon bar icon.
Clear windows - delete all windows (queried if unsaved)
Useful icons - selecting this option brings up a window containing a number of helpful icons which can be cut and pasted to your templates. This saves a lot of time! Remember that the ESGs used on menu, radio icons may 'clash' with those already defined in your window. Tempting as the scroll bars may look
they are pretty useless without any support code.
Save templates - no prizes (the very non-RISCOS Load templates option has been removed)
Print all - print all templates. Selecting this option uses the current parameters contained in the print dialogue box (nicked from !Paint). Note that if an error occurs while printing you are offered the choice of aborting the print or continuing with the next window (if any).
Quit - queried if unsaved templates around. Note that doing anything which involves recreating/moving an icon or window will cause the file to be marked as unsaved.
Editing windows
================
The most noticable departure from the original FormEd is the separation of window and icon properties into separate menu structures both to simplify matters and to reduce the time taken to rebuild the menu; this delay is now acceptable but there is plenty of scope for intelligent rebuilding of the menu if necessary.
MENU over an icon brings up the icon menu from which the window menu can be selected if necessary (convenient if the window is crowded with icons), otherwise the window menu appears.
If FormEd can be said to have a philosophy it was to avoid storing the window data and leave that in the Wimp's hands, with the consequence that windows and icons behaved exactly as they would in 'real life'. All very laudable until you want to move a fixed window! As a conseqence a few window properties are stored internally with the on-screen windows being subtly different from their descriptions in the window menu.
Window menu
============
Create icon - The default icon has been changed to a more useful unfilled text icon. Note that the default window and icon are in FormEd's templates file and both can be changed freely.
Grid - described later ...
Window flags - see later ...
Colours - {unchanged}
Work area
The minimum size parameters (which had obviously been tacked on at a later stage in FormEd's 'development' have been moved to a separate dialogue box).
All icons are unchanged except it is possible to make the work area smaller than the current visible area using the arrow icons. Two new 'action' icons have been introduced:-
Fill - set the visible area from the work area. Previously it was necessary to reinstall scroll bars etc. to change the size of a window without them. Now just adjust the work area and use Fill to change the visible area. As a digression it is fascinating to apply Fill to the template files on the Applications disc to see how much junk is lying around - the Save box in Maestro has more junk icons than visible ones!
Shrink - set the work area from the visible area e.g. a window with scroll basr can be dragged to the desired shape, then use Shrink to reduce the work to exactly that occupied by the visible area. For a fixed sized window, the scroll bars can then be removed and Fill used to tweak the window size as necessary.
Minimum size - new dialogue box
If 'Use title width' option is selected then the window cannot be shrunk smaller than the title otherwise Width and Height are used. Turning off this option inserts the current (visible area) width and height into the writeable icons. Use Ok to update the window.
Tidy deletions - this will remove any deleted icons from a window's definition. These are icons which have been deleted but because they lie in the middle of the definition cannot be removed without renumbering the icons. This option allows the removal of these icons (which can cause problems while recreating icons) at the cost of renumbering subsequent icons.
Copy window - make copy of window (optionally named). Icons are copied too but these can be easily cut out if necessary.
Print - print window
Indentifier - change identifier. These must be unique and not blank but this is only checked at save time (the offending window is topped to make things easy!).
Delete window - Goodbye template. Note that the Close box has an identical effect except that you are warned (this is the direct result of a particularly nasty experience with FormEd in times past).
Grid
=====
To help to keeps things nicely aligned, it is straight-forward to put down skeleton lines to which icons can be made to snap. On a practical note, the grid definitions are stored in the RMA rather than a private heap so RMA full errors may appear if you get too carried away with grid lines (at 4 bytes each this is rather unlikely).
Add line - create line(s) where MENU was pressed. SELECTing the option itself creates both horizontal (Y) and vertical lines (X); use the sub-menu to be selective. Note that lines are always merged i.e. you can't have two lines on top of each other. If this is the first line in this direction, centre justified snapping is switched on.
Remove lines(s) - remove selected line(s). Lines are selected (and deselected) by SELECTing them - you can select with MENU if no other lines are selected (a las Filer). SELECTing the work area away from any lines will clear the current selection.
Remove grid - remove lines; optionally in only one direction. Clicking on 'Remove grid' itself will generate a warning query; use 'Both' in the submenu to perform the same action without such over-protectiveness.
Make/Snap - the most important ...
X & Y spacing determine the grid spacings (in OS units) if a regular grid is used- they default to 64. These values are also used as limits for snapping and selecting grid lines. Specifically the relevant icon co-ordinate must be within spacing/2 on a line to be snapped to it (this allows for icons to be placed freely away from grid lines). To select a grid line, the cut-off is spacing/4.
X snap - If 'off' the x-coord of the icon will not be snapped otherwise the left, centre or right-hand edge of the icon will be used to judge where it should be snapped i.e. left, centre or right justification.
Y snap - see above ...
All the 'action' icons (except Cancel of course!) set the snap x/y, spacing parameters. In addtion 'Make regular' or 'Icon based' can be used to create a grid AS DEFINED by these parameters i.e. if X snap is off, an X grid will not be created (any X lines will remain intact). A special case is both X/Y snap off, in which case a complete grid generated with centre justification.
Make regular - create regularly spaced grid.
Icon based - Uses the currently defined icons to create the grid (quite fun). This partly gets round the problem of not being able to save grids as well as making it easier to tweak existing windows.
Selected grid lines can dragged to new positions (drag an intersection to move a pair of lines). Dragging with SELECT, but not ADJUST, has the very handy effect of dragging any attached icons (if snapping is on and the relevant co-ordinate is within spacing/4 of the line). Holding for long enough (.5 sec?) with SELECT to initiate a drag and then releasing will cause any slightly misaligned icons to snap on to the line (almost magical ...).
Note that it is quite possible that an icon may be over the line(s) you wish to move. If so, hold down SHIFT while you start the drag - if the icon moves with the pointer you weren't close enough to the lines (which wouldn't have gone red).
The window will scroll (with much flicker, unfortunately) if you drag the line(s) to the edge of the visible window.
N.B. For some reason using the scroll bars (but not adjust size) messes the appearance of the grid. Hope to fix that, but it is only a problem for the aesthete.
Window flags
=============
Quite a few tiddly but friendly changes here:-
i) Auto-redraw - in fact the actual windows have this flag clear (to allow handy grids etc.) and so this flag is stored internally.
ii) User scroll - you can now see which scroll option has been selected.
iii) Work area - again the actual windows are all Click/Drag and the button type is again stored internally. Note that the same menu is used for the icon button types; some of the options e.g. Write/Click/Drag and Menu don't apply to the work area.
iv) As noted, all windows all 'New format' which simplifies this menu. Some of the flags are 'tied' to sensible changes in other flags ...
Turning off both scroll bars also turns off the Size and Toggle icons.
Turning on a scroll bar ensures that these flags are set.
v) The title flags menu has been simplified to remove options that don't apply to the title (it was just to make things easy for the programmer that these irrelevant bits were in).
vi) All windows are moveable, again this flag is stored internally.
vii) The 'Real colours' option has been deleted. This was surely a left-over from days of Arthur (RIP) and a complete disaster for mode independence. FormEd (including previous versions) is likely to get upset if colours >15 are used anyway.
Manipulating icons
===================
A) Icon menu
=============
Amend icon
i) Changing the right justify flag will automatically turn off horizontal centre-ing.
ii) The L validation string command (for long messages) is recognised. FormEd won't try to define a minimum size for these icons - it used to be impossible to do anything with these icons once created!
Renumber #n to #m has the effect of swapping the definitions of icons n and m).
Copy - It is possible to supply the number of copies and separation (by default 0) between the new icons as well as the direction of creation.
Move - Similarly the move distance (in screen pixels rather than OS units) can be specified.
Delete icon - note that ADJUST will (after deleting the icon) bring up the window menu; you can't do much with a deleted icon!
Window menu - bring up window menu; handy if the window is so crowded that it's difficult to find an blank piece of work area.
B) Dragging icons
==================
As in the original FormEd, use SELECT to move an icon; ADJUST to change its size. In both cases, holding down shift will lock the change to the axis that has changed most (in OS units), handy for dragging icons horizontally or vertically or changing the length of long icons. Remember that SHIFT over on icon will activate a line drag if one is close enough.
The window will scroll at the edges during SELECT drags.
Text + Sprite icons are understood properly; in particular their minimum sizes are now worked out correctly.
Holding down ESCAPE at the termination of a drag (i.e. as the buttons are released) aborts the drag.
C) Cut and Paste
=================
A region of work area (which should contain at least one icon) can be cut out with SELECT or ADJUST (press Shift if you are too near a grid line). Once the buttons are released, the resulting group of icons can be manipulated. press ESCAPE to abort.
Move - moving the pointer will drag a destination rectangle. SELECT will activate the move (or copy if the destination is in a different window).
Menu - pressing MENU (with or without moving the destination area) will bring up a short menu of options.
Move - move icons
Copy - copy icons (if area moved)
Delete - wipe area
Shrink - shrink icons to minimum size
Expand - (only if single icon); expand icon to fill (destination) area. This is a combined move and change size!
Note that this is where the 'Useful icons' window comes into its own. Theses icons can only be copied. Note that in this case MENU has the effect of Expand rather than bringing up the menu.
Again Shift (pressed as the initial drag is terminated or while clicking to terminate the destination move phase) has the effect of locking to the major change (excluding Shrink).
Command line options
=====================
Current versions of FormEd have a simple command line; a list of template and sprite files. This has been changed to the following options ...
-file <template file> ; load set of templates
-print ; if this switch is present the supplied file will be printed. The templates will be deleted when printed but FormEd will remain resident. The appropriate Alias$@PrintType is set up when FormEd is 'seen' so dragging a templates to be printer (should) print the template file although it is better to launch FormEd and print from there where you have more control. Currently FormEd does not intercept the PrintTypeOdd message so doing this while FormEd is already running will launch another incarnation.
Other points
=============
FormEd now intercepts double-click on a templates file after confirming that unsaved templates can be discarded. Note that dragging a templates file on to the icon bar icon has the same effect while dragging the file on to one of the template windows will merge the file with the current set of templates (the new ones taking priority).
FormEd now caches font names properly, detecting any changes to Font$PreFix or Font$Path. Up to 64 fonts can be handled, although this can easily be changed. Similarly FormEd won't die if you refuse to insert the fonts disc on initialisation (although you'll have to mess about unsetting and then resetting Font$Path if you subsequently do decide to use fonts).
The following defaults are defined at the start of the code which may be easily adjusted. Memory is automatically allocated for icons and fonts on top of FormEd's original WimpSlot allocation.
Maximum number of windows - 32
Maximum number of icons in any window - 200 ; nasty things will happen if you try to edit a window containing more than this number of icons.
Maximum number of font names - 64
Memory
=======
FormEd's WimpSlot requirement is currently 80K but it claims about 16K in addition for font menus etc. Memory is dynamically allocated for indirected icons and is cleared when all windows have been deleted.
Summary
========
Though there are a number of deficiencies (as noted), FormEdII does represent a considerable (and badly needed) boost to the power and utility of FormEd. It remains a source of much surprise that Acorn released a program in such bad need of overhaul in the first place.
I expect bugs/irritations - please let me know.
Paul Hodgkinson,
Queen's College,
Oxford,
OX1 4AW
Version 1.81 18/7/91
=============
Only minor bug fixes ...
i) WimpSlot increased to 88K (apologies to the >1 Meg folks). 80K was pushing a bit fine.
ii) Creating/moving a single grid line doesn't turn on centre snapping.