0024023: Revamp the OCCT Handle -- ambiguity
[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;
28ee613b 432 aPrecision: Real from Standard = 2.0);
7fd59977 433 ---Level: Public
28ee613b 434 ---Purpose: Disables the mechanism of adaptive tolerance calculation in SelectMgr_ViewerSelector and
435 -- sets the given tolerance for ALL sensitive entities activated. For more information, see
436 -- SelectMgr_ViewerSelector documentation
7fd59977 437 -- Warning: When a local context is open the sensitivity is apply on it
438 -- instead on the main context.
439
f751596e 440 PixelTolerance(me) returns Real from Standard;
3c982548 441 ---Level: Public
442 ---Purpose: Returns the pixel tolerance.
443
7fd59977 444 ---Category: put locations on objects....
445 --
446
447 SetLocation(me:mutable;
448 aniobj : InteractiveObject from AIS;
449 aLocation : Location from TopLoc);
450---Purpose: Puts the location aLocation on the initial graphic
451-- representation and the selection for the entity aniobj.
452-- In other words, aniobj is visible and selectable at a
453-- position other than initial position.
454-- Graphic and selection primitives are not recomputed.
455-- To clean the view correctly, you must reset the previous location.
456
457 ResetLocation(me : mutable;
458 aniobj : InteractiveObject from AIS);
459 ---Purpose: Puts the entity aniobj back into its initial position.
460
461
462
463 HasLocation(me;
464 aniobj : InteractiveObject from AIS)
465 returns Boolean from Standard;
466---Purpose:
467-- Returns true if the entity aniobj has a location.
468
469 Location(me;
470 aniobj : InteractiveObject from AIS)
471 returns Location from TopLoc;
472 ---Purpose:
473 -- Returns the location of the entity aniobj.
7fd59977 474
475
476
477 SetCurrentFacingModel(me: mutable;
478 aniobj : InteractiveObject from AIS;
479 aModel: TypeOfFacingModel from Aspect = Aspect_TOFM_BOTH_SIDE);
480 ---Purpose: change the current facing model apply on polygons for
481 -- SetColor(), SetTransparency(), SetMaterial() methods
482 -- default facing model is Aspect_TOFM_TWO_SIDE. This mean that attributes is
483 -- applying both on the front and back face.
484
485 SetColor(me : mutable;
486 aniobj : InteractiveObject from AIS;
487 aColor : NameOfColor from Quantity;
488 updateviewer : Boolean from Standard = Standard_True);
489
490 SetColor(me : mutable;
491 aniobj : InteractiveObject from AIS;
492 aColor : Color from Quantity;
493 updateviewer : Boolean from Standard = Standard_True);
494---Purpose:
495-- Sets the color of the selected entity.
496-- If a local context is open and if updateviewer equals
497-- Standard_False, the presentation of the Interactive
498-- Object activates the selection mode; the object is
499-- displayed but no viewer will be updated.
500
501 UnsetColor(me :mutable;
502 aniobj : InteractiveObject from AIS;
503 updateviewer : Boolean from Standard = Standard_True);
504--- Purpose: Removes the color selection for the selected entity.
505-- If a local context is open and if updateviewer equals
506-- Standard_False, the presentation of the Interactive
507-- Object activates the selection mode; the object is
508-- displayed but no viewer will be updated.
509
510 SetWidth(me:mutable;
511 aniobj : InteractiveObject from AIS;
512 aValue:Real from Standard;
513 updateviewer : Boolean from Standard = Standard_True) is virtual;
514---Purpose:
515-- Sets the width of the entity aniobj.
516-- If a local context is open and if updateviewer equals
517-- Standard_False, the presentation of the Interactive
518-- Object activates the selection mode; the object is
519-- displayed but no viewer will be updated.
520
521 UnsetWidth(me:mutable;
522 aniobj : InteractiveObject from AIS;
523 updateviewer : Boolean from Standard = Standard_True) is virtual;
524---Purpose:
525-- Removes the width setting of the entity aniobj.
526-- If a local context is open and if updateviewer equals
527-- Standard_False, the presentation of the Interactive
528-- Object activates the selection mode; the object is
529-- displayed but no viewer will be updated.
530
531 SetMaterial(me:mutable;
532 aniobj : InteractiveObject from AIS;
533 aName:NameOfMaterial from Graphic3d;
534 --aName:NameOfPhysicalMaterial from Graphic3d;
535 updateviewer : Boolean from Standard = Standard_True);
536---Purpose:
537-- Provides the type of material setting for the view of
538-- the entity aniobj.
539-- The range of settings includes: BRASS, BRONZE,
540-- GOLD, PEWTER, SILVER, STONE.
541-- If a local context is open and if updateviewer equals
542-- Standard_False, the presentation of the Interactive
543-- Object activates the selection mode; the object is
544-- displayed but no viewer will be updated.
545
546 UnsetMaterial(me : mutable;
547 anObj : InteractiveObject from AIS;
548 updateviewer : Boolean from Standard = Standard_True);
549---Purpose:
550-- Removes the type of material setting for viewing the
551-- entity aniobj.
552-- If a local context is open and if updateviewer equals
553-- Standard_False, the presentation of the Interactive
554-- Object activates the selection mode; the object is
555-- displayed but no viewer will be updated.
556
557 SetTransparency(me:mutable;
558 aniobj : InteractiveObject from AIS;
559 aValue : Real from Standard=0.6;
560 updateviewer : Boolean from Standard = Standard_True);
561 ---Purpose: Provides the transparency settings for viewing the
562-- entity aniobj. The transparency value aValue may be
563-- between 0.0, opaque, and 1.0, fully transparent.
564-- If a local context is open and if updateviewer equals
565-- Standard_False, the presentation of the Interactive
566-- Object activates the selection mode; the object is
567-- displayed but no viewer will be updated.
568
569 UnsetTransparency(me : mutable;
570 aniobj : InteractiveObject from AIS;
571 updateviewer : Boolean from Standard = Standard_True);
572---Purpose:
573-- Removes the transparency settings for viewing the
574-- entity aniobj. The transparency value aValue may be
575-- between 0.0, opaque, and 1.0, fully transparent.
576-- If a local context is open and if updateviewer equals
577-- Standard_False, the presentation of the Interactive
578-- Object activates the selection mode; the object is
579-- displayed but no viewer will be updated.
7fd59977 580
581 SetLocalAttributes(me : mutable;
582 aniobj : InteractiveObject from AIS;
6262338c 583 aDrawer : Drawer from Prs3d;
7fd59977 584 updateviewer : Boolean from Standard = Standard_True);
585--- Purpose:
586-- Sets the attributes of the interactive object aniobj by
587-- plugging the attribute manager aDrawer into the local
588-- context. The graphic attributes of aDrawer such as
589-- visualization mode, color, and material, are then used
590-- to display aniobj.
591-- If a local context is open and if updateviewer equals
592-- Standard_False, the presentation of the Interactive
593-- Object activates the selection mode; the object is
594-- displayed but no viewer will be updated.
595
596 UnsetLocalAttributes(me : mutable;
597 anObj : InteractiveObject from AIS;
598 updateviewer : Boolean from Standard = Standard_True);
599---Purpose:
600-- Removes the settings for local attributes of the entity
601-- anObj and returns to the Neutral Point attributes or
602-- those of the previous local context.
603-- If a local context is open and if updateviewer equals
604-- Standard_False, the presentation of the Interactive
605-- Object activates the selection mode; the object is
606-- displayed but no viewer will be updated.
607
608
609 SetPolygonOffsets ( me : mutable;
610 anObj : InteractiveObject from AIS;
611 aMode : Integer from Standard;
60be1f9b 612 aFactor : ShortReal from Standard = 1.0;
613 aUnits : ShortReal from Standard = 0.0;
7fd59977 614 updateviewer : Boolean from Standard = Standard_True ) is static;
615 ---Purpose: Sets up polygon offsets for the given AIS_InteractiveObject.
616 -- It simply calls anObj->SetPolygonOffsets()
617
618
619 HasPolygonOffsets ( me;
620 anObj : InteractiveObject from AIS )
621 returns Boolean from Standard
622 is static;
623 ---Level: Public
624 ---Purpose: simply calls anObj->HasPolygonOffsets()
625 ---Category: Inquire methods
626
627 PolygonOffsets ( me;
628 anObj : InteractiveObject from AIS;
629 aMode : out Integer from Standard;
60be1f9b 630 aFactor : out ShortReal from Standard;
631 aUnits : out ShortReal from Standard ) is static;
7fd59977 632 ---Level: Public
633 ---Purpose: Retrieves current polygon offsets settings for <anObj>.
634 ---Category: Inquire methods
635
636
637 SetTrihedronSize(me:mutable;aSize:Real from Standard;updateviewer: Boolean from Standard = Standard_True);
638 ---Purpose: Sets the size aSize of the trihedron.
639-- Is used to change the default value 100 mm for
640-- display of trihedra.
641-- Use of this function in one of your own interactive
642-- objects requires a call to the Compute function of the
643-- new class. This will recalculate the presentation for
644-- every trihedron displayed.
645-- If a local context is open and if updateviewer equals
646-- Standard_False, the presentation of the Interactive
647-- Object activates the selection mode; the object is
648-- displayed but no viewer will be updated.
649
650 TrihedronSize(me) returns Real from Standard;
651 ---Purpose: returns the current value of trihedron size.
652
653
654 SetPlaneSize(me:mutable;aSizeX,aSizeY:Real from Standard;updateviewer: Boolean from Standard = Standard_True);
655---Purpose:
656-- Sets the plane size defined by the length in the X
657-- direction XSize and that in the Y direction YSize.
658-- If a local context is open and if updateviewer equals
659-- Standard_False, the presentation of the Interactive
660-- Object activates the selection mode; the object is
661-- displayed but no viewer will be updated.
662
663 SetPlaneSize(me:mutable;aSize:Real from Standard;updateviewer: Boolean from Standard = Standard_True);
664---Purpose:
665-- Sets the plane size aSize.
666-- If a local context is open and if updateviewer equals
667-- Standard_False, the presentation of the Interactive
668-- Object activates the selection mode; the object is
669-- displayed but no viewer will be updated.
670-- May be used if PlaneSize returns true.
671
672 PlaneSize(me; XSize,YSize:out Real from Standard) returns Boolean from Standard;
673 ---Purpose: Returns true if the length in the X direction XSize is
674-- the same as that in the Y direction YSize.
675
676 DisplayStatus (me; anIobj: InteractiveObject from AIS)
677 returns DisplayStatus from AIS;
678 ---Purpose: Returns the display status of the entity anIobj.
679-- This will be one of the following:
680-- - DS_Displayed displayed in main viewer
eb4320f2 681-- - DS_Erased hidden in main viewer
7fd59977 682-- - DS_Temporary temporarily displayed
683-- - DS_None nowhere displayed.
684
685 DisplayedModes (me;aniobj: InteractiveObject from AIS)
686 returns ListOfInteger from TColStd;
687 ---C++: return const &
688 ---Purpose:
689 -- Returns the list of active display modes for the entity aniobj.
690
691 IsDisplayed(me; anIobj:InteractiveObject from AIS) returns Boolean from Standard;
692 ---Purpose: Returns true if anIobj is displayed in the interactive context.
693
694 IsDisplayed(me;
695 aniobj: InteractiveObject from AIS;
696 aMode : Integer from Standard)
697 returns Boolean from Standard;
698
699 IsHilighted(me;aniobj : InteractiveObject from AIS)
700 returns Boolean from Standard;
701
702 IsHilighted(me;
703 anIobj : InteractiveObject from AIS;
704 WithColor: out Boolean from Standard;
705 theHiCol : out NameOfColor from Quantity)
706 returns Boolean from Standard;
707 ---Purpose: if <anIObj> is hilighted with a specific color
708 -- <WithColor> will be returned TRUE
709 -- <theHiCol> gives the name of the hilightcolor
710
7fd59977 711 DisplayPriority(me;anIobj: InteractiveObject from AIS)
712 returns Integer from Standard;
713---Purpose:
714-- Returns the display priority of the entity anIobj. This
715-- will be display mode of anIobj if it is in the main
eb4320f2 716-- viewer.
7fd59977 717
718 HasColor(me; aniobj: InteractiveObject from AIS)
719 returns Boolean from Standard;
720---Purpose:
721-- Returns true if a view of the Interactive Object aniobj has color.
722 Color(me;aniobj:InteractiveObject from AIS)
723 returns NameOfColor from Quantity;
724
725 Color(me; aniobj: InteractiveObject from AIS;
726 acolor: out Color from Quantity);
727---Purpose:
728-- Returns the color Color of the entity aniobj in the interactive context.
729 Width(me;
730 aniobj : InteractiveObject from AIS)
731 returns Real from Standard is virtual;
732---Purpose:
733-- Returns the width of the Interactive Object aniobj in
734-- the interactive context.
735
736 Status(me;
737 anObj : InteractiveObject from AIS;
738 astatus : in out ExtendedString from TCollection);
739---Purpose:
740-- Returns the status astatus of the Interactive Context
741-- for the view of the Interactive Object anObj.
742
743 UpdateCurrentViewer(me:mutable);
744 ---Purpose:
745-- Updates the current viewer, the viewer in Neutral Point.
746-- Objects selected when there is no open local context
747-- are called current objects; those selected in open
748-- local context, selected objects.
749
7fd59977 750 ---Category: General Attributes for the session
751
752 DisplayMode(me) returns Integer from Standard;
753 ---C++: inline
754 ---Purpose: Returns the display mode setting.
755 -- Note that mode 3 is only used.
756
757 HilightColor(me) returns NameOfColor from Quantity; -- dynamic selection
758 ---C++: inline
759 ---Purpose:
760 -- Returns the name of the color used to show
761 -- highlighted entities, that is, entities picked out by the mouse.
762
763 SelectionColor(me) returns NameOfColor from Quantity;
764 ---C++: inline
765 ---Purpose:
766 -- Returns the name of the color used to show selected entities.
767 -- By default, this is Quantity_NOC_GRAY80.
768
769 PreSelectionColor(me) returns NameOfColor from Quantity;
770 ---C++: inline
771 ---Purpose: Returns the name of the color used to show preselection.
772 -- By default, this is Quantity_NOC_GREEN.
773
774 DefaultColor(me) returns NameOfColor from Quantity;
775 ---C++: inline
776 ---Purpose:
777 -- Returns the name of the color used by default.
778 -- By default, this is Quantity_NOC_GOLDENROD.
779
780 SubIntensityColor(me) returns NameOfColor from Quantity;
781 ---C++: inline
782 ---Purpose:
783 -- Returns the name of the color used to show that an
784 -- object is not currently selected.
785 -- By default, this is Quantity_NOC_GRAY40.
786
787 SetHilightColor(me:mutable;aHiCol:NameOfColor from Quantity);
788 ---C++: inline
789 ---Purpose:
790 -- Sets the color used to show highlighted entities, that
791 -- is, entities picked by the mouse.
792 -- By default, this is Quantity_NOC_CYAN1.
793
794 SelectionColor(me:mutable;aCol:NameOfColor from Quantity);
795 ---C++: inline
796 ---Purpose:
797 -- Sets the color used to show selected entities.
798 -- By default, this is Quantity_NOC_GRAY80.
799
800 SetPreselectionColor(me:mutable;aCol:NameOfColor from Quantity);
801 ---C++: inline
802 ---Purpose:
803 -- Allows you to set the color used to show preselection.
804 -- By default, this is Quantity_NOC_GREEN.
805 -- A preselected entity is one which has been selected
806 -- as the domain of application of a function such as a fillet.
807
808 SetSubIntensityColor(me:mutable;aCol:NameOfColor from Quantity);
809 ---C++: inline
810 ---Purpose:
811 -- Sets the color used to show that an object is not currently selected.
812 -- By default, this is Quantity_NOC_GRAY40.
813
814 SetDisplayMode(me:mutable;AMode: DisplayMode from AIS;
815 updateviewer: Boolean from Standard = Standard_True);
816 ---Purpose:
817 -- Sets the display mode of seen Interactive Objects.
818 -- aMode provides the display mode index of the entity aniobj.
819 -- If updateviewer equals Standard_True, the
820 -- predominant mode aMode will overule the context mode.
821 -- If a local context is open and if updateviewer equals
822 -- Standard_False, the presentation of the Interactive
823 -- Object returns to the default selection mode; the
824 -- object is displayed but no viewer will be updated.
825 -- Note that display mode 3 is only used if you have an
826 -- AIS_Textured Shape.
827
828
829 SetDeviationCoefficient(me : mutable;
830 aniobj : InteractiveObject from AIS;
831 aCoefficient : Real from Standard ;
832 updateviewer : Boolean from Standard = Standard_True);
833 --- Purpose:
834 -- Sets the deviation coefficient aCoefficient.
835 -- Drawings of curves or patches are made with respect
836 -- to a maximal chordal deviation. A Deviation coefficient
837 -- is used in the shading display mode. The shape is
838 -- seen decomposed into triangles. These are used to
839 -- calculate reflection of light from the surface of the
840 -- object. The triangles are formed from chords of the
841 -- curves in the shape. The deviation coefficient
842 -- aCoefficient gives the highest value of the angle with
843 -- which a chord can deviate from a tangent to a curve.
844 -- If this limit is reached, a new triangle is begun.
845 -- This deviation is absolute and is set through the
846 -- method: SetMaximalChordialDeviation. The default
847 -- value is 0.001.
848 -- In drawing shapes, however, you are allowed to ask
849 -- for a relative deviation. This deviation will be:
850 -- SizeOfObject * DeviationCoefficient.
851 -- default 0.001
852
853 SetDeviationAngle(me : mutable;
854 aniobj : InteractiveObject from AIS;
855 anAngle : Real from Standard ;
856 updateviewer : Boolean from Standard = Standard_True);
857
858 SetAngleAndDeviation(me : mutable;
859 aniobj : InteractiveObject from AIS;
860 anAngle : Real from Standard ;
861 updateviewer : Boolean from Standard = Standard_True);
862 ---Purpose: Calls the AIS_Shape SetAngleAndDeviation to set
863 -- both Angle and Deviation coefficients
864 SetHLRDeviationCoefficient(me : mutable;
865 aniobj : InteractiveObject from AIS;
866 aCoefficient : Real from Standard ;
867 updateviewer : Boolean from Standard = Standard_True);
868---Purpose:
869-- Sets the deviation coefficient aCoefficient for
870-- removal of hidden lines created by different
871-- viewpoints in different presentations. The Default value is 0.02.
872
873 SetHLRDeviationAngle(me : mutable;
874 aniobj : InteractiveObject from AIS;
875 anAngle : Real from Standard ;
876 updateviewer : Boolean from Standard = Standard_True);
877
878
879 SetHLRAngleAndDeviation(me : mutable;
880 aniobj : InteractiveObject from AIS;
881 anAngle : Real from Standard ;
882 updateviewer : Boolean from Standard = Standard_True);
883 ---Purpose : Computes a HLRAngle and a
884-- HLRDeviationCoefficient by means of the angle
885-- anAngle and sets the corresponding methods in the
886-- default drawing tool with these values.
887 --
888
889 SetDeviationCoefficient(me: mutable; aCoefficient: Real from Standard);
890 ---Purpose: Sets the deviation coefficient aCoefficient.
891-- Drawings of curves or patches are made with respect
892-- to a maximal chordal deviation. A Deviation coefficient
893-- is used in the shading display mode. The shape is
894-- seen decomposed into triangles. These are used to
895-- calculate reflection of light from the surface of the
896-- object. The triangles are formed from chords of the
897-- curves in the shape. The deviation coefficient
898-- aCoefficient gives the highest value of the angle with
899-- which a chord can deviate from a tangent to a curve.
900-- If this limit is reached, a new triangle is begun.
901-- This deviation is absolute and is set through the
902-- method: SetMaximalChordialDeviation. The default
903-- value is 0.001.
904-- In drawing shapes, however, you are allowed to ask
905-- for a relative deviation. This deviation will be:
906-- SizeOfObject * DeviationCoefficient.
907-- default 0.001
908
909 DeviationCoefficient(me) returns Real from Standard ;
910---Purpose: Returns the deviation coefficient.
911-- Drawings of curves or patches are made with respect
912-- to a maximal chordal deviation. A Deviation coefficient
913-- is used in the shading display mode. The shape is
914-- seen decomposed into triangles. These are used to
915-- calculate reflection of light from the surface of the
916-- object. The triangles are formed from chords of the
917-- curves in the shape. The deviation coefficient gives
918-- the highest value of the angle with which a chord can
919-- deviate from a tangent to a curve. If this limit is
920-- reached, a new triangle is begun.
921-- This deviation is absolute and is set through
6262338c 922-- Prs3d_Drawer::SetMaximalChordialDeviation. The
7fd59977 923-- default value is 0.001.
924-- In drawing shapes, however, you are allowed to ask
925-- for a relative deviation. This deviation will be:
926-- SizeOfObject * DeviationCoefficient.
927
928 SetDeviationAngle(me : mutable; anAngle : Real from Standard) ;
929 ---Purpose: default 6degrees
930 DeviationAngle(me) returns Real from Standard ;
931
932 SetHLRDeviationCoefficient(me: mutable; aCoefficient: Real from Standard);
933 ---Purpose: Sets the deviation coefficient aCoefficient for
934-- removal of hidden lines created by different
935-- viewpoints in different presentations. The Default value is 0.02.
936 HLRDeviationCoefficient(me) returns Real from Standard ;
937---Purpose:
938-- Returns the real number value of the hidden line
939-- removal deviation coefficient.
940-- A Deviation coefficient is used in the shading display
941-- mode. The shape is seen decomposed into triangles.
942-- These are used to calculate reflection of light from the
943-- surface of the object.
944-- The triangles are formed from chords of the curves in
945-- the shape. The deviation coefficient give the highest
946-- value of the angle with which a chord can deviate
947-- from a tangent to a curve. If this limit is reached, a
948-- new triangle is begun.
949-- To find the hidden lines, hidden line display mode
950-- entails recalculation of the view at each different
951-- projector perspective.
952-- Because hidden lines entail calculations of more than
953-- usual complexity to decompose them into these
954-- triangles, a deviation coefficient allowing greater
955-- tolerance is used. This increases efficiency in calculation.
956-- The Default value is 0.02.
957
958 SetHLRAngle(me: mutable; anAngle: Real from Standard);
959 ---Purpose: Sets the HLR angle anAngle.
960 HLRAngle(me) returns Real from Standard
961 is static;
962--- Purpose:
963-- Returns the real number value of the deviation angle
964-- in hidden line removal views in this interactive context.
965-- The default value is 20*PI/180.
966
967 SetHLRAngleAndDeviation(me: mutable; anAngle: Real from Standard);
968 ---Purpose: compute with anangle a HLRAngle and a HLRDeviationCoefficient
969 -- and set them in myHLRAngle and in myHLRDeviationCoefficient
970 -- of myDefaultDrawer ;
971 -- anAngle is in radian ; ( 1 deg < angle in deg < 20 deg)
972
6e33d3ce 973 HiddenLineAspect(me) returns LineAspect from Prs3d
7fd59977 974 ---Purpose: Initializes hidden line aspect in the default drawing tool, or Drawer.
975-- The default values are:
976 -- Color: Quantity_NOC_YELLOW
977 -- Type of line: Aspect_TOL_DASH
978 -- Width: 1.
979 is static;
980
981 SetHiddenLineAspect(me; anAspect: LineAspect from Prs3d)
982 is static;
983--- Purpose:
984-- Sets the hidden line aspect anAspect.
985-- anAspect defines display attributes for hidden lines in
986-- HLR projections.
987
988 DrawHiddenLine(me) returns Boolean from Standard
989 ---Purpose: returns Standard_True if the hidden lines are to be drawn.
990 -- By default the hidden lines are not drawn.
991 is static;
992
993 EnableDrawHiddenLine(me)
994 ---Purpose:
995 is static;
996
997 DisableDrawHiddenLine(me)
998 ---Purpose:
999 is static;
1000
1001
1002 SetIsoNumber(me : mutable;
1003 NbIsos : Integer from Standard;
1004 WhichIsos : TypeOfIso from AIS = AIS_TOI_Both);
1005---Purpose: Sets the number of U and V isoparameters displayed.
1006
1007 IsoNumber(me : mutable;
1008 WhichIsos : TypeOfIso from AIS = AIS_TOI_Both)
1009 returns Integer from Standard;
1010---Purpose: Returns the number of U and V isoparameters displayed.
1011
1012
1013 IsoOnPlane(me:mutable; SwitchOn :Boolean from Standard);
1014---Purpose: Returns True if drawing isoparameters on planes is enabled.
1015 IsoOnPlane(me) returns Boolean from Standard;
1016---Purpose: Returns True if drawing isoparameters on planes is enabled.
1017
1018 ---Purpose: if <forUIsos> = False,
1019
1020 SetSelectedAspect ( me : mutable; anAspect: any BasicAspect from Prs3d;
1021 globalChange: Boolean from Standard = Standard_True;
1022 updateViewer: Boolean from Standard = Standard_True)
1023 is static;
1024 ---Level: Public
1025 ---Purpose: Sets the graphic basic aspect to the current presentation of
1026 -- ALL selected objects.
1027 -- When <globalChange> is TRUE , the full object presentation
1028 -- is changed.
1029 -- When <globalChange> is FALSE , only the current group
1030 -- of the object presentation is changed.
eb4320f2 1031 -- Updates the viewer when <updateViewer> is TRUE
7fd59977 1032 ---Category: Graphic attributes management
1033
1034 ---Category: GRAPHIC DETECTION / SELECTION
1035
679ecdee 1036 MoveTo (me : mutable;
1037 theXPix, theYPix : Integer from Standard;
1038 theView : View from V3d;
1039 theToRedrawOnUpdate : Boolean from Standard = Standard_True)
7fd59977 1040 returns StatusOfDetection from AIS;
679ecdee 1041 ---Purpose: Relays mouse position in pixels theXPix and theYPix to the interactive context selectors.
1042 -- This is done by the view theView passing this position to the main viewer and updating it.
1043 -- Functions in both Neutral Point and local contexts.
1044 -- If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object.
7fd59977 1045
1046 HasNextDetected(me) returns Boolean from Standard;
1047 ---Purpose: returns True if other entities were detected in the
1048 -- last mouse detection
1049
679ecdee 1050 HilightNextDetected (me : mutable;
1051 theView : View from V3d;
1052 theToRedrawImmediate : Boolean from Standard = Standard_True)
7fd59977 1053 returns Integer from Standard;
1054 ---Purpose: if more than 1 object is detected by the selector,
1055 -- only the "best" owner is hilighted at the mouse position.
1056 -- This Method allows the user to hilight one after another
1057 -- the other detected entities.
1058 -- if The method select is called, the selected entity
1059 -- will be the hilighted one!
1060 -- returns the Rank of hilighted entity
1061 -- WARNING : Loop Method. When all the detected entities
1062 -- have been hilighted , the next call will hilight
1063 -- the first one again
1064
679ecdee 1065 HilightPreviousDetected (me : mutable;
1066 theView : View from V3d;
1067 theToRedrawImmediate : Boolean from Standard = Standard_True)
7fd59977 1068 returns Integer from Standard;
1069 ---Purpose: Same as previous methods in reverse direction...
1070
1071 Select(me:mutable;XPMin,YPMin,XPMax,YPMax:Integer from Standard;aView:View from V3d;
1072 updateviewer: Boolean from Standard = Standard_True)
1073 returns StatusOfPick from AIS;
1074 ---Purpose: Selects everything found in the bounding rectangle
1075-- defined by the pixel minima and maxima, XPMin,
1076-- YPMin, XPMax, and YPMax in the view, aView
1077-- The objects detected are passed to the main viewer,
1078-- which is then updated.
1079
1080 Select(me:mutable; Polyline:Array1OfPnt2d from TColgp;aView:View from V3d;
1081 updateviewer: Boolean from Standard = Standard_True)
1082 returns StatusOfPick from AIS;
1083 ---Purpose: polyline selection; clears the previous picked list
1084
1085 Select(me : mutable;
1086 updateviewer: Boolean from Standard = Standard_True)
1087 returns StatusOfPick from AIS;
1088 ---Purpose: Stores and hilights the previous detected; Unhilights
1089 -- the previous picked.
1090
1091 ShiftSelect(me : mutable;
1092 updateviewer : Boolean from Standard = Standard_True)
1093 returns StatusOfPick from AIS;
1094 ---Purpose: adds the last detected to the list of previous picked.
1095 -- if the last detected was already declared as picked,
1096 -- removes it from the Picked List.
1097
1098 ShiftSelect( me : mutable; Polyline : Array1OfPnt2d from TColgp; aView : View from V3d;
1099 updateviewer : Boolean from Standard = Standard_True)
1100 returns StatusOfPick from AIS;
1101 ---Purpose: adds the last detected to the list of previous picked.
1102 -- if the last detected was already declared as picked,
1103 -- removes it from the Picked List.
1104
1105
1106 ShiftSelect(me:mutable;XPMin,YPMin,XPMax,YPMax:Integer from Standard;aView:View from V3d;
1107 updateviewer : Boolean from Standard = Standard_True)
1108 returns StatusOfPick from AIS;
1109 ---Purpose: rectangle of selection ; adds new detected entities into the
1110 -- picked list, removes the detected entities that were already stored...
1111
1112 SetToHilightSelected(me: mutable; toHilight: Boolean from Standard);
1113 ---C++: inline
1114 ---Purpose: Specify whether selected object must be hilighted when mouse cursor
1115 --- is moved above it (in MoveTo method). By default this value is false and
1116 --- selected object is not hilighted in this case.
1117
1118 ToHilightSelected(me) returns Boolean from Standard;
1119 ---C++: inline
1120 ---Purpose: Return value specified whether selected object must be hilighted
1121 --- when mouse cursor is moved above it
1122
1123
1124 ---Category: non interactive actions about Selection
1125 -- 2 categories are distinct:
1126 -- - Current Objects
1127 -- - Selected Objects
1128 -- a Current object is the object picked
1129 -- at neutral Point.
1130 -- The Selected objects are objects picked
1131 -- when a local context is opened
1132
1133
1134 SetCurrentObject(me:mutable;
1135 aniobj: InteractiveObject from AIS;
1136 updateviewer : Boolean from Standard = Standard_True);
1137--- Purpose:
1138-- Updates the view of the current object in open context.
1139-- Objects selected when there is no open local context
1140-- are called current objects; those selected in open
1141-- local context, selected objects.
1142-- If a local context is open and if updateviewer equals
1143-- Standard_False, the presentation of the Interactive
1144-- Object activates the selection mode; the object is
1145-- displayed but no viewer will be updated.
1146
1147 AddOrRemoveCurrentObject(me:mutable;
1148 aniobj : InteractiveObject from AIS;
1149 updateviewer : Boolean from Standard = Standard_True);
1150---Purpose:
1151-- Allows you to add a current object to the list of current
1152-- objects or remove it from that list.
1153-- Objects selected when there is no open local context
1154-- are called current objects; those selected in open
1155-- local context, selected objects.
1156-- If a local context is open and if updateviewer equals
1157-- Standard_False, the presentation of the Interactive
1158-- Object activates the selection mode; the object is
1159-- displayed but no viewer will be updated.
1160 UpdateCurrent (me:mutable);
1161 ---Purpose: Updates the list of current objects, i.e. hilights new
1162-- current objects, removes hilighting from former current objects.
1163-- Objects selected when there is no open local context
1164-- are called current objects; those selected in open
1165-- local context, selected objects.
1166 --
1167
1168 WasCurrentTouched(me) returns Boolean from Standard;
1169 ---Purpose:
1170 -- Returns the current selection touched by the cursor.
1171 -- Objects selected when there is no open local context
1172 -- are called current objects; those selected in open
1173 -- local context, selected objects.
1174 ---C++: inline
1175
1176 SetOkCurrent(me:mutable);
1177 ---C++: inline
1178
1179 IsCurrent(me;aniobj: InteractiveObject from AIS) returns Boolean from Standard;
1180--- Purpose:
1181-- Returns true if there is a non-null interactive object in Neutral Point.
1182-- Objects selected when there is no open local context
1183-- are called current objects; those selected in open
1184-- local context, selected objects.
1185
1186 InitCurrent(me:mutable);
1187--- Purpose:
1188-- Initializes a scan of the current selected objects in
1189-- Neutral Point.
1190-- Objects selected when there is no open local context
1191-- are called current objects; those selected in open
1192-- local context, selected objects.
1193
1194 MoreCurrent(me) returns Boolean from Standard;
1195--- Purpose:
1196-- Returns true if there is another object found by the
1197-- scan of the list of current objects.
1198-- Objects selected when there is no open local context
1199-- are called current objects; those selected in open
1200-- local context, selected objects.
1201
1202 NextCurrent(me:mutable);
1203---Purpose:
1204-- Continues the scan to the next object in the list of
1205-- current objects.
1206-- Objects selected when there is no open local context
1207-- are called current objects; those selected in open
1208-- local context, selected objects.
1209
1210 Current(me) returns InteractiveObject from AIS;
1211---Purpose:
1212-- Returns the current interactive object.
1213-- Objects selected when there is no open local context
1214-- are called current objects; those selected in open
1215-- local context, selected objects.
1216
1217 NbCurrents(me:mutable) returns Integer from Standard;
1218
1219 FirstCurrentObject(me:mutable) returns InteractiveObject from AIS;
1220---Purpose:
1221-- Returns the first current object in the list of current objects.
1222-- Objects selected when there is no open local context
1223-- are called current objects; those selected in open
1224-- local context, selected objects.
1225
1226 HilightCurrents(me : mutable;
1227 updateviewer : Boolean from Standard=Standard_True);
1228 ---Purpose:
1229--- Highlights current objects.
1230-- Objects selected when there is no open local context
1231-- are called current objects; those selected in open
1232-- local context, selected objects.
1233-- If a local context is open and if updateviewer equals
1234-- Standard_False, the presentation of the Interactive
1235-- Object activates the selection mode; the object is
1236-- displayed but no viewer will be updated.
1237
1238 UnhilightCurrents(me : mutable;
1239 updateviewer : Boolean from Standard=Standard_True);
1240---Purpose:
1241-- Removes highlighting from current objects.
1242-- Objects selected when there is no open local context
1243-- are called current objects; those selected in open
1244-- local context, selected objects.
1245-- If a local context is open and if updateviewer equals
1246-- Standard_False, the presentation of the Interactive
1247-- Object activates the selection mode; the object is
1248-- displayed but no viewer will be updated.
1249
1250 ClearCurrents(me:mutable;
1251 updateviewer : Boolean from Standard=Standard_True);
1252---Purpose:
1253-- Empties previous current objects in order to get the
1254-- current objects detected by the selector using
1255-- UpdateCurrent.
1256-- Objects selected when there is no open local context
1257-- are called current objects; those selected in open
1258-- local context, selected objects.
1259-- If a local context is open and if updateviewer equals
1260-- Standard_False, the presentation of the Interactive
1261-- Object activates the selection mode; the object is
1262-- displayed but no viewer will be updated.
1263
1264 SetSelected(me:mutable;aniObj: InteractiveObject from AIS;
1265 updateviewer : Boolean from Standard=Standard_True);
1266 ---Purpose: Puts the interactive object aniObj in the list of
1267 -- selected objects.
1268 -- If a local context is open and if updateviewer equals
1269 -- Standard_False, the presentation of the Interactive
1270 -- Object activates the selection mode; the object is
1271 -- displayed but no viewer will be updated.
1272
1273 SetSelectedCurrent(me:mutable);
1274 ---Purpose: puts the selected list in the current objects List.
1275 UpdateSelected(me:mutable;
1276 updateviewer : Boolean from Standard=Standard_True);
1277 ---Purpose: updates the list of selected objects
1278 -- i.e. hilights the new selected
1279 -- unhilights old selected objects
1280 AddOrRemoveSelected(me:mutable;
1281 aniobj : InteractiveObject from AIS;
1282 updateviewer : Boolean from Standard=Standard_True);
1283 ---Purpose:Allows you to add a selected object to the list of
1284-- selected objects or remove it from that list. This entity
1285-- can be an Interactive Object aniobj or its owner
1286-- aShape as can be seen in the two syntaxes above.
1287-- Objects selected when there is no open local context
1288-- are called current objects; those selected in open
1289-- local context, selected objects.
1290-- If a local context is open and if updateviewer equals
1291-- Standard_False, the presentation of the Interactive
1292-- Object activates the selection mode; the object is
1293-- displayed but no viewer will be updated.
1294
1295 HilightSelected(me : mutable;
1296 updateviewer : Boolean from Standard=Standard_True);
1297---Purpose:
1298-- Highlights selected objects.
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-- If a local context is open and if updateviewer equals
1303-- Standard_False, the presentation of the Interactive
1304-- Object activates the selection mode; the object is
1305-- displayed but no viewer will be updated.
1306
1307 UnhilightSelected(me : mutable;
1308 updateviewer : Boolean from Standard=Standard_True);
1309---Purpose:
1310-- Removes highlighting from selected objects.
1311-- Objects selected when there is no open local context
1312-- are called current objects; those selected in open
1313-- local context, selected objects.
1314-- If a local context is open and if updateviewer equals
1315-- Standard_False, the presentation of the Interactive
1316-- Object activates the selection mode; the object is
1317-- displayed but no viewer will be updated.
1318
1319 ClearSelected(me:mutable;
1320 updateviewer : Boolean from Standard=Standard_True);
1321---Purpose:
1322-- Empties previous selected objects in order to get the
1323-- selected objects detected by the selector using
1324-- UpdateSelected.
1325-- Objects selected when there is no open local context
1326-- are called current objects; those selected in open
1327-- local context, selected objects.
1328-- If a local context is open and if updateviewer equals
1329-- Standard_False, the presentation of the Interactive
1330-- Object activates the selection mode; the object is
1331-- displayed but no viewer will be updated.
1332
1333 AddOrRemoveSelected(me:mutable;aShape:Shape from TopoDS;
1334 updateviewer : Boolean from Standard=Standard_True);
1335 ---Purpose: No right to Add a selected Shape (Internal Management
1336 -- of shape Selection).
1337 -- A Previous selected shape may only be removed.
1338
1339
1340 AddOrRemoveSelected(me:mutable;anOwner : EntityOwner from SelectMgr;
1341 updateviewer: Boolean from Standard=Standard_True);
1342 ---Purpose: allows to add/remove in the selected list the entities
1343 -- represented by <anOwner> in the selection process.
1344
1345 ---Category: Selection Process
1346
1347 IsSelected(me;aniobj: InteractiveObject from AIS) returns Boolean from Standard;
1348 --- Purpose:
1349-- Finds the selected object aniobj in local context and
1350-- returns its name.
1351-- Objects selected when there is no open local context
1352-- are called current objects; those selected in open
1353-- local context, selected objects.
1354
1355 InitSelected(me:mutable);
1356---Purpose:
1357-- Initializes a scan of the selected objects in local context.
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
1362 MoreSelected(me) returns Boolean from Standard;
1363---Purpose:
1364-- Returns true if there is another object found by the
1365-- scan of the list of selected objects.
1366-- Objects selected when there is no open local context
1367-- are called current objects; those selected in open
1368-- local context, selected objects.
1369
1370
1371 NextSelected(me:mutable);
1372---Purpose:
1373-- Continues the scan to the next object in the list of
1374-- selected objects.
1375-- Objects selected when there is no open local context
1376-- are called current objects; those selected in open
1377-- local context, selected objects.
1378
1379 NbSelected(me:mutable) returns Integer from Standard;
1380
1381 HasSelectedShape(me) returns Boolean from Standard;
1382--- Purpose:
1383-- Returns true if the interactive context has a shape
1384-- selected in it which results from the decomposition of
1385-- another entity in local context.
1386-- If HasSelectedShape returns true, SelectedShape
1387-- returns the shape which has been shown to be
1388-- selected. Interactive returns the Interactive Object
1389-- from which the shape has been selected.
1390-- If HasSelectedShape returns false, Interactive
1391-- returns the interactive entity selected by the click of the mouse.
1392
1393 SelectedShape(me) returns Shape from TopoDS;
1394---Purpose:
1395-- Returns the selected shape in the open local context.
1396-- Objects selected when there is no open local context
1397-- are called current objects; those selected in open
1398-- local context, selected objects.
1399
1400 SelectedOwner(me) returns EntityOwner from SelectMgr;
1401---Purpose:
1402-- Returns the owner of the selected entity resulting
1403-- from the decomposition of another entity in local context.
1404
1405 EntityOwners(me; theOwners : out IndexedMapOfOwner from SelectMgr;
1406 theIObj : InteractiveObject from AIS;
1407 theMode : Integer from Standard = -1);
1408 ---Purpose: Returns a collection containing all entity owners
1409 --- created for the interactive object <theIObj> in
1410 --- the selection mode theMode (in all active modes
1411 --- if the Mode == -1)
1412
1413 Interactive(me) returns InteractiveObject from AIS;
1414 ---Purpose: Returns the location of the selected Interactive Object.
1415 SelectedInteractive(me) returns InteractiveObject from AIS;
1416
1417 HasApplicative(me) returns Boolean from Standard;
1418--- Purpose:
1419-- Returns true if the applicative object has an owner
1420-- from Interactive attributed to it.
1421
1422 Applicative(me) returns Transient from Standard;
1423---Purpose:
1424-- Returns the owner of the applicative entity detected
1425-- in interactive context. The owner can be a shape for
1426-- a set of sub-shapes or a sub-shape for sub-shapes
1427-- which it is composed of.
1428
1429 ---Category: information about detection...
1430
1431 HasDetected (me) returns Boolean from Standard;
1432---Purpose:
1433-- Returns true if there is a mouse-detected entity in local context.
1434-- If there is no open local context, the objects selected
1435-- are called current objects; selected objects if there is
1436-- one. Iterators allow entities to be recovered in either
1437-- case. This method is one of a set which allows you to
1438-- manipulate the objects which have been placed in these two lists.
1439
1440 HasDetectedShape(me) returns Boolean from Standard;
1441---Purpose:
1442-- Returns true if there is a detected shape in local context.
1443-- If there is no open local context, the objects selected
1444-- are called current objects; selected objects if there is
1445-- one. Iterators allow entities to be recovered in either
1446-- case. This method is one of a set which allows you to
1447-- manipulate the objects which have been placed in these two lists.
1448
1449 DetectedShape (me) returns Shape from TopoDS;
1450 ---Purpose:
1451 -- Returns the shape detected in local context.
1452 -- If there is no open local context, the objects selected
1453 -- are called current objects; selected objects if there is
1454 -- one. Iterators allow entities to be recovered in either
1455 -- case. This method is one of a set which allows you to
1456 -- manipulate the objects which have been placed in these two lists.
1457 ---C++: return const &
1458
1459 DetectedInteractive(me) returns InteractiveObject from AIS;
1460---Purpose:
1461-- Returns the interactive objects last detected in open context.
1462-- If there is no open local context, the objects selected
1463-- are called current objects; selected objects if there is
1464-- one. Iterators allow entities to be recovered in either
1465-- case. This method is one of a set which allows you to
1466-- manipulate the objects which have been placed in these two lists.
1467
1468 DetectedOwner(me) returns EntityOwner from SelectMgr;
1469 ---Purpose: returns the owner of the detected sensitive primitive.
1470
1471 InitDetected(me: mutable);
57ad5cbd 1472 ---Purpose:
1473 -- Initialization for iteration through mouse-detected objects in
1474 -- interactive context or in local context if it is opened.
7fd59977 1475 MoreDetected(me) returns Boolean from Standard;
57ad5cbd 1476 ---Purpose:
1477 -- @return true if there is more mouse-detected objects after the current one
1478 -- during iteration through mouse-detected interactive objects.
7fd59977 1479 NextDetected(me: mutable);
57ad5cbd 1480 ---Purpose:
1481 -- Gets next current object during iteration through mouse-detected
1482 -- interactive objects.
7fd59977 1483 DetectedCurrentShape(me) returns Shape from TopoDS;
1484 ---C++: return const &
57ad5cbd 1485 ---Purpose:
1486 -- @return current mouse-detected shape or empty (null) shape, if current interactive object
1487 -- is not a shape (AIS_Shape) or there is no current mouse-detected interactive object at all.
7fd59977 1488 DetectedCurrentObject(me) returns InteractiveObject from AIS;
57ad5cbd 1489 --Purpose:
1490 -- @return current mouse-detected interactive object or null object if there is no current detected.
1491
7fd59977 1492
1493 ---Category: SPECIFIC LOCAL CONTEXT ACTIONS.
1494
1495
1496
1497 OpenLocalContext(me : mutable;
1498 UseDisplayedObjects : Boolean from Standard = Standard_True;
1499 AllowShapeDecomposition : Boolean from Standard = Standard_True;
1500 AcceptEraseOfObjects : Boolean from Standard = Standard_False;
1501 BothViewers : Boolean from Standard = Standard_False)
1502 returns Integer from Standard;
1503 ---Purpose:
1504-- Opens local contexts and specifies how this is to be
1505-- done. The options listed above function in the following manner:
1506-- - UseDisplayedObjects -allows you to load or not
1507-- load the interactive objects visualized at Neutral
1508-- Point in the local context which you open. If false,
1509-- the local context is empty after being opened. If
1510-- true, the objects at Neutral Point are loaded by their
1511-- default selection mode.
1512-- - AllowShapeDecomposition -AIS_Shape allows or
1513-- prevents decomposition in standard shape location
1514-- mode of objects at Neutral Point which are
1515-- type-"privileged". This Flag is only taken into
1516-- account when UseDisplayedObjects is true.
1517-- - AcceptEraseOfObjects -authorises other local
1518-- contexts to erase the interactive objects present in
1519-- this context. This option is rarely used.
1520-- - BothViewers - Has no use currently defined.
1521-- This method returns the index of the created local
1522-- context. It should be kept and used to close the context.
1523-- Opening a local context allows you to prepare an
1524-- environment for temporary presentations and
1525-- selections which will disappear once the local context is closed.
1526-- You can open several local contexts, but only the last
1527-- one will be active.
1528
1529
1530
1531 CloseLocalContext(me:mutable;
1532 Index : Integer from Standard = -1;
1533 updateviewer:Boolean from Standard=Standard_True);
1534 ---Purpose: Allows you to close local contexts. For greater
1535-- security, you should close the context with the
1536-- index Index given on opening.
1537-- When you close a local context, the one before,
1538-- which is still on the stack, reactivates. If none is
1539-- left, you return to Neutral Point.
1540-- If a local context is open and if updateviewer
1541-- equals Standard_False, the presentation of the
1542-- Interactive Object activates the selection mode; the
1543-- object is displayed but no viewer will be updated.
1544-- Warning
1545-- When the index isn't specified, the current context
1546-- is closed. This option can be dangerous, as other
1547-- Interactive Functions can open local contexts
1548-- without necessarily warning the user.
1549
1550 IndexOfCurrentLocal(me) returns Integer from Standard;
1551 ---Purpose: returns -1 if no opened local context.
1552
1553 CloseAllContexts (me:mutable;updateviewer:Boolean from Standard = Standard_True);
1554---Purpose:
1555-- Allows you to close all local contexts at one go and
1556-- return to Neutral Point.
1557-- If a local context is open and if updateviewer equals
1558-- Standard_False, the presentation of the Interactive
1559-- Object activates the selection mode; the object is
1560-- displayed but no viewer will be updated.
1561
1562 ResetOriginalState(me:mutable;updateviewer:Boolean from Standard = Standard_True);
1563 ---Level: Internal
1564 ---Purpose: to be used only with no opened
1565 -- local context.. displays and activates objects in their
1566 -- original state before local contexts were opened...
1567
1568 ClearLocalContext(me:mutable;TheMode : ClearMode from AIS = AIS_CM_All);
1569 ---Purpose: clears Objects/Filters/Activated Modes list in the current opened
1570 -- local context.
1571
1572
1573 UseDisplayedObjects(me:mutable);
1574 NotUseDisplayedObjects(me:mutable);
1575 ---Purpose: when a local Context is opened, one is able to
1576 -- use/not use the displayed objects at neutral point
1577 -- at anytime.
1578
1579
1580
1581 ---Category: Immediate Mode : Used For Simulation
1582 --
1583 -- CAUTION
1584 -- 1] NO UPDATE OF VIEWER MUST BE DONE
1585 -- BETWEEN BeginImmediateDraw() and EndImmediateDraw()
1586 -- 2] Available only Inside Opened Local Contexts.
1587 -- 3} During the Immediate Mode Displays, no Selection
1588 -- is available.
1589 --
1590 -- How To Use It?
1591 --
1592 -- 1. BeginImmediateDraw()
1593 -- 2. ImmediateAdd (Iobj,mode)
1594 --
1595 -- 4.EndImmediateDraw() draws all the stored objects...
1596 --
1597
679ecdee 1598 BeginImmediateDraw (me : mutable)
1599 returns Boolean from Standard;
7fd59977 1600 ---Purpose: initializes the list of presentations to be displayed
1601 -- returns False if No Local COnte
1602
679ecdee 1603 ImmediateAdd (me : mutable;
1604 theObj : InteractiveObject from AIS;
1605 theMode : Integer from Standard = 0)
7fd59977 1606 returns Boolean from Standard;
1607 ---Purpose: returns True if <anIObj> has been stored in the list.
1608
679ecdee 1609 EndImmediateDraw (me : mutable;
1610 theView : View from V3d)
7fd59977 1611 returns Boolean from Standard;
1612 ---Purpose: returns True if the immediate display has been done.
679ecdee 1613
1614 EndImmediateDraw (me : mutable)
7fd59977 1615 returns Boolean from Standard;
679ecdee 1616 ---Purpose: Uses the First Active View of Main Viewer!
7fd59977 1617 -- returns True if the immediate display has been done.
1618
1619 IsImmediateModeOn(me) returns Boolean from Standard;
1620
7fd59977 1621 ---Category: Activation/Deactivation of Selection Modes.
1622
7fd59977 1623 SetAutomaticHilight(me:mutable;aStatus:Boolean);
1624---Purpose:
1625-- Sets the highlighting status aStatus of detected and
1626-- selected entities.
1627-- Whether you are in Neutral Point or local context, this
1628-- is automatically managed by the Interactive Context.
1629-- This function allows you to disconnect the automatic mode.
1630 AutomaticHilight(me) returns Boolean from Standard;
1631---Purpose:
1632-- Returns true if the automatic highlight mode is active
1633-- in an open context.
1634
1635 SetZDetection(me:mutable; aStatus:Boolean = Standard_False);
1636 ---Purpose: Enables/Disables the Z detection.
1637 -- If TRUE the detection echo can be partially hidden by the
1638 -- detected object.
1639 ---Warning: The hidden part of the object is not visible but
1640 -- stay selectable.
1641
1642 ZDetection(me) returns Boolean;
1643 ---Purpose: Retrieves the Z detection state.
1644
f751596e 1645 Activate(me : mutable;
1646 anIobj : InteractiveObject from AIS;
1647 aMode : Integer from Standard = 0;
1648 theIsForce : Boolean from Standard = Standard_False);
7fd59977 1649 ---Purpose: Activates the selection mode aMode whose index is
1650-- given, for the given interactive entity anIobj.
1651
1652
1653 Deactivate(me :mutable;
1654 anIObj : InteractiveObject from AIS);
1655 ---Purpose: Deactivates all the activated selection modes
1656 -- of an object.
1657
1658 Deactivate(me : mutable;
1659 anIobj : InteractiveObject from AIS;
1660 aMode : Integer from Standard);
1661---Purpose:
1662-- Deactivates all the activated selection modes of the
1663-- interactive object anIobj with a given selection mode aMode.
1664
1665 ActivatedModes(me;
1666 anIobj : InteractiveObject from AIS;
1667 theList : in out ListOfInteger from TColStd);
1668---Purpose:
1669-- Returns the list of activated selection modes in an open context.
1670
1671 SetShapeDecomposition( me:mutable;
1672 anIobj : InteractiveObject from AIS;
1673 aStatus: Boolean from Standard);
1674 ---Purpose: to be Used only with opened local context and
1675 -- if <anIobj> is of type shape...
1676 -- if <aStatus> = True <anIobj> will be sensitive to
1677 -- shape selection modes activation.
1678 -- = False, <anIobj> will not be senstive
1679 -- any more.
1680 --
1681
1682 SetTemporaryAttributes(me : mutable;
1683 anObj : InteractiveObject from AIS;
1684 aDrawer : Drawer from Prs3d;
1685 updateviewer : Boolean = Standard_True);
1686
1687---Purpose:
1688-- Sets the temporary graphic attributes of the entity
1689-- anObj. These are provided by the attribute manager
1690-- aDrawer and are valid for a particular local context only.
1691-- If a local context is open and if updateviewer equals
1692-- Standard_False, the presentation of the Interactive
1693-- Object activates the selection mode; the object is
1694-- displayed but no viewer will be updated.
1695
1696 SubIntensityOn(me : mutable;
1697 aniobj : InteractiveObject from AIS;
1698 updateviewer : Boolean from Standard =Standard_True);
1699---Purpose:
1700-- Highlights, and removes highlights from, the displayed
1701-- object aniobj which is displayed at Neutral Point with
1702-- subintensity color; available only for active local
1703-- context. There is no effect if there is no local context.
1704-- If a local context is open and if updateviewer equals
1705-- Standard_False, the presentation of the Interactive
1706-- Object activates the selection mode; the object is
1707-- displayed but no viewer will be updated.
1708
1709 SubIntensityOff(me : mutable;
1710 aniobj : InteractiveObject from AIS;
1711 updateviewer : Boolean from Standard =Standard_True);
1712---Purpose:
1713-- Removes the subintensity option for the entity aniobj.
1714-- If a local context is open and if updateviewer equals
1715-- Standard_False, the presentation of the Interactive
1716-- Object activates the selection mode; the object is
1717-- displayed but no viewer will be updated.
1718
1719 SubIntensityOn(me:mutable;
1720 updateviewer : Boolean from Standard = Standard_True);
1721 ---Purpose: hilights/unhilights displayed objects which are displayed at
1722 -- neutral state with subintensity color;
1723 -- available only for active local context.
1724 -- No effect if no local context.
1725
1726
1727 SubIntensityOff(me:mutable;
1728 updateviewer : Boolean from Standard = Standard_True);
1729 ---Purpose: removes subintensity option for all objects.
1730
1731
1732
1733
1734
1735
1736
1737 ---Category: FILTERS
1738 --
1739 --
1740 --
1741
1742 AddFilter(me :mutable; aFilter : Filter from SelectMgr);
1743 ---Purpose: Allows you to add the filter aFilter to Neutral Point or
1744-- to a local context if one or more selection modes have been activated.
1745-- Only type filters may be active in Neutral Point.
1746
1747 RemoveFilter(me:mutable;aFilter : Filter from SelectMgr);
1748
1749---Purpose:
1750-- Removes a filter from Neutral Point or a local context
1751-- if one or more selection modes have been activated.
1752-- Only type filters are activated in Neutral Point.
1753
1754 RemoveFilters(me:mutable);
1755 ---Purpose: Remove a filter to Neutral Point or a local context if
1756-- one or more selection modes have been activated.
1757-- Only type filters are active in Neutral Point.
1758
1759 ActivateStandardMode(me:mutable; aStandardActivation : ShapeEnum from TopAbs);
1760 ---Purpose: Provides an alternative to the Display methods when
1761-- activating specific selection modes. This has the
1762-- effect of activating the corresponding selection mode
1763-- aStandardActivation for all objects in Local Context
1764-- which accept decomposition into sub-shapes.
1765-- Every new Object which has been loaded into the
1766-- interactive context and which answers these
1767-- decomposition criteria is automatically activated
1768-- according to these modes.
1769-- Warning
1770-- If you have opened a local context by loading an
1771-- object with the default options
1772-- (<AllowShapeDecomposition >= Standard_True), all
1773-- objects of the "Shape" type are also activated with
1774-- the same modes. You can act on the state of these
1775-- "Standard" objects by using SetShapeDecomposition(Status).
1776
1777
1778 DeactivateStandardMode (me:mutable; aStandardActivation : ShapeEnum from TopAbs);
1779---Purpose:
1780-- Provides an alternative to the Display methods when
1781-- deactivating specific selection modes. This has the
1782-- effect of deactivating the corresponding selection
1783-- mode aStandardActivation for all objects in Local
1784-- Context which accept decomposition into sub-shapes.
1785
1786 ActivatedStandardModes(me) returns ListOfInteger from TColStd;
1787 ---Purpose:
1788 -- Returns the list of activated standard selection modes
1789 -- available in a local context.
1790 ---C++: return const&
1791
1792 Filters(me) returns ListOfFilter from SelectMgr;
1793 ---Purpose:
1794 -- Returns the list of filters active in a local context.
1795 ---C++: return const&
1796
1797
1798 ---Category: INFORMATION METHODS - GET FIELDS
1799
1800 DefaultDrawer(me) returns any Drawer from Prs3d;
1801 ---Purpose:
1802 -- Returns the default attribute manager.
1803 -- This contains all the color and line attributes which
1804 -- can be used by interactive objects which do not have
1805 -- their own attributes.
1806 ---C++: inline
1807 ---C++: return const &
1808
1809 CurrentViewer(me) returns any Viewer from V3d;
1810 ---C++: return const &
1811 ---C++: inline
1812 ---Purpose: Returns the current viewer.
1813
1814 DisplayedObjects(me;
1815 aListOfIO : in out ListOfInteractive from AIS;
1816 OnlyFromNeutral : Boolean from Standard = Standard_False);
1817 ---Purpose: Returns the list of displayed objects of a particular
1818 -- Type WhichKind and Signature WhichSignature. By
1819 -- Default, WhichSignature equals -1. This means that
1820 -- there is a check on type only.
1821
1822 DisplayedObjects(me;
1823 WhichKind :KindOfInteractive from AIS;
1824 WhichSignature :Integer from Standard;
1825 aListOfIO : in out ListOfInteractive from AIS;
1826 OnlyFromNeutral : Boolean from Standard = Standard_False);
1827 ---Purpose: gives the list of displayed objects of a particular
1828 -- Type and signature.
1829 -- by Default, <WhichSignature> = -1 means
1830 -- control only on <WhichKind>.
1831
7fd59977 1832 ErasedObjects (me;theListOfIO : in out ListOfInteractive from AIS);
1833 ---Purpose:
eb4320f2 1834 -- Returns the list theListOfIO of erased objects (hidden objects)
7fd59977 1835 -- particular Type WhichKind and Signature WhichSignature.
1836 -- By Default, WhichSignature equals 1. This means
1837 -- that there is a check on type only.
1838
1839 ErasedObjects (me;
1840 WhichKind :KindOfInteractive from AIS;
1841 WhichSignature :Integer from Standard;
1842 theListOfIO : in out ListOfInteractive from AIS);
eb4320f2 1843 ---Purpose: gives the list of erased objects (hidden objects)
7fd59977 1844 -- Type and signature
1845 -- by Default, <WhichSignature> = -1 means
1846 -- control only on <WhichKind>.
1847
1848 ObjectsByDisplayStatus (me;theStatus : DisplayStatus from AIS;
1849 theListOfIO : in out ListOfInteractive from AIS);
1850 ---Purpose:
1851 -- Returns the list theListOfIO of objects with indicated display status
1852 -- particular Type WhichKind and Signature WhichSignature.
1853 -- By Default, WhichSignature equals 1. This means
1854 -- that there is a check on type only.
1855
1856 ObjectsByDisplayStatus (me;
1857 WhichKind :KindOfInteractive from AIS;
1858 WhichSignature :Integer from Standard;
1859 theStatus : DisplayStatus from AIS;
1860 theListOfIO : in out ListOfInteractive from AIS);
1861 ---Purpose: gives the list of objects with indicated display status
1862 -- Type and signature
1863 -- by Default, <WhichSignature> = -1 means
1864 -- control only on <WhichKind>.
1865
1866 ObjectsInside(me;
1867 aListOfIO : in out ListOfInteractive from AIS;
1868 WhichKind : KindOfInteractive from AIS = AIS_KOI_None;
1869 WhichSignature : Integer from Standard = -1);
1870 ---Purpose: fills <aListOfIO> with objects of a particular
1871 -- Type and Signature with no consideration of display status.
1872 -- by Default, <WhichSignature> = -1 means
1873 -- control only on <WhichKind>.
1874 -- if <WhichKind> = AIS_KOI_None and <WhichSignature> = -1,
1875 -- all the objects are put into the list.
1876
1877
1878 HasOpenedContext(me) returns Boolean from Standard;
1879 ---Purpose: Returns true if there is an open context.
1880 ---C++: inline
1881
1882 CurrentName(me) returns AsciiString from TCollection;
1883 ---Purpose:
1884 -- Returns the name of the current selected entity in Neutral Point.
1885 -- Objects selected when there is no open local context
1886 -- are called current objects; those selected in open
1887 -- local context, selected objects.
1888 ---C++: inline
1889 ---C++: return const&
1890
1891 SelectionName(me) returns AsciiString from TCollection;
1892 ---Purpose:
1893 -- Returns the name of the current selected entity in
1894 -- open local context.
1895 -- Objects selected when there is no open local context
1896 -- are called current objects; those selected in open
1897 -- local context, selected objects.
1898 ---C++: return const&
1899
1900 DomainOfMainViewer(me) returns CString from Standard;
1901 ---Purpose: Returns the domain name of the main viewer.
eb4320f2 1902
7fd59977 1903 ---Category: Internal
1904
1bd2fa67
A
1905 ---Category: Internal
1906
1907 LocalContext(me) returns LocalContext from AIS;
1908 ---Level: Internal
1909 ---Purpose:
1910 -- This method is only intended for advanced operation, particularly with
1911 -- the aim to improve performance when many objects have to be selected
1912 -- together. Otherwise, you should use other (non-internal) methods of
1913 -- class AIS_InteractiveContext without trying to obtain an instance of
1914 -- AIS_LocalContext.
1915 ---C++: inline
1916
7fd59977 1917 SelectionManager(me) returns any SelectionManager from SelectMgr;
1918 ---C++: inline
1919 ---C++: return const &
1920
1921 MainPrsMgr (me) returns any PresentationManager3d from PrsMgr;
1922 ---C++: inline
1923 ---C++: return const &
7fd59977 1924
f751596e 1925 MainSelector(me) returns ViewerSelector3d from StdSelect;
7fd59977 1926 ---C++: inline
1927 ---C++: return const &
f751596e 1928 LocalSelector(me) returns ViewerSelector3d from StdSelect;
7fd59977 1929
eb4320f2 1930 PurgeDisplay(me:mutable)
7fd59977 1931 returns Integer from Standard;
1932 ---Level: Internal
1933 ---Purpose: Clears all the structures which don't
1934 -- belong to objects displayed at neutral point
1935 -- only effective when no Local Context is opened...
1936 -- returns the number of removed structures from the viewers.
1937
1938
1939 HighestIndex(me) returns Integer from Standard;
7fd59977 1940
1941 DisplayActiveSensitive(me:mutable;aView : View from V3d) is static;
1942
1943 ClearActiveSensitive(me:mutable;aView:View from V3d) is static;
1944
b586500b 1945 FitSelected (me : mutable;
1946 theView : View from V3d;
1947 theMargin : Real from Standard = 0.01;
1948 theToUpdate : Boolean from Standard = Standard_True)
1949 is static;
1950 ---Level: Public
1951 ---Purpose: Fits the view correspondingly to the bounds of selected objects.
1952 -- Infinite objects are ignored if infinite state of AIS_InteractiveObject
1953 -- is set to true.
1954
7fd59977 1955
1956
1957 DisplayActiveSensitive(me:mutable;
1958 anObject: InteractiveObject from AIS;
1959 aView : View from V3d) is static;
7fd59977 1960
1961 GetDefModes(me;
1962 anIobj : InteractiveObject from AIS;
1963 Dmode,HiMod,SelMode : in out Integer from Standard) is static private;
1964
1965
1966 EraseGlobal(me : mutable;
eb4320f2 1967 anObj : InteractiveObject from AIS;
1968 updateviewer : Boolean from Standard = Standard_True) is static private;
7fd59977 1969
1970 ClearGlobal(me : mutable;
1971 anObj : InteractiveObject from AIS;
1972 updateviewer : Boolean from Standard = Standard_True) is static private;
1973
1974 ClearGlobalPrs(me : mutable;
1975 anObj : InteractiveObject from AIS;
1976 aMode : Integer from Standard;
1977 updateviewer : Boolean from Standard = Standard_True) is static private;
1978
1979
1980 ---Category: Private Methods
1981
1982 IsInLocal(me;
1983 anObject : InteractiveObject from AIS;
1984 TheIndex : in out Integer from Standard)
1985 returns Boolean from Standard;
1986 ---Purpose: returns if possible,
1987 -- the first local context where the object is seen
1988
f751596e 1989 RebuildSelectionStructs (me : mutable);
1990 ---Purpose: Rebuilds 1st level of BVH selection forcibly
a272ed94 1991 SetViewAffinity (me : mutable;
1992 theIObj : InteractiveObject from AIS;
1993 theView : View from V3d;
1994 theIsVisible : Boolean from Standard) is static;
1995 ---Purpose: setup object visibility in specified view,
1996 -- has no effect if object is not disaplyed in this context.
1997
f751596e 1998 Disconnect (me : mutable;
1999 theAssembly : InteractiveObject from AIS;
2000 theObjToDisconnect : InteractiveObject from AIS = NULL)
2001 is static;
2002 ---Purpose: Disconnects theObjToDisconnect from theAssembly and removes dependent selection structures
2003
a272ed94 2004 ObjectsForView (me;
2005 theListOfIO : in out ListOfInteractive from AIS;
2006 theView : View from V3d;
2007 theIsVisibleInView : Boolean from Standard;
2008 theStatus : DisplayStatus from AIS = AIS_DS_None) is static;
2009 ---Purpose: Query objects visible or hidden in specified view due to affinity mask.
7fd59977 2010
2011 InitAttributes(me:mutable) is static private;
2012
2013
2014 PurgeViewer(me:mutable;Vwr:Viewer from V3d)
2015 returns Integer from Standard is static private;
2016
2195ab96 2017 redisplayPrsModes (me : mutable;
2018 theIObj : InteractiveObject from AIS;
2019 theToUpdateViewer : Boolean from Standard = Standard_True) is static private;
2020 ---Purpose: UNKNOWN
2021
2022 redisplayPrsRecModes (me : mutable;
2023 theIObj : InteractiveObject from AIS;
2024 theToUpdateViewer : Boolean from Standard = Standard_True) is static private;
2025 ---Purpose: UNKNOWN
2026
7fd59977 2027fields
2028
2029 myObjects : DataMapOfIOStatus from AIS;
2030
2031 -- the viewers, prsmgr, selectors
2032 mgrSelector : SelectionManager from SelectMgr;
2033
2034 myMainPM : PresentationManager3d from PrsMgr;
2035 myMainVwr : Viewer from V3d;
2036 myMainSel : ViewerSelector3d from StdSelect;
2037
7fd59977 2038 -- the selection and current objects.
2039
2040 mySelectionName : AsciiString from TCollection;
2041 myCurrentName : AsciiString from TCollection;
2042
2043 myLastPicked : InteractiveObject from AIS;
2044 myLastinMain : InteractiveObject from AIS;
7fd59977 2045
2046
2047 myWasLastMain : Boolean from Standard;
2048 myCurrentTouched : Boolean from Standard;
2049 mySelectedTouched : Boolean from Standard;
2050 myToHilightSelected : Boolean from Standard;
2051
2052 -- the neutral point filter...
2053
2054 myFilters : OrFilter from SelectMgr;
2055
2056 -- the attributes of session...
2057
2058 myDefaultDrawer : Drawer from Prs3d;
2059 myDefaultColor : NameOfColor from Quantity; -- for shading....
2060 myHilightColor : NameOfColor from Quantity;
2061 mySelectionColor : NameOfColor from Quantity;
2062 myPreselectionColor : NameOfColor from Quantity;
2063 mySubIntensity : NameOfColor from Quantity;
2064 myDisplayMode : Integer from Standard;
2065
2066 -- The Local Context...
2067
2068 myLocalContexts : DataMapOfILC from AIS;
2069 myCurLocalIndex : Integer from Standard;
2070 mylastmoveview : View from V3d;
2071
57ad5cbd 2072 -- The detected objects
2073
7fd59977 2074 myAISDetectedSeq : SequenceOfInteractive from AIS;
57ad5cbd 2075 -- the sequence of detected interative objects.
7fd59977 2076 myAISCurDetected : Integer from Standard;
57ad5cbd 2077 -- current detected interactive object.
2078 -- This variable is used by following functions:
7fd59977 2079 -- InitDetected(), MoreDetected(), NextDetected(), DetectedCurrentShape(), DetectedCurrentObject().
57ad5cbd 2080 myZDetectionFlag: Boolean from Standard;
2081 -- This variable is used by SetZDetection() and ZDetection() methods
7fd59977 2082
2083 -- abd:
2084 myIsAutoActivateSelMode : Boolean from Standard;
2085
2086friends
2087 class LocalContext from AIS
2088
2089end InteractiveContext;