0023510: Integration of test grid "vis" into the new testing system
[occt.git] / src / Graphic2d / Graphic2d.cdl
1 -- Created on: 1993-06-22
2 -- Created by: Jean Louis FRENKEL, Gerard Gras.
3 -- Copyright (c) 1993-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
21
22 -- Modified:    TCL 12-06-00 G002 new enumeration PickMode
23 -- Modified:    SAV 16/08/02 new enumeration DisplayStatus
24
25
26 package Graphic2d
27
28         ---Version:
29
30         ---Purpose: This package permits the creation of 2d graphic objects
31         --          in a visualiser.
32         --          Each object, called GraphicObject, is composed of
33         --          primitives and is created in a View.
34         --          Each Primitive is a class and contains attributes.
35         --          Each Primitive have its own method Draw to draw the
36         --          primitive.
37         --          A View manages a set of graphic objects.
38         --          A Drawer makes conversions.
39
40         ---Keywords: Drawer, View, Graphic Object, Primitive, Line,
41         --           Circle, Polyline, Ellips, Curve, Image, Text, HidingText,
42         --           FramedText, Paragraph
43         ---Warning:
44         ---References:
45
46 uses
47         Aspect,
48         PlotMgt,
49 --      Geom2d,         -- disparait a partir de K4
50         Image,
51         MMgt,
52         gp,
53         OSD,
54         Quantity,
55         TCollection,
56         TColStd,
57         TShort
58
59 is
60         -----------------------
61         -- Category: Exceptions
62         -----------------------
63
64         exception CircleDefinitionError inherits OutOfRange;
65         ---Category: Exceptions
66
67         exception EllipsDefinitionError inherits OutOfRange;
68         ---Category: Exceptions
69
70         exception ImageDefinitionError inherits OutOfRange;
71         ---Category: Exceptions
72
73         exception InfiniteLineDefinitionError inherits OutOfRange;
74         ---Category: Exceptions
75
76         exception MarkerDefinitionError inherits OutOfRange;
77         ---Category: Exceptions
78
79         exception PolylineDefinitionError inherits OutOfRange;
80         ---Category: Exceptions
81
82         exception SegmentDefinitionError inherits OutOfRange;
83         ---Category: Exceptions
84
85         exception TextDefinitionError inherits OutOfRange;
86         ---Category: Exceptions
87
88         exception DrawerDefinitionError inherits OutOfRange;
89         ---Category: Exceptions
90
91         exception OverrideColorError inherits OutOfRange;
92         ---Category: Exceptions
93
94         exception DetectionColorError inherits OutOfRange;
95         ---Category: Exceptions
96
97 --      exception CurveDefinitionError inherits OutOfRange;     -- disparait a partir de K4
98         ---Category: Exceptions
99
100         exception TransientDefinitionError inherits OutOfRange;
101         ---Category: Exceptions
102
103         ---------------------------------
104         -- Category: The deferred classes
105         ---------------------------------
106
107         deferred class Primitive;
108         ---Purpose: Groups all drawing elements stored in a
109         --          graphic object.
110         ---Category: The deferred classes
111
112         deferred class Line;
113         ---Purpose: Groups all the primitives which behaves like
114         --          geometrical lines.
115         --          for example: Polyline, Circle ...
116         ---Category: The deferred classes
117
118         deferred class VectorialMarker;
119         ---Purpose: Groups all the primitives which behaves like
120         --          geometrical marker.
121         --          for example : EllipsMarker, CircleMarker ...
122         ---Category: The deferred classes
123
124         ------------------------
125         -- Category: The classes
126         ------------------------
127
128         class Buffer;
129         ---Purpose: A Buffer is a list of primitives and/or
130         --          GraphicObject drawn with one color.
131         --          This Buffer is used to attach geometry to
132         --          the cursor in a Aspect_WindowDriver.
133
134         class Drawer;
135         ---Purpose: Internal class, makes conversions.
136
137         class GraphicObject;
138         ---Purpose: A GraphicObject is a primitives manager.
139
140         class HidingGraphicObject;
141         ---Purpose: A HidingGraphicObject is a primitives manager.
142
143         class Vertex;
144         ---Purpose: Defines a 2D point.
145
146         class View;
147         ---Purpose: A View is a graphic object manager.
148
149         class ViewMapping;
150         ---Purpose: Defines a view mapping.
151
152         class TransientManager;
153         ---Purpose: To draw temporary graphics in a view.
154
155         ---------------------------
156         -- Category: Imported types
157         ---------------------------
158
159         imported CBitFields8;
160         ---Purpose: Defines the C structure
161         ---Category: Imported types
162
163         ---------------------
164         -- Category: Pointers
165         ---------------------
166
167         pointer ViewPtr to View from Graphic2d;
168         ---Category: Pointers
169
170         pointer GOPtr to GraphicObject from Graphic2d;
171         ---Category: Pointers
172
173         -------------------------------
174         -- Category: Graphic primitives
175         -------------------------------
176
177         class Circle;
178         ---Category: Graphic primitives
179
180 --      class Curve;    -- disparait a partir de K4
181         ---Category: Graphic primitives
182
183         class Ellips;
184         ---Category: Graphic primitives
185
186         class Image;
187         ---Category: Graphic primitives
188
189         class ImageFile;
190         ---Category: Graphic primitives
191
192         class InfiniteLine;
193         ---Category: Graphic primitives
194
195         class Marker;
196         ---Category: Graphic primitives
197
198         class Polyline;
199         ---Category: Graphic primitives
200
201         class Segment;
202         ---Category: Graphic primitives
203
204         class Text;
205         ---Category: Graphic primitives
206
207         class HidingText;
208         ---Category: Graphic primitives
209
210         class FramedText;
211         ---Category: Graphic primitives
212
213         class Paragraph;
214         ---Category: Graphic primitives
215
216         class CircleMarker;
217         ---Category: Graphic primitives
218
219         class PolylineMarker;
220         ---Category: Graphic primitives
221
222         class EllipsMarker;
223         ---Category: Graphic primitives
224
225         class SetOfSegments;
226         ---Category: Set Of Graphic primitives
227
228         class SetOfMarkers;
229         ---Category: Set Of Graphic primitives
230
231 --      class SetOfCurves;      -- disparait a partir de K4
232         ---Category: Set Of Graphic primitives
233
234         class SetOfPolylines;
235         ---Category: Set Of Graphic primitives
236
237         ---------------------------------
238         -- Category: enumerations
239         ---------------------------------
240
241         enumeration TypeOfPolygonFilling is     TOPF_EMPTY,
242                                                 TOPF_FILLED,
243                                                 TOPF_PATTERNED
244         end TypeOfPolygonFilling from Graphic2d;
245         ---Purpose:
246         -- Defines whether the polygon is filled or displays an
247         -- empty background.
248         -- -   The EMPTY syntax defines a polygon
249         --  transparent background (the frame is visible).
250         -- -   The FILLED syntax creates a regularly filled
251         --   polygon by using the method
252         --   SetInteriorColorIndex.
253         -- -   The PATTERNED syntax is not yet implemented.
254         enumeration TypeOfAlignment is  TOA_LEFT,
255                                         TOA_CENTER,
256                                         TOA_RIGHT,
257                                         TOA_TOPLEFT,
258                                         TOA_TOPCENTER,
259                                         TOA_TOPRIGHT,
260                                         TOA_MEDIUMLEFT,
261                                         TOA_MEDIUMCENTER,
262                                         TOA_MEDIUMRIGHT,
263                                         TOA_BOTTOMLEFT,
264                                         TOA_BOTTOMCENTER,
265                                         TOA_BOTTOMRIGHT
266         end TypeOfAlignment from Graphic2d;
267         ---Purpose:
268         -- These specific points define text alignment with
269         -- respect to the origin of the text.
270         enumeration TypeOfComposition is        TOC_REPLACE,
271                                                 TOC_POSTCONCATENATE
272         end TypeOfComposition;
273
274         enumeration TypeOfFrame is              TOF_UNKNOWN,
275                                                 TOF_RECTANGULAR,
276                                                 TOF_CIRCULAR
277         end TypeOfFrame;
278
279         enumeration TypeOfPrimitive is
280                                         TOP_UNKNOWN,
281                                         TOP_LINE,
282                                         TOP_MARKER,
283                                         TOP_TEXT,
284                                         TOP_IMAGE
285         end TypeOfPrimitive;
286
287         enumeration PickMode is         PM_INCLUDE,
288                                         PM_EXCLUDE,
289                                         PM_INTERSECT
290         end PickMode from Graphic2d;
291
292         enumeration DisplayStatus is
293                                         DS_DISPLAYED,
294                                         DS_ERASED,
295                                         DS_REMOVED,
296                                         DS_NONE
297         end DisplayStatus from Graphic2d;
298                 
299                 ---------------------------------
300         -- Category: Instantiated classes
301         ---------------------------------
302
303         class SequenceOfBuffer instantiates
304                 Sequence from TCollection (Buffer from Graphic2d);
305         ---Category: Instantiated classes
306
307         class BufferList instantiates
308                 HSequence from TCollection
309         (Buffer from Graphic2d, SequenceOfBuffer from Graphic2d);
310         ---Category: Instantiated classes
311
312         class SequenceOfGraphicObject instantiates
313                 Sequence from TCollection (GraphicObject from Graphic2d);
314         ---Category: Instantiated classes
315
316         class DisplayList instantiates
317                 HSequence from TCollection
318         (GraphicObject from Graphic2d, SequenceOfGraphicObject from Graphic2d);
319         ---Category: Instantiated classes
320
321         class SequenceOfPrimitives instantiates
322                 Sequence from TCollection(Primitive from Graphic2d);
323         ---Category: Instantiated classes
324
325         class HSequenceOfPrimitives instantiates
326                 HSequence from TCollection
327         (Primitive from Graphic2d,SequenceOfPrimitives from Graphic2d);
328         ---Category: Instantiated classes
329
330         class Array1OfVertex instantiates
331                 Array1 from TCollection (Vertex from Graphic2d);
332         class HArray1OfVertex instantiates
333                 HArray1 from TCollection (Vertex from Graphic2d,Array1OfVertex);
334         ---Category: Instantiated classes
335
336 --      class SequenceOfCurve instantiates  -- disparait a partir de K4
337 --              Sequence from TCollection (Curve from Geom2d);
338         ---Category: Instantiated classes
339
340         class SequenceOfVertex instantiates
341                 Sequence from TCollection (Vertex from Graphic2d);
342         ---Category: Instantiated classes
343         class HSequenceOfVertex instantiates
344                 HSequence from TCollection (Vertex from Graphic2d,SequenceOfVertex);
345         ---Category: Instantiated classes
346
347         class SequenceOfPolyline instantiates
348                 Sequence from TCollection (HSequenceOfVertex from Graphic2d);
349         ---Category: Instantiated classes
350
351 end Graphic2d;