Return to Claw Introductory Edition Download page
Claw Introductory Edition - Instructions
(The following is the contents of the Readme.Txt file included with the Claw Introductory Edition).
Welcome to the Claw Introductory Edition.
Claw is the Class Library for Ada 95 and Windows. It works with any complete Ada 95 compiler for Windows, generating applications for Windows 95, 98, 2000, ME, and NT.
[To make the lawyers happy, we have to mention that Windows 95, Windows 98,
Windows 2000, Windows ME, and Windows NT are trademarks of Microsoft. All
contents of the .Zip files are
Copyright 1996, 1997, 1998, 1999, 2000 R.R. Software, Inc.
P.O. Box 1512, Madison WI 53701
All rights reserved.
R.R. Software, Inc. grants to all users the right to use this introductory edition for evaluation and non-commercial development purposes. There is no time limit on the use of this introductory edition as long as it is not used for commercial development purposes; commerical evaluations are limited to 30 days.]
Claw provides an object-oriented Ada interface to the Windows GUI. This interface was designed from the ground up for use with and from Ada 95. It makes extensive use of Ada 95 features like tagged types, finalization, general access types, exceptions, default parameters, private and child packages, and abstract types. This produces an Ada-friendly view of Windows programming.
Claw is a so-called "thick binding". It gives the experienced Ada programmer a way to add the power of Windows to the existing power of her Ada style programs. This is in contrast to a "thin binding", which is convenient for Windows experts, coding Windows-style but using an Ada compiler. "Thin bindings" require knowledge of the original language of the interface, since details of that language are exposed, and complete documentation for the interface in Ada is rarely available.
Claw handles many of the mundane details of building a Windows application, freeing you to concentrate on your application. In addition, since knowledge of another language is not needed to use Claw, you can avoid the perils of mixed language programming.
Claw is also portable. The Claw system can be compiled on any Ada 95 compiler for Windows 95/98/2000/ME/NT with a minimum of changes. The code you write (using Claw) can be completely portable from one Ada 95 compiler to another. This means that programs using Claw aren't locked into a single compiler vendor, decreasing project risk.
We have provided versions of the Claw Introductory Edition tailored for specific compilers to make it easy to try Claw. The complete edition of Claw comes with versions for all of the supported compilers, an installation tool that makes it easy to install Claw for a specific compiler, as well as documentation on the simple changes needed to produce a custom version of Claw for any Ada 95 compiler.
This introductory edition of Claw includes a portion of the complete Claw interface. An introductory version of the Claw GUI Builder is also available. (Install the Claw Introductory Edition before attempting to install the GUI Builder.) The Builder has its own installation instructions.
At this writing, the complete Claw version 1.3 interface includes more than 135 packages containing over 120 reusable object types, with more than 2400 user-accessible subprograms. These include advanced Windows features such as the registry, sockets, tooltips, toolbars, help files, and tree views. Future versions of Claw will contain even more packages, types, and subprograms to support additional Windows features.
The Claw Introductory Edition has six complete example programs included. Shapes demonstrates the use of Claw to build a graphics application, AdTest shows a simple multitasking billboard program. BigJob shows how a Windows interface can be easily added to an existing 'big' Ada 'job' (program). TestCC shows how Claw can easily set and change the colors, fonts, and other characteristics of controls. Diners shows a GUI solution to the dining philosophers problem (yes, it does deadlock occassionally). Smplsrvr demostrates the construction of a simple web server using Claw (and also demonstrates that Claw can be useful even for programs not using a GUI). [See the Smplsrvr notes below.]
The example programs include examples of most of the important functional areas in Claw: Windows, Controls, Dialogs, Tools, and Canvases. Since the implementations of the different varieties of these items are rather similar, the introductory edition includes only a few examples of each item.
To get help using the Introductory Edition of Claw, send a message to the public Claw mailing list, Claw@rrsoftware.com. To see answers, announcements, and have discussions with other Claw users, join the list by sending a message with the body "Join Claw" to firstname.lastname@example.org.
For more information on the complete version of Claw, contact our sales department at 1-800-722-3248 or 1-608-245-0375 or by E-Mail at email@example.com or on the web at www.rrsoftware.com.
Compiling the introductory edition.
Find the section for your compiler below:
Janus/Ada: You must have Janus/Ada 3.1.1d or later. If you have a previous version of Janus/Ada, contact firstname.lastname@example.org to receive an update. Updates require current software support.
To build the introductory edition of Claw, unzip the Claw_Intro_Janus.Zip file in your desired directory. Make sure that you have proper access to Janus/Ada. Then, Run CompClaw with the full path of Claw as the parameter. For example, if you have made D:\Claw as your Claw directory, run "CompClaw D:\Claw" from the DOS box command line. This command will compile the entire Claw interface, and link all six example programs.
GNAT: To run the introductory edition for GNAT version 3.12p or later, do the following steps:
You can then run each of the example programs.
This code has been tested with versions 3.12p and 3.13p of Gnat for Windows 95/98/NT, and with recent supported versions of GNAT. GNAT generates some warnings that can be ignored.
We do not recommend the use of the Claw Introductory Edition with earlier versions of GNAT.
Note: The 4 files Testcc.rbj, Shapes.rbj, Bigjob.rbj, and Dienrs.rbj are
provided for your convenience. If you wish to start from complete source code, run "rc xxx.rc"
on each of the *.rc files to generate *.res files. Then run cvtres xxx.res on
each .res file to generate .obj files. Rename the resulting .obj files to
something convenient - we used .rbj. We didn't include adtest.rbj because
adtest is an example that doesn't need a resource file - look at
adtest.rc and you'll see there's essentially nothing there.
The usual Gnat distribution does not contain rc.exe or cvtres.exe so you'll have to get those from elsewhere, for instance a Microsoft SDK or C++ compiler. GNAT contains a program called "rcl" which is supposed to be a replacement for rc. However, we have found it to be unusable, as it cannot even handle the simple .rc files provided with the Claw Introductory Edition. If you have the ASE CD-ROM, you can find a suitable copy of rc.exe in the ObjectAda Special Edition.
ObjectAda: Version 7.1.2 or later of ObjectAda is required to use the Claw Introductory Edition. (Sorry, the limits on the ObjectAda Special Edition prevent it from compiling any version of Claw).
Unzip the Claw_Intro_OA.Zip
file into a suitable directory.
Create a project.
Use 'project' 'settings' 'link' to select Window (rather than Console).
Use 'project' 'settings' 'search' and include <objectada>/win32ada/binding/lib and <objectada>/apilib (where <objectada> denotes the CDROM drive or disk path where these are to be found). Ignore the warning message on the /apilib directory.
Use 'project' 'settings' 'files' to include all Claw Introductory Edition Ada source files, including Claw*.ad? and the six example programs. You can then "Build" adtest, which does not need a resource file, and execute it. Smplsrvr also does not need a resource file. The other four examples each has a .res file (supplied as a convenience so you needn't run rc.exe on the .rc files). To build one of them, Project/Settings/Files/Add its .res file to the project, Removing any previously added .res file, and then Build and execute the example.
Rational APEX: Version 3.0.2 or later of APEX is required to use the Claw Introductory Edition.
The Claw Introductory Edition comes pre-installed in the Claw.ss subsystem. There is no need to download or install the Claw Introductory Edition.
Should you want to reinstall the Claw Introductory Version, simply select the View in the Claw.ss subsystem. Unzip the Claw_Intro_Apex.Zip file into a temporary directory. Then select "Compile"|"Maintenance"|"Import Text Files"; select all of the Claw*.Ad* files in the temporary directory, and click on OK to import the files.
The examples for the Claw Introductory Edition are found in the Claw-examples.ss subsystem, found in the projects directory. They can be built directly there. You may need to compile the resource files (Testcc.rc, Shapes.rc, Bigjob.rc, Diners.rc) before the examples will link. This can easily be accomplished by selecting "Compile"|"Resource", and selecting the desired file.
Should you want to reinstall the examples, simply select the View in the Claw.ss subsystem. Unzip the Claw_Intro_Apex.Zip file into a temporary directory. Then select "Compile"|"Maintenance"|"Import Text Files"; select all of the *.Ad* files in the temporary directory that do not start with "Claw", and click on OK to import the files.
The introductory version of the builder on our web site may be newer than the one included with APEX. You may want to download and install it.
Running the example programs (for all compilers):
To run the programs, simply type the name of the program while in an MSDOS window. After trying various things with Shapes, Exit it, go back to the MSDOS window, and try Adtest, Bigjob, TestCC, or Diners.
Notes on Smplsrvr:
Smplsrvr is a simple web server. It will serve any HTML files in the public path for 2 minutes, then exit. It does not have a GUI of any kind. You may want to change the public path variable to point at some (non-private!) HTML on your machine. You can point your browser at Smplsrvr by using your machine's IP address (or the local address of 127.0.0.1, if the browser is on the same machine). Just use the IP in place of the web site name (i.e. "http://127.0.0.1" instead of "http://www.rrsoftware.com").
Tagged type hierarchy for the introductory edition. (starred (*) types are abstract; Claw types not in the introductory edition are available where shown, as well as additional types not on the diagram at all)
Root_Window_Type*---->Basic_Window_Type----->Frame_Window_Type | | | | Dialog_Type* ------>(other window types) | | | |--------->Modal_Dialog_Type | | | |--------->Modeless_Dialog_Type | | | |--------->Color_Dialog_Type | | | (other dialog types) | Root_Control_Type* | |----------> Static_Type | |---- Root_Button_Type* | | | |--------> Button_Type | | | |--------> Checkbox_Type | | | |--------> Radio_Button_Type | | | |--------> Draw_Button_Type | |----------> Groupbox_Type | |---- Edit_Type | | | |--------> Multiline_Edit_Type | | | |--------> Editbox_IO_Type* | | | |--------> Fixed_String_IO_Type | | | |--------> Integer_IO_Type | | | (other IO edit types) | |---- Root_Scrolling_Type* | | | |----------> Scroll_Bar_Type | | | |----------> Window_Scroll_Type | | | |----------> Trackbar_Type | | | |----------> Up_Down_Type | (other control types) Root_Tool_Type* | |---------> Pen_Type | |---------> Brush_Type | |---------> Font_Type | |---------> Bitmap_Type | (other tools) Root_Canvas_Type* | Basic_Canvas_Type | |--------> Paint_Canvas_Type | |--------> Window_Canvas_Type | (other canvas types) Root_Menu_Type* | Basic_Menu_Type* | |--------> Menu_Bar_Type | |--------> Popup_Menu_Type | (other menu types) Icon_Type Key_Type (registry) Root_Socket_Type* | |---------> Socket_Type | |---------> Server_Type | |---------> Datagram_Type | (other sockets) Important non-tagged types: Message_Box_Type Rectangle_Type Point_Type Size_Type Color_TypeUpdated December 20, 2000 by webmaster.