1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // GEOM GEOMGUI : GUI for Geometry component
24 // File : MeasureGUI_DimensionFilter.h
25 // Author : Anton POLETAEV, Open CASCADE S.A.S.
27 #ifndef MEASUREGUI_DIMENSIONFILTER_H
28 #define MEASUREGUI_DIMENSIONFILTER_H
31 #include <Basics_OCCTVersion.hxx>
34 #include <GEOM_GenericObjPtr.h>
37 #include <AIS_InteractiveObject.hxx>
38 #include <SelectMgr_Filter.hxx>
39 #include <Standard_DefineHandle.hxx>
41 DEFINE_STANDARD_HANDLE(MeasureGUI_DimensionFilter, SelectMgr_Filter)
43 //=====================================================================================
44 // class : MeasureGUI_DimensionFilter
45 // purpose : OCC viewer filter for selecting dimensions displayed as part of
46 // presentation of particular GEOM object by its entry (owner of dimension).
47 //=====================================================================================
48 class MeasureGUI_DimensionFilter : public SelectMgr_Filter
52 OCCT_DEFINE_STANDARD_RTTIEXT(MeasureGUI_DimensionFilter,SelectMgr_Filter)
55 Standard_EXPORT MeasureGUI_DimensionFilter( const Handle(AIS_InteractiveObject)& theIO );
56 Standard_EXPORT MeasureGUI_DimensionFilter( const int theId );
57 Standard_EXPORT MeasureGUI_DimensionFilter( const std::string& theEntry );
58 Standard_EXPORT MeasureGUI_DimensionFilter( const std::string& theEntry, const int theId );
60 Standard_EXPORT void SetFilterIO( const Handle(AIS_InteractiveObject)& theIO );
61 Standard_EXPORT void SetFilterEntry( const std::string& theEntry );
62 Standard_EXPORT void SetFilterId( const int theId );
64 Standard_Boolean IsFilterIO() const { return myIsFilterIO; }
65 Standard_Boolean IsFilterEntry() const { return myIsFilterEntry; }
66 Standard_Boolean IsFilterId() const { return myIsFilterId; }
68 void UnsetFilterIO() { myIsFilterIO = Standard_False; }
69 void UnsetFilterEntry() { myIsFilterEntry = Standard_False; }
70 void UnsetFilterId() { myIsFilterId = Standard_False; }
72 Standard_EXPORT virtual Standard_Boolean IsOk( const Handle(SelectMgr_EntityOwner)& theEntity ) const;
75 Handle(AIS_InteractiveObject) myFilterIO;
76 std::string myFilterEntry;
78 Standard_Boolean myIsFilterIO;
79 Standard_Boolean myIsFilterEntry;
80 Standard_Boolean myIsFilterId;