                                 Shaded Buttons
                                 --------------
                                 v. 0.1 (1997)
                                 by Hubert Chan

WHAT IT IS
----------
  It is a new window class that creates buttons with a rounded look by using a
gradient pattern, so that the top of the button is lighter and the bottom is
darker.  Buttons can also have rounded sides, they can have icons, and they can
be vertical (so that the gradient pattern goes from left to right instead of
top to bottom).  IMHO, it looks a lot nicer than normal push buttons.

  Included is a sample program, modified from Petzold's "OS/2 Presentation
Manager Programming".  It's a simple window with three buttons: two in the
middle with arrosw pointing in or out, and one at the bottom labeled "Status
Bar".  The buttons in the middle, when pushed, either shrink or enlarge the
window.  The status bar just sits there. (I might later make it report the
window size, but I'm in no hurry, since this is just a demo program.)
NOTE: Although the file extension for the source file is .CPP, it's just a
normal C file.  The only difference is it uses C++'s '//' comments.

  I have included the source file.  (I won't after I take this out of beta.)
Feel free to modify it as you please for your own programs.  If you can fix any
bugs, or if you change/add anything that you think may be helpful, send it to
me.  At my discretion, you may be automatically registered for version 1.0-1.9.
Of course, this will depend on whether or not I have already done this, or if
someone else has already done this, or if I do in fact eventually use this.
Especially, help would be appreciated in getting this to work in a .DLL.

HOW TO USE IT
-------------
  Include Buttons.H in your source file.  To register the class with the
Presentation Manager, call RegisterShadedButtonClass.  The class name is
"GradButton", or you can use SHADEDBTNCLASS.  To make a button, call
WinCareateWindow as you normally would to create a button.  Valid button styles
are:
    GBT_NOLEFTLINE  -removes the border on the left side of the button
    GBT_LEFTROUND   -makes the left side rounded
                     (not yet implemented)
    GBT_NORIGHTLINE -removes the border on the right side of the button
    GBT_RIGHTROUND  -makes the right side rouded
                     (not yet implemented)
    GBT_VERTICAL    -makes the button vertical (left to right gradient pattern)
                     NOTE: NOLEFTLINE/LEFTROUND will change the top of the
                     button and NORIGHTLINE/RIGHTROUND will change the bottom
                     of the button if VERTICAL is set.
                     (not yet implemented)
    GBT_GRAPHIC     -uses an icon instead of text
                     uses button "text" as the id number of the icon (probably
                     will be changed to be more like the normal push button)
                     (not tested - may not work)
    GBT_NOPUSH      -makes the button non-pushable
  When the button is pushed, it will send a WM_COMMAND message to its owner,
just like a normal push button does.  It can also be activated by hitting the
space bar when it has the focus.

KNOWN BUGS
----------
  - The button does not display correctly when it is disabled.  It's supposed
    to have gray text, but it stays black.

COMING SOON (?)
---------------
(Things I have to add or change)
  - make the rounded sides work (I haven't decided how exactly to implement
    this)
  - make vertical buttons work
  - use Presentation Parameters to have different colours, fonts, etc.
  - allow text and bitmaps to be in the same button
  - display button differently when active (I haven't decided exactly how it
    should look when active)
  - put it into a .DLL file (I tried, but my linker didn't want to do it)
  - change the name

THE AUTHOR
----------
You can e-mail me at <hyc@gpu.srv.ualberta.ca>, or snail mail me at
  Hubert Chan
  3 Falstaff Ave.
  St. Albert, AB
  Canada, T8N 1V3
Send me comments, criticism, or $$$ :).

I have a home page set up at http://www.ualberta.ca/~hyc/.  The newest version
of "Shaded Buttons" will always be there, once I get enough time to actually
set up my page right.  (Right now it contains a total of 10 words, two of them
being "Under Construction" :) )

COST
----
  Right now "Shaded Buttons" is free for any use as long as you don't modify
it in any way.  Giving me credit in any program you use it in would be nice,
though.  Money would also be nice.
  Once I take this out of beta, I will start asking for money.  Anyone who
sends me money right now will be automatically registered _at least_ for
v. 1.0 - v. 1.9.  (By "money", I mean reasonable amounts of money.  Don't
send me 25 and expect to be registered.)

WHERE TO GET IT
---------------
From my home page: http://www.ualberta.ca/~hyc/
From Hobbes: http://hobbes.nmsu.edu or ftp://hobbes.nmsu.edu
These are the only places that I will put the files in.  Feel free to upload it
to other sites.
