0023525: Disappearing of highlight in screenshot
[occt.git] / src / Visual3d / Visual3d_TransientManager.cdl
CommitLineData
b311480e 1-- Created on: 1995-10-10
2-- Created by: GG
3-- Copyright (c) 1995-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
7fd59977 5--
b311480e 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.
7fd59977 10--
b311480e 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.
7fd59977 13--
b311480e 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 21class TransientManager from Visual3d inherits TShared
22
23 ---Version:
24
25 ---Purpose: This class allows to manage transient graphics
26 -- above one View.
27 -- A simple way to drawn something very quicly above
28 -- a complex scene (Hilighting,Sketching,...)
7fd59977 29 -- All transient graphics will be erased at the next
30 -- View::BeginDraw().
31 -- If RetainMode is active,
32 -- All transient graphics will be kept at the
33 -- next View::Update(),Redraw(). The transient graphics
34 -- is stored by this object and graphic library, the
35 -- graphic managed itself exposure,resizing,...
36 -- The method View::ClearDraw() is necessary to erase
37 -- all transient graphics.
38 -- If RetainMode is deactivate,
39 -- All transient graphics will be erased at the
40 -- next View::Update(),Redraw().
41 -- Remember that nothing is stored by this object and
42 -- graphic library,the application must managed itself
43 -- exposure,resizing,...
44 -- If double_buffering is activate,
45 -- all graphics are drawn in the back buffer and flushed
46 -- in the front buffer at the end of drawing but nothing
47 -- is done for to separate transient from structured
48 -- graphics,the only way to regenerate the structured
49 -- view is to Redraw() the view.
50 -- If double_buffering is deactivate,
51 -- the back buffer is preserved and used for restoring
52 -- the front buffer at begin drawing time.I recommend
53 -- to use the second way (without DB) if you want
54 -- to preserve the graphics and the performances!
55
56
57uses
58
59 Array2OfReal from TColStd,
60
61 ExtendedString from TCollection,
62
63 PlaneAngle from Quantity,
64
65 Structure from Graphic3d,
66 AspectLine3d from Graphic3d,
67 AspectFillArea3d from Graphic3d,
68 AspectText3d from Graphic3d,
69 AspectMarker3d from Graphic3d,
70 TypeOfComposition from Graphic3d,
71 TextPath from Graphic3d,
72 HorizontalTextAlignment from Graphic3d,
73 VerticalTextAlignment from Graphic3d,
74
75 View from Visual3d
76
77raises
78 TransientDefinitionError from Visual3d,
79 TransformError from Graphic3d
80
81is
82 -------------------------
83 -- Category: Constructors
84 -------------------------
85
86 Create returns mutable TransientManager from Visual3d;
87 ---Purpose: Creates a TransientManager <aView>.
88 ---Category: Constructors
89
90 ------------------------
91 -- Category: Destructors
92 ------------------------
93
94 Destroy (me : mutable);
95 ---Level: Public
96 ---Purpose: Suppress the TransientManager <me>.
97 ---Category: Destructors
98 ---C++: alias ~
99
100 ---------------------------------------------------
101 -- Category: Methods to modify the class definition
102 ---------------------------------------------------
103
104 BeginDraw (myclass;
105 aView : View from Visual3d;
106 DoubleBuffer: Boolean = Standard_False;
107 RetainMode: Boolean = Standard_False)
108 returns Boolean from Standard
109 ---Level: Public
110 ---Purpose: Begins any graphics in the view <aView>
111 -- Redraw any structured graphics in the back buffer before
112 -- if <DoubleBuffer> is TRUE.
113 -- Restore the front buffer from the back before
114 -- if <DoubleBuffer> is FALSE.
115 -- if <RetainMode> is TRUE.
116 -- the graphic managed itself exposure,resizing ...
117 -- if <RetainMode> is FALSE.
118 -- the application must managed itself exposure,resizing ...
119 --
120 -- Warning: Returns TRUE if transient drawing is enabled in
121 -- the associated view.
122 -- Returns FALSE ,if nothing works because something
123 -- is wrong for the transient principle :
124 -- Immediat mode is not implemented depending of the
125 -- graphic library used.
126 -- MBX,PIXMAP double buffering don't works depending of
127 -- the graphic board and the visual of the window supporting
128 -- the view.
129 -- Warning: No default attributes
130 -- Raises TransientDefinitionError from Visual3d;
131 -- if Drawing is already opened.
132 -- or the associated view is not mapped on a window.
133 raises TransientDefinitionError from Visual3d;
1981cb22 134
7fd59977 135 EndDraw (myclass;
136 Synchronize: Boolean = Standard_False)
137 ---Level: Public
138 ---Purpose: Flush all graphics to the front buffer.
139 -- Synchronize graphics to the screen if <Synchronize> is
140 -- TRUE (make becarefull to the performances!).
141 -- Raises TransientDefinitionError from Visual3d;
142 -- if Drawing is not opened.
143 raises TransientDefinitionError from Visual3d;
1981cb22 144
7fd59977 145 ClearDraw (myclass; aView : View from Visual3d;
146 aFlush : Boolean from Standard = Standard_True)
147 ---Level: Public
148 ---Purpose: Clear all transient graphics in the view <aView>
149 --- updates a scene if <aFlush> = true
150 -- Raises TransientDefinitionError from Visual3d;
151 -- if Drawing is already opened.
152 -- or the associated view is not mapped on a window.
153 raises TransientDefinitionError from Visual3d;
1981cb22 154
7fd59977 155 ---------------------------------------------------
156 -- Category: Methods to modify the class definition
157 ---------------------------------------------------
158
159 BeginAddDraw (myclass;
160 aView : View from Visual3d)
161 returns Boolean from Standard
162 ---Level: Public
163 ---Purpose: Begins any add graphics in the view <aView>
164 -- the application must managed itself exposure,resizing ...
165 --
166 -- Warning: Returns TRUE if transient drawing is enabled in
167 -- the associated view.
168 -- Returns FALSE ,if nothing works because something
169 -- is wrong for the transient principle :
170 -- Immediat mode is not implemented depending of the
171 -- graphic library used.
172 -- MBX,PIXMAP double buffering don't works depending of
173 -- the graphic board and the visual of the window supporting
174 -- the view.
175 -- Warning: No default attributes
176 -- Raises TransientDefinitionError from Visual3d;
177 -- if Drawing is already opened.
178 -- or the associated view is not mapped on a window.
179 raises TransientDefinitionError from Visual3d;
1981cb22 180
7fd59977 181 EndAddDraw (myclass)
182 ---Purpose: Flush all add graphics to the front buffer.
183 -- Raises TransientDefinitionError from Visual3d;
184 -- if Drawing is not opened.
1981cb22 185 raises TransientDefinitionError from Visual3d;
7fd59977 186
187 ---------------------------------------
188 -- Category: Graphic definition methods
189 ---------------------------------------
190
7fd59977 191 DrawStructure (myclass;
192 AStructure : Structure from Graphic3d)
193 ---Purpose: Drawn the structure <AStructure>.
194 -- Raises TransientDefinitionError from Visual3d;
195 -- if Drawing is not opened.
196 raises TransientDefinitionError from Visual3d;
7fd59977 197
7fd59977 198end TransientManager from Visual3d;