AfrProperties Interface 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.

  1. Create the factory IMyPropertyEdtFactory interface which derives from
  2. Implement this factory interface using macros

  3. This implementation, MyPropertyEdtFactory, is done in the module myModule thanks to 2 macros: and
    1. The header file MyPropertyEdtFactory.h must contain these two lines:
    2.  
             #include "CATEditorFactory.h"
             #include "MyPropertyEdt.h"
       
             #define ExportedByNOTHING
      
             CAT_EDITOR_DECLARE_FACTORY(NOTHING, MyPropertyEdt, MyPropertyEdt);
       
    3. The source file MyPropertyEdtFactory.cpp must contain these lines:
    4.  
              #include "MyPropertyEdtFactory.h"
      
              CAT_EDITOR_DEFINE_FACTORY2(MyPropertyEdt, MyPropertyEdt);
      
              #include "TIE_IMyPropertyEdtFactory.h"
              TIE_IMyPropertyEdtFactory(MyPropertyEdtFactory);
      
       
  4. To declare that CATUserSettingsManager implements IMyPropertyEdtFactory, insert the following line in the interface dictionary:
  5.  
           CATUserSettingsManager    IMyPropertyEdtFactory  myModule 
     
  6. To declare that the factory creates an instance of the MyPropertyEdt class, insert the following line in the factory dictionary:
  7.  
           MyPropertyEdt            IMyPropertyEdtFactory      
     
  8. Implement the CATIUserSettings interface, describe here, with a class which derives from the adapter class

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
public virtual BuildEditor( iParent)
Builds the dialog inside the property sheet.
Role: This method should instantiate an object derived from giving iParent as it's parent.
Parameters:
iParent
The dialog parent.
o CancelModification
public virtual CancelModification( iRepository)
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 method and then the method of a setting object.
This method must not use any pointer to the dialog object built in the method, since it may have been destroyed.
Parameters:
iRepository
Not used.
o CommitModification
public virtual CommitModification( iRepository)
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 method of a setting object.
This method must not use any pointer to the dialog object built in the method, since it may have been destroyed.
Parameters:
iRepository
Not used.
o ResetUserSettingsValue
public virtual ResetUserSettingsValue()
Resets parameter values to default.
Role: This method resets the parameter values to default ones, usually by calling the method of a setting object. The defaults values must be consistent with those used when called the 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 method, since it may have been destroyed.
o SetUserSettingsValue
public virtual SetUserSettingsValue( iRepository)
Displays the parameter values.
Role: This method requests the dialog object to display the correct parameter values, usually according to a object content.
Parameters:
iRepository
Not used.

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

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