0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / Aspect / Aspect.cdl
CommitLineData
b311480e 1-- Created by: NW,JPB,CAL
2-- Copyright (c) 1991-1999 Matra Datavision
973c2be1 3-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4--
973c2be1 5-- This file is part of Open CASCADE Technology software library.
b311480e 6--
d5f74e42 7-- This library is free software; you can redistribute it and/or modify it under
8-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9-- by the Free Software Foundation, with special exception defined in the file
10-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 12--
973c2be1 13-- Alternatively, this file may be used under the terms of Open CASCADE
14-- commercial license or contractual agreement.
b311480e 15
7fd59977 16package Aspect
17
18 ---Version:
19
20 ---Purpose: This package contains the group of graphic elements common
21 -- to different types of visualisers. It allows the description
22 -- of a screen background, a window, an edge, and groups of
23 -- graphic attributes that can be used in describing 2D
24 -- and 3D objects.
25
26 ---Keywords: Window, Aspect, FillArea, Line, Marker, Edge
27 -- Highlight, Hatch, Background, GradientBackground, Color map,
28 -- Type map, Width map, Font map
29 ---Warning:
30 ---References:
31
32uses
33 TCollection,
34 TColStd,
35 TShort,
36 Quantity,
37 TColQuantity,
38 Resource,
7fd59977 39 MMgt
40
41is
42 ---------------------------
43 -- Category: Imported types
44 ---------------------------
45 imported FStream;
46 -- waiting for RBA creating this class in Standard ...
47
48 imported IFStream;
49 -- G002A study
50
51 imported CLayer2d;
ff8178ef 52
7fd59977 53 ---Category: Imported types
54
7fd59977 55 primitive Handle;
56 primitive Drawable;
7fd59977 57
58 primitive Display;
7fd59977 59
60 primitive RenderingContext;
7fd59977 61
62 imported GraphicCallbackProc;
7fd59977 63
64 -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
65 imported PolygonOffsetMode;
7fd59977 66
7fd59977 67 -----------------------
68 -- Category: Exceptions
69 -----------------------
70
71 exception AspectLineDefinitionError inherits OutOfRange;
72 ---Category: Exceptions
73
74 exception AspectFillAreaDefinitionError inherits OutOfRange;
75 ---Category: Exceptions
76
77 exception AspectMarkerDefinitionError inherits OutOfRange;
78 ---Category: Exceptions
79
80 exception BadAccess inherits DomainError;
81 ---Category: Exceptions
82
7fd59977 83 exception IdentDefinitionError inherits OutOfRange;
84 ---Category: Exceptions
85
7fd59977 86 exception WindowDefinitionError inherits OutOfRange;
87 ---Category: The exceptions
88
89 exception WindowError inherits OutOfRange;
90 ---Category: The exceptions
91
7fd59977 92 exception DriverDefinitionError inherits OutOfRange;
93 ---Category: The exceptions
94
7fd59977 95 exception GraphicDeviceDefinitionError inherits OutOfRange;
96 ---Category: The exceptions
97
dc3fe572 98 exception DisplayConnectionDefinitionError inherits OutOfRange;
99 ---Category: The exceptions
100
7fd59977 101 ---------------------------
102 -- Category: Classes Aspect
103 ---------------------------
104
105 deferred class AspectLine;
7fd59977 106 ---Category: Classes Aspect
107
108 deferred class AspectMarker;
7fd59977 109 ---Category: Classes Aspect
110
111 deferred class AspectFillArea;
7fd59977 112 ---Category: Classes Aspect
113
114 --------------------
115 -- Category: Classes
116 --------------------
117
118 class Background;
7fd59977 119 ---Category: Classes
120
121 class GradientBackground;
7fd59977 122 ---Category: Classes
123
7fd59977 124 class GenId;
7fd59977 125 ---Category: Classes
126
7fd59977 127 deferred class Window;
7fd59977 128 ---Category: Classes
7fd59977 129
7fd59977 130 deferred class Grid;
131 class RectangularGrid;
132 class CircularGrid;
133
134 deferred class ColorScale;
7fd59977 135
494782f6 136 imported transient class DisplayConnection;
dc3fe572 137
7fd59977 138 -------------------------
139 -- Category: Enumerations
140 -------------------------
141
142 enumeration HatchStyle is HS_HORIZONTAL,
143 HS_HORIZONTAL_WIDE,
144 HS_VERTICAL,
145 HS_VERTICAL_WIDE,
146 HS_DIAGONAL_45,
147 HS_DIAGONAL_45_WIDE,
148 HS_DIAGONAL_135,
149 HS_DIAGONAL_135_WIDE,
150 HS_GRID,
151 HS_GRID_WIDE,
152 HS_GRID_DIAGONAL,
153 HS_GRID_DIAGONAL_WIDE
154 end HatchStyle;
155 ---Purpose: Definition of all available hatch styles.
156 --
157 -- HS_HORIZONTAL
158 -- HS_HORIZONTAL_WIDE
159 -- HS_VERTICAL
160 -- HS_VERTICAL_WIDE
161 -- HS_DIAGONAL_45
162 -- HS_DIAGONAL_45_WIDE
163 -- HS_DIAGONAL_135
164 -- HS_DIAGONAL_135_WIDE
165 -- HS_GRID
166 -- HS_GRID_WIDE
167 -- HS_GRID_DIAGONAL
168 -- HS_GRID_DIAGONAL_WIDE
169 --
170 ---Category: Enumerations
171
172 enumeration InteriorStyle is IS_EMPTY,
173 IS_HOLLOW,
174 IS_HATCH,
175 IS_SOLID,
498ce76b 176 IS_HIDDENLINE,
177 IS_POINT
7fd59977 178 end InteriorStyle;
179 ---Purpose: Definition of interior types for primitive
180 -- faces.
181 --
182 -- IS_EMPTY no interior.
183 -- IS_HOLLOW display the boundaries of the surface.
184 -- IS_HATCH display hatched with a hatch style.
185 -- IS_SOLID display the interior entirely filled.
186 -- IS_HIDDENLINE display in hidden lines removed.
498ce76b 187 -- IS_POINT display only vertices.
7fd59977 188 --
189 ---Category: Enumerations
190
7fd59977 191 enumeration TypeOfConstraint is TOC_BOTTOM_LEFT,
192 TOC_BOTTOM_RIGHT,
193 TOC_TOP_LEFT,
194 TOC_TOP_RIGHT
195 end TypeOfConstraint;
196 ---Purpose: Definition of the attachment for the layers
197 --
198 ---Category: Enumerations
199
200 enumeration TypeOfDrawMode is TODM_REPLACE,
201 TODM_ERASE,
202 TODM_XOR,
203 TODM_XORLIGHT
204 end TypeOfDrawMode;
205 ---Purpose: Definition of the draw modes
206 --
207 ---Category: Enumerations
208
209 enumeration TypeOfEdge is TOE_VISIBLE,
210 TOE_INVISIBLE
211 end TypeOfEdge;
212 ---Purpose: Definition of edge visibility
213 --
214 -- TOE_VISIBLE Edge is displayed
215 -- TOE_INVISIBLE Edge is not displayed
216 --
217 ---Category: Enumerations
218
219 enumeration TypeOfHighlightMethod is TOHM_COLOR,
7fd59977 220 TOHM_BOUNDBOX
221 end TypeOfHighlightMethod;
222 ---Purpose: Definition of a highlight method
223 --
224 -- TOHM_COLOR drawn in the highlight color
225 -- (default white)
7fd59977 226 -- TOHM_BOUNDBOX enclosed by the boundary box
227 -- (default white)
228 --
229 ---Category: Enumerations
230
231 enumeration TypeOfLine is TOL_SOLID,
232 TOL_DASH,
233 TOL_DOT,
234 TOL_DOTDASH,
235 TOL_USERDEFINED
236 end TypeOfLine;
237 ---Purpose: Definition of line types
238 --
239 -- TOL_SOLID continuous
240 -- TOL_DASH dashed 2.0,1.0 (MM)
241 -- TOL_DOT dotted 0.2,0.5 (MM)
242 -- TOL_DOTDASH mixed 10.0,1.0,2.0,1.0 (MM)
243 -- TOL_USERDEFINED defined by Users
244 ---Category: Enumerations
245
246 enumeration WidthOfLine is WOL_THIN,
247 WOL_MEDIUM,
248 WOL_THICK,
249 WOL_VERYTHICK,
250 WOL_USERDEFINED
251 end WidthOfLine;
252 ---Purpose: Definition of line types
253 --
254 -- WOL_THIN thin line (1 pixel width)
255 -- WOL_MEDIUM medium width of 0.5 MM
256 -- WOL_THICK thick width of 0.7 MM
257 -- WOL_VERYTHICK very thick width of 1.5 MM
258 -- WOL_USERDEFINED defined by Users
259 ---Category: Enumerations
260
7fd59977 261 enumeration TypeOfStyleText is TOST_NORMAL,
262 TOST_ANNOTATION
263 end TypeOfStyleText;
264 ---Purpose: Define the style of the text.
265 --
266 -- TOST_NORMAL Default text. The text is displayed like any other graphic object.
267 -- This text can be hidden by another object that is nearest from the
268 -- point of view.
269 -- TOST_ANNOTATION The text is always visible. The texte is displayed
270 -- over the other object according to the priority.
271 ---Category: Enumerations
272
273 enumeration TypeOfDisplayText is TODT_NORMAL,
274 TODT_SUBTITLE,
275 TODT_DEKALE,
a6eb515f 276 TODT_BLEND,
277 TODT_DIMENSION
7fd59977 278 end TypeOfDisplayText;
279 ---Purpose: Define the display type of the text.
280 --
281 -- TODT_NORMAL Default display. Text only.
282 -- TODT_SUBTITLE There is a subtitle under the text.
283 -- TODT_DEKALE The text is displayed with a 3D style.
284 -- TODT_BLEND The text is displayed in XOR.
a6eb515f 285 -- TODT_DIMENSION Dimension line under text will be invisible.
7fd59977 286 ---Category: Enumerations
287
288 enumeration TypeOfMarker is TOM_POINT,
289 TOM_PLUS,
290 TOM_STAR,
7fd59977 291 TOM_X,
a577aaab 292 TOM_O,
7fd59977 293 TOM_O_POINT,
294 TOM_O_PLUS,
295 TOM_O_STAR,
296 TOM_O_X,
7fd59977 297 TOM_RING1,
298 TOM_RING2,
299 TOM_RING3,
a577aaab 300 TOM_BALL,
7fd59977 301 TOM_USERDEFINED
302 end TypeOfMarker;
303 ---Purpose: Definition of types of markers
304 --
305 -- TOM_POINT point .
306 -- TOM_PLUS plus +
307 -- TOM_STAR star *
7fd59977 308 -- TOM_X cross x
a577aaab 309 -- TOM_O circle O
7fd59977 310 -- TOM_O_POINT a point in a circle
311 -- TOM_O_PLUS a plus in a circle
312 -- TOM_O_STAR a star in a circle
313 -- TOM_O_X a cross in a circle
7fd59977 314 -- TOM_RING1 a large ring
315 -- TOM_RING2 a medium ring
316 -- TOM_RING3 a small ring
a577aaab 317 -- TOM_BALL a ball with 1 color and different saturations
7fd59977 318 -- TOM_USERDEFINED defined by Users
319 --
320 ---Category: Enumerations
321
322 enumeration TypeOfUpdate is TOU_ASAP,
323 TOU_WAIT
324 end TypeOfUpdate;
325 ---Purpose: Definition of screen refresh mode
326 --
327 -- TOU_ASAP as soon as possible
328 -- TOU_WAIT on demand (Update)
329 --
330 ---Category: Enumerations
331
332 enumeration TypeOfDeflection is TOD_RELATIVE,
333 TOD_ABSOLUTE
334 end TypeOfDeflection;
335 ---Purpose: Defines if the maximal chordial deflection used when
336 -- drawing an object is absolute or relative to the size
337 -- of the object.
338
339 enumeration TypeOfResize is TOR_UNKNOWN,
340 TOR_NO_BORDER,
341 TOR_TOP_BORDER,
342 TOR_RIGHT_BORDER,
343 TOR_BOTTOM_BORDER,
344 TOR_LEFT_BORDER,
345 TOR_TOP_AND_RIGHT_BORDER,
346 TOR_RIGHT_AND_BOTTOM_BORDER,
347 TOR_BOTTOM_AND_LEFT_BORDER,
348 TOR_LEFT_AND_TOP_BORDER
349 end TypeOfResize;
350 ---Purpose: Defines the type of Resize Window method applied
351 -- by the user.
352
7fd59977 353 enumeration TypeOfPrimitive is
354 TOP_UNKNOWN,
355 TOP_POLYLINE,
356 TOP_POLYGON,
357 TOP_SEGMENTS,
358 TOP_ARCS,
359 TOP_POLYARCS,
360 TOP_POINTS,
361 TOP_MARKERS
362 end TypeOfPrimitive;
363 ---Purpose:
364
365 enumeration GridDrawMode is GDM_Lines,
366 GDM_Points,
367 GDM_None
368 end GridDrawMode;
369 ---Purpose: Defines the grid draw mode. The grid may be drawn
370 -- by using lines or points.
371
372 enumeration GridType is GT_Rectangular,
373 GT_Circular
374 end GridType;
375 ---Purpose: Defines the grid type : Rectangular or Circular.
376
7fd59977 377 enumeration TypeOfTriedronEcho is TOTE_NONE,
378 TOTE_ORIGIN,
379 TOTE_AXIS_X,
380 TOTE_AXIS_Y,
381 TOTE_AXIS_Z,
382 TOTE_TEXT_X,
383 TOTE_TEXT_Y,
384 TOTE_TEXT_Z,
385 TOTE_01,
386 TOTE_02,
387 TOTE_03,
388 TOTE_04,
389 TOTE_05,
390 TOTE_06,
391 TOTE_07,
392 TOTE_08,
393 TOTE_09,
394 TOTE_10
395 end TypeOfTriedronEcho;
396 ---Purpose: Definition of the Triedron echo zone to highlight
397 --
398 -- TOTE_NONE no echo zone
399 -- TOTE_ORIGIN a box on origin of the Triedron
400 -- TOTE_AXIS_X highlights the X axis
401 -- TOTE_AXIS_Y highlights the Y axis
402 -- TOTE_AXIS_Z highlights the Z axis
403 -- TOTE_TEXT_X highlights the X character
404 -- TOTE_TEXT_Y highlights the Y character
405 -- TOTE_TEXT_Z highlights the Z character
406 -- TOTE_01 to TOTE_10 not yet implemented.
407 ---Category: The enumerations
408
409
410 enumeration TypeOfTriedronPosition is TOTP_CENTER,
411 TOTP_LEFT_LOWER,
412 TOTP_LEFT_UPPER,
413 TOTP_RIGHT_LOWER,
414 TOTP_RIGHT_UPPER,
415 TOTP_01,
416 TOTP_02,
417 TOTP_03,
418 TOTP_04,
419 TOTP_05,
420 TOTP_06,
421 TOTP_07,
422 TOTP_08,
423 TOTP_09,
424 TOTP_10
425 end TypeOfTriedronPosition;
426 ---Purpose: Definition of the Triedron position in the views
427 --
428 -- TOTP_CENTER at the center of the view
429 -- TOTP_LEFT_LOWER at the left lower corner
430 -- TOTP_LEFT_UPPER at the left upper corner
431 -- TOTP_RIGHT_LOWER at the right lower corner
432 -- TOTP_RIGHT_UPPER at the right upper corner
433 -- TOTP_01 to TOTP_10 not yet implemented.
434 ---Category: The enumerations
435
436 enumeration TypeOfLayer is TOL_OVERLAY,
437 TOL_UNDERLAY
438 end TypeOfLayer;
439 ---Purpose: Modes of drawing for the objects in a layer
440 --
441 -- TOL_OVERLAY, the graphic of the layer is draw
442 -- after the 3d graphic.
443 -- TOL_UNDERLAY, the graphic of the layer is draw
444 -- before the 3d graphic.
445 ---Category: The enumerations
446
447 enumeration TypeOfFacingModel is TOFM_BOTH_SIDE,
448 TOFM_BACK_SIDE,
449 TOFM_FRONT_SIDE
450 end TypeOfFacingModel;
451
7fd59977 452 enumeration FillMethod is
453 FM_NONE,
454 FM_CENTERED,
455 FM_TILED,
456 FM_STRETCH
457 end FillMethod;
458 ---Purpose: Defines the fill methods to
459 -- write bitmaps in a window.
460
461 enumeration GradientFillMethod is
462 GFM_NONE,
463 GFM_HOR,
464 GFM_VER,
465 GFM_DIAG1,
466 GFM_DIAG2,
467 GFM_CORNER1,
468 GFM_CORNER2,
469 GFM_CORNER3,
470 GFM_CORNER4
471 end GradientFillMethod;
472 ---Purpose: Defines the fill methods to
473 -- write gradient background in a window.
474
475 enumeration TypeOfColorScaleData is
476 TOCSD_AUTO,
477 TOCSD_USER
478 end TypeOfColorScaleData;
479 ---Purpose: Defines the using type of colors and labels
480
481 enumeration TypeOfColorScalePosition is
482 TOCSP_NONE,
483 TOCSP_LEFT,
484 TOCSP_RIGHT,
485 TOCSP_CENTER
486 end TypeOfColorScalePosition;
487 ---Purpose: Defines the type of position for color scale labels
488
489 enumeration TypeOfColorScaleOrientation is
490 TOCSO_NONE,
491 TOCSO_LEFT,
492 TOCSO_RIGHT,
493 TOCSO_CENTER
494 end TypeOfColorScaleOrientation;
495 ---Purpose: Defines the type of color scale orientation
496
7edf74fd
A
497 enumeration PrintAlgo is
498 PA_STRETCH,
499 PA_TILE
500 end PrintAlgo;
501 ---Purpose: Defines print algorithm
502 -- Aspect_PrintAlgo:
503 -- 1) PA_STRETCH - Stretch offscreen printing frame
504 -- if its dimensions are smaller than
505 -- the printer's printing area dimensions;
506 -- This algorithm is more reliable as it
507 -- works on any hardware and is recommended
508 -- to be used with average printing resolutions,
509 -- as it more RAM memory dependent than PA_TILE;
510 -- Stretching is performend using bicubic interpolation
511 -- algorithm from FreeImage library if OCCT is built
512 -- with FreeImage support, otherwise Windows API
513 -- StretchBlt() function in STRETCH_HALFTONE mode
514 -- is used;
515 -- 2) PA_TILE - If the offscreen printing frame dimensions
516 -- are smaller than the printer's printing
517 -- area dimensions - use multiple printing
518 -- frames to cover the whole printing area
18d715bd 519 enumeration XAtom is
520 XA_DELETE_WINDOW
521 end XAtom;
522 ---Purpose: Defines custom identifiers(atoms) for X window custom named properties
7fd59977 523 ---------------------------------
524 -- Category: Instantiated classes
525 ---------------------------------
526
df8d3970 527 imported SequenceOfColor;
7fd59977 528
7fd59977 529end Aspect;