!ColSample 0.04
---------------

 Rob Davison 2001

This program is free. If you find a bug or want an enhancement made then
you can email me at rdavison@xtra.co.nz.


Changes 0.03-0.04
-----------------

Apart from a number of miscellaneous user interface tweaks the only new
feature added is that clicking on the Web representation of the picked
colour inserts it into the keyboard buffer - so it will appear in
whereever window has the 'caret'. Clicking with Select just inserts the
six characters representing the colour 'FFFFFF'. Clicking with Adjust
also inserts a hash character '#FFFFFF'.


What is it?
-----------

This is a very simple tool that lets you grab the colour of any
pixel on the screen.

Run the program and in addition to the program icon appearing on
the iconbar the colour sampler window will automatically open (it
is assumed you'll want to use it when you run it).

Click on the sample button at the bottom left of the window - it
will invert, the mouse pointer will change to an eyedropper and all
desktop activity will freeze. Clicking anywhere on the desktop will
sample the pixel under the pointer and show a zoomed up portion of
the area surrounding it in the window. The arrow keys can be used
to tweak the sample position. To stop sampling and return normal
operation of the computer click 'Menu' or press Escape on the
keyboard.

In addition to clicking on the sample button a colour sample may be
made by pressing Shift-Alt-P (though this won't work if a program
with keyboard focus claims this key combination).

* I may make the key shortcut used redefinable one day.

The three radio buttons down the left side of the window allow you
to select the sample type. The default (single pixel) or two
methods of averaging the eight pixels surrounding the one sampled.

On the right of the window details of the currently sampled colour
are provided. Hopefully this section should be self-explanatory. :-)

You may drag the sampled colour to another program by dragging over
the sampled colour itself (directly above the zoomed region).
However, the receiving application must know how to deal with this
message. Currently, only Composition, NCPaint and the PCA bitmap
painting tools I wrote do so. :-/

-------

Details of the wimp message sent (for programmers):

R1+16 : &8348E Message_PCAMiscOp R1+20 : &83486
SubReason_UseThisColour R1+24 Colour to use (&BBGGRR00 format)
R1+28 Destination window handle or -1 R1+32 Destination icon handle
or -1 R1+36 Destination x coordinate or -1 R1+40 Destination y
coordinate or -1 R1+44 Colour importance (described below) R1+48
Null or a Null terminated colour name

The Colour history provider will send this message when the user
drags a colour from one of its palettes to the applet. The applet
is determined by the window and icon handle when the drag event
ends, in this respect the message is similar to Message_DataSave.
However, the destination window handle, icon handle and coordinates
may be given as -1. This allows the sender to send this message if
the drag is made to an icon within its own workspace which is used
to represent the applet. On reciept, the applet should decide how
to use the colour data given to it and update windows etc. as
necessary. It should not use SubReason_RememberColour as the colour
given it will already appear on the senders colour palettes.

Further details of the protocols involved are provided in:
http://www.geocities.com/SiliconValley/7320/pca/msgs.htm

------- 