Group of methods AIS_InteractiveContext::IsHilighted changed behavior - now they only check object's or owner's highlight flags in global status. If highlight color is required on application level, overloaded methods AIS_InteractiveContext::HighlightStyle for owner and object must be used instead.
The following methods were replaced in AIS_InteractiveContext API:
-- *HilightColor*, *SetHilightColor* were replaced by *HighlightStyle*, *ChangeHighlightStyle*;
-- *SelectionColor* setter and getter were replaced by *SelectionStyle*, *ChangeSelectionStyle*.
+- *HilightColor*, *SetHilightColor* were replaced by *HighlightStyle*, *SetHighlightStyle*;
+- *SelectionColor* setter and getter were replaced by *SelectionStyle*, *SetSelectionStyle*.
API of Prs3d_Drawer was extended to allow setting up styles for both dynamic selection and highlighting. Therefore, on application level changing highlight style for particular object must be implemented via SelectMgr_SelectableObject::HilightAttributes() and processed in entity owner.
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <AIS_ConnectedInteractive.hxx>
+#include <AIS_InteractiveContext.hxx>
#include <AIS_DataMapIteratorOfDataMapOfILC.hxx>
#include <AIS_DataMapIteratorOfDataMapOfIOStatus.hxx>
+#include <AIS_ConnectedInteractive.hxx>
#include <AIS_GlobalStatus.hxx>
-#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <AIS_LocalContext.hxx>
return myHiStyle;
}
- //! Allows to manage the style of dynamic highlighting.
- //! By default:
- //! - the color of dynamic highlight is Quantity_NOC_CYAN1;
- //! - the presentation for dynamic highlight is completely opaque;
- //! - the type of highlight is Aspect_TOHM_COLOR.
- Handle(Graphic3d_HighlightStyle)& ChangeHighlightStyle()
- {
- return myHiStyle;
- }
+ //! Setup the style of dynamic highlighting.
+ void SetHighlightStyle (const Handle(Graphic3d_HighlightStyle)& theStyle) { myHiStyle = theStyle; }
//! Returns current selection style settings.
//! By default:
return mySelStyle;
}
- //! Allows to manage the style of selection highlighting.
- //! By default:
- //! - the color of selection is Quantity_NOC_GRAY80;
- //! - the presentation for selection is completely opaque;
- //! - the type of highlight is Aspect_TOHM_COLOR.
- Handle(Graphic3d_HighlightStyle)& ChangeSelectionStyle()
- {
- return mySelStyle;
- }
+ //! Setup the style of selection highlighting.
+ void SetSelectionStyle (const Handle(Graphic3d_HighlightStyle)& theStyle) { mySelStyle = theStyle; }
//! Returns the name of the color used to show preselection.
//! By default, this is Quantity_NOC_GREEN.
Handle(AIS_InteractiveObject) aCircle=new AIS_Circle(ahCircle);
myAISContext->Display(aCircle);
- Handle(Graphic3d_HighlightStyle)& aSelStyle = myAISContext->ChangeSelectionStyle();
+ const Handle(Graphic3d_HighlightStyle)& aSelStyle = myAISContext->SelectionStyle();
aSelStyle->SetColor (Quantity_NOC_BLUE1);
myAISContext->AddOrRemoveSelected(aTrihedron);
aCtx->SetPixelTolerance (aCmd.ArgInt ("pixTol"));
}
- Handle(Graphic3d_HighlightStyle)& aHiStyle = aCtx->ChangeHighlightStyle();
- Handle(Graphic3d_HighlightStyle)& aSelStyle = aCtx->ChangeSelectionStyle();
+ const Handle(Graphic3d_HighlightStyle)& aHiStyle = aCtx->HighlightStyle();
+ const Handle(Graphic3d_HighlightStyle)& aSelStyle = aCtx->SelectionStyle();
Standard_Boolean toRedraw = Standard_False;
if (aCmd.HasOption ("selColor"))
{