home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / felixcad / fcaddata.z / FDT_TYPE.H < prev    next >
C/C++ Source or Header  |  1997-07-03  |  6KB  |  132 lines

  1. /****************************************************************************
  2.            (C) FELIX Computer Aided Technologies GmbH 1995-96
  3.  
  4. Module:    Definitions of data types, structures and functions for FDT
  5. File:      fdt_type.h
  6. Author:    R. Nuernberger
  7. Created:   Oct. 18, 1993
  8. Updated:   
  9. ****************************************************************************/
  10.  
  11. #ifndef _fdt_types_h
  12. #define _fdt_types_h
  13.  
  14. /* Byte Alignment 2 */
  15. #pragma pack(2)
  16.  
  17. #define ANSI
  18.  
  19. typedef double fdt_real;            // Type Real
  20. typedef fdt_real fdt_point[3];      // Type Point Coordinates
  21. typedef unsigned long fdt_name[2];  // Type des Entity Name or Selection Set Name
  22.  
  23. typedef fdt_real fdt_matrix[4][4];  // Type of the FDT transformation matrix
  24.  
  25. #define T  3                        // Translation vector of 3D matrix
  26.  
  27. struct fdt_binary {                 // Structure for binary extended entity data
  28.         short clen;                    // Length in bytes
  29.         char *buf;                     // Pointer to data
  30.        }; 
  31.  
  32. union fdt_u_val {                   // Union for data of FDT result buffer
  33.         fdt_real rreal;                // Floating point value
  34.         fdt_point rpoint;              // Point coordinates
  35.         short rint;                    // Short integer
  36.         long rlong;                    // Long integer
  37.         LPSTR rstring;                 // Pointer to string
  38.         unsigned long rlname[2];       //
  39.         struct fdt_binary rbinary;     // Structure for binary Extended Entity Data info
  40.        };
  41.  
  42. struct resbuf {                     // Result Buffer
  43.         struct resbuf *rbnext;         // Pointer to next element
  44.         short restype;                 // Type of data in union resval
  45.         union fdt_u_val resval;        // Union for the data
  46.        };
  47.  
  48. struct cursordef {                  // Cursor Definition
  49.         short cursorstyle;             // Cursor Style
  50.         fdt_point cursorpnt1;          // First Defpoint
  51.         fdt_point cursorpnt2;          // Second Defpoint
  52.        };
  53.  
  54.  
  55. /* Control bits for fdt_initget() */
  56. #define RSG_NONULL     0x001        // No null input accepted
  57. #define RSG_NOZERO     0x002        // No zero input accepted
  58. #define RSG_NONEG      0x004        // No negative value input accepted
  59. #define RSG_NOLIM      0x008        // (not yet evaluated)
  60. #define RSG_GETZ       0x010        // Returns Z coordinate
  61. #define RSG_DASH       0x020        // (not yet evaluated)
  62. #define RSG_2D         0x040        // Z coordinate ignored
  63. #define RSG_OTHER      0x080        // Any keyboard input accepted
  64. #define RSG_BUTTON     0x100        // Keywords are displayed in context bar (options bar)
  65.  
  66. /* Cursor Style Definitions (bit-coded) */
  67. #define CUR_BIGCROSS       1        // Big crosshair (over entire window, in the current UCS)
  68. #define CUR_SMALLCROSS     2        // Small crosshair
  69. #define CUR_WINDOW         4        // Window in VCS
  70. #define CUR_PICKBOX        8        // Select Box
  71. #define CUR_SNAPBOX       16        // Snap Box
  72. #define CUR_RB_BAND       32        // Single rubberband
  73. #define CUR_DRB_BAND      64        // Double rubberband
  74. #define CUR_VBIGCROSS    128        // Crosshair (over entire window, in the current VCS)
  75. #define CUR_UCSWINDOW    256        // Window in UCS
  76.  
  77. /* Definitions of Snap Modes (bit coded) */
  78. #define SN_NONE            0        // No snap
  79. #define SN_END             1        // End point
  80. #define SN_MID             2        // Mid point
  81. #define SN_CEN             4        // Center point
  82. #define SN_PNT             8        // Point entity
  83. #define SN_QUA            16        // Quadrant
  84. #define SN_INT            32        // Intersection
  85. #define SN_INS            64        // Insertion base point
  86. #define SN_PER           128        // Perpendicular point
  87. #define SN_TAN           256        // Tangent
  88. #define SN_NXT           512        // Next point on entity
  89. #define SN_APPINT       1024        // Virtual Intersection
  90.  
  91. /* Result Type Definitions for the function fdt_getinput() */
  92. #define GC_NOTVALID        0        // Invalid input
  93. #define GC_USER_BREAK      1        // Break
  94. #define GC_VALUE           2        // Numerical input
  95. #define GC_3DPOINT         4        // 3D-point input
  96. #define GC_STRING          8        // String input
  97. #define GC_CURSOR_MOVE    16        // Cursor movement
  98. #define GC_CHAR           32        // Single character input
  99. #define GC_SNAME          64        // Selection set specification
  100. #define GC_ENAME         128        // Entity name specification
  101. #define GC_ENAMEPNT      256        // Entity name and 3D-point
  102. #define GC_KWORD         512        // Keyword input (pre-defined by fdt_initget())
  103.  
  104. /* Definitions of predifined dragmodes (bit coded) */
  105. #define DRAG_VERT_LINE     1        // drages vertical line at cursorposition
  106. #define DRAG_HORZ_LINE     2        // drages horizontal line at cursorposition
  107. #define DRAG_GEN_LINE1     4        // drages line at cursorposition (needs two points)
  108. #define DRAG_GEN_LINE2     8        // drages line at cursorposition (needs one points)
  109. #define DRAG_CIRC_RAD     16        // drags circle using radius
  110. #define DRAG_CIRC_DIA1    32        // drags circle using midpoint and diameter
  111. #define DRAG_CIRC_DIA2    64        // drags circle using perepheriepoint and diameter
  112. #define DRAG_ARC         128        // drags arc
  113.  
  114. /* Definitions of predifined reasons for notifications (NOT bit-coded !!) */
  115. #define NOTIFY_NEW         1        // after open a new drawing
  116. #define NOTIFY_OPEN        2        // after open a existing drawing
  117. #define NOTIFY_SAVE        3        // before saving a dreawing
  118. #define NOTIFY_CLOSE       4        // before closeing a drawing
  119. #define NOTIFY_EXIT        5        // before exit FCAD
  120.  
  121. /* Definitions of images types */
  122. #define TYPE_NON    0xFFFF
  123. #define TYPE_BMP    0    
  124. #define TYPE_WMF    1
  125.  
  126. /* Reset Byte Alignment */
  127. #pragma pack()
  128.  
  129. #endif
  130.  
  131. /* end of file */
  132.