// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _AIS2D_InteractiveObject_HeaderFile #define _AIS2D_InteractiveObject_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_AIS2D_InteractiveObject_HeaderFile #include #endif #ifndef _Handle_AIS2D_InteractiveContext_HeaderFile #include #endif #ifndef _Handle_Prs2d_Drawer_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _AIS2D_TypeOfDetection_HeaderFile #include #endif #ifndef _AIS2D_DataMapOfPrimAspects_HeaderFile #include #endif #ifndef _Handle_AIS2D_HSequenceOfPrimArchit_HeaderFile #include #endif #ifndef _Graphic2d_GraphicObject_HeaderFile #include #endif #ifndef _Handle_Prs2d_AspectRoot_HeaderFile #include #endif #ifndef _Handle_Graphic2d_Primitive_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Prs2d_AspectName_HeaderFile #include #endif #ifndef _Aspect_FStream_HeaderFile #include #endif #ifndef _Aspect_IFStream_HeaderFile #include #endif class AIS2D_InteractiveContext; class Prs2d_Drawer; class AIS2D_HSequenceOfPrimArchit; class Prs2d_AspectRoot; class Graphic2d_Primitive; //! Class Interactive Object defines a class of objects
//! with display and selection services.
//! Using visualization and selection machanisms,
//! interactive objects are used to display datum, curves,
//! shapes, markers, dimensions, etc. Interactive objects
//! also provide links to the interactive context.
class AIS2D_InteractiveObject : public Graphic2d_GraphicObject { public: //! Initialize the Interactive Object
Standard_EXPORT AIS2D_InteractiveObject(); //! Returns the attributes settings
Handle_Prs2d_Drawer Attributes() const; //! Initializes the drawing tool
Standard_EXPORT virtual void SetAttributes(const Handle(Prs2d_Drawer)& aDrawer) ; //! Clears settings provided by the drawing tool
Standard_EXPORT virtual void UnsetAttributes() ; //! Sets the attributes from Aspect
//! to all primitives appropriate this Aspect.
Standard_EXPORT void SetAspect(const Handle(Prs2d_AspectRoot)& anAspect) ; //! Sets the attributes from Aspect
//! to primitive
//! Method works only for objects are linked
//! with InteractiveContext
Standard_EXPORT void SetAspect(const Handle(Prs2d_AspectRoot)& anAspect,const Handle(Graphic2d_Primitive)& aPrimitive) ; //! Returns Aspect for primitive
//! Method works only for objects are linked
//! with InteractiveContext
Standard_EXPORT Handle_Prs2d_AspectRoot GetAspect(const Handle(Graphic2d_Primitive)& aPrimitive) const; //! Returns true if primitive
//! is linked with an aspect
Standard_EXPORT Standard_Boolean HasAspect(const Handle(Graphic2d_Primitive)& aPrimitive) const; //! Indicates whether the Interactive Object has a pointer
//! to an interactive context.
Standard_EXPORT Standard_Boolean HasInteractiveContext() const; //! Returns the context pointer to the interactive context.
Standard_EXPORT Handle_AIS2D_InteractiveContext GetContext() const; //! Places a link to . The drawer of AIS2D_InteractiveObject
//! is connected to the Default Drawer Of .
//! That Means that this method has to be redefined if
//! computations depend on drawer values.
Standard_EXPORT virtual void SetContext(const Handle(AIS2D_InteractiveContext)& aCntx) ; //! Indicates the display mode of the Interactive Object
Standard_Integer DisplayMode() const; //! Returns True if the Interactive Object has
//! a display mode setting. Otherwise, it is
//! displayed in Neutral Point.
Standard_Boolean HasDisplayMode() const; //! Allows to provide a setting for an
//! Interactive Object's display mode.
void SetDisplayMode(const Standard_Integer aMode) ; //! Removes display mode settings from the Interactive object
void UnsetDisplayMode() ; //! Returns the default display mode. This method is to be
//! implemented when the main mode is not mode 0.
virtual Standard_Integer DefaultDisplayMode() const; //! Returns true if the class of objects accepts the display mode
virtual Standard_Boolean AcceptDisplayMode(const Standard_Integer aMode) const; //! Returns the setting for highlight mode.
AIS2D_TypeOfDetection HighlightMode() const; //! Returns true if the Interactive Object is in highlight mode
Standard_Boolean HasHighlightMode() const; //! Allows to provide settings for highlight mode.
void SetHighlightMode(const AIS2D_TypeOfDetection aMode) ; //! Removes settings for highlight mode
void UnsetHighlightMode() ; //! Returns the default highlight mode
virtual AIS2D_TypeOfDetection DefaultHighlightMode() const; //! Indicates the selection mode of the Interactive Object
Standard_Integer SelectionMode() const; //! Allows you to change the selection mode of an Interactive Object
Standard_Boolean HasSelectionMode() const; //! Allows to provide a setting for an
//! Interactive Object's selection mode.
void SetSelectionMode(const Standard_Integer aMode) ; //! Removes settings for selection mode
void UnsetSelectionMode() ; //! Returns the default selection mode
virtual Standard_Integer DefaultSelectionMode() const; Standard_Integer State() const; void SetState(const Standard_Integer aState) ; //! Selects primitive with index( TOD_PRIMITIVE mode only )
Standard_EXPORT void SelectPrimitive(const Standard_Integer anIndex,const Standard_Boolean append) ; Standard_EXPORT virtual void Save(Aspect_FStream& aFStream) const; Standard_EXPORT virtual void Retrieve(Aspect_IFStream& anIFStream) const; friend class AIS2D_InteractiveContext; DEFINE_STANDARD_RTTI(AIS2D_InteractiveObject) protected: Handle_Prs2d_Drawer myDrawer; AIS2D_TypeOfDetection myHighlightMode; private: Standard_EXPORT Standard_Boolean PrimitiveExist(const Prs2d_AspectName aName) const; Standard_EXPORT void AddDetectPrim(const Handle(Graphic2d_Primitive)& aPrim,const Standard_Integer anInd) ; Standard_EXPORT void AddSelectPrim(const Handle(Graphic2d_Primitive)& aPrim,const Standard_Integer anInd) ; Standard_EXPORT void RemoveSelectPrim(const Handle(Graphic2d_Primitive)& aPrim,const Standard_Integer anInd) ; Standard_EXPORT void SetSelSeqPrim(const Handle(AIS2D_HSequenceOfPrimArchit)& aSeq) ; Standard_EXPORT void ClearSeqDetPrim() ; Standard_EXPORT void ClearSeqSelPrim() ; Standard_EXPORT Handle_AIS2D_HSequenceOfPrimArchit GetDetectSeqPrim() const; Standard_EXPORT Handle_AIS2D_HSequenceOfPrimArchit GetSelectedSeqPrim() const; Handle_AIS2D_InteractiveContext myICTX; Standard_Integer myDisplayMode; Standard_Integer mySelectionMode; AIS2D_DataMapOfPrimAspects myAspects; Standard_Integer myState; Handle_AIS2D_HSequenceOfPrimArchit myDetectedPrimSeq; Handle_AIS2D_HSequenceOfPrimArchit mySelectedPrimSeq; }; #include // other Inline functions and methods (like "C++: function call" methods) #endif