![]() |
![]() |
||
![]() |
|||
| Version
www.capesoft.com |
|
||
Introduction
Installation
What's New (Important)
JumpStart
Examples
Adding Progress to your application
Updating Progress inside a Loop
Optimising Performance
Using Draw and Progress in Multi-DLL applications
FAQ
Support
Purchasing
Progress
Distribution
The
Global Progress Extension
![]()
Global
General Tab
![]()
Global
Properties Tab
![]()
Global
Classes Tab
Shading Options
The Progress Control Template
General Tab
Properties Tab
Classes Tab
The
Preview Button
Progress
Bar Types and Styles
Resizing the Progress Control
Class
Method Reference
Class
Property Reference
Version
History
License
& Copyright
![]()
| Introduction | |||
![]() |
The CapeSoft Progress control allows you to use custom progress
controls, which provide a variety of different shading and style options.
In addition it allows real-time previewing of any changes. No hand coding
is required to use the progress control, and replacing all existing progress
controls in your app is as simple as adding a global extension. CapeSoft
Progress is built on the fast, robust CapeSoft Draw engine,
and is shipped as source code, hence you need capeSoft Draw in order to
use Progress. See the Draw
Page for more information on Capesoft Draw. |
||
Please install CapeSoft
Draw 2.14or higher before using CapeSoft Progress.
Run the supplied installation file. CapeSoft Progress adheres to the standards
laid out by by the C3PA (Clarion 3rd Party Association)
for 3rd party Accessory installation:
Template (progress.tpl) - Clarion\3rdparty\template\
Source code (progress.clw and progress.inc) - Clarion\3rdparty\libsrc\
CapeSoft Progress requires CapeSoft Draw (2.14 or later), without Draw it will not function. Please insure that you have CapeSoft Draw installed before using Progress.
Important
![]()
1) Progress requires Draw 2.13 or later Progress 1.14 and Draw 2.13 added template options for multi DLL applications that require that both accessories are updated. This only applies to versions of Progress prior to 1.14 and Draw prior to 2.13. 2) Clarion 5 Users When upgrading from version prior to Draw 2.14 and Progress 1.14 you need to add the following define to your project (Project->Properties->Defines Tab): DrawDLLMode=>0 If you don't add this define you will GPF your application. This only applies to Clarion 5. Clarion 5.5 and up support adding this option automatically, which Draw and Progress do when you add either of the global extensions to your app. |

Using
CapeSoft Progress in your program is really easy. This quick start is divided
into two sections. The first section covers using CapeSoft Progress to replace
all the existing controls in an application using the global template. The second
section covers adding a single progress control to a window.
Adding Progress to an existing application (Globally)
CapeSoft progress makes it exceptionally easy to replace all the boring old progress bars in your application with spiffy new Progress controls.
Hint: Each window procedure that uses progress controls will have a local progress extension added to it, you can use this to override the global settings for that individual procedure.
Adding a Single Progress Control
|
Note: When using PROP to get the runtime properties of the
control, do no use the Clarion control handle, for example:
myWidth = ?myProgress{
PROP:Width}
may return the incorrect value
for the width of the control. Instead you should use the thisProgress.control
property to access runtime properties. Example:
progressWidth
= thisProgress.control{PROP:Width}
progressXPos = thisProgress.control{PROP:Xpos}
If you set the PROP values using
the Clarion progress control handle then the Progress object will update itself,
and in doing so may overwrite the properties of the Clarion
control. This only applies to {PROP:Width}, {PROP:Height}, {PROP:Xpos} and {PROP:Ypos}.
![]()
There is an example in your \Clarion\3rdParty\Examples\Progress\Demo directory. The example is a great way to get started and see a few of the ways you can use CapeSoft Progress.

In addition there are two simple examples of using Progress: Global.app and Single.app. They are in the Examples\Progress\JumpStart and Examples\Progress\Single directories respectively.
Global
The global.app example demonstrate how you use Progress to override
existing progress controls simply by adding the global extension and leaving
the "Replace all progress controls" tickbox checked (which it is by
default). It also demonstrates unchecking the "Use Global Properties"
checkbox on the Local Progress Extension in order to override the progress control
properties for that particular procedure.


