if ( v ) v->Erase( this, forced );
}
+/*!
+ Dispatches display operation to proper BeforeDisplay() method of SALOME_Displayer
+*/
+void SALOME_OCCPrs::BeforeDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->BeforeDisplay( v, this );
+}
+
+/*!
+ Dispatches display operation to proper AfterDisplay() method of SALOME_Displayer
+*/
+void SALOME_OCCPrs::AfterDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->AfterDisplay( v, this );
+}
+
+/*!
+ Dispatches display operation to proper BeforeErase() method of SALOME_Displayer
+*/
+void SALOME_OCCPrs::BeforeEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->BeforeErase( v, this );
+}
+
+/*!
+ Dispatches display operation to proper AfterErase() method of SALOME_Displayer
+*/
+void SALOME_OCCPrs::AfterEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->AfterErase( v, this );
+}
+
/*!
Dispatches operation to proper LocalSelectionIn() method of SALOME_View
*/
if ( v ) v->Erase( this, forced );
}
+/*!
+ Dispatches display operation to proper BeforeDisplay() method of SALOME_Displayer
+*/
+void SALOME_VTKPrs::BeforeDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->BeforeDisplay( v, this );
+}
+
+/*!
+ Dispatches display operation to proper AfterDisplay() method of SALOME_Displayer
+*/
+void SALOME_VTKPrs::AfterDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->AfterDisplay( v, this );
+}
+
+/*!
+ Dispatches display operation to proper BeforeErase() method of SALOME_Displayer
+*/
+void SALOME_VTKPrs::BeforeEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->BeforeErase( v, this );
+}
+
+/*!
+ Dispatches display operation to proper AfterErase() method of SALOME_Displayer
+*/
+void SALOME_VTKPrs::AfterEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->AfterErase( v, this );
+}
+
/*!
Dispatches operation to proper LocalSelectionIn() method of SALOME_View
*/
if ( v ) v->Erase( this, forced );
}
+/*!
+ Dispatches display operation to proper BeforeDisplay() method of SALOME_Displayer
+*/
+void SALOME_Prs2d::BeforeDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->BeforeDisplay( v, this );
+}
+
+/*!
+ Dispatches display operation to proper AfterDisplay() method of SALOME_Displayer
+*/
+void SALOME_Prs2d::AfterDisplayIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->AfterDisplay( v, this );
+}
+
+/*!
+ Dispatches display operation to proper BeforeErase() method of SALOME_Displayer
+*/
+void SALOME_Prs2d::BeforeEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->BeforeErase( v, this );
+}
+
+/*!
+ Dispatches display operation to proper AfterErase() method of SALOME_Displayer
+*/
+void SALOME_Prs2d::AfterEraseIn( SALOME_Displayer* d, SALOME_View* v ) const
+{
+ d->AfterErase( v, this );
+}
+
/*!
Dispatches operation to proper LocalSelectionIn() method of SALOME_View
*/
// Probably, selection is being activated in uncompatible viewframe." );
}
+void SALOME_View::BeforeDisplay( SALOME_Displayer* d, const SALOME_Prs* p )
+{
+ p->BeforeDisplayIn( d, this );
+}
+
+void SALOME_View::AfterDisplay( SALOME_Displayer* d, const SALOME_Prs* p )
+{
+ p->AfterDisplayIn( d, this );
+}
+
+void SALOME_View::BeforeErase( SALOME_Displayer* d, const SALOME_Prs* p )
+{
+ p->BeforeEraseIn( d, this );
+}
+
+void SALOME_View::AfterErase ( SALOME_Displayer* d, const SALOME_Prs* p )
+{
+ p->AfterEraseIn( d, this );
+}
+
/*!
Gives control to SALOME_Prs object, so that it could perform double dispatch
*/
//! Key method for double dispatch of erase operation
virtual void EraseIn( SALOME_View*, const bool = false ) const = 0;
+ //! Key method for double dispatch of pre-display operation
+ virtual void BeforeDisplayIn( SALOME_Displayer*, SALOME_View* ) const = 0;
+
+ //! Key method for double dispatch of post-display operation
+ virtual void AfterDisplayIn( SALOME_Displayer*, SALOME_View* ) const = 0;
+
+ //! Key method for double dispatch of pre-erase operation
+ virtual void BeforeEraseIn( SALOME_Displayer*, SALOME_View* ) const = 0;
+
+ //! Key method for double dispatch of post-erase operation
+ virtual void AfterEraseIn( SALOME_Displayer*, SALOME_View* ) const = 0;
+
//! Key method for double dispatch of update operation
virtual void Update( SALOME_Displayer* ) = 0;
class PRS_EXPORT SALOME_OCCPrs : public SALOME_Prs
{
public:
- //! It uses double dispatch in order to \n
+ //! It uses double dispatch in order to
//! invoke Display() method corresponding to the actual type of presentation.
virtual void DisplayIn( SALOME_View* ) const;
- //! It uses double dispatch in order to \n
+ //! It uses double dispatch in order to
//! invoke Erase() method corresponding to the actual type of presentation.
virtual void EraseIn( SALOME_View*, const bool = false ) const;
- //! It uses double dispatch in order to \n
+ //! It uses double dispatch in order to
+ //! invoke BeforeDisplayIn() method corresponding to the actual type of presentation.
+ virtual void BeforeDisplayIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke AfterDisplayIn() method corresponding to the actual type of presentation.
+ virtual void AfterDisplayIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke BeforeEraseIn() method corresponding to the actual type of presentation.
+ virtual void BeforeEraseIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke AfterEraseIn() method corresponding to the actual type of presentation.
+ virtual void AfterEraseIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
//! invoke Update() method corresponding to the actual type of presentation.
virtual void Update( SALOME_Displayer* );
class PRS_EXPORT SALOME_VTKPrs : public SALOME_Prs
{
public:
- //! It uses double dispatch in order to \n
+ //! It uses double dispatch in order to
//! invoke Display() method corresponding to the actual type of presentation.
virtual void DisplayIn( SALOME_View* ) const;
- //! It uses double dispatch in order to \n
+ //! It uses double dispatch in order to
//! invoke Erase() method corresponding to the actual type of presentation.
virtual void EraseIn( SALOME_View*, const bool = false ) const;
- //! It uses double dispatch in order to \n
+ //! It uses double dispatch in order to
+ //! invoke BeforeDisplayIn() method corresponding to the actual type of presentation.
+ virtual void BeforeDisplayIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke AfterDisplayIn() method corresponding to the actual type of presentation.
+ virtual void AfterDisplayIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke BeforeEraseIn() method corresponding to the actual type of presentation.
+ virtual void BeforeEraseIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke AfterEraseIn() method corresponding to the actual type of presentation.
+ virtual void AfterEraseIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
//! invoke Update() method corresponding to the actual type of presentation.
virtual void Update( SALOME_Displayer* );
//! invoke Erase() method corresponding to the actual type of presentation.
virtual void EraseIn( SALOME_View*, const bool = false ) const;
+ //! It uses double dispatch in order to
+ //! invoke BeforeDisplayIn() method corresponding to the actual type of presentation.
+ virtual void BeforeDisplayIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke AfterDisplayIn() method corresponding to the actual type of presentation.
+ virtual void AfterDisplayIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke BeforeEraseIn() method corresponding to the actual type of presentation.
+ virtual void BeforeEraseIn( SALOME_Displayer*, SALOME_View* ) const;
+
+ //! It uses double dispatch in order to
+ //! invoke AfterEraseIn() method corresponding to the actual type of presentation.
+ virtual void AfterEraseIn( SALOME_Displayer*, SALOME_View* ) const;
+
//! It uses double dispatch in order to
//! invoke Update() method corresponding to the actual type of presentation.
virtual void Update( SALOME_Displayer* );
//! Destructor
virtual ~SALOME_View() {}
- //! This Display() method should be called to display given presentation \n
- //! created anywhere by anybody. It simply passes control to SALOME_Prs object \n
+ //! This Display() method should be called to display given presentation
+ //! created anywhere by anybody. It simply passes control to SALOME_Prs object
//! so that it could perform double dispatch.
void Display( const SALOME_Prs* );
- //! This Erase() method should be called to erase given presentation \n
- //! created anywhere by anybody. It simply passes control to SALOME_Prs object \n
+ //! This Erase() method should be called to erase given presentation
+ //! created anywhere by anybody. It simply passes control to SALOME_Prs object
//! so that it could perform double dispatch.
void Erase( const SALOME_Prs*, const bool = false );
- //! This LocalSelection() method should be called to activate sub-shapes selection \n
- //! created anywhere by anybody. It simply passes control to SALOME_Prs object \n
+ //! This LocalSelection() method should be called to activate sub-shapes selection
+ //! created anywhere by anybody. It simply passes control to SALOME_Prs object
//! so that it could perform double dispatch.
void LocalSelection( const SALOME_Prs*, const int );
// Display() methods for ALL kinds of presentation should appear here
virtual void Display( const SALOME_OCCPrs* );//!< Display SALOME_OCCPrs presentation.
virtual void Display( const SALOME_VTKPrs* );//!< Display SALOME_VTKPrs presentation.
- virtual void Display( const SALOME_Prs2d* );//!< Display SALOME_Prs2d presentation.
+ virtual void Display( const SALOME_Prs2d* );//!< Display SALOME_Prs2d presentation.
// Add new Display() methods here...
// Erase() methods for ALL kinds of presentation should appear here
virtual void Erase( const SALOME_OCCPrs*, const bool = false );//!< Erase SALOME_OCCPrs
virtual void Erase( const SALOME_VTKPrs*, const bool = false );//!< Erase SALOME_VTKPrs
- virtual void Erase( const SALOME_Prs2d*, const bool = false );//!< Erase SALOME_Prs2d
+ virtual void Erase( const SALOME_Prs2d*, const bool = false );//!< Erase SALOME_Prs2d
virtual void EraseAll( const bool = false );
// Add new Erase() methods here...
virtual SALOME_Prs* CreatePrs( const char* /*entry*/ = 0 ) { return 0; }
// Axiluary methods called before and after displaying of objects
- virtual void BeforeDisplay( SALOME_Displayer* ) {} //!< Null body here
- virtual void AfterDisplay ( SALOME_Displayer* ) {} //!< Null body here
+ virtual void BeforeDisplay( SALOME_Displayer*, const SALOME_Prs* );
+ virtual void AfterDisplay ( SALOME_Displayer*, const SALOME_Prs* );
// Axiluary methods called before and after erasing of objects
- virtual void BeforeErase( SALOME_Displayer* ) {} //!< Null body here
- virtual void AfterErase ( SALOME_Displayer* ) {} //!< Null body here
-
+ virtual void BeforeErase( SALOME_Displayer*, const SALOME_Prs* );
+ virtual void AfterErase ( SALOME_Displayer*, const SALOME_Prs* );
// New methods (asv)
//! \retval Return false.
virtual void GetVisible( SALOME_ListIO& theList ) {}
};
-/*!
- \class SALOME_Displayer
- These classes are used to specify type of view VTK, OCC or Plot2d
-*/
-class PRS_EXPORT SALOME_OCCViewType {};
-class PRS_EXPORT SALOME_VTKViewType {};
-class PRS_EXPORT SALOME_Plot2dViewType {};
-
/*!
\class SALOME_Displayer
Base class for SALOME displayers
//! Destructor
virtual ~SALOME_Displayer() {/*! Null body here*/}
- //! This Update() method should be called to update given presentation \n
- //! created anywhere by anybody. It simply passes control to SALOME_Prs object \n
+ //! This Update() method should be called to update given presentation
+ //! created anywhere by anybody. It simply passes control to SALOME_Prs object
//! so that it could perform double dispatch.
void UpdatePrs( SALOME_Prs* );
// Add new Update() methods here...
// Axiluary methods called before and after displaying of objects
- virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCViewType& ){/*! Null body here*/};
- virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCViewType& ){/*! Null body here*/};
- virtual void BeforeDisplay( SALOME_View*, const SALOME_VTKViewType& ){/*! Null body here*/};
- virtual void AfterDisplay ( SALOME_View*, const SALOME_VTKViewType& ){/*! Null body here*/};
- virtual void BeforeDisplay( SALOME_View*, const SALOME_Plot2dViewType& ){/*! Null body here*/};
- virtual void AfterDisplay ( SALOME_View*, const SALOME_Plot2dViewType& ){/*! Null body here*/};
+ virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCPrs* ) {} //! Null body here
+ virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCPrs* ) {} //! Null body here
+ virtual void BeforeDisplay( SALOME_View*, const SALOME_VTKPrs* ) {} //! Null body here
+ virtual void AfterDisplay ( SALOME_View*, const SALOME_VTKPrs* ) {} //! Null body here
+ virtual void BeforeDisplay( SALOME_View*, const SALOME_Prs2d* ) {} //! Null body here
+ virtual void AfterDisplay ( SALOME_View*, const SALOME_Prs2d* ) {} //! Null body here
// Axiluary methods called before and after erasing of objects
- virtual void BeforeErase( SALOME_View*, const SALOME_OCCViewType& ){/*! Null body here*/};
- virtual void AfterErase ( SALOME_View*, const SALOME_OCCViewType& ){/*! Null body here*/};
- virtual void BeforeErase( SALOME_View*, const SALOME_VTKViewType& ){/*! Null body here*/};
- virtual void AfterErase ( SALOME_View*, const SALOME_VTKViewType& ){/*! Null body here*/};
- virtual void BeforeErase( SALOME_View*, const SALOME_Plot2dViewType& ){/*! Null body here*/};
- virtual void AfterErase ( SALOME_View*, const SALOME_Plot2dViewType& ){/*! Null body here*/};
+ virtual void BeforeErase( SALOME_View*, const SALOME_OCCPrs* ) {} //! Null body here
+ virtual void AfterErase ( SALOME_View*, const SALOME_OCCPrs* ) {} //! Null body here
+ virtual void BeforeErase( SALOME_View*, const SALOME_VTKPrs* ) {} //! Null body here
+ virtual void AfterErase ( SALOME_View*, const SALOME_VTKPrs* ) {} //! Null body here
+ virtual void BeforeErase( SALOME_View*, const SALOME_Prs2d* ) {} //! Null body here
+ virtual void AfterErase ( SALOME_View*, const SALOME_Prs2d* ) {} //! Null body here
};