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