7fd59977 |
1 | /*********************************************************************** |
2 | |
3 | FONCTION : |
4 | ---------- |
5 | File OpenGl_tsm : |
6 | |
7 | |
8 | REMARQUES: |
9 | ---------- |
10 | |
11 | HISTORIQUE DES MODIFICATIONS : |
12 | -------------------------------- |
13 | xx-xx-xx : xxx ; Creation. |
14 | 17-07-96 : FMN ; Suppression de TelHLHSRMode |
15 | 05-08-97 : PCT ; support texture mapping |
16 | 23-12-97 : FMN ; Suppression TelBackInteriorStyle, TelBackInteriorStyleIndex |
17 | et TelBackInteriorShadingMethod |
18 | 30-11-98 : FMN ; S3819 : Textes toujours visibles |
19 | 21-09-99 : EUG : G003 : Degeneration management |
20 | 16-06-00 : ATS,SPK : G005 : Group of new primitives: TelParray |
21 | 22-03-04 : SAN : OCC4895 High-level interface for controlling polygon offsets |
22 | |
23 | ************************************************************************/ |
24 | |
25 | #ifndef OPENGL_TSM_H |
26 | #define OPENGL_TSM_H |
27 | |
28 | #define G003 /* EUG 21-09-99 Degeneration management |
29 | */ |
30 | |
31 | #define OCC1188 /* SAV 23/12/02 Added structure to control background texture |
32 | + enum to control texture fill method |
33 | */ |
34 | |
35 | |
36 | #include <OpenGl_cmn_varargs.hxx> |
37 | |
38 | typedef enum |
39 | { |
40 | TelNil = 0, |
41 | TelLabel, |
42 | TelAntiAliasing, |
43 | TelBlink, |
44 | TelExecuteStructure, |
45 | /* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */ |
46 | TelTransformPersistence, |
47 | /* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */ |
48 | TelPolylineColour, |
49 | TelPolylineType, |
50 | TelPolylineWidth, |
51 | TelInteriorStyle, |
52 | TelInteriorColour, |
53 | TelBackInteriorColour, |
54 | TelEdgeColour, |
55 | TelEdgeType, |
56 | TelEdgeWidth, |
57 | TelEdgeFlag, |
58 | TelInteriorStyleIndex, |
59 | TelFaceDistinguishingMode, |
60 | TelFaceCullingMode, |
61 | TelInteriorReflectanceEquation, |
62 | TelSurfaceAreaProperties, |
63 | TelBackInteriorReflectanceEquation, |
64 | TelBackSurfaceAreaProperties, |
65 | TelPolymarkerColour, |
66 | TelPolymarkerType, |
67 | TelPolymarkerSize, |
68 | TelTextFont, |
69 | TelTextHeight, |
70 | TelCharacterSpacing, |
71 | TelCharacterExpansionFactor, |
72 | TelTextColour, |
73 | TelDepthCueIndex, |
74 | TelPickId, |
75 | TelPolygon, |
76 | TelPolygonSet, |
77 | TelPolygonHoles, |
78 | TelPolygonIndices, |
79 | TelQuadrangle, |
80 | TelPolyline, |
81 | TelMarker, |
82 | TelMarkerSet, |
83 | TelText, |
84 | TelTriangleMesh, |
85 | TelAddNameset, |
86 | TelRemoveNameset, |
87 | TelInteriorShadingMethod, |
88 | TelLocalTran3, |
89 | TelHighlightIndex, |
90 | TelLightSrcState, |
91 | TelClippingPlane, |
92 | TelViewIndex, |
93 | TelApplicationData, |
94 | TelCurve, |
95 | TelTextureId, |
96 | TelDoTextureMap, |
97 | TelTextStyle, |
98 | TelTextDisplayType, |
99 | TelTextColourSubTitle, |
100 | #ifdef G003 |
101 | TelDegenerationMode, |
102 | #endif /* G003 */ |
103 | TelTextZoomable,//Text Zoomable attributes |
104 | TelTextAngle,//Text Angle attributes |
105 | TelTextFontAspect,//Text Font Aspect attributes |
106 | /*OCC7456 abd 14.12.2004 Text alingnment attributes */ |
107 | TelTextAlign, |
108 | /*OCC7456 abd 14.12.2004 Text alingnment attributes */ |
109 | TelParray, |
110 | /* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */ |
111 | TelPolygonOffset, |
112 | /* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */ |
113 | /* OCC???? SZV 11/08/05 Implementation of callbacks */ |
114 | TelUserdraw, |
115 | /* OCC???? SZV 11/08/05 Implementation of callbacks */ |
116 | TelLast |
117 | } TelType; |
118 | |
119 | typedef union TSM_ELEM_DATA_UNION |
120 | { |
121 | void *pdata; |
122 | Tint ldata; |
123 | } TSM_ELEM_DATA, *tsm_elem_data; |
124 | |
125 | typedef struct TSM_ELEM_STRUCT |
126 | { |
127 | TelType el; |
128 | TSM_ELEM_DATA data; |
129 | IMPLEMENT_MEMORY_OPERATORS |
130 | } TSM_ELEM, *tsm_elem; |
131 | |
132 | /* A node containing an elem when structure is in the form of a list */ |
133 | struct TSM_NODE_STRUCT |
134 | { |
135 | struct TSM_NODE_STRUCT *next; |
136 | struct TSM_NODE_STRUCT *prev; |
137 | TSM_ELEM elem; |
138 | IMPLEMENT_MEMORY_OPERATORS |
139 | }; |
140 | typedef TSM_NODE_STRUCT TSM_NODE; |
141 | typedef TSM_NODE_STRUCT* tsm_node; |
142 | |
143 | #ifdef OCC1188 |
144 | /* background texture properties */ |
145 | typedef enum |
146 | { |
147 | TSM_FS_CENTER, |
148 | TSM_FS_TILE, |
149 | TSM_FS_STRETCH |
150 | } TSM_FillStyle; |
151 | |
152 | typedef struct |
153 | { |
154 | Tuint texId; |
155 | Tint width; |
156 | Tint height; |
157 | TSM_FillStyle style; |
158 | IMPLEMENT_MEMORY_OPERATORS |
159 | } TSM_BG_TEXTURE, *tsm_bg_texture; |
160 | #endif /* OCC1188 */ |
161 | |
162 | typedef enum |
163 | { |
164 | TSM_GT_NONE, |
165 | TSM_GT_HOR, |
166 | TSM_GT_VER, |
167 | TSM_GT_DIAG1, |
168 | TSM_GT_DIAG2, |
169 | TSM_GT_CORNER1, |
170 | TSM_GT_CORNER2, |
171 | TSM_GT_CORNER3, |
172 | TSM_GT_CORNER4 |
173 | } TSM_GradientType; |
174 | |
175 | typedef struct |
176 | { |
177 | TEL_COLOUR color1; |
178 | TEL_COLOUR color2; |
179 | TSM_GradientType type; |
180 | IMPLEMENT_MEMORY_OPERATORS |
181 | } TSM_BG_GRADIENT, *tsm_bg_gradient; |
182 | |
183 | |
184 | typedef enum |
185 | { |
186 | PickTraverse=0, |
187 | DisplayTraverse, |
188 | Add, |
189 | Delete, |
190 | Print, |
191 | Inquire |
192 | } TMsgType; |
193 | |
194 | typedef enum |
195 | { |
196 | TEditInsert = 1, |
197 | TEditReplace |
198 | } TEditMode; |
199 | |
200 | extern Tint TglActiveWs; /* currently defined in tsm/tsm.c */ |
201 | |
202 | typedef TStatus (**MtblPtr)( TSM_ELEM_DATA, Tint, cmn_key* ); |
203 | |
204 | extern void TsmInitAllClasses( MtblPtr (**tbl)(TelType*), Tint size ); |
205 | |
206 | extern TEditMode TsmSetEditMode( TEditMode ); |
207 | extern TStatus TsmSendMessage( TelType, TMsgType, TSM_ELEM_DATA, Tint, ... ); |
208 | extern TStatus TsmOpenStructure( Tint ); |
209 | extern TStatus TsmCloseStructure(); |
210 | extern TStatus TsmDisplayStructure( Tint, Tint ); |
211 | extern TStatus TsmPrintStructure( Tint ); |
212 | extern TStatus TsmAddToStructure( TelType, Tint, ... ); |
213 | extern TStatus TsmDeleteStructure( Tint ); |
214 | extern TStatus TsmDeleteElement(); |
215 | extern TStatus TsmDeleteElementsBetweenLabels( Tint, Tint ); |
216 | extern TStatus TsmDeleteElementRange( Tint, Tint ); |
217 | extern TStatus TsmSetElementPointer( Tint ); |
218 | extern TStatus TsmSetElementPointerAtLabel( Tint ); |
219 | extern TStatus TsmOffsetElementPointer( Tint ); |
220 | extern TStatus TsmGetStructure( Tint, Tint*, tsm_node * ); |
221 | extern TStatus TsmGetStructureDepth( Tint, Tint* ); |
222 | extern TStatus TsmGetCurElem( TSM_ELEM * ); |
223 | extern TStatus TsmGetCurElemPtr( Tint * ); |
224 | |
225 | #endif |