X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_SymbolPrs.h;h=3fe2086996917b60e2e590adf4e4c99d8e7e7b7b;hb=7f873aed4bae5a98dca078209699b54276b46fce;hp=792fde0155d82c6d4d4a0bd6e7e9b3784190761e;hpb=7453d57ebe6eaa15b3b032fb2511a30fc128af5c;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.h b/src/SketcherPrs/SketcherPrs_SymbolPrs.h index 792fde015..3fe208699 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.h +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.h @@ -31,16 +31,35 @@ public: /// Constructor /// \param theConstraint a constraint feature /// \param thePlane a coordinate plane of current sketch - SketcherPrs_SymbolPrs(SketchPlugin_Constraint* theConstraint, + Standard_EXPORT SketcherPrs_SymbolPrs(SketchPlugin_Constraint* theConstraint, const std::shared_ptr& thePlane); - + //! Method which clear all selected owners belonging //! to this selectable object ( for fast presentation draw ) Standard_EXPORT virtual void ClearSelected(); + + //! Method which draws selected owners ( for fast presentation draw ) + Standard_EXPORT virtual void HilightSelected(const Handle(PrsMgr_PresentationManager3d)& thePM, + const SelectMgr_SequenceOfOwner& theOwners); + + //! Method which hilight an owner belonging to + //! this selectable object ( for fast presentation draw ) + Standard_EXPORT virtual void HilightOwnerWithColor(const Handle(PrsMgr_PresentationManager3d)& thePM, + const Quantity_NameOfColor theColor, const Handle(SelectMgr_EntityOwner)& theOwner); + + Standard_EXPORT std::shared_ptr plane() const { return myPlane; } + + Standard_EXPORT SketchPlugin_Constraint* feature() const { return myConstraint; } + DEFINE_STANDARD_RTTI(SketcherPrs_SymbolPrs) protected: + + /// Redefinition of virtual function + Standard_EXPORT virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection, + const Standard_Integer aMode); + /// Returns an icon file name. Has to be redefined in successors virtual const char* iconName() const = 0; @@ -56,6 +75,11 @@ protected: /// \param theAttrName an attribute name which corresponds to referenced line void addLine(const Handle(Graphic3d_Group)& theGroup, std::string theAttrName) const; + /// Redefine this function in order to add additiona lines of constraint base + /// \param thePrs a presentation + /// \param theColor a color of additiona lines + virtual void drawLines(const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const {} + protected: /// Constraint feature SketchPlugin_Constraint* myConstraint; @@ -66,9 +90,13 @@ protected: /// Aspect for entities drawing Handle(Graphic3d_AspectMarker3d) myAspect; + /// Array of symbols positions + Handle(Graphic3d_ArrayOfPoints) myPntArray; + private: /// Static map to collect constraints icons {IconName : IconPixMap} static std::map myIconsMap; + }; #endif \ No newline at end of file