0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / AIS / AIS_AttributeFilter.cdl
CommitLineData
b311480e 1-- Created on: 1997-03-04
2-- Created by: Robert COUBLANC
3-- Copyright (c) 1997-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23
24
25class AttributeFilter from AIS inherits Filter from SelectMgr
26
27 ---Purpose: Selects Interactive Objects, which have the desired width or color.
28 -- The filter questions each Interactive Object in local
29 -- context to determine whether it has an non-null
30 -- owner, and if so, whether it has the required color
31 -- and width attributes. If the object returns true in each
32 -- case, it is kept. If not, it is rejected.
33 -- This filter is used only in an open local context.
34 -- In the Collector viewer, you can only locate
35 -- Interactive Objects, which answer positively to the
36 -- filters, which are in position when a local context is open.
37
38uses
39 NameOfColor from Quantity,
40 EntityOwner from SelectMgr
41
42
43is
44
45 Create returns mutable AttributeFilter from AIS;
46 ---Purpose:
47 -- Constructs an empty attribute filter object.
48 -- This filter object determines whether selectable
49 -- interactive objects have a non-null owner.
50
51 Create (aCol: NameOfColor from Quantity)
52 returns mutable AttributeFilter from AIS;
53 ---Purpose:
54 -- Constructs an attribute filter object defined by the
55 -- color attribute aCol.
56 Create (aWidth : Real from Standard)
57 returns mutable AttributeFilter from AIS;
58 ---Purpose:
59 -- Constructs an attribute filter object defined by the line
60 -- width attribute aWidth.
61
62 HasColor(me) returns Boolean from Standard;
63 ---C++: inline
64 ---Purpose:
65 -- Indicates that the Interactive Object has the color
66 -- setting specified by the argument aCol at construction time.
67
68 HasWidth(me) returns Boolean from Standard;
69 ---C++: inline
70 ---Purpose:
71 -- Indicates that the Interactive Object has the width
72 -- setting specified by the argument aWidth at
73 -- construction time.
74
75 SetColor(me:mutable;aCol: NameOfColor from Quantity);
76 ---C++: inline
77 ---Purpose: Sets the color aCol.
78 -- This must be chosen from the list of colors in Quantity_NameOfColor.
79
80 SetWidth(me:mutable;aWidth : Real from Standard);
81 ---C++: inline
82 ---Purpose: Sets the line width aWidth.
83
84 UnsetColor(me:mutable);
85 ---C++: inline
86 ---Purpose:
87 -- Removes the setting for color from the filter.
88
89 UnsetWidth(me:mutable);
90 ---C++: inline
91 ---Purpose:
92 -- Removes the setting for width from the filter.
93
94 IsOk(me;anObj : EntityOwner from SelectMgr)
95 returns Boolean from Standard is redefined virtual;
96 ---Purpose: Indicates that the selected Interactive Object passes
97 -- the filter. The owner, anObj, can be either direct or
98 -- user. A direct owner is the corresponding
99 -- construction element, whereas a user is the
100 -- compound shape of which the entity forms a part.
101 -- If the Interactive Object returns Standard_True
102 -- when detected by the Local Context selector through
103 -- the mouse, the object is kept; if not, it is rejected.
104
105
106fields
107
108 myCol : NameOfColor from Quantity;
109 myWid : Real from Standard;
110 hasC,hasW : Boolean from Standard;
111
112end AttributeFilter;