Dialog CATInteractiveApplication

Usage: you can derive this class.


public class CATInteractiveApplication

base class for all interactive applications.
Role: Base class for an interactive application, whether it displays only a single dialog window, a classical Single Document Interface (SDI) application, or a Multiple Document Interface (MDI) application such as CATIA Version 5.

To create your interactive application, you should:

To not instanciate this class directly.


Constructor and Destructor Index


o CATInteractiveApplication(CATCommand*,CATString&)
Constructs an interactive application.

Method Index


o BuildApplicationEnvironment(int,char**,char**)
Initializes the application environment.
o Destroy()
Terminate the application.
o EndApplication()
Application mean to transmit the return code to this software.
o GetArgs(int*,char***)
Retrieve the arguments passed to the application.
o GetArgs()
Retrieve the arguments passed to the application.
o GetUIClass()
Retrieve the user interface class (P1, P2, P3).
o SetAutomaticContextualHelp()
Request that the contextual help be automatically set to any control of any window.
o SetBusyCursor()
Request that the display cursor be changed to a busy cursor.
o SetSplashScreen(CATString&)
Assign a splash screen.
o UpdateDisplay()
Request that the display be updated.

Constructor and Destructor


o CATInteractiveApplication
public CATInteractiveApplication( iParent,
const iApplicationName)
Constructs an interactive application.
Role: Note that, deriving this class, your interactive application constructor should have a single argument: its name. When calling this base class constructor from the derived class one, a NULL value should be passed as iParent.
Parameters:
iParent
The parent class in the
agregation hierarchy.
iApplicationName
The application name.

Methods


o BuildApplicationEnvironment
public virtual BuildApplicationEnvironment( iArgc,
iArgv,
iEnvVariableList)
Initializes the application environment.

Called with UNIX only.

Parameters:
iArgc
The number of arguments passed to the application.
iArgv
The argument list.
iEnvVariableList
The environment variable list.
o Destroy
public Destroy()
Terminate the application. The application must call this service when it wants to end the application. In practice, the application will call this service when the user selects File/Exit , and only at this moment.

This method calls the EndApplication method (that the application must overload) which transmit to this software your return code.

o EndApplication
public virtual EndApplication()
Application mean to transmit the return code to this software. The application calls the Destroy method (when the user selects File/Exit, see , which calls the EndApplication method. You overload the EndApplication method, transmitting this way the recturn code to this software.
o GetArgs
public GetArgs( oArgCount,
oArgList)
Retrieve the arguments passed to the application.
Parameters:
oArgCount
The number of arguments passed to the application.
oArgList
The argument list. The variable to pass here as a parameter has to be contructed the following way: you declare a char** in the calling service and pass its address as oArgList to the GetArgs of your class deriving from CATInteractiveApplication.
o GetArgs
public GetArgs()
Retrieve the arguments passed to the application.
Returns:
The argument list.
o GetUIClass
public GetUIClass()
Retrieve the user interface class (P1, P2, P3).
Returns:
The user interface style.
Legal values: 1 if the style is P1, or 2 if the style is P2, or 3 if the style is P3.
o SetAutomaticContextualHelp
public SetAutomaticContextualHelp()
Request that the contextual help be automatically set to any control of any window.

This service will be called only once during execution. Then, when this service has been called, activating "What's This" command becomes available to the end-user. To activate the "What's This" command, the end-user will have to select the possible dedicated icon or, on Windowsonly, the panel question mark selection, or, on WIndows and UNIX, the panel help button selection.

We remind you what the "What's This" command is. It turns the cursor to a question mark, and then, when the end-user clicks a control, displays the control associated "Long Help" in a balloon. The clicks, after displaying the balloon, ends the current "What's This" command. Entering the "What's This" command will be done, at the Dialog framework level, through calling the QueryHelpOnContext method on any .

o SetBusyCursor
public SetBusyCursor()
Request that the display cursor be changed to a busy cursor.
o SetSplashScreen
public SetSplashScreen( iFileName)
Assign a splash screen.
Parameters:
iFileName
The splash file name. The extension must not be appended. The file will be a .png or a .bmp picture. It must be located in the splashscreens directory of the graphic directory defined using the CATGraphicPath environment variable.
o UpdateDisplay
public UpdateDisplay()
Request that the display be updated. At the end of a given interaction, the panels display is automatically updated (the X server does it), thus no call to this service has to be made. A call to this service will be made only if, during a long process, the application wants to update the display so that to give a regular feedback to the user.

This object is included in the file: CATInteractiveApplication.h
If needed, your Imakefile.mk should include the module: DI0PANV2

Copyright © 1999-2014, Dassault Systèmes. All rights reserved.