*******************************************************
*                                                     *
*                 AVIGO GUI Library                   *
*                   Version 1.01K2                    *
*    Designed for Gerard Vermeulen's Freeware SDK     *
*        Copyright (C)1999 Charles "Randy" Gill       *
*           Released as licenced freeware             *
*                                                     *
*            Bug fixes and enhancements               *
*          by Kai Nothdurft (KNO) 2000                *
*         'KNO-changes' are Public Domain.            *
*                                                     *
*******************************************************

LICENCE AGREEMENT:
Use of this software indicates your acceptance to the terms and conditions of
the following legal agreement. This software is 'licenced freeware', it is not
public domain, except the changes and additions, made by Kai Nothdurft (KNO).
The user is granted a non-exclusive licence to use this software and create
derivative works based upon it. The author reserves all rights to the software,
including the right to revoke the licence to use the software from any user at
any time.

The enclosed program can be freely distributed. This means that you have
permission to use, copy or distribute this software and its documentation. You
do not have permission to charge anything other than a duplication fee for
distributing copies of this software.

THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE.  THE AUTHOR DOES NOT WARRANT THAT THE
OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR FREE FROM ERRORS.

IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCIDENTAL OR
COINCIDENTAL, ARISING OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN IF
THE AUTHOR (?)

INTRODUCTION:
This library contains the data structures, functions, and macros to utilize the
objects in TI Avigo's built-in Graphical User Interface (GUI).  It also defines
the macros and functions needed for event-driven program flow.

SYSTEM REQUIREMENTS:
- This library requires version 0.92 Beta 3 Patch 3 or later of the Avigo
  Freeware SDK written by Gerard Vermeulen.
- The KNOTOOLS library (included in this distribution) is required, until Gerard
  integrates it into the fwSDK.
- If you wan't to use the PBITMAP custom control, you need also the updated
  avsys.h and the new bmp2asm.exe, which both are in this distribution, too.

INSTALLATION:

As everytime when you update software, just make a backup of your old version!

1) Unzip AVGUI_K1.ZIP into a temporary directory, using an unzipper, which can
   handle longnames. This ensures, that the case will remain, which really is
   important.
2) If you are using a never version than 0.92 Beta 3 Patch 3 of the fwSDK,
   delete the startup.asm file from the subdirectory 'lib' under the temporary
   directory. If the never version has a never clib.c and avsys.h, it may be
   better to delete the ones from this GUI-kit, use the never ones and hope,
   they fix at least the same bugs. If you get problems, pls. mail me.
3) Copy the 'apps', 'bin', 'inc' and 'lib' subdirectories to the corresponding
   subdirectories under avsdk.
4) All other files are optional. Put them wherever you want.
5) If you used versions, older than AVGUI 1.01K1, you can delete
   .\avsdk\lib\gui.asm.
6) Change to your .\avsdk\lib directory and start a 'avmake clean' and 'avmake'.
   This will create the new libraries from the changed files.
7) To create the demo-apps, you will probably need to edit the 'makefile's so
   that the pathnames listed match your own system.
8) Remember to add 'gui.rel' (with path) to the 'avlink' line of the makefile of
   any new projects you create.
 
The header file and the demo applications are commented.  You may wish to study
them and/or print them out for reference. You may also try to get a copy from
the helpfile from the 'official' SDK. It was downloadable from Avocet some time
ago as part of an update. But don't ask *me* for the file. Good Luck.

FILES INCLUDED:
bin\bmp2asm.exe            - New BMP2ASM.EXE, which can create ASM-files for
                             (compressed) icons.
misc\source\bmp2asm.c      - Sourcecode of the new BMP2ASM.EXE.

inc\avgui.h                - Main AVGUI-library header file.
inc\avsys.h                - Main fwSDK-library header file, with corrected
                             prototype for DrawIcon() and dint().
inc\knotools.h             - Header for lib\knotools.c.

lib\makefile               - This makefile allows you to recreate the whole
                             libraries under 'lib' with avmake.
lib\knotools.c             - Header file of some routines, used by AVGUI.
lib\avagui.asm             - Assembler source code for the AVGUI-library
                             relocatable module.
lib\startup.asm            - Bugfixed startup-routine, which prevents using address
                             0x8020, which otherwise causes Avigo to crash, when using
                             the numberpicker (see below).
lib\avcgui.c               - C source code for the AVGUI-library relocatable
                             module.
lib\clib.c                 - C source with corrected dint(). This is not needed for
                             AVGUI but another bugfix from KNO.
lib\knotools.c             - C source code of some routines, used by AVGUI,
                             which are useful for other purposes, too.

