0024166: Unable to create file with "Save" menu of voxeldemo Qt sample
[occt.git] / src / AIS / AIS_SignatureFilter.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
23class SignatureFilter from AIS inherits TypeFilter from AIS
24
25 ---Purpose: Selects Interactive Objects through their signatures
26 -- and types. The signature provides an
27 -- additional characterization of an object's type, and
28 -- takes the form of an index. The filter questions each
29 -- Interactive Object in local context to determine
30 -- whether it has an non-null owner, and if so, whether
31 -- it has the desired signature. If the object returns true
32 -- in each case, it is kept. If not, it is rejected.
33 -- By default, the interactive object has a None type
34 -- and a signature of 0. If you want to give a particular
35 -- type and signature to your Interactive Object, you
36 -- must redefine two virtual methods: Type and Signature.
37 -- This filter is only used in an open local contexts.
38 -- In the Collector viewer, you can only locate
39 -- Interactive Objects which answer positively to the
40 -- positioned filters when a local context is open.
41 -- Warning
42 -- Some signatures have already been used by standard
43 -- objects delivered in AIS. These include:
44 -- - signature 0 - Shape
45 -- - signature 1 - Point
46 -- - signature 2 - Axis
47 -- - signature 3 - Trihedron
48 -- - signature 4 - PlaneTrihedron
49 -- - signature 5 - Line
50 -- - signature 6 - Circle
51 -- - signature 7 - Plane
52
53
54
55uses
56
57 KindOfInteractive from AIS,
58 EntityOwner from SelectMgr
59
60is
61
62 Create(aGivenKind : KindOfInteractive from AIS;
63 aGivenSignature : Integer from Standard)
64 returns mutable SignatureFilter from AIS;
65 --- Purpose: Initializes the signature filter, adding the signature
66 -- specification, aGivenSignature, to that for type,
67 -- aGivenKind, in AIS_TypeFilter.
68
69 IsOk (me;anobj : EntityOwner from SelectMgr)
70 returns Boolean from Standard is redefined static;
71 ---Purpose: Returns False if the transient is not an AIS_InteractiveObject.
72 -- Returns False if the signature of InteractiveObject
73 -- is not the same as the stored one in the filter...
74
75
76fields
77 mySig : Integer from Standard;
78end SignatureFilter;