
                     ------------------------------------
                                  !Fabricate

                              Andrew Ayre 1996-98

                           Version 1.09 (19-Jul-00)
                     ------------------------------------   

INTRODUCTION...

  When writing applications with DrWimp it has been normal (for me at
least) to make a copy of !MyApp then start adding to it to turn it
into the application that I want.

  Having done this dozens of times now I have got sick of nearly every
time having to add the line for the iconbar icon, the line to load in
an info window, define an iconbar menu, find an info window template
and check the icons numbers, fill in the details, change the
application name in !RunImage and !Run, etc.
  Usually the lines that are added are exactly the same in every case.
So why not add them to !MyApp? Well, some applications (like some of
the DrWimp examples) don't always have an iconbar icon or menu or info
window.

  So, here is !Fabricate. It does all these boring bits for you
automagically if you want them.

  One thing to bear in mind is that everything entered into !Fabricate
can be easily changed in the !RunImage or added later.

  Interactive help applications such as Acorn's !Help are supported.



USING...

  Load in the usual manner by double clicking on the !Fabricate icon.
Click on the iconbar icon to bring up the main window.

  Here is where you enter or alter details. If you are used to using
DrWimp then they all should be self explanatory.

  If you are not familiar with DrWimp, then I suggest you read the
Manual in the Documents folder first. You will find explained there
such essential things as handles which feature in !Fabricate.

  

MAIN WINDOW

i) Application name and Dr Wimp Version number.

The most important bit, which you will probably want to change every
time, is the application name right at the top. Enter the name of your
new application in here, including the pling ! at the start.

The total length of the application name is restricted to 10
characters ( "!" + 9 ) - because !Fabricate also uses this name for
the application's sprite names (and sprite names must not exceed 10
characters).

But note also the warning about it being best to keep the name to no
more than "!" plus 7 characters. The reason is that one of the sprites
automatically produced for your new application is for the iconiser
action and this one has a 3-character prefix "ic_" added - see Dr Wimp
Manual "Iconiser" section.

(This point will not produce fatal errors but will detract from the
final 'polish' of your application.)

The DrWimp Version number will appear in the first REM line of your
new !RunImage (as a reminder). The value that you see here in the main
window is (or should be!) the version number of the Dr Wimp package
that this copy of !Fabricate came with, which will also be the version
automatically inserted into your new application. So you should not
need to alter this number.

ii) Iconbar icon section

  The second section deals with the iconbar icon of your new
application. If you want one then make sure the option icon is ticked
(it is ticked by default). Then you can alter or enter a new handle
for the icon. 'Iconbar%' is the default, but you can change it.
  The percentage % can be missed off then end but I would recommend
leaving it on as the handle is always an integer.

  If you want some text underneath the iconbar icon then enter it. If
you choose to have text under the iconbar icon it will be made
'indirected' so that you can change it later in the program (with
PROCwimp_iconbartext). Also, if you set the value of 'max length' to
be greater than the length of the text you have entered in the step
above, then the iconbar icon will reserve enough space for this longer
length and you will be able to change the iconbar text up to this
extra length in your application coding, if you want.

  (If you want to be able to add text to the iconbar icon later but do
NOT want any showing at the start, then you simply set the initial
text to, say, " " i.e. at least one space - and set the 'max, length'
to the max. size you will need later.)

  Don't forget, if you set the initial iconbar icon text to a null
string then a 'sprite only' iconbar icon will be created and the value
in 'max. length' will be ignored.


Click on the radio icons to choose whether you want the iconbar icon
to be on the left or the right of the iconbar.

iii) Info window

  The third section deals with the info window. If you turn this
option off then no 'info' window templates file will be included. The
handle is as usual and you can enter all the details to appear in the
info window here.

  You can also customise the default text that initially appears in
this section. Choose 'Customise' from !Fabricate's iconbar menu and a
small window will open which allows you to alter the default text of
the Author box. Change this to suit your needs, press OK, and
!Fabricate will show this text in its main window each time you use it
in future

iv) Iconbar menu

  The final section concerns the iconbar menu. You may wish to create
your own using FNwimp_createmenu, but turning this option on will
create a standard two entry Info - Quit menu (with info window as a
sub-menu of the first item) linked to the iconbar icon.

  You can only have a menu if you have an iconbar icon AND an info
window, otherwise you would have either nowhere to attach the menu to,
or no point having the Info item.

  The handle for the menu is as usual.

  Turning the iconbar icon option off and the info window option off
will produce an application the same as !MyApp (but with a different
name if you have specified one).

v) Other items

  To forget all the changes you have made click on Cancel, which
will close the window without any other action.
  
  To go ahead using the values in the various items, click on OK. If
everything you have entered is valid then a save box will appear. Use
it as usual to specify the place at which your new skeleton
application will be created.

 and that's all there is to it ......!
 
 You will find a complete application with a customised skeleton
!RunImage with Basic coding lines duly added to
'DEFPROCuser_initialise', 'DEFFNuser_menu' and
'DEFPROCuser_menuselection' (as well as in Lines 10-50) so as produce
the things you chose in !Fabricates main window. (If you later change
your mind you can, of course, alter these lines - or use !Fabricate
again from scratch.)


!FABRICATE'S ICONBAR MENU

Selecting 'Customise' brings up a small window described in iii)
above.


LAST BIT...

  As !Fabricate has been written to satisfy my needs and includes what
I find I add in almost every application then I don't know if it is
what other people want. Please let me know if you think there is a
common function missing that isn't specific to any type or style of
application.

  See !!ReadMe!! file for distribution conditions.
  

EOF107