Single
The single.app example demonstrates adding a single CapeSoft Progress
control to a window, it is essentially the result of following the JumpStart
guide for adding a single custom progress control to a window.
Adding a CapeSoft Progress to your application is easy. If you would like to
replace all the progress controls in your application with CapeSoft progress
controls then add the Global Progress Extension (see 1. below). You can also
simply add a CapeSoft Progress control to your window (see 2. below).
1) Adding the global Progress extension:
Important: When using PROP to get the runtime
properties of the control, do no use the Clarion control handle, for example:
myWidth = ?myProgress{
PROP:Width}
may return the incorrect value for the width of the control. Instead you should
use the thisProgress.control property to access runtime
properties. Example:
myWidth
= thisProgress.control{PROP:Width}
myXPos = thisProgress.control{PROP:Xpos}
If you set the PROP values using the Clarion progress control handle then
the Progress object will update itself, and in doing so may overwrite the
properties of the Clarion control. This only applies to {PROP:Width}, {PROP:Height},
{PROP:Xpos} and {PROP:Ypos}.
In most cases the Progress control will be updated automatically, however when a bar needs to be updated inside a loop (such as looping through a number of records) it is necessary to manually update the progress bar in order for it to be displayed.
Example:
loop
i = 1 to Records(myQueue) !
loop through a queue
Get(myQueue, i)
myFile.id = myQueue.id
if Access:myFile.Insert()
!
handle the error
end
thisProgress_p1.SetProgress(i) !
update the progress control
Display(thisProgress_p1.control) !
display the updated progress control
end
Draw and Progress provide options on the global extension to make using Draw and Progress in multi DLL applications simple. For the Data DLL you need to add the global extension, and for every other app file that uses Draw and Progress exported from that DLL, you should add the the global extension and tick the "Use Draw that is exported in another DLL" option.
If you are not familiar with Multi-DLL development, or you need to create a new Multi-DLL from scratch rather than adding the extensions to existing applications the steps are as follows:
Data DLL
The Multi-DLL example in the \3rdparty\examples\Progress\ folder in your Clarion directory demonstrates this.
Versions of Progress prior to 1.11 used a "Double Shaded" progress bar as the default bar type. This type of bar calculates the shading per pixels, for every pixels on the progress bar, every time the bar is redrawn. Progress 1.11 changes the default bar type to a Block Bar, which dramatically increases the performance and only needs to drawn the bar once. Block Bars also have the advantage that they can be based any type of shaded bar, simply create a shaded bar and set the blockBar property to 1.
1) Do I need to purchase CapeSoft Draw?
Answer: Yes, CapeSoft Progress uses CapeSoft Draw, which allows us to
ship both Draw and Progress as source code. Progress is an example of a few
of the many features which Draw allows you to add to applications. This also
means that Progress is fully customizable and extensible. For more about CapeSoft
Draw visit the Draw
page at the CapeSoft web site. Question 4 and 5 are the most frequently
asked questions about progress and have been highlighted in red.
2) I get the compile error "Make error: Source file Draw.clw not found".
Progress requires
CapeSoft
Draw, please make sure you have Draw installed before compiling your app.
3) When I compile I get a number of errors of the form "unknown field self.baseLayer."
You have an old version of Draw, Progress requires CapeSoft Draw 2.05 or later. See the CapeSoft Draw page for the latest version of Draw.
4) The
progress bar doesn't get displayed - it is just blank.
See the section on Updating Progress Inside a Loop
5) The Progress bar looks good, but it seems to slow processing down, how can I make it faster?
See the section on Optimising Progress
6) One of my progress controls just doesn't seem to behave, what can I do?
Email support@capesoft.com and please include the parameters that you have set (such as the various colors, draw directions etc. You can simply send JPEG, GIF or PNG screen shots of the settings tabs if you prefer), we will whip the slack progress control into shape ASAP and send you an update.
7) I really want a super nifty polka dot progress control, what can I do?
Progress is fully extensible, so you can add as many progress bar types as
you like (by modifying the Display() method), alternatively Email
support@capesoft.com
and we will add it to the list of supported progress bars, as well as adding
it to the real time previewer and template options.
![]()
| CapeSoft Support | |||
|
|
|||
| Telephone | +27 21 715 4000 | ||
| Fax | +27 21 715 2535 | ||
| Snail Mail | PO Box 511, Plumstead, 7801, Cape Town, South Africa | ||
Progress is available from:
| Buy Online | |||
|
Purchase CapeSoft Progress from: NOTE: CapeSoft Progress requires CapeSoft Draw. |
![]() www.clarionshop.com |
||
| CapeSoft Sales | |||
| Web | www.capesoft.com | ||
|
|
|||
| Telephone | +27 21 715 4000 | ||
| Fax | +27 21 715 2535 | ||
| Snail Mail | PO Box 511, Plumstead, 7801, Cape Town, South Africa | ||
See Adding Progress to you Application for information
on how to add the Global Extension. The global extension allows you to set the
defaults for all CapeSoft progress controls that you populate, as well as allowing
you to change all the existing progress controls to CapeSoft progress controls
(and set the options that the controls will use). The global and local extension
have identical options, with the exception of the Global "General"
tab which allows you to use Progress globally, or disable Progress globally.
Once you have added this to your app each Window that uses Clarion progress
bars or CapeSoft Progress bars will have a local template that allows you to
override the global setting on a procedure level. On the local template the
"Use global settings" box is ticked by default, untick this box to
use the setting on the Properties tab of this extension for the procedure.
| Global General Tab | |||
![]() |
Use Progress for all progress control in app This allows you to use CapeSoft progress to replace all the existing Clarion progress controls in your app. The controls will use the global properties specified on the other tabs. Disable Progress in this application Disables all Progress code, useful for debugging to ascertain whether an issue is being caused by Progress. Preview Button This allows you to modify the global setting for Progress, and see the result immediately displayed on a progress control. See the section on The Preview Button for more information. |
||
| Global Properties Tab | |||
|
RangeHigh and RangeLow Note: See the section on Types of Progress Bars for information and examples of the effects of the various settings below. Pulse Bar |
|
||
|
Pulse Width OneSided LeftColor RightColor/TopColor/BottomColor xpercentage/ypercentage intensity startColor and endColor depth/eColor Note that cylinders can only be drawn with a shading type that draws
the highlight down the length of the cylinder, so top to bottom shading
with no highlight, or left to right shading with a highlight (ypercentage
> 0). setBoxLine
Block bars use the shading settings to draw the bar once and then copy it block by block from a hidden Draw layer. If you change the shading options manually (i.e. you are hand coding the progress bar) make sure that you set the progress.barDrawn property to 0. You can easily make bars that look like XP bars on all versions of windows:
The leftColor and rightColor were set to 4766553, intensity was set to 60 and ypos to 30, blockBar was set to 1 and the default blockLength an blockGap were used. blockLength blockGap |
|||
| Global Classes Tab | |||
![]() |
Class You can specify your own class to use for the progress control, by default the csprogress class is used. |
||
| Shading Options | |||||||
|
Shading options allow you
to change the way the colors selected are applied, depending on the shading
option selected you can create a variety of different shadings: Vertical Shading (left to right) - single and double shading
at 100% intensity:
Note that cylinders can only be drawn with a shading type that draws the highlight down the length of the cylinder, so top to bottom shading with no highlight, or left to right shading with a highlight (ypercentage > 0). See the section on Progress Control Styles for a full description of the different types of progress controls possible. |
|||||||
![]()
These options can be set after placing an progress control on your window and
choosing to populate it using the CapeSoft Progress template, as described in
Adding Progress to Your Application. The available options
are identical to those available on the Global Extension, with the exception
of the option to apply Progress to all progress control in your application
, and the option to disable progress throughout the application (which are only
on the Global Extension). See the section on the Global Extension
for more information.
Right click on the Progress control and choose click on "Properties",
then click on the "Actions" tab, here you can customize the Progress
control's settings, such as giving the progress object a name.
| Properties Tab | |||
![]() |
RangeHigh and RangeLow See the section on Types of Progress Bars for information and examples of the effects of the various settings. Pulse Bar Pulse Width OneSided |
||
LeftColor RightColor/TopColor/BottomColor xpercentage/ypercentage intensity startColor and endColor depth/eColor
setBoxLine blockBar Block bars use the shading settings to draw the bar once and then copy it block by block from a hidden Draw layer. If you change the shading options manually (i.e. you are handcoding the progress bar) make sure that you set the progress.barDrawn property to 0. You can easily make bars that look like XP bars on all versions of windows:
The leftColor and rightColor were set to 4766553, intensity was set to 60 and ypos to 30, blockBar was set to 1 and the default blockLength an blockGap were used. blockLength blockGap |
|||
![]()
You are achieve a large variety of progress bars using the options provided by the template. The best way to find out just what Progress can do is by using the Preview button on the General tab. This allows you to see your change in real time. Bear in mind that some setting override all others, in the following order:
Range
RangeHigh and RangeLow need to be set regardless of the type of bar you are
using.
Orientation
Orientation determines the direction that the bar progresses toward, and applies
to all types of bars. The options are progress:right (the default),
progress:left, progress:up and progress:down.
Pulse Bars
Pulse bars create a "pulse" that fades from a center color
to the background color and moves along the progress bar. The color can be specified
in the Color field when the Shading Option radio
button is set to None on the Colors tab. When "pulse
bar" is checked on the "General" tab a pulse bar will always
be drawn, regardless of any changes to the settings on the "colors"
tab. To draw any other type of progress bar untick the "pulse bar"
checkbox. Check the "One sided" box to only draw the fade on the end
of the "pulse", so the front edge of the pulse does not fade into
the background.
![]()
Shaded bars
Shaded bars can be shaded top to bottom or left to right (regardless of whether
the bar is horizontal or vertical). They come in a number of varieties:
1 ) Solid Color - no shading
2) Linear shading from one color to another - accomplished by setting the left
and right colors or the top and bottom colors.
In addition the Shading Options group allows you to use "Single Shading"
and "Double Shading":
Single Shading
Single shading shades the bar from one color to another but with a highlight
in the middle (the position of which you can specify using the xpercentage and
ypercentage fields), and the intensity of which you can specify by using the
intensity field. If the shading is left to right specify a ypercentage for the
highlight, if the shading is top to bottom specify a xpercentage.

