From cee2b5567d2045850fb6f4493ac254e362842de0 Mon Sep 17 00:00:00 2001 From: kgv Date: Wed, 16 Aug 2017 14:06:29 +0300 Subject: [PATCH] 0028323: Documentation - explain highlighting logic of AIS_InteractiveObject in the upgrade guide --- dox/dev_guides/upgrade/upgrade.md | 3 +++ src/PrsMgr/PrsMgr_PresentableObject.hxx | 2 ++ 2 files changed, 5 insertions(+) diff --git a/dox/dev_guides/upgrade/upgrade.md b/dox/dev_guides/upgrade/upgrade.md index 320059c8ff..cfdbc9f11b 100644 --- a/dox/dev_guides/upgrade/upgrade.md +++ b/dox/dev_guides/upgrade/upgrade.md @@ -1195,6 +1195,9 @@ Management of highlight attributes has been revised and might require modificati it is now possible to customize default highlight attributes like *Display Mode* and *ZLayer*, which previously could be defined only on Object level. * Properties *Prs3d_Drawer::HighlightStyle()* and *Prs3d_Drawer::SelectionStyle()* have been removed. Instead, *AIS_InteractiveObject* now defines *DynamicHilightAttributes()* for dynamic highlighting in addition to *HilightAttributes()* used for highlighting in selected state. + Note that *AIS_InteractiveObject::HilightAttributes()* and *AIS_InteractiveObject::DynamicHilightAttributes()* override highlighting properties for both - entire object and for part coming from decomposition. + This includes Z-layer settings, which will be the same when overriding properties through AIS_InteractiveObject, while *AIS_InteractiveContext::HighlightStyle()* allows customizing properties for local and global selection independently + (with Graphic3d_ZLayerId_Top used for dynamic highlighting of entire object and Graphic3d_ZLayerId_Topmost for dynamic highlighting of object part by default). * The following protected fields have been removed from class *AIS_InteractiveObject*: - *myOwnColor*, replaced by *myDrawer->Color()* - *myTransparency*, replaced by *myDrawer->Transparency()* diff --git a/src/PrsMgr/PrsMgr_PresentableObject.hxx b/src/PrsMgr/PrsMgr_PresentableObject.hxx index 89134b82e2..d89f008039 100644 --- a/src/PrsMgr/PrsMgr_PresentableObject.hxx +++ b/src/PrsMgr/PrsMgr_PresentableObject.hxx @@ -223,12 +223,14 @@ public: Standard_EXPORT virtual void UnsetAttributes(); //! Returns the hilight attributes settings. + //! When not NULL, overrides both Prs3d_TypeOfHighlight_LocalSelected and Prs3d_TypeOfHighlight_Selected defined within AIS_InteractiveContext. const Handle(Prs3d_Drawer)& HilightAttributes() const { return myHilightDrawer; } //! Initializes the hilight drawing tool theDrawer. virtual void SetHilightAttributes(const Handle(Prs3d_Drawer)& theDrawer) { myHilightDrawer = theDrawer; } //! Returns the hilight attributes settings. + //! When not NULL, overrides both Prs3d_TypeOfHighlight_LocalDynamic and Prs3d_TypeOfHighlight_Dynamic defined within AIS_InteractiveContext. const Handle(Prs3d_Drawer)& DynamicHilightAttributes() const { return myDynHilightDrawer; } //! Initializes the dynamic hilight drawing tool.