|
||||
File indexing completed on 2025-01-18 10:04:53
0001 // Created on: 1997-03-05 0002 // Created by: Robert COUBLANC 0003 // Copyright (c) 1997-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _SelectMgr_Filter_HeaderFile 0018 #define _SelectMgr_Filter_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Transient.hxx> 0024 #include <TopAbs_ShapeEnum.hxx> 0025 class SelectMgr_EntityOwner; 0026 0027 0028 class SelectMgr_Filter; 0029 DEFINE_STANDARD_HANDLE(SelectMgr_Filter, Standard_Transient) 0030 0031 //! The root class to define filter objects for selection. 0032 //! Advance handling of objects requires the services of 0033 //! filters. These only allow dynamic detection and 0034 //! selection of objects which correspond to the criteria defined in each. 0035 //! Eight standard filters inheriting SelectMgr_Filter are 0036 //! defined in Open CASCADE. 0037 //! You can create your own filters by defining new filter 0038 //! classes inheriting this framework. You use these 0039 //! filters by loading them into an AIS interactive context. 0040 class SelectMgr_Filter : public Standard_Transient 0041 { 0042 0043 public: 0044 0045 0046 //! Indicates that the selected Interactive Object 0047 //! passes the filter. The owner, anObj, can be either 0048 //! direct or user. A direct owner is the corresponding 0049 //! construction element, whereas a user is the 0050 //! compound shape of which the entity forms a part. 0051 //! When an object is detected by the mouse - in AIS, 0052 //! this is done through a context selector - its owner 0053 //! is passed to the filter as an argument. 0054 //! If the object returns Standard_True, it is kept; if 0055 //! not, it is rejected. 0056 //! If you are creating a filter class inheriting this 0057 //! framework, and the daughter class is to be used in 0058 //! an AIS local context, you will need to implement the 0059 //! virtual function ActsOn. 0060 Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& anObj) const = 0; 0061 0062 //! Returns true in an AIS local context, if this filter 0063 //! operates on a type of subshape defined in a filter 0064 //! class inheriting this framework. 0065 //! This function completes IsOk in an AIS local context. 0066 Standard_EXPORT virtual Standard_Boolean ActsOn (const TopAbs_ShapeEnum aStandardMode) const; 0067 0068 0069 0070 0071 DEFINE_STANDARD_RTTIEXT(SelectMgr_Filter,Standard_Transient) 0072 0073 protected: 0074 0075 0076 0077 0078 private: 0079 0080 0081 0082 0083 }; 0084 0085 0086 0087 0088 0089 0090 0091 #endif // _SelectMgr_Filter_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |