0023012: Detection gives incorrect results
[occt.git] / src / AIS / AIS_InteractiveContext.cdl
1 -- Created on: 1996-12-18
2 -- Created by: Robert COUBLANC
3 -- Copyright (c) 1996-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
21 --Modified by   
22 --   rob : Dec 17 1997 -> Update Method Added + Use in Deviation Angle...
23 --   rob : Feb 05 1998 -> UpdateOnlySelection, UpdateOnlyPrs
24 --         Apr 02 1998 -> Select Methods has been added a boolean updateviewer.
25 --   GG  :  GER61351 17/11/1999 Change SetColor() with a compatible i
26 --          Quantity_Color instead the restricted NameOfColor.
27 --          Add SetCurrentFacingModel() methods
28 --   EUG :  G003 05/11/1999 Degeneration mode support
29 --              Add SetDegenerateModel() methods
30 --   GG  : IMP140200 Add SetSelectedAspect() method
31 --   GG  : 25/05/00 BUC60688 Add SetSensitivity() methods 
32 --   VSV : 22/05/01 Add Selection by polygon
33 --   SAV :  Add DisplayFromCollector() method
34 --   GG  : IMP150501 CADPAK_V2 Add Drag() method
35 --   ZSV : IMP160701 Add InitDetected(),MoreDetected(),NextDetected(),
36 --                       DetectedCurrentShape(),DetectedCurrentObject()
37 --                       methods
38 --   GG  : IMP051001 Add SetZDetection() and ZDetection() methods
39 --   SAV : OCC172 : Delete() redefined to remove selection objects from
40 --                  the static map.
41 --   SAN : OCC4895 22/03/04 High-level interface for controlling polygon offsets
42 --   SLN : SetToHilightSelected method added
43
44
45
46 class InteractiveContext from AIS inherits TShared from MMgt
47
48         ---Purpose: The Interactive Context allows you to manage
49         -- graphic behavior and selection of Interactive Objects
50         -- in one or more viewers. Class methods make this
51         -- highly transparent.
52         -- It is essential to remember that an Interactive Object
53         -- which is already known by the Interactive Context
54         -- must be modified using Context methods. You can
55         -- only directly call the methods available for an
56         -- Interactive Object if it has not been loaded into an
57         -- Interactive Context.
58         -- You must distinguish two states in the Interactive Context:
59         -- -   No Open Local Context, also known as the Neutral Point.
60         -- -   One or several open local contexts, each
61         --   representing a temporary state of selection and presentation.
62         --   Some methods can only be used in open Local
63         -- Context; others in closed Local Context; others do
64         -- not have the same behavior in one state as in the other.
65         -- The possiblities of use for local contexts are
66         -- numerous depending on the type of operation that
67         -- you want to perform, for example:
68         -- -   working on all visualized interactive objects,
69         -- -   working on only a few objects,
70         -- -   working on a single object.
71         --   1. When you want ot work on one type of entity, you
72         -- should open a local context with the option
73         -- UseDisplayedObjects set to false. DisplayedObjects
74         -- allows you to recover the visualized Interactive
75         -- Objects which have a given Type and
76         -- Signature   from Neutral Point.
77         -- 2. You must keep in mind the fact that when you open
78         -- a Local Context with default options:
79         -- -   The Interactive Objects visualized at Neutral Point
80         --   are activated with their default selection mode. You
81         --   must deactivate those which you do not want ot use.
82         -- -   The Shape type Interactive Objects are
83         --   automatically decomposed into sub-shapes when
84         --   standard activation modes are launched.
85         -- -   The "temporary" Interactive Objects present in the
86         --   Local Contexts are not automatically taken into
87         --   account. You have to load them manually if you
88         --  want to use them.
89         -- -   The stages could be the following:
90         --   -   Open a Local Context with the right options;
91         --   -   Load/Visualize the required complementary
92         --    objects with the desired activation modes.
93         --   -   Activate Standard modes if necessary
94         -- - Create its filters and add them to the Local Context
95         --   -   Detect/Select/recover the desired entities
96         --   -   Close the Local Context with the adequate index.
97         -- -   It is useful to create an interactive editor, to which
98         --   you pass the Interactive Context. This will take care
99         --   of setting up the different contexts of
100         --   selection/presentation according to the operation
101         --   which you want to perform.
102
103 uses
104     Address               from Standard,
105     Viewer                from V3d,
106     View                  from V3d,
107     NameOfColor           from Quantity,
108     Color                 from Quantity,
109     Ratio                 from Quantity,
110     Drawer                from Prs3d,
111     ExtendedString        from TCollection,
112     AsciiString           from TCollection,
113     Shape                 from TopoDS,
114     SelectionManager      from SelectMgr,
115     PresentationManager3d from PrsMgr,
116     ViewerSelector3d      from StdSelect,
117     SensitivityMode       from StdSelect,
118     MapOfInteractive      from AIS,
119     InteractiveObject     from AIS,
120     DisplayMode           from AIS,
121     Drawer                from AIS,
122     NameOfMaterial        from Graphic3d,
123     --NameOfPhysicalMaterial  from Graphic3d,
124     Filter                from SelectMgr,
125     ListOfFilter          from SelectMgr,
126     OrFilter              from SelectMgr, 
127     IndexedMapOfOwner     from SelectMgr,
128     ShapeEnum             from TopAbs,
129     ListOfInteractive     from AIS,
130     SequenceOfInteractive from AIS,
131     ListOfInteger         from TColStd,
132     DataMapOfIOStatus     from AIS,
133     LocalContext          from AIS,
134     DisplayStatus         from AIS,
135     DataMapOfILC          from AIS, 
136     ClearMode             from AIS,
137     KindOfInteractive     from AIS,
138     TypeOfIso             from AIS,
139     StatusOfDetection     from AIS,
140     StatusOfPick          from AIS,
141     LineAspect            from Prs3d,
142     BasicAspect                   from Prs3d,
143     Location              from TopLoc,
144     EntityOwner           from SelectMgr,
145     TypeOfFacingModel     from Aspect,
146     TypeOfDegenerateModel from Aspect,
147     Array1OfPnt2d         from TColgp,
148     Transformation        from Geom
149
150 is
151
152     Create(MainViewer:Viewer from V3d) 
153     returns mutable InteractiveContext from  AIS;
154         ---Purpose:
155         -- Constructs the interactive context object defined by
156         -- the principal viewer MainViewer.    
157     
158     Create(MainViewer,Collector: Viewer from V3d)
159     returns mutable InteractiveContext from  AIS;
160         ---Purpose:
161         -- Constructs the interactive context object defined by
162         -- the principal viewer MainViewer and the collector
163         -- (or trash) viewer.
164            
165
166     Delete(me) is redefined;
167
168     IsCollectorClosed(me) returns Boolean from Standard;
169     ---C++: inline
170     CloseCollector(me:mutable);
171     ---C++: inline
172     OpenCollector(me:mutable);
173
174
175
176                     ---Category: General DISPLAY SERVICES
177     SetAutoActivateSelection( me: mutable; Auto : Boolean from Standard ); 
178     GetAutoActivateSelection( me ) returns Boolean from Standard;
179
180
181     Display(me                 : mutable;
182             anIobj             : InteractiveObject from AIS;
183             updateviewer       : Boolean from Standard = Standard_True); 
184             ---Purpose: Controls the choice between the using the display
185             -- and selection modes of open local context which you
186             -- have defined and activating those available by default.
187     -- If a local context is open and if updateviewer equals
188     -- Standard_False, the Interactive Object anIobj is
189     -- displayed in the default active mode. This will be the
190         -- object's default display mode, if there is one.
191         -- Otherwise, it will be the context mode. The Interactive
192         -- Object's default selection mode is activated. In
193         -- general, this is 0.
194         -- This syntax has the same behavior as local context,
195         -- open or closed. If you want to view the object in open
196         -- local context without selection, use the syntax below,
197         -- setting aSelectionMode to -1.
198
199     Display(me                 : mutable;
200             anIobj             : InteractiveObject from AIS;
201             amode              : Integer from Standard ;
202             aSelectionMode     : Integer from Standard ;
203             updateviewer       : Boolean from Standard = Standard_True;
204             allowdecomposition : Boolean from Standard = Standard_True);
205         ---Purpose: Controls the choice between the using the display
206         -- and selection modes of open local context which you
207         -- have defined and activating those available by default.
208         -- If no Local Context is opened. and the Interactive
209         -- Object aniobj has no display mode of its own, the
210         -- default display mode, 0, is used. Likewise, if aniobj
211         -- has no selection mode of its own, the default one, 0, is used.
212         -- If a local context is open and if updateviewer equals
213         -- Standard_False, the presentation of the Interactive
214         -- Object activates the selection mode; the object is
215         -- displayed but no viewer will be updated.
216         -- If aSelectionMode equals -1, anIobj will not be
217         -- activated: it will be displayed but will not be selectable.
218         -- Use this if you want to view the object in open local
219         -- context without selection. Note: This option is only
220         -- available in Local Context.
221         -- If allowDecomposition equals true, anIObj can have
222         -- subshapes detected by selection mechanisms. anIObj
223         -- must be able to give a shape selection modes which
224         -- fit the AIS_Shape selection modes:
225         -- -   vertices: 1
226         -- -   edges: 2
227         -- -   wires: 3.
228         
229     Load(me:mutable;
230          aniobj : InteractiveObject from AIS;
231          SelectionMode : Integer from Standard = -1;
232          AllowDecomp   : Boolean from Standard = Standard_False);
233          ---Purpose: Allows you to load the Interactive Object aniobj
234          -- with a given selection mode SelectionMode, and/or
235 -- with the desired decomposition option, whether the
236 -- object is visualized or not. If AllowDecomp =
237 -- Standard_True and, if the interactive object is of
238 -- the "Shape" type, these "standard" selection
239 -- modes will be automatically activated as a function
240 -- of the modes present in the Local Context.
241 -- The loaded objects will be selectable but
242 -- displayable in highlighting only when detected by the Selector.
243 -- This method is available only when Local Contexts are open.
244
245
246     Erase(me             : mutable; 
247           aniobj         : InteractiveObject from AIS;
248           updateviewer   : Boolean from Standard = Standard_True;
249           PutInCollector : Boolean from Standard = Standard_False);
250 ---Purpose: To erase presentations in current local context, or
251 -- failing that, in other local contexts which allow erasing.
252 --
253 -- If putinCollector is True, the object is erased with graphical status Erased,
254 -- and put into the Collector. These objects can be retrieved
255 -- from Interactive Context by ObjectsInCollector method.
256 -- If putinCollector is False, the objects erased with graphical status FullErased,
257 -- and not put into the Collector. These objects can be retrieved
258 -- from Interactive Context by ErasedObjects method.
259 --
260 -- Note: objects that are put into the Collector recomute their presentation
261 -- for Collector Presentation Manager.
262 --
263 -- If a local context is open and if updateviewer is
264 -- False, the presentation of the Interactive
265 -- Object activates the selection mode; the object is
266 -- displayed but no viewer will be updated.
267
268     EraseMode(me             : mutable;
269               aniobj         : InteractiveObject from AIS;
270               aMode          : Integer from Standard;
271               updateviewer   : Boolean from Standard = Standard_True); 
272     ---Purpose: Updates viewer contents and returns the display
273 -- mode of each aniobj object. Use only if more than
274 -- one display mode is active in the main viewer.
275 -- This method works only on presentation modes other
276 -- than the default mode. Nothing is done if aMode is
277 -- the default presentation mode.
278 -- If a local context is open and if updateviewer equals
279 -- Standard_False, the presentation of the Interactive
280 -- Object activates the selection mode; the object is
281 -- displayed but no viewer will be updated.
282
283
284
285     EraseAll(me:mutable;
286              PutInCollector : Boolean from Standard = Standard_False;
287              updateviewer   : Boolean from Standard = Standard_True);
288     ---Purpose: Every erased object goes into the Collector viewer,
289     --          depending on PutInCollector value.
290
291     DisplayAll(me                : mutable;
292                OnlyFromCollector : Boolean from Standard = Standard_False;
293                updateviewer      : Boolean from Standard = Standard_True);
294     ---Purpose: Displays all erased objects or display all objects from collector
295
296     DisplayFromCollector(me      : mutable;
297                           anIObj          :  InteractiveObject from AIS;
298                           updateviewer    : Boolean from Standard = Standard_True);
299     ---Purpose: display anIObj from the collector.
300
301     EraseSelected(me:mutable;
302                   PutInCollector:Boolean from Standard=Standard_False; 
303                   updateviewer:Boolean from Standard = Standard_True);
304         ---Purpose:
305 -- Erases selected objects if there is no open active local context.
306 -- If there is no local context activated and if
307 -- updateviewer equals Standard_False, the
308 -- presentation of the Interactive Object activates the
309 -- selection mode; the object is displayed but no viewer
310 -- will be updated.
311 -- If a local context is open, this method is neutral.
312     
313     DisplaySelected(me:mutable;updateviewer:Boolean from Standard = Standard_True);
314     ---Purpose: Displays selected objects if a local context is open.
315 -- Displays current objects if there is no active local context.
316 -- Objects selected when there is no open local context
317 -- are called current objects; those selected in open
318 -- local context, selected objects.
319 -- If a local context is open and if updateviewer equals
320 -- Standard_False, the presentation   of the Interactive
321 -- Object activates   the   selection   mode; the   object is
322 -- displayed but no viewer will be updated.
323
324
325     KeepTemporary(me          :  mutable; 
326                   anIObj      :  InteractiveObject from AIS; 
327                   InWhichLocal:  Integer  from  Standard  =  -1)
328     returns  Boolean  from  Standard;
329 ---Purpose: Changes the status of a temporary object. It will be
330 -- kept at the neutral point, i.e. put in the list of
331 -- displayed   objects along withwith   its temporary
332 -- attributes. These include display mode and
333 -- selection   mode, for example.
334 -- Returns true if done.
335 -- inWhichLocal gives the local context in which anIObj
336 -- is displayed. By default, the index -1 refers to the last
337 -- Local Context opened.
338  
339     Clear(me : mutable;
340           aniobj         : InteractiveObject from AIS;
341           updateviewer   : Boolean from Standard = Standard_True);
342 ---Purpose: Removes the interactive object aniobj from all viewers.
343 -- If a local context is open and if updateviewer equals
344 -- Standard_False, the presentation of the Interactive
345 -- Object activates the selection mode; the object is
346 -- displayed but no viewer will be updated.
347
348     ClearPrs( me           :mutable;
349               aniobj       : InteractiveObject from AIS;
350               aMode        : Integer from Standard = 0;
351               updateviewer : Boolean from Standard = Standard_True);
352     ---Purpose: Empties the graphic presentation of the mode
353 -- indexed by aMode.
354 -- If a local context is open and if updateviewer equals
355 -- Standard_False, the presentation of the Interactive
356 -- Object activates the selection mode; the object is
357 -- displayed but no viewer will be updated.
358 -- Warning
359 -- Removes anIobj. anIobj is still active if it was
360 -- previously activated.
361
362     Remove(me:mutable;
363           aniobj         : InteractiveObject from AIS;
364           updateviewer   : Boolean from Standard = Standard_True);
365     ---Purpose: Removes aniobj from every viewer. aniobj is no
366 -- longer referenced in the Context.
367 -- If a local context is open and if updateviewer equals
368 -- Standard_False, the presentation   of the Interactive
369 -- Object activates the selection mode; the object is
370 -- displayed but no viewer will be updated.
371         
372     RemoveAll(me:mutable;
373           updateviewer   : Boolean from Standard = Standard_True);
374     ---Purpose: Removes all the objects from all opened Local Contexts
375     --          and from the Neutral Point
376
377
378     Hilight(me:mutable;
379             aniobj : InteractiveObject from AIS;
380             updateviewer: Boolean from Standard = Standard_True);
381         ---Purpose:
382 -- Updates the display in the viewer to take dynamic
383 -- detection into account. On dynamic detection by the
384 -- mouse cursor, sensitive primitives are highlighted.
385 -- The highlight color of entities detected by mouse
386 -- movement is white by default.
387 -- If a local context is open and if updateviewer equals
388 -- Standard_False, the presentation of the Interactive
389 -- Object activates the selection mode; the object is
390 -- displayed but no viewer will be updated.
391         
392     HilightWithColor(me:mutable;
393             aniobj :InteractiveObject from AIS;
394             aCol   : NameOfColor from Quantity;
395             updateviewer: Boolean from Standard = Standard_True); 
396 ---Purpose:
397 -- Changes the color of all the lines of the object in view,
398 -- aniobj. It paints these lines the color passed as the
399 -- argument, aCol.
400 -- If a local context is open and if updateviewer equals
401 -- Standard_False, the presentation of the Interactive
402 -- Object activates the selection mode; the object is
403 -- displayed but no viewer will be updated.
404         
405     Unhilight(me:mutable;
406             aniobj : InteractiveObject from AIS;
407             updateviewer: Boolean from Standard = Standard_True);
408 ---Purpose:
409 -- Removes hilighting from the entity aniobj. Updates the viewer.
410 -- If a local context is open and if updateviewer equals
411 -- Standard_False, the presentation of the Interactive
412 -- Object activates the selection mode; the object is
413 -- displayed but no viewer will be updated.
414
415     SetDisplayPriority(me:mutable;
416                        anIobj: InteractiveObject from AIS;
417                        aPriority : Integer from Standard);
418     ---Purpose: Sets the display priority aPriority of the seen parts
419 -- presentation of the entity anIobj.
420
421     SetZLayer( me         : mutable;
422                theIObj    : InteractiveObject from AIS;
423                theLayerId : Integer from Standard );
424     ---Purpose: Set Z layer id for interactive object. The layer can be
425     -- specified for displayed object only. The Z layers can be used to display
426     -- temporarily presentations of some object in front of the other objects
427     -- in the scene. The ids for Z layers are generated by V3d_Viewer.
428     -- Note that Z layers differ from under-/overlayer in V3d_View:
429     -- under-/overlayer are intended for specific 2D drawings that appear
430     -- behind/in front of all 3D presentations, while SetZLayer() method
431     -- applies to regular 3D presentations and does not imply any specific
432     -- drawing methods.
433
434     GetZLayer( me;
435                theIObj : InteractiveObject from AIS )
436       returns Integer from Standard;
437     ---Purpose: Get Z layer id set for displayed interactive object.
438     -- If the object doesn't exists in context or has no computed presentations,
439     -- the method returns -1.
440
441     Redisplay(me     : mutable;
442               aniobj : InteractiveObject from AIS;
443               updateviewer : Boolean from Standard = Standard_True;
444               allmodes : Boolean from Standard = Standard_False);
445     ---Purpose: Recomputes the seen parts presentation of the entity
446 -- aniobj. If allmodes equals true, all presentations are
447 -- present in the object even if unseen.
448 -- If a local context is open and if updateviewer equals
449 -- Standard_False, the presentation of the Interactive
450 -- Object activates the selection mode; the object is
451 -- displayed but no viewer will be updated.
452
453     Redisplay(me           : mutable;
454               aTypeOfObject: KindOfInteractive from AIS;
455               Signature    : Integer from Standard =-1;
456               updateviewer : Boolean from Standard = Standard_True);
457     ---Purpose: Recomputes the Prs/Selection of displayed objects of
458     --          a given type and a given signature.
459     --          if signature = -1  doesnt take signature criterion.
460
461
462     RecomputePrsOnly(me:mutable;
463                      anIobj       : InteractiveObject from AIS;
464                      updateviewer : Boolean from Standard = Standard_True;
465                      allmodes     : Boolean from Standard = Standard_False);
466     ---Purpose: Recomputes the displayed presentations, flags the others
467     --          Doesn't update presentations
468     
469     
470
471     RecomputeSelectionOnly(me:mutable;
472                            anIObj : InteractiveObject from AIS);
473     ---Purpose: Recomputes the active selections, flags the others
474     --          Doesn't update presentations
475
476     Update(me       : mutable;
477            anIobj   : InteractiveObject from AIS;
478            updateviewer : Boolean from Standard = Standard_True);
479     ---Purpose: Checks which presentations are flagged "to be recomputed"
480     --          and recomputes them if they are displayed.
481     --          This method doesn't force any Computation.
482     --          Recomputes Flagged selections if they are activated.
483
484
485                         
486
487     SetDisplayMode(me     : mutable;
488                    aniobj : InteractiveObject from AIS;
489                    aMode  : Integer from Standard;
490                    updateviewer: Boolean from Standard = Standard_True);
491     
492 ---Purpose:
493 -- Sets the display mode of seen Interactive Objects.
494 -- aMode provides the display mode index of the entity aniobj.
495 -- If updateviewer equals Standard_True, the
496 -- predominant mode aMode will overule the context mode.
497 -- If a local context is open and if updateviewer equals
498 -- Standard_False, the presentation of the Interactive
499 -- Object returns to the default selection mode; the
500 -- object is displayed but no viewer will be updated.
501 -- Note that display mode 3 is only used if you have an
502 -- AIS_Textured Shape.    
503     
504     
505     UnsetDisplayMode(me     : mutable;
506                      aniobj : InteractiveObject from AIS;
507                      updateviewer: Boolean from Standard = Standard_True);
508 ---Purpose:
509 -- Unsets the display mode of seen Interactive Objects.
510 -- aMode provides the display mode index of the entity aniobj.
511 -- If updateviewer equals Standard_True, the
512 -- predominant mode aMode will overule the context mode.
513 -- If a local context is open and if updateviewer equals
514 -- Standard_False, the presentation of the Interactive
515 -- Object returns to the default selection mode; the
516 -- object is displayed but no viewer will be updated.                
517     SetSelectionMode(me:mutable;
518                      aniobj:InteractiveObject from AIS;
519                      aMode :Integer from Standard);
520 ---Purpose:
521 -- Sets the selection mode of Interactive Objects.
522 -- aMode provides the selection mode index of the entity aniobj.                     
523     UnsetSelectionMode(me     : mutable;
524                      aniobj : InteractiveObject from AIS);
525 ---Purpose:
526 -- Removes selection mode from Interactive Objects.
527 -- aMode provides the selection mode index of the entity aniobj.
528     
529     SetSensitivityMode(me    : mutable;
530                        aMode : SensitivityMode from StdSelect) is static;
531     ---Level: Public
532     ---Purpose: Sets the selection sensitivity mode. SM_WINDOW mode
533     -- uses the specified pixel tolerance to compute the sensitivity
534     -- value, SM_VIEW mode allows to define the sensitivity manually.
535
536     SensitivityMode(me) returns SensitivityMode from StdSelect;
537     ---Level: Public
538     ---Purpose: Returns the selection sensitivity mode.
539
540     SetSensitivity(me:mutable;
541                         aPrecision: Real from Standard);
542     ---Level: Public
543     ---Purpose: Sets the sensitivity aPrecision
544 -- according to the view size for the current context or local
545 -- context if any is activated. 
546 --   Sets the sensitivity aPrecision in pixels for the current context
547 -- or local context if any is activated. By default, this
548 -- sensitivity is equal to 4 pixels.
549 --   When a local context is open, the defined sensitivity applies to
550 -- this local context instead of the main context.
551
552     Sensitivity (me) returns Real from Standard;
553     ---Level: Public 
554     ---Purpose: Returns the selection sensitivity value.
555
556     SetPixelTolerance(me:mutable;
557                         aPrecision: Integer from Standard = 4);
558     ---Level: Public
559     ---Purpose: Define the current selection pixel sensitivity
560     --          for this context or local context if any one is activated.
561     --  Warning: When a local context is open the sensitivity is apply on it 
562     --          instead on the main context.
563
564     PixelTolerance(me) returns Integer from Standard;
565     ---Level: Public 
566     ---Purpose: Returns the pixel tolerance.
567
568                    ---Category: put locations on objects....
569                    --           
570
571     SetLocation(me:mutable;
572                 aniobj : InteractiveObject from AIS;
573                 aLocation : Location from TopLoc);
574 ---Purpose: Puts the location aLocation on the initial graphic
575 -- representation and the selection for the entity aniobj.
576 -- In other words, aniobj is visible and selectable at a
577 -- position other than initial position.
578 -- Graphic and selection primitives are not recomputed.
579 -- To clean the view correctly, you must reset the previous location.
580
581     ResetLocation(me     : mutable;
582                   aniobj : InteractiveObject from AIS);
583     ---Purpose: Puts the entity aniobj back into its initial position.
584
585     
586
587     HasLocation(me;
588                 aniobj : InteractiveObject from AIS)
589     returns Boolean from Standard;
590 ---Purpose:
591 -- Returns true if the entity aniobj has a location.
592         
593     Location(me;
594              aniobj : InteractiveObject from AIS)
595     returns Location from TopLoc;
596         ---Purpose:
597         -- Returns the location of the entity aniobj.
598         ---C++: return const&
599
600
601
602     SetCurrentFacingModel(me: mutable;
603              aniobj  : InteractiveObject from AIS;
604              aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE);
605     ---Purpose: change the current facing model apply on polygons for
606     -- SetColor(), SetTransparency(), SetMaterial() methods
607     -- default facing model is Aspect_TOFM_TWO_SIDE. This mean that attributes is
608     -- applying both on the front and back face.
609
610     SetColor(me      : mutable;
611              aniobj  : InteractiveObject from AIS;
612              aColor  : NameOfColor from Quantity;
613              updateviewer : Boolean from Standard = Standard_True);
614
615     SetColor(me      : mutable;
616              aniobj  : InteractiveObject from AIS;
617              aColor  : Color from Quantity;
618              updateviewer : Boolean from Standard = Standard_True);
619 ---Purpose:
620 -- Sets the color of the selected entity.
621 -- If a local context is open and if updateviewer equals
622 -- Standard_False, the presentation   of the Interactive
623 -- Object activates the selection mode; the object is
624 -- displayed but no viewer will be updated.
625         
626     UnsetColor(me     :mutable;
627               aniobj  : InteractiveObject from AIS;
628              updateviewer : Boolean from Standard = Standard_True);
629 --- Purpose: Removes the color selection for the selected entity.
630 -- If a local context is open and if updateviewer equals
631 -- Standard_False, the presentation of the Interactive
632 -- Object activates the selection mode; the object is
633 -- displayed but no viewer will be updated.          
634         
635     SetWidth(me:mutable; 
636              aniobj  : InteractiveObject from AIS;
637              aValue:Real from Standard;
638              updateviewer : Boolean from Standard = Standard_True) is virtual;
639 ---Purpose:
640 -- Sets the width of the entity aniobj.
641 -- If a local context is open and if updateviewer equals
642 -- Standard_False, the presentation of the Interactive
643 -- Object activates the selection mode; the object is
644 -- displayed but no viewer will be updated.
645     
646     UnsetWidth(me:mutable; 
647              aniobj  : InteractiveObject from AIS;
648              updateviewer : Boolean from Standard = Standard_True) is virtual;
649 ---Purpose:
650 -- Removes the width setting of the entity aniobj.
651 -- If a local context is open and if updateviewer equals
652 -- Standard_False, the presentation of the Interactive
653 -- Object activates the selection mode; the object is
654 -- displayed but no viewer will be updated.
655         
656     SetMaterial(me:mutable;
657                aniobj  : InteractiveObject from AIS;
658                 aName:NameOfMaterial from Graphic3d;
659                 --aName:NameOfPhysicalMaterial from Graphic3d;
660                 updateviewer : Boolean from Standard = Standard_True); 
661 ---Purpose:
662 -- Provides the type of material setting for the view of
663 -- the entity aniobj.
664 -- The range of settings includes: BRASS, BRONZE,
665 -- GOLD, PEWTER, SILVER, STONE.
666 -- If a local context is open and if updateviewer equals
667 -- Standard_False, the presentation of the Interactive
668 -- Object activates the selection mode; the object is
669 -- displayed but no viewer will be updated.
670         
671     UnsetMaterial(me    : mutable;
672                   anObj : InteractiveObject from AIS;
673                   updateviewer : Boolean from Standard = Standard_True);
674 ---Purpose:
675 -- Removes the type of material setting for viewing the
676 -- entity aniobj.
677 -- If a local context is open and if updateviewer equals
678 -- Standard_False, the presentation of the Interactive
679 -- Object activates the selection mode; the object is
680 -- displayed but no viewer will be updated.
681
682     SetTransparency(me:mutable;
683                     aniobj  : InteractiveObject from AIS;
684                     aValue : Real from Standard=0.6;
685                     updateviewer : Boolean from Standard = Standard_True);
686     ---Purpose: Provides the transparency settings for viewing the
687 -- entity aniobj. The transparency value aValue may be
688 -- between 0.0, opaque, and 1.0, fully transparent.
689 -- If a local context is open and if updateviewer equals
690 -- Standard_False, the presentation of the Interactive
691 -- Object activates the selection mode; the object is
692 -- displayed but no viewer will be updated.
693
694     UnsetTransparency(me       : mutable;
695                       aniobj  : InteractiveObject from AIS;
696              updateviewer : Boolean from Standard = Standard_True);
697 ---Purpose:
698 -- Removes   the transparency settings for viewing the
699 -- entity aniobj. The transparency value aValue may be
700 -- between 0.0, opaque, and 1.0, fully transparent.
701 -- If a local context is open and if updateviewer equals
702 -- Standard_False, the presentation of the Interactive
703 -- Object activates the selection mode; the object is
704 -- displayed but no viewer will be updated.
705         
706     SetDegenerateModel ( me : mutable;
707                 aniobj  : InteractiveObject from AIS;
708                 aModel  : TypeOfDegenerateModel from Aspect =
709                                                 Aspect_TDM_WIREFRAME;
710                 aRatio : Ratio from Quantity = 0.0);
711     ---Level: Public
712     ---Purpose: Sets the model of degeneration for the shaded representation
713     --   of the object <aniobj>
714     --   according to the degenerate ratio >= 0. & <= 1. where :
715     --   <aRatio> = 0. indicate that all polygons of the object
716     --      will be displayed.
717     --   <aRatio> = 1. indicate that no polygons will be displayed !!
718     --   When <ARatio> is > 0 & < 1. the corresponding amount
719     --   of object polygons will be displayed with a random method.
720     --  Warning: the degenerate structure is shown only when
721     -- the animation and degenerate flags are set to TRUE
722     -- in V3d_View::SetAnimationMode(..)
723     ---Category: Methods to manage the object degeneration
724
725     SetDegenerateModel (
726      me         : mutable;
727      aModel     : TypeOfDegenerateModel from Aspect;
728      aSkipRatio : Ratio                 from Quantity = 0.0
729     ) is static;
730     ---Purpose: Defines the degenerate method to apply on the shaded 
731     --  representation of all objects.
732
733     SetLocalAttributes(me      : mutable; 
734                        aniobj  : InteractiveObject from AIS;
735                        aDrawer : Drawer from AIS;
736              updateviewer : Boolean from Standard = Standard_True); 
737 --- Purpose:
738 -- Sets the attributes of the interactive object aniobj by
739 -- plugging the attribute manager aDrawer into the local
740 -- context. The graphic attributes of aDrawer such as
741 -- visualization mode, color, and material, are then used
742 -- to display aniobj.
743 -- If a local context is open and if updateviewer equals
744 -- Standard_False, the presentation of the Interactive
745 -- Object activates the selection mode; the object is
746 -- displayed but no viewer will be updated.
747         
748     UnsetLocalAttributes(me     : mutable;
749                           anObj : InteractiveObject from AIS;
750                          updateviewer : Boolean from Standard = Standard_True);
751 ---Purpose:
752 -- Removes the settings for local attributes of the entity
753 -- anObj   and returns to the Neutral Point attributes or
754 -- those of the previous local context.
755 -- If a local context is open and if updateviewer equals
756 -- Standard_False, the presentation of the Interactive
757 -- Object activates the selection mode; the object is
758 -- displayed but no viewer will be updated.
759
760     
761     SetPolygonOffsets ( me : mutable;
762                 anObj        : InteractiveObject from AIS;
763                 aMode        : Integer from Standard;
764                 aFactor      : Real from Standard = 1.0;
765                 aUnits       : Real from Standard = 0.0;
766         updateviewer : Boolean from Standard = Standard_True ) is static;
767     ---Purpose: Sets up polygon offsets for the given AIS_InteractiveObject.
768     --          It simply calls anObj->SetPolygonOffsets() 
769
770     
771     HasPolygonOffsets ( me; 
772                  anObj   : InteractiveObject from AIS ) 
773                  returns Boolean from Standard 
774                  is static;
775     ---Level: Public
776     ---Purpose: simply calls anObj->HasPolygonOffsets() 
777     ---Category: Inquire methods
778
779     PolygonOffsets ( me;
780                 anObj   : InteractiveObject from AIS;
781                 aMode   : out Integer from Standard;
782                 aFactor : out Real from Standard;
783                 aUnits  : out Real from Standard ) is static;
784     ---Level: Public
785     ---Purpose: Retrieves current polygon offsets settings for <anObj>.
786     ---Category: Inquire methods
787
788
789     SetTrihedronSize(me:mutable;aSize:Real from Standard;updateviewer: Boolean from Standard = Standard_True);
790     ---Purpose: Sets the size aSize of the trihedron.
791 -- Is used to change the default value 100 mm for
792 -- display of trihedra.
793 -- Use of this function in one of your own interactive
794 -- objects requires a call to the Compute function of the
795 -- new class. This will recalculate the presentation for
796 -- every trihedron displayed.
797 -- If a local context is open and if updateviewer equals
798 -- Standard_False, the presentation of the Interactive
799 -- Object activates the selection mode; the object is
800 -- displayed but no viewer will be updated.
801
802     TrihedronSize(me) returns Real from Standard;
803     ---Purpose: returns the current value of trihedron size.
804
805     
806     SetPlaneSize(me:mutable;aSizeX,aSizeY:Real from Standard;updateviewer: Boolean from Standard = Standard_True);
807 ---Purpose:
808 -- Sets the plane size defined by the length in the X
809 -- direction XSize and that in the Y direction YSize.
810 -- If a local context is open and if updateviewer equals
811 -- Standard_False, the presentation of the Interactive
812 -- Object activates the selection mode; the object is
813 -- displayed but no viewer will be updated.
814         
815     SetPlaneSize(me:mutable;aSize:Real from Standard;updateviewer: Boolean from Standard = Standard_True);
816 ---Purpose:
817 -- Sets the plane size aSize.
818 -- If a local context is open and if updateviewer equals
819 -- Standard_False, the presentation of the Interactive
820 -- Object activates the selection mode; the object is
821 -- displayed but no viewer will be updated.
822 -- May be used if PlaneSize returns true.
823         
824     PlaneSize(me; XSize,YSize:out Real from Standard) returns Boolean from Standard;
825     ---Purpose: Returns true if the length in the X direction XSize is
826 -- the same as that in the Y direction YSize.
827
828     DisplayStatus (me; anIobj: InteractiveObject from AIS)
829     returns DisplayStatus from AIS;
830     ---Purpose: Returns the display status of the entity anIobj.
831 -- This will be one of the following:
832 -- -   DS_Displayed   displayed in main viewer
833 -- -   DS_Erased   erased in the Collector
834 -- -   DS_FullErased   erased everywhere but in the Collector
835 -- -   DS_Temporary   temporarily displayed
836 -- -   DS_None   nowhere displayed.
837
838     DisplayedModes (me;aniobj: InteractiveObject from AIS)
839     returns ListOfInteger from TColStd;
840         ---C++: return const &
841         ---Purpose:
842         -- Returns the list of active display modes for the entity aniobj.
843
844     IsDisplayed(me; anIobj:InteractiveObject from AIS) returns Boolean from Standard;
845     ---Purpose: Returns true if anIobj is displayed in the interactive context.  
846     
847     IsDisplayed(me;
848                 aniobj: InteractiveObject from AIS;
849                 aMode : Integer from Standard) 
850     returns Boolean  from  Standard;
851
852     IsHilighted(me;aniobj : InteractiveObject from AIS)
853     returns Boolean from Standard;
854
855     IsHilighted(me;
856                 anIobj   : InteractiveObject from AIS;
857                 WithColor: out Boolean from Standard;
858                 theHiCol : out NameOfColor from Quantity)
859     returns Boolean from Standard;
860     ---Purpose: if <anIObj> is hilighted with a specific color
861     --          <WithColor> will be returned TRUE
862     --          <theHiCol> gives the name of the hilightcolor
863
864     IsInCollector(me;anIObj:InteractiveObject from AIS)
865     returns Boolean from Standard;
866 ---Purpose:
867 -- Returns true if the entity anIobj is in the Collector viewer.
868     
869     DisplayPriority(me;anIobj: InteractiveObject from AIS)
870     returns Integer from Standard;
871 ---Purpose:
872 -- Returns the display priority of the entity anIobj. This
873 -- will be display   mode of anIobj if it is in the main
874 -- viewer, and the highlight mode if it is in the Collector viewer.
875
876     HasColor(me; aniobj: InteractiveObject from AIS)
877     returns Boolean from Standard;
878 ---Purpose:
879 -- Returns true if a view of the Interactive Object aniobj has color.    
880     Color(me;aniobj:InteractiveObject from AIS)
881     returns NameOfColor from Quantity;
882
883     Color(me; aniobj: InteractiveObject from AIS;
884                   acolor: out Color from Quantity);     
885 ---Purpose:
886 -- Returns the color Color of the entity aniobj in the interactive context.    
887     Width(me;
888           aniobj  : InteractiveObject from AIS) 
889      returns Real from Standard is virtual;
890 ---Purpose:
891 -- Returns the width of the Interactive Object aniobj in
892 -- the interactive context.    
893
894     Status(me;
895            anObj : InteractiveObject from AIS;
896            astatus : in out ExtendedString from TCollection);
897 ---Purpose:
898 -- Returns the status astatus of the Interactive Context
899 -- for the view of the Interactive Object anObj.
900
901     UpdateCurrentViewer(me:mutable);
902  ---Purpose:
903 -- Updates the current viewer, the viewer in Neutral Point.
904 -- Objects selected when there is no open local context
905 -- are called current objects; those selected in open
906 -- local context, selected objects.   
907
908     UpdateCollector(me:mutable);
909 ---Purpose: Updates the Collector viewer.
910
911
912
913                     ---Category: General Attributes for the session
914
915     DisplayMode(me)        returns Integer     from Standard;
916         ---C++: inline
917         ---Purpose: Returns the display mode setting.
918         -- Note that mode 3 is only used.
919     
920     HilightColor(me)       returns NameOfColor from Quantity; -- dynamic  selection
921         ---C++: inline
922         ---Purpose:
923         -- Returns the name of the color used to show
924         -- highlighted entities, that is, entities picked out by the mouse.
925     
926     SelectionColor(me)     returns NameOfColor from Quantity; 
927      ---C++: inline
928      ---Purpose:
929      -- Returns the name of the color used to show selected entities.
930      -- By default, this is Quantity_NOC_GRAY80.
931     
932     PreSelectionColor(me)  returns NameOfColor from Quantity;
933       ---C++: inline
934       ---Purpose: Returns the name of the color used to show preselection.
935       -- By default, this is Quantity_NOC_GREEN.
936     
937     DefaultColor(me)       returns NameOfColor from Quantity;
938         ---C++: inline
939         ---Purpose:
940         -- Returns the name of the color used by default.
941         -- By default, this is Quantity_NOC_GOLDENROD. 
942     
943     SubIntensityColor(me)       returns NameOfColor from Quantity;    
944         ---C++: inline
945         ---Purpose:
946         -- Returns the name of the color used to show that an
947         -- object is not currently selected.
948         -- By default, this is Quantity_NOC_GRAY40.
949
950     SetHilightColor(me:mutable;aHiCol:NameOfColor from Quantity);
951         ---C++: inline
952         ---Purpose:
953         -- Sets the color used to show highlighted entities, that
954         -- is, entities picked by the mouse.
955         -- By default, this is Quantity_NOC_CYAN1.
956     
957     SelectionColor(me:mutable;aCol:NameOfColor from Quantity);
958             ---C++: inline
959             ---Purpose:
960             -- Sets the color used to show selected entities.
961             -- By default, this is Quantity_NOC_GRAY80.
962     
963     SetPreselectionColor(me:mutable;aCol:NameOfColor from Quantity);
964         ---C++: inline    
965         ---Purpose:
966         -- Allows you to set the color used to show preselection.
967         -- By default, this is Quantity_NOC_GREEN.
968         -- A preselected entity is one which has been selected
969         -- as the domain of application of a function such as a fillet. 
970     
971     SetSubIntensityColor(me:mutable;aCol:NameOfColor from Quantity);
972         ---C++: inline    
973         ---Purpose:
974         -- Sets the color used to show that an object is not currently selected.
975         -- By default, this is Quantity_NOC_GRAY40.
976     
977     SetDisplayMode(me:mutable;AMode: DisplayMode from AIS;
978                    updateviewer: Boolean from Standard = Standard_True);
979     ---Purpose:
980     -- Sets the display mode of seen Interactive Objects.
981     -- aMode provides the display mode index of the entity aniobj.
982     -- If updateviewer equals Standard_True, the
983     -- predominant mode aMode will overule the context mode.
984     -- If a local context is open and if updateviewer equals
985     -- Standard_False, the presentation of the Interactive
986     -- Object returns to the default selection mode; the
987     -- object is displayed but no viewer will be updated.
988     -- Note that display mode 3 is only used if you have an
989     -- AIS_Textured Shape.
990     
991     
992     SetDeviationCoefficient(me      : mutable;
993              aniobj       : InteractiveObject from AIS;
994              aCoefficient : Real from Standard ;
995              updateviewer : Boolean from Standard = Standard_True);
996     --- Purpose:
997     -- Sets the deviation coefficient aCoefficient.
998     -- Drawings of curves or patches are made with respect
999     -- to a maximal chordal deviation. A Deviation coefficient
1000     -- is used in the shading display mode. The shape is
1001     -- seen decomposed into triangles. These are used to
1002     -- calculate reflection of light from the surface of the
1003     -- object. The triangles are formed from chords of the
1004     -- curves in the shape. The deviation coefficient
1005     -- aCoefficient gives the highest value of the angle with
1006     -- which a chord can deviate from a tangent to a   curve.
1007     -- If this limit is reached, a new triangle is begun.
1008     -- This deviation is absolute and is set through the
1009     -- method: SetMaximalChordialDeviation. The default
1010     -- value is 0.001.
1011     -- In drawing shapes, however, you are allowed to ask
1012     -- for a relative deviation. This deviation will be:
1013     -- SizeOfObject * DeviationCoefficient.
1014     -- default 0.001
1015         
1016     SetDeviationAngle(me      : mutable;
1017              aniobj       : InteractiveObject from AIS;
1018              anAngle      : Real from Standard ;
1019              updateviewer : Boolean from Standard = Standard_True);
1020              
1021     SetAngleAndDeviation(me      : mutable;
1022              aniobj       : InteractiveObject from AIS;
1023              anAngle      : Real from Standard ;
1024              updateviewer : Boolean from Standard = Standard_True);
1025     ---Purpose: Calls the AIS_Shape SetAngleAndDeviation to set
1026     --          both Angle and Deviation coefficients
1027     SetHLRDeviationCoefficient(me      : mutable;
1028              aniobj       : InteractiveObject from AIS;
1029              aCoefficient : Real from Standard ;
1030              updateviewer : Boolean from Standard = Standard_True);
1031 ---Purpose:
1032 -- Sets the deviation coefficient aCoefficient for
1033 -- removal of hidden lines created by different
1034 -- viewpoints in different presentations. The Default value is 0.02.    
1035
1036     SetHLRDeviationAngle(me      : mutable;
1037              aniobj       : InteractiveObject from AIS;
1038              anAngle      : Real from Standard ;
1039              updateviewer : Boolean from Standard = Standard_True);
1040              
1041
1042     SetHLRAngleAndDeviation(me      : mutable;
1043              aniobj       : InteractiveObject from AIS;
1044              anAngle      : Real from Standard ;
1045              updateviewer : Boolean from Standard = Standard_True);
1046     ---Purpose : Computes a HLRAngle and a
1047 -- HLRDeviationCoefficient by means of the angle
1048 -- anAngle and sets the corresponding methods in the
1049 -- default drawing tool with these values.
1050     --         
1051         
1052     SetDeviationCoefficient(me: mutable; aCoefficient: Real from Standard);
1053     ---Purpose: Sets the deviation coefficient aCoefficient.
1054 -- Drawings of curves or patches are made with respect
1055 -- to a maximal chordal deviation. A Deviation coefficient
1056 -- is used in the shading display mode. The shape is
1057 -- seen decomposed into triangles. These are used to
1058 -- calculate reflection of light from the surface of the
1059 -- object. The triangles are formed from chords of the
1060 -- curves in the shape. The deviation coefficient
1061 -- aCoefficient gives the highest value of the angle with
1062 -- which a chord can deviate from a tangent to a   curve.
1063 -- If this limit is reached, a new triangle is begun.
1064 -- This deviation is absolute and is set through the
1065 -- method: SetMaximalChordialDeviation. The default
1066 -- value is 0.001.
1067 -- In drawing shapes, however, you are allowed to ask
1068 -- for a relative deviation. This deviation will be:
1069 -- SizeOfObject * DeviationCoefficient.
1070 -- default 0.001
1071         
1072     DeviationCoefficient(me) returns Real from Standard ;
1073 ---Purpose: Returns the deviation coefficient.
1074 -- Drawings of curves or patches are made with respect
1075 -- to a maximal chordal deviation. A Deviation coefficient
1076 -- is used in the shading display mode. The shape is
1077 -- seen decomposed into triangles. These are used to
1078 -- calculate reflection of light from the surface of the
1079 -- object. The triangles are formed from chords of the
1080 -- curves in the shape. The deviation coefficient gives
1081 -- the highest value of the angle with which a chord can
1082 -- deviate from a tangent to a   curve. If this limit is
1083 -- reached, a new triangle is begun.
1084 -- This deviation is absolute and is set through
1085 -- AIS_Drawer::SetMaximalChordialDeviation. The
1086 -- default value is 0.001.
1087 -- In drawing shapes, however, you are allowed to ask
1088 -- for a relative deviation. This deviation will be:
1089 -- SizeOfObject * DeviationCoefficient.
1090         
1091     SetDeviationAngle(me : mutable; anAngle : Real from Standard) ;
1092     ---Purpose: default 6degrees 
1093     DeviationAngle(me) returns Real from Standard ;
1094     
1095     SetHLRDeviationCoefficient(me: mutable; aCoefficient: Real from Standard);
1096     ---Purpose:  Sets the deviation coefficient aCoefficient for
1097 -- removal of hidden lines created by different
1098 -- viewpoints in different presentations. The Default value is 0.02.
1099     HLRDeviationCoefficient(me) returns Real from Standard ;
1100 ---Purpose:
1101 -- Returns the real number value of the hidden line
1102 -- removal deviation coefficient.
1103 -- A Deviation coefficient is used in the shading display
1104 -- mode. The shape is seen decomposed into triangles.
1105 -- These are used to calculate reflection of light from the
1106 -- surface of the object.
1107 -- The triangles are formed from chords of the curves in
1108 -- the shape. The deviation coefficient give the highest
1109 -- value of the angle with which a chord can deviate
1110 -- from a tangent to a curve. If this limit is reached, a
1111 -- new triangle is begun.
1112 -- To find the hidden lines, hidden line display mode
1113 -- entails recalculation of the view at each different
1114 -- projector perspective.
1115 -- Because hidden lines entail calculations of more than
1116 -- usual complexity to decompose them into these
1117 -- triangles, a deviation coefficient allowing greater
1118 -- tolerance is used. This increases efficiency in calculation.
1119 -- The Default value is 0.02.
1120     
1121     SetHLRAngle(me: mutable; anAngle: Real from Standard);
1122     ---Purpose: Sets the HLR angle anAngle.
1123     HLRAngle(me) returns Real from Standard 
1124     is static;
1125 --- Purpose:
1126 -- Returns the real number value of the deviation angle
1127 -- in hidden line removal views in this interactive context.
1128 -- The default value is 20*PI/180.
1129     
1130     SetHLRAngleAndDeviation(me: mutable; anAngle: Real from Standard);
1131     ---Purpose: compute with anangle a HLRAngle and a HLRDeviationCoefficient 
1132     --          and set them in myHLRAngle and in myHLRDeviationCoefficient
1133     --          of myDefaultDrawer ;
1134     --          anAngle is in radian ; ( 1 deg < angle in deg < 20 deg)
1135     
1136     HiddenLineAspect(me) returns mutable LineAspect from Prs3d
1137     ---Purpose: Initializes hidden line aspect in the default drawing tool, or Drawer.
1138 -- The default values are:
1139     --          Color: Quantity_NOC_YELLOW
1140     --          Type of line: Aspect_TOL_DASH
1141     --          Width: 1.
1142     is static;
1143
1144     SetHiddenLineAspect(me; anAspect: LineAspect from Prs3d) 
1145     is static;
1146 --- Purpose:
1147 -- Sets the hidden line aspect anAspect.
1148 -- anAspect defines display attributes for hidden lines in
1149 -- HLR projections.
1150         
1151     DrawHiddenLine(me) returns Boolean from Standard 
1152     ---Purpose: returns Standard_True if the hidden lines are to be drawn.
1153     --          By default the hidden lines are not drawn.
1154     is static;
1155     
1156     EnableDrawHiddenLine(me)
1157     ---Purpose: 
1158     is static;
1159
1160     DisableDrawHiddenLine(me)
1161     ---Purpose: 
1162     is static;
1163
1164
1165     SetIsoNumber(me         : mutable; 
1166                  NbIsos     : Integer from Standard;
1167                  WhichIsos  : TypeOfIso from AIS = AIS_TOI_Both);  
1168 ---Purpose: Sets the number of U and V isoparameters displayed.
1169     
1170         IsoNumber(me         : mutable; 
1171               WhichIsos  : TypeOfIso from AIS = AIS_TOI_Both)
1172     returns Integer from Standard;
1173 ---Purpose: Returns the number of U and V isoparameters displayed.
1174
1175
1176     IsoOnPlane(me:mutable; SwitchOn :Boolean from Standard);
1177 ---Purpose: Returns True if drawing isoparameters on planes is enabled.        
1178     IsoOnPlane(me) returns Boolean from Standard;
1179 ---Purpose: Returns True if drawing isoparameters on planes is enabled.
1180         
1181     ---Purpose: if <forUIsos> = False, 
1182
1183     SetSelectedAspect ( me : mutable; anAspect: any BasicAspect from Prs3d;
1184                      globalChange: Boolean from Standard = Standard_True;
1185                      updateViewer: Boolean from Standard = Standard_True)
1186         is static;
1187     ---Level: Public
1188     ---Purpose: Sets the graphic basic aspect to the current presentation of
1189     --          ALL selected objects.
1190     --          When <globalChange> is TRUE , the full object presentation
1191     --          is changed.
1192     --          When <globalChange> is FALSE , only the current group
1193     --          of the object presentation is changed.
1194     --          Updates the viewer or collector when <updateViewer> is TRUE
1195     ---Category: Graphic attributes management
1196
1197             ---Category: GRAPHIC DETECTION  / SELECTION
1198
1199
1200     MoveTo(me:mutable;XPix,YPix:Integer from Standard;aView:View from V3d)
1201     returns StatusOfDetection from AIS;
1202 ---Purpose: Relays mouse position in pixels XPix and YPix to the
1203 -- interactive context selectors. This is done by the view
1204 -- aView passing this position to the main viewer and updating it.
1205 -- Functions in both Neutral Point and local contexts.
1206
1207
1208     HasNextDetected(me) returns Boolean from Standard;
1209     ---Purpose: returns True  if other entities  were detected  in the
1210     --          last mouse detection
1211
1212     HilightNextDetected(me:mutable;aView:View from V3d) 
1213     returns Integer from Standard;
1214     ---Purpose: if more than 1 object is detected by the selector,
1215     --          only the "best" owner is hilighted at the mouse position.
1216     --          This Method allows the user to hilight one after another
1217     --          the other detected entities.
1218     --          if The method select is called, the selected entity
1219     --          will be the hilighted one!
1220     --          returns the Rank of hilighted entity 
1221     --          WARNING : Loop Method. When all the detected entities 
1222     --                    have been hilighted , the next call will hilight
1223     --                    the first one again 
1224
1225     HilightPreviousDetected(me:mutable;aView:View from V3d)
1226     returns Integer from Standard;
1227     ---Purpose: Same as previous methods in reverse direction...
1228
1229     Select(me:mutable;XPMin,YPMin,XPMax,YPMax:Integer from Standard;aView:View from V3d;
1230            updateviewer: Boolean from Standard = Standard_True)
1231     returns StatusOfPick from AIS;
1232     ---Purpose: Selects everything found in the bounding rectangle
1233 -- defined by the pixel minima and maxima, XPMin,
1234 -- YPMin, XPMax, and YPMax in the view, aView
1235 -- The objects detected are passed to the main viewer,
1236 -- which is then updated.
1237
1238     Select(me:mutable; Polyline:Array1OfPnt2d from TColgp;aView:View from V3d;
1239            updateviewer: Boolean from Standard = Standard_True)
1240     returns StatusOfPick from AIS;
1241     ---Purpose: polyline selection; clears the previous picked list
1242
1243     Select(me          : mutable;
1244            updateviewer: Boolean from Standard = Standard_True)
1245     returns StatusOfPick from AIS;
1246     ---Purpose: Stores  and hilights the previous detected; Unhilights
1247     --          the previous picked.
1248
1249     ShiftSelect(me           : mutable;
1250                 updateviewer : Boolean from Standard = Standard_True)
1251     returns StatusOfPick from AIS;
1252     ---Purpose: adds the last detected to the list of previous picked.
1253     --          if the last detected was already declared as picked,
1254     --          removes it from the Picked List.
1255
1256     ShiftSelect( me : mutable; Polyline : Array1OfPnt2d from TColgp; aView : View from V3d;
1257                          updateviewer : Boolean from Standard = Standard_True)
1258     returns StatusOfPick from AIS;
1259     ---Purpose: adds the last detected to the list of previous picked.
1260     --          if the last detected was already declared as picked,
1261     --          removes it from the Picked List.
1262
1263     
1264     ShiftSelect(me:mutable;XPMin,YPMin,XPMax,YPMax:Integer from Standard;aView:View from V3d;
1265                updateviewer : Boolean from Standard = Standard_True)
1266     returns StatusOfPick from AIS;
1267     ---Purpose: rectangle  of selection  ; adds new detected entities into the
1268     --          picked list, removes the detected entities that were already stored...
1269
1270     SetToHilightSelected(me: mutable; toHilight: Boolean from Standard);
1271     ---C++: inline 
1272     ---Purpose: Specify whether selected object must be hilighted when mouse cursor
1273     --- is moved above it (in MoveTo method). By default this value is false and
1274     --- selected object is not hilighted in this case.
1275
1276     ToHilightSelected(me) returns Boolean from Standard;
1277     ---C++: inline 
1278     ---Purpose: Return value specified whether selected object must be hilighted 
1279     --- when mouse cursor is moved above it
1280     
1281
1282                     ---Category: non interactive actions about Selection
1283                     --           2 categories are distinct:
1284                     --           - Current Objects 
1285                     --           - Selected Objects
1286                     --           a Current object is the object picked
1287                     --           at neutral Point.
1288                     --           The Selected objects are objects picked
1289                     --           when a local context is opened
1290
1291
1292     SetCurrentObject(me:mutable;
1293                      aniobj: InteractiveObject from AIS;
1294                      updateviewer : Boolean from Standard = Standard_True);
1295 --- Purpose:
1296 -- Updates the view of the current object in open context.
1297 -- Objects selected when there is no open local context
1298 -- are called current objects; those selected in open
1299 -- local context, selected objects.
1300 -- If a local context is open and if updateviewer equals
1301 -- Standard_False, the presentation of the Interactive
1302 -- Object activates the selection mode; the object is
1303 -- displayed but no viewer will be updated.
1304         
1305     AddOrRemoveCurrentObject(me:mutable;
1306                              aniobj : InteractiveObject from AIS;
1307                              updateviewer : Boolean from Standard = Standard_True);
1308 ---Purpose:
1309 -- Allows you to add a current object to the list of current
1310 -- objects or remove it from that list.
1311 -- Objects selected when there is no open local context
1312 -- are called current objects; those selected in open
1313 -- local context, selected objects.
1314 -- If a local context is open and if updateviewer equals
1315 -- Standard_False, the presentation of the Interactive
1316 -- Object activates the selection mode; the object is
1317 -- displayed but no viewer will be updated.                          
1318     UpdateCurrent (me:mutable);
1319     ---Purpose: Updates the list of current objects, i.e. hilights new
1320 -- current objects, removes hilighting from former current objects.
1321 -- Objects selected when there is no open local context
1322 -- are called current objects; those selected in open
1323 -- local context, selected objects.
1324     --          
1325
1326     WasCurrentTouched(me) returns Boolean from Standard;
1327         ---Purpose:
1328         -- Returns the current selection touched by the cursor.
1329         -- Objects selected when there is no open local context
1330         -- are called current objects; those selected in open
1331         -- local context, selected objects.
1332         ---C++: inline
1333     
1334     SetOkCurrent(me:mutable);
1335     ---C++: inline
1336
1337     IsCurrent(me;aniobj: InteractiveObject from AIS) returns Boolean  from  Standard;
1338 --- Purpose:
1339 -- Returns true if there is a non-null interactive object in Neutral Point.
1340 -- Objects selected when there is no open local context
1341 -- are called current objects; those selected in open
1342 -- local context, selected objects.  
1343     
1344     InitCurrent(me:mutable);
1345 --- Purpose:
1346 -- Initializes a scan of the current selected objects in
1347 -- Neutral Point.
1348 -- Objects selected when there is no open local context
1349 -- are called current objects; those selected in open
1350 -- local context, selected objects.   
1351     
1352     MoreCurrent(me) returns Boolean from Standard;
1353 --- Purpose:
1354 -- Returns true if there is another object found by the
1355 -- scan of the list of current objects.
1356 -- Objects selected when there is no open local context
1357 -- are called current objects; those selected in open
1358 -- local context, selected objects.   
1359     
1360     NextCurrent(me:mutable);
1361 ---Purpose:
1362 -- Continues the scan to the next object in the list of
1363 -- current objects.
1364 -- Objects selected when there is no open local context
1365 -- are called current objects; those selected in open
1366 -- local context, selected objects.    
1367     
1368     Current(me) returns InteractiveObject from AIS;
1369 ---Purpose:
1370 -- Returns the current interactive object.
1371 -- Objects selected when there is no open local context
1372 -- are called current objects; those selected in open
1373 -- local context, selected objects.    
1374     
1375     NbCurrents(me:mutable) returns Integer from Standard;
1376     
1377     FirstCurrentObject(me:mutable) returns InteractiveObject from AIS;
1378 ---Purpose:
1379 -- Returns the first current object in the list of current objects.
1380 -- Objects selected when there is no open local context
1381 -- are called current objects; those selected in open
1382 -- local context, selected objects.
1383         
1384     HilightCurrents(me : mutable; 
1385                     updateviewer : Boolean from Standard=Standard_True);
1386  ---Purpose:
1387 --- Highlights current objects.
1388 -- Objects selected when there is no open local context
1389 -- are called current objects; those selected in open
1390 -- local context, selected objects.
1391 -- If a local context is open and if updateviewer equals
1392 -- Standard_False, the presentation of the Interactive
1393 -- Object activates the selection mode; the object is
1394 -- displayed but no viewer will be updated.   
1395     
1396     UnhilightCurrents(me : mutable; 
1397                     updateviewer : Boolean from Standard=Standard_True);
1398 ---Purpose:
1399 -- Removes highlighting from current objects.
1400 -- Objects selected when there is no open local context
1401 -- are called current objects; those selected in open
1402 -- local context, selected objects.
1403 -- If a local context is open and if updateviewer equals
1404 -- Standard_False, the presentation of the Interactive
1405 -- Object activates the selection mode; the object is
1406 -- displayed but no viewer will be updated.
1407         
1408     ClearCurrents(me:mutable; 
1409                     updateviewer : Boolean from Standard=Standard_True);
1410 ---Purpose:
1411 -- Empties previous current objects in order to get the
1412 -- current objects detected by the selector using
1413 -- UpdateCurrent.
1414 -- Objects selected when there is no open local context
1415 -- are called current objects; those selected in open
1416 -- local context, selected objects.
1417 -- If a local context is open and if updateviewer equals
1418 -- Standard_False, the presentation of the Interactive
1419 -- Object activates the selection mode; the object is
1420 -- displayed but no viewer will be updated.
1421
1422     SetSelected(me:mutable;aniObj: InteractiveObject from AIS; 
1423                     updateviewer : Boolean from Standard=Standard_True);
1424     ---Purpose: Puts the interactive object aniObj in the list of
1425     -- selected objects.
1426     -- If a local context is open and if updateviewer equals
1427     -- Standard_False, the presentation of the Interactive
1428     -- Object activates the selection mode; the object is
1429     -- displayed but no viewer will be updated.
1430
1431     SetSelectedCurrent(me:mutable);
1432     ---Purpose: puts the selected list in the current objects List. 
1433     UpdateSelected(me:mutable; 
1434                     updateviewer : Boolean from Standard=Standard_True);
1435     ---Purpose: updates the list of selected objects
1436     --          i.e. hilights the new selected
1437     --          unhilights old selected objects
1438     AddOrRemoveSelected(me:mutable;
1439                         aniobj : InteractiveObject from AIS; 
1440                         updateviewer : Boolean from Standard=Standard_True);
1441     ---Purpose:Allows you to add a selected object to the list of
1442 -- selected objects or remove it from that list. This entity
1443 -- can be an Interactive Object aniobj or its owner
1444 -- aShape as can be seen in the two syntaxes above.
1445 -- Objects selected when there is no open local context
1446 -- are called current objects; those selected in open
1447 -- local context, selected objects.
1448 -- If a local context is open and if updateviewer equals
1449 -- Standard_False, the presentation of the Interactive
1450 -- Object activates the selection mode; the object is
1451 -- displayed but no viewer will be updated. 
1452
1453     HilightSelected(me : mutable; 
1454                     updateviewer : Boolean from Standard=Standard_True);
1455 ---Purpose:
1456 -- Highlights selected objects.
1457 -- Objects selected when there is no open local context
1458 -- are called current objects; those selected in open
1459 -- local context, selected objects.
1460 -- If a local context is open and if updateviewer equals
1461 -- Standard_False, the presentation of the Interactive
1462 -- Object activates the selection mode; the object is
1463 -- displayed but no viewer will be updated.
1464         
1465     UnhilightSelected(me : mutable; 
1466                     updateviewer : Boolean from Standard=Standard_True);
1467 ---Purpose:
1468 -- Removes highlighting from selected objects.
1469 -- Objects selected when there is no open local context
1470 -- are called current objects; those selected in open
1471 -- local context, selected objects.
1472 -- If a local context is open and if updateviewer equals
1473 -- Standard_False, the presentation of the Interactive
1474 -- Object activates the selection mode; the object is
1475 -- displayed but no viewer will be updated.
1476         
1477     ClearSelected(me:mutable; 
1478                     updateviewer : Boolean from Standard=Standard_True);
1479 ---Purpose:
1480 -- Empties previous selected objects in order to get the
1481 -- selected objects detected by the selector using
1482 -- UpdateSelected.
1483 -- Objects selected when there is no open local context
1484 -- are called current objects; those selected in open
1485 -- local context, selected objects.
1486 -- If a local context is open and if updateviewer equals
1487 -- Standard_False, the presentation of the Interactive
1488 -- Object activates the selection mode; the object is
1489 -- displayed but no viewer will be updated.
1490         
1491     AddOrRemoveSelected(me:mutable;aShape:Shape from TopoDS; 
1492                     updateviewer : Boolean from Standard=Standard_True);
1493      ---Purpose:  No right to Add a selected Shape (Internal Management 
1494      --           of shape Selection).
1495      --           A Previous selected shape may only be removed.
1496     
1497     
1498     AddOrRemoveSelected(me:mutable;anOwner : EntityOwner from SelectMgr;
1499                         updateviewer: Boolean from Standard=Standard_True);
1500     ---Purpose: allows to add/remove in the selected list the entities
1501     --          represented by <anOwner> in the selection process.
1502   
1503                     ---Category: Selection Process
1504     
1505     IsSelected(me;aniobj: InteractiveObject from AIS) returns Boolean  from  Standard;
1506    --- Purpose:
1507 -- Finds the selected object aniobj in local context and
1508 -- returns its name.
1509 -- Objects selected when there is no open local context
1510 -- are called current objects; those selected in open
1511 --  local context, selected objects.
1512     
1513     InitSelected(me:mutable);
1514 ---Purpose:
1515 -- Initializes a scan of the selected objects in local context.
1516 -- Objects selected when there is no open local context
1517 -- are called current objects; those selected in open
1518 -- local context, selected objects.    
1519     
1520     MoreSelected(me) returns Boolean from Standard;
1521 ---Purpose:
1522 -- Returns true if there is another object found by the
1523 -- scan of the list of selected objects.
1524 -- Objects selected when there is no open local context
1525 -- are called current objects; those selected in open
1526 -- local context, selected objects.    
1527   
1528     
1529     NextSelected(me:mutable);
1530 ---Purpose:
1531 -- Continues the scan to the next object in the list of
1532 -- selected objects.
1533 -- Objects selected when there is no open local context
1534 -- are called current objects; those selected in open
1535 -- local context, selected objects.    
1536     
1537     NbSelected(me:mutable) returns Integer from Standard;
1538     
1539     HasSelectedShape(me) returns Boolean from Standard;
1540 --- Purpose:
1541 -- Returns true if the interactive context has a shape
1542 -- selected in it which results from the decomposition of
1543 -- another entity in local context.
1544 -- If HasSelectedShape returns true, SelectedShape
1545 -- returns the shape which has been shown to be
1546 -- selected. Interactive returns the Interactive Object
1547 -- from which the shape has been selected.
1548 -- If HasSelectedShape returns false, Interactive
1549 -- returns the interactive entity selected by the click of the mouse.   
1550     
1551     SelectedShape(me) returns Shape from TopoDS;        
1552 ---Purpose:
1553 --        Returns the selected shape in the open local context.
1554 -- Objects selected when there is no open local context
1555 -- are called current objects; those selected in open
1556 -- local context, selected objects.  
1557         
1558     SelectedOwner(me) returns EntityOwner from SelectMgr;
1559 ---Purpose:
1560 -- Returns the owner of the selected entity resulting
1561 -- from the decomposition of another entity in local context. 
1562      
1563     EntityOwners(me;  theOwners :  out IndexedMapOfOwner from SelectMgr; 
1564                       theIObj   :  InteractiveObject from AIS; 
1565                       theMode   :  Integer from Standard = -1); 
1566     ---Purpose: Returns a collection containing all entity owners  
1567     ---         created for the interactive object <theIObj> in  
1568     ---         the selection mode theMode (in all active modes  
1569     ---         if the Mode == -1) 
1570     
1571     Interactive(me) returns  InteractiveObject from AIS;
1572     ---Purpose: Returns the location of the selected Interactive Object.
1573     SelectedInteractive(me) returns InteractiveObject from AIS;
1574     
1575     HasApplicative(me) returns Boolean from Standard;
1576 --- Purpose:
1577 -- Returns true if the applicative object has an owner
1578 -- from Interactive attributed to it.   
1579     
1580     Applicative(me) returns Transient from Standard;
1581 ---Purpose:
1582 -- Returns the owner of the applicative entity detected
1583 -- in interactive context. The owner can be a shape for
1584 -- a set of sub-shapes or a sub-shape for sub-shapes
1585 -- which it is composed of.
1586
1587                     ---Category: information about detection...
1588     
1589     HasDetected     (me) returns Boolean from Standard;
1590 ---Purpose:
1591 -- Returns true if there is a mouse-detected entity in local context.
1592 -- If there is no open local context, the objects selected
1593 -- are called current objects; selected objects if there is
1594 -- one. Iterators allow entities to be recovered in either
1595 -- case. This method is one of a set which allows you to
1596 -- manipulate the objects which have been placed in these two lists.    
1597     
1598     HasDetectedShape(me) returns Boolean from Standard;
1599 ---Purpose:
1600 -- Returns true if there is a detected shape in local context.
1601 -- If there is no open local context, the objects selected
1602 -- are called current objects; selected objects if there is
1603 -- one. Iterators allow entities to be recovered in either
1604 -- case. This method is one of a set which allows you to
1605 -- manipulate the objects which have been placed in these two lists.    
1606     
1607     DetectedShape   (me) returns Shape from TopoDS;
1608      ---Purpose:
1609      -- Returns the shape detected in local context.
1610      -- If there is no open local context, the objects selected
1611      -- are called current objects; selected objects if there is
1612      -- one. Iterators allow entities to be recovered in either
1613      -- case. This method is one of a set which allows you to
1614      -- manipulate the objects which have been placed in these two lists.
1615      ---C++: return const &
1616        
1617     DetectedInteractive(me) returns InteractiveObject from AIS;
1618 ---Purpose:
1619 -- Returns the interactive objects last detected in open context.
1620 -- If there is no open local context, the objects selected
1621 -- are called current objects; selected objects if there is
1622 -- one. Iterators allow entities to be recovered in either
1623 -- case. This method is one of a set which allows you to
1624 -- manipulate the objects which have been placed in these two lists.    
1625     
1626     DetectedOwner(me)    returns EntityOwner from SelectMgr;
1627     ---Purpose: returns the owner of the detected sensitive primitive.
1628
1629     InitDetected(me: mutable);
1630     
1631     MoreDetected(me) returns Boolean from Standard;
1632     NextDetected(me: mutable);
1633     DetectedCurrentShape(me) returns Shape from TopoDS;
1634     ---C++: return const &
1635     DetectedCurrentObject(me) returns InteractiveObject from AIS;
1636
1637                     ---Category:  SPECIFIC LOCAL CONTEXT ACTIONS.
1638     
1639     
1640     
1641     OpenLocalContext(me                      : mutable;
1642                      UseDisplayedObjects     : Boolean from Standard = Standard_True; 
1643                      AllowShapeDecomposition : Boolean from Standard = Standard_True;
1644                      AcceptEraseOfObjects    : Boolean from Standard = Standard_False;
1645                      BothViewers             : Boolean from Standard = Standard_False)
1646     returns Integer from Standard;
1647     ---Purpose: 
1648 -- Opens local contexts and specifies how this is to be
1649 -- done. The options listed above function in the following manner:
1650 -- -   UseDisplayedObjects -allows you to load or not
1651 --   load the interactive objects visualized at Neutral
1652 --   Point in the local context which you open. If false,
1653 --   the local context is empty after being opened. If
1654 --   true, the objects at Neutral Point are loaded by their
1655 --   default selection mode.
1656 -- -   AllowShapeDecomposition -AIS_Shape allows or
1657 --   prevents decomposition in standard shape location
1658 --   mode of objects at Neutral Point which are
1659 --   type-"privileged". This Flag is only taken into
1660 --   account when UseDisplayedObjects is true.
1661 -- -   AcceptEraseOfObjects -authorises other local
1662 --   contexts to erase the interactive objects present in
1663 --   this context. This option is rarely used.
1664 -- -   BothViewers - Has no use currently defined.
1665 --   This method returns the index of the created local
1666 -- context. It should be kept and used to close the context.
1667 -- Opening a local context allows you to prepare an
1668 -- environment for temporary presentations and
1669 -- selections which will disappear once the local context is closed.
1670 -- You can open several local contexts, but only the last
1671 -- one will be active.
1672         
1673
1674
1675     CloseLocalContext(me:mutable;
1676                       Index : Integer from Standard = -1;
1677                       updateviewer:Boolean from Standard=Standard_True);                      
1678     ---Purpose: Allows you to close local contexts. For greater
1679 -- security, you should close the context with the
1680 -- index Index given on opening.
1681 -- When you close a local context, the one before,
1682 -- which is still on the stack,   reactivates. If none is
1683 -- left, you return to Neutral Point.
1684 -- If a local context is open and if updateviewer
1685 -- equals Standard_False, the presentation of the
1686 -- Interactive Object activates the selection mode; the
1687 -- object is displayed but no viewer will be updated.
1688 -- Warning
1689 -- When the index isn't specified, the current context
1690 -- is closed. This option can be dangerous, as other
1691 -- Interactive Functions can open local contexts
1692 -- without necessarily warning the user.
1693     
1694     IndexOfCurrentLocal(me) returns Integer from Standard;
1695     ---Purpose: returns -1 if no opened local context.
1696
1697     CloseAllContexts (me:mutable;updateviewer:Boolean from Standard = Standard_True);
1698 ---Purpose:
1699 -- Allows you to close all local contexts at one go and
1700 -- return to Neutral Point.
1701 -- If a local context is open and if updateviewer equals
1702 -- Standard_False, the presentation of the Interactive
1703 -- Object activates the selection mode; the object is
1704 -- displayed but no viewer will be updated.
1705         
1706     ResetOriginalState(me:mutable;updateviewer:Boolean from Standard = Standard_True);
1707     ---Level:  Internal 
1708     ---Purpose: to   be  used only with no  opened
1709     --        local context..  displays and activates objects in their
1710     --        original state before local contexts were opened...
1711
1712     ClearLocalContext(me:mutable;TheMode : ClearMode from AIS =  AIS_CM_All);
1713     ---Purpose: clears Objects/Filters/Activated Modes list in the current opened
1714     --          local context.
1715
1716
1717     UseDisplayedObjects(me:mutable);
1718     NotUseDisplayedObjects(me:mutable);
1719     ---Purpose: when a local Context is opened, one is able to
1720     --          use/not use the displayed objects at neutral point
1721     --          at anytime.
1722
1723
1724
1725         ---Category: Immediate Mode :  Used For Simulation
1726         --           
1727         --           CAUTION
1728         --           1] NO UPDATE OF   VIEWER  MUST BE DONE
1729         --              BETWEEN BeginImmediateDraw() and EndImmediateDraw()
1730         --           2] Available only Inside Opened Local Contexts.
1731         --           3} During the Immediate Mode Displays, no Selection
1732         --              is available.
1733         --           
1734         --           How To Use It?
1735         --           
1736         --           1. BeginImmediateDraw()
1737         --           2. ImmediateAdd (Iobj,mode)
1738         --           
1739         --           4.EndImmediateDraw()      draws all the stored objects...
1740         --           
1741
1742     BeginImmediateDraw (me:mutable)  returns Boolean from Standard;
1743     ---Purpose: initializes the list of presentations to be displayed
1744     --          returns False if No Local COnte
1745
1746     ImmediateAdd (me:mutable;anIObj:InteractiveObject from AIS;aMode:Integer from Standard=0)
1747     returns Boolean from Standard;
1748     ---Purpose: returns True if <anIObj> has been stored in the list.
1749
1750     ImmediateRemove (me:mutable;anIObj:InteractiveObject from AIS;aMode:Integer from Standard=0)
1751     returns Boolean from Standard;
1752     ---Purpose: returns True if <anIObj> has been removed from the list.
1753
1754     EndImmediateDraw(me:mutable;aView : View from V3d;DoubleBuf:Boolean from Standard=Standard_False)
1755     returns Boolean from Standard;
1756     ---Purpose: returns True if the immediate display has been done.
1757     EndImmediateDraw(me:mutable;DoubleBuf:Boolean from Standard=Standard_False)
1758     returns Boolean from Standard;
1759     ---Purpose: Uses the First Active View of Main Viewer!!!
1760     --          returns True if the immediate display has been done.
1761
1762     IsImmediateModeOn(me) returns Boolean from Standard;
1763
1764     Drag ( me : mutable;
1765                 aView: View from V3d;
1766                 anObject: InteractiveObject from AIS;
1767                 aTranformation: Transformation from Geom;
1768                 postConcatenate: Boolean from Standard = Standard_False;
1769                 update: Boolean from Standard = Standard_False;
1770                 zBuffer: Boolean from Standard = Standard_False)
1771     is static;
1772     ---Level: Public
1773     ---Purpose: Transforms the current presentation of the object <anObject>
1774     --          using the transient graphic space of the view <aView> in
1775     --          immediat mode graphics.
1776     ---Warning: When  <update> is TRUE, then the view is redrawn with ALL
1777     --          transformed presentations.
1778     --          When <zBuffer> is TRUE  all transient graphic are drawn
1779     --          using zbuffer activity.
1780     --          Note that when <update> is TRUE the view is cleared and redrawn
1781     --          and soforth the Z buffer is always activated therefore the <zBuffer>
1782     --          parameter is ignored in this case.
1783
1784
1785             ---Category: Activation/Deactivation of Selection Modes.
1786
1787
1788     SetAutomaticHilight(me:mutable;aStatus:Boolean);
1789 ---Purpose:
1790 -- Sets the highlighting status aStatus of detected and
1791 -- selected entities.
1792 -- Whether you are in Neutral Point or local context, this
1793 -- is automatically managed by the Interactive Context.
1794 -- This function allows you to disconnect the automatic mode.    
1795     AutomaticHilight(me) returns Boolean from Standard;
1796 ---Purpose:
1797 -- Returns true if the automatic highlight mode is active
1798 -- in an open context.
1799     
1800     SetZDetection(me:mutable; aStatus:Boolean = Standard_False);
1801     ---Purpose: Enables/Disables the Z detection.
1802     --          If TRUE the detection echo can be partially hidden by the 
1803     --          detected object.
1804     ---Warning: The hidden part of the object is not visible but
1805     --          stay selectable.
1806
1807     ZDetection(me) returns Boolean;
1808     ---Purpose: Retrieves the Z detection state.
1809
1810     Activate(me     : mutable;
1811              anIobj : InteractiveObject from AIS;
1812              aMode  : Integer from Standard = 0);
1813     ---Purpose: Activates the selection mode aMode whose index is
1814 -- given, for the given interactive entity anIobj.
1815
1816
1817     Deactivate(me     :mutable;
1818                anIObj : InteractiveObject from AIS);
1819     ---Purpose: Deactivates all the activated selection modes
1820     --          of an object. 
1821                
1822     Deactivate(me     : mutable;
1823                anIobj : InteractiveObject from AIS;
1824                aMode  : Integer from Standard);
1825 ---Purpose:
1826 -- Deactivates all the activated selection modes of the
1827 -- interactive object anIobj with a given selection mode aMode.
1828         
1829     ActivatedModes(me;
1830                    anIobj : InteractiveObject from AIS;
1831                    theList  : in out ListOfInteger from TColStd);
1832 ---Purpose:
1833 -- Returns the list of activated selection modes in an open context.
1834         
1835     SetShapeDecomposition( me:mutable;
1836                            anIobj : InteractiveObject from AIS;
1837                            aStatus: Boolean from Standard);
1838     ---Purpose: to be Used only with opened local context and
1839     --          if <anIobj> is of type shape...
1840     --          if <aStatus> = True <anIobj> will be sensitive to 
1841     --                         shape selection modes activation.
1842     --                       = False, <anIobj> will not be senstive
1843     --                       any more.
1844     --                       
1845
1846     SetTemporaryAttributes(me      : mutable;
1847                            anObj   : InteractiveObject from AIS;
1848                            aDrawer : Drawer from Prs3d;
1849                            updateviewer : Boolean = Standard_True);
1850         
1851 ---Purpose:
1852 -- Sets the temporary graphic attributes of the entity
1853 -- anObj. These are provided by the attribute manager
1854 -- aDrawer and are valid for a particular local context only.
1855 -- If a local context is open and if updateviewer equals
1856 -- Standard_False, the presentation of the Interactive
1857 -- Object activates the selection mode; the object is
1858 -- displayed but no viewer will be updated.    
1859     
1860     SubIntensityOn(me           : mutable;
1861                    aniobj       : InteractiveObject from AIS;
1862                    updateviewer : Boolean from Standard =Standard_True);
1863 ---Purpose:
1864 -- Highlights, and removes highlights from, the displayed
1865 -- object aniobj which is displayed at Neutral Point with
1866 -- subintensity color; available only for active local
1867 -- context. There is no effect if there is no local context.
1868 -- If a local context is open and if updateviewer equals
1869 -- Standard_False, the presentation of the Interactive
1870 -- Object activates the selection mode; the object is
1871 -- displayed but no viewer will be updated.
1872         
1873     SubIntensityOff(me           : mutable;
1874                     aniobj       : InteractiveObject from AIS;
1875                     updateviewer : Boolean from Standard =Standard_True);
1876 ---Purpose:
1877 -- Removes the subintensity option for the entity aniobj.
1878 -- If a local context is open and if updateviewer equals
1879 -- Standard_False, the presentation of the Interactive
1880 -- Object activates the selection mode; the object is
1881 -- displayed but no viewer will be updated.
1882         
1883     SubIntensityOn(me:mutable;
1884                    updateviewer : Boolean from Standard = Standard_True);
1885     ---Purpose: hilights/unhilights displayed objects which are displayed at
1886     --          neutral state with subintensity color;
1887     --          available only for active local context.
1888     --          No effect if no local context.
1889
1890
1891     SubIntensityOff(me:mutable;
1892                    updateviewer : Boolean from Standard = Standard_True);
1893     ---Purpose: removes subintensity option for all objects.
1894                                    
1895
1896
1897     
1898     
1899     
1900     
1901                    ---Category: FILTERS 
1902                    --           
1903                    --           
1904                    --           
1905     
1906     AddFilter(me       :mutable;  aFilter : Filter from SelectMgr);
1907     ---Purpose: Allows you to add the filter aFilter to Neutral Point or
1908 -- to a local context if one or more selection modes have been activated.
1909 -- Only type filters may be active in Neutral Point.
1910
1911     RemoveFilter(me:mutable;aFilter  : Filter from SelectMgr);
1912
1913 ---Purpose:
1914 -- Removes a filter from Neutral Point or a local context
1915 -- if one or more selection modes have been activated.
1916 -- Only type filters are activated in Neutral Point.
1917     
1918     RemoveFilters(me:mutable);
1919     ---Purpose: Remove a filter to Neutral Point or a local context if
1920 -- one or more selection modes have been activated.
1921 -- Only type filters are active in Neutral Point.
1922
1923     ActivateStandardMode(me:mutable; aStandardActivation : ShapeEnum from TopAbs);
1924     ---Purpose: Provides an alternative to the Display methods when
1925 -- activating specific selection modes. This has the
1926 -- effect of activating the corresponding selection mode
1927 -- aStandardActivation for all objects in Local Context
1928 -- which accept decomposition into sub-shapes.
1929 -- Every new Object which has been loaded into the
1930 -- interactive context and which answers these
1931 -- decomposition criteria is automatically activated
1932 -- according to these modes.
1933 -- Warning
1934 -- If you have opened a local context by loading an
1935 -- object with the default options
1936 -- (<AllowShapeDecomposition >= Standard_True), all
1937 -- objects of the "Shape" type are also activated with
1938 -- the same modes. You can act on the state of these
1939 -- "Standard" objects by using SetShapeDecomposition(Status).
1940
1941
1942     DeactivateStandardMode (me:mutable; aStandardActivation : ShapeEnum from TopAbs);
1943 ---Purpose:
1944 -- Provides an alternative to the Display methods when
1945 -- deactivating specific selection modes. This has the
1946 -- effect of deactivating the corresponding selection
1947 -- mode aStandardActivation for all objects in Local
1948 -- Context which accept decomposition into sub-shapes.
1949     
1950     ActivatedStandardModes(me) returns ListOfInteger from TColStd;
1951         ---Purpose:
1952         -- Returns the list of activated standard selection modes
1953         -- available in a local context.
1954         ---C++: return const&
1955
1956     Filters(me) returns ListOfFilter from SelectMgr;
1957         ---Purpose:
1958         -- Returns the list of filters active in a local context.
1959         ---C++: return const&
1960
1961
1962             ---Category: INFORMATION METHODS - GET FIELDS
1963
1964     DefaultDrawer(me) returns any Drawer from Prs3d;
1965         ---Purpose:
1966         -- Returns the default attribute manager.
1967         -- This contains all the color and line attributes which
1968         -- can be used by interactive objects which do not have
1969         -- their own attributes.
1970         ---C++: inline
1971         ---C++: return const &
1972     
1973     CurrentViewer(me) returns any Viewer from V3d;
1974         ---C++: return const &
1975         ---C++: inline
1976         ---Purpose: Returns the current viewer.
1977
1978     DisplayedObjects(me;
1979                      aListOfIO       : in out ListOfInteractive from AIS;
1980                      OnlyFromNeutral : Boolean from Standard = Standard_False);
1981     ---Purpose: Returns the list of displayed objects of a particular
1982     -- Type WhichKind and Signature WhichSignature. By
1983     -- Default, WhichSignature equals -1. This means that
1984     -- there is a check on type only.
1985
1986     DisplayedObjects(me;
1987                      WhichKind :KindOfInteractive from AIS; 
1988                      WhichSignature :Integer from Standard;
1989                      aListOfIO : in out ListOfInteractive from AIS;
1990                      OnlyFromNeutral : Boolean from Standard = Standard_False);
1991     ---Purpose: gives the list of displayed objects of a particular
1992     --          Type and signature.
1993     --          by Default, <WhichSignature> = -1 means 
1994     --          control only on <WhichKind>.
1995
1996     Collector(me) returns any Viewer from V3d;
1997     ---C++: return const &
1998     ---C++: inline
1999     
2000     ObjectsInCollector (me;aListOfIO : in out ListOfInteractive from AIS);
2001     ---Purpose:
2002     -- Returns the list aListOfIO of erased objects of a
2003     -- particular Type WhichKind and Signature WhichSignature.
2004     -- By Default, WhichSignature equals 1. This means
2005     -- that there is a check on type only.
2006
2007     ObjectsInCollector (me;
2008                         WhichKind :KindOfInteractive from AIS; 
2009                         WhichSignature :Integer from Standard;
2010                         aListOfIO : in out ListOfInteractive from AIS);
2011     ---Purpose: gives the list of erased objects of a particular
2012     --          Type and signature
2013     --          by Default, <WhichSignature> = -1 means 
2014     --          control only on <WhichKind>.
2015
2016     
2017     ErasedObjects (me;theListOfIO : in out ListOfInteractive from AIS);
2018     ---Purpose:
2019     -- Returns the list theListOfIO of erased objects (but not placed into collecter)
2020     -- particular Type WhichKind and Signature WhichSignature.
2021     -- By Default, WhichSignature equals 1. This means
2022     -- that there is a check on type only.
2023
2024     ErasedObjects (me;
2025                         WhichKind :KindOfInteractive from AIS; 
2026                         WhichSignature :Integer from Standard;
2027                         theListOfIO : in out ListOfInteractive from AIS);
2028     ---Purpose: gives the list of erased objects (but not placed into collecter)
2029     --          Type and signature
2030     --          by Default, <WhichSignature> = -1 means 
2031     --          control only on <WhichKind>.
2032
2033     ObjectsByDisplayStatus (me;theStatus : DisplayStatus from AIS;
2034                                theListOfIO : in out ListOfInteractive from AIS);
2035     ---Purpose:
2036     -- Returns the list theListOfIO of objects with indicated display status
2037     -- particular Type WhichKind and Signature WhichSignature.
2038     -- By Default, WhichSignature equals 1. This means
2039     -- that there is a check on type only.
2040
2041     ObjectsByDisplayStatus (me;
2042                         WhichKind :KindOfInteractive from AIS; 
2043                         WhichSignature :Integer from Standard;
2044                         theStatus : DisplayStatus from AIS;
2045                         theListOfIO : in out ListOfInteractive from AIS);
2046     ---Purpose: gives the list of objects with indicated display status
2047     --          Type and signature
2048     --          by Default, <WhichSignature> = -1 means 
2049     --          control only on <WhichKind>.
2050
2051     ObjectsInside(me;
2052                  aListOfIO      : in out ListOfInteractive from AIS;
2053                  WhichKind      : KindOfInteractive from AIS = AIS_KOI_None; 
2054                  WhichSignature : Integer from Standard = -1);
2055     ---Purpose: fills <aListOfIO> with objects of a particular
2056     --          Type and Signature with no consideration of display status.
2057     --          by Default, <WhichSignature> = -1 means 
2058     --          control only on <WhichKind>.
2059     --          if <WhichKind> = AIS_KOI_None and <WhichSignature> = -1,
2060     --          all the objects are put into the list.
2061
2062
2063     HasOpenedContext(me) returns Boolean from Standard;
2064     ---Purpose: Returns true if there is an open context.
2065     ---C++: inline
2066
2067     CurrentName(me)  returns AsciiString from TCollection;
2068         ---Purpose:
2069         -- Returns the name of the current selected entity in Neutral Point.
2070         -- Objects selected when there is no open local context
2071         -- are called current objects; those selected in open
2072         -- local context, selected objects.
2073         ---C++: inline
2074         ---C++: return const&
2075
2076     SelectionName(me) returns AsciiString from TCollection;
2077         ---Purpose:
2078         -- Returns the name of the current selected entity in
2079         -- open local context.
2080         -- Objects selected when there is no open local context
2081         -- are called current objects; those selected in open
2082         -- local context, selected objects.
2083         ---C++: return const&
2084
2085     DomainOfMainViewer(me) returns CString from Standard;
2086     ---Purpose: Returns the domain name of the main viewer.
2087     DomainOfCollector(me) returns CString from Standard;
2088     ---Purpose: Returns the domain name of the Collector viewer.
2089     
2090             ---Category: Internal
2091
2092         ---Category: Internal
2093
2094     LocalContext(me) returns LocalContext from AIS;
2095     ---Level: Internal 
2096     ---Purpose:
2097     -- This method is only intended for advanced operation, particularly with
2098     -- the aim to improve performance when many objects have to be selected
2099     -- together. Otherwise, you should use other (non-internal) methods of
2100     -- class AIS_InteractiveContext without trying to obtain an instance of
2101     -- AIS_LocalContext.
2102     ---C++: inline
2103
2104     SelectionManager(me) returns any SelectionManager from SelectMgr;
2105     ---C++: inline
2106     ---C++: return const &
2107
2108     MainPrsMgr     (me) returns any PresentationManager3d from PrsMgr;
2109     ---C++: inline
2110     ---C++: return const &
2111     CollectorPrsMgr(me) returns any PresentationManager3d from PrsMgr;
2112     ---C++: inline
2113     ---C++: return const &
2114
2115
2116     MainSelector(me) returns any ViewerSelector3d from StdSelect;
2117     ---C++: inline
2118     ---C++: return const &
2119     LocalSelector(me) returns any ViewerSelector3d from StdSelect;
2120
2121
2122     CollectorSelector(me)  returns any ViewerSelector3d from StdSelect;
2123     ---C++: inline
2124     ---C++: return const &   
2125
2126
2127
2128     PurgeDisplay(me:mutable;CollectorToo:Boolean from Standard = Standard_False) 
2129     returns Integer from Standard;
2130     ---Level: Internal 
2131     ---Purpose: Clears all the structures which don't
2132     --          belong to objects displayed at neutral point
2133     --          only effective when no Local Context is opened...
2134     --          returns the number of removed  structures from the viewers.
2135
2136
2137     HighestIndex(me)  returns  Integer  from  Standard;
2138
2139     DisplayActiveAreas(me:mutable;aView:View from V3d) ;
2140
2141     ClearActiveAreas (me   :mutable;
2142                 aView: View from V3d) is static;
2143     ---Level: Internal 
2144     
2145     DisplayActiveSensitive(me:mutable;aView : View from V3d) is static; 
2146     
2147     ClearActiveSensitive(me:mutable;aView:View from V3d) is static;
2148
2149
2150
2151     DisplayActiveSensitive(me:mutable;
2152                            anObject: InteractiveObject from AIS;
2153                            aView   : View from V3d) is static;
2154     DisplayActiveAreas(me:mutable;
2155                            anObject: InteractiveObject from AIS;
2156                            aView   : View from V3d) is static;
2157
2158     GetDefModes(me;
2159                 anIobj              : InteractiveObject from AIS;
2160                 Dmode,HiMod,SelMode : in out  Integer  from  Standard) is static private;
2161
2162
2163     EraseGlobal(me             : mutable;
2164                 anObj          : InteractiveObject from AIS;
2165                 updateviewer   : Boolean from Standard = Standard_True;
2166                 PutInCollector : Boolean from Standard = Standard_False) is static private;
2167                 
2168     ClearGlobal(me             : mutable;
2169                 anObj          : InteractiveObject from AIS;
2170                 updateviewer   : Boolean from Standard = Standard_True) is static private;
2171                 
2172     ClearGlobalPrs(me             : mutable;
2173                    anObj          : InteractiveObject from AIS;
2174                    aMode          : Integer from Standard;
2175                    updateviewer   : Boolean from Standard = Standard_True) is static private;
2176
2177
2178     ---Category: Private Methods
2179
2180     IsInLocal(me;
2181               anObject   : InteractiveObject from AIS;
2182               TheIndex   : in out Integer from Standard)
2183     returns Boolean from Standard;
2184     ---Purpose: returns if possible,
2185     --          the first local context where the object is seen
2186
2187
2188     InitAttributes(me:mutable) is static private;
2189
2190
2191     PurgeViewer(me:mutable;Vwr:Viewer from V3d) 
2192     returns Integer from Standard is static private;
2193
2194 fields
2195
2196     myObjects    : DataMapOfIOStatus from AIS;
2197
2198     -- the viewers, prsmgr, selectors
2199     mgrSelector  : SelectionManager from SelectMgr;
2200
2201     myMainPM     : PresentationManager3d from PrsMgr;
2202     myMainVwr    : Viewer from V3d;
2203     myMainSel    : ViewerSelector3d from StdSelect;
2204
2205     myCollectorPM  : PresentationManager3d from PrsMgr;  
2206     myCollectorVwr : Viewer from V3d;
2207     myCollectorSel : ViewerSelector3d from StdSelect;
2208
2209     myIsCollClosed : Boolean from Standard;
2210
2211     -- the selection and current objects.
2212
2213     mySelectionName : AsciiString from TCollection;
2214     myCurrentName   : AsciiString from TCollection;
2215
2216     myLastPicked    : InteractiveObject from AIS;    
2217     myLastinMain    : InteractiveObject from AIS;
2218     myLastinColl    : InteractiveObject from AIS;
2219     
2220     
2221     myWasLastMain       : Boolean from Standard;
2222     myCurrentTouched    : Boolean from Standard;
2223     mySelectedTouched   : Boolean from Standard;
2224     myToHilightSelected : Boolean from Standard;
2225
2226     -- the neutral point filter...
2227
2228     myFilters : OrFilter from SelectMgr;
2229
2230     -- the attributes of session...
2231
2232     myDefaultDrawer     : Drawer from Prs3d;
2233     myDefaultColor      : NameOfColor from Quantity; -- for shading....
2234     myHilightColor      : NameOfColor from Quantity;
2235     mySelectionColor    : NameOfColor from Quantity;
2236     myPreselectionColor : NameOfColor from Quantity;
2237     mySubIntensity      : NameOfColor from Quantity;
2238     myDisplayMode       : Integer     from Standard;
2239
2240     -- The Local Context...
2241
2242     myLocalContexts      : DataMapOfILC from AIS;
2243     myCurLocalIndex      : Integer      from  Standard; 
2244     mylastmoveview       : View         from V3d;
2245
2246      -- the detected objects.
2247     myAISDetectedSeq : SequenceOfInteractive from AIS;
2248     myAISCurDetected : Integer from Standard;
2249     -- This variables is used by following functions:
2250     -- InitDetected(), MoreDetected(), NextDetected(), DetectedCurrentShape(), DetectedCurrentObject().
2251     myZDetectionFlag:   Boolean from Standard;
2252     -- This variables is used by SetZDetection() and ZDetection() methods
2253
2254     -- abd:
2255     myIsAutoActivateSelMode : Boolean from Standard;
2256     
2257 friends
2258     class LocalContext from AIS
2259     
2260 end InteractiveContext;