All Frameworks Class Hierarchy This Framework Previous Next Indexes
Visualization Interface CATIVisu
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATIVisu
Usage: you cannot implement this base interface directly. You must first derive it and then implement the derived interface.
interface CATIVisu
Basic class of any visualization interface used to make objects visualized.
Role: This is the basic class that any visualization interface has to C++
derive from.
Components that implement any specialized CATIVisu interface
are able to be visualized and highlighted.
All visualization mecanisms are controlled by the CATVisManager.
How to create the specialized interface:
The new interface is named IMyNewVisu.
- The new interface must C++ derives from CATIVisu
Extract from IMyNewVisu.h
.....
class IMyNewVisu : public CATIVisu
{
CATDeclareInterface;
public:
....
} ;
The new interface must OM-derives from
CATBaseUnknown
Extract from IMyNewVisu.cpp
CATImplementInterface(IMyNewVisu, CATBaseUnknown);
This allows you to make a given component implement several visualization
interfaces.
Caution:A specialized interface must never derive from an another one. The interface must always
derive from CATIVisu. In particular, do not derive from
CATI3DGeoVisu or
CATI2DGeoVisu to create a 3D ou 2D visualization interface.
To implement the specialized interface used the
CATExtIVisu adapter.
Method Index
- o
BuildHighlightLook(CATPathElement&,CATRepPath&)
- Adds the graphical representation of one visualization extension into the output path of graphical representations.
- o
BuildRep()
- Builds the graphical representation.
- o
BuildRepPath(CATPathElement&,CATRepPath&)
- Adds the graphical representation of one visualization extension into the output path of graphical representations.
- o
DecodeGraphic(CATPickPath&,CATPathElement&)
- Adds the component of the current visualization extension into the output path of components.
- o
GiveRep()
- Returns the pointer of the graphical representation.
- o
IsHighlightValid(CATPathElement&)
- Tests if the elements of a CATPathElement are valid for highlight.
- o
IsRepUpToDate()
- Tests whether or not the graphical representation of the current component is uptodate.
- o
ModifyRep(CATNotification&)
- Processes visualization notifications.
- o
SetRepNotUpToDate()
- Sets the graphical representation of this component to an not uptodate state.
- o
UnreferenceRep()
- Makes visualization extension not point to their graphical representation anymore and conversely.
Methods
o BuildHighlightLook
-
Adds the graphical representation of one visualization extension into the output path of graphical representations.
Role:
The same as
BuildRepPath but it is for (pre)highlight purposes only.
- Parameters:
-
- iPathElt
- path of components from which the current component is extracted.
- ioPathRep
- output path of graphical representations to fill in.
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
o BuildRep
-
Builds the graphical representation.
- Returns:
- A pointer to the graphical representation of one extension of any visualization interface.
o BuildRepPath
-
Adds the graphical representation of one visualization extension into the output path of graphical representations.
Role:
This method is part of the usual mechanism of generating a path of graphical representations from a path of
components. And this mechanism is managed by the
CATVisManager.
- Parameters:
-
- iPathElt
- path of components from which the current component is extracted.
- ioPathRep
- output path of graphical representations to fill in.
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
o DecodeGraphic
-
Adds the component of the current visualization extension into the output path of components.
Role:
This method is part of the usual mechanism of generating a path of components from a path of graphical
representations. And this mechanism is managed by the
CATVisManager.
- Parameters:
-
- iPickPath
- input path of graphical representations from which the graphical representation of the current extension is extracted.
- ioPathElt
- output path of components to fill in.
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the operation succeeds
- E_FAIL otherwise
.
o GiveRep
-
Returns the pointer of the graphical representation.
Role: With this method you get the graphic representation for this interface. But in most
case to get it you must use the
CATVisManager.GenerateRepPathFromPathElement.
o IsHighlightValid
-
Tests if the elements of a CATPathElement are valid for highlight.
Role: in the default implementation, calls recursively the method IsHighlightValid
on the elements of the CATPathElement that implement CATIVisu.
- Parameters:
-
- iPathElt
- input path of components from which the current component is extracted.
- Returns:
- an HRESULT value.
Legal values:
- S_OK if the component is to be highlighted
- E_FAIL otherwise
.
o IsRepUpToDate
public virtual int IsRepUpToDate( | )= 0 |
-
Tests whether or not the graphical representation of the current component is uptodate.
- Returns:
-
- 1 if the graphical representation of the component is uptodate
- 0 if the graphical representation of the component is not uptodate
o ModifyRep
-
Processes visualization notifications.
Role:
It is the usual method called by the
CATVisManager for processing all types of visu notifications concerning
any graphical change of one component. Such visu notifications have to derive from
CATModify. For instance
when the color of one component is changed, a visualization event
CATModifyVisProperties is sent, then received by the
CATVisManager and finally processed by any visualization extension of the component through the ModifyRep method.
- Parameters:
-
- iInfo
- the input visu event deriving from
CATModify
- Returns:
- status of processing:
- 0 when the input visu event has not been processed
- 1 when the input visu event has been procesed
o SetRepNotUpToDate
public virtual void SetRepNotUpToDate( | )= 0 |
-
Sets the graphical representation of this component to an not uptodate state.
o UnreferenceRep
public virtual void UnreferenceRep( | )= 0 |
-
Makes visualization extension not point to their graphical representation anymore and conversely.
Role:
When one graphical representation is deleted, the
CATVisManager provides a mechanism which ensures to find the component and the visualization interface to which the deleting graphical representation is linked. This operation
can be done thanks to the model identifier enclosed into the graphical representation.
Then it is possible to update the corresponding visualization extension: this is typically where
the
UnreferenceRep method is useful.
This object is included in the file: CATIVisu.h
If needed, your Imakefile.mk should include the module: CATVisualization