391a2121b5729c26a7c9f6a36606c0ed82cf9434
[occt.git] / src / StdSelect / StdSelect_BRepOwner.cdl
1 -- File:        StdSelect_BRepOwner.cdl
2 -- Created:     Wed Mar  8 15:56:17 1995
3 -- Author:      Mister rmi
4 --              <rmi@photon>
5 ---Copyright:    Matra Datavision 1995
6
7
8
9 class BRepOwner from StdSelect inherits EntityOwner from SelectMgr
10
11         ---Purpose: Defines Specific Owners for Sensitive Primitives
12         --          (Sensitive Segments,Circles...).
13         --          Used in Dynamic Selection Mechanism.
14         --          A BRepOwner has an Owner (the shape it represents)
15         --          and Users (One or More Transient entities).
16
17 uses
18     Location              from TopLoc,
19     Shape                 from TopoDS,
20     SelectableObject      from SelectMgr,
21     EntityOwner           from SelectMgr,
22     Presentation          from Prs3d,
23     PresentationManager   from PrsMgr,
24     PresentationManager3d from PrsMgr,
25     NameOfColor           from Quantity,
26     Drawer                from Prs3d,
27     Shape                 from StdSelect
28 is
29
30
31     Create(aPriority:Integer from Standard)
32     returns mutable BRepOwner from StdSelect;
33         ---Purpose: Constructs an owner specification framework defined
34         -- by the priority aPriority.
35     Create (aShape    : Shape from TopoDS;
36             aPriority : Integer = 0;
37             ComesFromDecomposition:Boolean from Standard = Standard_False)
38     returns mutable BRepOwner;
39         ---Purpose: Constructs an owner specification framework defined
40         -- by the shape aShape and the priority aPriority.
41         -- aShape and aPriority are stored in this framework. If
42         -- more than one owner are detected during dynamic
43         -- selection, the one with the highest priority is the one stored.
44
45     Create (aShape    : Shape from TopoDS;
46             theOrigin : SelectableObject from SelectMgr;
47             aPriority : Integer = 0;
48             FromDecomposition:Boolean from Standard = Standard_False)
49     returns mutable BRepOwner;
50         ---Purpose: Constructs an owner specification framework defined
51         -- by the shape aShape, the selectable object theOrigin
52         -- and the priority aPriority.
53         -- aShape, theOrigin and aPriority are stored in this
54         -- framework. If more than one owner are detected
55         -- during dynamic selection, the one with the highest
56         -- priority is the one stored.
57
58
59     HasShape(me) returns Boolean from Standard;
60     ---C++: inline
61     ---Purpose: returns False if no shape was set
62     --          
63     
64     Set(me     : mutable;
65         aShape : Shape from TopoDS;
66         FromDecomposition:Boolean from Standard=Standard_False);
67     ---Purpose: <FromDecomposition> indicates whether <aShape>
68     --          comes from decomposition of a bigger shape.
69
70     ComesFromDecomposition(me) returns Boolean from Standard;
71     ---C++: inline
72
73     Shape(me) returns Shape from TopoDS ;
74     ---C++: inline
75     ---C++: return const&
76     
77
78     ---Category: hilight of detected shapes...
79
80     HasHilightMode(me) returns Boolean from Standard;
81         ---Purpose:
82         -- Returns true if this framework has a highlight mode defined for it.
83         ---C++: inline
84     
85     SetHilightMode(me:mutable;aMode : Integer from Standard);
86         ---C++: inline
87         ---Purpose: Sets the highlight mode for this framework.
88         -- This defines the type of display used to highlight the
89         -- owner of the shape when it is detected by the selector.
90         -- The default type of display is wireframe, defined by the index 0.
91
92     ResetHilightMode(me:mutable) ;
93         ---Purpose: Resets the higlight mode for this framework.
94         -- This defines the type of display used to highlight the
95         -- owner of the shape when it is detected by the selector.
96         -- The default type of display is wireframe, defined by the index 0.
97         ---C++: inline
98     HilightMode(me) returns Integer from Standard;
99         ---Purpose: Returns the highlight mode for this framework.
100         -- This defines the type of display used to highlight the
101         -- owner of the shape when it is detected by the selector.
102         -- The default type of display is wireframe, defined by the index 0.
103         ---C++: inline
104
105     IsHilighted (me  ;
106                  aPM   : PresentationManager from PrsMgr;
107                  aMode : Integer  from  Standard  =0)
108     returns Boolean from Standard is redefined virtual;    
109         ---Purpose: Returns true if an object with the selection mode
110         -- aMode is highlighted in the presentation manager aPM.
111     Hilight(me:mutable) is redefined virtual;
112  
113     Hilight(me    : mutable;
114             aPM   : PresentationManager from PrsMgr;
115             aMode : Integer  from  Standard  =0) is redefined virtual;   
116         --- Purpose: Returns the selection mode aMode defining the type
117         -- of shape highlighted in the presentation manager aPM.        
118     HilightWithColor  (me    : mutable;
119                        aPM   : PresentationManager3d from PrsMgr;
120                        aCol  : NameOfColor from Quantity;
121                        aMode : Integer  from  Standard  =0) is redefined virtual;    
122             
123     Unhilight(me    : mutable;
124               aPM   : PresentationManager from PrsMgr;
125               aMode : Integer  from  Standard  =0) is redefined virtual;    
126         ---Purpose: Removes highlighting from the type of shape
127         -- identified the selection mode aMode in the presentation manager aPM.
128     Clear(me: mutable;  
129           aPM   : PresentationManager from PrsMgr;
130           aMode : Integer  from  Standard  =0) is redefined virtual;    
131         ---Purpose: Clears the presentation manager object aPM of all
132         -- shapes with the selection mode aMode.
133         
134     SetLocation(me:mutable; aLoc : Location from TopLoc) is redefined;
135     ResetLocation(me:mutable) is redefined;
136
137 fields
138     myPrsSh             : Shape   from StdSelect; 
139     myCurMode           : Integer from Standard;
140     myFromDecomposition : Boolean from Standard is protected;
141     myShape             : Shape from TopoDS     is protected;
142 end BRepOwner;
143
144