Integration of OCCT 6.5.0 from SVN
[occt.git] / src / AIS / AIS_AttributeFilter.cdl
1 -- File:        AIS_AttributeFilter.cdl
2 -- Created:     Tue Mar  4 17:58:52 1997
3 -- Author:      Robert COUBLANC
4 --              <rob@robox.paris1.matra-dtv.fr>
5 ---Copyright:    Matra Datavision 1997
6
7
8
9
10 class AttributeFilter from AIS inherits Filter from SelectMgr
11
12         ---Purpose: Selects Interactive Objects, which have the desired width or color.
13         -- The filter questions each Interactive Object in local
14         -- context to determine whether it has an non-null
15         -- owner, and if so, whether it has the required color
16         -- and width attributes. If the object returns true in each
17         -- case, it is kept. If not, it is rejected.
18         -- This filter is used only in an open local context.
19         -- In the Collector viewer, you can only locate
20         -- Interactive Objects, which answer positively to the
21         -- filters, which are in position when a local context is open.
22
23 uses
24     NameOfColor from Quantity,
25     EntityOwner from SelectMgr
26     
27
28 is
29
30     Create returns mutable AttributeFilter from AIS;
31         ---Purpose:
32         -- Constructs an empty attribute filter object.
33         -- This filter object determines whether selectable
34         -- interactive objects have a non-null owner.   
35     
36     Create (aCol: NameOfColor from Quantity)
37     returns mutable AttributeFilter from AIS;
38         ---Purpose:
39         -- Constructs an attribute filter object defined by the
40         -- color attribute aCol.    
41     Create (aWidth : Real from Standard)
42     returns mutable AttributeFilter from AIS;
43         ---Purpose:
44         -- Constructs an attribute filter object defined by the line
45         -- width attribute aWidth.
46
47     HasColor(me) returns Boolean from Standard;
48         ---C++: inline
49         ---Purpose:
50         -- Indicates that the Interactive Object has the color
51         -- setting specified by the argument aCol at construction time.
52         
53     HasWidth(me) returns Boolean from Standard;
54         ---C++: inline
55         ---Purpose:
56         -- Indicates that the Interactive Object has the width
57         -- setting specified by the argument aWidth at
58         -- construction time.
59         
60     SetColor(me:mutable;aCol: NameOfColor from Quantity);
61         ---C++: inline
62         ---Purpose: Sets the color aCol.
63         -- This must be chosen from the list of colors in Quantity_NameOfColor.
64     
65     SetWidth(me:mutable;aWidth : Real from Standard);
66         ---C++: inline
67         ---Purpose:  Sets the line width aWidth.
68     
69     UnsetColor(me:mutable);
70         ---C++: inline
71         ---Purpose:
72         -- Removes the setting for color from the filter.
73     
74     UnsetWidth(me:mutable);
75         ---C++: inline
76         ---Purpose:
77         -- Removes the setting for width from the filter.
78
79     IsOk(me;anObj : EntityOwner from SelectMgr)
80     returns Boolean from Standard is redefined virtual;
81         ---Purpose: Indicates that the selected Interactive Object passes
82         -- the filter. The owner, anObj, can be either direct or
83         -- user. A direct owner is the corresponding
84         -- construction element, whereas a user is the
85         -- compound shape of which the entity forms a part.
86         -- If the Interactive Object returns Standard_True
87         -- when detected by the Local Context selector through
88         -- the mouse, the object is kept; if not, it is rejected.
89
90
91 fields
92         
93     myCol : NameOfColor from Quantity;
94     myWid : Real from Standard;
95     hasC,hasW : Boolean from Standard;
96     
97 end AttributeFilter;