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