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