/// Fit all along Z (perpendicular to display)
//virtual void Zfitall() = 0;
+ static Handle(Prs3d_Drawer) DefaultHighlightDrawer;
+
signals:
/// Signal emited when last view window is closed
void lastViewClosed();
protected:
/// A map for storing a scale factors dependent on view object
QMap<Handle(V3d_View), double> myWindowScale;
+
};
#endif
#include <ModuleBase_WidgetFactory.h>
#include <ModuleBase_IWorkshop.h>
#include <ModuleBase_IModule.h>
+#include <ModuleBase_IViewer.h>
#include <ModuleBase_IconFactory.h>
#include <ModuleBase_ResultPrs.h>
#include <ModuleBase_ViewerPrs.h>
#include <StdSelect_BRepOwner.hxx>
#include <TopoDS_Iterator.hxx>
+#include <AIS_InteractiveContext.hxx>
+#include <Prs3d_LineAspect.hxx>
+#include <Prs3d_PlaneAspect.hxx>
#include <GeomDataAPI_Point2D.h>
#include <Events_InfoMessage.h>
}
Handle(Graphic3d_AspectMarker3d) anAspect;
- Handle(Prs3d_Drawer) aDrawer = theAIS->HilightAttributes();
-#ifdef USE_OCCT_720
- // to do: implement ball highlighting, in 7.2.0 this drawer is NULL
-#else
-/*
+ Handle(Prs3d_Drawer) aDrawer = theAIS->DynamicHilightAttributes();
+ if (aDrawer.IsNull()) {
+ aDrawer = new Prs3d_Drawer(*ModuleBase_IViewer::DefaultHighlightDrawer);
+ if (!aDrawer->HasOwnPointAspect()) {
+ aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_BALL, Quantity_NOC_BLACK, 2.0));
+ }
+ }
if(aDrawer->HasOwnPointAspect()) {
Handle(Prs3d_PointAspect) aPntAspect = aDrawer->PointAspect();
if(aPixMap->IsEmpty()) {
aPntAspect->SetAspect(anAspect);
}
aDrawer->SetPointAspect(aPntAspect);
- theAIS->SetHilightAttributes(aDrawer);
+ theAIS->SetDynamicHilightAttributes(aDrawer);
}
- */
-#endif
}
} // namespace ModuleBase_Tools
#include <ModuleBase_ResultPrs.h>
#include <ModuleBase_Tools.h>
#include <ModuleBase_ViewerPrs.h>
+#include <ModuleBase_IViewer.h>
#include <GeomAPI_Shape.h>
#include <GeomAPI_IPresentable.h>
selectionActivate()->deactivateTrihedron(true);
aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0);
aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0);
+ ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle();
}
return aContext;
}