 |
Version 1.06 beta
Copyright 2007 - 2008 PurpleSwift Software CC
www.purpleswift.com
Updated 12 August 2008 |
This version of CoolButtons is for Clarion 6
and 5.5
only
The visual impact is the first thing that your
users will notice about your application. You spend time and effort
developing excellent software and now CoolButtons provides an elegant
way to make your application look really slick.
CoolButtons provides custom graphics for
all of your
application buttons.
-
3
Button Graphic styles are provided.
-
Your own graphics can easily be added.
-
Special function buttons provided for "Filename
lookup" and "Entry field lookup" etc.
-
Takes less than 1 minute to add to your
application.
-
All graphics can be linked into your
application – single exe, no missing files.
Run the install program
CoolButtonsInstall.exe.
Notes
-
When upgrading, simply install the new CoolButtons
over the currently installed version. It is
not necessary to uninstall the previous version.
The
install program does the following.
-
Copies the CoolButtons files to your clarion
directory as per table below.
-
Adds a shortcut menu for CoolButtons. Start
| All Programs | Clarion 6 Accessories
| CoolButtons
-
Updates the global redirection file as per the table
below.
-
Registers the CoolButtons template.
Scenario 1 : Single exe
-
Click the
Global button and click the Extensions button on the
Global Properties window.
-
Click the
Insert button and then select the EnableCoolButtons Extension.
-
Click OK to
close the global settings dialog.
Scenario 2 : Multi exe with data dll
For the data dll.
-
Click the
Global button and click the Extensions button on the
Global Properties window.
-
Click the
Insert button and then select the EnableCoolButtons Extension.
-
Click the
Advanced tab
-
Check the
This is a multi DLL application
-
Check the
This is the data DLL
-
Click OK to
close the global settings dialog.
For the exe and other dll’s.
-
Click the
Global button and click the Extensions button on the
Global Properties window.
-
Click the
Insert button and then select the EnableCoolButtons Extension.
-
Click the
Advanced tab
-
Check the
This is a multi DLL application
-
Click OK to
close the global settings dialog.
EnableCoolButtons
Extension

Button
Style
This style will be used as the default style for
all windows in your application. Selecting
one of the 3 standard styles results in the
graphic images for that style being linked into
your application.
The "Use INI File" option is provided for
testing button images which are read from disk
each time a procedure is run. This is NOT
intended for normal application use. When
you application is run with this option selected
then a "template" INI file is created and
populated with all the relevant INI entries.
The Custom option is used for adding your own
graphic images. See
Custom
Style for more
details.
Button
Transparency
0
is invisible and 255 is opaque (solid, no
transparency). This transparency
factor is applied to the existing transparency
in the graphics images.
Button Text Font
You may customize your Button text font
settings here. This is very useful because
with dark coloured buttons the default black
text becomes difficult to read.
Button
Colour
The hue (colour) that you select is used to
recolour the button images. Any white,
black or gray in the image is left unchanged.
If you select a RGB colour then the hue (hue
saturation luminosity) of that colour is
calculated and used.
Special Buttons
The Special buttons form is used to selectively
recolour buttons, replace button icons or select
special button images. Include and exclude
filters are provided for ease of use. See
Special Buttons for more details.
Button
Properties
Use this setting to override the default button
properties.
CoolButtons
Extension

Checking the "Disable CoolButtons in this procedure"
will remove all CoolButtons template generated code
from this procedure. This can be used to
exclude individual windows from getting a
CoolButtons
style.

Buttons to Ignore
CoolButtons is NOT applied to these buttons.
Override Button
Buttons may be recoloured, button icons may be
replaced and special button images may be
assigned on a per control basis. See
Override Button for more
details.
Override Button

