1 -- Created by: Tanya COOL
2 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
20 -- Modified: EAV: 07-09-01 : NbSelected(), InitSelected(),
21 -- MoreSelected(), NextSelected()
23 -- SAV: 15/11/01 MoveCircleTo(). detection by circle. SetDetectionMode().
24 -- Detect() - internal
26 class InteractiveContext from AIS2D inherits TShared from MMgt
28 ---Purpose: The InteractiveContext class allows you to manage
29 -- graphic behavior and selection of Interactive Objects
30 -- in one or more viewers.
34 TypeOfLine from Aspect,
35 WidthOfLine from Aspect,
36 MarkerStyle from Aspect,
37 TypeOfMarker from Aspect,
38 FontStyle from Aspect,
39 GenericColorMap from Aspect,
45 GridDrawMode from Aspect,
46 CardinalPoints from Aspect,
48 PlaneAngle from Quantity,
50 NameOfColor from Quantity,
51 ExtendedString from TCollection,
52 Primitive from Graphic2d,
53 PickMode from Graphic2d,
54 TransientManager from Graphic2d,
55 DisplayList from Graphic2d,
59 InteractiveObject from AIS2D,
61 DataMapOfIOStatus from AIS2D,
62 DataMapOfLC from AIS2D,
63 StatusOfDetection from AIS2D,
64 DisplayStatus from AIS2D,
65 StatusOfPick from AIS2D,
66 TypeOfDetection from AIS2D,
67 PToListOfInt from AIS2D,
69 HSequenceOfIO from AIS2D
73 Create( MainViewer: Viewer from V2d )
74 returns mutable InteractiveContext from AIS2D;
75 ---Purpose: Initiates <MainViewer>
77 Create( MainViewer, aCollector: Viewer from V2d)
78 returns mutable InteractiveContext from AIS2D;
79 ---Purpose: Initiates the principal viewer and Collector(trash) viewer together
81 -- *************************************************************
82 ---Category: Editing general Display Services
83 -- *************************************************************
85 Display( me : mutable;
86 anIObj : InteractiveObject from AIS2D;
87 UpdateVwr : Boolean from Standard = Standard_True);
89 ---Purpose: Display when no local context is opened.
90 -- if <anIObj> has no proper display mode, the defaut
91 -- display mode of the session is used
92 -- Same for the selection Mode (by default =0)
94 Display( me : mutable;
95 anIObj : InteractiveObject from AIS2D;
96 aDispMode : Integer from Standard ;
97 aSelectMode : Integer from Standard;
98 UpdateVwr : Boolean from Standard = Standard_True;
99 AllowDecomp : Boolean from Standard = Standard_True);
101 ---Purpose: Use only if a local context is opened. Displays the
102 -- <aDispMode> the presentation of interactive object,
103 -- activates the selection mode <aSelectMode> if
104 -- <UpdateVwr> = Standard_False, the object is
105 -- displayed but no viewer will be updated; CONVENTION :
106 -- <aSelectMode> = -1 means no activation for <anIObj>
107 -- : it will be displayed but not selectable. (Option
108 -- only available for local context...)
109 -- <AllowDecomp> = true means that <anIObj> is
110 -- able to have subshapes detected by selection mechanisms.
111 -- 2 conditions: <anIObj> must be able to give a shape
112 -- selection modes fit the AIS2D_Shape
113 -- selection modes ( 1->vertex, 2->edges, 3->wires...)
116 anIObj: InteractiveObject from AIS2D;
117 SelMode : Integer from Standard = -1;
118 AllowDecomp : Boolean from Standard = Standard_False );
119 ---Purpose: Available when opened local contexts only;
120 -- option to load in the selector objects which will
121 -- be selectable but not displayed. Nevertheless, they
122 -- will be hilighted when detected by the selector.
123 -- ex : be able to select center of a line without
124 -- displaying all centers before selection process
127 anIObj : InteractiveObject from AIS2D;
128 UpdateVwr : Boolean from Standard = Standard_True;
129 PutInCollector : Boolean from Standard = Standard_True );
131 ---Purpose: Erases presentations in current local context,
132 -- or failing that, in other local contexts which allow erasing.
133 -- If <PutInCollector> is false, the object is erased but
134 -- not put in the Collector.
136 EraseAll( me : mutable;
137 PutInCollector : Boolean from Standard = Standard_True;
138 updateVwr : Boolean from Standard = Standard_True );
139 ---Purpose: Every erased object goes into the Collector viewer
141 DisplayAll( me : mutable;
142 OnlyFromCollector : Boolean from Standard = Standard_True;
143 updateVwr : Boolean from Standard = Standard_True);
144 ---Purpose: Displays all erased objects, in other words,
145 -- all objects in the Collector viewer.
147 EraseSelected( me : mutable;
148 PutInCollector : Boolean from Standard = Standard_True;
149 updateVwr : Boolean from Standard = Standard_True );
150 ---Purpose: Erases selected objects if a local context is open.
151 -- Erases current objects if there is no active local context.
152 -- If a local context is open and if <updateVwr> equals
153 -- Standard_False, the presentation of the Interactive Object
154 -- activates the selection mode; the object is displayed but
155 -- no viewer will be updated.
157 DisplaySelected( me : mutable;
158 updateVwr : Boolean from Standard = Standard_True );
159 ---Purpose: Displays or erases selected objects if a local
160 -- context is open. If no active local context is found,
161 -- only current objects can be displayed or erased.
163 KeepTemporary( me : mutable;
164 anIObj : InteractiveObject from AIS2D;
165 InWhichLocal: Integer from Standard = -1)
166 returns Boolean from Standard;
167 ---Purpose: Changes the status of a temporary object it will be --
168 -- kept at the neutral point, i.e. put in the list of
169 -- displayed objects, with its temporary attributes
170 -- (displaymode,selection mode) returns true if done --
171 -- inWhichLocal means that gives the local context in
172 -- which <anIObj> is displayed. By default, -1 means the
175 Redisplay( me : mutable;
176 anIObj : InteractiveObject from AIS2D;
177 updateVwr : Boolean from Standard = Standard_True;
178 allModes : Boolean from Standard = Standard_False);
179 ---Purpose: Forces Recompute of the seen presentations of the object;
180 -- if <allModes>= True -> recomputes all the
183 --***********************************************************************
184 ---Category: Querying and Editing Selection Process
185 --***********************************************************************
187 IsCurrent( me; anIObj: InteractiveObject from AIS2D )
188 returns Boolean from Standard;
189 ---Purpose: Finds the current selected entity <anIObj> in Neutral Point.
191 IsSelected( me; anIObj: InteractiveObject from AIS2D )
192 returns Boolean from Standard;
193 ---Purpose: Confirms selection. Returns true if <anIObj> is selected in the interactive context
195 Highlight( me : mutable;
196 anIObj : InteractiveObject from AIS2D;
197 updateVwr: Boolean from Standard = Standard_True);
198 ---Purpose: Updates the display in the viewer to take dynamic detection
200 -- If a local context is open and if <updateVwr> equals Standard_False,
201 -- the presentation of the Interactive Object activates the selection
202 -- mode; the object is displayed but no viewer will be updated.
204 HighlightWithColor( me: mutable;
205 anIObj:InteractiveObject from AIS2D;
206 aCol: NameOfColor from Quantity;
207 updateVwr: Boolean from Standard = Standard_True );
208 ---Purpose: Changes the color of the object in view <anIObj>.
209 -- It paints this object the color passed as the argument <aCol>
210 -- If a local context is open and if <updateVwr> equals Standard_False,
211 -- the presentation of the Interactive Object activates the selection
212 -- mode; the object is displayed but no viewer will be updated.
214 Unhighlight( me : mutable;
215 anIObj : InteractiveObject from AIS2D;
216 updateVwr : Boolean from Standard = Standard_True );
217 ---Purpose: Removes hilighting from the entity <anIObj>. Updates the viewer.
218 -- If a local context is open and if <updateVwr> equals Standard_False,
219 -- the presentation of the Interactive Object activates the selection
220 -- mode; the object is displayed but no viewer will be updated.
223 --****************************************************************
224 ---Category: Graphic Detection and Selection
225 --****************************************************************
227 SetPrecision( me: mutable; aPrec: Integer from Standard );
230 ---Purpose: Sets the precision of detection
232 DetectPrecision( me ) returns Integer from Standard;
235 ---Purpose: Returns the precision of detection
238 XPix, YPix : Integer from Standard;
239 aView : View from V2d;
240 anIO : InteractiveObject from AIS2D;
241 isTemporary : Boolean from Standard = Standard_False );
243 ---Purpose: Places object <anIO> to the pixel position (XPix, YPix)
244 -- in the view <aView> is using TransientManager.
245 -- It's possible to use without preliminary application of Display method.
248 XPix, YPix : Integer from Standard;
249 aView : View from V2d;
250 isTemporary: Boolean from Standard = Standard_True );
252 ---Purpose: Places selected objects to the pixel position (XPix, YPix)
253 -- in the view <aView>. If <isTemporary> is True, is used TransientManager.
256 XPix, YPix: Integer from Standard;
257 aView: View from V2d ) returns StatusOfDetection from AIS2D;
259 ---Purpose: Relays mouse position in pixels XPix and YPix to the
260 -- interactive context selectors. This is done by the view <aView>
261 -- passing this position to the main viewer and updating it.
262 -- Functions in both Neutral Point and local contexts.
265 MoveCircleTo( me: mutable; XPix, YPix, Radius : Integer from Standard;
266 aView: View from V2d ) returns StatusOfDetection from AIS2D;
268 ---Purpose: Relays mouse position in circle <XPix, YPix> and <Radius> to the
269 -- interactive context selectors. This is done by the view <aView>
270 -- passing this position to the main viewer and updating it.
271 -- Functions in both Neutral Point and local contexts.
274 Xmin, Ymin, Xmax, Ymax: Integer from Standard;
275 aView: View from V2d ) returns StatusOfDetection from AIS2D;
277 ---Purpose: Relays mouse position in rectangle Xmin, Ymin, Xmax, Ymax to the
278 -- interactive context selectors. This is done by the view <aView>
279 -- passing this position to the main viewer and updating it.
280 -- Functions in both Neutral Point and local contexts.
284 Detect( me: mutable; dList : DisplayList from Graphic2d; aView : View from V2d )
285 returns StatusOfDetection from AIS2D is private;
287 Select( me : mutable;
288 UpdateVwr : Boolean from Standard = Standard_True)
289 returns StatusOfPick from AIS2D;
291 ---Purpose: Stores and hilights the previous detected; Unhilights
292 -- the previous picked.
294 ShiftSelect( me: mutable; UpdateVwr: Boolean from Standard = Standard_True )
295 returns StatusOfPick from AIS2D;
297 ---Purpose: adds the last detected to the list of previous picked.
298 -- if the last detected was already declared as picked,
299 -- removes it from the Picked List.
301 ShiftSelect( me: mutable; XPMin, YPMin, XPMax, YPMax: Integer from Standard;
302 aView: View from V2d; UpdateVwr : Boolean from Standard = Standard_True)
303 returns StatusOfPick from AIS2D;
305 ---Purpose: rectangle of selection ; adds new detected entities into the
306 -- picked list, removes the detected entities that were already stored...
309 SetHighlightColor( me: mutable; aCol: NameOfColor from Quantity );
310 ---Purpose: Allows to set the color used to show highlighted entities,
311 -- that is, entities picked out by the mouse.
313 SetSelectionColor( me: mutable; aCol: NameOfColor from Quantity );
314 ---Purpose: Sets the color used to show selected entities
316 SetSubIntensityColor( me: mutable; aCol: NameOfColor from Quantity );
317 ---Purpose: Allows you to set the color used to show that an object
318 -- is not currently selected
320 DisplayMode( me ) returns Integer from Standard;
322 ---Purpose: Returns the display mode setting
324 HighlightColor( me ) returns NameOfColor from Quantity;
327 ---Purpose: Returns the name of the color used to show highlighted entities,
328 -- that is, entities picked out by the mouse
330 SelectionColor( me ) returns NameOfColor from Quantity;
333 ---Purpose: Returns the name of the color used to show selected entities.
335 SubIntensityColor( me ) returns NameOfColor from Quantity;
338 ---Purpose: Returns the name of the color used to show
339 -- that an object is not currently selected.
341 SubIntensityOn( me : mutable;
342 anIObj : InteractiveObject from AIS2D;
343 UpdateVwr : Boolean from Standard = Standard_True);
345 ---Purpose: Highlights, and removes highlights from, the displayed object
346 -- <anIObj> which is displayed at Neutral Point with subintensity
347 -- color; available only for active local context.
348 -- There is no effect if there is no local context.
350 SubIntensityOff( me : mutable;
351 anIObj : InteractiveObject from AIS2D;
352 UpdateVwr : Boolean from Standard = Standard_True);
354 ---Purpose: Removes the subintensity option for the entity <anIObj>.
357 -- *************************************************************
358 -- Management of the Trash Bin Viewer
359 -- *************************************************************
361 IsCollectorClosed( me ) returns Boolean from Standard;
366 CloseCollector( me: mutable );
369 ---Purpose: Allows to close Collector
371 OpenCollector( me: mutable );
373 ---Purpose: Allows to open Collector
375 --************************************************************************
376 ---Category: Specific Local Context Action
377 --************************************************************************
379 OpenLocalContext( me : mutable;
380 UseDispObj : Boolean from Standard = Standard_True;
381 AllowDecomposit : Boolean from Standard = Standard_True;
382 AcceptEraseOfObj: Boolean from Standard = Standard_False )
383 returns Integer from Standard;
385 ---Purpose: Opens a local context of display and selection
386 -- returns the index of new opened local context.
387 -- Must be stored and used to close the local context.
389 CloseLocalContext( me : mutable;
390 ind : Integer from Standard = -1;
391 updateVwr : Boolean from Standard = Standard_True );
393 ---Purpose: close the current opened local context.
394 -- Use <ind> to be sure to close the local context you Opened !
395 -- if <ind> == -1 the current local context is closed
396 -- WITHOUT VERIFICATION.
397 -- if <ind> is greater than the current opened local context,
400 IndexOfCurrentLocal( me ) returns Integer from Standard;
402 ---Purpose: returns -1 if no opened local context.
404 CloseAllContext( me: mutable; updateVwr: Boolean from Standard = Standard_True);
406 ---Purpose: Allows to close all local contexts at one go and return to
409 --****************************************************************
410 ---Category: non interactive actions about Selection
411 -- 2 categories are distinct:
413 -- - Selected Objects
414 -- a Current object is the object picked
416 -- The Selected objects are objects picked
417 -- when a local context is opened
420 SetCurrentObject( me : mutable;
421 anIObj : InteractiveObject from AIS2D;
422 UpdateVwr: Boolean from Standard = Standard_True );
424 ---Purpose: Updates the view of the current object in open context.
425 -- Objects selected when there is no open local context
426 -- are called current objects; those selected in open local context,
429 AddOrRemoveCurObject( me : mutable;
430 anIObj : InteractiveObject from AIS2D;
431 UpdateVwr : Boolean from Standard = Standard_True);
433 ---Purpose: Allows to add a current object to the list of current objects
434 -- or remove it from that list.
435 -- Objects selected when there is no open local context are called
436 -- current objects; those selected in open local context,
440 UpdateCurrent( me: mutable );
442 ---Purpose: updates the list of current objects
443 -- i.e. hilights new current objects,
444 -- unhighlights old current objects
447 SetOkCurrent( me: mutable );
451 --FirstCurrentObject( me: mutable ) returns InteractiveObject from AIS2D;
453 ---Purpose: Returns the first current object in the list of current objects.
455 HighlightCurrent( me: mutable;
456 UpdateVwr: Boolean from Standard = Standard_True);
458 ---Purpose: Highlights current objects.
460 UnhighlightCurrent( me: mutable;
461 UpdateVwr: Boolean from Standard = Standard_True);
463 ---Purpose: Unhighlights current objects.
465 ClearCurrent(me: mutable; UpdateVwr: Boolean from Standard = Standard_True);
467 ---Purpose: Empties previous current objects in order to get the current
468 -- objects detected by the selector using UpdateCurrent.
470 SetSelected( me: mutable; anIObj: InteractiveObject from AIS2D;
471 UpdateVwr: Boolean from Standard = Standard_True );
473 ---Purpose: Puts the selected <anIObj> in the current objects list.
475 SetSelectedCurrent( me: mutable );
477 ---Purpose: Puts the selected list in the current objects list.
479 UpdateSelected( me: mutable;
480 UpdateVwr: Boolean from Standard=Standard_True );
482 ---Purpose: Updates the list of selected objects, i.e. hilights
483 -- new selected objects, removes hilighting from former
486 AddOrRemoveSelected( me: mutable;
487 anIObj : InteractiveObject from AIS2D;
488 UpdateVwr: Boolean from Standard = Standard_True);
490 ---Purpose: Allows you to add a selected object <anIObj> to the list of selected
491 -- objects or remove it from that list.
493 HighlightSelected( me: mutable;
494 UpdateVwr: Boolean from Standard = Standard_True);
496 ---Purpose: Highlights selected objects.
498 UnhighlightSelected( me: mutable;
499 UpdateVwr: Boolean from Standard = Standard_True );
501 ---Purpose: UnHighlights selected objects.
503 ClearSelected( me: mutable;
504 UpdateVwr: Boolean from Standard = Standard_True);
506 ---Purpose: Empties previous selected objects in order to get
507 -- the selected objects detected by the selector using UpdateSelected.
509 NbSelected( me ) returns Integer from Standard;
511 ---Purpose: Returns number of objects selected in
512 --- local context ( if opened ) or in neutral context
514 InitSelected( me: mutable );
516 ---Purpose: Iteration
518 MoreSelected( me ) returns Boolean from Standard;
520 ---Purpose: Iteration
522 NextSelected( me: mutable );
524 ---Purpose: Iteration
526 SelectedObject( me ) returns TShared from MMgt;
528 ---Purpose: Returns current selected object ( see InitSelected() .. )
529 -- The object type depends on highlight mode
530 -- ( OBJECT, PRIMITIVE etc )
533 --*****************************************************************
534 -- Querying Graphic Attributes
535 --*****************************************************************
537 DisplayStatus( me; anIObj: InteractiveObject from AIS2D )
538 returns DisplayStatus from AIS2D;
540 ---Purpose: Returns the display status of the entity <anIObj>.
542 DisplayedModes( me; anIObj: InteractiveObject from AIS2D )
543 returns PToListOfInt from AIS2D;
545 ---Purpose: Returns the list of active display modes for the entity <anIObj>
547 IsDisplayed( me; anIObj:InteractiveObject from AIS2D )
548 returns Boolean from Standard;
550 ---Purpose: Returns true if <anIObj> is displayed in the interactive context
553 anIObj: InteractiveObject from AIS2D;
554 aMode : Integer from Standard )
555 returns Boolean from Standard;
558 ---Purpose: Returns true if <anIObj> is displayed in the interactive context with <aMode> display mode
560 IsHighlighted( me; anIObj: InteractiveObject from AIS2D )
561 returns Boolean from Standard;
563 ---Purpose: Returns true if the Interactive Object <anIObj>
564 -- is highlighted in the interactive context.
567 anIObj : InteractiveObject from AIS2D;
568 WithColor : out Boolean from Standard;
569 theHiCol : out NameOfColor from Quantity )
570 returns Boolean from Standard;
572 ---Purpose: if <anIObj> is highlighted with a specific color
573 -- <WithColor> will be returned TRUE
574 -- <theHiCol> gives the name of the hilightcolor
576 IsInCollector( me; anIObj: InteractiveObject from AIS2D )
577 returns Boolean from Standard;
579 ---Purpose: Returns true if the entity <anIObj> is in the Collector viewer.
582 anIObj : InteractiveObject from AIS2D;
583 aStatus: in out ExtendedString from TCollection);
585 ---Purpose: Modified the status of the entity <anIObj>
587 UpdateCurrentViewer( me: mutable );
589 ---Purpose: Updates the current viewer, the viewer in Neutral Point.
591 UpdateCollector( me: mutable );
593 ---Purpose: Updates the Collector viewer
595 --********************************************************************************
596 ---Category: Information methods - Get Fields
597 --********************************************************************************
599 CurrentViewer( me ) returns any Viewer from V2d;
602 ---Purpose: Returns the current viewer.
604 HasOpenedContext( me ) returns Boolean from Standard;
607 ---Purpose: Returns true if there is an open context.
609 DisplayedObjects( me;
610 aListOfIO : in out ListOfIO from AIS2D;
611 OnlyFromNeutral : Boolean from Standard = Standard_False );
613 ---Purpose: gives the list of displayed objects in the main viewer.
615 --********************************************************************************
618 anIObj : InteractiveObject from AIS2D;
619 Dmode : out Integer from Standard;
620 HiMod : out TypeOfDetection from AIS2D;
621 SelMode : out Integer from Standard ) is private;
623 ---Purpose: Returns display, highlight and selection modes of the <anIObj>
625 EraseGlobal( me : mutable;
626 anIObj : InteractiveObject from AIS2D;
627 UpdateVwr : Boolean from Standard = Standard_True;
628 PutInCollector : Boolean from Standard = Standard_True) is private;
632 SetPickMode( me: mutable; aMode: PickMode from Graphic2d );
635 ---Purpose: Allows to provide settings for pick mode.
637 GetPickMode( me) returns PickMode from Graphic2d;
640 ---Purpose: Returns the pick mode
643 --**********************************************************************************
645 HighestIndex( me ) returns Integer from Standard;
649 --**********************************************************************************
650 -- Category: initialization of the attributes
651 --**********************************************************************************
653 InitializeColor( me: mutable; aColor: Color from Quantity ) returns Integer from Standard;
654 ---Purpose: Initialize <aColor> in the color map
656 InitializeStyle( me: mutable; aType: TypeOfLine from Aspect ) returns Integer from Standard;
657 ---Purpose: Initialize <aType> in the type map
659 InitializeWidth( me: mutable; aWidth: WidthOfLine from Aspect ) returns Integer from Standard;
660 ---Purpose: Initialize <aWidth> in the width map
662 InitializeMarker( me: mutable; aMark: TypeOfMarker from Aspect ) returns Integer from Standard;
663 ---Purpose: Initialize <aMark> in the mark map
665 InitializeFont( me: mutable; aFont: FontStyle from Aspect ) returns Integer from Standard;
666 ---Purpose: Initialize <aFont> in the font map
668 --**********************************************************************************
669 ResetOriginalState( me : mutable;
670 updateVwr : Boolean from Standard = Standard_True );
672 ---Purpose: to be used only with no opened
673 -- local context.. displays and activates objects in their
674 -- original state before local contexts were opened...
677 DrawObject( me: mutable; anObj: InteractiveObject from AIS2D; aDispMode: Integer from Standard )
680 AvailableToDetect( me; anObj: InteractiveObject from AIS2D ) returns Boolean from Standard
682 DoDetectObject( me: mutable; anObj: InteractiveObject from AIS2D; aDrawer: TransientManager from Graphic2d )
684 IsIOPicked( me; anObj: InteractiveObject from AIS2D )
685 returns Boolean from Standard is private;
686 IsPrimPicked( me; anObj: InteractiveObject from AIS2D; aPrim: Primitive from Graphic2d )
687 returns Boolean from Standard is private;
688 IsElemPicked( me; anObj: InteractiveObject from AIS2D;
689 aPrim: Primitive from Graphic2d; ind: Integer from Standard )
690 returns Boolean from Standard is private;
691 IsElemSelected( me; anObj: InteractiveObject from AIS2D;
692 aPrim: Primitive from Graphic2d; ind: Integer from Standard )
693 returns Boolean from Standard is private;
695 IsIOSelected( me; anObj: InteractiveObject from AIS2D )
696 returns Boolean from Standard is private;
697 IsPrimSelected( me; anObj: InteractiveObject from AIS2D;
698 aPrim: Primitive from Graphic2d )
699 returns Boolean from Standard is private;
701 --**********************************************************************************
702 -- Category: immediate mode management
703 --**********************************************************************************
705 BeginImmediateDraw( me: mutable; aView: View from V2d );
707 ---Purpose: switches on immediate mode
709 ImmediateDraw(me: mutable; anIObj: InteractiveObject from AIS2D; aView: View from V2d );
711 ---Purpose: draws object <anIObj> into immediate mode
713 EndImmediateDraw( me: mutable; aView: View from V2d );
715 ---Purpose: switches of immediate mode
717 IsImmediateModeOn( me; aView: View from V2d ) returns Boolean from Standard;
719 ---Purpose: returns true if immediate mode is on
722 SetDetectionMode(me:mutable; mode : TypeOfDetection from AIS2D);
726 myMainVwr : Viewer from V2d;
727 myCollectorVwr : Viewer from V2d;
728 myIsCollClosed : Boolean from Standard;
729 myObjects : DataMapOfIOStatus from AIS2D;
731 -- the selection and current objects.
733 myDetectPrecision: Integer from Standard;
734 myResetDetect : Boolean from Standard;
736 myLastPicked : InteractiveObject from AIS2D;
737 myLastinMain : InteractiveObject from AIS2D;
738 myLastinColl : InteractiveObject from AIS2D;
740 mySeqOfDetIO : HSequenceOfIO from AIS2D;
741 mySeqOfSelIO : HSequenceOfIO from AIS2D;
743 myCurDetectMode : TypeOfDetection from AIS2D;
745 myWasLastMain : Boolean from Standard;
746 myPickMode : PickMode from Graphic2d;
748 -- the attributes of session...
750 myHighlightColor : NameOfColor from Quantity;
751 mySelectionColor : NameOfColor from Quantity;
752 mySubIntensity : NameOfColor from Quantity;
753 myDisplayMode : Integer from Standard;
755 -- The Local Context...
757 myLocalContexts : DataMapOfLC from AIS2D;
758 myCurLocalIndex : Integer from Standard;
759 myLastMoveView : View from V2d;
761 myColorMap : GenericColorMap from Aspect is protected;
762 myTypeMap : TypeMap from Aspect is protected;
763 myWidthMap : WidthMap from Aspect is protected;
764 myMarkMap : MarkMap from Aspect is protected;
765 myFontMap : FontMap from Aspect is protected;
769 myCurSelected : Integer from Standard;
770 myMaxSelected : Integer from Standard;
774 class LocalContext from AIS2D
776 end InteractiveContext;