0023654: Problem with displaying vertices in OCC view after closing all OCC views...
[occt.git] / src / PrsMgr / PrsMgr_PresentationManager.cdl
CommitLineData
b311480e 1-- Created on: 1995-01-25
2-- Created by: Jean-Louis Frenkel
3-- Copyright (c) 1995-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
22deferred class PresentationManager from PrsMgr
23inherits TShared from MMgt
24
25 ---Purpose: This class represents any kind of entity able to collect
26 -- representations of an object, to show or erase them.
27 -- Example: StructureManager from Graphic3d
28 -- View from Graphic2d
29
30uses
31 Presentation from PrsMgr,
32 PresentableObject from PrsMgr,
6942f04a 33 View from V3d,
7fd59977 34 ListOfTransient from TColStd
35
36
37raises
38 NoSuchObject from Standard
39is
40
41 Initialize;
42
43 Is3D(me) returns Boolean from Standard is deferred;
44
45 Display(me: mutable; aPresentableObject: mutable PresentableObject from PrsMgr;
46 aMode: Integer from Standard = 0)
47 ---Purpose: Displays the presentation of the object in the given
48 -- Presentation manager with the given mode.
49 -- The mode should be enumerated by the object which
50 -- inherits PresentableObject.
51 is static;
52
53 Erase(me:mutable; aPresentableObject: PresentableObject from PrsMgr;
54 aMode: Integer from Standard = 0)
55 ---Level: public
56 ---Purpose: erases the presentation of the object in the given
57 -- Presentation manager with the given mode.
58 is static;
59
60 Clear(me:mutable; aPresentableObject: PresentableObject from PrsMgr;
61 aMode: Integer from Standard = 0)
62 is virtual;
63 ---Purpose:
64 -- Clears the presentation of the presentable object
65 -- aPresentableObject in this framework with the
66 -- display mode aMode.
67
eb4320f2 68 SetVisibility (me: mutable; thePresentableObject: PresentableObject from PrsMgr;
69 theMode: Integer from Standard;
70 theValue: Boolean from Standard);
71 ---Purpose: Sets the visibility of presentable object.
72
7fd59977 73 Highlight(me: mutable; aPresentableObject: mutable PresentableObject from PrsMgr;
74 aMode: Integer from Standard = 0)
75 ---Purpose: Highlights the presentation of the presentable object
76 -- aPresentableObject in this framework with the display mode aMode.
77 is static;
78
79 Unhighlight(me:mutable; aPresentableObject: PresentableObject from PrsMgr;
80 aMode: Integer from Standard = 0)
81 ---Purpose: Removes highlighting from the presentation of the
82 -- presentable object aPresentableObject in this
83 -- framework with the display mode aMode.
84 is static;
85
86 SetDisplayPriority(me;aPresentableObject: PresentableObject from PrsMgr;
87 amode:Integer from Standard;
88 aNewPrior:Integer from Standard);
89 ---Purpose:
90 -- Sets the display priority aNewPrior of the
91 -- presentable object aPresentableObject in this
92 -- framework with the display mode aMode.
93
94 DisplayPriority(me;aPresentableObject: PresentableObject from PrsMgr;
95 amode:Integer from Standard)
96 returns Integer from Standard;
97 ---Purpose:
98 -- Returns the display priority of the presentable object
99 -- aPresentableObject in this framework with the
100 -- display mode aMode.
101
59f45b7c 102 SetZLayer ( me : mutable;
103 thePresentableObject : PresentableObject from PrsMgr;
104 theLayerId : Integer from Standard )
105 is static;
106 ---Purpose: Set Z layer ID for all presentations of the object.
107
108 GetZLayer ( me;
109 thePresentableObject : PresentableObject from PrsMgr )
110 returns Integer from Standard is static;
111 ---Purpose: Get Z layer ID assigned to all presentations of the object.
112 -- Method returns -1 value if object has no presentations and is
113 -- impossible to get layer index.
114
7fd59977 115 IsDisplayed(me;aPresentableObject: PresentableObject from PrsMgr;
116 aMode: Integer from Standard = 0)
117 ---Purpose: Returns true if the presentation of the presentable
118 -- object aPresentableObject in this framework with the
119 -- display mode aMode is displayed.
120 returns Boolean from Standard
121 is static;
122
123 IsHighlighted(me;aPresentableObject: PresentableObject from PrsMgr;
124 aMode: Integer from Standard = 0)
125 ---Purpose: Returns true if the presentation of the presentable
126 -- object aPresentableObject in this framework with the
127 -- display mode aMode is highlighted.
128 returns Boolean from Standard
129 is static;
130
131
132 Update(me; aPresentableObject: PresentableObject from PrsMgr;
133 aMode: Integer from Standard = 0)
134 ---Purpose: Updates the presentation of the presentable object
135 -- aPresentableObject in this framework with the display mode aMode.
136 is static;
137
138 ---Category: Immediate display methods.
139
140 BeginDraw(me: mutable) is virtual;
141 ---Purpose: initializes the list of Prs to be displayed in transient mode
142
143 Add(me: mutable ; aPresentableObject: PresentableObject from PrsMgr;
144 aMode: Integer from Standard = 0);
145 ---Purpose: Performs an iteration of the transient objects to look
146 -- for the presentable objects with the display mode aMode.
147 -- Appends the presentation of the presentable object
148 -- aPresentableObject with the mode aMode to the list
149 -- of objects in immediate mode.
150
151 Remove(me: mutable ; aPresentableObject: PresentableObject from PrsMgr;
152 aMode: Integer from Standard = 0);
153 ---Purpose: Performs an iteration of the transient objects to look
154 -- for the presentable objects with the display mode aMode.
155 -- Removes the presentation of the presentable object
156 -- aPresentableObject with the mode aMode from the
157 -- list of objects in immediate mode.
158
6942f04a 159 EndDraw(me: mutable; aView: View from V3d; DoubleBuffer: Boolean from Standard = Standard_False)
7fd59977 160 ---Purpose: Allows rapid drawing of the view aView by avoiding
161 -- an update of the whole background. If DoubleBuffer
162 -- is true, the background is drawn.
163 is deferred;
164
165 IsImmediateModeOn(me) returns Boolean from Standard;
166 ---C++: inline
167 ---Purpose: Returns true if immediate (transient) mode is on.
168
169
170
171 ---Category: Private & deferred methods.
172
173 HasPresentation (me;
174 aPresentableObject: PresentableObject from PrsMgr;
175 aMode: Integer from Standard = 0)
176 returns Boolean from Standard
177 is static;
178 ---Purpose: Returns true if there is a presentation of the
179 -- presentable object aPresentableObject in this
180 -- framework, aPresentableObject having the display mode aMode.
181
182 Presentation (me;
183 aPresentableObject: PresentableObject from PrsMgr;
184 aMode: Integer from Standard = 0)
185 returns mutable Presentation from PrsMgr
186 raises NoSuchObject from Standard
187 is static;
188 ---Purpose: Returns the presentation Presentation of the
189 -- presentable object aPresentableObject in this
190 -- framework. aPresentableObject has the display mode aMode.
191
192 AddPresentation(me: mutable;
193 aPresentableObject: PresentableObject from PrsMgr;
194 aMode: Integer from Standard = 0)
195 ---Purpose: Adds a presentation of the presentable object
196 -- aPresentableObject to this framework.
197 -- aPresentableObject has the display mode aMode.
198 is protected;
199
200 RemovePresentation(me: mutable;
201 aPresentableObject: PresentableObject from PrsMgr;
202 aMode: Integer from Standard = 0)
203 ---Purpose: Removes a presentation of the presentable object
204 -- aPresentableObject to this framework.
205 -- aPresentableObject has the display mode aMode.
206 is protected;
207
208 newPresentation(me: mutable; aPresentableObject: PresentableObject from PrsMgr)
209 returns mutable Presentation from PrsMgr
210 ---Level: Internal
211 ---Purpose: Creates a new presentation in the presentation manager.
212 is deferred private;
213
214fields
215 myImmediateMode: Boolean from Standard is protected;
216 myImmediateList: ListOfTransient from TColStd is protected;
217
218end PresentationManager from PrsMgr;