
                   ------------------------------------
                                 CodeTemps

                         version 1.12 (27-Jan-98)

                            Andrew Ayre 1997-98
                   ------------------------------------

INTRODUCTION...

  CodeTemps allows the conversion of window templates created in programs
such as TemplEd into DrWimp function calls. This allows windows to be
defined and created entirely in BASIC using DrWimp, instead of loading them
in from a Templates file.
  The advantage to this is that if you secure your source code so it cannot
be altered, then neither can your windows.

  YOU CANNOT CHANGE THE OPTIONS IN A READ-ONLY FILING SYSTEM

USING...

  Load in the usual way by double-clicking on the icon. CodeTemps supports
interactive help applications such as Acorn's !Help.

  Clicking on the iconbar icon opens the main window, but CodeTemps cannot
do anything until you drop a Templates file (&FEC) onto the main window or
the iconbar icon.

  Once a templates file has been loaded, the main window will show all the
windows defined in the templates file. Click Select over a window name and a
save window will appear, allowing you to save the BASIC code to a file or
straight into your DrWimp application.

VIEWING WINDOWS...

  Clicking Adjust over the name of a window in the main window will display
it. The window will close when you move the pointer away from it.

  Clicking Menu over the name of a window in the main window will bring up a
short menu. Choosing 'view' shows the window in the same way as just
described with Adjust. The window can also be save as BASIC code using the
save window, which is a submenu.

FLAGS...

  The BASIC code for a window will contain one call of FNwimp_createwindow,
and then if there are any icons, a call of FNwimp_createicon for each icon
defined. If an icon uses an outline font then there may be a call of
FNwimp_getfont.

  All the wimp functions require flags to set various options of the window
and the icons, and these flags can be represented as binary (eg.
%000101101101), decimal (eg. 365), or hexadecimal (eg. &16D). You can choose
which base is used from the options window.

  The options window is obtained by clicking on the 'options...' item of the
CodeTemps iconbar menu.

TEMPLED ICON NAMES...

  TemplEd is a template editor which has the facility to give names to icons
using the validation string, as an alternative to using icon numbers.

  For example you may put 'Nwrite' in the validation string of icon 3 in a
window to give it the name 'write'. Normally when saving the window from
CodeTemps as BASIC, the line to define the icon will start with:

  icon3%=FNwimp_createicon(......

  If the 'Use TemplEd icon names' option is turned on in the options window,
then when the window is saved the line will start with:

  write%=FNwimp_createicon(......


NOTE ON USING OUTLINE FONTS...

  If an outline font is used in an icon then CodeTemps will write a call of
FNwimp_getfont for that font and put the font handle into the call of
FNwimp_createicon. If the same font is used later in another icon, for the
same window, then there will not be another call of FNwimp_getfont, as it is
redundant.

  Note however, that if you are converting more than one window for the same
application, and more than one template uses the same font, there will be a
call of FNwimp_getfont for that font for each window. One of these can be
removed. The font handles will be identical.


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

For distribution conditions see the !!ReadMe!! file.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
