3D PLM Enterprise Architecture |
User Interface - Dialogs |
CATInteractiveApplicationBase class for all interactive applications |
Quick Reference |
The CATInteractiveApplication class is the base class for all interactive applications, whether it displays only a single dialog window or it is a classical Single Document Interface (SDI) application, or a Multiple Document Interface (MDI) application such as CAA Version 5.
To create an interactive application, you should:
BeginApplication
and EndApplication
.Refer to Designing Your Interactive Application.
The programming tasks fall into the following topics:
[Top]
Your interactive application constructor should have a single argument: its name.
class MyIntApplication : public CATInteractiveApplication { MyIntApplication (const CATString & iName); virtual ~MyIntApplication (); void BeginApplication(); int EndApplication(); } ... MyIntApplication ::MyIntApplication (const CATString & iName) : CATInteractiveApplication(NULL, iName) {} ... // Instantiate the application CATString sName("ApplicationName"); MyIntApplication IntAppliInstance(sName); |
The following methods are available to manage the interactive application life cycle. They are called in this order after the application constructor and before the application destructor:
BuildApplicationEnvironment |
Initializes the application environment. Called with UNIX only. |
BeginApplication |
Begins or runs the application. |
RunApplication |
Runs the application. Called with UNIX only. |
EndApplication |
Called when the application ends, after you call Destroy in the callbak method that closes the application |
You need to override the methods BeginApplication
and EndApplication
.
Refer to Designing
Your Interactive Application. Their signatures are as follows:
BuildApplicationEnvironment
virtual void BuildApplicationEnvironment(int argc, char ** argv, char ** env); |
where:
argc | Number of arguments passed to the application |
argv | Argument list |
env | Environment variable list |
BeginApplication
virtual void BeginApplication(); |
RunApplication
virtual void RunApplication(); |
EndApplication
virtual int EndApplication(); |
[Top]
You can retrieve the arguments passed to the application using the BuildApplicationEnvironment
method thanks to the GetArgs
method.
... int argCount; // Number of arguments char ** argArray; // Arguments passed as a table of character strings IntAppliInstance.GetArgs(&argCount, &argArray); ... |
[Top]
You can assign a splash screen using the SetSplashScreen
method,
usually in the BeginApplication
method.
... MyIntApplication::BeginApplication() { ... CATString splash("MyAppliSplash"); IntAppliInstance.SetSplashScreen(splash); ... } ... |
MyAppliSplash should be the file name of the MyAppliSplash.bmp file located in the splashscreens directory of the graphic directory defined using the CATGraphicPath environment variable. For the P2 user interface style, it can be an animated image, such as MyAppliSplash.avi, with Windows only.
[Top]
You can request that the contextual help be automatically set to any control
of any window. This enables the end user to select the What's This command which
turns the cursor to a question mark, and then click any control to display its
associated "Long Help" in a balloon. This is done by the SetAutomaticContextualHelp
method.
IntAppliInstance.SetAutomaticContextualHelp(); |
You can request that the cursor be changed to a busy cursor using the SetBusyCorsor
method.
IntAppliInstance.SetBusyCursor(); |
[Top]
You can request that the display be updated using the UpdateDisplay
method.
IntAppliInstance.UpdateDisplay(); |
[Top]
You can retrieve the user interface style using the GetUIClass
method.
int UserInterfaceStyle; UserInterfaceStyle = pIntApplication->GetUIClass(); if (UserInterfaceStyle == 1) ... // User Interface Style is P1 else if (UserInterfaceStyle == 2) ... // User Interface Style is P2 else ... // Error |
[Top]
Version: 1 [Jan 2000] | Document created |
[Top] |
Copyright © 2000, Dassault Systèmes. All rights reserved.