0026139: AIS_InteractiveContext::Display performance regression
[occt.git] / src / SelectMgr / SelectMgr_Filter.cdl
1 -- Created on: 1997-03-05
2 -- Created by: Robert COUBLANC
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 deferred class Filter from SelectMgr inherits TShared from MMgt
18
19         ---Purpose: The root class to define filter objects for selection.
20         -- Advance handling of objects requires the services of
21         -- filters. These only allow dynamic detection and
22         -- selection of objects which correspond to the criteria defined in each.
23         -- Eight standard filters inheriting SelectMgr_Filter are
24         -- defined in Open CASCADE.
25         --  You can create your own filters by defining new filter
26         -- classes inheriting this framework. You use these
27         -- filters by loading them into an AIS interactive context. 
28
29 uses
30      EntityOwner from SelectMgr,
31      ShapeEnum from TopAbs
32 is
33     IsOk(me; anObj : EntityOwner from SelectMgr)
34     returns Boolean from Standard
35     is deferred;
36         ---Purpose: Indicates that the selected Interactive Object
37         -- passes the filter. The owner, anObj, can be either
38         -- direct or user. A direct owner is the corresponding
39         -- construction element, whereas a user is the
40         -- compound shape of which the entity forms a part.
41         -- When an object is detected by the mouse - in AIS,
42         -- this is done through a context selector - its owner
43         -- is passed to the filter as an argument.
44         -- If the object returns Standard_True, it is kept; if
45         -- not, it is rejected.
46         -- If you are creating a filter class inheriting this
47         -- framework, and the daughter class is to be used in
48         -- an AIS local context, you will need to implement the
49         -- virtual function ActsOn.
50         
51     ActsOn(me; aStandardMode : ShapeEnum from TopAbs)
52     returns Boolean from Standard is virtual;
53         ---Purpose: Returns true in an AIS local context, if this filter
54         -- operates on a type of subshape defined in a filter
55         -- class inheriting this framework.
56         -- This function completes IsOk in an AIS local context.
57     
58
59 end Filter;