Button
equate
This identifies the button control to be
modified. Select one from the list.
Button
type
Use the button type to select which button image
to use.
Button Text Font
You may customize your Button text font
settings here. This is very useful because
with dark coloured buttons the default black
text becomes difficult to read.
Button
Transparency
0
is invisible and 255 is opaque (solid, no
transparency). This transparency
factor is applied to the existing transparency
in the graphics images.
Button
Colour
The hue (colour) that you select is used to
recolour the button images. Any white,
black or gray in the image is left unchanged.
If you select a RGB colour then the hue (hue
saturation luminosity) of that colour is
calculated and used.
Replace button icon
If
the button already has an icon then check this
option to replace the icon with another icon.
This can be useful where the new button colour
clashes with the default icon.
Icon
image
Specify the icon file name to use as a
replacement.
Custom Style

Standard Button
Used to set the images for
the normal button. This is required.
See
Standard Button
for more
details.
Lookup Field Button
Optionally replace the
"Lookup Field" images. Note that you can
use the "Lookup Field" images for any purpose
you choose, the "Lookup field" label is just a
label. The same goes for the Lookup File,
Back and Forward Buttons.
Lookup File
Optionally replace the
"Lookup File" images.
Back Button
Optionally replace the
"Back Button" images.
Forward Button
Optionally replace the
"Back Button" images.
Standard Button

Button Images
Enter all the image names
manually here. See
Button Images for
more details.
Button original Hue / Colour
The original hue is used in
the image re-colour process. If none is
supplied then the colour in the center of the
image is used.
Button Images


The
various image heights are necessary because
compressing transparent images yields very poor
results. The beautiful soft edges become ugly
jagged edges.
Special Buttons

Button
type
Use the button type to select which button image
to use.
Button
selection properties
At
least one of the "+" conditions must be met for
the button to have this "style" applied.
If any of the "-" conditions are met then the
button is NOT modified. None of the
condition tests are case sensitive. The
conditions are met if the supplied substring is
found anywhere in each of the button property
strings.
Button Text Font
You may customize your Button text font
settings here. This is very useful because
with dark coloured buttons the default black
text becomes difficult to read.
Button
Transparency
0
is invisible and 255 is opaque (solid, no
transparency). This transparency
factor is applied to the existing transparency
in the graphics images.
Button
Colour
The hue (colour) that you select is used to
recolour the button images. Any white,
black or gray in the image is left unchanged.
If you select a RGB colour then the hue (hue
saturation luminosity) of that colour is
calculated and used.
Replace button icon
If
the button already has an icon then check this
option to replace the icon with another icon.
This can be useful where the new button colour
clashes with the default icon.
Icon
image
Specify the icon file name to use as a
replacement.
The
CoolButtons classes have a lot of methods and
properties. The few that you might like to use are detailed below.
The class is prototyped in the include file Clarionxx\3rdParty\LibSrc\CoolButtons.inc
where you can view the full listing.
 |
 |
 |
 |
| |
Methods |
|
 |
| |
|
AutoFillNames |
(string Prefix, string Ext, long ButtonType=cbSTD_BUTTON) |
cbSTD_BUTTON equate(1)
cbFORWARD_BUTTON equate(2)
cbBACK_BUTTON equate(3)
cbLOOKUPFILE_BUTTON equate(4)
cbLOOKUPFIELD_BUTTON equate(5) |
|
|
 |
| |
|
|
 |
This product is copyright © 2007
- 2008 by PurpleSwift
Software CC. Your application(s) do not require any licensing or
royalties for including CoolButtons.
This
product is provided as-is. Use it entirely at your own risk. Use of
this product implies your acceptance of this, along with the
recognition of copyright stated above. In no way will PurpleSwift
Software CC, their employees or affiliates be liable in any way for
any damages or business losses you may incur as a direct or indirect
result of using this product.
For standalone applications the C60CBNX.DLL
will need to be distributed with your application. This DLL is not
used in Local Mode compiled applications.
For running under Win98 and Win2K you
will need the GDIPLUS.DLL.
If you have used your own graphics images then
these will also be required unless they are linked into your
application.
CoolButtons
supports ABC, Legacy, DLL mode, Local mode and Multi-DLL
applications.
CoolButtons
has been tested under Win98, Win2K, WinNT and WinXP.
For running under Win98 and Win2K you
will need the GDIPLUS.DLL.
Download the latest version of
CoolButtons from
www.purpleswift.com/tools/CoolButtons/CoolButtonsInstall.exe
-
How do
I change the button style at runtime?
To have the graphics images for the other styles
available (compiled in) check the Include all
style images in project option on the advanced
tab. Use the
ButtonStyle property to select the style at runtime.
Suggested embed point : Global Embeds,
AfterCoolButtonsGlobalSettings.
Example : CoolButtonDefaults.ButtonStyle =
cbSTYLE_ROUNDED
-
How do
I change the button colour at runtime?
Use either the
ButtonHue
or the
ButtonColour
property. Please note that to use the
ButtonColour property the ButtonHue property must be
set to -1. Suggested embed point : Global
Embeds, AfterCoolButtonsGlobalSettings.
Example : CoolButtonDefaults.ButtonHue = 0 ! Pure
RED
-
How do I change the button font colour at runtime?
Use the
FontColour
property.
Suggested embed point : Global Embeds,
AfterCoolButtonsGlobalSettings.
Example : CoolButtonDefaults.FontColour =
COLOR:YELLOW
-
How do
I use my own images for the buttons?
You select the Custom button style on the
CoolButtons global extension Settiings tab.
Press the Style Settings button and proceed
from there. See
Custom Style for
more details.
-
What
is the Use INI File option under Button
Style on the CoolButtons global extension
Settiings tab?
This is used for testing a button image set.
In order to generate the "blank" INI entries,
compile and then run your app with this "style".
You can then edit the INI file and fill in all the
button image properties to use for testing.
Note that this is intended for testing only.
-
Why do
I see a rectangular frame around my buttons?
This occurs when you have not included an XP
Manifest in your exe. See App
Settings tab in Global Properties.
-
My app
has many windows and I only want to add CoolButtons
to a few windows. Is there a better solution
than going to each procedure and Disabling
CoolButtons?
Use the Set CoolButtons default setting to
Disabled option on the Advanced tab of the
CoolButtons Global extension. You will
then only need to Enable CoolButtons in the required
procedures.
-
Some
of my procedures that use third-party templates do
not have CoolButtons. How can I add the
CoolButtons extension to these procedures?
Use the Add CoolButtons to all procedures except
SOURCE option on the Advanced tab of the
CoolButtons Global extension. If you open the
extension dialog on the offending procedure then the
CoolButtons template will appear.
Version 1.06 beta (12
August 2008)
-
Added
support for the clarion QBE.
-
Modified the CoolButtons.disable using a Global
variable to work in a multi DLL app.
Note : Global variable is now required to be
declared as type BYTE.
-
Added
version info to DLL's
-
Fixed
bug in template where importing procedures from a
CoolButtons .APP created duplicate CoolButtons
extensions which you could not delete.
-
Added
Clarion 7.0 beta install.
-
Added
runtime object initialization check.
-
Added
Set CoolButtons default setting to Disabled
option. See FAQ 7.
-
Added
Add CoolButtons to all procedures except SOURCE
option. See FAQ 8.
Version 1.05 beta (9
August 2007)
-
Fixed
bug where CoolButtons caused GPF after standard
"confirm delete?" messagebox.
Version 1.04 beta (8
August 2007)
-
Added
support for button resizing.
-
Fixed
bug where "Special buttons" did not work with multi
DLL apps.
-
Revamped images for colour consistency and size.
-
Fixed
bug where re-colouring produced white blotches in
some images.
-
Fixed
bug where the button background was sometimes
corrupted.
Version 1.03 beta (9
May 2007)
-
Fixed
bug where some buttons were drawn with overlapping
graphics and incorrectly sized.
Version
1.02 beta (1 May 2007)
-
Fixed
bug where tall buttons were drawn with trashed
graphics.
-
Removed some OutputDebugString debugging statements.
-
Added
SmallCross.ICO to the install - was missing from the
example.
Version 1.01 beta (26
April 2007)
-
Fixed
GDI handle and memory "leak".
-
Added
support for button icon replacement.
-
Added
support for selectively colouring buttons.
-
Added
support for user graphics as button images.
-
Updated documentation.
-
Updated FAQ's
-
Reduced memory usage.
Version 1.00 beta (12
March 2007)
-
Initial release
|