0023510: Integration of test grid "vis" into the new testing system
[occt.git] / src / AIS2D / AIS2D_LocalContext.cdl
CommitLineData
b311480e 1-- Created by: Tanya COOL
2-- Copyright (c) 2000-2012 OPEN CASCADE SAS
3--
4-- The content of this file is subject to the Open CASCADE Technology Public
5-- License Version 6.5 (the "License"). You may not use the content of this file
6-- except in compliance with the License. Please obtain a copy of the License
7-- at http://www.opencascade.org and read it completely before using this file.
8--
9-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11--
12-- The Original Code and all software distributed under the License is
13-- distributed on an "AS IS" basis, without warranty of any kind, and the
14-- Initial Developer hereby disclaims all such warranties, including without
15-- limitation, any warranties of merchantability, fitness for a particular
16-- purpose or non-infringement. Please see the License for the specific terms
17-- and conditions governing the rights and limitations under the License.
18
7fd59977 19
20private class LocalContext from AIS2D inherits TShared from MMgt
21
22 ---Purpose: defines a specific context for selection: One can
23 -- loads InteractiveObjects with a mode to be
24 -- activated associate InteractiveObjects with a
25 -- set of temporary selectable Objects
26 --
27
28uses
29
30 ListOfInteger from TColStd,
31 SequenceOfInteger from TColStd,
32 MapOfTransient from TColStd,
33 NameOfColor from Quantity,
34 PlaneAngle from Quantity,
35 Length from Quantity,
36 GridType from Aspect,
37 GridDrawMode from Aspect,
38 View from V2d,
39 Primitive from Graphic2d,
40 InteractiveObject from AIS2D,
41 InteractiveContext from AIS2D,
42 LocalStatus from AIS2D,
43 StatusOfPick from AIS2D,
44 StatusOfDetection from AIS2D,
45 PToListOfInt from AIS2D,
46 DataMapOfLocStat from AIS2D,
47 ClearMode from AIS2D
48
49is
50
51 Create returns mutable LocalContext from AIS2D;
52 ---Purpose: Constructor By Default, the displayed objects are
53 -- automatically loaded.
54
55 Create ( aCtx : InteractiveContext from AIS2D;
56 anIndex : Integer from Standard;
57 LoadDisplayed : Boolean from Standard = Standard_True;
58 AcceptStdModes : Boolean from Standard = Standard_True;
59 AcceptErase : Boolean from Standard = Standard_False )
60 returns mutable LocalContext from AIS2D;
61 ---Purpose: Constructor
62
63 -- *************************************************************
64 -- Editing general Display Services
65 -- *************************************************************
66
67 Display( me : mutable;
68 anIObj : InteractiveObject from AIS2D;
69 DisplayMode : Integer from Standard = 0;
70 AllowDecomp : Boolean from Standard = Standard_True;
71 ActivationMode : Integer from Standard = 0 )
72 returns Boolean from Standard;
73 ---Level: Internal
74 ---Purpose:
75
76 Load( me : mutable;
77 anIObj : InteractiveObject from AIS2D;
78 AllowDecomp : Boolean from Standard = Standard_True;
79 ActivationMode : Integer from Standard = 0)
80 returns Boolean from Standard;
81 ---Level: Internal
82 ---Purpose:
83
84 Erase( me : mutable;
85 anIObj : InteractiveObject from AIS2D )
86 returns Boolean from Standard;
87 ---Level: Internal
88 ---Purpose:
89
90 Remove( me : mutable;
91 aSelObj : InteractiveObject from AIS2D )
92 returns Boolean from Standard;
93 ---Level: Internal
94 ---Purpose:
95
96 LoadContextObjects( me: mutable );
97 UnloadContextObjects( me: mutable );
98
99 Terminate( me: mutable );
100 ---Level: Internal
101 ---Purpose:
102
103 Clear( me: mutable; aType: ClearMode from AIS2D = AIS2D_CM_All );
104 ---Purpose: according to <aType>, clears the different parts of
105 -- the selector (filters, modeof activation, objects...)
106
107 HighlightPicked( me: mutable; UpdateVwr: Boolean from Standard = Standard_True ) ;
108 UnhighlightPicked( me: mutable; UpdateVwr: Boolean from Standard = Standard_True ) ;
109
110 UpdateSelected( me : mutable;
111 UpdateVwr : Boolean from Standard = Standard_True );
112 SetSelected( me : mutable;
113 anIObj : InteractiveObject from AIS2D;
114 UpdateVwr : Boolean from Standard=Standard_True );
115 ---Purpose: useful to update selection with objects coming from
116 -- Collector or stack
117
118 AddOrRemoveSelected( me : mutable;
119 anIObj : InteractiveObject from AIS2D;
120 UpdateVwr : Boolean from Standard = Standard_True );
121 ---Purpose: useful to update selection with objects coming from
122 -- Collector or stack
123
124 --***************************************************************************
125 -- Information about Detection
126 --***************************************************************************
127
128 IsSelected( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard;
129 SelectedIO( me ) returns InteractiveObject from AIS2D;
130
131
132 -- *******************************************************************************
133 -- Management Of Temporary Attributes
134 -- *******************************************************************************
135
136 SetDisplayPriority( me : mutable;
137 anIObj : InteractiveObject from AIS2D;
138 Prior : Integer from Standard);
139
140 DisplayedObjects( me; theMapToFill: in out MapOfTransient from TColStd )
141 returns Integer from Standard;
142
143 IsDisplayed( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard;
144 IsDisplayed( me; anIObj: InteractiveObject from AIS2D;
145 aMode: Integer from Standard)
146 returns Boolean from Standard;
147
148 Unhighlight( me:mutable; anIObj: InteractiveObject from AIS2D);
149 IsHighlight( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard;
150 IsHighlight( me;
151 anIObj : InteractiveObject from AIS2D;
152 WithColor : out Boolean from Standard;
153 HiCol : out NameOfColor from Quantity)
154 returns Boolean from Standard;
155
156
157 IsIn( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard;
158
159 SubIntensityOn( me: mutable; anIObj: InteractiveObject from AIS2D );
160 SubIntensityOff( me: mutable; anIObj: InteractiveObject from AIS2D );
161
162 --****************************************************************
163 -- Graphic Detection and Selection
164 --****************************************************************
165 UnhighLastDetect( me: mutable; aView: View from V2d) returns Boolean from Standard;
166 MoveTo( me: mutable; Xpix, Ypix: Integer from Standard; aView: View from V2d)
167 returns StatusOfDetection from AIS2D;
168 Select( me: mutable; UpdateVwr: Boolean from Standard = Standard_True )
169 returns StatusOfPick from AIS2D;
170
171 ShiftSelect( me: mutable; UpdateVwr: Boolean from Standard = Standard_True)
172 returns StatusOfPick from AIS2D;
173
174 --**********************************************************************************
175
176 --**********************************************************************************
177
178 ClearSelected( me: mutable; UpdateVwr: Boolean from Standard=Standard_True );
179 ClearObjects( me:mutable ) is static private;
180 ClearDetected( me:mutable ) is static private;
181
182 IsValidForSelection( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard is static private;
183
184 DrawObject( me: mutable; anObj: InteractiveObject from AIS2D; aDispMode: Integer from Standard )
185 is private;
186
187 DetectedIndex(me:mutable) returns Integer from Standard is static private;
188 Status( me; anObject: InteractiveObject from AIS2D )
189 returns any LocalStatus from AIS2D is private;
190 ---C++: return const&
191
192fields
193
194 myICTX : InteractiveContext from AIS2D;
195 myActiveObjects : DataMapOfLocStat from AIS2D;
196
197 myLastPicked : InteractiveObject from AIS2D;
198 myLastinMain : InteractiveObject from AIS2D;
199 myLastSelPrim : Primitive from Graphic2d;
200 myLastPickPrim : Primitive from Graphic2d;
201 myLastPickElInd : Integer from Standard;
202 myLastSelElInd : Integer from Standard;
203
204 myLoadDisplayed : Boolean from Standard;
205 myAcceptStdMode : Boolean from Standard;
206 myAcceptErase : Boolean from Standard;
207
208 myListOfStdMode : ListOfInteger from TColStd;
209
210 myAutoHighlight : Boolean from Standard;
211 myLastIndex : Integer from Standard;
212 myLastGood : Integer from Standard;
213
214 myDetectedSeq : SequenceOfInteger from TColStd;
215 myCurDetected : Integer from Standard;
216 myResetDetect : Boolean from Standard;
217
218friends
219
220 KeepTemporary from InteractiveContext from AIS2D(me:mutable; anIObj:InteractiveObject from AIS2D; WhichMode: Integer from Standard = -1)
221
222end LocalContext;
223
224
225
226
227