00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094 #ifndef INC_MI32_RVCHYPER_H
00095 #define INC_MI32_RVCHYPER_H
00096
00097 #ifndef INC_MI32_RVCDEFNS_H
00098 #include <mi32/rvcdefns.h>
00099 #endif
00100
00101 #ifndef INC_MI32_COLOR_H
00102 #include <mi32/color.h>
00103 #endif
00104
00105
00106 struct RVCHYPERINFO : public RVCGENINFO {
00107 DPOINT3D min;
00108 DPOINT3D max;
00109 UINT32 NumShapes;
00110 UINT32 NumLinks;
00111 UINT32 MaxShapeSize;
00112 INT32 space;
00113
00114 RVCHYPERINFO (
00115 ) {Clear();}
00116
00117 RVCHYPERINFO (
00118 const RVCGENINFO& ginfo
00119 ) {Clear();*static_cast<RVCGENINFO*>(this) = ginfo;}
00120
00121 RVCHYPERINFO& operator= (
00122 const RVCGENINFO& ginfo
00123 ) {*static_cast<RVCGENINFO*>(this) = ginfo; return (*this);}
00124
00125 void Clear (
00126 ) {memset(static_cast<void*>(this), 0, sizeof(*this));}
00127
00128 #ifdef RVCSYSDLL
00129 void CopyFrom (
00130 const RVCHYPERINFO& Source,
00131 size_t size
00132 ) { memcpy(static_cast<void*>(this), &Source, MIN(size, sizeof(*this))); }
00133 #endif
00134
00135
00136
00137 DRECT3D GetExtents (
00138 ) const {
00139 DRECT3D rect;
00140 rect.xinit = min.x;
00141 rect.yinit = min.y;
00142 rect.zinit = min.z;
00143 rect.xlast = max.x;
00144 rect.ylast = max.y;
00145 rect.zlast = max.z;
00146 return (rect);
00147 }
00148
00149
00150 void SetExtents (
00151 const DRECT3D& rect
00152 ) {
00153 min.x = rect.xinit;
00154 min.y = rect.yinit;
00155 min.z = rect.zinit;
00156 max.x = rect.xlast;
00157 max.y = rect.ylast;
00158 max.z = rect.zlast;
00159 return;
00160 }
00161
00162 };
00163
00164 PREVENT_MEMFUNC(RVCHYPERINFO)
00165
00166
00167
00168
00169 struct HYPERLINK {
00170 MIUNICODE *filename;
00171 MIUNICODE *name;
00172 MIUNICODE *desc;
00173 MIUNICODE *HyperName;
00174 UINT16 otype;
00175 UINT16 PosnType;
00176 UINT16 ScaleType;
00177 UINT16 ScaleValue;
00178 UINT32 shape;
00179 void *layer;
00180 };
00181
00182 #define HYPERLINKOBJ_DISP2DWINDOW 0
00183 #define HYPERLINKOBJ_RasterColor 1
00184 #define HYPERLINKOBJ_RasterGray 2
00185 #define HYPERLINKOBJ_Vector 3
00186 #define HYPERLINKOBJ_CAD 4
00187 #define HYPERLINKOBJ_Layout 5
00188 #define HYPERLINKOBJ_Group 6
00189 #define HYPERLINKOBJ_TIN 7
00190 #define HYPERLINKOBJ_TextFile 8
00191 #define HYPERLINKOBJ_ExternalFile 9
00192 #define HYPERLINKOBJ_URL 10
00193 #define HYPERLINKOBJ_AttribFile 11
00194 #define HYPERLINKOBJ_AttribURL 12
00195 #define HYPERLINKOBJ_Shape 13
00196 #define HYPERLINKOBJ_LAST 13
00197
00198
00199 struct HYPERSHAPE {
00200 DPOINT3D min;
00201 DPOINT3D max;
00202 COLOR color;
00203 INT32 elem;
00204 INT16 ShapeType;
00205 INT16 spare_word;
00206 UINT32 NumPoints;
00207 UINT32 NumLinks;
00208 };
00209
00210
00211 #define HYPERSHAPEFLAG_Transparent 1
00212
00213 #define HYPERSHAPE_Deleted -1
00214 #define HYPERSHAPE_Rect 0
00215 #define HYPERSHAPE_Circle 1
00216 #define HYPERSHAPE_Poly 2
00217 #define HYPERSHAPE_VectPointAny 5
00218 #define HYPERSHAPE_VectLineAny 6
00219 #define HYPERSHAPE_VectPolyAny 7
00220 #define HYPERSHAPE_VectPoint 8
00221 #define HYPERSHAPE_VectLine 9
00222 #define HYPERSHAPE_VectPoly 10
00223 #define HYPERSHAPE_CAD 11
00224 #define HYPERSHAPE_CAD_Any 12
00225 #define HYPERSHAPE_ShapeElem 13
00226 #define HYPERSHAPE_ShapeElem_Any 14
00227 #define HYPERSHAPE_TIN_Node 15
00228 #define HYPERSHAPE_TIN_Node_Any 16
00229
00230
00231
00232 #define HYPERLINK_PosnClick 0
00233 #define HYPERLINK_PosnCenter 1
00234 #define HYPERLINK_PosnAsSaved 2
00235 #define HYPERLINK_PosnTypeMax 2
00236
00237
00238 #define HYPERLINK_Scale1X 0
00239 #define HYPERLINK_ScaleFullView 1
00240 #define HYPERLINK_ScaleAsSaved 2
00241 #define HYPERLINK_ScaleView2 3
00242 #define HYPERLINK_ScaleView3 4
00243 #define HYPERLINK_ScaleView4 5
00244 #define HYPERLINK_ScaleView5 6
00245 #define HYPERLINK_ScaleView6 7
00246 #define HYPERLINK_ScaleView7 8
00247 #define HYPERLINK_ScaleView8 9
00248 #define HYPERLINK_ScaleFractionalView 10
00249 #define HYPERLINK_ScaleMap 11
00250 #define HYPERLINK_ScaleMap100 12
00251 #define HYPERLINK_ScaleMap1000 13
00252 #define HYPERLINK_ScaleTypeMax 13
00253
00254
00255
00256
00257
00258 #ifndef GENERATING_DOXYGEN_OUTPUT
00259
00260 #if defined(__cplusplus)
00261 extern "C" {
00262 #endif
00263
00264 RVCAPPLIBEXPORT int _MfHyperClose (
00265 int id,
00266 RVCHYPERINFO *info,
00267 int HeaderSize
00268 );
00269
00270 RVCAPPLIBEXPORT int _MfHyperHeaderReadOpen (
00271 int id,
00272 RVCHYPERINFO *newinfo,
00273 int HeaderSize
00274 );
00275
00276 RVCAPPLIBEXPORT int _MfHyperHeaderWriteOpen (
00277 int id,
00278 RVCHYPERINFO *newinfo,
00279 int HeaderSize
00280 );
00281
00282 RVCAPPLIBEXPORT void _MfHyperLinkCopy (
00283 HYPERLINK *dest,
00284 const HYPERLINK *src,
00285 int LinkSize
00286 );
00287
00288 RVCAPPLIBEXPORT void _MfHyperLinkFree (
00289 HYPERLINK *link,
00290 int LinkSize
00291 );
00292
00293 RVCAPPLIBEXPORT int _MfHyperLinkRead (
00294 int id,
00295 INT32 num,
00296 HYPERLINK *newlink,
00297 int LinkSize
00298 );
00299
00300 RVCAPPLIBEXPORT int _MfHyperLinkWrite (
00301 int id,
00302 INT32 num,
00303 HYPERLINK *newlink,
00304 int LinkSize
00305 );
00306
00307 RVCAPPLIBEXPORT int _MfHyperMake (
00308 int fileindex,
00309 RVCHYPERINFO *info,
00310 int HeaderSize,
00311 UINT32 flags
00312 );
00313
00314 RVCAPPLIBEXPORT int _MfHyperOpen (
00315 int fileindex,
00316 INT32 inode,
00317 RVCHYPERINFO *newinfo,
00318 int HeaderSize,
00319 UINT32 flags
00320 );
00321
00322 RVCAPPLIBEXPORT int _MfHyperShapeChange (
00323 int id,
00324 INT32 num,
00325 const HYPERSHAPE *newshape,
00326 int ShapeSize,
00327 const DPOINT2D *points
00328 );
00329
00330 RVCAPPLIBEXPORT int _MfHyperShapeRead (
00331 int id,
00332 INT32 num,
00333 HYPERSHAPE *newshape,
00334 int ShapeSize,
00335 DPOINT2D **points_p,
00336 INT32 **links_p
00337 );
00338
00339 RVCAPPLIBEXPORT int _MfHyperShapeWrite (
00340 int id,
00341 INT32 num,
00342 const HYPERSHAPE *newshape,
00343 int ShapeSize,
00344 const DPOINT2D *points,
00345 const INT32 *links
00346 );
00347
00348 #endif
00349
00350
00351 RVCAPPLIBEXPORT INT32 MfFindHyperShape (
00352 int id,
00353 INT32 element,
00354 int ShapeType
00355 );
00356
00357
00358
00359
00360 RVCAPPLIBEXPORT INT32 MfHyperNumShapes (
00361 int id
00362 );
00363
00364
00365 RVCAPPLIBEXPORT INT32 MfHyperNumLinks (
00366 int id
00367 );
00368
00369
00370 RVCAPPLIBEXPORT int MfHyperShapeRemoveLink (
00371 int id,
00372 INT32 num,
00373 INT32 link
00374 );
00375
00376
00377 RVCAPPLIBEXPORT int MfHyperShapeAddLink (
00378 int id,
00379 INT32 num,
00380 INT32 link
00381 );
00382
00383
00384 RVCAPPLIBEXPORT int MfResizeHyperShape (
00385 int id,
00386 INT32 numshapes
00387 );
00388
00389
00390 RVCAPPLIBEXPORT int MfSwapHyperShapes (
00391 int id,
00392 INT32 item1,
00393 INT32 item2
00394 );
00395
00396
00397 inline int MfCloseHyper (
00398 int id,
00399 RVCHYPERINFO *info
00400 ) {
00401 return _MfHyperClose(id, info, sizeof(RVCHYPERINFO));
00402 }
00403
00404
00405 inline int MfMakeHyper (
00406 int fileindex,
00407 RVCHYPERINFO *info,
00408 UINT32 flags
00409 ) {
00410 return _MfHyperMake(fileindex, info,sizeof(RVCHYPERINFO), flags);
00411 }
00412
00413
00414 inline int MfOpenHyper (
00415 int fileindex,
00416 INT32 inode,
00417 RVCHYPERINFO *newinfo,
00418 UINT32 flags
00419 ) {
00420 return _MfHyperOpen(fileindex, inode, newinfo, sizeof(RVCHYPERINFO), flags);
00421 }
00422
00423
00424 inline int MfReadOpenHyperHeader (
00425 int id,
00426 RVCHYPERINFO *newinfo
00427 ) {
00428 return _MfHyperHeaderReadOpen(id, newinfo, sizeof(RVCHYPERINFO));
00429 }
00430
00431
00432 inline int MfReadHyperShape (
00433 int id,
00434 INT32 num,
00435 HYPERSHAPE *newshape,
00436 DPOINT2D **points_p,
00437 INT32 **links_p
00438 ) {
00439 return _MfHyperShapeRead(id, num, newshape, sizeof(HYPERSHAPE), points_p, links_p);
00440 }
00441
00442
00443 inline int MfWriteHyperShape (
00444 int id,
00445 INT32 num,
00446 const HYPERSHAPE *newshape,
00447 const DPOINT2D *points,
00448 const INT32 *links
00449 ) {
00450 return _MfHyperShapeWrite(id, num, newshape, sizeof(HYPERSHAPE), points, links);
00451 }
00452
00453
00454 inline int MfHyperChangeShape (
00455 int id,
00456 INT32 num,
00457 const HYPERSHAPE *newshape,
00458 const DPOINT2D *points
00459 ) {
00460 return _MfHyperShapeChange(id, num, newshape, sizeof(HYPERSHAPE), points);
00461 }
00462
00463
00464 inline int MfReadHyperLink (
00465 int id,
00466 INT32 num,
00467 HYPERLINK *newlink
00468 ) {
00469 return _MfHyperLinkRead(id, num, newlink, sizeof(HYPERLINK));
00470 }
00471
00472
00473 inline int MfWriteHyperLink (
00474 int id,
00475 INT32 num,
00476 HYPERLINK *newlink
00477 ) {
00478 return (_MfHyperLinkWrite(id, num, newlink,sizeof(HYPERLINK)));
00479 }
00480
00481
00482 inline void MfFreeHyperLink (
00483 HYPERLINK *link
00484 ) {
00485 _MfHyperLinkFree(link, sizeof(HYPERLINK));
00486 return;
00487 }
00488
00489
00490 inline void MfCopyHyperLink (
00491 HYPERLINK *dest,
00492 const HYPERLINK *src
00493 ) {
00494 _MfHyperLinkCopy(dest, src, sizeof(HYPERLINK));
00495 return;
00496 }
00497
00498
00499 #if defined(__cplusplus)
00500 }
00501 #endif
00502
00503
00504
00505 #endif