Integration of OCCT 6.5.0 from SVN
[occt.git] / src / AIS2D / AIS2D_LocalContext.cdl
CommitLineData
7fd59977 1-- File : AIS2D_LocalContext.cdl
2-- Created : February 2000
3-- Author : Tanya COOL
4---Copyright: Matra Datavision 2000
5
6private class LocalContext from AIS2D inherits TShared from MMgt
7
8 ---Purpose: defines a specific context for selection: One can
9 -- loads InteractiveObjects with a mode to be
10 -- activated associate InteractiveObjects with a
11 -- set of temporary selectable Objects
12 --
13
14uses
15
16 ListOfInteger from TColStd,
17 SequenceOfInteger from TColStd,
18 MapOfTransient from TColStd,
19 NameOfColor from Quantity,
20 PlaneAngle from Quantity,
21 Length from Quantity,
22 GridType from Aspect,
23 GridDrawMode from Aspect,
24 View from V2d,
25 Primitive from Graphic2d,
26 InteractiveObject from AIS2D,
27 InteractiveContext from AIS2D,
28 LocalStatus from AIS2D,
29 StatusOfPick from AIS2D,
30 StatusOfDetection from AIS2D,
31 PToListOfInt from AIS2D,
32 DataMapOfLocStat from AIS2D,
33 ClearMode from AIS2D
34
35is
36
37 Create returns mutable LocalContext from AIS2D;
38 ---Purpose: Constructor By Default, the displayed objects are
39 -- automatically loaded.
40
41 Create ( aCtx : InteractiveContext from AIS2D;
42 anIndex : Integer from Standard;
43 LoadDisplayed : Boolean from Standard = Standard_True;
44 AcceptStdModes : Boolean from Standard = Standard_True;
45 AcceptErase : Boolean from Standard = Standard_False )
46 returns mutable LocalContext from AIS2D;
47 ---Purpose: Constructor
48
49 -- *************************************************************
50 -- Editing general Display Services
51 -- *************************************************************
52
53 Display( me : mutable;
54 anIObj : InteractiveObject from AIS2D;
55 DisplayMode : Integer from Standard = 0;
56 AllowDecomp : Boolean from Standard = Standard_True;
57 ActivationMode : Integer from Standard = 0 )
58 returns Boolean from Standard;
59 ---Level: Internal
60 ---Purpose:
61
62 Load( me : mutable;
63 anIObj : InteractiveObject from AIS2D;
64 AllowDecomp : Boolean from Standard = Standard_True;
65 ActivationMode : Integer from Standard = 0)
66 returns Boolean from Standard;
67 ---Level: Internal
68 ---Purpose:
69
70 Erase( me : mutable;
71 anIObj : InteractiveObject from AIS2D )
72 returns Boolean from Standard;
73 ---Level: Internal
74 ---Purpose:
75
76 Remove( me : mutable;
77 aSelObj : InteractiveObject from AIS2D )
78 returns Boolean from Standard;
79 ---Level: Internal
80 ---Purpose:
81
82 LoadContextObjects( me: mutable );
83 UnloadContextObjects( me: mutable );
84
85 Terminate( me: mutable );
86 ---Level: Internal
87 ---Purpose:
88
89 Clear( me: mutable; aType: ClearMode from AIS2D = AIS2D_CM_All );
90 ---Purpose: according to <aType>, clears the different parts of
91 -- the selector (filters, modeof activation, objects...)
92
93 HighlightPicked( me: mutable; UpdateVwr: Boolean from Standard = Standard_True ) ;
94 UnhighlightPicked( me: mutable; UpdateVwr: Boolean from Standard = Standard_True ) ;
95
96 UpdateSelected( me : mutable;
97 UpdateVwr : Boolean from Standard = Standard_True );
98 SetSelected( me : mutable;
99 anIObj : InteractiveObject from AIS2D;
100 UpdateVwr : Boolean from Standard=Standard_True );
101 ---Purpose: useful to update selection with objects coming from
102 -- Collector or stack
103
104 AddOrRemoveSelected( me : mutable;
105 anIObj : InteractiveObject from AIS2D;
106 UpdateVwr : Boolean from Standard = Standard_True );
107 ---Purpose: useful to update selection with objects coming from
108 -- Collector or stack
109
110 --***************************************************************************
111 -- Information about Detection
112 --***************************************************************************
113
114 IsSelected( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard;
115 SelectedIO( me ) returns InteractiveObject from AIS2D;
116
117
118 -- *******************************************************************************
119 -- Management Of Temporary Attributes
120 -- *******************************************************************************
121
122 SetDisplayPriority( me : mutable;
123 anIObj : InteractiveObject from AIS2D;
124 Prior : Integer from Standard);
125
126 DisplayedObjects( me; theMapToFill: in out MapOfTransient from TColStd )
127 returns Integer from Standard;
128
129 IsDisplayed( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard;
130 IsDisplayed( me; anIObj: InteractiveObject from AIS2D;
131 aMode: Integer from Standard)
132 returns Boolean from Standard;
133
134 Unhighlight( me:mutable; anIObj: InteractiveObject from AIS2D);
135 IsHighlight( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard;
136 IsHighlight( me;
137 anIObj : InteractiveObject from AIS2D;
138 WithColor : out Boolean from Standard;
139 HiCol : out NameOfColor from Quantity)
140 returns Boolean from Standard;
141
142
143 IsIn( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard;
144
145 SubIntensityOn( me: mutable; anIObj: InteractiveObject from AIS2D );
146 SubIntensityOff( me: mutable; anIObj: InteractiveObject from AIS2D );
147
148 --****************************************************************
149 -- Graphic Detection and Selection
150 --****************************************************************
151 UnhighLastDetect( me: mutable; aView: View from V2d) returns Boolean from Standard;
152 MoveTo( me: mutable; Xpix, Ypix: Integer from Standard; aView: View from V2d)
153 returns StatusOfDetection from AIS2D;
154 Select( me: mutable; UpdateVwr: Boolean from Standard = Standard_True )
155 returns StatusOfPick from AIS2D;
156
157 ShiftSelect( me: mutable; UpdateVwr: Boolean from Standard = Standard_True)
158 returns StatusOfPick from AIS2D;
159
160 --**********************************************************************************
161
162 --**********************************************************************************
163
164 ClearSelected( me: mutable; UpdateVwr: Boolean from Standard=Standard_True );
165 ClearObjects( me:mutable ) is static private;
166 ClearDetected( me:mutable ) is static private;
167
168 IsValidForSelection( me; anIObj: InteractiveObject from AIS2D) returns Boolean from Standard is static private;
169
170 DrawObject( me: mutable; anObj: InteractiveObject from AIS2D; aDispMode: Integer from Standard )
171 is private;
172
173 DetectedIndex(me:mutable) returns Integer from Standard is static private;
174 Status( me; anObject: InteractiveObject from AIS2D )
175 returns any LocalStatus from AIS2D is private;
176 ---C++: return const&
177
178fields
179
180 myICTX : InteractiveContext from AIS2D;
181 myActiveObjects : DataMapOfLocStat from AIS2D;
182
183 myLastPicked : InteractiveObject from AIS2D;
184 myLastinMain : InteractiveObject from AIS2D;
185 myLastSelPrim : Primitive from Graphic2d;
186 myLastPickPrim : Primitive from Graphic2d;
187 myLastPickElInd : Integer from Standard;
188 myLastSelElInd : Integer from Standard;
189
190 myLoadDisplayed : Boolean from Standard;
191 myAcceptStdMode : Boolean from Standard;
192 myAcceptErase : Boolean from Standard;
193
194 myListOfStdMode : ListOfInteger from TColStd;
195
196 myAutoHighlight : Boolean from Standard;
197 myLastIndex : Integer from Standard;
198 myLastGood : Integer from Standard;
199
200 myDetectedSeq : SequenceOfInteger from TColStd;
201 myCurDetected : Integer from Standard;
202 myResetDetect : Boolean from Standard;
203
204friends
205
206 KeepTemporary from InteractiveContext from AIS2D(me:mutable; anIObj:InteractiveObject from AIS2D; WhichMode: Integer from Standard = -1)
207
208end LocalContext;
209
210
211
212
213