0022885: Bugfix: else clause applies to the wrong if statement because of missing...
[occt.git] / src / AIS2D / AIS2D_InteractiveContext.cdl
1 -- File     : AIS2D_InteractiveContext.cdl
2 -- Created  : February  2000
3 -- Author   : Tanya COOL
4 ---Copyright: Matra Datavision 2000
5
6 -- Modified:  EAV:  07-09-01 :  NbSelected(),  InitSelected(),   
7 --                              MoreSelected(),  NextSelected()
8
9 --            SAV:  15/11/01    MoveCircleTo(). detection by circle. SetDetectionMode().
10 --                              Detect() - internal
11
12 class InteractiveContext from AIS2D inherits TShared from MMgt
13
14  ---Purpose: The InteractiveContext class allows you to manage 
15  --          graphic behavior and selection of Interactive Objects 
16  --          in one or more viewers. 
17
18 uses
19  
20   TypeOfLine            from Aspect,
21   WidthOfLine           from Aspect,
22   MarkerStyle           from Aspect,
23   TypeOfMarker          from Aspect,
24   FontStyle             from Aspect,
25   GenericColorMap       from Aspect, 
26   TypeMap               from Aspect,
27   WidthMap              from Aspect,
28   MarkMap               from Aspect,
29   FontMap               from Aspect,
30   GridType              from Aspect,
31   GridDrawMode          from Aspect,
32   CardinalPoints        from Aspect,
33   Color                 from Quantity,
34   PlaneAngle            from Quantity,
35   Length                from Quantity,
36   NameOfColor           from Quantity,
37   ExtendedString        from TCollection,
38   Primitive             from Graphic2d,
39   PickMode              from Graphic2d,
40   TransientManager      from Graphic2d,
41   DisplayList           from Graphic2d,
42   Viewer                from V2d,
43   View                  from V2d,
44   Drawer                from Prs2d,
45   InteractiveObject     from AIS2D,
46   KindOfIO              from AIS2D,
47   DataMapOfIOStatus     from AIS2D,
48   DataMapOfLC           from AIS2D,
49   StatusOfDetection     from AIS2D,
50   DisplayStatus         from AIS2D,
51   StatusOfPick          from AIS2D,
52   TypeOfDetection       from AIS2D,
53   PToListOfInt          from AIS2D,
54   ListOfIO              from AIS2D,
55   HSequenceOfIO         from AIS2D
56   
57 is 
58
59   Create( MainViewer: Viewer from V2d )
60     returns mutable InteractiveContext from  AIS2D;
61   ---Purpose: Initiates <MainViewer>
62
63   Create( MainViewer, aCollector: Viewer from V2d)
64     returns mutable InteractiveContext from  AIS2D;
65   ---Purpose: Initiates the principal viewer and Collector(trash) viewer together
66
67   -- *************************************************************
68   ---Category: Editing general Display Services 
69   -- *************************************************************
70   
71   Display( me        : mutable;
72            anIObj    : InteractiveObject from AIS2D;
73            UpdateVwr : Boolean from Standard = Standard_True);
74   ---Level: Public
75   ---Purpose: Display when no local context is opened.
76   --          if <anIObj> has no proper display mode, the defaut
77   --          display mode of the session is used
78   --          Same for the selection Mode (by default =0)
79
80   Display( me                 : mutable;
81            anIObj             : InteractiveObject from AIS2D;
82            aDispMode          : Integer from Standard ;
83            aSelectMode        : Integer from Standard;
84            UpdateVwr          : Boolean from Standard = Standard_True;
85            AllowDecomp        : Boolean from Standard = Standard_True);
86   ---Level: Public
87   ---Purpose: Use only if a local context is opened. Displays the
88   --          <aDispMode> the presentation of interactive object,
89   --          activates the selection mode <aSelectMode> if
90   --          <UpdateVwr> =  Standard_False,  the  object is
91   --          displayed but no viewer will be updated; CONVENTION :
92   --          <aSelectMode> = -1 means no activation for <anIObj>
93   --          : it will be displayed but not  selectable.  (Option
94   --          only available for local context...)
95   --          <AllowDecomp>  = true  means  that <anIObj>  is
96   --          able to have subshapes detected by selection mechanisms.
97   --          2 conditions: <anIObj> must be able to give a shape
98   --          selection modes fit the AIS2D_Shape
99   --          selection modes ( 1->vertex, 2->edges, 3->wires...)
100
101   Load( me: mutable;
102         anIObj: InteractiveObject from AIS2D;
103         SelMode : Integer from Standard = -1;
104         AllowDecomp   : Boolean from Standard = Standard_False );
105   ---Purpose: Available when opened local contexts only;
106   --          option to load in the selector objects which will
107   --          be selectable but not displayed. Nevertheless, they
108   --          will be hilighted when detected by the selector.
109   --          ex : be able to select center of a line without
110   --               displaying all centers before selection process
111
112   Erase( me             : mutable; 
113          anIObj         : InteractiveObject from AIS2D;
114              UpdateVwr      : Boolean from Standard = Standard_True;
115          PutInCollector : Boolean from Standard = Standard_True );
116   ---Level: Public
117   ---Purpose: Erases presentations in current local context, 
118   --          or failing that, in other local contexts which allow erasing.
119   --          If <PutInCollector> is false, the object is erased but 
120   --          not put in the Collector.
121
122   EraseAll( me             : mutable;
123             PutInCollector : Boolean from Standard = Standard_True;
124             updateVwr      : Boolean from Standard = Standard_True );
125   ---Purpose: Every erased object goes into the Collector viewer
126
127   DisplayAll( me                : mutable;
128               OnlyFromCollector : Boolean from Standard = Standard_True;
129               updateVwr         : Boolean from Standard = Standard_True);
130   ---Purpose: Displays all erased objects, in other words, 
131   --          all objects in the Collector viewer.
132
133   EraseSelected( me             : mutable;
134                  PutInCollector : Boolean from Standard = Standard_True;
135                  updateVwr      : Boolean from Standard = Standard_True );
136   ---Purpose: Erases selected objects if a local context is open. 
137   --          Erases current objects if there is no active local context.
138   --          If a local context is open and if <updateVwr> equals 
139   --          Standard_False, the presentation of the Interactive Object 
140   --          activates the selection mode; the object is displayed but 
141   --          no viewer will be updated.
142
143   DisplaySelected( me        : mutable;
144                    updateVwr : Boolean from Standard = Standard_True );
145   ---Purpose: Displays or erases selected objects if a local
146  --  context is open. If no active local context is found,
147  --  only current objects can be displayed or erased.
148  
149   KeepTemporary( me          :  mutable; 
150                  anIObj      :  InteractiveObject from AIS2D; 
151                  InWhichLocal:  Integer  from  Standard  =  -1)
152     returns  Boolean  from  Standard;
153   ---Purpose: Changes the status of a temporary object it will be --
154   --          kept at the  neutral point, i.e.   put in the list  of
155   --           displayed  objects,  with  its  temporary  attributes
156   --          (displaymode,selection  mode) returns true  if done --
157   --          inWhichLocal means that gives   the local context   in
158   --          which <anIObj> is displayed.  By default, -1 means the
159   --          last opened one
160   
161   Redisplay( me        : mutable;
162              anIObj    : InteractiveObject from AIS2D;
163                  updateVwr : Boolean from Standard = Standard_True;
164              allModes : Boolean from Standard = Standard_False);
165   ---Purpose: Forces Recompute of the seen presentations of the object;
166   --          if <allModes>= True -> recomputes all the
167   --          presentations .
168
169   --***********************************************************************
170   ---Category:     Querying and Editing Selection Process
171   --***********************************************************************    
172
173   IsCurrent( me; anIObj: InteractiveObject from AIS2D ) 
174            returns Boolean from Standard;
175   ---Purpose: Finds the current selected entity <anIObj> in Neutral Point.
176
177   IsSelected( me; anIObj: InteractiveObject from AIS2D ) 
178           returns Boolean from Standard;
179   ---Purpose: Confirms selection. Returns true if <anIObj> is selected in the interactive context
180    
181   Highlight( me      : mutable;
182             anIObj   : InteractiveObject from AIS2D;
183                 updateVwr: Boolean from Standard = Standard_True);
184   ---Purpose: Updates the display in the viewer to take dynamic detection 
185   --          into account. 
186   --          If a local context is open and if <updateVwr> equals Standard_False, 
187   --          the presentation of the Interactive Object activates the selection 
188   --          mode; the object is displayed but no viewer will be updated.
189
190   HighlightWithColor( me: mutable;
191                       anIObj:InteractiveObject from AIS2D;
192                           aCol: NameOfColor from Quantity;
193                           updateVwr: Boolean from Standard = Standard_True );
194   ---Purpose: Changes the color of the object in view <anIObj>. 
195   --          It paints this object the color passed as the argument <aCol>
196   --          If a local context is open and if <updateVwr> equals Standard_False, 
197   --          the presentation of the Interactive Object activates the selection 
198   --          mode; the object is displayed but no viewer will be updated.
199
200   Unhighlight( me        : mutable;
201                anIObj    : InteractiveObject from AIS2D;
202                    updateVwr : Boolean from Standard = Standard_True );
203   ---Purpose: Removes hilighting from the entity <anIObj>. Updates the viewer.
204   --          If a local context is open and if <updateVwr> equals Standard_False, 
205   --          the presentation of the Interactive Object activates the selection 
206   --          mode; the object is displayed but no viewer will be updated.
207
208   
209   --****************************************************************
210   ---Category:    Graphic Detection and Selection
211   --****************************************************************
212
213   SetPrecision( me: mutable; aPrec: Integer from Standard );
214   ---C++: inline
215   ---Level: Public 
216   ---Purpose: Sets the precision of detection
217   
218   DetectPrecision( me ) returns Integer from Standard;
219   ---C++: inline
220   ---Level: Public 
221   ---Purpose: Returns the precision of detection
222   
223   Place( me          : mutable; 
224          XPix, YPix  : Integer from Standard; 
225                  aView       : View from V2d; 
226                  anIO        : InteractiveObject from AIS2D;
227                  isTemporary : Boolean from Standard = Standard_False );
228   ---Level: Public
229   ---Purpose: Places object <anIO> to the pixel position (XPix, YPix) 
230   --          in the view <aView> is using TransientManager.
231   --          It's possible to use without preliminary application of  Display method.
232
233   Drag( me         : mutable; 
234         XPix, YPix : Integer from Standard; 
235                 aView      : View from V2d;
236                 isTemporary: Boolean from Standard = Standard_True );
237   ---Level: Public
238   ---Purpose: Places selected objects  to the pixel position (XPix, YPix) 
239   --          in the view <aView>. If <isTemporary> is True,  is used TransientManager.
240   
241   MoveTo( me: mutable; 
242           XPix, YPix: Integer from Standard; 
243                   aView: View from V2d ) returns StatusOfDetection from AIS2D;
244   ---Level: Public
245   ---Purpose: Relays mouse position in pixels XPix and YPix to the 
246   --          interactive context selectors. This is done by the view <aView>
247   --          passing this position to the main viewer and updating it.
248   --          Functions in both Neutral Point and local contexts.
249    
250   ---SAV
251   MoveCircleTo( me: mutable; XPix, YPix, Radius : Integer from Standard; 
252                              aView: View from V2d ) returns StatusOfDetection from AIS2D;
253   ---Level: Public
254   ---Purpose: Relays mouse position in circle <XPix, YPix> and <Radius> to the 
255   --          interactive context selectors. This is done by the view <aView>
256   --          passing this position to the main viewer and updating it.
257   --          Functions in both Neutral Point and local contexts.
258    
259   MoveTo( me: mutable; 
260           Xmin, Ymin, Xmax, Ymax: Integer from Standard; 
261                   aView: View from V2d ) returns StatusOfDetection from AIS2D;
262   ---Level: Public
263   ---Purpose: Relays mouse position in rectangle Xmin, Ymin, Xmax, Ymax to the 
264   --          interactive context selectors. This is done by the view <aView>
265   --          passing this position to the main viewer and updating it.
266   --          Functions in both Neutral Point and local contexts.
267   
268
269   ---SAV
270   Detect( me: mutable; dList : DisplayList from Graphic2d; aView : View from V2d )
271   returns StatusOfDetection from AIS2D is private;
272   
273   Select( me        : mutable;
274           UpdateVwr : Boolean from Standard = Standard_True) 
275       returns StatusOfPick from AIS2D;
276   ---Level: Public
277   ---Purpose: Stores  and hilights the previous detected; Unhilights
278   --          the previous picked.
279
280   ShiftSelect( me: mutable;     UpdateVwr: Boolean from Standard = Standard_True )
281     returns StatusOfPick from AIS2D;
282   ---Level: Public
283   ---Purpose: adds the last detected to the list of previous picked.
284   --          if the last detected was already declared as picked,
285   --          removes it from the Picked List.
286     
287   ShiftSelect( me: mutable; XPMin, YPMin, XPMax, YPMax: Integer from Standard; 
288                aView: View from V2d; UpdateVwr : Boolean from Standard = Standard_True) 
289              returns StatusOfPick from AIS2D;
290   ---Level: Public
291   ---Purpose: rectangle  of selection  ; adds new detected entities into the
292   --          picked list, removes the detected entities that were already stored...
293
294
295   SetHighlightColor( me: mutable; aCol: NameOfColor from Quantity );
296   ---Purpose: Allows to set the color used to show highlighted entities, 
297   --          that is, entities picked out by the mouse.
298
299   SetSelectionColor( me: mutable; aCol: NameOfColor from Quantity );
300   ---Purpose: Sets the color used to show selected entities
301
302   SetSubIntensityColor( me: mutable; aCol: NameOfColor from Quantity );
303   ---Purpose: Allows you to set the color used to show that an object 
304   --          is not currently selected
305
306   DisplayMode( me ) returns Integer from Standard; 
307   ---C++: inline
308   ---Purpose: Returns the display mode setting
309
310   HighlightColor( me ) returns NameOfColor from Quantity;
311   ---C++: inline
312   ---Level: Public
313   ---Purpose: Returns the name of the color used to show highlighted entities, 
314   --          that is, entities picked out by the mouse
315
316   SelectionColor( me ) returns NameOfColor from Quantity;
317   ---C++: inline
318   ---Level: Public
319   ---Purpose: Returns the name of the color used to show selected entities.
320
321   SubIntensityColor( me ) returns NameOfColor from Quantity;
322   ---C++: inline
323   ---Level: Public
324   ---Purpose: Returns the name of the color used to show 
325   --          that an object is not currently selected.
326
327   SubIntensityOn( me        : mutable;
328                   anIObj    : InteractiveObject from AIS2D;
329                           UpdateVwr : Boolean from Standard = Standard_True);
330   ---Level: Public
331   ---Purpose: Highlights, and removes highlights from, the displayed object 
332   --          <anIObj> which is displayed at Neutral Point with subintensity 
333   --          color; available only for active local context. 
334   --          There is no effect if there is no local context.
335
336   SubIntensityOff( me        : mutable;
337                    anIObj    : InteractiveObject from AIS2D;
338                            UpdateVwr : Boolean from Standard = Standard_True);
339   ---Level: Public
340   ---Purpose: Removes the subintensity option for the entity <anIObj>.
341
342
343   -- *************************************************************   
344   --          Management of the Trash Bin Viewer
345   -- *************************************************************
346
347   IsCollectorClosed( me ) returns Boolean from Standard; 
348   ---C++: inline
349   ---Level: Internal
350   ---Purpose: 
351      
352   CloseCollector( me: mutable ); 
353   ---C++: inline
354   ---Level: Internal
355   ---Purpose: Allows to close Collector
356
357   OpenCollector( me: mutable );
358   ---Level: Internal
359   ---Purpose: Allows to open Collector
360
361   --************************************************************************
362   ---Category:   Specific Local Context Action
363   --************************************************************************
364  
365   OpenLocalContext( me              : mutable;
366                     UseDispObj      : Boolean from Standard = Standard_True;
367                     AllowDecomposit : Boolean from Standard = Standard_True;
368                             AcceptEraseOfObj: Boolean from Standard = Standard_False )
369     returns Integer from Standard;
370   ---Level: Public
371   ---Purpose: Opens a local context of display and selection
372   --          returns the index of new opened local context.
373   --          Must be stored and used to close the local context.
374   
375   CloseLocalContext( me        : mutable;
376                      ind       : Integer from Standard = -1;
377                      updateVwr : Boolean from Standard = Standard_True );
378   ---Level: Public
379   ---Purpose: close the current opened local context.
380   --          Use <ind> to be sure to close the local context you Opened !
381   --          if <ind> == -1 the current local context is closed
382   --          WITHOUT VERIFICATION.
383   --          if <ind> is greater than the current opened local context,
384   --          nothing is done.
385
386   IndexOfCurrentLocal( me ) returns Integer from Standard;
387   ---Level: Public
388   ---Purpose: returns -1 if no opened local context.
389
390   CloseAllContext( me: mutable; updateVwr: Boolean from Standard = Standard_True);
391   ---Level: Public
392   ---Purpose: Allows to close all local contexts at one go and return to 
393   --          Neutral Point.
394
395   --****************************************************************
396   ---Category: non interactive actions about Selection
397   --           2 categories are distinct:
398   --           - Current Objects 
399   --           - Selected Objects
400   --           a Current object is the object picked
401   --           at neutral Point.
402   --           The Selected objects are objects picked
403   --           when a local context is opened
404
405
406   SetCurrentObject( me       : mutable;
407                     anIObj   : InteractiveObject from AIS2D;
408                     UpdateVwr: Boolean from Standard = Standard_True );
409   ---Level: Public
410   ---Purpose: Updates the view of the current object in open context.
411   --          Objects selected when there is no open local context 
412   --          are called current objects; those selected in open local context, 
413   --          selected objects.
414    
415   AddOrRemoveCurObject( me        : mutable;
416                         anIObj    : InteractiveObject from AIS2D;
417                         UpdateVwr : Boolean from Standard = Standard_True);
418   ---Level: Public
419   ---Purpose: Allows to add a current object to the list of current objects 
420   --          or remove it from that list.
421   --          Objects selected when there is no open local context are called 
422   --          current objects; those selected in open local context, 
423   --          selected objects.
424
425                              
426   UpdateCurrent( me: mutable );
427   ---Level: Public
428   ---Purpose: updates the list of current objects
429   --          i.e. hilights new current objects,
430   --          unhighlights old current objects
431   --          
432
433   SetOkCurrent( me: mutable );
434   ---Level: Internal
435   ---Purpose: 
436  
437   --FirstCurrentObject( me: mutable ) returns InteractiveObject from AIS2D;
438   ---Level: Public
439   ---Purpose: Returns the first current object in the list of current objects.
440
441   HighlightCurrent( me: mutable; 
442                       UpdateVwr: Boolean from Standard = Standard_True);
443   ---Level: Public
444   ---Purpose: Highlights current objects.
445
446   UnhighlightCurrent( me: mutable; 
447                        UpdateVwr: Boolean from Standard = Standard_True);
448   ---Level: Public
449   ---Purpose: Unhighlights current objects.
450    
451   ClearCurrent(me: mutable; UpdateVwr: Boolean from Standard = Standard_True);
452   ---Level: Public
453   ---Purpose: Empties previous current objects in order to get the current 
454   --          objects detected by the selector using UpdateCurrent.
455
456   SetSelected( me: mutable; anIObj: InteractiveObject from AIS2D; 
457                UpdateVwr: Boolean from Standard = Standard_True );
458   ---Level: Public
459   ---Purpose: Puts the selected <anIObj> in the current objects list.
460
461   SetSelectedCurrent( me: mutable );
462   ---Level: Public
463   ---Purpose: Puts the selected list in the current objects list.
464
465   UpdateSelected( me: mutable; 
466                   UpdateVwr: Boolean from Standard=Standard_True );
467   ---Level: Public
468   ---Purpose: Updates the list of selected objects, i.e. hilights 
469   --          new selected objects, removes hilighting from former 
470   --          selected objects.
471
472   AddOrRemoveSelected( me: mutable;
473                            anIObj   : InteractiveObject from AIS2D; 
474                            UpdateVwr: Boolean from Standard = Standard_True);
475   ---Level: Public
476   ---Purpose: Allows you to add a selected object <anIObj> to the list of selected 
477   --          objects or remove it from that list. 
478   
479   HighlightSelected( me: mutable; 
480                     UpdateVwr: Boolean from Standard = Standard_True);
481   ---Level: Public
482   ---Purpose: Highlights selected objects.
483
484   UnhighlightSelected( me: mutable; 
485                        UpdateVwr: Boolean from Standard = Standard_True );
486   ---Level: Public
487   ---Purpose: UnHighlights selected objects.
488
489   ClearSelected( me: mutable; 
490                  UpdateVwr: Boolean from Standard = Standard_True);
491   ---Level: Public
492   ---Purpose: Empties previous selected objects in order to get 
493   --          the selected objects detected by the selector using UpdateSelected.
494
495   NbSelected(  me  )  returns  Integer  from  Standard; 
496   ---Level:  Public 
497   ---Purpose:  Returns  number of objects selected  in   
498   ---          local context ( if opened ) or in neutral context
499  
500   InitSelected(  me:  mutable  );   
501   ---Level: Public 
502   ---Purpose:  Iteration  
503    
504   MoreSelected(  me  )  returns  Boolean  from  Standard;   
505   ---Level: Public 
506   ---Purpose:  Iteration  
507             
508   NextSelected(  me:  mutable  );  
509   ---Level: Public 
510   ---Purpose:  Iteration
511
512   SelectedObject(  me  )  returns TShared  from  MMgt;  
513   ---Level: Public 
514   ---Purpose:  Returns  current  selected  object  (  see  InitSelected()  ..  ) 
515   --           The  object type depends  on  highlight  mode   
516   --           (  OBJECT,  PRIMITIVE  etc  )   
517
518
519  --*****************************************************************
520   --            Querying Graphic Attributes
521   --*****************************************************************
522
523   DisplayStatus( me; anIObj: InteractiveObject from AIS2D )
524     returns DisplayStatus from AIS2D;
525   ---Level: Public
526   ---Purpose: Returns the display status of the entity <anIObj>.
527
528   DisplayedModes( me; anIObj: InteractiveObject from AIS2D )
529     returns PToListOfInt from AIS2D;
530   ---Level: Public
531   ---Purpose: Returns the list of active display modes for the entity <anIObj>
532
533   IsDisplayed( me; anIObj:InteractiveObject from AIS2D )
534     returns Boolean from Standard;
535   ---Level: Public
536   ---Purpose: Returns true if <anIObj> is displayed in the interactive context
537
538   IsDisplayed( me;
539                anIObj: InteractiveObject from AIS2D;
540                aMode : Integer from Standard ) 
541     returns Boolean  from  Standard;
542  
543   ---Level: Public
544   ---Purpose: Returns true if <anIObj> is displayed in the interactive context with <aMode> display mode
545
546   IsHighlighted( me; anIObj: InteractiveObject from AIS2D ) 
547     returns Boolean from Standard;
548   ---Level: Public
549   ---Purpose: Returns true if the Interactive Object <anIObj>
550   --          is highlighted in the interactive context.
551
552   IsHighlighted( me;
553                  anIObj    : InteractiveObject from AIS2D;
554                          WithColor : out Boolean from Standard;
555                  theHiCol  : out NameOfColor from Quantity )
556     returns Boolean from Standard;
557   ---Level: Public
558   ---Purpose: if <anIObj> is highlighted with a specific color
559   --          <WithColor> will be returned TRUE
560   --          <theHiCol> gives the name of the hilightcolor
561
562   IsInCollector( me; anIObj: InteractiveObject from AIS2D ) 
563     returns Boolean from Standard;
564   ---Level: Public
565   ---Purpose: Returns true if the entity <anIObj> is in the Collector viewer.
566
567   Status( me;
568           anIObj : InteractiveObject from AIS2D;
569           aStatus: in out ExtendedString from TCollection);
570   ---Level: Public
571   ---Purpose: Modified the status of the entity <anIObj>
572
573   UpdateCurrentViewer( me: mutable );
574   ---Level: Public
575   ---Purpose: Updates the current viewer, the viewer in Neutral Point.
576
577   UpdateCollector( me: mutable );
578   ---Level: Public
579   ---Purpose: Updates the Collector viewer
580
581   --********************************************************************************
582   ---Category:            Information methods - Get Fields
583   --********************************************************************************
584   
585   CurrentViewer( me ) returns any Viewer from V2d;
586   ---C++: inline
587   ---Level: Public
588   ---Purpose: Returns the current viewer.
589
590   HasOpenedContext( me ) returns Boolean from Standard; 
591   ---C++: inline
592   ---Level: Public
593   ---Purpose: Returns true if there is an open context.
594
595   DisplayedObjects( me;
596                     aListOfIO       : in out ListOfIO from AIS2D;
597                     OnlyFromNeutral : Boolean from Standard = Standard_False );
598   ---Level: Public
599   ---Purpose: gives the list of displayed objects in the main viewer.
600
601   --********************************************************************************
602
603   GetDefModes( me;
604                anIObj  : InteractiveObject from AIS2D;
605                Dmode   : out Integer from Standard;
606                            HiMod   : out TypeOfDetection from AIS2D; 
607                            SelMode : out Integer from Standard ) is private;
608   ---Level: Public
609   ---Purpose: Returns display, highlight and selection modes of the <anIObj>
610                            
611   EraseGlobal( me             : mutable;
612                anIObj         : InteractiveObject from AIS2D;
613                        UpdateVwr      : Boolean from Standard = Standard_True;
614                PutInCollector : Boolean from Standard = Standard_True) is private;
615   ---Level: Internal
616   ---Purpose: 
617
618   SetPickMode( me: mutable; aMode: PickMode from Graphic2d );
619    ---C++: inline
620    ---Level: Public
621    ---Purpose: Allows to provide settings for pick mode.
622
623    GetPickMode( me) returns PickMode from Graphic2d;
624    ---C++: inline
625    ---Level: Public
626    ---Purpose: Returns the pick mode
627
628
629   --**********************************************************************************
630
631   HighestIndex( me ) returns Integer from Standard;
632   ---Level: Internal
633   ---Purpose: 
634
635   --**********************************************************************************
636   -- Category: initialization of the attributes
637   --**********************************************************************************
638    
639   InitializeColor( me: mutable; aColor: Color from Quantity ) returns Integer from Standard;
640   ---Purpose: Initialize <aColor> in the color map
641
642   InitializeStyle( me: mutable; aType: TypeOfLine from Aspect ) returns Integer from Standard;
643   ---Purpose: Initialize <aType> in the type map
644
645   InitializeWidth( me: mutable; aWidth: WidthOfLine from Aspect ) returns Integer from Standard;
646   ---Purpose: Initialize <aWidth> in the width map
647
648   InitializeMarker( me: mutable; aMark: TypeOfMarker from Aspect ) returns Integer from Standard;
649   ---Purpose: Initialize <aMark> in the mark map
650
651   InitializeFont( me: mutable; aFont: FontStyle from Aspect ) returns Integer from Standard;
652   ---Purpose: Initialize <aFont> in the font map
653
654   --**********************************************************************************
655   ResetOriginalState( me        : mutable;
656                       updateVwr : Boolean from Standard = Standard_True );
657   ---Level: Public
658   ---Purpose: to be used only with no  opened
659   --        local context..  displays and activates objects in their
660   --        original state before local contexts were opened...
661
662
663   DrawObject( me: mutable; anObj: InteractiveObject from AIS2D; aDispMode: Integer from Standard ) 
664     is private;
665
666   AvailableToDetect( me; anObj: InteractiveObject from AIS2D ) returns Boolean from Standard 
667                    is private;
668   DoDetectObject( me: mutable; anObj: InteractiveObject from AIS2D; aDrawer: TransientManager from Graphic2d )
669                    is private;
670   IsIOPicked( me; anObj: InteractiveObject from AIS2D ) 
671               returns Boolean from Standard is private;
672   IsPrimPicked( me; anObj: InteractiveObject from AIS2D; aPrim: Primitive from Graphic2d ) 
673               returns Boolean from Standard is private;
674   IsElemPicked( me; anObj: InteractiveObject from AIS2D; 
675                 aPrim: Primitive from Graphic2d; ind: Integer from Standard ) 
676                 returns Boolean from Standard is private;
677   IsElemSelected( me; anObj: InteractiveObject from AIS2D; 
678                   aPrim: Primitive from Graphic2d; ind: Integer from Standard ) 
679                 returns Boolean from Standard is private;
680
681   IsIOSelected( me; anObj: InteractiveObject from AIS2D ) 
682               returns Boolean from Standard is private;
683   IsPrimSelected( me; anObj: InteractiveObject from AIS2D;
684                   aPrim: Primitive from Graphic2d ) 
685               returns Boolean from Standard is private;
686   
687   --**********************************************************************************
688   -- Category: immediate mode management
689   --**********************************************************************************
690
691   BeginImmediateDraw( me: mutable; aView: View from V2d );
692   ---Level: Public
693   ---Purpose:  switches on immediate mode 
694
695   ImmediateDraw(me: mutable; anIObj: InteractiveObject from AIS2D; aView: View from V2d );
696   ---Level: Public
697   ---Purpose: draws object <anIObj> into immediate mode
698
699   EndImmediateDraw( me: mutable; aView: View from V2d );
700   ---Level: Public
701   ---Purpose: switches of immediate mode 
702
703   IsImmediateModeOn( me; aView: View from V2d ) returns Boolean from Standard;
704   ---Level: Public
705   ---Purpose: returns true if immediate mode is on
706
707   ---SAV
708   SetDetectionMode(me:mutable; mode  : TypeOfDetection from AIS2D);
709     
710 fields
711
712     myMainVwr      : Viewer from V2d;
713     myCollectorVwr : Viewer from V2d;
714     myIsCollClosed : Boolean from Standard;
715     myObjects      : DataMapOfIOStatus from AIS2D;
716
717     -- the selection and current objects.
718
719     myDetectPrecision: Integer         from Standard;
720     myResetDetect    : Boolean         from Standard;
721
722     myLastPicked     : InteractiveObject from AIS2D;
723     myLastinMain     : InteractiveObject from AIS2D;
724     myLastinColl     : InteractiveObject from AIS2D;
725
726         mySeqOfDetIO     : HSequenceOfIO   from AIS2D;
727     mySeqOfSelIO     : HSequenceOfIO   from AIS2D;
728
729         myCurDetectMode  : TypeOfDetection from AIS2D;
730
731     myWasLastMain    : Boolean from Standard;
732     myPickMode       : PickMode from Graphic2d;
733
734         -- the attributes of session...
735
736     myHighlightColor    : NameOfColor from Quantity;
737     mySelectionColor    : NameOfColor from Quantity;
738     mySubIntensity      : NameOfColor from Quantity;
739     myDisplayMode       : Integer     from Standard;
740
741     -- The Local Context...
742         
743     myLocalContexts     : DataMapOfLC  from AIS2D;
744     myCurLocalIndex     : Integer      from Standard;
745     myLastMoveView      : View         from V2d;
746
747     myColorMap : GenericColorMap  from Aspect is protected;
748     myTypeMap  : TypeMap   from Aspect is protected;
749     myWidthMap : WidthMap  from Aspect is protected;
750     myMarkMap  : MarkMap   from Aspect is protected;
751     myFontMap  : FontMap   from Aspect is protected;
752
753     --  Iteration  
754     
755     myCurSelected  :  Integer  from  Standard;  
756     myMaxSelected  :  Integer  from  Standard;       
757           
758 friends
759
760     class LocalContext from AIS2D
761
762 end InteractiveContext;