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 <GEOM_GenericObjPtr.h>
34 #include <AIS_InteractiveObject.hxx>
35 #include <SelectMgr_Filter.hxx>
36 #include <Standard_DefineHandle.hxx>
38 DEFINE_STANDARD_HANDLE(MeasureGUI_DimensionFilter, SelectMgr_Filter)
40 //=====================================================================================
41 // class : MeasureGUI_DimensionFilter
42 // purpose : OCC viewer filter for selecting dimensions displayed as part of
43 // presentation of particular GEOM object by its entry (owner of dimension).
44 //=====================================================================================
45 class MeasureGUI_DimensionFilter : public SelectMgr_Filter
49 DEFINE_STANDARD_RTTIEXT(MeasureGUI_DimensionFilter,SelectMgr_Filter)
52 Standard_EXPORT MeasureGUI_DimensionFilter( const Handle(AIS_InteractiveObject)& theIO );
53 Standard_EXPORT MeasureGUI_DimensionFilter( const int theId );
54 Standard_EXPORT MeasureGUI_DimensionFilter( const std::string& theEntry );
55 Standard_EXPORT MeasureGUI_DimensionFilter( const std::string& theEntry, const int theId );
57 Standard_EXPORT void SetFilterIO( const Handle(AIS_InteractiveObject)& theIO );
58 Standard_EXPORT void SetFilterEntry( const std::string& theEntry );
59 Standard_EXPORT void SetFilterId( const int theId );
61 Standard_Boolean IsFilterIO() const { return myIsFilterIO; }
62 Standard_Boolean IsFilterEntry() const { return myIsFilterEntry; }
63 Standard_Boolean IsFilterId() const { return myIsFilterId; }
65 void UnsetFilterIO() { myIsFilterIO = Standard_False; }
66 void UnsetFilterEntry() { myIsFilterEntry = Standard_False; }
67 void UnsetFilterId() { myIsFilterId = Standard_False; }
69 Standard_EXPORT virtual Standard_Boolean IsOk( const Handle(SelectMgr_EntityOwner)& theEntity ) const;
72 Handle(AIS_InteractiveObject) myFilterIO;
73 std::string myFilterEntry;
75 Standard_Boolean myIsFilterIO;
76 Standard_Boolean myIsFilterEntry;
77 Standard_Boolean myIsFilterId;