X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Displayer.h;h=a720d6b586af1e3b31401c705236691e4cba3121;hb=4de8d53fef7532b6843d79c970f55ad46f98da62;hp=cf1f5edc2dedf66f6caf8dd8a6d98ba06b5f5b96;hpb=c4eab94a20a0d93100549a210582d46409fec1cc;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Displayer.h b/src/XGUI/XGUI_Displayer.h index cf1f5edc2..a720d6b58 100644 --- a/src/XGUI/XGUI_Displayer.h +++ b/src/XGUI/XGUI_Displayer.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -23,7 +23,6 @@ #include "XGUI.h" #include -#include #include #include @@ -277,7 +276,10 @@ public: bool enableUpdateViewer(const bool isEnabled); /// Returns true if the viewer update is not blocked - bool isUpdateEnabled() const; + bool isUpdateEnabled() const + { + return myViewerBlockedRecursiveCount == 0; + } /// Updates the viewer void updateViewer() const; @@ -375,6 +377,13 @@ public: /// Returns scale of active view double getViewScale() const; + /// Set color of selection + /// \param theColor R,G,B values of color + void setSelectionColor(const std::vector& theColor); + + /// Returns current selection color + std::vector selectionColor() const; + signals: /// Signal on object display /// \param theObject a data object @@ -440,20 +449,16 @@ private: const NCollection_DataMap>& theShapesToBeSelected); -protected: +private: XGUI_SelectionActivate* selectionActivate() const; -protected: +private: XGUI_Workshop* myWorkshop; ///< Reference to workshop #ifdef TINSPECTOR Handle(VInspectorAPI_CallBack) myVCallBack; #endif Handle(SelectMgr_AndFilter) myAndFilter; ///< A container for selection filters - /// A default custom presentation, which is used if the displayed feature is not - /// a custom presentation - GeomCustomPrsPtr myCustomPrs; - /// Definition of a type of map which defines correspondance between objects and presentations #ifdef OPTIMIZE_PRS XGUI_TwoSidePresentationMap myResult2AISObjectMap; ///< A map of displayed objects @@ -465,7 +470,7 @@ protected: /// Number of blocking of the viewer update. The viewer is updated only if it is zero int myViewerBlockedRecursiveCount; - bool myIsFirstAISContextUse; ///< Flag: first asking of AIS context: trihedron activation + mutable void* myContextId; mutable bool myNeedUpdate; ///< A flag that update was requested but not done };