Double Shading
Double shading shaded from one color to another with a highlight shaded
in the opposite direction to the color shading. If the shading is left to right
specify a xpercentage for the highlight, if the shading is top to bottom specify
a ypercentage.
![]()
A nice effect is to use double shading with one color set to white, this make the bar appear to fade into the background as it progresses:

Cylindrical Bars
Cylindrical bars are shaded bars where an ellipse color (red
in the example below) and ellipse depth have been specified.
Instead of a standard shaded bar, a shaded cylinder is drawn. Note that cylinders
can only be drawn with a shading type that draws the highlight down the length
of the cylinder, so top to bottom shading with no highlight, or left to right
shading with a highlight (ypercentage > 0).
setting depth = 8 and eColor = color:red on a double shaded bar (leftColor, rightColor and ypercentage and intensity specified):

Color Change Bars
Color change bars fade from one color into another as they progress, simply
specify a Start Color and End Color to use
a Color Change bar.

Important: If you change the startColor and endColor yourself after the call to progress.Init() you will need to set the progress.init property to zero. This will force the progress object to recalculate the color increments with the new colors you have specified.
Example:
! after the
window has opened and the call to progress.Init()
! you might want to change the startColor and endColor properties.
if
myBarStyle = 1 !
check some condition
myProgress.startColor = color:red
myProgress.endColor = color:green
else
myProgress.startColor = color:blue
myProgress.endColor = color:lime
end
myProgress.init = 0 !
force the object to re-calculate the color increments with the new colors.
Block bars (Windows style progress bars)
The blockBars setting allows any shaded progress bar to be broken up into blocks - similar to the default windows progress controls.
To use blockBars set the blockBar property to 1. The width of each block is specified by blockLength, and the gap between blocks by blockGap.
![]()
Block Bars are also very efficient as the shaded bar is only drawn once, and each block is then simply copied off a hidden Draw layer. This results in a significant speedup, especially with double shaded bars. You can also create bars that look like the Window XP bar under any version of Windows. See the progress Demo example app for examples of XP look bars.
When Progress replaces the Clarion progress control it sets its width and height to zero. In order for Progress to be able to tell that the control needs to be resized the Draw control created at runtime by progress needs to be resized, at which point Progress will update itself. Note that progress will keep track of the position of the Clarion control as well as whether it is Hidden and update the Progress control accordingly.
You can do this manually simply by using progress.control property to access the control Progress is actually drawing to:
thisProgress.control{PROP:Width}
= 100
thisProgress.control{PROP:Height} = 10
Bear in mind that the progress.control property is the handle of a standard
Clarion image control, so the units will be the current units being used on
the target window (dialog units by default). In order use pixels you should
set the target{PROP:Pixels} = 1, for dialog units set target{PROP:Pixels} =
0 (the default for Clarion windows).
By default you can simply specify a Use variable for the progress control,
in which case you will not need to call any methods manually. You can call SetProgress()
manually, which updates the control and redraws it. You will also need
to call SetProgress() if you need to update the control inside a tight loop.
SetProgress(long progress)
Parameters:
progress: A value to set the current to progress to. The value should
be between RangeHigh and RangeLow. If this parameter is omitted the current
Use attribute will be use, if {PROP:Progress} is being updated manually, the
Use attribute will be zero and the value of {PROP:Progress} will be used.
Example:
thisProgress.SetProgress(50)
If the RangeHigh and RangeLow are left as the defaults (The default RangeHigh
is 100 and the default RangeLow is 0), then SetProgress(50) will set the progress
bar to halfway and display it.
Init(long control)
Initializes the Progress control by calling the Draw Init() method. You should
not call this. If you are hand coding you will need to call ReplaceControl().
parameters:
control: The handle to the progress control to use for progress control.
ReplaceControl(long controlHandle)
Replaces the Clarion progress control with a CapeSoft Progress control and calls
Init().
Kill()
Destroys the Progress control, called by the template when the window closes.
Unless you are hand coding you don't need to ever call this method.
control
The control property allows you to access the runtime properties of
the Progress control that is being drawn to. When using PROP to get the runtime
properties of the control, do no use the Clarion control handle, for example:
myWidth
= ?myProgress{PROP:Width}
may return the incorrect value for the width of the control. Instead you should
use the thisProgress.control property to access runtime
properties. Example:
progressWidth
= thisProgress.control{PROP:Width}
progressXPos = thisProgress.control{PROP:Xpos}
If you set the PROP values using the Clarion progress control handle then the
Progress object will update itself, and in doing so may overwrite the properties
of the Clarion control. This only applies to {PROP:Width},
{PROP:Height}, {PROP:Xpos} and {PROP:Ypos}.
baseControl
This is the handle of the Clarion progress control being replaced
by the CapeSoft Progress control.
Other Properties:
You can set these simply by right clicking on the control and choosing "actions",
or setting the options under Global Properties. However for completeness the
class properties are listed below.
rangeHigh long
The maximum value of the progress control.
rangeLow
long
The minimum value of the progress control.
orientation
byte
The direction that the control draws in, can be set the following values:
progress:left
equate(0)
! Draws from right to left
progress:up
equate(1)
! Draws from the bottom up
progress:right
equate(2)
! Draws from Left to right
progress:down
equate(3)
! Draws from top to bottom
leftColor long
The shading color on the left hand side of the bar
rightColor long
The shading color on the right hand side of the bar
topColor long
The shading color at the top of the bar
bottomColor long
The shading color at the bottom of the bar
startColor
long
This is the start color of progress bars that shift color from startColor
to endColor as they progress. When startColor or endColor is set a incremental
control is always drawn, to draw a shaded bar starColor and endColor should
be cleared to -1 (color:none).
endColor
long
The final color to shift towards.
depth
long
The depth of end ellipse of the cylinder.
eColor
long
The color of the end ellipse of the cylinder.
pulseBar
byte
If this property is non zero then a pulse bar is drawn.
pulseWidth
long
The width of the "pulse" that moves along a pulse bar progress control.
oneSided byte
Whether the "pulse" fades to the background color on one of both
sides. Default is that oneSided = 0 and the pulse fades into the background
on both sides, setting oneSided = 1 will only fade the pulse bar towards the
"back" of the pulse - the edge facing the direction of forward movement
will be a hard edge with no fade.
setBoxLine byte
If setBoxLine = 1 then a color changing bar has the box line set to the
current color each time it is drawn, if setBoxLine = 0 then the box outline
is drawn in the StartColor.
barDrawn byte
Used by when drawing bar types that draw the entire bar once. For example
blockBars draw the entire shaded bar to a hidden Draw
layer and copy each block as necessary. If the shading options are changed
![]()
Version 1.20 (10 November 2008)
Version 1.19 (30 March 2006)
Version 1.18 (14 April 2006)
Version 1.17 (23 February 2006)
Version 1.15 (09 June 2005)
Version 1.14 (11 January 2004)
Version 1.13 (23 November 2004)
Version 1.12 (02 November 2004)
Version 1.11 (04 November 2003)
Version 1.10 (28 October 2003)
Version 1.05 Beta (17 September 2003)
Version 1.04 Beta (09 September 2003)
Version 1.03 Beta (02 September 2003)
Version 1.02 Beta (19 August 2003)
Version 1.01 Beta (12 August 2003)
Version 1.00 Beta (05 August 2003)
![]()