KnowledgeInterfaces Interface CATIParameterEditorFactory

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIParameterEditorFactory

Interface giving access to a factory for standard parameters editors.
Role: It is implemented as an extension of CATApplicationFrame and CATInteractiveApplication object (you can use either one of them depending on the context) and is used to obtain a parameter editor. It concerns only the following parameters: literal and volatile value.

See also:
,


Method Index


o CreateParameterEditor(CATDialog*,CATString&,CATBoolean,CATIParameterEditor*&)
Creates a standard parameter edition frame in a dialog.

Methods


o CreateParameterEditor
public virtual CreateParameterEditor( const iParent,
const iName,
iWithContextualMenu,
oParameterEditor)
Creates a standard parameter edition frame in a dialog.
The caller has to manage grids layouts in the dialog by retrieving the underlying frame on CATIParameterEditor interface and to call the SetEditedParameter method of CATIParameterEditor to pass the edited parameter
Example:
 CATApplicationFrame *pApplicationFrame = CATApplicationFrame::GetFrame();
 CATIParameterEditorFactory *poEditorFactory = NULL;
 HRESULT hr = pApplicationFrame->QueryInterface(CATIParameterEditorFactory::ClassId(), (void**) &poEditorFactory);
 if (SUCCEEDED(hr))
 {
  	 CATIParameterEditor *poParmEditor = NULL;
  	 hr = poEditorFactory->CreateParameterEditor(iParent, iName, 1, poParmEditor);
  	 if (SUCCEEDED(hr))
  	 {
  	 	 poParmEditor->SetParameter(iParameter);
  	 	 CATDlgFrame *pFrame = poParmEditor->GetFrame();
  	 	 pFrame->SetGridConstraints(...
  	 	 ...
  	 	 poParmEditor->Release();
 	 }
  	 poEditorFactory->Release();
 }
 
Parameters:
iParent
The parent dialog. Must not be NULL
iName
The name of the frame built by this method
iWithContextualMenu
A flag to indicate wether a contextual menu is to be added
oParameterEditor
A pointer to the CATIParameterEditor interface on the created parameter editor
Returns:
E_FAIL if iParent is NULL or if iName is empty, and S_OK otherwise

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

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