Generic Calculator Template 6.0

Introduction

Installation

Usage
 
 
 
 
Introduction
Generic Calculator  6.0 for Clarion 5~5.5~6  Legacy/ABC. White box Procedure Template to add Calculator functionality to your application. In a matter of seconds you can add the Calculator procedure in your application and customize it visually just as normal Clarion window. Usually you will probably use it as a standalone calculator, but it can be used as a lookup procedure or as a part of a complex window as well. Download demo. No template settings - no learning!

 

 
The Generic Calculator Template is a twin brother of our Calendar template
So Calculator is a white box as well - you'll get template which does the job.
No foreign DLLs to ship whatsoever. It means that this Calculator can be made
absolutely indistinguishable from all other windows  of yours.
To do that you do not need to learn template language or read our boring instructions.
Just generate a Calculator procedure and it is yours. You can open Calculator 
window in the window editor and you are free to do absolutely everything.
Change font size to make your Calculator microscopically small of barely fitting the screen.
Play with different fonts, colours, images etc. etc. In a matter of seconds change button layout
Just by stretching - shrinking the button browse box
Download the demo program to see the Generic Calculator template in action
Main advantages:
  • This is white box tool, so you have full control of it
  • It does not use any black box DLLs nor data files
  • It does not need or do any changes to either Clarion native
    or 3d party templates. It's taboo!
  • You can customize it just as normal Clarion window
  • No learning is involved because template has not got any settings at all
  • You should not change standard Clarion templates (no matter Legacy
    or ABC) to make it working
  • Rarely used button Pi replaced with much more useful
    in simple calculations button %
Installation
Run the installation wizard. It will guide you through a few simple steps.
IMPORTANT: If you are using Clarion 5 or 5.5, after selecting Clarion5 or C55 directory wizard
will offer you to install it into C:\Clarion5\Clarion6 or C:\C55\Clarion6 directory respectively.
So do not forget to get rid of last \Clarion6. But even if you do - it is not a problem.
Just uninstall template and run installation once again.
To start using template you have to manually register it.
offer you to install it into C:\C55\Clarion5 directory. Change it to C:\C55
That is basically it. To start using template you have to manually register it.
If you do not know how to do that - VIEW ANIMATED HELP
IMPORTANT: This help was developed with another product of ours - Online
Animated Help Builder. To run it you need a JAVA enabled browser. Both MS Internet
and Netscape Navigator support JAVA, but in earlier versions of IE and in the 6th version
of NS you need explicitly say during installation that you need MS virtual machine or
Java support correspondently. If you have it installed without this support yet it 
does not hurt to run installation again and install those components required. 
This will allow you not only watch our help,  but will help you to discover 
amazing world of Java on the Net. So all of a sudden you will be
able to see millions of wonderful effects instead of ugly rectangles 
which you used to see instead. Try it and you will not be disappointed...
Just in case you could not get your browser to be Java enabled or you just do not
want to bother here is the verbal instruction: Open Clarion (no application must be open). 
Go to menu Setup -> Template Registry ->Register. Select two new templates
abcalc.tpl and  legcalc.tpl and then hit Open button
Using Template
Tree Generic Calculator Template  is a Procedure template 
So use it as any other procedure template, say, Browse one.
If you do not like our default Calculator style you have got two options:
First, you can generate our Calculator in your main DLL where you define all dictionary files,
customize it anyway you want and then call it as external procedure in all other DLLs/EXE
You can go even further and open your customized Calculator window definition (property ->
Window -> ... button). Copy it and paste on top of template window definition
You will easily find it in either abcalc.tpl or  legcalc.tpl  in the beginning of those files
In this case template will generate your window instead of ours every time you use the template
To get started, just open an application and ADD Calculator TEMPLATE PROCEDURE
We installed an example into your Clarion (Clarion5 or C55) Examples/VHCalcul
directory so to get some ideas how to use template you can investigate the source
By default Calculator template generates 4-column button layout. You can easily change
it to 3-, 6-, and 8-column predefined layouts just by stretching-shrinking the browse control.
You can see all of them on the top of this page
Percent Calculations
New present button (%) has very much the same functionality as does respective button
in Windows standard calculator. See picture below for details:
 
You should read the rest of this instruction only if you are not happy with any of those
predefined layouts
To change order of buttons,
  1. Open  the only source embed to customize: embed.txt
  2. Select all file content and copy it
  3. Open template generated Calculator source
  4. Search for $$$$$$$ (for your convenience we marked required embed with those $ signs)
  5. Paste content of the embed.txt file
  6. Put those code triplets in any order you wish. Just keep in mind that their order completely defines order of buttons in the Calculator. So if you've shrunk browse to fit just 2 buttons in a row than first and the second triplets will appear in the first row, third and forth - in the second row etc.
To change text of buttons,
  1. Follow steps 1 to 5 above to create embed
  2. Edit the second row of those triplets to replace default text with anything you want
It goes without saying that you can combine those 2 routines to change both order of buttons
and their text. Investigate example code  for further details. You can find it
in you Clarion Examples/VHCalcul directory
 

 

Copyright (C) 2002 Vivid Help Systems Pty Ltd