All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

CATIAApplicationFrame Interface CATIEditProperties

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---CATIEditProperties
 

Usage: you can reimplement this interface by deriving the supplied CATEditor adapter class.


interface CATIEditProperties

Interface to create an Edit Properties property page.
Role: Each property page of the Edit Properties command corresponds to an implementation of the CATIEditProperties interface.

Step by step: CATEditorManager implements the IMyPropertyEdtFactory factory interface. This Factory creates a MyPropertyEdt instance class. This class implements the CATIEditProperties interface.

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

  3. This implementation, MyPropertyEdtFactory, is done in the module myModule thanks to 2 macros: CAT_EDITOR_DECLARE_FACTORY and CAT_EDITOR_DEFINE_FACTORY.c
    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_FACTORY(MyPropertyEdt, MyPropertyEdt);
      
              #include "TIE_IMyPropertyEdtFactory.h"
              TIE_IMyPropertyEdtFactory(MyPropertyEdtFactory);
      
       
  4. To declare that CATEditorManager implements IMyPropertyEdtFactory, insert the following line in the interface dictionary:
  5.  
           CATEditorManager    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 CATIEditProperties 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*)
Constructs the dialog objects of the editor.
o CancelModification(CATLISTV(CATBaseUnknown_var)&)
Cancels a modification when closing the panel.
o CloseWindowFromEditor()
Closes dialog object open by the editor.
o CommitModification(CATLISTV(CATBaseUnknown_var)&)
Validates modifications done on objects from iExtract.
o ExtractFromSelection(CATLISTV(CATBaseUnknown_var)&,CATLISTV(CATBaseUnknown_var)*)
Extracts from the selection the objects which can be managed.
o GetEditorTitle()
Returns the editor title.
o GetUndoFromEditor()
Records an undo action from the editor.
o OKToRepaintOnCommit(int&)
Sets the behaviour of the dialog objects during the update of tabpages when applying modifications.
o SetEditorSize(int&)
Sets editor's size.
o SetPropertyValue(CATLISTV(CATBaseUnknown_var)&,ModeReadWrite)
Valuates the dialog objects.

Methods


o BuildEditor
public virtual void BuildEditor(CATEditorPage* iMyPage)= 0
Constructs the dialog objects of the editor.
Parameters:
iMyPage
to specify a tab page.
o CancelModification
public virtual void CancelModification(CATLISTV(CATBaseUnknown_var)& iExtract)= 0
Cancels a modification when closing the panel.
Parameters:
iExtract
list of objects supposed to be managed.
o CloseWindowFromEditor
public virtual void CloseWindowFromEditor()= 0
Closes dialog object open by the editor.
o CommitModification
public virtual void CommitModification(CATLISTV(CATBaseUnknown_var)& iExtract)= 0
Validates modifications done on objects from iExtract.
Parameters:
iExtract
list of objects supposed to be managed.
o ExtractFromSelection
public virtual void ExtractFromSelection(CATLISTV(CATBaseUnknown_var)& oExtract,
const CATLISTV(CATBaseUnknown_var)* iSelection=NULL )= 0
Extracts from the selection the objects which can be managed.
Parameters:
oExtract
list of objects which can be managed
iSelection
list of objects of current CSO.
o GetEditorTitle
public virtual CATUnicodeString GetEditorTitle()= 0
Returns the editor title.
o GetUndoFromEditor
public virtual CATCommandGlobalUndo * GetUndoFromEditor()= 0
Records an undo action from the editor.
o OKToRepaintOnCommit
public virtual HRESULT OKToRepaintOnCommit(int& oStatus) = 0
Sets the behaviour of the dialog objects during the update of tabpages when applying modifications. Useful for tab pages depending on each other
Parameters:
oStatus

Legal Values : 0 if no repaint is required : for each tabpage, methods CommitModification and SetPropertyValue are called one after the other 1 otherwise : default behaviour - for each tabpage method CommitModification is applied. Then, for each tabpage method SetPropertyValue is called.
Returns:
a HRESULT value
Legal Values:
  1. S_OK if success
  2. E_FAIL otherwise
o SetEditorSize
public virtual void SetEditorSize(int& ioSize)= 0
Sets editor's size.
Parameters:
ioSize
size of the editor
Legal Values : 1 (smallest) 2 3 (largest)
o SetPropertyValue
public virtual void SetPropertyValue(CATLISTV(CATBaseUnknown_var)& iExtract,
ModeReadWrite iMode)= 0
Valuates the dialog objects.
Parameters:
iExtract
list of objects supposed to be managed.
iMode
ReadOnly or Write mode

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

Copyright © 2003, Dassault Systèmes. All rights reserved.