The Basic Calculator Dialog Box Use Case |
| Use Case |
AbstractThis article discusses the CAAIDDBasicCalc.m module of the CAACodeGenTools.edu framework. It shows how to create a dialog box design file using the Rich Application Presentation Designer - IDD, and how to build an interactive application needed to display and run it. |
This integration example is intended to cover the tasks needed in order to design a basic calculator dialog box with the designer. These tasks are:
CAAIDDBasicCalc is a use case of the CAACodeGenTools.edu framework that illustrates the Rich Application Presentation Designer's capabilities.
This example shows how to create a basic calculator by using only labels and buttons, edit properties, simulate dialog box behavior and how to use the callbacks mechanism onto controls. The basic calculator allows to add or subtract an input value and displays result as a label.
Below is how the basic calculator dialog box looks like:

To launch CAAIDDBasicCalc, you will need to set up the build time environment, then compile CAAIDDBasicCalc along with its prerequisites, set up the run time environment, and then execute the use case [1] and [2].
The CAAIDDBasicCalc use case is made of a several classes located in the CAAIDDBasicCalc.m module of the CAACodeGenTools.edu framework:
InstallRootFolder\CAADoc\CAACodeGenTools.edu\CAAIDDBasicCalc.m\
where InstallRootFolder [1] is the folder where the API CD-ROM is installed.
The CAAIDDBasicCalc.m module includes 4 files:
| CAABasicCalcApplication.cpp | The interactive application (the one that launches the dialog) source file |
| CAAIDDBasicCalcDialog.DSGen | The Dassault Systemes code generation file |
The designer will automatically generate the C++ files (header and implementation) associated to a designed dialog box which are:
| CAAIDDBasicCalcDialog.h | The dialog box header file |
| CAAIDDBasicCalcDialog.cpp | The dialog box source file |
Here are some videos that show you how to completely design a basic calculator, they include dialog box creation, simulation of design behavior, callbacks definition onto controls and illustrate how to build and run the basic calculator application.
| [1] | Building and Launching a Use Case |
| [2] | Starting Rich Application Presentation Designer |
| Version: 1 [May 2010] | Document created by am2 |