summaryrefslogtreecommitdiff
path: root/src/PrsMgr/PrsMgr_PresentationManager2d.cdl
blob: 1617d5b61f515a59e25b0d84d8b6c3b10dbd34fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
-- File:	PrsMgr_PresentationManager2d.cdl
-- Created:	Thu Oct 21 12:45:31 1993
-- Author:	Jean-Louis FRENKEL
--		<jlf@stylox>
-- Modified by rob Aug 20 98 : 
--               new Methods : Is3D() , AddToImmediateList (GO)
--                            BeginDraw redefined		
--                            new field : myGOList
--               => allows users to store independant Graphic
--                  Objects, which will be displayed in immediate mode
--                  when EndDraw is applied
---Copyright:	 Matra Datavision 1993


class PresentationManager2d from PrsMgr inherits PresentationManager from PrsMgr

    	---Purpose: A framework to manage 2D displays, graphic entities
    	-- and their updates. Plotters, Highlights, Minima
    	-- maxima, immediate display (of transient graphic data???].
        
uses
    ListOfTransient     from TColStd,
    View                from Graphic2d,
    TransientManager    from Graphic2d,
    PresentableObject   from PrsMgr,
    Presentation        from PrsMgr,
    Presentation2d      from PrsMgr,
    DisplayList         from Graphic2d,
    GraphicObject       from Graphic2d,
    Buffer              from Graphic2d,
    View                from Viewer
    
is

    Create(aStructureManager: View from Graphic2d)
    returns mutable PresentationManager2d from  PrsMgr;
    	---Purpose: Creates a framework to manage displays and graphic
    	-- entities with the 2D view aStructureManager.
        
    Is3D(me) returns Boolean from Standard is redefined static;
    
    ColorHighlight(me: mutable; 
                  aPresentableObject: mutable PresentableObject from PrsMgr;
                  anIndex: Integer from Standard;
    	          aMode: Integer from Standard = 0)
    is static;
    	---Purpose: Highlights the graphic object aPresentableObject in
    	-- color by the color index anIndex. aPresentableObject
    	-- has the display mode aMode.
        
    EnablePlot (me: mutable; 
                  aPresentableObject: mutable PresentableObject from PrsMgr;
    	          aMode: Integer from Standard = 0)
    is static;
    	---Purpose: Allows the drawing on a plotter of the graphic object
    	-- aPresentableObject with the display mode aMode.

    DisablePlot (me: mutable; 
                  aPresentableObject: mutable PresentableObject from PrsMgr;
    	          aMode: Integer from Standard = 0)
	---Purpose: Forbids the drawing on a plotter of the graphic object
    	-- aPresentableObject with the display mode aMode.
    is static;

    IsPlottable (me; 
                 aPresentableObject: mutable PresentableObject from PrsMgr;
    	         aMode: Integer from Standard = 0)
    returns Boolean from Standard
    	---Level: Public
    	---Purpose: Returns Standard_True if the graphic object <me>
    	--	    is plottable, Standard_False if not.
    	---Category: Methods to manage the plotter
     is static;

    SetOffset (me: mutable;
               aPresentableObject: mutable PresentableObject from PrsMgr;
	       anOffset: Integer from Standard;
  	       aMode: Integer from Standard = 0)
    is static;
    	---Level: Public
    	---Purpose: Specifies an Offset applied to the original color
    	--	    index of all primitives in the graphic object <me>.
    	--  Warning: To reset the real color of the primitives
    	--	    you have to call this method with <anOffset> = 0.
    	---Category: Methods to manage the highlight

    Offset (me;
            aPresentableObject: mutable PresentableObject from PrsMgr;
  	    aMode: Integer from Standard = 0)
    returns Integer from Standard
    is static;
    	---Level: Public
    	---Purpose: Returns the Offset applied to the original color
    	--	    index of all primitives in the graphic object <me>.
    	---Category: Methods to manage the highlight


    InitMinMax(me: mutable)
    	---Purpose: Initializes a list of 2D objects for which minima and
    	-- maxima will be calculated.
    is static;
    
    AddMinMax(me: mutable; aPresentableObject: PresentableObject from PrsMgr;
    	                   aMode: Integer from Standard = 0)
    	---Purpose: Appends the graphic object aPresentableObject with
    	-- the display mode aMode to the list of objects for
    	-- which minima and maxima will be calculated.
    is static;	

    MinMax(me; MinX,MaxX,MinY,MaxY: out Real from Standard)
    	---Purpose: Returns the minima and maxima for all the graphic
    	-- objects listed by the AddMinMax function.
    is static;
    
    SetHighlightColor(me:mutable; anIndex: Integer from Standard) 
    is static;
    	--- Purpose: Sets the highlight color index anIndex.   

    StructureManager(me) returns mutable View from Graphic2d
    is static;
    	---Purpose: Returns the structure manager.
    
         

    BeginDraw(me:mutable) is redefined static;

    AddToImmediateList(me:mutable;aGO:GraphicObject from Graphic2d);

    EndDraw(me: mutable; aView: View from Viewer; DoubleBuffer: Boolean from Standard = Standard_False)
    is redefined static;
    	---Purpose: Allows rapid drawing of the view aView by avoiding
    	-- an update of the whole background. If DoubleBuffer is true, the background is drawn.


    Dump (me: mutable;
    	  aBuffer: Buffer from Graphic2d; 
          aPresentableObject: PresentableObject from PrsMgr;
    	  aMode: Integer from Standard = 0) is static;
    	---Level: Public
    	---Purpose: Dumps the Graphic Primitives of the PresentatbleObject in the buffer
 

    CastPresentation(me; aPresentableObject: mutable PresentableObject from PrsMgr;
         	         aMode: Integer from Standard = 0)
    returns mutable Presentation2d from PrsMgr
    is static;

    newPresentation(me: mutable; aPresentableObject: PresentableObject from PrsMgr) 
    returns mutable Presentation from PrsMgr
    	---Level: Internal 
    	---Purpose: Creates a new presentation in the presentation manager.
    is redefined static;



fields

    myStructureManager: View from Graphic2d;
    MinMaxList: DisplayList from Graphic2d;
    myTM : TransientManager from Graphic2d;
    myGOList : ListOfTransient from TColStd;
end PresentationManager2d from PrsMgr;