AfrStandard Interface CATIProgressTask
Usage: you can freely reimplement this interface.
interface CATIProgressTask
Interface describing an interruptible task.
Role:Objects executing a long process implement this interface
to benefit from a user interface indicating the progression
of the task. The process must be launched by the
method.
The user interface is a dialog box which contains:
- A title
- A Progress bar
- An icon symbolizing the task
- The name of the object concerned by the task
- A comment just above the progress bar
- If the task is interruptible, a Cancel button is added
and the end user can stop the process.
- A percentage indicating the progression
- An estimate of the remaining time
- See also:
- ,
Method Index
- o
GetCatalogName(CATString*)
- Returns the NLS filename.
- o
GetIcon(CATString*)
- Returns the icon name.
- o
PerformTask(CATIProgressTaskUI*,void*)
- Executes the task.
Methods
o GetCatalogName
public virtual GetCatalogName( | | oCatalogName) |
-
Returns the NLS filename.
Role:This NLS file contains the information needed to customize the
dialog box. The keywords are the following:
- The title : ProgressTaskUI.Title
- The comment above the progress bar: ProgressTaskUI.Comment
- The Object concerned by the task : ProgressTaskUI.ObjectName
The comment and object can be customized at run time by using
the
and
methods.
- Parameters:
-
- oCatalogName
- The NLS filename without the suffix can be found in the
CNext/resources/msgcatalog directory.
o GetIcon
public virtual GetIcon( | | oIcon) |
-
Returns the icon name.
- Parameters:
-
- oIcon
- The icon displayed in the dialog box symbolizing the task. The
name of the icon can be found in the CNext/resources/graphic/icons/normal
directory, without the ".bmp" suffix.
o PerformTask
public virtual PerformTask( | | iUI, |
| | iUserData) |
-
Executes the task.
Role: This method is called by the CATTaskController to
execute the task.
In most cases the code of the method is the following:
- Set the range of the progression:
- If the object concerned by the task is not fixed,
use the
method to customize it at run time, otherwise the name set in the NLS file with the keyword ProgressTaskUI.ObjectName will
be used.
- At each step
- Set the current position in the progression:
- If the comment displayed just above the progress bar is dependant on the step,
use the
to customize it at run time, otherwise the name set in the Nls file with the keyword ProgressTaskUI.Comment will
be used.
- Check if the task has been interrupted in
using the
method. If it is the case, return E_FAIL to end the process.
- Parameters:
-
- iUI
- The task's user interface.
- iUserData
- This data comes from the third argument of
the
method
- Returns:
-
- S_OK: The task ends normally.
- E_FAIL: Used to stop the task in case of end user interruption
Both, the dialog box is closed and deleted automatically.
This object is included in the file: CATIProgressTask.h
If needed, your Imakefile.mk should include the module: CATAfrProgressTask
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.