1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_Filters.h
4 // Created: 08 Nov 2014
5 // Author: Vitaly SMETANNIKOV
7 #ifndef PartSet_Filters_H
8 #define PartSet_Filters_H
10 #include <ModuleBase_ViewerFilters.h>
14 * \class PartSet_GlobalFilter
16 * A class which filters groups object in addition to documents (see issue #310)
18 DEFINE_STANDARD_HANDLE(PartSet_GlobalFilter, ModuleBase_ShapeDocumentFilter);
19 class PartSet_GlobalFilter: public ModuleBase_ShapeDocumentFilter
23 /// \param theWorkshop a pointer to workshop
24 PartSet_GlobalFilter(ModuleBase_IWorkshop* theWorkshop)
25 : ModuleBase_ShapeDocumentFilter(theWorkshop) {}
27 /// Returns True if selected presentation can be selected
28 /// \param theOwner an owner of the persentation
29 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
31 DEFINE_STANDARD_RTTI(PartSet_GlobalFilter)
35 /// \class PartSet_CirclePointFilter
37 /// \brief A filter which provide filtering of selection in 3d viewer.
38 /// Installing of this filter disables selection of point on circle in sketch
39 DEFINE_STANDARD_HANDLE(PartSet_CirclePointFilter, SelectMgr_Filter);
40 class PartSet_CirclePointFilter: public SelectMgr_Filter
45 /// \param theWorkshop instance of workshop interface
46 Standard_EXPORT PartSet_CirclePointFilter(ModuleBase_IWorkshop* theWorkshop):
48 myWorkshop(theWorkshop) {};
50 /// Returns True if the given owner is acceptable for selection
51 /// \param theOwner the selected owner
52 Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SelectMgr_EntityOwner)& theOwner) const;
54 DEFINE_STANDARD_RTTI(PartSet_CirclePointFilter)
58 /// Reference to workshop
59 ModuleBase_IWorkshop* myWorkshop;