
                               ClocHeap
                              Version 1.0
                              March 1994

                       (c) Germano Rossi, Italy

ClocHeap.pas file contains 2 object (THeapView and TClockView) and 1
dialog to choose desktop options.

The unit ClocHeap is intended for Turbo Pascal 7.0 with Turbo Vision
2.0. The source is free and comes with no warranties whatsoever.

I hope that you find this unit useful.


Copyright
---------
You may use this unit for free and pass it on to the other persons as
long as you clearly state, in the header as well as in the code, all
changes made to the original code.

You may not pass along compiled versions of the source, except as
executable files.

You may also upload this package, unmodified, to bulletin boards or
other public access places.

There must be no charge associated with this package, though you may
include the unmodified package as a whole in shareware/freeware
compilations if only a nominal amount is charged for the compilation
disk.


This package includes:
----------------------

A ClockView object that display date and/or time in the upper right
corner (22 char max).

An HeapView object that display MemAvail memory amount in the lower
right corner (8 char max, 95 Mb maximum).

A dialog to choose desktop look (included 25/43 screen mode).


The package consists of the following files:
--------------------------------------------
CLOCHEAP.PAS  The clock and heap unit
TESTCLOC.PAS  The test and sample program

DESKV-US.SRC  The source for english dialog
DESKV-IT.SRC  The sorce for italian dialog
DESKV-US.DLG  -+    The Baldwin Design dialog file to
DESKV-IT.DLG  -+    make dialog international

CLOCHEAP.TXT  This explanation file.


Instructions
------------
There is one demo programs, TESTCLOC. All you have to do is compile and
run it for a quick demonstration.


Porting
-------
The dialog have some help contexts, but now there isn't an help file.

I tested this unit on 2 machines:

- A 386/33 with VGA card and monitor;
- A 486/25 with VGA card and monitor.


Usage
-----

You can see TESTCLOC.PAS for a sample.

To use clock and/or heap in your desktop,

- Add ClockHeap unit to the uses-command;

- in your TMyApp.Init, after inherited Init, add:
      AddClock;
      AddHeap;

- in your TMyApp.Done, add:
      DumpClock;
      DumpHeap;

- in your TMyApp.Idle, add:
      UpdateClock;
      UpdateHeap;

To change the default configuration (Time and heap) you can modify the
roXXX variable before to call AddHeap and AddClock in your MyApp.Init
procedure:

------------------------------------------------------
roHeap     false    don't disply Heap
           true     display heap (default)
------------------------------------------------------
roVideo    false    25 rows (default)
           true     43/50 rows
------------------------------------------------------
roClock    0        nothing
           1        only Time (default)
           2        only Date
           3        Date and Time
------------------------------------------------------
roColor    0        Color (default)
           1        Black & White
           2        Monochrome
------------------------------------------------------
roDate     0        date in MDY format (default)
           1        date in DMY format
           2        date in YMD format
------------------------------------------------------
roSep      0        use . as date separator
           1        use / as date separator (default)
           2        use - as date separator
------------------------------------------------------


If you want users can change the desktop look:

- add in TMyApp.HandleEvent:
    if Event.What = evCommand then begin
      case Event.Command of
      ...
        cmDesk : hdDeskView;
      ...
      end;
      ClearEvent(Event);
    end;


ATTENTION:

The Clock object use the last 22 characters on the first video row. Your
InitMenu procedure doesn't defines a long menu.

The Heap object use the last 8 characters on the last video row. You
InitStatusLine procedure (and related hints definitions) doesn't use the
last 8 characters


Credits
-------
All dialogs designed and generated with Dialog Design 4.1 available on
Compuserve and by anonymous ftp to garbo.uwasa.fi in directory
/pc/turbovis and oak.oakland.edu in /pub/msdos/turbovis; thanks to David
Baldwin.

I found the idea in "Borland(r) Pascal Developer's Guide" by E.Mitchell
and I thinked to make a unit mixing Borland's gadgets unit, some pieces
of sources by Shazam II by Johnathan J. Stein and other pieces of
sources from an HeapViewer program by Ertl, Machholz, Schallmaier (1991)
"Turbo Pascal 6.0 Turbo Vision: Konzepte, Programmierung, Anwendungen".
After I mixed, I make some changes and after again and again; I think
that, now, the results is something more than the sum of those pieces.

Finally, seeing that my english is not good, I used in this text some
sentences from readme.txt file written by Peter Brandstrm for TVToys.
Pardon me, Peter!



Support, Info, Bugs...
-----------------------
Bug reports, enhancements, contributions, credits, postcards and money
are always welcome!

  I have some internet address:
    germano@chiostro.univr.it (preferred)
    germano@vm.univr.it
    germano@mercurio.univr.it

  and 1 bitnet address:
    germano@ivruniv

Surface Mail:
  Germano Rossi
  c/o Univ. Studi - C.I.C.A.
  via dell'Artigliere 19
  37129 VERONA
  Italy
