0024394: Visualization - implement more general way for rendering of immediate objects
[occt.git] / src / StdSelect / StdSelect_BRepOwner.cdl
CommitLineData
b311480e 1-- Created on: 1995-03-08
2-- Created by: Mister rmi
3-- Copyright (c) 1995-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class BRepOwner from StdSelect inherits EntityOwner from SelectMgr
18
19 ---Purpose: Defines Specific Owners for Sensitive Primitives
20 -- (Sensitive Segments,Circles...).
21 -- Used in Dynamic Selection Mechanism.
22 -- A BRepOwner has an Owner (the shape it represents)
23 -- and Users (One or More Transient entities).
ff8178ef 24 -- The highlight-unhighlight methods are empty and
25 -- must be redefined by each User.
7fd59977 26
27uses
28 Location from TopLoc,
29 Shape from TopoDS,
30 SelectableObject from SelectMgr,
31 EntityOwner from SelectMgr,
32 Presentation from Prs3d,
33 PresentationManager from PrsMgr,
34 PresentationManager3d from PrsMgr,
35 NameOfColor from Quantity,
36 Drawer from Prs3d,
a1954302 37 Shape from StdSelect,
38 ZLayerId from Graphic3d
7fd59977 39is
40
41
42 Create(aPriority:Integer from Standard)
6e33d3ce 43 returns BRepOwner from StdSelect;
7fd59977 44 ---Purpose: Constructs an owner specification framework defined
45 -- by the priority aPriority.
46 Create (aShape : Shape from TopoDS;
47 aPriority : Integer = 0;
48 ComesFromDecomposition:Boolean from Standard = Standard_False)
6e33d3ce 49 returns BRepOwner;
7fd59977 50 ---Purpose: Constructs an owner specification framework defined
51 -- by the shape aShape and the priority aPriority.
52 -- aShape and aPriority are stored in this framework. If
53 -- more than one owner are detected during dynamic
54 -- selection, the one with the highest priority is the one stored.
55
56 Create (aShape : Shape from TopoDS;
57 theOrigin : SelectableObject from SelectMgr;
58 aPriority : Integer = 0;
59 FromDecomposition:Boolean from Standard = Standard_False)
6e33d3ce 60 returns BRepOwner;
7fd59977 61 ---Purpose: Constructs an owner specification framework defined
62 -- by the shape aShape, the selectable object theOrigin
63 -- and the priority aPriority.
64 -- aShape, theOrigin and aPriority are stored in this
65 -- framework. If more than one owner are detected
66 -- during dynamic selection, the one with the highest
67 -- priority is the one stored.
68
69
70 HasShape(me) returns Boolean from Standard;
71 ---C++: inline
72 ---Purpose: returns False if no shape was set
73 --
74
75 Set(me : mutable;
76 aShape : Shape from TopoDS;
77 FromDecomposition:Boolean from Standard=Standard_False);
78 ---Purpose: <FromDecomposition> indicates whether <aShape>
79 -- comes from decomposition of a bigger shape.
80
81 ComesFromDecomposition(me) returns Boolean from Standard;
82 ---C++: inline
83
84 Shape(me) returns Shape from TopoDS ;
85 ---C++: inline
86 ---C++: return const&
87
88
89 ---Category: hilight of detected shapes...
90
91 HasHilightMode(me) returns Boolean from Standard;
92 ---Purpose:
93 -- Returns true if this framework has a highlight mode defined for it.
94 ---C++: inline
95
96 SetHilightMode(me:mutable;aMode : Integer from Standard);
97 ---C++: inline
98 ---Purpose: Sets the highlight mode for this framework.
99 -- This defines the type of display used to highlight the
100 -- owner of the shape when it is detected by the selector.
101 -- The default type of display is wireframe, defined by the index 0.
102
103 ResetHilightMode(me:mutable) ;
104 ---Purpose: Resets the higlight mode for this framework.
105 -- This defines the type of display used to highlight the
106 -- owner of the shape when it is detected by the selector.
107 -- The default type of display is wireframe, defined by the index 0.
108 ---C++: inline
109 HilightMode(me) returns Integer from Standard;
110 ---Purpose: Returns the highlight mode for this framework.
111 -- This defines the type of display used to highlight the
112 -- owner of the shape when it is detected by the selector.
113 -- The default type of display is wireframe, defined by the index 0.
114 ---C++: inline
115
116 IsHilighted (me ;
117 aPM : PresentationManager from PrsMgr;
118 aMode : Integer from Standard =0)
119 returns Boolean from Standard is redefined virtual;
120 ---Purpose: Returns true if an object with the selection mode
121 -- aMode is highlighted in the presentation manager aPM.
122 Hilight(me:mutable) is redefined virtual;
123
124 Hilight(me : mutable;
125 aPM : PresentationManager from PrsMgr;
126 aMode : Integer from Standard =0) is redefined virtual;
127 --- Purpose: Returns the selection mode aMode defining the type
128 -- of shape highlighted in the presentation manager aPM.
129 HilightWithColor (me : mutable;
130 aPM : PresentationManager3d from PrsMgr;
131 aCol : NameOfColor from Quantity;
132 aMode : Integer from Standard =0) is redefined virtual;
133
134 Unhilight(me : mutable;
135 aPM : PresentationManager from PrsMgr;
136 aMode : Integer from Standard =0) is redefined virtual;
137 ---Purpose: Removes highlighting from the type of shape
138 -- identified the selection mode aMode in the presentation manager aPM.
139 Clear(me: mutable;
140 aPM : PresentationManager from PrsMgr;
141 aMode : Integer from Standard =0) is redefined virtual;
142 ---Purpose: Clears the presentation manager object aPM of all
143 -- shapes with the selection mode aMode.
144
145 SetLocation(me:mutable; aLoc : Location from TopLoc) is redefined;
146 ResetLocation(me:mutable) is redefined;
147
59f45b7c 148 SetZLayer ( me : mutable;
a1954302 149 theLayerId : ZLayerId from Graphic3d )
59f45b7c 150 is redefined virtual;
151 ---Purpose: Set Z layer ID and update all presentations.
152
7fd59977 153fields
154 myPrsSh : Shape from StdSelect;
155 myCurMode : Integer from Standard;
156 myFromDecomposition : Boolean from Standard is protected;
157 myShape : Shape from TopoDS is protected;
158end BRepOwner;
159
160