1 -- File: PrsMgr_PresentationManager2d.cdl
2 -- Created: Thu Oct 21 12:45:31 1993
3 -- Author: Jean-Louis FRENKEL
5 -- Modified by rob Aug 20 98 :
6 -- new Methods : Is3D() , AddToImmediateList (GO)
8 -- new field : myGOList
9 -- => allows users to store independant Graphic
10 -- Objects, which will be displayed in immediate mode
11 -- when EndDraw is applied
12 ---Copyright: Matra Datavision 1993
15 class PresentationManager2d from PrsMgr inherits PresentationManager from PrsMgr
17 ---Purpose: A framework to manage 2D displays, graphic entities
18 -- and their updates. Plotters, Highlights, Minima
19 -- maxima, immediate display (of transient graphic data???].
22 ListOfTransient from TColStd,
24 TransientManager from Graphic2d,
25 PresentableObject from PrsMgr,
26 Presentation from PrsMgr,
27 Presentation2d from PrsMgr,
28 DisplayList from Graphic2d,
29 GraphicObject from Graphic2d,
30 Buffer from Graphic2d,
35 Create(aStructureManager: View from Graphic2d)
36 returns mutable PresentationManager2d from PrsMgr;
37 ---Purpose: Creates a framework to manage displays and graphic
38 -- entities with the 2D view aStructureManager.
40 Is3D(me) returns Boolean from Standard is redefined static;
42 ColorHighlight(me: mutable;
43 aPresentableObject: mutable PresentableObject from PrsMgr;
44 anIndex: Integer from Standard;
45 aMode: Integer from Standard = 0)
47 ---Purpose: Highlights the graphic object aPresentableObject in
48 -- color by the color index anIndex. aPresentableObject
49 -- has the display mode aMode.
51 EnablePlot (me: mutable;
52 aPresentableObject: mutable PresentableObject from PrsMgr;
53 aMode: Integer from Standard = 0)
55 ---Purpose: Allows the drawing on a plotter of the graphic object
56 -- aPresentableObject with the display mode aMode.
58 DisablePlot (me: mutable;
59 aPresentableObject: mutable PresentableObject from PrsMgr;
60 aMode: Integer from Standard = 0)
61 ---Purpose: Forbids the drawing on a plotter of the graphic object
62 -- aPresentableObject with the display mode aMode.
66 aPresentableObject: mutable PresentableObject from PrsMgr;
67 aMode: Integer from Standard = 0)
68 returns Boolean from Standard
70 ---Purpose: Returns Standard_True if the graphic object <me>
71 -- is plottable, Standard_False if not.
72 ---Category: Methods to manage the plotter
75 SetOffset (me: mutable;
76 aPresentableObject: mutable PresentableObject from PrsMgr;
77 anOffset: Integer from Standard;
78 aMode: Integer from Standard = 0)
81 ---Purpose: Specifies an Offset applied to the original color
82 -- index of all primitives in the graphic object <me>.
83 -- Warning: To reset the real color of the primitives
84 -- you have to call this method with <anOffset> = 0.
85 ---Category: Methods to manage the highlight
88 aPresentableObject: mutable PresentableObject from PrsMgr;
89 aMode: Integer from Standard = 0)
90 returns Integer from Standard
93 ---Purpose: Returns the Offset applied to the original color
94 -- index of all primitives in the graphic object <me>.
95 ---Category: Methods to manage the highlight
98 InitMinMax(me: mutable)
99 ---Purpose: Initializes a list of 2D objects for which minima and
100 -- maxima will be calculated.
103 AddMinMax(me: mutable; aPresentableObject: PresentableObject from PrsMgr;
104 aMode: Integer from Standard = 0)
105 ---Purpose: Appends the graphic object aPresentableObject with
106 -- the display mode aMode to the list of objects for
107 -- which minima and maxima will be calculated.
110 MinMax(me; MinX,MaxX,MinY,MaxY: out Real from Standard)
111 ---Purpose: Returns the minima and maxima for all the graphic
112 -- objects listed by the AddMinMax function.
115 SetHighlightColor(me:mutable; anIndex: Integer from Standard)
117 --- Purpose: Sets the highlight color index anIndex.
119 StructureManager(me) returns mutable View from Graphic2d
121 ---Purpose: Returns the structure manager.
125 BeginDraw(me:mutable) is redefined static;
127 AddToImmediateList(me:mutable;aGO:GraphicObject from Graphic2d);
129 EndDraw(me: mutable; aView: View from Viewer; DoubleBuffer: Boolean from Standard = Standard_False)
131 ---Purpose: Allows rapid drawing of the view aView by avoiding
132 -- an update of the whole background. If DoubleBuffer is true, the background is drawn.
136 aBuffer: Buffer from Graphic2d;
137 aPresentableObject: PresentableObject from PrsMgr;
138 aMode: Integer from Standard = 0) is static;
140 ---Purpose: Dumps the Graphic Primitives of the PresentatbleObject in the buffer
143 CastPresentation(me; aPresentableObject: mutable PresentableObject from PrsMgr;
144 aMode: Integer from Standard = 0)
145 returns mutable Presentation2d from PrsMgr
148 newPresentation(me: mutable; aPresentableObject: PresentableObject from PrsMgr)
149 returns mutable Presentation from PrsMgr
151 ---Purpose: Creates a new presentation in the presentation manager.
158 myStructureManager: View from Graphic2d;
159 MinMaxList: DisplayList from Graphic2d;
160 myTM : TransientManager from Graphic2d;
161 myGOList : ListOfTransient from TColStd;
162 end PresentationManager2d from PrsMgr;