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