Salome HOME
Issue #1834: Fix length of lines
[modules/shaper.git] / src / PartSet / PartSet_Filters.h
index aba48302f78784315be71582cc63fc014fd4f608..71d60fe4c663d4afa80a4cd259560938a1358231 100644 (file)
@@ -26,9 +26,39 @@ public:
 
   /// Returns True if selected presentation can be selected
   /// \param theOwner an owner of the persentation
-  Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
+  Standard_EXPORT virtual Standard_Boolean 
+    IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   DEFINE_STANDARD_RTTI(PartSet_GlobalFilter)
 };
 
+
+/// \class PartSet_CirclePointFilter
+/// \ingroup GUI
+/// \brief A filter which provide filtering of selection in 3d viewer.
+/// Installing of this filter disables selection of point on circle in sketch
+DEFINE_STANDARD_HANDLE(PartSet_CirclePointFilter, SelectMgr_Filter);
+class PartSet_CirclePointFilter: public SelectMgr_Filter
+{
+public:
+
+  /// Constructor
+  /// \param theWorkshop instance of workshop interface
+  Standard_EXPORT PartSet_CirclePointFilter(ModuleBase_IWorkshop* theWorkshop):
+    SelectMgr_Filter(),
+    myWorkshop(theWorkshop) {};
+
+  /// Returns True if the given owner is acceptable for selection
+  /// \param theOwner the selected owner
+  Standard_EXPORT virtual Standard_Boolean 
+    IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
+
+  DEFINE_STANDARD_RTTI(PartSet_CirclePointFilter)
+
+private:
+
+  /// Reference to workshop
+  ModuleBase_IWorkshop* myWorkshop;
+};
+
 #endif
\ No newline at end of file