All Frameworks Class Hierarchy This Framework Previous Indexes
CATIAApplicationFrame Interface CATIUserSettings
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATIUserSettings
Usage: you can reimplement this interface by deriving the supplied CATEditor adapter class.
interface CATIUserSettings
Interface to create a Tools Options property page.
Role: Each property page of the Tools Options
command corresponds to an implementation of the
CATIUserSettings interface.
Step by step: CATUserSettingsManager implements the
factory IMyPropertyEdtFactory interface.
This Factory creates a MyPropertyEdt instance class. This class implements the
CATIUserSettings interface.
- Create the factory IMyPropertyEdtFactory interface which
derives from CATIGenericFactory
- Implement this factory interface using macros
This implementation, MyPropertyEdtFactory, is done in the module myModule
thanks to 2 macros:
CAT_EDITOR_DECLARE_FACTORY and
CAT_EDITOR_DEFINE_FACTORY2.
- The header file MyPropertyEdtFactory.h must contain these two lines:
#include "CATEditorFactory.h"
#include "MyPropertyEdt.h"
#define ExportedByNOTHING
CAT_EDITOR_DECLARE_FACTORY(NOTHING, MyPropertyEdt, MyPropertyEdt);
- The source file MyPropertyEdtFactory.cpp must contain these lines:
#include "MyPropertyEdtFactory.h"
CAT_EDITOR_DEFINE_FACTORY2(MyPropertyEdt, MyPropertyEdt);
#include "TIE_IMyPropertyEdtFactory.h"
TIE_IMyPropertyEdtFactory(MyPropertyEdtFactory);
- To declare that CATUserSettingsManager implements IMyPropertyEdtFactory,
insert the following line in the interface dictionary:
CATUserSettingsManager IMyPropertyEdtFactory myModule
- To declare that the factory creates an instance of the MyPropertyEdt class,
insert the following line in the factory dictionary:
MyPropertyEdt IMyPropertyEdtFactory
- Implement the CATIUserSettings interface, describe here, with a class which derives from the adapter class
CATEditor
BOA information: this interface CANNOT be implemented
using the BOA (Basic Object Adapter).
To know more about the BOA, refer to the CAA Encyclopedia home page.
Click Middleware at the bottom left, then click the Object Modeler tab page.
Several articles deal with the BOA.
Method Index
- o
BuildEditor(CATEditorPage*)
- Builds the dialog inside the property sheet.
- o
CancelModification(CATSettingRepository*)
- Cancels the modifications brought to parameter values.
- o
CommitModification(CATSettingRepository*)
- Applies the modified parameter values.
- o
ResetUserSettingsValue()
- Resets parameter values to default.
- o
SetUserSettingsValue(CATSettingRepository*)
- Displays the parameter values.
Methods
o BuildEditor
-
Builds the dialog inside the property sheet.
Role: This method should instantiate an object
derived from
CATDlgFrame giving iParent as it's parent.
- Parameters:
-
- iParent
- The dialog parent.
o CancelModification
-
Cancels the modifications brought to parameter values.
Role: This methods cancels the modifications brought
to the parameter values. It is called whenever the end user clicks
Cancel. The usual implementation is to call the
CATSettingRepository.Rollback method and then the
CATSettingRepository.Commit method of a setting object.
This method must not use any pointer to the dialog object
built in the
BuildEditor method, since it may have been destroyed.
- Parameters:
-
- iRepository
- Not used.
o CommitModification
-
Applies the modified parameter values.
Role: This method saves the modifications made
to parameter values in the property page. The usual
implementation is to call the
CATSettingRepository.SaveRepository method of a setting object.
This method must not use any pointer to the dialog object
built in the
BuildEditor method, since it may have been destroyed.
- Parameters:
-
- iRepository
- Not used.
o ResetUserSettingsValue
public virtual void ResetUserSettingsValue( | )= 0 |
-
Resets parameter values to default.
Role: This method resets the parameter values to default
ones, usually by calling the
CATSettingRepository.WriteSetting method of a setting object. The defaults values must be consistent
with those used when called the
CATSettingRepository.ReadSetting for the first time.
The ResetUserSettingsValue method is called when
end user clicks reset.
This method must not use any pointer to the dialog object
built in the
BuildEditor method, since it may have been destroyed.
o SetUserSettingsValue
-
Displays the parameter values.
Role: This method requests the dialog object
to display the correct parameter values, usually according to
a
CATSettingRepository object content.
- Parameters:
-
- iRepository
- Not used.
This object is included in the file: CATIUserSettings.h
If needed, your Imakefile.mk should include the module: CATIAApplicationFrame