0023663: Removing 2D viewer library
[occt.git] / src / AIS2D / AIS2D.cdl
1 -- Created on: 2000-04-07
2 -- Created by: Tanya COOL
3 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
4 --
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
9 --
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 --
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
19
20
21 package AIS2D
22
23         ---Purpose: FOR APPLICATION INTERACTIVE SERVICES
24         --          
25         --          This package provides the classes and methods
26         --          to the maintenance of the high level 2D visualization . 
27         --          The central entity is Interactive Context for easily 
28         --          piloting presentation and selection.
29         --          AIS2D package proposes the classes of standard Interactive Objects  
30         --          and this one allows to implement users classes of interactive objects,
31         --          by respecting a certain rules of creating of Interactive Object.
32
33  uses
34
35    Aspect,
36    Quantity,
37    TColStd,
38    TCollection,
39    V2d,
40    Graphic2d,
41    GGraphic2d,
42    TopoDS,
43    TopTools,
44    HLRAlgo,
45    HLRBRep,
46    Prs2d
47
48  is
49
50   enumeration KindOfIO is
51     
52     KOI_None,
53     KOI_DATUM,
54     KOI_DIMENSION,
55     KOI_SHAPE,
56     KOI_PROJSHAPE,
57     KOI_COMPOUND
58     
59   end KindOfIO;
60
61   enumeration KindOfDimension is
62     
63     KOD_NONE,
64     KOD_LENGTH,
65     KOD_ANGLE,
66     KOD_DIAMETER,
67     KOD_RADIUS
68
69   end KindOfDimension;
70
71   enumeration KindOfPrimitive is
72     
73     KOP_NONE,
74     KOP_CIRCLE,
75     KOP_CIRCLEMARKER,
76     KOP_ELLIPS,
77     KOP_ELLIPSEMARKER,
78     KOP_FRAMEDTEXT,
79     KOP_HIDINGTEXT,
80     KOP_IMAGE,
81     KOP_IMAGEFILE,
82     KOP_INFINITELINE,
83     KOP_MARKER,
84     KOP_PARAGRAPH,
85     KOP_POLYLINE,
86     KOP_POLYLINEMARKER,
87     KOP_SEGMENT,
88     KOP_SETOFMARKERS,
89     KOP_SETOFPOLYLINES,
90     KOP_SETOFSEGMENTS,
91     KOP_TEXT,
92     KOP_CURVE,
93     KOP_SETOFCURVES,
94     KOP_ANGLE,
95     KOP_ANGULARITY,
96     KOP_ARROW,
97     KOP_AXIS,
98     KOP_CIRCULARITY,
99     KOP_CONCENTRIC,
100     KOP_CYLINDRIC,
101     KOP_DIAMETER,
102     KOP_FLATNESS,
103     KOP_LENGTH,
104     KOP_LINEPROFILE,
105     KOP_PARALLELISM,
106     KOP_PERPENDICULAR,
107     KOP_POINT,
108     KOP_RADIUS,
109     KOP_RADIUSINDEP,
110     KOP_REPERE,
111     KOP_STRAIGHTNESS,
112     KOP_SURFPROFILE,
113     KOP_SYMCIRCULAR,
114     KOP_SYMMETRY,
115     KOP_SYMTOTAL,
116     KOP_TAPER,
117     KOP_TOLERANCEFRAME
118
119   end KindOfPrimitive;
120
121   enumeration TypeOfAxis is 
122     
123         TOAX_Unknown,
124         TOAX_XAxis,
125         TOAX_YAxis
126
127   end TypeOfAxis;
128
129   enumeration DisplayStatus is
130
131     DS_Displayed,  -- displayed in main viewer
132     DS_Erased,     -- erased in the collector
133     DS_FullErased, -- erased but not in the collector
134     DS_Temporary,  -- temporary displayed
135     DS_None        -- nowhere
136
137   end DisplayStatus;
138
139   enumeration SelectStatus is
140
141     SS_Added,
142     SS_Removed,
143     SS_NotDone
144
145   end SelectStatus;
146
147   enumeration StatusOfPick is
148
149     SOP_Error,
150     SOP_NothingSelected,
151     SOP_Removed,
152     SOP_OneSelected,
153     SOP_SeveralSelected
154
155   end StatusOfPick;
156
157   enumeration StatusOfDetection is
158
159     SOD_Error,
160     SOD_Nothing,
161     SOD_AllBad,
162     SOD_Selected,
163     SOD_OnlyOneDetected,
164     SOD_OnlyOneGood,
165     SOD_SeveralGood
166
167   end StatusOfDetection;
168
169   enumeration TypeOfDetection is
170     TOD_OBJECT,
171     TOD_PRIMITIVE,
172     TOD_ELEMENT,
173     TOD_VERTEX,
174     TOD_NONE
175   end TypeOfDetection;
176
177  enumeration ClearMode is
178
179     CM_All,
180     CM_Interactive,
181     CM_StandardModes,
182     CM_TemporaryShapePrs
183
184   end ClearMode;
185
186   class InteractiveContext;
187   class InteractiveObject;
188   class ProjShape;
189   
190   private class LocalStatus;
191   private class GlobalStatus;
192   private class LocalContext;
193
194   private class PrimitiveArchit;
195   
196   private class SequenceOfIO instantiates Sequence from TCollection
197       ( InteractiveObject from AIS2D );
198
199   private class HSequenceOfIO instantiates HSequence from TCollection
200       ( InteractiveObject from AIS2D, SequenceOfIO from AIS2D );
201
202   private class SequenceOfPrimArchit instantiates Sequence from TCollection
203       ( PrimitiveArchit from AIS2D );
204
205   private class HSequenceOfPrimArchit instantiates HSequence from TCollection
206       ( PrimitiveArchit from AIS2D, SequenceOfPrimArchit from AIS2D );
207   
208   private class DataMapOfIOStatus instantiates DataMap from TCollection
209        ( InteractiveObject from AIS2D,
210          GlobalStatus from AIS2D,
211          MapTransientHasher from TColStd );
212   -- Management of interactiveObjects Status...
213
214   class ListOfIO instantiates List from TCollection
215       ( InteractiveObject from AIS2D );
216
217   class DataMapOfPrimAspects instantiates DataMap from TCollection 
218        ( Primitive from Graphic2d,
219          AspectRoot from Prs2d,
220          MapTransientHasher from TColStd);
221
222   private class DataMapOfLC instantiates DataMap from TCollection
223       ( Integer from Standard,
224         LocalContext from AIS2D,
225         MapIntegerHasher from TColStd );
226
227   private class DataMapOfLocStat instantiates DataMap from TCollection
228       ( InteractiveObject from AIS2D,
229         LocalStatus from AIS2D,
230         MapTransientHasher from TColStd );
231     -- to tell if an object is sensitive to Standard Modes Of Selection....
232
233
234   pointer PToListOfInt to ListOfInteger from TColStd;
235    
236   Save( aCntx: InteractiveContext from AIS2D; aFile: CString from Standard )
237        returns Boolean; 
238   Retrieve( aCntx: InteractiveContext from AIS2D; aFile: CString from Standard )
239        returns InteractiveObject from AIS2D;
240
241 end AIS2D;