apps\DrawIcon\drawicon.app - The 'DrawIcon' demo app (icontest.app)
apps\DrawIcon\DrawIcon.c   - Source code for 'DrawIcon' app
apps\DrawIcon\DrawIcon.def - Definition file for 'DrawIcon' app
apps\DrawIcon\icon.bmp     - Icon file for 'DrawIcon'app
apps\DrawIcon\makefile     - Make file for 'DrawIcon' app
apps\DrawIcon\skyline.bmp  - Full-screen bitmap.                        

apps\guihello\guihello.app - The 'Hello World' demo app
apps\guihello\guihello.c   - Source code for 'Hello World'
apps\guihello\guihello.def - Definition file for 'Hello World'
apps\guihello\icon.bmp     - Icon file for 'Hello World'
apps\guihello\makefile     - Make file for 'Hello World'

apps\guitest\guitest.app   - The 'GUI Test' demo app
apps\guitest\guitest.c     - Source code for 'GUI Test'
apps\guitest\guitest.def   - Definition file for 'GUI Test'
apps\guitest\icon.bmp      - Icon file for 'GUI Test'
apps\guitest\makefile      - Make file for 'GUI Test'

misc\PBITMAP\pbitmap.c     - The optional PBITMAP custom control.
misc\PBITMAP\pbitmap.h     - Header for the optional PBITMAP custom control.
misc\ptextbox.h            - The PTEXTBOX customized control.

UI Guidelines.pdf          - Document from TI explaining GUI elements.
GUIREAD.ME                 - User licence, installation instructions, and
                             history.


FEATURES:
 o Because most of the code is already in the Avigo, the library requires
   little memory; just 4195 bytes of ROM and 245 bytes of RAM!

 o Your app can use the system pickers, such as the Standard/T9 keyboard
   and the Number keyboard (that works like a calculator). You have
   access to the standard Avigo clipboard facility.

 o The library is designed to make it fairly easy to create custom or 
   customized controls.

 o Also, if you have source code written for the official SDK, it can be
   ported over with just a few changes.

 o Finally, your app will have the same 'look and feel' as the built-in
   programs.

SUPPORT:
The author will attempt to answer questions about this library sent via e-mail
to rdgill@earthlink.net (put AVGUI in the subject line for the fastest
response). Since the author did not create the GUI system, but rather designed a
way to access it, you may find it most helpful to ask questions of those with
experience using the "Official SDK".  You may wish to try the 'avigodev' mailing
list, at egroups.com. Author's Website: http://home.earthlink.net/~rdgill/avigo

Since I had no success, reaching Randy, for the whole last month, you can try to
contact me, Kai Nothdurft via the 'avigodev' mailing list at egroups.com or by
sending an e-mail to KNothdur@ifu.Rantzau.de.

REVISION HISTORY:
11/19/1999 - Version 1.00: First public release of Avigo GUI Library.

11/21/1999 - Version 1.01: Problem with 'crt.rel' had been discovered, causing
                           NumberFields to reset Avigo.  This release included
                           compatible version of 'crt.rel'.  Demo app 'guitest'
                           rebuilt to function correctly.

02/10/2000 - Version 1.01K1: first KNO-release.
           - AVGUI needs much more memory than before: +3804 bytes of ROM and +8
             bytes of RAM. This is caused by reimplementing some controls, which
             are unusably buggy in the OS-code.
           - Added PTEXTFIELD support.
           - Added PDATEFIELD support.
           - Added PTIMEFIELD support.
           - Added PLABEL support.
           - Changed GUITEST.APP to reflect new capabilities.
           - Added optional PBITMAP support.
           - Fixed DrawIcon() prototype.
           - Changed BMP2ASM.EXE which can now create asm-files from 'any'-sized
             monochrome-bmps for DrawIcon(). It can create normal and compressed
             icons. Try bmp2asm.exe without parameters. In the demoapp
             (DrawIcon), the skyline.bmp uses as normal icon 4783 bytes and as
             compressed Icon just 1393 bytes!
           - Changed MK_FAR_PTR into macro, to get every time correct RomBank().
           - Fixed picker-promblem, where cursor and character appears on next
             line.
           - Picker now shows the PickerTitle you can submit with the
             Create...-functions.
           - Fixed Numberfield-Picker Problem, where changing a number causes
             the Avigo to crash.
           - DT...-types (DTREAL, DTINTEGER, etc) are already defined in
             avdata.h, so the definitions from avgui.h are removed. If you are
             using the PNUMBERFIELD, you have to #include <avdata.h>.

10/15/2000 - Version 1.01K2: second KNO-release.
           - AVGUI needs a little more memory for the new features:
             +16 bytes ROM. No change in RAM-usage.
           - Added PCONTROLMENU support. Please look in GUITEST.C and AVGUI.H.
           - Changed GUITEST.APP to reflect new capabilities.
           - Fixed dint().
