home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 1997 / CT_SW_97.ISO / mac / Software / bild / win95 / t422l1d.exe / _001410_ / tosoapi4.h
Text File  |  1997-03-12  |  180KB  |  3,753 lines

  1. //------------------------------------------------------------------------------------------------------
  2. // Name       : tosoapi4.h
  3. //
  4. // Purpose    : Prototypes and definitions of the TommySoftwareÆ Open Software Interface Version 4.2.
  5. //              All prototypes and definitions stated in this file are subject to change without notice.
  6. //              Errors excepted. Be sure to check the interface's version (as passed to TosoModuleInit)
  7. //              before accessing ANY of the interface procedures!
  8. //
  9. //              Plug-ins using this interface may be distributed without any license fee. If you would
  10. //              like to offer your plug-ins in a bundle including the serving application, please contact
  11. //              TommySoftwareÆ at one of the addresses stated below:
  12. //
  13. //                      TommySoftwareÆ,                 TommySoftwareÆ
  14. //                      North America, Inc.             Deutschland
  15. //                      1843 10th Avenue                Selchower Strasse 32
  16. //                      San Franciso, CA 94122          D-12049 Berlin
  17. //                      U.S.A.                          Germany
  18. //
  19. //                      Phone (415) 566 6118            Phone +49 30 621 5931
  20. //                      Fax   (415) 566 6589            Fax   +49 30 621 4064
  21. //
  22. //                      Internet
  23. //                      sales@tommysoftware.com         (Sales)
  24. //                      support@tommysoftware.com       (Technical Support)
  25. //                      http://www.tommysoftware.com    (World Wide Web)
  26. //
  27. //              For further information on how to create plug-ins based on the TommySoftwareÆ Open
  28. //              Software Interface Version 4.2, see the interface documentation in the file TOSOAPI4.HLP
  29. //              which is included in all applications supporting this interface.
  30. //
  31. // Date       : 1997-Mar-12    Author : SM / OK      System : Win32
  32. //------------------------------------------------------------------------------------------------------
  33.  
  34. #define TOSO_INTERFACE_VERSION  422             // Current Toso Interface version 
  35. #define TOSO_INTERFACE_MINIMUM  420             // Minimum Toso Interface version a plug-in must support
  36.  
  37. #define TOSO_TVG_VERSION        420             // Current version of Toso TVG
  38.  
  39. //------------------------------------------------------------------------------------------------------
  40.  
  41. #define DLL_EXPORT      __declspec( dllexport )
  42. #define DLL_IMPORT      __declspec( dllimport )
  43.  
  44. //------ Dialog Control Messages -----------------------------------------------------------------------
  45.  
  46. #define Dialog_SetDefID(hwndCtl, id)            ((void) SendMessage((hwndCtl), DM_SETDEFID, (WPARAM) (id), 0L ))
  47. #define Edit_SendChar(hwndCtl, ch)              ((void) SendMessage((hwndCtl), WM_CHAR, (WPARAM) ((int) (ch) & 0xff), 0L ))
  48. #define Control_SetFont(hwndCtl, hFont)         ((void) SendMessage((hwndCtl), WM_SETFONT, (WPARAM) (hFont), 0L ))
  49. #define ComboBox_GetSelFieldHeight(hwndCtl)     ((int) (DWORD) SendMessage((hwndCtl), CB_GETITEMHEIGHT, (WPARAM) (int) -1, 0L ))
  50.  
  51. //------ Message Crackers ------------------------------------------------------------------------------
  52.  
  53. #define GET_WM_ACTIVATEAPP_ACTIVE(wp,lp)        (BOOL)(wp)
  54. #define GET_WM_ACTIVATEAPP_TASK(wp,lp)          (DWORD)(lp)
  55.  
  56. #define GET_WM_DROPFILES_HANDLE(wp,lp)          (HANDLE)(wp)
  57.  
  58. #define GET_WM_ENTERIDLE_SOURCE(wp,lp)          (wp)
  59. #define GET_WM_ENTERIDLE_HWND(wp,lp)            (HWND)(lp)
  60.  
  61. #define GET_WM_INITMENU_HMENU(wp,lp)            (HMENU)(wp)
  62.  
  63. #define GET_WM_KEY_VKEY(wp,lp)                  (int)(wp)
  64. #define GET_WM_KEY_DATA(wp,lp)                  (lp)
  65. #define GET_WM_KEY_MPS(vkey,data)               (WPARAM)(vkey),(LPARAM)(data)
  66.  
  67. #define GET_WM_MOUSE_BUTTONS(wp,lp)             (wp)
  68. #define GET_WM_MOUSE_XPOS(wp,lp)                (int)LOWORD(lp)
  69. #define GET_WM_MOUSE_YPOS(wp,lp)                (int)HIWORD(lp)
  70. #define GET_WM_MOUSE_MPS(button,xp,yp)          (WPARAM)(button),(LPARAM)MAKELONG(xp,yp)
  71.  
  72. #define GET_WM_SETCURSOR_HWND(wp,lp)            (HWND)(wp)
  73. #define GET_WM_SETCURSOR_HITTEST(wp,lp)         LOWORD(lp)
  74. #define GET_WM_SETCURSOR_MSG(wp,lp)             HIWORD(lp)
  75.  
  76. #define GET_WM_WINDOWPOSCHANGING_PTR(wp,lp)     (LPWINDOWPOS)(lp)
  77. #define GET_WM_GETMINMAXINFO_PTR(wp,lp)         (LPMINMAXINFO)(lp)
  78. #define GET_WM_PALETTECHANGED_HWND(wp,lp)       (HWND)(wp)
  79.  
  80. //------ Miscellaneous Macros --------------------------------------------------------------------------
  81.  
  82. #define TOSO_GET_BUILD_DATE(x)                  TosoGetBuildDate( __DATE__, (x) )
  83.  
  84. //------ System-independent Macros ---------------------------------------------------------------------
  85.  
  86. #define round(a)                (int) ( floor( (a) + 0.5 ) )    // Rounding of a DOUBLE value
  87. #define fixed(a)                (( (a).value < 0 ) ?                                    \
  88.                                  ( (double) (a).value - (double) (a).fract / 65536.0 ): \
  89.                                  ( (double) (a).value + (double) (a).fract / 65536.0 ))
  90. #define lstrclr(a)              (a)[0] = '\0'                   // Clearing a string
  91.  
  92. #define int_loword(a)           (int) ( (a) & 0xffff )
  93. #define int_hiword(a)           (int) ( ( (a) >> 16 ) & 0xffff )
  94. #define int_makelong(a,b)       (int) ( ( ( (b) & 0xffff ) << 16 ) | ( (a) & 0xffff ) )
  95.  
  96. //------ Matrix Handling -------------------------------------------------------------------------------
  97.  
  98. #define mat_x(m,x,y)            ( (m)->m11 * (x) + (m)->m21 * (y) + (m)->m31 )
  99. #define mat_y(m,x,y)            ( (m)->m12 * (x) + (m)->m22 * (y) + (m)->m32 )
  100. #define mat_dx(m,x,y)           ( (m)->m11 * (x) + (m)->m21 * (y) )
  101. #define mat_dy(m,x,y)           ( (m)->m12 * (x) + (m)->m22 * (y) )
  102. #define mat_sx(m,x)             ( (m)->m11 * (x) + (m)->m31 )
  103. #define mat_sy(m,y)             ( (m)->m22 * (y) + (m)->m32 )
  104.  
  105. //------ Data Block Handling ---------------------------------------------------------------------------
  106.  
  107. #define db_alignsize(s)         ( ( (s) + 7 ) & (~7) )
  108. #define db_textsize(t)          ( ( lstrlen( t ) + 8 ) & (~7) )
  109.  
  110. #define DB_SIZE_POINT           ( db_alignsize( sizeof( BLOCK_POINT ) + sizeof( DPOINT ) ) )
  111. #define DB_SIZE_CONSTANT        ( db_alignsize( sizeof( BLOCK_DOUBLE ) + sizeof( double ) ) )
  112. #define DB_SIZE_ARC             ( db_alignsize( sizeof( BLOCK_DOUBLE ) + sizeof( double ) ) )
  113. #define DB_SIZE_CURVE           ( db_alignsize( sizeof( BLOCK_DOUBLE ) + sizeof( double ) + sizeof( double ) ) )
  114. #define DB_SIZE_TEXT            ( db_alignsize( sizeof( BLOCK_TEXT ) ) )
  115. #define DB_SIZE_END             ( db_alignsize( sizeof( BLOCK_ANY ) ) )
  116. #define DB_SIZE_ANY             ( db_alignsize( sizeof( BLOCK_ANY ) ) )
  117.  
  118. #define db_offset(b,x)          ( (BLOCK_PTR) ( (b)->Data + (x) ) )
  119. #define db_first(b)             ( (BLOCK_PTR) ( (b)->Data ) )
  120. #define db_next(b)              ( (BLOCK_PTR) ( (LPBYTE) (b) + (b)->Header.Size ) )
  121. #define db_difference(b,p)      ( (OFFSET) ( (BYTE*) (p) - (BYTE*) ( (b)->Data ) ) )
  122.  
  123. #define db_point(b)             ( ( (BLOCK_POINT_PTR)  (b) )->Data[0] )
  124. #define db_constant(b)          ( ( (BLOCK_DOUBLE_PTR) (b) )->Data[0] )
  125. #define db_orient(b)            ( ( (BLOCK_DOUBLE_PTR) (b) )->Data[0] )
  126. #define db_curve(b)             ( ( (BLOCK_DOUBLE_PTR) (b) )->Data[1] )
  127. #define db_attribute_name(b)    ( ( (BLOCK_ATTRIBUTE_PTR) (b) )->Name )
  128. #define db_attribute_text(b)    ( ( (BLOCK_ATTRIBUTE_PTR) (b) )->Text )
  129.  
  130. #define db_data_long(b)         ( ( (BLOCK_LONG_PTR)          (b) )->Data )
  131. #define db_data_double(b)       ( ( (BLOCK_DOUBLE_PTR)        (b) )->Data )
  132. #define db_data_point(b)        ( ( (BLOCK_POINT_PTR)         (b) )->Data )
  133. #define db_data_colorref(b)     ( ( (BLOCK_COLORREF_PTR)      (b) )->Data )
  134. #define db_data_property(b)     ( ( (BLOCK_PROPERTY_PTR)      (b) )->Data )
  135. #define db_data_xproperty(b)    ( ( (BLOCK_XPROPERTY_PTR)     (b) )->Data )
  136. #define db_data_fontdef(b)      ( ( (BLOCK_FONTDEF_PTR)       (b) )->Data )
  137. #define db_data_text(b)         ( ( (BLOCK_TEXT_PTR)          (b) )->Text )
  138. #define db_data_binary(b)       ( ( (BLOCK_BINARY_PTR)        (b) )->Data )
  139.  
  140. #define db_data_dimline(b)      ( ( (BLOCK_DIMLINE_PTR)       (b) )->Data )
  141. #define db_data_dimlarge(b)     ( ( (BLOCK_DIMLARGE_PTR)      (b) )->Data )
  142. #define db_data_dimsmall(b)     ( ( (BLOCK_DIMSMALL_PTR)      (b) )->Data )
  143. #define db_data_textstandard(b) ( ( (BLOCK_TEXTSTANDARD_PTR)  (b) )->Data )
  144. #define db_data_textframe(b)    ( ( (BLOCK_TEXTFRAME_PTR)     (b) )->Data )
  145. #define db_data_textreference(b)( ( (BLOCK_TEXTREFERENCE_PTR) (b) )->Data )
  146. #define db_data_clipsurface(b)  ( ( (BLOCK_CLIPSURFACE_PTR)   (b) )->Data )
  147. #define db_data_bitmapref(b)    ( ( (BLOCK_BITMAPREF_PTR)     (b) )->Data )
  148.  
  149. #if TOSO_SERVER
  150.  
  151. #define db_init_point(b,t)      inline_db_init_point    ( (BLOCK_PTR) (b), (short) (t) )
  152. #define db_init_constant(b)     inline_db_init_constant ( (BLOCK_PTR) (b) )
  153. #define db_init_arc(b)          inline_db_init_arc      ( (BLOCK_PTR) (b) )
  154. #define db_init_curve(b)        inline_db_init_curve    ( (BLOCK_PTR) (b) )
  155. #define db_init_text(b,c)       inline_db_init_text     ( (BLOCK_PTR) (b), (short) (c) )
  156. #define db_init_end(b)          inline_db_init_end      ( (BLOCK_PTR) (b) )
  157. #define db_init_attribute(b,t)  inline_db_init_attribute( (BLOCK_PTR) (b), (short) (t) )
  158. #define db_init_any(b,t)        inline_db_init_any      ( (BLOCK_PTR) (b), (short) (t) )
  159.  
  160. #else
  161.  
  162. #define db_init_point(b,t)      {                                                                       \
  163.                                   ((BLOCK_PTR)(b))->Header.Size  = DB_SIZE_POINT;                       \
  164.                                   ((BLOCK_PTR)(b))->Header.Ident = ((BLOCK_PTR)(b))->Header.Flag = 0;   \
  165.                                   ((BLOCK_PTR)(b))->Header.BlockOwner = 0;                              \
  166.                                   ((BLOCK_PTR)(b))->Header.BlockType  = ((short) (t));                  \
  167.                                   ((BLOCK_PTR)(b))->Header.ElemType   = DB_TYPE_POINT;                  \
  168.                                   ((BLOCK_PTR)(b))->Header.ElemCount  = 1;                              \
  169.                                 }
  170.  
  171. #define db_init_constant(b)     {                                                                       \
  172.                                   ((BLOCK_PTR)(b))->Header.Size  = DB_SIZE_CONSTANT;                    \
  173.                                   ((BLOCK_PTR)(b))->Header.Ident = ((BLOCK_PTR)(b))->Header.Flag = 0;   \
  174.                                   ((BLOCK_PTR)(b))->Header.BlockOwner = 0;                              \
  175.                                   ((BLOCK_PTR)(b))->Header.BlockType  = DB_ALL_CONSTANT;                \
  176.                                   ((BLOCK_PTR)(b))->Header.ElemType   = DB_TYPE_DOUBLE;                 \
  177.                                   ((BLOCK_PTR)(b))->Header.ElemCount  = 1;                              \
  178.                                 }
  179.  
  180. #define db_init_arc(b)          {                                                                       \
  181.                                   ((BLOCK_PTR)(b))->Header.Size  = DB_SIZE_ARC;                         \
  182.                                   ((BLOCK_PTR)(b))->Header.Ident = ((BLOCK_PTR)(b))->Header.Flag = 0;   \
  183.                                   ((BLOCK_PTR)(b))->Header.BlockOwner = 0;                              \
  184.                                   ((BLOCK_PTR)(b))->Header.BlockType  = DB_ALL_ARC;                     \
  185.                                   ((BLOCK_PTR)(b))->Header.ElemType   = DB_TYPE_DOUBLE;                 \
  186.                                   ((BLOCK_PTR)(b))->Header.ElemCount  = 1;                              \
  187.                                 }
  188.  
  189. #define db_init_curve(b)        {                                                                       \
  190.                                   ((BLOCK_PTR)(b))->Header.Size  = DB_SIZE_CURVE;                       \
  191.                                   ((BLOCK_PTR)(b))->Header.Ident = ((BLOCK_PTR)(b))->Header.Flag = 0;   \
  192.                                   ((BLOCK_PTR)(b))->Header.BlockOwner = 0;                              \
  193.                                   ((BLOCK_PTR)(b))->Header.BlockType  = DB_ALL_CURVE;                   \
  194.                                   ((BLOCK_PTR)(b))->Header.ElemType   = DB_TYPE_DOUBLE;                 \
  195.                                   ((BLOCK_PTR)(b))->Header.ElemCount  = 2;                              \
  196.                                 }
  197.  
  198. #define db_init_text(b,c)       {                                                                       \
  199.                                   ((BLOCK_PTR)(b))->Header.Size  = db_alignsize( DB_SIZE_TEXT + abs( (short) (c) ) );   \
  200.                                   ((BLOCK_PTR)(b))->Header.Ident = ((BLOCK_PTR)(b))->Header.Flag = 0;   \
  201.                                   ((BLOCK_PTR)(b))->Header.BlockOwner = 0;                              \
  202.                                   ((BLOCK_PTR)(b))->Header.BlockType  = DB_ALL_TEXT;                    \
  203.                                   ((BLOCK_PTR)(b))->Header.ElemType   = DB_TYPE_TEXT;                   \
  204.                                   ((BLOCK_PTR)(b))->Header.ElemCount  = (short) (c);                    \
  205.                                 }
  206.  
  207. #define db_init_end(b)          {                                                                       \
  208.                                   ((BLOCK_PTR)(b))->Header.Size  = DB_SIZE_END;                         \
  209.                                   ((BLOCK_PTR)(b))->Header.Ident = ((BLOCK_PTR)(b))->Header.Flag = 0;   \
  210.                                   ((BLOCK_PTR)(b))->Header.BlockOwner = 0;                              \
  211.                                   ((BLOCK_PTR)(b))->Header.BlockType  = DB_END;                         \
  212.                                   ((BLOCK_PTR)(b))->Header.ElemType   = DB_TYPE_NATIVE;                 \
  213.                                   ((BLOCK_PTR)(b))->Header.ElemCount  = 0;                              \
  214.                                 }
  215.  
  216. #define db_init_attribute(b,t)  {                                                                       \
  217.                                   ((BLOCK_PTR)(b))->Header.Size  = db_alignsize( sizeof( BLOCK_ATTRIBUTE ) + NAME_LENGTH_TEXTSHORT );   \
  218.                                   ((BLOCK_PTR)(b))->Header.Ident = ((BLOCK_PTR)(b))->Header.Flag = 0;   \
  219.                                   ((BLOCK_PTR)(b))->Header.BlockOwner = 0;                              \
  220.                                   ((BLOCK_PTR)(b))->Header.BlockType  = (short) (t);                    \
  221.                                   ((BLOCK_PTR)(b))->Header.ElemType   = DB_TYPE_NATIVE;                 \
  222.                                   ((BLOCK_PTR)(b))->Header.ElemCount  = NAME_LENGTH_TEXTSHORT;          \
  223.                                 }
  224.  
  225. #define db_init_any(b,t)        {                                                                       \
  226.                                   ((BLOCK_PTR)(b))->Header.Size  = DB_SIZE_ANY;                         \
  227.                                   ((BLOCK_PTR)(b))->Header.Ident = ((BLOCK_PTR)(b))->Header.Flag = 0;   \
  228.                                   ((BLOCK_PTR)(b))->Header.BlockOwner = 0;                              \
  229.                                   ((BLOCK_PTR)(b))->Header.BlockType  = (short) (t);                    \
  230.                                   ((BLOCK_PTR)(b))->Header.ElemType   = DB_TYPE_NATIVE;                 \
  231.                                   ((BLOCK_PTR)(b))->Header.ElemCount  = 0;                              \
  232.                                 }
  233.  
  234. #endif
  235.  
  236. //------ Determination of Standard Data Block Pointers for Complex Objects -----------------------------
  237.  
  238. #define DB_PTR_DECLARATION      BLOCK_PTR               b1 = NULL,      \
  239.                                                         b2 = NULL,      \
  240.                                                         b3 = NULL,      \
  241.                                                         b4 = NULL,      \
  242.                                                         b5 = NULL,      \
  243.                                                         b6 = NULL,      \
  244.                                                         b7 = NULL,      \
  245.                                                         b8 = NULL,      \
  246.                                                         b999 = NULL;    \
  247.                                 BLOCK_TEXT_PTR          a110 = NULL,    \
  248.                                                         b110 = NULL,    \
  249.                                                         c110 = NULL,    \
  250.                                                         d110 = NULL,    \
  251.                                                         e110 = NULL,    \
  252.                                                         f110 = NULL,    \
  253.                                                         g110 = NULL;    \
  254.                                 BLOCK_DIMLINE_PTR       b220 = NULL;    \
  255.                                 BLOCK_DIMLARGE_PTR      b225 = NULL;    \
  256.                                 BLOCK_DIMSMALL_PTR      b230 = NULL;    \
  257.                                 BLOCK_TEXTSTANDARD_PTR  b235 = NULL;    \
  258.                                 BLOCK_TEXTFRAME_PTR     b236 = NULL;    \
  259.                                 BLOCK_TEXTREFERENCE_PTR b237 = NULL;    \
  260.                                 BLOCK_CLIPSURFACE_PTR   b242 = NULL;    \
  261.                                 BLOCK_BITMAPREF_PTR     b243 = NULL;    \
  262.                                 BLOCK_T001_PTR          t001 = NULL;    \
  263.                                 BLOCK_T002_PTR          t002 = NULL;    \
  264.                                 BLOCK_T003_PTR          t003 = NULL;    \
  265.                                 BLOCK_T004_PTR          t004 = NULL;    \
  266.                                 BLOCK_T005_PTR          t005 = NULL;    \
  267.                                 BLOCK_T006_PTR          t006 = NULL;    \
  268.                                 BLOCK_T007_PTR          t007 = NULL;    \
  269.                                 BLOCK_T008_PTR          t008 = NULL;
  270.  
  271. #define db_ptr_dline(p)         {                                               \
  272.                                   b1   = db_first( p );                         \
  273.                                   b2   = db_next( b1 );                         \
  274.                                   b220 = (BLOCK_DIMLINE_PTR) db_next( b2 );     \
  275.                                   t003 = (BLOCK_T003_PTR) db_next( b220 );      \
  276.                                 }
  277.  
  278. #define db_ptr_darc(p)          {                                               \
  279.                                   b1   = db_first( p );                         \
  280.                                   b2   = db_next( b1 );                         \
  281.                                   b3   = db_next( b2 );                         \
  282.                                   b4   = db_next( b3 );                         \
  283.                                   b5   = db_next( b4 );                         \
  284.                                   b220 = (BLOCK_DIMLINE_PTR) db_next( b5 );     \
  285.                                   t004 = (BLOCK_T004_PTR) db_next( b220 );      \
  286.                                 }
  287.  
  288. #define db_ptr_ddistance(p)     {                                               \
  289.                                   b1 = db_first( p );                           \
  290.                                   b2 = db_next( b1 );                           \
  291.                                   b3 = db_next( b2 );                           \
  292.                                   b4 = db_next( b3 );                           \
  293.                                   b5 = db_next( b4 );                           \
  294.                                   b6 = db_next( b5 );                           \
  295.                                   b7 = db_next( b6 );                           \
  296.                                   a110 = (BLOCK_TEXT_PTR) db_next( b7 );        \
  297.                                   b110 = (BLOCK_TEXT_PTR) db_next( a110 );      \
  298.                                   c110 = (BLOCK_TEXT_PTR) db_next( b110 );      \
  299.                                   d110 = (BLOCK_TEXT_PTR) db_next( c110 );      \
  300.                                   e110 = (BLOCK_TEXT_PTR) db_next( d110 );      \
  301.                                   b225 = (BLOCK_DIMLARGE_PTR) db_next( e110 );  \
  302.                                   t005 = (BLOCK_T005_PTR) db_next( b225 );      \
  303.                                 }
  304.  
  305. #define db_ptr_dradius(p)       {                                               \
  306.                                   b1 = db_first( p );                           \
  307.                                   b2 = db_next( b1 );                           \
  308.                                   b3 = db_next( b2 );                           \
  309.                                   b4 = db_next( b3 );                           \
  310.                                   b5 = db_next( b4 );                           \
  311.                                   b6 = db_next( b5 );                           \
  312.                                   a110 = (BLOCK_TEXT_PTR) db_next( b6 );        \
  313.                                   b110 = (BLOCK_TEXT_PTR) db_next( a110 );      \
  314.                                   c110 = (BLOCK_TEXT_PTR) db_next( b110 );      \
  315.                                   d110 = (BLOCK_TEXT_PTR) db_next( c110 );      \
  316.                                   e110 = (BLOCK_TEXT_PTR) db_next( d110 );      \
  317.                                   b225 = (BLOCK_DIMLARGE_PTR) db_next( e110 );  \
  318.                                   t005 = (BLOCK_T005_PTR) db_next( b225 );      \
  319.                                 }
  320.  
  321. #define db_ptr_dangle(p)        {                                               \
  322.                                   b1 = db_first( p );                           \
  323.                                   b2 = db_next( b1 );                           \
  324.                                   b3 = db_next( b2 );                           \
  325.                                   b4 = db_next( b3 );                           \
  326.                                   b5 = db_next( b4 );                           \
  327.                                   b6 = db_next( b5 );                           \
  328.                                   b7 = db_next( b6 );                           \
  329.                                   a110 = (BLOCK_TEXT_PTR) db_next( b7 );        \
  330.                                   b110 = (BLOCK_TEXT_PTR) db_next( a110 );      \
  331.                                   c110 = (BLOCK_TEXT_PTR) db_next( b110 );      \
  332.                                   d110 = (BLOCK_TEXT_PTR) db_next( c110 );      \
  333.                                   e110 = (BLOCK_TEXT_PTR) db_next( d110 );      \
  334.                                   b225 = (BLOCK_DIMLARGE_PTR) db_next( e110 );  \
  335.                                   t006 = (BLOCK_T006_PTR) db_next( b225 );      \
  336.                                 }
  337.  
  338. #define db_ptr_darclength(p)    {                                               \
  339.                                   b1 = db_first( p );                           \
  340.                                   b2 = db_next( b1 );                           \
  341.                                   b3 = db_next( b2 );                           \
  342.                                   b4 = db_next( b3 );                           \
  343.                                   b8 = db_next( b4 );                           \
  344.                                   b5 = db_next( b8 );                           \
  345.                                   b6 = db_next( b5 );                           \
  346.                                   b7 = db_next( b6 );                           \
  347.                                   a110 = (BLOCK_TEXT_PTR) db_next( b7 );        \
  348.                                   b110 = (BLOCK_TEXT_PTR) db_next( a110 );      \
  349.                                   c110 = (BLOCK_TEXT_PTR) db_next( b110 );      \
  350.                                   d110 = (BLOCK_TEXT_PTR) db_next( c110 );      \
  351.                                   e110 = (BLOCK_TEXT_PTR) db_next( d110 );      \
  352.                                   b225 = (BLOCK_DIMLARGE_PTR) db_next( e110 );  \
  353.                                   t006 = (BLOCK_T006_PTR) db_next( b225 );      \
  354.                                 }
  355.  
  356. #define db_ptr_dcoordinate(p)   {                                               \
  357.                                   b1 = db_first( p );                           \
  358.                                   b2 = db_next( b1 );                           \
  359.                                   b3 = db_next( b2 );                           \
  360.                                   a110 = (BLOCK_TEXT_PTR) db_next( b3 );        \
  361.                                   b110 = (BLOCK_TEXT_PTR) db_next( a110 );      \
  362.                                   c110 = (BLOCK_TEXT_PTR) db_next( b110 );      \
  363.                                   d110 = (BLOCK_TEXT_PTR) db_next( c110 );      \
  364.                                   e110 = (BLOCK_TEXT_PTR) db_next( d110 );      \
  365.                                   f110 = (BLOCK_TEXT_PTR) db_next( e110 );      \
  366.                                   g110 = (BLOCK_TEXT_PTR) db_next( f110 );      \
  367.                                   b230 = (BLOCK_DIMSMALL_PTR) db_next( g110 );  \
  368.                                   t007 = (BLOCK_T007_PTR) db_next( b230 );      \
  369.                                 }
  370.  
  371. #define db_ptr_darea(p)         {                                               \
  372.                                   b1 = db_first( p );                           \
  373.                                   b2 = db_next( b1 );                           \
  374.                                   b3 = db_next( b2 );                           \
  375.                                   a110 = (BLOCK_TEXT_PTR) db_next( b3 );        \
  376.                                   b110 = (BLOCK_TEXT_PTR) db_next( a110 );      \
  377.                                   c110 = (BLOCK_TEXT_PTR) db_next( b110 );      \
  378.                                   d110 = (BLOCK_TEXT_PTR) db_next( c110 );      \
  379.                                   e110 = (BLOCK_TEXT_PTR) db_next( d110 );      \
  380.                                   b230 = (BLOCK_DIMSMALL_PTR) db_next( e110 );  \
  381.                                   t007 = (BLOCK_T007_PTR) db_next( b230 );      \
  382.                                 }
  383.  
  384. #define db_ptr_textstandard(p)  {                                               \
  385.                                   b110 = (BLOCK_TEXT_PTR) db_first( p );        \
  386.                                   b235 = (BLOCK_TEXTSTANDARD_PTR) db_next( b110 );  \
  387.                                 }
  388.  
  389. #define db_ptr_textframe(p)     {                                               \
  390.                                   b1 = db_first( p );                           \
  391.                                   b2 = db_next( b1 );                           \
  392.                                   b3 = db_next( b2 );                           \
  393.                                   b110 = (BLOCK_TEXT_PTR) db_next( b3 );        \
  394.                                   b236 = (BLOCK_TEXTFRAME_PTR) db_next( b110 ); \
  395.                                 }
  396.  
  397. #define db_ptr_textreference(p) {                                               \
  398.                                   b1   = db_first( p );                         \
  399.                                   b2   = db_next( b1 );                         \
  400.                                   b110 = (BLOCK_TEXT_PTR) db_next( b2 );        \
  401.                                   b235 = (BLOCK_TEXTSTANDARD_PTR) db_next( b110 );  \
  402.                                   b237 = (BLOCK_TEXTREFERENCE_PTR) db_next( b235 ); \
  403.                                   t008 = (BLOCK_T008_PTR) db_next( b237 );      \
  404.                                 }
  405.  
  406. #define db_ptr_comment(p)       {                                               \
  407.                                   b1   = db_first( p );                         \
  408.                                   b2   = db_next( b1 );                         \
  409.                                   b110 = (BLOCK_TEXT_PTR) db_next( b2 );        \
  410.                                 }
  411.  
  412. #define db_ptr_clipsurface(p)   {                                               \
  413.                                   b242 = (BLOCK_CLIPSURFACE_PTR) db_first( p ); \
  414.                                 }
  415.  
  416. #define db_ptr_bitmapref(p)     {                                               \
  417.                                   b243 = (BLOCK_BITMAPREF_PTR) db_first( p );   \
  418.                                 }
  419.  
  420. //------ Command IDs -----------------------------------------------------------------------------------
  421.  
  422. #define IDM_BASE                        0x0000ffff              // Bits containing the command ID
  423. #define IDM_FLAG                        0x00ff0000              // Bits containing the commang flags
  424.  
  425. #define IDM_LABEL                       0x00010000              // Flag for a main menu label
  426. #define IDM_ENTRY                       0x00020000              // Flag for a main menu entry
  427. #define IDM_POPUP_LABEL                 0x00040000              // Flag for a submenu label
  428. #define IDM_POPUP_ENTRY                 0x00080000              // Flag for a submenu entry
  429.  
  430. #define IDM_DEFAULT                     0x01000000              // Flag for a default entry
  431. #define IDM_MODULE                      0x02000000              // Flag for a module insertion point
  432. #define IDM_CUSTOM                      0x04000000              // Flag for a custom menu or menu entry
  433. #define IDM_SEPARATOR                   0x08000000              // Flag for separating line
  434. #define IDM_END                         0x80000000              // Flag for end-of-list
  435.  
  436. #define IDM_FIRST_ENTRY                 100
  437.  
  438. #define IDM_FILE_FIRST                  100
  439. #define IDM_FILE_NEW                            100
  440. #define IDM_FILE_OPEN                           101
  441. #define IDM_FILE_SAVE                           102
  442. #define IDM_FILE_SAVE_AS                        103
  443. #define IDM_FILE_LIST                           104
  444. #define IDM_FILE_IMPORT_SUB                     105
  445. #define IDM_FILE_IMPORT_T4G                     106
  446. #define IDM_FILE_IMPORT_EMF                     107
  447. #define IDM_FILE_IMPORT_WMF                     108
  448. #define IDM_FILE_IMPORT_BMP                     109
  449. #define IDM_FILE_IMPORT_BMP_UPDATE              110
  450. #define IDM_FILE_EXPORT_SUB                     111
  451. #define IDM_FILE_EXPORT_T4G                     112
  452. #define IDM_FILE_EXPORT_EMF                     113
  453. #define IDM_FILE_EXPORT_WMF                     114
  454. #define IDM_FILE_EXPORT_BMP                     115
  455. #define IDM_FILE_EXPORT_BMP_AREA                116
  456. #define IDM_FILE_EXTRA_SUB                      117
  457. #define IDM_FILE_EXTRA_ERASE                    118
  458. #define IDM_FILE_EXTRA_SAVE_DUP                 119
  459. #define IDM_FILE_EXTRA_LOAD_DUP                 120
  460. #define IDM_FILE_EXTRA_ARCHIVE                  121
  461. #define IDM_FILE_EXTRA_AUTOSAVE                 122
  462. #define IDM_FILE_PRINT                          123
  463. #define IDM_FILE_PRINT_AREA                     124
  464. #define IDM_FILE_EXIT                           125
  465. #define IDM_FILE_IMPORT_BMP_EMBED               126     // New in Version 4.21!
  466. #define IDM_FILE_LAST                   127
  467.  
  468. #define IDM_EDIT_FIRST                  200
  469. #define IDM_EDIT_UNDO                           200
  470. #define IDM_EDIT_REDO                           201
  471. #define IDM_EDIT_UNDO_ERASE                     202
  472. #define IDM_EDIT_CUT                            203
  473. #define IDM_EDIT_COPY                           204
  474. #define IDM_EDIT_PASTE                          205
  475. #define IDM_EDIT_COMMENT_SUB                    206
  476. #define IDM_EDIT_COMMENT                        207
  477. #define IDM_EDIT_COMMENT_PARAM                  208
  478. #define IDM_EDIT_TVG_DETAILS                    209
  479. #define IDM_EDIT_QUEUE                          210
  480. #define IDM_EDIT_LAST                   211
  481.  
  482. #define IDM_CONFIG_FIRST                300
  483. #define IDM_CONFIG_PAGE_FORMAT                  300
  484. #define IDM_CONFIG_LAYER_SUB                    301
  485. #define IDM_CONFIG_LAYER_LIST                   302
  486. #define IDM_CONFIG_LAYER_EDIT                   303
  487. #define IDM_CONFIG_LAYER_DEFAULT                304
  488. #define IDM_CONFIG_LAYER_RESET                  305
  489. #define IDM_CONFIG_XLAYER_SUB                   306
  490. #define IDM_CONFIG_XLAYER_SELECT                307
  491. #define IDM_CONFIG_XLAYER_EDIT                  308
  492. #define IDM_CONFIG_XLAYER_ASSIGN                309
  493. #define IDM_CONFIG_XLAYER_DISABLE               310
  494. #define IDM_CONFIG_XLAYER_ENABLE                311
  495. #define IDM_CONFIG_XLAYER_FREEZE                312
  496. #define IDM_CONFIG_XLAYER_MELT                  313
  497. #define IDM_CONFIG_XLAYER_IGNORE                314
  498. #define IDM_CONFIG_XLAYER_USE                   315
  499. #define IDM_CONFIG_XLAYER_SHADE                 316
  500. #define IDM_CONFIG_XLAYER_LIGHT                 317
  501. #define IDM_CONFIG_XLAYER_HIDE                  318
  502. #define IDM_CONFIG_XLAYER_CONCENTRATE           319
  503. #define IDM_CONFIG_XLAYER_UNDO                  320
  504. #define IDM_CONFIG_SYSTEM_SUB                   321
  505. #define IDM_CONFIG_SYSTEM_LIST                  322
  506. #define IDM_CONFIG_SYSTEM_EDIT                  323
  507. #define IDM_CONFIG_SYSTEM_ORIGIN                324
  508. #define IDM_CONFIG_SYSTEM_SHOW_DISPLAY          325
  509. #define IDM_CONFIG_SYSTEM_EDIT_DISPLAY          326
  510. #define IDM_CONFIG_SYSTEM_SHOW_POSITION         327
  511. #define IDM_CONFIG_SYSTEM_EDIT_POSITION         328
  512. #define IDM_CONFIG_PEN_SUB                      329
  513. #define IDM_CONFIG_PEN_LIST                     330
  514. #define IDM_CONFIG_PEN_EDIT                     331
  515. #define IDM_CONFIG_PEN_DEFAULT                  332
  516. #define IDM_CONFIG_PEN_LINE                     333
  517. #define IDM_CONFIG_ZOOM_SUB                     334
  518. #define IDM_CONFIG_ZOOM_AREA                    335
  519. #define IDM_CONFIG_ZOOM_OBJECTS                 336
  520. #define IDM_CONFIG_ZOOM_PAGE                    337
  521. #define IDM_CONFIG_ZOOM_ORIGINAL                338
  522. #define IDM_CONFIG_ZOOM_FACTOR                  339
  523. #define IDM_CONFIG_ZOOM_UNDO                    340
  524. #define IDM_CONFIG_ZOOM_PAN                     341
  525. #define IDM_CONFIG_ZOOM_PLUS                    342
  526. #define IDM_CONFIG_ZOOM_MINUS                   343
  527. #define IDM_CONFIG_SAVE_DEFAULT                 344
  528. #define IDM_CONFIG_WINDOW_SUB                   345
  529. #define IDM_CONFIG_WINDOW_ARRANGE               346
  530. #define IDM_CONFIG_WINDOW2                      347
  531. #define IDM_CONFIG_WINDOW3                      348
  532. #define IDM_CONFIG_WINDOW4                      349
  533. #define IDM_CONFIG_WINDOW_VIEW                  350
  534. #define IDM_CONFIG_WINDOW_PANEL                 351
  535. #define IDM_CONFIG_WINDOW_PEN                   352
  536. #define IDM_CONFIG_WINDOW_LAYER                 353
  537. #define IDM_CONFIG_WINDOW_STATUS                354
  538. #define IDM_CONFIG_WINDOW_TOOLBOX               355
  539. #define IDM_CONFIG_WINDOW_PROPERTY              356
  540. #define IDM_CONFIG_WINDOW_BLOCK                 357
  541. #define IDM_CONFIG_WINDOW_GUIDE                 358
  542. #define IDM_CONFIG_PROGSTATUS                   359
  543. #define IDM_CONFIG_PROFILE_SUB                  360
  544. #define IDM_CONFIG_PROFILE_WINDOW               361
  545. #define IDM_CONFIG_PROFILE_GENERAL              362
  546. #define IDM_CONFIG_PROFILE_PATHS                363
  547. #define IDM_CONFIG_PROFILE_LOADSAVE             364
  548. #define IDM_CONFIG_TVI_SUB                      365
  549. #define IDM_CONFIG_TVI_SCREEN                   366
  550. #define IDM_CONFIG_TVI_OUTPUT                   367
  551. #define IDM_CONFIG_TVI_PLOTTER                  368
  552. #define IDM_CONFIG_TVI_ACCURACY                 369
  553. #define IDM_CONFIG_TVI_COLORS                   370
  554. #define IDM_CONFIG_TVI_TIME                     371
  555. #define IDM_CONFIG_TVI_BLOCK                    372
  556. #define IDM_CONFIG_TVI_KEY_CHANGE               373
  557. #define IDM_CONFIG_TVI_KEY_DISPLAY              374
  558. #define IDM_CONFIG_TVI_MOUSE                    375
  559. #define IDM_CONFIG_TVI_LOAD                     376
  560. #define IDM_CONFIG_TVI_SAVE_AS                  377
  561. #define IDM_CONFIG_TVI_DETAILS                  378
  562. #define IDM_CONFIG_TVI_SAVE_DEFAULT             379
  563. #define IDM_CONFIG_TVI_SAVEONEXIT               380
  564. #define IDM_CONFIG_LAST                 381
  565.  
  566. #define IDM_SHAPE_FIRST                 400
  567. #define IDM_SHAPE_EDIT_PARAM                    400
  568. #define IDM_SHAPE_EDIT_TEXT                     401
  569. #define IDM_SHAPE_ERASE                         402
  570. #define IDM_SHAPE_MODIFY                        403
  571. #define IDM_SHAPE_MOVE_SUB                      404
  572. #define IDM_SHAPE_MOVE_STANDARD                 405
  573. #define IDM_SHAPE_MOVE_PERP                     406
  574. #define IDM_SHAPE_MOVE_PARALLEL                 407
  575. #define IDM_SHAPE_MOVE_RELATIVE                 408
  576. #define IDM_SHAPE_SCALE_SUB                     409
  577. #define IDM_SHAPE_SCALE_FACTOR                  410
  578. #define IDM_SHAPE_SCALE_PROP                    411
  579. #define IDM_SHAPE_SCALE_ANY                     412
  580. #define IDM_SHAPE_SCALE_REFERENCE               413
  581. #define IDM_SHAPE_ROTATE_SUB                    414
  582. #define IDM_SHAPE_ROTATE_CENTER                 415
  583. #define IDM_SHAPE_ROTATE_ANY                    416
  584. #define IDM_SHAPE_ROTATE_REFERENCE              417
  585. #define IDM_SHAPE_REFLECT_SUB                   418
  586. #define IDM_SHAPE_REFLECT_H                     419
  587. #define IDM_SHAPE_REFLECT_V                     420
  588. #define IDM_SHAPE_REFLECT_LINE                  421
  589. #define IDM_SHAPE_DISTORT_SUB                   422
  590. #define IDM_SHAPE_DISTORT_H                     423
  591. #define IDM_SHAPE_DISTORT_V                     424
  592. #define IDM_SHAPE_ALIGN_SUB                     425
  593. #define IDM_SHAPE_ALIGN_C_PAGE_H                426
  594. #define IDM_SHAPE_ALIGN_C_PAGE_V                427
  595. #define IDM_SHAPE_ALIGN_C_PAGE_BOTH             428
  596. #define IDM_SHAPE_ALIGN_C_RECT_H                429
  597. #define IDM_SHAPE_ALIGN_C_RECT_V                430
  598. #define IDM_SHAPE_ALIGN_C_RECT_BOTH             431
  599. #define IDM_SHAPE_ALIGN_H_LEFT                  432
  600. #define IDM_SHAPE_ALIGN_H_CENTER                433
  601. #define IDM_SHAPE_ALIGN_H_RIGHT                 434
  602. #define IDM_SHAPE_ALIGN_V_TOP                   435
  603. #define IDM_SHAPE_ALIGN_V_CENTER                436
  604. #define IDM_SHAPE_ALIGN_V_BOTTOM                437
  605. #define IDM_SHAPE_PMOVE_SINGLE                  438
  606. #define IDM_SHAPE_PMOVE_SUB                     439
  607. #define IDM_SHAPE_PMOVE_STANDARD                440
  608. #define IDM_SHAPE_PMOVE_PERP                    441
  609. #define IDM_SHAPE_PMOVE_PARALLEL                442
  610. #define IDM_SHAPE_PMOVE_RELATIVE                443
  611. #define IDM_SHAPE_GROUP_SUB                     444
  612. #define IDM_SHAPE_GROUP_LINK                    445
  613. #define IDM_SHAPE_GROUP_UNLINK                  446
  614. #define IDM_SHAPE_ORDER_SUB                     447
  615. #define IDM_SHAPE_ORDER_BACK                    448
  616. #define IDM_SHAPE_ORDER_BEHIND                  449
  617. #define IDM_SHAPE_ORDER_BEFORE                  450
  618. #define IDM_SHAPE_ORDER_FRONT                   451
  619. #define IDM_SHAPE_LAST                  452
  620.  
  621. #define IDM_DRAW_FIRST                  500
  622. #define IDM_DRAW_LINE_SUB                       500
  623. #define IDM_DRAW_LINE_STANDARD                  501
  624. #define IDM_DRAW_LINE_LINE                      502
  625. #define IDM_DRAW_LINE_H                         503
  626. #define IDM_DRAW_LINE_V                         504
  627. #define IDM_DRAW_LINE_MIDPERP                   505
  628. #define IDM_DRAW_LINE_PERP                      506
  629. #define IDM_DRAW_LINE_PARALLEL                  507
  630. #define IDM_DRAW_LINE_PARALLEL_NUM              508
  631. #define IDM_DRAW_LINE_ANGLE                     509
  632. #define IDM_DRAW_LINE_BISECTOR                  510
  633. #define IDM_DRAW_LINE_CROSS                     511
  634. #define IDM_DRAW_LINE_POLY                      512
  635. #define IDM_DRAW_LINE_DISTANT                   513
  636. #define IDM_DRAW_LINE_ZIGZAG                    514
  637. #define IDM_DRAW_TANGENT_SUB                    515
  638. #define IDM_DRAW_TANGENT_OP                     516
  639. #define IDM_DRAW_TANGENT_OPH                    517
  640. #define IDM_DRAW_TANGENT_OPV                    518
  641. #define IDM_DRAW_TANGENT_OPE                    519
  642. #define IDM_DRAW_TANGENT_OAE                    520
  643. #define IDM_DRAW_TANGENT_OO                     521
  644. #define IDM_DRAW_POLYGON_SUB                    522
  645. #define IDM_DRAW_POLYGON_TRIANGLE               523
  646. #define IDM_DRAW_POLYGON_QUADRANGLE             524
  647. #define IDM_DRAW_POLYGON_PARALLEL               525
  648. #define IDM_DRAW_POLYGON_RECTANGLE              526
  649. #define IDM_DRAW_POLYGON_ANY                    527
  650. #define IDM_DRAW_POLYEDER_SUB                   528
  651. #define IDM_DRAW_POLYEDER_STANDARD              529
  652. #define IDM_DRAW_POLYEDER_CIRCLE                530
  653. #define IDM_DRAW_POLYEDER_CIRCUMCIRCLE          531
  654. #define IDM_DRAW_POLYEDER_DIAMETER              532
  655. #define IDM_DRAW_POLYEDER_SIDELENGTH            533
  656. #define IDM_DRAW_POLYEDER_INNERRADIUS           534
  657. #define IDM_DRAW_CIRCLE_SUB                     535
  658. #define IDM_DRAW_CIRCLE_STANDARD                536
  659. #define IDM_DRAW_CIRCLE_CIRCLE                  537
  660. #define IDM_DRAW_CIRCLE_CIRCUMCIRCLE            538
  661. #define IDM_DRAW_CIRCLE_DIAMETER                539
  662. #define IDM_DRAW_CIRCLE_INCIRCLE                540
  663. #define IDM_DRAW_CIRCLE_CONC                    541
  664. #define IDM_DRAW_CIRCLE_PERP                    542
  665. #define IDM_DRAW_CIRCLE_LLL                     543
  666. #define IDM_DRAW_CIRCLE_PPR                     544
  667. #define IDM_DRAW_CIRCLE_OPR                     545
  668. #define IDM_DRAW_CIRCLE_OOR                     546
  669. #define IDM_DRAW_ARC_SUB                        547
  670. #define IDM_DRAW_ARC_STANDARD                   548
  671. #define IDM_DRAW_ARC_CIRCLE                     549
  672. #define IDM_DRAW_ARC_CIRCUMCIRCLE               550
  673. #define IDM_DRAW_ARC_DIAMETER                   551
  674. #define IDM_DRAW_ARC_CONC_CIRCLE                552
  675. #define IDM_DRAW_ARC_CONC_ARC                   553
  676. #define IDM_DRAW_ARC_PPR                        554
  677. #define IDM_DRAW_ARC_OPR                        555
  678. #define IDM_DRAW_ARC_OOR                        556
  679. #define IDM_DRAW_ELLIPSE_SUB                    557
  680. #define IDM_DRAW_ELLIPSE_STANDARD               558
  681. #define IDM_DRAW_ELLIPSE_ROTATED                559
  682. #define IDM_DRAW_ELLIPSE_ANY                    560
  683. #define IDM_DRAW_ELLIPSE_ELLIPSE                561
  684. #define IDM_DRAW_EARC_SUB                       562
  685. #define IDM_DRAW_EARC_STANDARD                  563
  686. #define IDM_DRAW_EARC_ANY                       564
  687. #define IDM_DRAW_EARC_ELLIPSE                   565
  688. #define IDM_DRAW_ARCMODE_SUB                    566
  689. #define IDM_DRAW_ARCMODE_ARC                    567
  690. #define IDM_DRAW_ARCMODE_SECTOR                 568
  691. #define IDM_DRAW_ARCMODE_SEGMENT                569
  692. #define IDM_DRAW_ARCMODE_TOGGLE                 570
  693. #define IDM_DRAW_ARCMODE_DIRECTION              571
  694. #define IDM_DRAW_FREEHAND                       572
  695. #define IDM_DRAW_SPLINE                         573
  696. #define IDM_DRAW_CURVE                          574
  697. #define IDM_DRAW_SURFACE                        575
  698. #define IDM_DRAW_HATCH_SUB                      576
  699. #define IDM_DRAW_HATCH_OBJ                      577
  700. #define IDM_DRAW_HATCH_SURFACE                  578
  701. #define IDM_DRAW_HATCH_TYPE_LIST                579
  702. #define IDM_DRAW_HATCH_TYPE_EDIT                580
  703. #define IDM_DRAW_HATCH_TYPE_LINE                581
  704. #define IDM_DRAW_HATCH_ORIGIN                   582
  705. #define IDM_DRAW_LAST                   583
  706.  
  707. #define IDM_GEO_FIRST                   600
  708. #define IDM_GEO_LINE_SUB                        600
  709. #define IDM_GEO_LINE_STANDARD                   601
  710. #define IDM_GEO_LINE_LINE                       602
  711. #define IDM_GEO_LINE_H                          603
  712. #define IDM_GEO_LINE_V                          604
  713. #define IDM_GEO_LINE_MIDPERP                    605
  714. #define IDM_GEO_LINE_PERP                       606
  715. #define IDM_GEO_LINE_PARALLEL                   607
  716. #define IDM_GEO_LINE_PARALLEL_NUM               608
  717. #define IDM_GEO_LINE_ANGLE                      609
  718. #define IDM_GEO_LINE_BISECTOR                   610
  719. #define IDM_GEO_LINE_CROSS                      611
  720. #define IDM_GEO_TANGENT_SUB                     612
  721. #define IDM_GEO_TANGENT_OP                      613
  722. #define IDM_GEO_TANGENT_H                       614
  723. #define IDM_GEO_TANGENT_V                       615
  724. #define IDM_GEO_TANGENT_OA                      616
  725. #define IDM_GEO_TANGENT_OO                      617
  726. #define IDM_GEO_CIRCLE_SUB                      618
  727. #define IDM_GEO_CIRCLE_STANDARD                 619
  728. #define IDM_GEO_CIRCLE_CIRCLE                   620
  729. #define IDM_GEO_CIRCLE_CIRCUMCIRCLE             621
  730. #define IDM_GEO_CIRCLE_DIAMETER                 622
  731. #define IDM_GEO_CIRCLE_INCIRCLE                 623
  732. #define IDM_GEO_CIRCLE_CONC                     624
  733. #define IDM_GEO_CIRCLE_PERP                     625
  734. #define IDM_GEO_CIRCLE_LLL                      626
  735. #define IDM_GEO_CIRCLE_PPR                      627
  736. #define IDM_GEO_CIRCLE_OPR                      628
  737. #define IDM_GEO_CIRCLE_OOR                      629
  738. #define IDM_GEO_ELLIPSE_SUB                     630
  739. #define IDM_GEO_ELLIPSE_STANDARD                631
  740. #define IDM_GEO_ELLIPSE_ROTATED                 632
  741. #define IDM_GEO_ELLIPSE_ANY                     633
  742. #define IDM_GEO_ELLIPSE_ELLIPSE                 634
  743. #define IDM_GEO_DISPLAY                         635
  744. #define IDM_GEO_FREEZE                          636
  745. #define IDM_GEO_MARK                            637
  746. #define IDM_GEO_DIVIDE_SUB                      638
  747. #define IDM_GEO_DIVIDE_DISTANCE                 639
  748. #define IDM_GEO_DIVIDE_OBJECT                   640
  749. #define IDM_GEO_DIVIDE_ARRAY                    641
  750. #define IDM_GEO_COPY_SUB                        642
  751. #define IDM_GEO_COPY_MARK                       643
  752. #define IDM_GEO_COPY_ROTATE                     644
  753. #define IDM_GEO_COPY_STEP                       645
  754. #define IDM_GEO_COPY_DISTANCE                   646
  755. #define IDM_GEO_COPY_OBJECT                     647
  756. #define IDM_GEO_COPY_ARRAY                      648
  757. #define IDM_GEO_LAST                    649
  758.  
  759. #define IDM_TRIM_FIRST                  700
  760. #define IDM_TRIM_TRIM_SUB                       700
  761. #define IDM_TRIM_TRIM_CUTOUT                    701
  762. #define IDM_TRIM_TRIM_SPLIT                     702
  763. #define IDM_TRIM_TRIM_RESOLVE                   703
  764. #define IDM_TRIM_TRIM_LENGTH_P                  704
  765. #define IDM_TRIM_TRIM_LENGTH_OBJ                705
  766. #define IDM_TRIM_TRIM_ANGLE_P                   706
  767. #define IDM_TRIM_TRIM_ANGLE_OBJ                 707
  768. #define IDM_TRIM_TRIM_ORIENTATION               708
  769. #define IDM_TRIM_CURVE_SUB                      709
  770. #define IDM_TRIM_CURVE_EDIT                     710
  771. #define IDM_TRIM_CURVE_EXTENT                   711
  772. #define IDM_TRIM_CURVE_CUT                      712
  773. #define IDM_TRIM_SURFACE_SUB                    713
  774. #define IDM_TRIM_SURFACE_GENERATE               714
  775. #define IDM_TRIM_SURFACE_OR                     715
  776. #define IDM_TRIM_SURFACE_AND                    716
  777. #define IDM_TRIM_SURFACE_MINUS                  717
  778. #define IDM_TRIM_SURFACE_COMBINE                718
  779. #define IDM_TRIM_SURFACE_CUT                    719
  780. #define IDM_TRIM_SURFACE_START                  720
  781. #define IDM_TRIM_CORNER                         721
  782. #define IDM_TRIM_CHAMFER_SUB                    722
  783. #define IDM_TRIM_CHAMFER_OO                     723
  784. #define IDM_TRIM_CHAMFER_CORNER                 724
  785. #define IDM_TRIM_CHAMFER_ALL                    725
  786. #define IDM_TRIM_ROUNDOUT_SUB                   726
  787. #define IDM_TRIM_ROUNDOUT_OO                    727
  788. #define IDM_TRIM_ROUNDOUT_CORNER                728
  789. #define IDM_TRIM_ROUNDOUT_ALL                   729
  790. #define IDM_TRIM_ROUNDIN_SUB                    730
  791. #define IDM_TRIM_ROUNDIN_OO                     731
  792. #define IDM_TRIM_ROUNDIN_CORNER                 732
  793. #define IDM_TRIM_ROUNDIN_ALL                    733
  794. #define IDM_TRIM_TRANSFORM_SUB                  734
  795. #define IDM_TRIM_TRANSFORM_INVERT               735
  796. #define IDM_TRIM_TRANSFORM_ZIGZAG               736
  797. #define IDM_TRIM_TRANSFORM_CIRCLE               737
  798. #define IDM_TRIM_TRANSFORM_ARC                  738
  799. #define IDM_TRIM_TRANSFORM_SECTOR               739
  800. #define IDM_TRIM_TRANSFORM_SEGMENT              740
  801. #define IDM_TRIM_TRANSFORM_ELLIPSE              741
  802. #define IDM_TRIM_TRANSFORM_EARC                 742
  803. #define IDM_TRIM_TRANSFORM_ESECTOR              743
  804. #define IDM_TRIM_TRANSFORM_ESEGMENT             744
  805. #define IDM_TRIM_TRANSFORM_CURVE                745
  806. #define IDM_TRIM_TRANSFORM_SURFACE              746
  807. #define IDM_TRIM_CLIP_SUB                       747
  808. #define IDM_TRIM_CLIP_CREATE_INSIDE             748
  809. #define IDM_TRIM_CLIP_CREATE_OUTSIDE            749
  810. #define IDM_TRIM_CLIP_RESOLVE                   750
  811. #define IDM_TRIM_LAST                   751
  812.  
  813. #define IDM_DIM_FIRST                   800
  814. #define IDM_DIM_TEXT_SUB                        800
  815. #define IDM_DIM_TEXT_STANDARD                   801
  816. #define IDM_DIM_TEXT_FRAME                      802
  817. #define IDM_DIM_TEXT_REFERENCE                  803
  818. #define IDM_DIM_TEXT_FLAT                       804
  819. #define IDM_DIM_LINE_SUB                        805
  820. #define IDM_DIM_LINE_LINE                       806
  821. #define IDM_DIM_LINE_ARC                        807
  822. #define IDM_DIM_SUB1                            808
  823. #define IDM_DIM_LENGTH_P                        809
  824. #define IDM_DIM_LENGTH_OBJ                      810
  825. #define IDM_DIM_DISTANCE_P                      811
  826. #define IDM_DIM_DISTANCE_OBJ                    812
  827. #define IDM_DIM_RADIUS_P                        813
  828. #define IDM_DIM_RADIUS_OBJ                      814
  829. #define IDM_DIM_DIAMETER_P                      815
  830. #define IDM_DIM_DIAMETER_OBJ                    816
  831. #define IDM_DIM_ANGLE_P                         817
  832. #define IDM_DIM_ANGLE_LL                        818
  833. #define IDM_DIM_ANGLE_OBJ                       819
  834. #define IDM_DIM_ARCLENGTH_P                     820
  835. #define IDM_DIM_ARCLENGTH_OBJ                   821
  836. #define IDM_DIM_COORDINATE                      822
  837. #define IDM_DIM_SUB2                            823
  838. #define IDM_DIM_AREA                            824
  839. #define IDM_DIM_PERIMETER                       825
  840. #define IDM_DIM_PARAMETER                       826
  841. #define IDM_DIM_EDIT_LINE_SUB                   827
  842. #define IDM_DIM_EDIT_LINE_ANGLE                 828
  843. #define IDM_DIM_EDIT_LINE_POSITION              829
  844. #define IDM_DIM_EDIT_NUM_SUB                    830
  845. #define IDM_DIM_EDIT_NUM_ANGLE                  831
  846. #define IDM_DIM_EDIT_NUM_POSITION               832
  847. #define IDM_DIM_EDIT_NUM_UPDATE                 833
  848. #define IDM_DIM_FONT                            834
  849. #define IDM_DIM_LAST                    835
  850.  
  851. #define IDM_LIBRARY_FIRST               900
  852. #define IDM_LIBRARY_BLOCK_SUB                   900
  853. #define IDM_LIBRARY_BLOCK_INSERT                901
  854. #define IDM_LIBRARY_BLOCK_READ                  902
  855. #define IDM_LIBRARY_BLOCK_READ_FRAME            903
  856. #define IDM_LIBRARY_BLOCK_EDIT                  904
  857. #define IDM_LIBRARY_POSNO_SUB                   905
  858. #define IDM_LIBRARY_POSNO_ASSIGN                906
  859. #define IDM_LIBRARY_POSNO_DELETE                907
  860. #define IDM_LIBRARY_POSNO_REORDER               908
  861. #define IDM_LIBRARY_LIST                        909
  862. #define IDM_LIBRARY_CLEAN                       910
  863. #define IDM_LIBRARY_CONVERT                     911
  864. #define IDM_LIBRARY_SPLIT                       912
  865. #define IDM_LIBRARY_REPLACE_BLOCK               913
  866. #define IDM_LIBRARY_REPLACE_LIBRARY             914
  867. #define IDM_LIBRARY_TVL                         915
  868. #define IDM_LIBRARY_LAST                916
  869.  
  870. #define IDM_EXTRA_FIRST                 1000
  871. #define IDM_EXTRA_KEY_F10                       1000
  872. #define IDM_EXTRA_KEY_F11                       1001
  873. #define IDM_EXTRA_KEY_F12                       1002
  874. #define IDM_EXTRA_SEL_SUB                       1003
  875. #define IDM_EXTRA_SEL_SET                       1004
  876. #define IDM_EXTRA_SEL_CLEAR                     1005
  877. #define IDM_EXTRA_SEL_INVERT                    1006
  878. #define IDM_EXTRA_KEY_F6_SHIFT                  1007
  879. #define IDM_EXTRA_KEY_F8                        1008
  880. #define IDM_EXTRA_KEY_ESC                       1009
  881. #define IDM_EXTRA_KEY_ESC_SHIFT                 1010
  882. #define IDM_EXTRA_KEY_F7                        1011
  883. #define IDM_EXTRA_KEY_F5                        1012
  884. #define IDM_EXTRA_KEY_F5_SHIFT                  1013
  885. #define IDM_EXTRA_SNAP_SUB                      1014
  886. #define IDM_EXTRA_SNAP_GLOBAL                   1015
  887. #define IDM_EXTRA_SNAP_CENTER                   1016
  888. #define IDM_EXTRA_SNAP_QUADRANT                 1017
  889. #define IDM_EXTRA_SNAP_EDGE                     1018
  890. #define IDM_EXTRA_SNAP_CORNER                   1019
  891. #define IDM_EXTRA_SNAP_INTERSECTION             1020
  892. #define IDM_EXTRA_SNAP_GEO                      1021
  893. #define IDM_EXTRA_SNAP_MARK                     1022
  894. #define IDM_EXTRA_SNAP_OTHERS                   1023
  895. #define IDM_EXTRA_SNAP_RELATIVE                 1024
  896. #define IDM_EXTRA_SNAP_RADIUS                   1025
  897. #define IDM_EXTRA_KEY_SUB                       1026
  898. #define IDM_EXTRA_KEY_SPACE                     1027
  899. #define IDM_EXTRA_KEY_LBUTTON                   1028
  900. #define IDM_EXTRA_KEY_MBUTTON                   1029
  901. #define IDM_EXTRA_KEY_RBUTTON                   1030
  902. #define IDM_EXTRA_KEY_ALT                       1031
  903. #define IDM_EXTRA_KEY_LEFT                      1032
  904. #define IDM_EXTRA_KEY_RIGHT                     1033
  905. #define IDM_EXTRA_KEY_UP                        1034
  906. #define IDM_EXTRA_KEY_DOWN                      1035
  907. #define IDM_EXTRA_KEY_HOME                      1036
  908. #define IDM_EXTRA_KEY_END                       1037
  909. #define IDM_EXTRA_KEY_PGUP                      1038
  910. #define IDM_EXTRA_KEY_PGDN                      1039
  911. #define IDM_EXTRA_KEY_EDIT_STEP                 1040
  912. #define IDM_EXTRA_LAST                  1041
  913.  
  914. #define IDM_HELP_FIRST                  1100
  915. #define IDM_HELP_INDEX                          1100
  916. #define IDM_HELP_COMMAND                        1101
  917. #define IDM_HELP_CLICK                          1102
  918. #define IDM_HELP_ON_HELP                        1103
  919. #define IDM_HELP_REGISTER                       1104
  920. #define IDM_HELP_QA                             1105
  921. #define IDM_HELP_TOSONEWS                       1106
  922. #define IDM_HELP_PUZZLE                         1107
  923. #define IDM_HELP_ABOUT                          1108
  924. #define IDM_HELP_LAST                   1109
  925.  
  926. #define IDM_TABLET_FIRST                1200
  927. #define IDM_TABLET_SUB                          1200
  928. #define IDM_TABLET_BUTTON                       1201
  929. #define IDM_TABLET_CALIBRATE                    1202
  930. #define IDM_TABLET_ORIGIN                       1203
  931. #define IDM_TABLET_LOAD                         1204
  932. #define IDM_TABLET_SAVE_AS                      1205
  933. #define IDM_TABLET_INFO                         1206
  934. #define IDM_TABLET_OPTIONS                      1207
  935. #define IDM_TABLET_EDIT                         1208
  936. #define IDM_TABLET_DELETE                       1209
  937. #define IDM_TABLET_LAST                 1210
  938.  
  939. #define IDM_EXTERN_FIRST                1300
  940. #define IDM_EXTERN_MODULE_MIN                   IDM_EXTERN_FIRST
  941. #define IDM_EXTERN_MODULE_MAX                   ( IDM_EXTERN_MODULE_MIN + TVG_MODULE_MAX * TVG_MODULE_MENU_MAX )
  942. #define IDM_EXTERN_IMPORT_MIN                   IDM_EXTERN_MODULE_MAX
  943. #define IDM_EXTERN_IMPORT_MAX                   ( IDM_EXTERN_MODULE_MAX + TVG_FILTER_MAX )
  944. #define IDM_EXTERN_EXPORT_MIN                   IDM_EXTERN_IMPORT_MAX
  945. #define IDM_EXTERN_EXPORT_MAX                   ( IDM_EXTERN_EXPORT_MIN + TVG_FILTER_MAX )
  946. #define IDM_EXTERN_LAST                 IDM_EXTERN_EXPORT_MAX
  947.  
  948. #define IDM_LAST_ENTRY                  IDM_EXTERN_LAST
  949.  
  950. //------ Internal Command IDs --------------------------------------------------------------------------
  951.  
  952. #define IDM_INTERN_FIRST                IDM_LAST_ENTRY
  953.  
  954. #define IDM_INTERN_BLOCK_INSERT_MIN             IDM_INTERN_FIRST
  955. #define IDM_INTERN_BLOCK_INSERT_MAX             ( IDM_INTERN_BLOCK_INSERT_MIN + TVG_BLOCKLIST_MAX )
  956. #define IDM_INTERN_BLOCK_EDIT_MIN               IDM_INTERN_BLOCK_INSERT_MAX
  957. #define IDM_INTERN_BLOCK_EDIT_MAX               ( IDM_INTERN_BLOCK_EDIT_MIN + TVG_BLOCKLIST_MAX )
  958.  
  959. #define IDM_INTERN_FILE_OPEN_MIN                IDM_INTERN_BLOCK_EDIT_MAX
  960. #define IDM_INTERN_FILE_OPEN_MAX                ( IDM_INTERN_FILE_OPEN_MIN + TVG_FILE_MAX )
  961.  
  962. #define IDM_INTERN_SYSTEM_SELECT_MIN            IDM_INTERN_FILE_OPEN_MAX
  963. #define IDM_INTERN_SYSTEM_SELECT_MAX            ( IDM_INTERN_SYSTEM_SELECT_MIN + TVG_SYSTEM_MAX + 1 )
  964. #define IDM_INTERN_SYSTEM_EDIT_MIN              IDM_INTERN_SYSTEM_SELECT_MAX
  965. #define IDM_INTERN_SYSTEM_EDIT_MAX              ( IDM_INTERN_SYSTEM_EDIT_MIN + TVG_SYSTEM_MAX + 1 )
  966.  
  967. #define IDM_INTERN_HATCH_SELECT_MIN             IDM_INTERN_SYSTEM_EDIT_MAX
  968. #define IDM_INTERN_HATCH_SELECT_MAX             ( IDM_INTERN_HATCH_SELECT_MIN + TVG_HATCH_MAX + 1 )
  969. #define IDM_INTERN_HATCH_EDIT_MIN               IDM_INTERN_HATCH_SELECT_MAX
  970. #define IDM_INTERN_HATCH_EDIT_MAX               ( IDM_INTERN_HATCH_EDIT_MIN + TVG_HATCH_MAX + 1 )
  971.  
  972. #define IDM_INTERN_LAYER_SELECT_MIN             IDM_INTERN_HATCH_EDIT_MAX
  973. #define IDM_INTERN_LAYER_SELECT_MAX             ( IDM_INTERN_LAYER_SELECT_MIN + TVG_LAYER_MAX + 1 )
  974. #define IDM_INTERN_LAYER_EDIT_MIN               IDM_INTERN_LAYER_SELECT_MAX
  975. #define IDM_INTERN_LAYER_EDIT_MAX               ( IDM_INTERN_LAYER_EDIT_MIN + TVG_LAYER_MAX + 1 )
  976.  
  977. #define IDM_INTERN_PEN_SELECT_MIN               IDM_INTERN_LAYER_EDIT_MAX
  978. #define IDM_INTERN_PEN_SELECT_MAX               ( IDM_INTERN_PEN_SELECT_MIN + TVG_PEN_MAX + 1 )
  979. #define IDM_INTERN_PEN_EDIT_MIN                 IDM_INTERN_PEN_SELECT_MAX
  980. #define IDM_INTERN_PEN_EDIT_MAX                 ( IDM_INTERN_PEN_EDIT_MIN + TVG_PEN_MAX + 1 )
  981.  
  982. #define IDM_INTERN_ZOOM_AREA_MIN                IDM_INTERN_PEN_EDIT_MAX
  983. #define IDM_INTERN_ZOOM_AREA_MAX                ( IDM_INTERN_ZOOM_AREA_MIN + TVG_WINDOW_MAX + 1 )
  984. #define IDM_INTERN_ZOOM_OBJECTS_MIN             IDM_INTERN_ZOOM_AREA_MAX
  985. #define IDM_INTERN_ZOOM_OBJECTS_MAX             ( IDM_INTERN_ZOOM_OBJECTS_MIN + TVG_WINDOW_MAX + 1 )
  986. #define IDM_INTERN_ZOOM_PAGE_MIN                IDM_INTERN_ZOOM_OBJECTS_MAX
  987. #define IDM_INTERN_ZOOM_PAGE_MAX                ( IDM_INTERN_ZOOM_PAGE_MIN + TVG_WINDOW_MAX + 1 )
  988. #define IDM_INTERN_ZOOM_ORIGINAL_MIN            IDM_INTERN_ZOOM_PAGE_MAX
  989. #define IDM_INTERN_ZOOM_ORIGINAL_MAX            ( IDM_INTERN_ZOOM_ORIGINAL_MIN + TVG_WINDOW_MAX + 1 )
  990. #define IDM_INTERN_ZOOM_FACTOR_MIN              IDM_INTERN_ZOOM_ORIGINAL_MAX
  991. #define IDM_INTERN_ZOOM_FACTOR_MAX              ( IDM_INTERN_ZOOM_FACTOR_MIN + TVG_WINDOW_MAX + 1 )
  992. #define IDM_INTERN_ZOOM_UNDO_MIN                IDM_INTERN_ZOOM_FACTOR_MAX
  993. #define IDM_INTERN_ZOOM_UNDO_MAX                ( IDM_INTERN_ZOOM_UNDO_MIN + TVG_WINDOW_MAX + 1 )
  994.  
  995. #define IDM_INTERN_STARTUP              ( IDM_INTERN_ZOOM_UNDO_MAX + 0 )
  996.  
  997. #define IDM_INTERN_LAST                 ( IDM_INTERN_ZOOM_UNDO_MAX + 1 )
  998.  
  999. //------ Context Identifiers for Electronic Reference --------------------------------------------------
  1000.  
  1001. #define IDH_CONTENTS                    10000   // Index
  1002. #define IDH_HOTSPOT_HELP                10001   // Help on Usage of Hotspot Dialog Windows
  1003. #define IDH_HOTSPOT_ADDRESS             10002   // TommySoftware address
  1004.  
  1005. #define IDH_TOPIC_REFERENCE             11000   // Introduction, Support & Information
  1006. #define IDH_TOPIC_CONVENTIONS           11001   // Conventions used in the Reference
  1007. #define IDH_TOPIC_REQUIREMENTS          11002   // System Requirements
  1008. #define IDH_TOPIC_PLOTTER               11003   // Notes on Plotter Output
  1009. #define IDH_TOPIC_DIGITIZER             11004   // Using Digitizers
  1010. #define IDH_TOPIC_WINDOWS95             11005   // Notes for Windows 95 Users
  1011.  
  1012. #define IDH_TOPIC_WINDOW_MAIN           12000   // Main Window
  1013. #define IDH_TOPIC_WINDOW_DRAW           12001   // Drawing Window
  1014. #define IDH_TOPIC_WINDOW_VIEW           12002   // View Window
  1015. #define IDH_TOPIC_WINDOW_PANEL          12003   // Panel
  1016. #define IDH_TOPIC_WINDOW_PROP           12004   // Property Window
  1017. #define IDH_TOPIC_WINDOW_PEN            12005   // Pen List
  1018. #define IDH_TOPIC_WINDOW_LAYER          12006   // Layer List
  1019. #define IDH_TOPIC_WINDOW_SCALE          12007   // Ruler
  1020. #define IDH_TOPIC_WINDOW_STATUS         12008   // Status Line
  1021. #define IDH_TOPIC_WINDOW_BLOCK          12009   // Block List Window
  1022. #define IDH_TOPIC_WINDOW_TOOLBOX        12010   // Toolbox
  1023. #define IDH_TOPIC_WINDOW_GUIDE          12011   // Guide Windows
  1024. #define IDH_TOPIC_WINDOW_POPUP          12012   // Popup Men¸
  1025. #define IDH_TOPIC_WINDOW_CHOOSE         12013   // Multi-Object Selection
  1026.  
  1027. #define IDH_TOPIC_TRANSMISSION          13000   // Layers, Pens, and Transmission
  1028. #define IDH_TOPIC_SYSTEMS               13001   // Coordinate Systems, Scales, Grids, etc.
  1029. #define IDH_TOPIC_OPTIONS               13002   // Snapping, Duplicate, and other Options
  1030. #define IDH_TOPIC_BLOCKS                13003   // Libraries, Blocks and Instances
  1031. #define IDH_TOPIC_FILEOPT               13004   // TVG 4.0 File Format
  1032. #define IDH_TOPIC_MODULE                13005   // The Plug-In Concept
  1033.  
  1034. #define IDH_INTERN_BLOCK_INSERT            14000   // Internal Commands
  1035. #define IDH_INTERN_BLOCK_EDIT           14001
  1036. #define IDH_INTERN_FILE_OPEN            14002
  1037. #define IDH_INTERN_SYSTEM_SELECT        14003
  1038. #define IDH_INTERN_SYSTEM_EDIT          14004
  1039. #define IDH_INTERN_HATCH_SELECT         14005
  1040. #define IDH_INTERN_HATCH_EDIT           14006
  1041. #define IDH_INTERN_LAYER_SELECT         14007
  1042. #define IDH_INTERN_LAYER_EDIT           14008
  1043. #define IDH_INTERN_PEN_SELECT           14009
  1044. #define IDH_INTERN_PEN_EDIT             14010
  1045. #define IDH_INTERN_ZOOM_AREA            14011
  1046. #define IDH_INTERN_ZOOM_OBJECTS         14012
  1047. #define IDH_INTERN_ZOOM_PAGE            14013
  1048. #define IDH_INTERN_ZOOM_ORIGINAL        14014
  1049. #define IDH_INTERN_ZOOM_FACTOR          14015
  1050. #define IDH_INTERN_ZOOM_UNDO            14016
  1051.  
  1052. #define IDW_MULTIPROP                   15000   // Edit Properties
  1053. #define IDW_TEXTSTANDARD                15001   // Standard Text
  1054. #define IDW_TEXTFRAME                   15002   // Frame Text
  1055. #define IDW_ZIGZAG                      15003   // Zig Zag Line
  1056. #define IDW_DIMPARAM0                   15004   // Dimension Line
  1057. #define IDW_DIMDATA                     15005   // General Dimension Parameters
  1058. #define IDW_DIMPARAM1                   15006   // Dimension with Line
  1059. #define IDW_DIMPARAM2                   15007   // Dimension without Line
  1060. #define IDW_CHOOSECOLOR                 15008   // Color Selection
  1061. #define IDW_FILESELECT                  15009   // File Selection
  1062. #define IDW_CHOOSECOLOR2                15010   // Standard Color Selection
  1063. #define IDW_PRINTLAYOUT                 15011   // Print Drawing
  1064. #define IDW_FILEOPTIONS                 15012   // Edit File Options
  1065. #define IDW_CHOOSESECTIONS              15013   // Edit Single File Options
  1066. #define IDW_AUTOSAVE                    15014   // Auotsave Parameters
  1067. #define IDW_BITMAPEDIT                  15015   // Bitmap Reference
  1068. #define IDW_EXPORTBITMAP                15016   // Export Bitmap
  1069. #define IDW_COMMENTLAYOUT               15017   // Command Parameters
  1070. #define IDW_DETAILSEDIT                 15018   // Edit Details
  1071. #define IDW_PAGEFORMAT                  15019   // Page Format
  1072. #define IDW_LAYEREDIT                   15020   // Edit Layers
  1073. #define IDW_DETAILSVIEW                 15021   // View Details
  1074. #define IDW_LAYERDEFAULT                15022   // Layer Defaults
  1075. #define IDW_SYSTEMEDIT                  15023   // Edit Coordinate Systems
  1076. #define IDW_SYSTEMDISPLAY               15024   // Coordinate Systems View
  1077. #define IDW_SYSTEMORIGIN                15025   // Coordinate Systems Origin
  1078. #define IDW_SYSTEMUNIT                  15026   // Coordinate Systems Units
  1079. #define IDW_SYSTEMNUMBER                15027   // Coordinate Systems Numbers
  1080. #define IDW_SYSTEMGRID                  15028   // Coordinate Systems Display Grid
  1081. #define IDW_SYSTEMSNAP                  15029   // Coordinate Systems Position Grid
  1082. #define IDW_PENEDIT                     15030   // Edit Pens
  1083. #define IDW_PENDEFAULT                  15031   // Pen Defaults
  1084. #define IDW_LINEEDIT                    15032   // Edit Line Patterns
  1085. #define IDW_LINETYPE                    15033   // Edit Single Line Pattern
  1086. #define IDW_PROPERTY                    15034   // Simple Properties
  1087. #define IDW_DIMLAYOUT                   15035   // Global Dimension Parameters
  1088. #define IDW_PROGSTATUS                  15036   // Program Status
  1089. #define IDW_SYSTEMMEMORY                15037   // Memory and Monitor
  1090. #define IDW_PATHSYSTEM                  15038   // Standard Paths
  1091. #define IDW_ORTHOLAYOUT                 15039   // Orthogonal Mode
  1092. #define IDW_SCREENLAYOUT                15040   // Settings Display
  1093. #define IDW_ACCURACYLAYOUT              15041   // Settings Accuracy
  1094. #define IDW_OUTPUTLAYOUT                15042   // Settings Output
  1095. #define IDW_SYSTEMCOLORS                15043   // Settings Colors
  1096. #define IDW_KEYASSIGN                   15044   // Display Keybaord Assignment
  1097. #define IDW_MOUSEASSIGNMENT             15045   // Einstellung Maustastenfunktion
  1098. #define IDW_KEYEDIT                     15046   // Edit Key Assignment
  1099. #define IDW_CONSTRUCTION                15047   // Division
  1100. #define IDW_FONTHANDLING                15048   // Fonts
  1101. #define IDW_INSTANCEEDIT                15049   // Instance
  1102. #define IDW_TEXTSTANDARDINSERT          15050   // Create Standard Text
  1103. #define IDW_TEXTFRAMEINSERT             15051   // Create Frame Text
  1104. #define IDW_FONTDEF                     15052   // Select Font
  1105. #define IDW_CURVE                       15053   // Curve / Surface Entry
  1106. #define IDW_CONDSEL                     15054   // Selection Parameters
  1107. #define IDW_CHANGETEXT                  15055   // Edit Text
  1108. #define IDW_TEXTREFERENCE               15056   // Reference Text
  1109. #define IDW_DIMTEXT1                    15057   // Edit Dimension and Tolerances
  1110. #define IDW_DIMTEXT2                    15058   // Edit Coordinates and Tolerances
  1111. #define IDW_HATCHEDIT                   15059   // Edit Hatching Types
  1112. #define IDW_HATCHTYPE                   15060   // Edit Single Hatching Type
  1113. #define IDW_MULTILINEEDIT               15061   // Edit Line Sequences
  1114. #define IDW_MULTILINEPARAM              15062   // Edit Single Line Sequence
  1115. #define IDW_BLOCKINSERT                 15063   // Insert Block
  1116. #define IDW_BLOCKREAD                   15064   // Create Block
  1117. #define IDW_BLOCKEDIT                   15065   // Edit Block
  1118. #define IDW_BLOCKCOPY                   15066   // Copy Block
  1119. #define IDW_BLOCKATTRIB                 15067   // Edit Attributes
  1120. #define IDW_BLOCKATTRIBSINGLE           15068   // Edit Single Attribute
  1121. #define IDW_PARTSLIST1                  15069   // Generate Parts List, Part 1
  1122. #define IDW_PARTSLIST2                  15070   // Generate Parts List, Part 2
  1123. #define IDW_BLOCKCONVERT                15071   // External Blocks to Internal
  1124. #define IDW_BLOCKREPLACE                15072   // Replace Block
  1125. #define IDW_LIBRARYREPLACE              15073   // Replace Library
  1126. #define IDW_LIBRARYHANDLING             15074   // Libraries
  1127. #define IDW_BLOCKSELECT                 15075   // Select Block
  1128. #define IDW_BLOCKWINDOW                 15076   // Settings Block List
  1129. #define IDW_PLOTTERLAYOUT               15077   // Settings Plotter
  1130. #define IDW_CURVEEDIT                   15078   // Edit Curve
  1131. #define IDW_ALERT                       15079   // General Message
  1132. //                                      15080   // Multi-Object Selection
  1133. #define IDW_EDIT                        15081   // General Entry, Part 1
  1134. //                                      15082   // General Entry, Part 2
  1135. #define IDW_TABLETBUTTON                15083   // Digitizer Buttons
  1136. #define IDW_PARTSLISTOPTION             15084   // Generate Parts List Options
  1137. #define IDW_FILEINFO                    15085   // File Infos
  1138. #define IDW_WINDOWLAYOUT                15086   // Window Layout
  1139. #define IDW_CODE                        15087   // Code Entry
  1140. #define IDW_TIMELAYOUT                  15088   // Time Layout
  1141. #define IDW_LISTBOXFILTER               15089   // List box filter
  1142.  
  1143. //------ Point Descriptions for User Input -------------------------------------------------------------
  1144.  
  1145. #ifndef TOSO_RESOURCE
  1146.  
  1147. #define POINT_NO                0
  1148. #define POINT_COMMAND           1
  1149. #define POINT_HELP              2
  1150. #define POINT_ANY               3
  1151. #define POINT_ANY1              4
  1152. #define POINT_ANY2              5
  1153. #define POINT_START             6
  1154. #define POINT_START1            7
  1155. #define POINT_START2            8
  1156. #define POINT_END               9
  1157. #define POINT_END1              10
  1158. #define POINT_END2              11
  1159. #define POINT_REFERENCE         12
  1160. #define POINT_DESTINATION       13
  1161. #define POINT_CORNER1           14
  1162. #define POINT_CORNER2           15
  1163. #define POINT_CORNER3           16
  1164. #define POINT_CORNER4           17
  1165. #define POINT_CIRCLE1           18
  1166. #define POINT_CIRCLE2           19
  1167. #define POINT_CIRCLE3           20
  1168. #define POINT_ELLIPSE1          21
  1169. #define POINT_ELLIPSE2          22
  1170. #define POINT_FRAME             23
  1171. #define POINT_CENTER            24
  1172. #define POINT_RADIUS            25
  1173. #define POINT_ANGLE             26
  1174. #define POINT_ANGLE1            27
  1175. #define POINT_ANGLE2            28
  1176. #define POINT_LINE_RELATIVE     29
  1177. #define POINT_PIVOT1            30
  1178. #define POINT_PIVOT2            31
  1179. #define POINT_CURVE_END         32
  1180. #define POINT_ARC               33
  1181. #define POINT_ARC_END1          34
  1182. #define POINT_ARC_END2          35
  1183. #define POINT_ARC_RELATIVE      36
  1184. #define POINT_POSITION          37
  1185. #define POINT_SECTION1          38
  1186. #define POINT_SECTION2          39
  1187. #define POINT_DIM_LINE1         40
  1188. #define POINT_DIM_LINE2         41
  1189. #define POINT_DIM_LINE3         42
  1190. #define POINT_DIM_NUM1          43
  1191. #define POINT_DIM_NUM2          44
  1192.  
  1193. #define POINT_ID_SINGLE_FIRST   45              // First ID that requires identification resolving
  1194.  
  1195. #define POINT_PL                45
  1196. #define POINT_PL1               46
  1197. #define POINT_PL2               47
  1198. #define POINT_PL3               48
  1199. #define POINT_PC                49
  1200. #define POINT_PA                50
  1201. #define POINT_PE                51
  1202. #define POINT_PCE               52
  1203. #define POINT_PCE1              53
  1204. #define POINT_PCE2              54
  1205. #define POINT_PLC               55
  1206. #define POINT_PLC1              56
  1207. #define POINT_PLC2              57
  1208. #define POINT_PLC3              58
  1209. #define POINT_PLE               59
  1210. #define POINT_PLCEA             60
  1211.  
  1212. #define POINT_ID_ALL            61
  1213. #define POINT_ID_OBJECT         62
  1214. #define POINT_ID_INSTANCE       63
  1215. #define POINT_ID_TRIM           64
  1216. #define POINT_ID_TRIM1          65
  1217. #define POINT_ID_TRIM2          66
  1218. #define POINT_ID_LINE           67
  1219. #define POINT_ID_LINE1          68
  1220. #define POINT_ID_LINE2          69
  1221. #define POINT_ID_CIRCLE         70
  1222. #define POINT_ID_CIRCLE1        71
  1223. #define POINT_ID_CIRCLE2        72
  1224. #define POINT_ID_ARC            73
  1225. #define POINT_ID_ELLIPSE        74
  1226. #define POINT_ID_EARC           75
  1227. #define POINT_ID_CURVE          76
  1228. #define POINT_ID_SURFACE        77
  1229. #define POINT_ID_CURVE_SURFACE  78
  1230. #define POINT_ID_FILLED         79
  1231. #define POINT_ID_FILLED1        80
  1232. #define POINT_ID_FILLED2        81
  1233. #define POINT_ID_TEXT           82
  1234. #define POINT_ID_DIMENSION1     83
  1235. #define POINT_ID_DIMENSION2     84
  1236. #define POINT_ID_CLIP           85
  1237. #define POINT_ID_POINT          86
  1238.  
  1239. #define POINT_ID_MULTI_FIRST    87              // First ID that enables multi-object identification
  1240.  
  1241. #define POINT_ID_MULTITEXT1     87
  1242. #define POINT_ID_MULTITEXT2     88
  1243. #define POINT_ID_MULTIDIM1      89
  1244. #define POINT_ID_MULTIDIM2      90
  1245. #define POINT_ID_MULTIINST      91
  1246. #define POINT_ID_MULTIOBJ       92
  1247. #define POINT_ID_MULTIALL       93
  1248. #define POINT_ID_MULTIPOINT     94
  1249.  
  1250. #define POINT_TOTAL             95
  1251.  
  1252. //------ Guide Options ---------------------------------------------------------------------------------
  1253.  
  1254. #define GUIDE_NULL              0x00000000      // No guide
  1255. #define GUIDE_SINGLE_OBJ        0x00000001      // Single object identification
  1256. #define GUIDE_MULTI_OBJ         0x00000002      // Multiple object choosing
  1257. #define GUIDE_SINGLE_POINT      0x00000004      // Single point identification
  1258. #define GUIDE_MULTI_POINT       0x00000008      // Multiple point choosing
  1259. #define GUIDE_PARAMETER         0x00000010      // Parameters are available
  1260. #define GUIDE_ARC_DIRECTION     0x00000020      // Arc direction has effect
  1261. #define GUIDE_ARC_MODE          0x00000040      // Arc mode has effect
  1262. #define GUIDE_COORDINATES       0x00000080      // Coordinate entry makes sense
  1263. #define GUIDE_SNAP              0x00000100      // Snapping has effect
  1264. #define GUIDE_GRID              0x00000200      // Grid has effect
  1265. #define GUIDE_DUPLICATE         0x00000400      // Duplicate has effect
  1266. #define GUIDE_MULTILINE         0x00000800      // Multiline has effect
  1267. #define GUIDE_ESC               0x00001000      // Last point entry may be reversed
  1268. #define GUIDE_RBUTTON1          0x00002000      // Right mouse button cancels command
  1269. #define GUIDE_RBUTTON2          0x00004000      // Right mouse button finishes entry
  1270. #define GUIDE_ENTRY             0x00008000      // Description of point entry
  1271. #define GUIDE_RESET             0x20000000      // Resets guide content to empty
  1272. #define GUIDE_DEFAULT           0x40000000      // Default descriptions
  1273. #define GUIDE_EXTERNAL          0x80000000      // Additional external text
  1274.  
  1275. //------ Command Types ---------------------------------------------------------------------------------
  1276.  
  1277. #define MODULECTRL_ALL          0x0000ffff      // Module may run on any program version
  1278. #define MODULECTRL_DEMO         0x00000001      // Module may run on demo version
  1279. #define MODULECTRL_TEST         0x00000002      // Module may run on trial version
  1280. #define MODULECTRL_LEVEL1       0x00000010      // Module may run on level 1
  1281. #define MODULECTRL_LEVEL2       0x00000020      // Module may run on level 2
  1282. #define MODULECTRL_LEVEL3       0x00000040      // Module may run on level 3
  1283. #define MODULECTRL_LEVEL4       0x00000080      // Module may run on level 4
  1284. #define MODULECTRL_CHECK_ALL    0xffff0000      // Module will run on any version if registered
  1285. #define MODULECTRL_CHECK_LEVEL1 0x00010000      // Module will run on level 1 if registered
  1286. #define MODULECTRL_CHECK_LEVEL2 0x00020000      // Module will run on level 2 if registered
  1287. #define MODULECTRL_CHECK_LEVEL3 0x00040000      // Module will run on level 3 if registered
  1288. #define MODULECTRL_CHECK_LEVEL4 0x00080000      // Module will run on level 4 if registered
  1289.  
  1290. #define MODULETYPE_FILE         0               // Module contains commands for menu "File"
  1291. #define MODULETYPE_EDIT         1               // Module contains commands for menu "Edit"
  1292. #define MODULETYPE_CONFIG       2               // Module contains commands for menu "Configure"
  1293. #define MODULETYPE_SHAPE        3               // Module contains commands for menu "Shape"
  1294. #define MODULETYPE_DRAW         4               // Module contains commands for menu "Draw"
  1295. #define MODULETYPE_GEO          5               // Module contains commands for menu "Geometry"
  1296. #define MODULETYPE_TRIM         6               // Module contains commands for menu "Trimming"
  1297. #define MODULETYPE_DIM          7               // Module contains commands for menu "Dimension"
  1298. #define MODULETYPE_LIB          8               // Module contains commands for menu "Library"
  1299. #define MODULETYPE_EXTRA        9               // Module contains commands for menu "Extra"
  1300. #define MODULETYPE_HELP         10              // Module contains commands for menu "Help"
  1301. #define MODULETYPE_CUSTOM       97              // Module contains commands for custom menu
  1302. #define MODULETYPE_IMPORT       98              // Module contains import filters
  1303. #define MODULETYPE_EXPORT       99              // Module contains export filters
  1304.  
  1305. #define MODULEEXEC_USER         0               // Command was selected by the user
  1306. #define MODULEEXEC_SYSTEM       1               // Command is restarted by the system
  1307. #define MODULEEXEC_HELP         2               // The help for this command shall be displayed
  1308. #define MODULEEXEC_GET_PROFILE  3               // The module should read any drawing-dependent settings now
  1309. #define MODULEEXEC_SET_PROFILE  4               // The module should write any drawing-dependent settings now
  1310. #define MODULEEXEC_MENU_INIT    5               // Evaluate menu initialization entry state
  1311.  
  1312. #define COMMAND_DIRECT          0               // Directly executed command (no mouse input required)
  1313. #define COMMAND_DIGITIZER       1               // Modification of digitizer assignment (local)
  1314. #define COMMAND_KEY             2               // Modification of keybaord assignment (local)
  1315. #define COMMAND_HELP            3               // Help by clicking (local)
  1316. #define COMMAND_LOCAL           4               // Local command with a fixed number of point entries
  1317. #define COMMAND_FIXED           5               // Global command with a fixed number of point entries
  1318. #define COMMAND_VARIABLE        6               // Global command with a variable number of point entries
  1319.  
  1320. //------ Data Block Types ------------------------------------------------------------------------------
  1321.  
  1322. #define DB_OWNER_TOSO           0
  1323.  
  1324. #define DB_TYPE_NATIVE          0
  1325. #define DB_TYPE_LONG            1
  1326. #define DB_TYPE_DOUBLE          2
  1327. #define DB_TYPE_POINT           3
  1328. #define DB_TYPE_COLORREF        4
  1329. #define DB_TYPE_PROPERTY        5
  1330. #define DB_TYPE_XPROPERTY       6
  1331. #define DB_TYPE_FONTDEF         7
  1332. #define DB_TYPE_TEXT            8
  1333. #define DB_TYPE_BINARY          9
  1334.  
  1335. //------ Data Block Numbers ----------------------------------------------------------------------------
  1336.  
  1337. #define DB_TEMP_MIN             (-100)          // First number of a temporary data block
  1338. #define DB_TEMP_MAX             0               // First number of a non-temporary data block
  1339.  
  1340. #define DB_TEMP_T001            (-1)
  1341. #define DB_TEMP_T002            (-2)
  1342. #define DB_TEMP_T003            (-3)
  1343. #define DB_TEMP_T004            (-4)
  1344. #define DB_TEMP_T005            (-5)
  1345. #define DB_TEMP_T006            (-6)
  1346. #define DB_TEMP_T007            (-7)
  1347. #define DB_TEMP_T008            (-8)
  1348.  
  1349. #define DB_POINT_MIN            0               // First number of a point data block
  1350. #define DB_POINT_MAX            100             // First number of a non-point data block
  1351.  
  1352. #define DB_POINT_ANY            0
  1353. #define DB_POINT_START          1
  1354. #define DB_POINT_END            2
  1355. #define DB_POINT_CENTER         3
  1356. #define DB_POINT_RADIUS         4
  1357. #define DB_POINT_ANGLE          5
  1358. #define DB_POINT_VECTOR         6
  1359. #define DB_POINT_PIVOT1         7
  1360. #define DB_POINT_PIVOT2         8
  1361. #define DB_POINT_ARC            9
  1362. #define DB_POINT_MARK           10
  1363.  
  1364. #define DB_ALL_MIN              100             // First number of a standard data block
  1365. #define DB_ALL_MAX              200             // First number of a non-standard data block
  1366.  
  1367. #define DB_ALL_CONSTANT         100
  1368. #define DB_ALL_ARC              101
  1369. #define DB_ALL_CURVE            102
  1370. #define DB_ALL_TEXT             110
  1371.  
  1372. #define DB_INFO_MIN             200             // First number of an object-specific data block
  1373. #define DB_INFO_MAX             300             // Frist number of an non-object-specific data block
  1374.  
  1375. #define DB_INFO_DIMLINE         220
  1376. #define DB_INFO_DIMLARGE        225
  1377. #define DB_INFO_DIMSMALL        230
  1378. #define DB_INFO_TEXTSTANDARD    235
  1379. #define DB_INFO_TEXTFRAME       236
  1380. #define DB_INFO_TEXTREFERENCE   237
  1381. #define DB_INFO_CLIPSURFACE     242
  1382. #define DB_INFO_BITMAPREF       243
  1383.  
  1384. #define DB_ATTRIB_MIN           300             // First number of an attribute data block
  1385. #define DB_ATTRIB_MAX           500             // First number of a non-attribute data block
  1386.  
  1387. #define DB_ATTRIB_GLOBAL_MIN    300
  1388. #define DB_ATTRIB_GLOBAL_MAX    400
  1389.  
  1390. #define DB_ATTRIB_GLOBAL_TEXT   300
  1391. #define DB_ATTRIB_GLOBAL_NUM    301
  1392.  
  1393. #define DB_ATTRIB_LOCAL_MIN     400
  1394. #define DB_ATTRIB_LOCAL_MAX     500
  1395.  
  1396. #define DB_ATTRIB_LOCAL_TEXT    400
  1397. #define DB_ATTRIB_LOCAL_NUM     401
  1398.  
  1399. #define DB_END                  999
  1400.  
  1401. //------ Entity Types ----------------------------------------------------------------------------------
  1402.  
  1403. #define TYPE_OBJECT             0
  1404. #define TYPE_INSTANCE           1
  1405. #define TYPE_BLOCK              2
  1406. #define TYPE_USER               9
  1407.  
  1408. #define TYPE_END                999
  1409.  
  1410. //------ Standard Object Types -------------------------------------------------------------------------
  1411.  
  1412. #define OBJ_LINE                0
  1413. #define OBJ_HATCH               1
  1414.  
  1415. #define OBJ_CIRCLE              5
  1416. #define OBJ_ARC                 6
  1417. #define OBJ_SECTOR              7
  1418. #define OBJ_SEGMENT             8
  1419.  
  1420. #define OBJ_ZIGZAG              10
  1421. #define OBJ_SPLINE              11
  1422. #define OBJ_CURVE               12
  1423. #define OBJ_SURFACE             13
  1424.  
  1425. #define OBJ_ELLIPSE             15
  1426. #define OBJ_EARC                16
  1427. #define OBJ_ESECTOR             17
  1428. #define OBJ_ESEGMENT            18
  1429.  
  1430. #define OBJ_DLINE               20
  1431. #define OBJ_DARC                21
  1432.  
  1433. #define OBJ_DDISTANCE           25
  1434. #define OBJ_DRADIUS             26
  1435. #define OBJ_DDIAMETER           27
  1436. #define OBJ_DANGLE              28
  1437. #define OBJ_DARCLENGTH          29
  1438. #define OBJ_DCOORDINATE         30
  1439. #define OBJ_DAREA               31
  1440. #define OBJ_DPERIMETER          32
  1441.  
  1442. #define OBJ_TEXTSTANDARD        35
  1443. #define OBJ_TEXTFRAME           36
  1444. #define OBJ_TEXTREFERENCE       37
  1445.  
  1446. #define OBJ_COMMENT             40
  1447. #define OBJ_MARK                41
  1448. #define OBJ_CLIPSURFACE         42
  1449. #define OBJ_BITMAPREF           43
  1450.  
  1451. #define OBJ_GEOLINE             45
  1452. #define OBJ_GEOCIRCLE           46
  1453. #define OBJ_GEOELLIPSE          47
  1454.  
  1455. #define OBJ_TOTAL               50              // Number of "known" object types
  1456.  
  1457. #define OBJ_END                 999
  1458.  
  1459. //------ List of All Currently Known User-Defined Objects ----------------------------------------------
  1460. // Module Owner ID:     0x0000         Company: TommySoftware, address see header
  1461. // Module Prefix:       TS
  1462.  
  1463. #define OBJ_TS_STAR             0x0000          // Regular Star, defined in TSAMPLE_.DLL
  1464.  
  1465. //------ Special Identification Characters -------------------------------------------------------------
  1466.  
  1467. #define ID_CHAR_SYSTEM          '*'             // Identification character for system names
  1468. #define ID_CHAR_INTERN          '#'             // Identification character for internal definitions
  1469. #define ID_CHAR_VARIABLE        '~'             // Identification character for variables
  1470. #define ID_CHAR_GROUP           'G'             // Identification character for groups
  1471. #define ID_CHAR_POSNO           'P'             // Identification character for position numbers
  1472.  
  1473. #define END_TEXT                "\x04"          // End-of-list identification in text lists (string)
  1474. #define END_CHAR                '\x04'          // End-of-list identification in text lists (char)
  1475.  
  1476. //------ Constant for TVG and TVL Handling -------------------------------------------------------------
  1477.  
  1478. #define FONTTYPE_TOSO           0x0000          // Font Types
  1479. #define FONTTYPE_TRUETYPE       0x0001
  1480. #define FONTTYPE_DEVICE         0x0002
  1481.  
  1482. #define FONTSTYLE_REGULAR       0x0000          // Font Styles
  1483. #define FONTSTYLE_ITALIC        0x0001
  1484. #define FONTSTYLE_UNDERLINE     0x0002
  1485. #define FONTSTYLE_OVERLINE      0x0004
  1486. #define FONTSTYLE_STRIKEOUT     0x0008
  1487. #define FONTSTYLE_SYMBOL        0x0100
  1488. #define FONTSTYLE_BASIC         0xff01
  1489.  
  1490. #define DIMMODE_NUMREFRESH      0x00000001      // Dimension Parameter Flags
  1491. #define DIMMODE_NUMCENTERED     0x00000002
  1492. #define DIMMODE_NUMTIGHT        0x00000004
  1493. #define DIMMODE_NUMROTATE       0x00000008
  1494. #define DIMMODE_ARROWSTARTFORM  0x00000010
  1495. #define DIMMODE_ARROWSTARTMODE  0x00000020
  1496. #define DIMMODE_ARROWENDFORM    0x00000040
  1497. #define DIMMODE_ARROWENDMODE    0x00000080
  1498. #define DIMMODE_EXTSTARTDISPLAY 0x00000100
  1499. #define DIMMODE_EXTENDDISPLAY   0x00000200
  1500. #define DIMMODE_LINEDISPLAY     0x00000400
  1501. #define DIMMODE_LINEORIENTATION 0x00000800
  1502. #define DIMMODE_LINETYPE        0x00001000
  1503. #define DIMMODE_LINEDISTMODE    0x00002000
  1504. #define DIMMODE_LINEDISTANCE    0x00004000
  1505. #define DIMMODE_GLOBALPARAM     0x00008000
  1506. #define DIMMODE_CHARDISTANCE    0x00010000
  1507. #define DIMMODE_TABDISTANCE     0x00020000
  1508. #define DIMMODE_TEXTMODE        0x00040000
  1509. #define DIMMODE_LINEOFFET       0x00080000
  1510. #define DIMMODE_ALL             0x00ffffff
  1511.                                                 // New in Version 4.2!
  1512. #define PS_ENDCAP_ROUND         0x00000000      // Line Caps and Line Join 
  1513. #define PS_ENDCAP_SQUARE        0x00000100
  1514. #define PS_ENDCAP_FLAT          0x00000200
  1515. #define PS_ENDCAP_MASK          0x00000F00
  1516. #define PS_JOIN_ROUND           0x00000000
  1517. #define PS_JOIN_BEVEL           0x00001000
  1518. #define PS_JOIN_MITER           0x00002000
  1519. #define PS_JOIN_MASK            0x0000F000
  1520.  
  1521. #define FILLMODE_FRAMED         0x0000          // Filling Modes
  1522. #define FILLMODE_FILLED         0x0001
  1523. #define FILLMODE_FILLED_FRAMED  0x0002
  1524. #define FILLMODE_ERASER         0x0003
  1525. #define FILLMODE_ERASER_FRAMED  0x0004
  1526.  
  1527. #define LAYERMODE_DISPLAY       0x0001          // Layer Modes
  1528. #define LAYERMODE_OUTPUT        0x0002
  1529. #define LAYERMODE_FREEZE        0x0004
  1530. #define LAYERMODE_IDLE          0x0008
  1531. #define LAYERMODE_GRAY          0x0010
  1532. #define LAYERMODE_DEFAULT       0x0003
  1533.  
  1534. #define GRID_OFF                0x0000          // Grid Modes
  1535. #define GRID_CARTESIAN          0x0001
  1536. #define GRID_ISOMETRIC          0x0002
  1537. #define GRID_DIMETRIC1          0x0003
  1538. #define GRID_DIMETRIC2          0x0004
  1539.  
  1540. #define USE_NULL                0x0000          // Transmission Flags
  1541. #define USE_PEN                 0x0001
  1542. #define USE_FILLMODE            0x0002
  1543. #define USE_FILLCOLOR           0x0004
  1544. #define USE_LINECOLOR           0x0008
  1545. #define USE_LINEWIDTH           0x0010
  1546. #define USE_LINETYPE            0x0020
  1547. #define USE_LINECAPS            0x0080          // New in Version 4.2!
  1548. #define USE_LAYER               0x0040
  1549.  
  1550. #define USE_PROPERTY            0x00be
  1551. #define USE_PROP_PEN            0x00bf
  1552. #define USE_PROP_PEN_LAYER      0x00ff
  1553.  
  1554. #define NUMPLACING_NONE         0x0000          // New in Version 4.2!
  1555. #define NUMPLACING_TIGHT        0x0001          // New in Version 4.2!
  1556. #define NUMPLACING_INSIDE       0x0002          // New in Version 4.2!
  1557.  
  1558. #define DEFPEN_DIMLINE          0x0000          // Default Pen Indexes
  1559. #define DEFPEN_DIMTEXT          0x0001
  1560. #define DEFPEN_TEXT             0x0002
  1561. #define DEFPEN_REFLINE          0x0003
  1562. #define DEFPEN_GEOMETRY         0x0004
  1563.  
  1564. #define DEFLAYER_MARK           0x0000          // Default Layer Index
  1565. #define DEFLAYER_OUTLINE        0x0001
  1566. #define DEFLAYER_DIM            0x0002
  1567. #define DEFLAYER_TEXT           0x0003
  1568. #define DEFLAYER_HATCH          0x0004
  1569. #define DEFLAYER_BLOCK          0x0005
  1570. #define DEFLAYER_GEOMETRY       0x0006
  1571. #define DEFLAYER_GROUP          0x0007
  1572.  
  1573. #define SNAPMODE_CENTER         0x0001          // Snapping modes
  1574. #define SNAPMODE_QUADRANT       0x0002
  1575. #define SNAPMODE_EDGE           0x0004
  1576. #define SNAPMODE_CORNER         0x0008
  1577. #define SNAPMODE_INTERSECTION   0x0010
  1578. #define SNAPMODE_GEO            0x0020
  1579. #define SNAPMODE_MARK           0x0040
  1580. #define SNAPMODE_OTHERS         0x0080
  1581. #define SNAPMODE_RELATIVE       0x0100
  1582.  
  1583. #define SNAPMODE_SINGLE         0x0007          // Snapping modes that cannot be combined with others
  1584. #define SNAPMODE_MULTI          0x00f8          // Snapping modes that can be combined using bitwise-or
  1585. #define SNAPMODE_EXTRA          0x0f00          // Snapping modes that are additional to normal modes
  1586.  
  1587. #define SNAPMODE_TOTAL          9               // Number of snapping modes
  1588.  
  1589. // New in Version 4.2!
  1590. #define LINEDISPLAY_MINIMUM     0x0000          // Display lines with minimum width, no line pattern
  1591. #define LINEDISPLAY_NARROW      0x0001          // Display lines with minimum width, use line pattern
  1592. #define LINEDISPLAY_FIXED       0x0002          // Display lines with unscaled width, use line pattern
  1593. #define LINEDISPLAY_SCALED      0x0003          // Display lines with scaled width, use line pattern
  1594.  
  1595. //------ System Settings -------------------------------------------------------------------------------
  1596.  
  1597. #define SETTING_DUPLICATE       0x0001          // Duplicate status (TRUE = Active, FALSE = Inactive)
  1598. #define SETTING_SNAPACTIVE      0x0002          // Snap status (TRUE = Active, FALSE = Inactive)
  1599. #define SETTING_SNAPMODE        0x0003          // Snap modes (combination of SNAPMODE_???)
  1600. #define SETTING_SNAPRADIUS      0x0004          // Snap radius (5..50)
  1601. #define SETTING_SNAPTOLERANCE   0x0005          // Snap tolerance (0..10)
  1602. #define SETTING_ORTHO           0x0006          // Orthogonal mode (TRUE = Active, FALSE = Disabled)
  1603. #define SETTING_ARCDIRECTION    0x0007          // Arc direction (TRUE = Positive, FALSE = Negative)
  1604. #define SETTING_ARCMODE         0x0008          // Arc mode (0 = Arc, 1 = Sector, 2 = Segment)
  1605. #define SETTING_AREAMODE        0x0009          // Area mode (TRUE = Inside, FALSE = Overlapping)
  1606. #define SETTING_GEODISPLAY      0x000a          // Geometry display (TRUE = Visible, FALSE = Invisible)
  1607. #define SETTING_GEOFROZEN       0x000b          // Geometry status (TRUE = Frozen, FALSE = Editable)
  1608.  
  1609. #define SETTING_COLOR_LAYER     0x1000          // Color of grayed layers
  1610. #define SETTING_COLOR_GEOMETRY  0x1001          // Color of default geometry objects
  1611. #define SETTING_COLOR_BLOCKS    0x1002          // Color of block text display
  1612. #define SETTING_COLOR_ERASER    0x1003          // Color of erasers
  1613. #define SETTING_COLOR_POINT     0x1004          // Color of standard points
  1614. #define SETTING_COLOR_MARK      0x1005          // Color of markings
  1615. #define SETTING_COLOR_INPUT     0x1006          // Color of input rubber lines
  1616. #define SETTING_COLOR_OBJSEL    0x1007          // Color of permanently selected objects
  1617. #define SETTING_COLOR_OBJUSE    0x1008          // Color of identified objects
  1618. #define SETTING_COLOR_OBJIDENT  0x1009          // Color of object highlight when identification is inaccurate
  1619. #define SETTING_COLOR_POINTUSE  0x100a          // Color of selected points
  1620. #define SETTING_COLOR_CURSOR1   0x100b          // Color of "large" cursor cross (active window)
  1621. #define SETTING_COLOR_CURSOR2   0x100c          // Color of "small" cursor cross (inactive windows)
  1622. #define SETTING_COLOR_PAGEFRAME 0x100d          // Color of page frame and zoom / layer / system display
  1623. #define SETTING_COLOR_DRAWAREA  0x100e          // Color of drawing area background
  1624. #define SETTING_COLOR_COLORTEXT 0x100f          // Color of colored texts
  1625. #define SETTING_COLOR_SUBMENU   0x1010          // Color of submenu icons
  1626. #define SETTING_COLOR_COMMAND   0x1011          // Color of command icons
  1627.  
  1628. // New in Version 4.2!
  1629. #define SETTING_SEL_FRAME       0x2010          // Display permanent selection w/ frame (TRUE = Yes, FALSE = No)
  1630. #define SETTING_SEL_OUTLINE     0x2011          // Display permanent selection w/ outline (TRUE = Yes, FALSE = No)
  1631. #define SETTING_DISPLAY_DRAWING 0x2012          // Display drawing elements (TRUE = Yes, FALSE = No)
  1632. #define SETTING_DISPLAY_OBJECTS 0x2013          // Display objects (TRUE = Yes, FALSE = No)
  1633. #define SETTING_DISPLAY_LINES   0x2014          // Display line mode (LINEDISPLAY_?)
  1634. #define SETTING_DISPLAY_FILLS   0x2015          // Display fillings (TRUE = Yes, FALSE = No)
  1635. #define SETTING_DISPLAY_ERASERS 0x2016          // Display erasers colored (TRUE = Yes, FALSE = No)
  1636. #define SETTING_DISPLAY_TEXTS   0x2017          // Display texts using original font (TRUE = Yes, FALSE = No)
  1637. #define SETTING_DISPLAY_BORDERS 0x2018          // Display borders of bitmaps and clippings (TRUE = Yes, FALSE = No)
  1638. #define SETTING_DISPLAY_VARS    0x2019          // Evaluate variables (TRUE = Yes, FALSE = No)
  1639. #define SETTING_DISPLAY_BITMAPS 0x201a          // Display bitmaps (TRUE = Yes, FALSE = No)
  1640. #define SETTING_DISPLAY_BLOCKS  0x201b          // Display blocks (TRUE = Yes, FALSE = No)
  1641. #define SETTING_DISPLAY_MARKS   0x201c          // Display markings (TRUE = Yes, FALSE = No)
  1642.  
  1643. // New in Version 4.2!
  1644. #define SETTING_DISPLAY_SELONLY 0x2020          // Apply following modes only to selected (TRUE = Yes, FALSE = No)
  1645. #define SETTING_DISPLAY_POINTS  0x2021          // Display definition point markings (TRUE = Yes, FALSE = No)
  1646. #define SETTING_DISPLAY_ARROWS  0x2022          // Display orientation arrows (TRUE = Yes, FALSE = No)
  1647. #define SETTING_DISPLAY_NUMBERS 0x2023          // Display object numbers (TRUE = Yes, FALSE = No)
  1648.  
  1649. // New in Version 4.2!
  1650. #define SETTING_EXTERNAL_XPROP  0x2030          // Display drawing using external properties (TRUE = Yes, FALSE = No)
  1651. #define SETTING_USE_PALETTE     0x2031          // Use rainbow palette on 8bit graphic systems (TRUE = Yes, FALSE = No)
  1652. #define SETTING_SCROLL_STEP     0x2032          // Current scroll step in percent (5..100)
  1653. #define SETTING_FONT_RESOLVE    0x2033          // Resolve TrueType font into curves (TRUE = Yes, FALSE = No)
  1654. #define SETTING_FONT_MINIMUM    0x2034          // Minimum TrueType font size (0..99)
  1655.  
  1656. //------ Input Processing ------------------------------------------------------------------------------
  1657.  
  1658. #define INPUT_ERROR             0               // Error during input processing
  1659. #define INPUT_OVERFLOW          1               // Too many points entered
  1660. #define INPUT_IGNORE            2               // Ignore this point!
  1661. #define INPUT_OK                3               // OK
  1662. #define INPUT_CANCEL            4               // Cancel current command
  1663. #define INPUT_FINISH            5               // Finish current command
  1664. #define INPUT_NEXT              6               // Continue with next point
  1665. #define INPUT_UNUSED            7               // This point is not required
  1666.  
  1667. //------ File Options ----------------------------------------------------------------------------------
  1668.  
  1669. #define LOADSAVE_HEADER         0x00000001
  1670. #define LOADSAVE_TOOLBOX        0x00000002
  1671. #define LOADSAVE_BLOCKLIST      0x00000004
  1672. #define LOADSAVE_KEYBOARD       0x00000008
  1673. #define LOADSAVE_WINDOW         0x00000010
  1674. #define LOADSAVE_DEFAULT        0x00000020
  1675. #define LOADSAVE_USER           0x00000040
  1676. #define LOADSAVE_MODULE         0x00000080
  1677. #define LOADSAVE_PAGE           0x00000100
  1678. #define LOADSAVE_COLOR          0x00000200
  1679. #define LOADSAVE_HATCH          0x00000400
  1680. #define LOADSAVE_MULTILINE      0x00000800
  1681. #define LOADSAVE_SYSTEM         0x00001000
  1682. #define LOADSAVE_PEN            0x00002000
  1683. #define LOADSAVE_LINE           0x00004000
  1684. #define LOADSAVE_LAYER          0x00008000
  1685. #define LOADSAVE_BITMAP         0x00010000
  1686.  
  1687. #define LOADSAVE_ATTRIB         0x00080000
  1688.  
  1689. #define LOADSAVE_BLOCK          0x00100000
  1690. #define LOADSAVE_OBJECT         0x00200000
  1691.  
  1692. // New in Version 4.2!
  1693. #define LOADSAVE_COMPRESSED     0x01000000      // Load/Save compressed drawing
  1694. #define LOADSAVE_PASSWORD       0x02000000      // Scramble with password (only valid if combined with LOADSAVE_COMPRESSED)
  1695.  
  1696. #define LOADSAVE_USERSECTIONS   0x10000000      // Save all previously loaded sections plus...
  1697. #define LOADSAVE_IDENTIFIED     0x20000000      // Do only save identified objects
  1698. #define LOADSAVE_REPLACE        0x40000000      // Replace elements when loading
  1699. #define LOADSAVE_NODIALOG       0x80000000      // Do not display a progress indicator
  1700.  
  1701. //------ File Options ----------------------------------------------------------------------------------
  1702.  
  1703. // New in Version 4.2!
  1704. #define IMPORT_RETURN_OK        0x00000000      // File was imported successfully
  1705. #define IMPORT_RETURN_UNKNOWN   0x00000001      // File is of unknown type, ask another import filter
  1706. #define IMPORT_RETURN_ERROR     0x00000002      // Error while importing the file
  1707.  
  1708. //------ Window Arrangement ----------------------------------------------------------------------------
  1709.  
  1710. #define WINMODE_1               0x00            // 1 windows
  1711. #define WINMODE_2X              0x01            // 2 windows (equally sized, left and right)
  1712. #define WINMODE_2Y              0x02            // 2 windows (equally sized, top and bottom)
  1713. #define WINMODE_3X              0x03            // 3 windows (1 large one, 2 small ones right to it)
  1714. #define WINMODE_3Y              0x04            // 3 windows (1 large one, 2 small ones below it)
  1715. #define WINMODE_4               0x05            // 4 windows (equally sized)
  1716. #define WINMODE_4X              0x06            // 4 windows (1 large one, 3 small ones right ot it)
  1717. #define WINMODE_4Y              0x07            // 4 windows (1 large one, 3 small ones below it)
  1718.  
  1719. //------ Flags for Unit Enumeration --------------------------------------------------------------------
  1720.  
  1721. #define ENUMMODE_LINES          0x00000000      // Curves / surfaces may neither be nested nor filled
  1722. #define ENUMMODE_FILLS          0x00000001      // Curves / surfaces may be nested and filled
  1723. #define ENUMMODE_ARCS           0x00000002      // Curves / surfaces may contain circular arcs
  1724. #define ENUMMODE_BEZIERS        0x00000004      // Curves / surfaces may contain BÈzier curves
  1725. #define ENUMMODE_LINETYPES      0x00000008      // Curves / surfaces may use line patterns (instead of resolving)
  1726. #define ENUMMODE_SOLID_CHARS    0x00000010      // Solid texts will be passed as separate characters (plus a matrix)
  1727. #define ENUMMODE_OTHER_CHARS    0x00000020      // Non-solid texts will be passed as separate characters (plus a matrix)
  1728.  
  1729. // New in Version 4.2!
  1730. #define ENUMMODE_SIMPLE_TEXTS   0x00000040      // Texts will be passed as single one-line-strings (format plus matrix)
  1731. #define ENUMMODE_COMPLEX_TEXTS  0x00000080      // Texts will be passed as complex multi-line-strings (format plus matrix)
  1732.  
  1733. #define ENUMMODE_MATRIX         0x00000100      // Display matrixes will be passed (instead of applied directly)
  1734. #define ENUMMODE_NATIVE         0x00000200      // All units will be passed in native format only (address)
  1735.  
  1736. #define ENUMMODE_PLAIN          0x00001000      // Instances will be resolved
  1737. #define ENUMMODE_STRUCTURED     0x00002000      // Instances will not be resolved
  1738.  
  1739. #define ENUMMODE_USED_BLOCKS    0x00010000      // Enumerate all referenced blocks
  1740. #define ENUMMODE_USED_FONTS     0x00020000      // Enumerate all referenced fonts
  1741.  
  1742. #define ENUMMODE_NO_OBJECTS     0x00100000      // Do NOT enumerate objects
  1743. #define ENUMMODE_NO_BLOCKS      0x00200000      // Do NOT enumerate blocks
  1744. #define ENUMMODE_NO_CHARS       0x00400000      // Do NOT enumerate characters
  1745.  
  1746. #define ENUMMODE_SCREEN_PROP    0x01000000      // Use screen settings to calculate properties
  1747. #define ENUMMODE_OUTPUT_PROP    0x02000000      // Use output settings to calculate properties (default)
  1748.  
  1749. // New in Version 4.2!
  1750. #define ENUMMODE_VISIBLE        0x10000000      // Enumerate only units that are not hidden
  1751. #define ENUMMODE_WINDOW         0x20000000      // Enumerate only units that are visible in the currently active window
  1752.  
  1753. #define ENUMDATA_INVALID        0x00000000      // EnumData contains no valid data
  1754. #define ENUMDATA_CURVE          0x00000001      // EnumData contains an open curve
  1755. #define ENUMDATA_AREA           0x00000002      // EnumData contains a closed surface
  1756. #define ENUMDATA_MARK           0x00000003      // EnumData contains a list of markings
  1757. #define ENUMDATA_CHAR           0x00000004      // EnumData contains a list of characters plus matrixes
  1758. #define ENUMDATA_TEXT           0x00000005      // EnumData contains a complete line of text
  1759. #define ENUMDATA_INST           0x00000006      // EnumData contains an instance
  1760.  
  1761. #define ENUMDATA_USED_BLOCK     0x00000010      // EnumData contains information about used blocks
  1762. #define ENUMDATA_USED_FONT      0x00000011      // EnumData contains information about used fonts
  1763.  
  1764. #define ENUMDATA_NATIVE_OBJ     0x00000020      // EnumData contains pointer to an object
  1765. #define ENUMDATA_NATIVE_INST    0x00000021      // EnumData contains pointer to an instance
  1766. #define ENUMDATA_NATIVE_BLOCK   0x00000022      // EnumData contains pointer to a block
  1767. #define ENUMDATA_NATIVE_USER    0x00000023      // EnumData contains pointer to a custom-defined object
  1768.  
  1769. //------ Flags for Unit Modification -------------------------------------------------------------------
  1770.  
  1771. #define USER_MODIFY_INIT                0x00000001      // UserObj is to be initialised
  1772. #define USER_MODIFY_MATRIX              0x00000002      // UserObj is to be multiplied with a matrix
  1773. #define USER_MODIFY_TITLE               0x00000003      // Return description of user-defined object
  1774. #define USER_MODIFY_TEXT                0x00000010      // Let the user edit any text in UserObj
  1775. #define USER_MODIFY_PROPERTY_INIT       0x00000011      // UserObj shall be edited, alloc and init structure
  1776. #define USER_MODIFY_PROPERTY_FILL       0x00000012      // Fill UserObj properties into the structure
  1777. #define USER_MODIFY_PROPERTY_SINGLE     0x00000013      // Let the user edit the structure for UserObj
  1778. #define USER_MODIFY_PROPERTY_MULTIPLE   0x00000014      // Let the user edit the structure for UserObj
  1779. #define USER_MODIFY_PROPERTY_APPLY      0x00000015      // Apply structure to UserObj
  1780. #define USER_MODIFY_PROPERTY_EXIT       0x00000016      // Discard the structure
  1781.  
  1782. #define USER_RETURN_UNKNOWN             0x00000000      // UserObj is unknown, ask another module
  1783. #define USER_RETURN_IGNORE              0x00000001      // UserObj is known, but this ModifyMode is not supported
  1784. #define USER_RETURN_DONE                0x00000002      // Task was performed successfully
  1785.  
  1786. //------ Internal Flags for Entities and Data Blocks ---------------------------------------------------
  1787.  
  1788. #define FLAG_SELECT             0x0001          // Unit is permanently selected
  1789. #define FLAG_IDENT              0x0002          // Unit is temporarily selected
  1790. #define FLAG_USE                0x0004          // Unit is identified
  1791. #define FLAG_POINT              0x0008          // At least one point is identified
  1792.  
  1793. #define FLAG_SELCHANGE          0x0010          // The permanent selection has changed
  1794. #define FLAG_USECHANGE          0x0020          // The temporary selection has changed
  1795. #define FLAG_PREVIOUS           0x0040          // Unit was previously selected
  1796. #define FLAG_INTERNAL           0x0080          // Unit is used for internal affairs
  1797.  
  1798. #define FLAG_TEMP1              0x0100          // Temporary multi-purpose flag 1
  1799. #define FLAG_TEMP2              0x0200          // Temporary multi-purpose flag 2
  1800. #define FLAG_TEMP3              0x0400          // Temporary multi-purpose flag 3
  1801. #define FLAG_TEMP4              0x0800          // Temporary multi-purpose flag 4
  1802. #define FLAG_TEMP_ALL           0x0f00
  1803.  
  1804. #define FLAG_NODISPLAY          0x1000          // Unit's layer will not be displayed
  1805. #define FLAG_NOOUTPUT           0x2000          // Unit's layer will not be output
  1806. #define FLAG_FROZEN             0x4000          // Unit's layer is frozen
  1807. #define FLAG_IDLE               0x8000          // Unit's layer is idle
  1808.  
  1809. #define FLAG_GROUP_COPY         ( FLAG_PREVIOUS  | FLAG_SELECT )
  1810. #define FLAG_GROUP_NO_USE       ( FLAG_NODISPLAY | FLAG_FROZEN )
  1811. #define FLAG_GROUP_NO_SNAP      ( FLAG_NODISPLAY | FLAG_IDLE )
  1812.  
  1813. //------ Definitions for TVG File Handling -------------------------------------------------------------
  1814.  
  1815. #define TVG_COMMA               ','
  1816. #define TVG_SEMI                ';'
  1817. #define TVG_COLOR               '/'
  1818. #define TVG_ESCAPE              '\\'
  1819. #define TVG_STRING              '"'
  1820. #define TVG_KEYWORD             '='
  1821. #define TVG_COMMENT             '|'
  1822.  
  1823. #define TVG_NEWLINE             "\x0d\x0a"
  1824.  
  1825. #define TVG_KEY_UNKNOWN         -1
  1826. #define TVG_KEY_EXIT            0
  1827. #define TVG_KEY_END             1
  1828. #define TVG_KEY_DRAWING         2
  1829. #define TVG_KEY_LIBRARY         3
  1830. #define TVG_KEY_ATTRIB          4
  1831. #define TVG_KEY_PAGE            5
  1832. #define TVG_KEY_DEFAULT         6
  1833. #define TVG_KEY_SYSTEM          7
  1834. #define TVG_KEY_PEN             8
  1835. #define TVG_KEY_LINE            9
  1836. #define TVG_KEY_LAYER           10
  1837. #define TVG_KEY_HATCH           11
  1838. #define TVG_KEY_BLOCK           12
  1839. #define TVG_KEY_OBJECT          13
  1840. #define TVG_KEY_COLOR           14
  1841. #define TVG_KEY_KEYBOARD        15
  1842. #define TVG_KEY_TOOLBOX         16
  1843. #define TVG_KEY_SYMBOL          17
  1844. #define TVG_KEY_USER            18
  1845. #define TVG_KEY_MODULE          19
  1846. #define TVG_KEY_WINDOW          20
  1847. #define TVG_KEY_MULTILINE       21
  1848. #define TVG_KEY_BITMAP          22              // New in Version 4.2!
  1849. #define TVG_KEY_MAX             23
  1850.  
  1851. //------ Constants for Drawing and Library Elements ----------------------------------------------------
  1852.  
  1853. #define ENTRIES_PER_DRAWING     10000           // Maximum number of blocks per drawing
  1854. #define ENTRIES_PER_LIBRARY     1000000         // Maximum number of blocks per library
  1855. #define ENTRIES_PER_LEVEL       1000            // Maximum number of blocks pro folder in a library
  1856. #define ENTRIES_PER_FONT        224             // Maximum number of characters per font (Ansi 32..255)
  1857.  
  1858. #define ATTRIBS_PER_OBJECT      200             // Maximum number of attributes per block / instance
  1859. #define POINTS_PER_OBJECT       2000            // Maximum number of point data blocks per object
  1860. #define BYTES_PER_BINARY        144             // Recommended maximum number of bytes per binary block
  1861.  
  1862. #define NAME_LENGTH_SHORT       32              // Maximum length of short definition names
  1863. #define NAME_LENGTH_LONG        64              // Maximum length of long definition names
  1864. #define NAME_LENGTH_TITLE       64              // Maximum length of library and drawing titles
  1865. #define NAME_LENGTH_BLOCK       64              // Maximum length of block names
  1866. #define NAME_LENGTH_FONT        64              // Maximum length of font names
  1867. #define NAME_LENGTH_TEXTSHORT   250             // Maximum length of "short" texts
  1868. #define NAME_LENGTH_TEXTLONG    8000            // Maximum length of "long" texts
  1869. #define NAME_LENGTH_EDIT        250             // Maximum text length retrieves from edit controls
  1870.  
  1871. #define DATA_PER_OBJECT         128000          // Maximum size of a unit's data area in bytes
  1872.  
  1873. #define TVG_ID_LENGTH           22              // Length of TommySoftware file identifications
  1874. #define TVG_42_HEADER           "TommySoftware TVG 4.20"
  1875. #define TVG_40_HEADER           "TommySoftware TVG 4.00"
  1876. #define TVG_30_HEADER           "TommySoftware TVG 3.00"
  1877. #define TVL_30_HEADER           "TommySoftware TVL 3.00"
  1878.  
  1879. #define TVG_BLOCK_ID            "*"             // Library name of blocks
  1880. #define TVG_BLOCK_INDEX         999             // Library index of blocks
  1881.  
  1882. #define TVG_TOOLBOX_MAX         100                             // Number of toolbox buttons
  1883. #define TVG_BLOCKLIST_MAX       100                             // Number of block list buttons
  1884. #define TVG_CUSTOMKEY_MAX       76                              // Number of keys
  1885.  
  1886. #define TVG_SYSTEMCOLOR_MAX     32                              // Number of system colors
  1887. #define TVG_CUSTOMCOLOR_MAX     500                             // Number of custom colors
  1888. #define TVG_TOTALCOLOR_MAX      (TVG_SYSTEMCOLOR_MAX + TVG_CUSTOMCOLOR_MAX)
  1889. #define TVG_DEFAULT_MAX         8                               // Number of defaults           (pens & layers)
  1890. #define TVG_SYSTEM_MAX          50                              // Number of coordinate systems (plus STANDARD)
  1891. #define TVG_MULTILINE_MAX       50                              // Number of line sequences     (plus STANDARD)
  1892. #define TVG_MULTILINEPART_MAX   8                               // Number of lines per line sequence
  1893. #define TVG_HATCH_MAX           100                             // Number of hatch types        (plus STANDARD)
  1894. #define TVG_LINE_MAX            100                             // Number of line patterns      (plus STANDARD)
  1895. #define TVG_LINEPART_MAX        16                              // Number of line parts per line pattern
  1896. #define TVG_PEN_MAX             500                             // Number of pens               (plus NULL)
  1897. #define TVG_LAYER_MAX           500                             // Number of layers             (plus STANDARD)
  1898.  
  1899. #define TVG_DRAWING_MAX         1               // Maximum number of concurrently opened drawing files
  1900. #define TVG_WINDOW_MAX          4               // Maximum number of concurrent drawing windows
  1901. #define TVG_WINDOW_VIEW         999             // Window index of view window
  1902. #define TVG_FILE_MAX            20              // Maximum number of drawings memorised
  1903. #define TVG_FONT_MAX            10              // Maximum number of fonts opened
  1904. #define TVG_LIBRARY_MAX         50              // Maximum number of libraries opened
  1905. #define TVG_CACHE_MAX           10000           // Maximum number of blocks in the cache
  1906.  
  1907. #define TVG_BITMAP_MIN          50              // Minimum number of bitmaps opened
  1908. #define TVG_BITMAP_MAX          1000            // Maximum number of bitmaps opened
  1909.  
  1910. #define TVG_DEFPATH_MAX         8               // Number of standard paths per file type
  1911. #define TVG_PLOTTER_MAX         8               // Number of plotter pens
  1912.  
  1913. #define TVG_FILTER_MAX          20              // Maximum number of loaded filters
  1914. #define TVG_MODULE_MAX          40              // Maximum number of loaded modules
  1915. #define TVG_MODULE_MENU_MAX     100             // Maximum number of items in a module's menu
  1916. #define TVG_MODULE_SUBMENU_MAX  20              // Maximum number of items in a module's submenu
  1917.  
  1918. // New in Version 4.2!
  1919. #define TVG_MODULE_USER_MAX     100             // Maximum number of module-defined object types at a time
  1920.  
  1921. #define TVG_INPUT_MAX           2000            // Maximum number of points to be entered
  1922. #define TVG_INPUT_DEF_MAX       8               // Maximum number of predefined point entries
  1923. #define TVG_POLYGON_MAX         16000           // Maximum number of lines at polygon output
  1924. #define TVG_POLYPOLY_MAX        1000            // Maximum number of nested sub-polygons
  1925.  
  1926. #define PAGEDEF_SIZE            sizeof( PAGEDEF )
  1927. #define DEFAULTDEF_SIZE         sizeof( DEFAULTDEF )
  1928. #define WINDOWDEF_SIZE          sizeof( WINDOWDEF )
  1929. #define SYSTEMDEF_SIZE          sizeof( SYSTEMDEF )
  1930. #define LINEDEF_SIZE            sizeof( LINEDEF )
  1931. #define PROPERTY_SIZE           sizeof( PROPERTY )
  1932. #define PENDEF_SIZE             sizeof( PENDEF )
  1933. #define XPROPERTY_SIZE          sizeof( XPROPERTY )
  1934. #define LAYERDEF_SIZE           sizeof( LAYERDEF )
  1935. #define MULTILINEDEF_SIZE       sizeof( MULTILINEDEF )
  1936. #define HATCHDEF_SIZE           sizeof( HATCHDEF )
  1937. #define COLORDEF_SIZE           sizeof( COLORDEF )
  1938.  
  1939. #define UNIT_ANY_SIZE           sizeof( UNIT_ANY )
  1940. #define UNIT_OBJECT_SIZE        sizeof( UNIT_OBJECT )
  1941. #define UNIT_INSTANCE_SIZE      sizeof( UNIT_INSTANCE )
  1942. #define UNIT_BLOCK_SIZE         sizeof( UNIT_BLOCK )
  1943. #define UNIT_USER_SIZE          sizeof( UNIT_USER )
  1944.  
  1945. //------ Color definitions -----------------------------------------------------------------------------
  1946.  
  1947. #define RGB_WHITE       RGB( 255, 255, 255 )  // RGB for White        #0
  1948. #define RGB_GRAY5       RGB( 242, 242, 242 )  // RGB for Gray      5%
  1949. #define RGB_GRAY12      RGB( 224, 224, 224 )  // RGB for Gray     12,5%
  1950. #define RGB_GRAY25      RGB( 192, 192, 192 )  // RGB for Gray     25%
  1951. #define RGB_GRAY50      RGB( 128, 128, 128 )  // RGB for Gray     50%
  1952. #define RGB_GRAY62      RGB(  96,  96,  96 )  // RGB for Gray     62,5%
  1953. #define RGB_GRAY75      RGB(  64,  64,  64 )  // RGB for Gray     75%
  1954. #define RGB_BLACK       RGB(   0,   0,   0 )  // RGB for Black
  1955. #define RGB_RED100      RGB( 255,   0,   0 )  // RGB for Red     100% #8
  1956. #define RGB_RED75       RGB( 192,   0,   0 )  // RGB for Red      75%
  1957. #define RGB_RED50       RGB( 128,   0,   0 )  // RGB for Red      50%
  1958. #define RGB_RED25       RGB(  64,   0,   0 )  // RGB for Red      25%
  1959. #define RGB_YELLOW100   RGB( 255, 255,   0 )  // RGB for Yellow  100%
  1960. #define RGB_YELLOW75    RGB( 192, 192,   0 )  // RGB for Yellow   75%
  1961. #define RGB_YELLOW50    RGB( 128, 128,   0 )  // RGB for Yellow   50%
  1962. #define RGB_YELLOW25    RGB(  64,  64,   0 )  // RGB for Yellow   25%
  1963. #define RGB_GREEN100    RGB(   0, 255,   0 )  // RGB for Green   100% #16
  1964. #define RGB_GREEN75     RGB(   0, 192,   0 )  // RGB for Green    75%
  1965. #define RGB_GREEN50     RGB(   0, 128,   0 )  // RGB for Green    50%
  1966. #define RGB_GREEN25     RGB(   0,  64,   0 )  // RGB for Green    25%
  1967. #define RGB_CYAN100     RGB(   0, 255, 255 )  // RGB for Cyan    100%
  1968. #define RGB_CYAN75      RGB(   0, 192, 192 )  // RGB for Cyan     75%
  1969. #define RGB_CYAN50      RGB(   0, 128, 128 )  // RGB for Cyan     50%
  1970. #define RGB_CYAN25      RGB(   0,  64,  64 )  // RGB for Cyan     25%
  1971. #define RGB_BLUE100     RGB(   0,   0, 255 )  // RGB for Blue    100% #24
  1972. #define RGB_BLUE75      RGB(   0,   0, 192 )  // RGB for Blue     75%
  1973. #define RGB_BLUE50      RGB(   0,   0, 128 )  // RGB for Blue     50%
  1974. #define RGB_BLUE25      RGB(   0,   0,  64 )  // RGB for Blue     25%
  1975. #define RGB_MAGENTA100  RGB( 255,   0, 255 )  // RGB for Magenta 100%
  1976. #define RGB_MAGENTA75   RGB( 192,   0, 192 )  // RGB for Magenta  75%
  1977. #define RGB_MAGENTA50   RGB( 128,   0, 128 )  // RGB for Magenta  50%
  1978. #define RGB_MAGENTA25   RGB(  64,   0,  64 )  // RGB for Magenta  25% #31
  1979.  
  1980. #define RGB_BROWN       RGB( 128,  64,   0 )  // RGB for Brown   100%
  1981. #define RGB_ORANGE      RGB( 255, 128,   0 )  // RGB for Orange  100%
  1982.  
  1983. //------ Mathematical Constants ------------------------------------------------------------------------
  1984.  
  1985. #define REAL_SIN_15             0.2588190451025         // sin( 15∞ )
  1986. #define REAL_COS_15             0.9659258262891         // cos( 15∞ )
  1987. #define REAL_TAN_15             0.2679491924311         // tan( 15∞ )
  1988. #define REAL_SIN_7              0.1218693434051         // sin( 7∞ )
  1989. #define REAL_COS_7              0.9925461516413         // cos( 7∞ )
  1990. #define REAL_TAN_7              0.1227845609029         // tan( 7∞ )
  1991. #define REAL_SIN_30             0.5                     // sin( 30∞ )
  1992. #define REAL_COS_30             0.8660254037844         // cos( 30∞ )
  1993. #define REAL_TAN_30             0.5773502691896         // tan( 30∞ )
  1994. #define REAL_SIN_42             0.6626200482157         // sin( 41.5∞ )
  1995. #define REAL_COS_42             0.7489555720789         // cos( 41.5∞ )
  1996. #define REAL_TAN_42             0.8847252645559         // tan( 41.5∞ )
  1997.  
  1998. #define REAL_01PI               0.3141592653589793      // 0.1 pi
  1999. #define REAL_05PI               1.5707963267948965      // 0.5 pi
  2000. #define REAL_PI                 3.141592653589793       // 1.0 pi
  2001. #define REAL_15PI               4.7123889803846895      // 1.5 pi
  2002. #define REAL_2PI                6.283185307179586       // 2.0 pi
  2003. #define REAL_25PI               7.8539816339744825      // 2.5 pi
  2004. #define REAL_3PI                9.424777960769379       // 3.0 pi
  2005. #define REAL_35PI              10.9955742875642755      // 3.5 pi
  2006. #define REAL_4PI               12.566370614359172       // 4.0 pi
  2007.  
  2008. #define REAL_DEG_RAD            0.01745329251994        // pi / 180∞
  2009. #define REAL_GRA_RAD            0.01570796326795        // pi / 200∞
  2010. #define REAL_REL_RAD            6.283185307179586       // 2.0 * pi
  2011. #define REAL_RAD_DEG           57.29577951308           // 180∞ / pi
  2012. #define REAL_RAD_GRA           63.66197723676           // 200∞ / pi
  2013. #define REAL_RAD_REL            0.1591549430919         // 0.5 / pi
  2014.  
  2015. #define REAL_INCH_MM           25.4                     // Inch -> MM
  2016. #define REAL_MM_INCH            0.03937007874016        // MM -> Inch
  2017.  
  2018. #define REAL_ROOT_3             1.732050807569          // sqrt( 3.0 )
  2019. #define REAL_ROOT_2             1.414213562373          // sqrt( 2.0 )
  2020. #define REAL_ROOT_05            0.7071067811865         // sqrt( 0.5 )
  2021.  
  2022. //------ "Invalid" Values ------------------------------------------------------------------------------
  2023.  
  2024. #define REAL_NOVAL              (1.0e+300)              // Invalid double value
  2025. #define FLOAT_NOVAL             (1.0e+32)               // Invalid float value
  2026. #define INT_NOVAL               (-2147483647)           // Invalid int value
  2027. #define LONG_NOVAL              (-2147483647)           // Invalid long value
  2028.  
  2029. #define NOPARAM                 0                       // Unused parameter
  2030.  
  2031. //------ Value Ranges for Input and Output -------------------------------------------------------------
  2032.  
  2033. #define COORD_MIN               (-1.0e100)      // Allowed coordinate range
  2034. #define COORD_MAX               (1.0e100)
  2035.  
  2036. #define EDIT_MIN                (1.0e-10)       // Allowed input range
  2037. #define EDIT_MAX                (1.0e10)
  2038.  
  2039. //------ Basic Types -----------------------------------------------------------------------------------
  2040.  
  2041. typedef void*           OBJPTR;                 // Universal object pointer
  2042. typedef unsigned int    OFFSET;                 // Offset pointer for data block enumeration
  2043.  
  2044. typedef char            FILENAME[MAX_PATH];     // Standard file name
  2045. typedef char            DUMMYSTR[MAX_PATH+256]; // Standard message text (text + one file name)
  2046.  
  2047. typedef char            STR32   [32],           // Standard text sizes
  2048.                         STR64   [64],
  2049.                         STR256  [256],
  2050.                         STR8192 [8192];
  2051.  
  2052. typedef struct {                                // Matrix
  2053.   double        m11, m12,
  2054.                 m21, m22,
  2055.                 m31, m32;
  2056. } MATRIX;
  2057.  
  2058. typedef struct {                                // Point in internal [mm]
  2059.   double        x, y;
  2060. } DPOINT;
  2061.  
  2062. typedef struct {                                // Rectangle in internal [mm]
  2063.   double        x1, y1, x2, y2;
  2064. } DRECT;
  2065.  
  2066. typedef struct {                                // Font description
  2067.   int           Type,
  2068.                 Style,
  2069.                 Weight;
  2070.   STR64         Name;
  2071. } FONTDEF;
  2072.  
  2073. //------ File Header Elements --------------------------------------------------------------------------
  2074.  
  2075. typedef struct {
  2076.   int           PageType,
  2077.                 PageOrient;
  2078.   double        PageXSize,
  2079.                 PageYSize;
  2080. } PAGEDEF;
  2081.  
  2082. typedef struct {
  2083.   int           Pens    [TVG_DEFAULT_MAX],
  2084.                 Layers  [TVG_DEFAULT_MAX];
  2085. } DEFAULTDEF;
  2086.  
  2087. typedef struct {
  2088.   int           WindowSystem;
  2089.   BOOL          WindowGrid,
  2090.                 WindowSnap;
  2091.   double        WindowXCenter,
  2092.                 WindowYCenter,
  2093.                 WindowZoom;
  2094. } WINDOWDEF;
  2095.  
  2096. typedef struct {
  2097.   STR32         SystemName;
  2098.  
  2099.   double        SystemRotate,
  2100.                 SystemScale;
  2101.   int           SystemOption;
  2102.  
  2103.   int           SystemOrgMode;
  2104.   double        SystemXOrg,
  2105.                 SystemYOrg;
  2106.  
  2107.   int           SystemLenUnit,
  2108.                 SystemLineUnit,
  2109.                 SystemAngleUnit,
  2110.                 SystemFraction,
  2111.                 SystemAccuracy;
  2112.  
  2113.   int           SystemGridMode;
  2114.   double        SystemXGrid,
  2115.                 SystemYGrid;
  2116.  
  2117.   int           SystemSnapMode;
  2118.   double        SystemXSnap,
  2119.                 SystemYSnap;
  2120.  
  2121.   MATRIX        SystemMMToUnit,
  2122.                 SystemUnitToMM;
  2123. } SYSTEMDEF;
  2124.  
  2125. typedef struct {
  2126.   STR32         LineName;
  2127.  
  2128.   int           LineNum,
  2129.                 LineMode;
  2130.   int           LineData[TVG_LINEPART_MAX];
  2131. } LINEDEF;
  2132.  
  2133. typedef struct {
  2134.   int           FillMode;
  2135.   COLORREF      FillColor,
  2136.                 LineColor;
  2137.   int           LineType;
  2138.   double        LineWidth;
  2139.   int           LineCaps;               // New in Version 4.2!
  2140. } PROPERTY;
  2141.  
  2142. typedef struct {
  2143.   STR64         PenName;
  2144.  
  2145.   PROPERTY      PenIntern,
  2146.                 PenExtern;
  2147.  
  2148.   int           PenLayer;
  2149. } PENDEF;
  2150.  
  2151. typedef struct {
  2152.   int           Flag,
  2153.                 Pen;
  2154.  
  2155.   int           FillMode;
  2156.   COLORREF      FillColor,
  2157.                 LineColor;
  2158.   int           LineType;
  2159.   double        LineWidth;
  2160.   int           LineCaps;               // New in Version 4.2!
  2161.  
  2162.   int           Layer;
  2163. } XPROPERTY;
  2164.  
  2165. typedef struct {
  2166.   STR64         LayerName;
  2167.  
  2168.   XPROPERTY     LayerIntern,
  2169.                 LayerExtern;
  2170.  
  2171.   int           LayerMode;
  2172. } LAYERDEF;
  2173.  
  2174. typedef struct {
  2175.   double        Distance;
  2176.   XPROPERTY     XProperty;
  2177.   BOOL          Use;
  2178. } MULTILINE;
  2179.  
  2180. typedef struct {
  2181.   STR32         MultiLineName;
  2182.   MULTILINE     MultiLineData[TVG_MULTILINEPART_MAX];
  2183. } MULTILINEDEF;
  2184.  
  2185. typedef struct {
  2186.   STR64         HatchName;
  2187.  
  2188.   BOOL          HatchLine1Active;
  2189.   int           HatchLine1;
  2190.   double        HatchLine1Rotate;
  2191.  
  2192.   BOOL          HatchLine2Active;
  2193.   int           HatchLine2;
  2194.   double        HatchLine2Rotate;
  2195.  
  2196.   BOOL          HatchBlockActive;
  2197.   STR64         HatchLibraryName,
  2198.                 HatchBlockName;
  2199.   double        HatchBlockRotate,
  2200.                 HatchBlockScale,
  2201.                 HatchXStep1,
  2202.                 HatchXStep2,
  2203.                 HatchYStep1,
  2204.                 HatchYStep2,
  2205.                 HatchLineStep1,
  2206.                 HatchLineStep2;
  2207.  
  2208.   double        HatchRotate,
  2209.                 HatchOffset1,
  2210.                 HatchOffset2;
  2211. } HATCHDEF;
  2212.  
  2213. typedef struct {
  2214.   STR32         ColorName;
  2215.   COLORREF      ColorValue;
  2216. } COLORDEF;
  2217.  
  2218. typedef union {
  2219.   PROPERTY      Property;
  2220.   PAGEDEF       Page;
  2221.   DEFAULTDEF    Default;
  2222.   SYSTEMDEF     System;
  2223.   HATCHDEF      Hatch;
  2224.   MULTILINEDEF  MultiLine;
  2225.   PENDEF        Pen;
  2226.   LINEDEF       Line;
  2227.   LAYERDEF      Layer;
  2228.   COLORDEF      Color;
  2229. } UNIONDEF;
  2230.  
  2231. //------ File Handling ---------------------------------------------------------------------------------
  2232.  
  2233. typedef struct {
  2234.   STR64         Title,
  2235.                 Theme,
  2236.                 Author1,
  2237.                 Date1,
  2238.                 Author2,
  2239.                 Date2;
  2240.   STR256        Comment;
  2241. } FILE_HEADER;
  2242.  
  2243. typedef struct {
  2244.   char          Newline[4],
  2245.                 Comma,
  2246.                 Semi,
  2247.                 Color,
  2248.                 Escape,
  2249.                 String,
  2250.                 Keyword,
  2251.                 Comment;
  2252. } TOKEN_DATA;
  2253.  
  2254. //------ Data Block Elements ---------------------------------------------------------------------------
  2255.  
  2256. typedef struct {
  2257.   int           ArrowStartForm,
  2258.                 ArrowStartMode,
  2259.                 ArrowEndForm,
  2260.                 ArrowEndMode;
  2261. } DIMLINE;
  2262.  
  2263. typedef struct {
  2264.   FONTDEF       TextFont;
  2265.   XPROPERTY     TextXProperty;
  2266.   double        TextSize1,
  2267.                 TextSize2;
  2268.  
  2269.   double        CharDistance,           // New in Version 4.2!
  2270.                 TabDistance;            // New in Version 4.2!
  2271.   int           TextMode;               // New in Version 4.2!
  2272.  
  2273.   int           NumAccuracy;
  2274.   BOOL          NumRefresh,
  2275.                 NumRotate;
  2276.   int           System;
  2277. } DIMSMALL;
  2278.  
  2279. typedef struct {
  2280.   FONTDEF       TextFont;
  2281.   XPROPERTY     TextXProperty;
  2282.   double        TextSize1,
  2283.                 TextSize2;
  2284.  
  2285.   double        CharDistance,           // New in Version 4.2!
  2286.                 TabDistance;            // New in Version 4.2!
  2287.   int           TextMode;               // New in Version 4.2!
  2288.  
  2289.   int           NumAccuracy;
  2290.   BOOL          NumRefresh,
  2291.                 NumCentered;
  2292.   int           NumTight;               // New in Version 4.2!
  2293.   BOOL          NumRotate;
  2294.  
  2295.   int           ArrowStartForm,
  2296.                 ArrowStartMode,
  2297.                 ArrowEndForm,
  2298.                 ArrowEndMode;
  2299.  
  2300.   BOOL          ExtStartDisplay,
  2301.                 ExtEndDisplay,
  2302.                 LineDisplay;
  2303.   int           LineOrientation,
  2304.                 LineType,
  2305.                 LineDistMode;
  2306.   double        LineDistance,
  2307.                 LineOffset;             // New in Version 4.2!
  2308.   int           System;
  2309. } DIMLARGE;
  2310.  
  2311. typedef struct {
  2312.   FONTDEF       TextFont;
  2313.   XPROPERTY     TextXProperty;
  2314.   MATRIX        TextMatrix;
  2315.  
  2316.   double        CharDistance,
  2317.                 TabDistance,
  2318.                 LineDistance;
  2319.   int           TextMode;
  2320. } TEXTSTANDARD;
  2321.  
  2322. typedef struct {
  2323.   FONTDEF       TextFont;
  2324.   XPROPERTY     TextXProperty;
  2325.   double        TextSize;
  2326.  
  2327.   double        CharDistance,
  2328.                 TabDistance,
  2329.                 LineDistance;
  2330.   int           TextMode;
  2331. } TEXTFRAME;
  2332.  
  2333. typedef struct {
  2334.   int           ArrowForm,
  2335.                 ArrowMode,
  2336.                 FrameForm;
  2337.   double        FrameOffset;
  2338. } TEXTREFERENCE;
  2339.  
  2340. typedef struct {
  2341.   XPROPERTY     XProperty;
  2342.   STR64         LibraryName,
  2343.                 BlockName;
  2344.   MATRIX        DisplayMatrix;
  2345.   int           IgnoreBlock;
  2346.  
  2347.   int           LibraryNum,
  2348.                 BlockNum;
  2349.   BOOL          NotFound;
  2350. } CLIPSURFACE;
  2351.  
  2352. typedef struct {
  2353.   STR256        BitmapName;
  2354.   MATRIX        DisplayMatrix;
  2355. } BITMAPREF;
  2356.  
  2357. //------ Generic Data Blocks ---------------------------------------------------------------------------
  2358.  
  2359. typedef struct {
  2360.   int           Size;
  2361.   short         Ident,
  2362.                 Flag;
  2363.  
  2364.   short         BlockOwner,
  2365.                 BlockType,
  2366.  
  2367.                 ElemType,
  2368.                 ElemCount;
  2369. } BLOCK_HEADER;
  2370.  
  2371. typedef struct {
  2372.   BLOCK_HEADER  Header;         // ElemType = 0..9, ElemCount = ???
  2373. } BLOCK_ANY;
  2374.  
  2375. typedef struct {
  2376.   BLOCK_HEADER  Header;         // ElemType = 1, ElemCount = Number of LONGs ( >0 )
  2377.   long          Data[];
  2378. } BLOCK_LONG;
  2379.  
  2380. typedef struct {
  2381.   BLOCK_HEADER  Header;         // ElemType = 2, ElemCount = Number of DOUBLEs ( >0 )
  2382.   double        Data[];
  2383. } BLOCK_DOUBLE;
  2384.  
  2385. typedef struct {
  2386.   BLOCK_HEADER  Header;         // ElemType = 3, ElemCount = Number of DPOINTs ( >0 )
  2387.   DPOINT        Data[];
  2388. } BLOCK_POINT;
  2389.  
  2390. typedef struct {
  2391.   BLOCK_HEADER  Header;         // ElemType = 4, ElemCount = Number of COLORREFs ( >0 )
  2392.   COLORREF      Data[];
  2393. } BLOCK_COLORREF;
  2394.  
  2395. typedef struct {
  2396.   BLOCK_HEADER  Header;         // ElemType = 5, ElemCount = Number of PROPERTYs ( >0 )
  2397.   PROPERTY      Data[];
  2398. } BLOCK_PROPERTY;
  2399.  
  2400. typedef struct {
  2401.   BLOCK_HEADER  Header;         // ElemType = 6, ElemCount = Number of XPROPERTYs ( >0 )
  2402.   XPROPERTY     Data[];
  2403. } BLOCK_XPROPERTY;
  2404.  
  2405. typedef struct {
  2406.   BLOCK_HEADER  Header;         // ElemType = 7, ElemCount = Number of FONTDEFs ( >0 )
  2407.   FONTDEF       Data[];
  2408. } BLOCK_FONTDEF;
  2409.  
  2410. typedef struct {
  2411.   BLOCK_HEADER  Header;         // ElemType = 8, ElemCount = Text length ( <0 static, >0 dynamic )
  2412.   char          Text[];
  2413. } BLOCK_TEXT;
  2414.  
  2415. typedef struct {
  2416.   BLOCK_HEADER  Header;         // ElemType = 9, ElemCount = Data length ( >0 )
  2417.   BYTE          Data[];
  2418. } BLOCK_BINARY;
  2419.  
  2420. typedef BLOCK_ANY       *BLOCK_PTR;
  2421. typedef BLOCK_LONG      *BLOCK_LONG_PTR;
  2422. typedef BLOCK_DOUBLE    *BLOCK_DOUBLE_PTR;
  2423. typedef BLOCK_POINT     *BLOCK_POINT_PTR;
  2424. typedef BLOCK_COLORREF  *BLOCK_COLORREF_PTR;
  2425. typedef BLOCK_PROPERTY  *BLOCK_PROPERTY_PTR;
  2426. typedef BLOCK_XPROPERTY *BLOCK_XPROPERTY_PTR;
  2427. typedef BLOCK_FONTDEF   *BLOCK_FONTDEF_PTR;
  2428. typedef BLOCK_TEXT      *BLOCK_TEXT_PTR;
  2429. typedef BLOCK_BINARY    *BLOCK_BINARY_PTR;
  2430.  
  2431. //------ Native Data Blocks ----------------------------------------------------------------------------
  2432.  
  2433. typedef struct {
  2434.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = Attribute length ( <0 static, >0 dynamic )
  2435.   STR32         Name;
  2436.   char          Text[];
  2437. } BLOCK_ATTRIBUTE;
  2438.  
  2439. typedef struct {
  2440.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2441.   DIMLINE       Data;
  2442. } BLOCK_DIMLINE;
  2443.  
  2444. typedef struct {
  2445.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2446.   DIMSMALL      Data;
  2447. } BLOCK_DIMSMALL;
  2448.  
  2449. typedef struct {
  2450.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2451.   DIMLARGE      Data;
  2452. } BLOCK_DIMLARGE;
  2453.  
  2454. typedef struct {
  2455.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2456.   TEXTSTANDARD  Data;
  2457. } BLOCK_TEXTSTANDARD;
  2458.  
  2459. typedef struct {
  2460.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2461.   TEXTFRAME     Data;
  2462. } BLOCK_TEXTFRAME;
  2463.  
  2464. typedef struct {
  2465.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2466.   TEXTREFERENCE Data;
  2467. } BLOCK_TEXTREFERENCE;
  2468.  
  2469. typedef struct {
  2470.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2471.   CLIPSURFACE   Data;
  2472. } BLOCK_CLIPSURFACE;
  2473.  
  2474. typedef struct {
  2475.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2476.   BITMAPREF     Data;
  2477. } BLOCK_BITMAPREF;
  2478.  
  2479. typedef BLOCK_ATTRIBUTE         *BLOCK_ATTRIBUTE_PTR;
  2480. typedef BLOCK_DIMLINE           *BLOCK_DIMLINE_PTR;
  2481. typedef BLOCK_DIMSMALL          *BLOCK_DIMSMALL_PTR;
  2482. typedef BLOCK_DIMLARGE          *BLOCK_DIMLARGE_PTR;
  2483. typedef BLOCK_TEXTSTANDARD      *BLOCK_TEXTSTANDARD_PTR;
  2484. typedef BLOCK_TEXTFRAME         *BLOCK_TEXTFRAME_PTR;
  2485. typedef BLOCK_TEXTREFERENCE     *BLOCK_TEXTREFERENCE_PTR;
  2486. typedef BLOCK_CLIPSURFACE       *BLOCK_CLIPSURFACE_PTR;
  2487. typedef BLOCK_BITMAPREF         *BLOCK_BITMAPREF_PTR;
  2488.  
  2489. //------ Internal Data Blocks --------------------------------------------------------------------------
  2490.  
  2491. typedef struct {
  2492.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2493.   double        ArcAngle;
  2494. } BLOCK_T001;
  2495.  
  2496. typedef struct {
  2497.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2498.   double        StartAngle,
  2499.                 ArcAngle;
  2500. } BLOCK_T002;
  2501.  
  2502. typedef struct {
  2503.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2504.   double        ArrowStartAngle,
  2505.                 ArrowEndAngle;
  2506. } BLOCK_T003;
  2507.  
  2508. typedef struct {
  2509.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2510.   double        ArcAngle,
  2511.                 StartAngle,
  2512.                 EndAngle,
  2513.                 ArrowStartAngle,
  2514.                 ArrowEndAngle;
  2515. } BLOCK_T004;
  2516.  
  2517. typedef struct {
  2518.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2519.   int           ArrowStartForm,
  2520.                 ArrowEndForm;
  2521.   double        ArrowStartAngle,
  2522.                 ArrowEndAngle,
  2523.                 NumberAngle;
  2524.   BOOL          ExtStartDisplay,
  2525.                 ExtEndDisplay,
  2526.                 LineDisplay;
  2527.   double        x1, y1,         // Position of arrow 1 / start-point of dimension
  2528.                 x2, y2,         // Position of arrow 2 / end-point of dimension
  2529.                 x3, y3,         // End-point of extension line 1 (x1,y1)
  2530.                 x4, y4,         // End-point of extension line 2 (x2,y2)
  2531.                 x7, y7;         // Insertion point of number
  2532.   double        n1, n2;         // Gap for the dimension text in interval [0,1] of dimension line length
  2533. } BLOCK_T005;
  2534.  
  2535. typedef struct {
  2536.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2537.   int           ArrowStartForm,
  2538.                 ArrowEndForm;
  2539.   double        ArcAngle,
  2540.                 StartAngle,
  2541.                 EndAngle,
  2542.                 ArrowStartAngle,
  2543.                 ArrowEndAngle,
  2544.                 NumberAngle;
  2545.   BOOL          ExtStartDisplay,
  2546.                 ExtEndDisplay,
  2547.                 LineDisplay;
  2548.   double        x1, y1,         // Position of arrow 1 / start-point of dimension
  2549.                 x2, y2,         // Position of arrow 2 / end-point of dimension
  2550.                 x3, y3,         // End-point of extension line 1 (x1,y1)
  2551.                 x4, y4,         // End-point of extension line 2 (x2,y2)
  2552.                 x5, y5,         // Center-point of dimension line arc
  2553.                 x6, y6,         // Radius-point of dimension line arc
  2554.                 x7, y7;         // Insertion point of number
  2555.   double        n1, n2;         // Gap for the dimension text in interval [0,1] of dimension line length
  2556. } BLOCK_T006;
  2557.  
  2558. typedef struct {
  2559.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2560.   double        NumberAngle;
  2561.   double        x7, y7;         // Insertion point of number
  2562. } BLOCK_T007;
  2563.  
  2564. typedef struct {
  2565.   BLOCK_HEADER  Header;         // ElemType = 0, ElemCount = 0
  2566.   int           ArrowForm,
  2567.                 ArrowMode;
  2568.   double        ArrowAngle;
  2569.   int           FrameForm;
  2570.   double        FrameOffset;
  2571.   double        x1, y1,         // Corner-point 1 / Center-point
  2572.                 x2, y2,         // Corner-point 2 / Radius-point / Vector 1
  2573.                 x3, y3,         // Corner-point 3                / Vector 2
  2574.                 x4, y4,         // Corner-point 4
  2575.                 x5, y5,         // Start-point of reference line
  2576.                 x6, y6,         // Bending-point of reference line
  2577.                 x7, y7;         // Insertion point of number
  2578. } BLOCK_T008;
  2579.  
  2580. typedef BLOCK_T001      *BLOCK_T001_PTR;
  2581. typedef BLOCK_T002      *BLOCK_T002_PTR;
  2582. typedef BLOCK_T003      *BLOCK_T003_PTR;
  2583. typedef BLOCK_T004      *BLOCK_T004_PTR;
  2584. typedef BLOCK_T005      *BLOCK_T005_PTR;
  2585. typedef BLOCK_T006      *BLOCK_T006_PTR;
  2586. typedef BLOCK_T007      *BLOCK_T007_PTR;
  2587. typedef BLOCK_T008      *BLOCK_T008_PTR;
  2588.  
  2589. //------ Unit headers ----------------------------------------------------------------------------------
  2590.  
  2591. typedef struct {
  2592.   long          Units,          // Internal Data - do not modify!
  2593.                 Bytes;          // Internal Data - do not modify!
  2594.   OBJPTR        Prev,           // Internal Data - do not modify!
  2595.                 Next;           // Internal Data - do not modify!
  2596. } UNIT_MEMORY;
  2597.  
  2598. typedef struct {
  2599.   DRECT         Rect;           // Internal Data - do not modify!
  2600.  
  2601.   int           Ident,          // Internal Data - do not modify!
  2602.                 Flag,           // Internal Data - do not modify!
  2603.  
  2604.                 Undo1,          // Internal Data - do not modify!
  2605.                 Undo2;          // Internal Data - do not modify!
  2606.  
  2607.   int           UnitOwner,
  2608.                 UnitType;
  2609. } UNIT_HEADER;
  2610.  
  2611. typedef struct {
  2612.   UNIT_MEMORY   Memory;
  2613.   UNIT_HEADER   Header;         // UnitType = ?
  2614.  
  2615.   char          Data[];
  2616. } UNIT_ANY;
  2617.  
  2618. typedef struct {
  2619.   UNIT_MEMORY   Memory;
  2620.   UNIT_HEADER   Header;         // UnitType = 0
  2621.  
  2622.   XPROPERTY     XProperty;
  2623.   int           ObjectType;
  2624.  
  2625.   int           FontNum;        // Internal Data - do not modify!
  2626.  
  2627.   char          Data[];
  2628. } UNIT_OBJECT;
  2629.  
  2630. typedef struct {
  2631.   UNIT_MEMORY   Memory;
  2632.   UNIT_HEADER   Header;         // UnitType = 1
  2633.  
  2634.   XPROPERTY     XProperty;
  2635.   STR64         LibraryName,
  2636.                 BlockName;
  2637.   MATRIX        DisplayMatrix;
  2638.  
  2639.   int           LibraryNum,     // Internal Data - do not modify!
  2640.                 BlockNum;       // Internal Data - do not modify!
  2641.   BOOL          NotFound;       // Internal Data - do not modify!
  2642.  
  2643.   char          Data[];
  2644. } UNIT_INSTANCE;
  2645.  
  2646. typedef struct {
  2647.   UNIT_MEMORY   Memory;
  2648.   UNIT_HEADER   Header;         // UnitType = 2
  2649.  
  2650.   XPROPERTY     XProperty;
  2651.   STR64         BlockName;
  2652.   DRECT         BlockRect;
  2653.  
  2654.   OBJPTR        BlockFirst,     // Internal Data - do not modify!
  2655.                 BlockLast;      // Internal Data - do not modify!
  2656.  
  2657.   char          Data[];
  2658. } UNIT_BLOCK;
  2659.  
  2660. typedef struct {
  2661.   UNIT_MEMORY   Memory;
  2662.   UNIT_HEADER   Header;         // UnitType = 9
  2663.  
  2664.   XPROPERTY     XProperty;
  2665.   STR64         LibraryName,
  2666.                 BlockName;
  2667.   MATRIX        DisplayMatrix;
  2668.  
  2669.   int           LibraryNum,     // Internal Data - do not modify!
  2670.                 BlockNum;       // Internal Data - do not modify!
  2671.   BOOL          NotFound;       // Internal Data - do not modify!
  2672.  
  2673.   int           UserType;
  2674.  
  2675.   char          Data[];
  2676. } UNIT_USER;
  2677.  
  2678. typedef UNIT_ANY        *UNIT_PTR;
  2679. typedef UNIT_OBJECT     *UNIT_OBJECT_PTR;
  2680. typedef UNIT_INSTANCE   *UNIT_INSTANCE_PTR;
  2681. typedef UNIT_BLOCK      *UNIT_BLOCK_PTR;
  2682. typedef UNIT_USER       *UNIT_USER_PTR;
  2683.  
  2684. //------ Definitions for Unit Enumeration --------------------------------------------------------------
  2685.  
  2686. typedef struct {
  2687.   DPOINT        p1,
  2688.                 p2,
  2689.                 p3,
  2690.                 p4,
  2691.                 p5;
  2692.  
  2693.   int           Pen,
  2694.                 Layer;
  2695.  
  2696.   double        Len,
  2697.                 Start,
  2698.                 Bogen;
  2699.  
  2700.   DRECT         Rect;
  2701.  
  2702.   int           Type,
  2703.                 Flag,
  2704.                 Count;
  2705.  
  2706.   BOOL          Orient,
  2707.                 Valid;
  2708. } GEO_OBJECT;
  2709.  
  2710. typedef struct {
  2711.   int                   EnumData,
  2712.                         EnumCount,
  2713.  
  2714.                         EnumFlag1,
  2715.                         EnumFlag2,
  2716.                         EnumMode;
  2717.  
  2718.   BOOL                  EnumStopped;
  2719.  
  2720.   XPROPERTY             XProperty;
  2721.  
  2722.   FONTDEF               Font;
  2723.   double                CharDistance,
  2724.                         TabDistance,
  2725.                         LineDistance;
  2726.   int                   TextMode;
  2727.  
  2728.   DPOINT*               PointPtr;
  2729.   int*                  TypePtr;
  2730.   MATRIX*               MatrixPtr;
  2731.   LPSTR                 TextPtr,
  2732.                         NamePtr;
  2733.  
  2734.   UNIT_OBJECT_PTR       ObjPtr;
  2735.   UNIT_INSTANCE_PTR     InstPtr;
  2736.   UNIT_BLOCK_PTR        BlockPtr;
  2737.   UNIT_USER_PTR         UserPtr;
  2738. } ENUMDEF_DATA;
  2739.  
  2740. typedef struct {                // New in Version 4.2!
  2741.   LPVOID        BufferPtr;
  2742.   DRECT         ElemRect;
  2743.   int           ElemMax,
  2744.                 ElemCount,
  2745.                 PolygonCount;
  2746.   BOOL          ClosedOnly;
  2747. } BUFFER_DATA;
  2748.  
  2749. typedef BOOL (*TOSOENUMOBJECT_PROC)( const ENUMDEF_DATA* EnumData );
  2750.  
  2751. typedef BOOL (*TOSOENUMATTRIB_PROC)( int AttribType, const LPSTR AttribName, const LPSTR AttribValue );
  2752.  
  2753. typedef BOOL (*TOSOENUMIDENT_PROC) ( UNIT_PTR UnitPtr );
  2754.  
  2755. typedef BOOL (*TOSOENUMPOINTS_PROC) ( UNIT_PTR UnitPtr, BLOCK_PTR BlockPtr );
  2756.  
  2757. // New in Version 4.2!
  2758. typedef BOOL (*TOSOHATCHOPENPATH_PROC) ( const XPROPERTY* XProperty );
  2759.  
  2760. // New in Version 4.2!
  2761. typedef BOOL (*TOSOHATCHADDOBJECT_PROC) ( const GEO_OBJECT* GeoObject, int ScanLineID );
  2762.  
  2763. // New in Version 4.2!
  2764. typedef BOOL (*TOSOHATCHCLOSEPATH_PROC) ( void );
  2765.  
  2766. //------ Definitions for Hooks -------------------------------------------------------------------------
  2767.  
  2768. typedef void (*TOSOHOOKPOSITION_PROC)( int WindowNum, DPOINT* Position );
  2769.  
  2770. typedef void (*TOSOHOOKMOUSE_PROC)( int WindowNum, UINT Message, UINT Buttons, int XPos, int YPos );
  2771.  
  2772. typedef void (*TOSOHOOKKEY_PROC)( int WindowNum, UINT Message, int Key, long Data );
  2773.  
  2774. //------ Definitions for Module-To-Server Communication ------------------------------------------------
  2775.  
  2776. typedef int (*TOSOMODULECOMMAND_PROC)( int CommandID, int ExecMode );
  2777.  
  2778. typedef int (*TOSOMODULEMODIFY_PROC)( UNIT_USER_PTR UserObj, int ModifyMode, void* Data );
  2779.  
  2780. // New in Version 4.2!
  2781. typedef int (*TOSOMODULEIMPORT_PROC)( const LPSTR FileName, BOOL Merge );
  2782.  
  2783. // New in Version 4.2!
  2784. typedef BOOL (*TOSOMODULEEXPORT_PROC)( const LPSTR FileName, int Flag );
  2785.  
  2786. typedef int (*TOSOINPUTPOINTINIT_PROC)( int CommandID, int PointIndex, double XPos, double YPos );
  2787.  
  2788. typedef BOOL (*TOSOINPUTPOINTMOVE_PROC)( int CommandID, int PointIndex, double XPos, double YPos );
  2789.  
  2790. typedef int (*TOSOINPUTPOINTEXIT_PROC)( int CommandID, int PointIndex, double XPos, double YPos );
  2791.  
  2792. typedef void (*TOSOINPUTDISPLAY_PROC)( int CommandID, int PointIndex, HDC hDrawDC, BOOL DrawFixed, BOOL DrawVariable );
  2793.  
  2794. typedef BOOL (*TOSOINPUTPARAMETER_PROC)( int CommandID );
  2795.  
  2796. typedef int (*TOSOINPUTCANCEL_PROC)( int CommandID, int PointCount );
  2797.  
  2798. typedef void (*TOSOINPUTFINISH_PROC)( int CommandID, int PointCount );
  2799.  
  2800. typedef struct {                                // Menu entry and its description
  2801.   LPSTR                 Description,
  2802.                         MenuEntry;
  2803. } MENU_DATA;
  2804.  
  2805. typedef struct {                                // Input Information for indirect command
  2806.   int                   CommandMode,
  2807.                         PointNumber,
  2808.                         PointTypes   [TVG_INPUT_DEF_MAX],
  2809.                         PointRelative[TVG_INPUT_DEF_MAX];
  2810.   LPSTR                 PointNames   [TVG_INPUT_DEF_MAX];
  2811. } COMMAND_DATA;
  2812.  
  2813. typedef struct {                                // Icon definition for a command
  2814.   int                   Type;
  2815.   MENU_DATA             MenuData;
  2816.   COMMAND_DATA          InputData;
  2817.   HBITMAP               IconHandle;
  2818.   int                   IconXOffset,
  2819.                         IconYOffset,
  2820.                         IconMode;
  2821. } MODULE_COMMAND_DATA;
  2822.  
  2823. typedef struct {                                // Module-internal callback procedures
  2824.   TOSOINPUTPOINTINIT_PROC       InputPointInitProc;
  2825.   TOSOINPUTPOINTMOVE_PROC       InputPointMoveProc;
  2826.   TOSOINPUTPOINTEXIT_PROC       InputPointExitProc;
  2827.   TOSOINPUTDISPLAY_PROC         InputDisplayProc;
  2828.   TOSOINPUTPARAMETER_PROC       InputParameterProc;
  2829.   TOSOINPUTCANCEL_PROC          InputCancelProc;
  2830.   TOSOINPUTFINISH_PROC          InputFinishProc;
  2831. } MODULE_PROC;
  2832.  
  2833. typedef struct {                                // Module identification structure
  2834.   short                 OwnerID,
  2835.                         ModuleID;
  2836.   int                   ModuleCTRL;
  2837.   MODULE_PROC           ModuleProc;
  2838.   MODULE_COMMAND_DATA   ModuleData;
  2839.   MODULE_COMMAND_DATA*  CommandData;
  2840.   LPSTR                 VendorData,             // New in Version 4.2!
  2841.                         FileType,               // New in Version 4.2!
  2842.                         FileExtension,          // New in Version 4.2!
  2843.                         FileDefault;            // New in Version 4.2!
  2844. } MODULE_ID;
  2845.  
  2846. typedef int (*TOSOMODULEINIT_PROC)( const LPSTR SerialNumber, HINSTANCE hMainInst, HWND hMainWnd,
  2847.                                                               int InterfaceVersion, MODULE_ID* ModuleID );
  2848.  
  2849. typedef BOOL (*TOSOMODULEEXIT_PROC)( void );
  2850.  
  2851. typedef struct {                                // Module data
  2852.   MODULE_ID                     ID;
  2853.   HINSTANCE                     Handle;
  2854.   TOSOMODULEINIT_PROC           ProcInit;       // New in Version 4.2!
  2855.   TOSOMODULEEXIT_PROC           ProcExit;       // New in Version 4.2!
  2856.   TOSOMODULECOMMAND_PROC        ProcCommand;
  2857.   TOSOMODULEMODIFY_PROC         ProcModify;
  2858.   TOSOMODULEIMPORT_PROC         ProcImport;     // New in Version 4.2!
  2859.   TOSOMODULEEXPORT_PROC         ProcExport;     // New in Version 4.2!
  2860. } MODULE_DATA;
  2861.  
  2862. //------ Toso Interface Prototypes ---------------------------------------------------------------------
  2863.  
  2864. #ifndef TOSO_SERVER                             // Only visible outside the serving application!
  2865.  
  2866. DLL_IMPORT BOOL TosoCreationStart( void );
  2867.  
  2868. DLL_IMPORT void TosoCreationEnd( void );
  2869.  
  2870. //------------------------------------------------------------------------------------------------------
  2871.  
  2872. DLL_IMPORT UNIT_OBJECT_PTR TosoObjectOpen( int Type );
  2873.  
  2874. DLL_IMPORT UNIT_OBJECT_PTR TosoObjectGetAddress( void );
  2875.  
  2876. DLL_IMPORT BOOL TosoObjectAddPoint( int Type, double x, double y );
  2877.  
  2878. DLL_IMPORT BOOL TosoObjectAddConstant( double Value );
  2879.  
  2880. DLL_IMPORT BOOL TosoObjectAddOrient( double Orient );
  2881.  
  2882. DLL_IMPORT BOOL TosoObjectAddCurve( double Orient, double Curve );
  2883.  
  2884. DLL_IMPORT BOOL TosoObjectAddTextShort( const LPSTR Text, BOOL StaticLength );
  2885.  
  2886. DLL_IMPORT BOOL TosoObjectAddTextLong( const LPSTR Text, BOOL StaticLength );
  2887.  
  2888. DLL_IMPORT XPROPERTY* TosoObjectAddDimLine( const DIMLINE* Data );
  2889.  
  2890. DLL_IMPORT XPROPERTY* TosoObjectAddDimSmall( const DIMSMALL* Data, BOOL UseGlobal );
  2891.  
  2892. DLL_IMPORT XPROPERTY* TosoObjectAddDimLarge( const DIMLARGE* Data, BOOL UseGlobal );
  2893.  
  2894. DLL_IMPORT XPROPERTY* TosoObjectAddTextStandard( const TEXTSTANDARD* Data );
  2895.  
  2896. DLL_IMPORT XPROPERTY* TosoObjectAddTextFrame( const TEXTFRAME* Data );
  2897.  
  2898. DLL_IMPORT BOOL TosoObjectAddTextReference( const TEXTREFERENCE* Data );
  2899.  
  2900. DLL_IMPORT XPROPERTY* TosoObjectAddClipSurface( const CLIPSURFACE* Data );
  2901.  
  2902. DLL_IMPORT BOOL TosoObjectAddBitmapRef( const BITMAPREF* Data );
  2903.  
  2904. DLL_IMPORT BOOL TosoObjectAddEnd( void );
  2905.  
  2906. DLL_IMPORT BOOL TosoObjectCopyDataBlocks( const UNIT_OBJECT_PTR RefObj );
  2907.  
  2908. DLL_IMPORT UNIT_OBJECT_PTR TosoObjectInsert( int DrawingNum, const UNIT_PTR RefObj );
  2909.  
  2910. DLL_IMPORT void TosoObjectClose( void );
  2911.  
  2912. DLL_IMPORT BOOL TosoObjectFastInsert( void );
  2913.  
  2914. DLL_IMPORT UNIT_USER_PTR TosoUserOpen( short OwnerID, int Type );
  2915.  
  2916. DLL_IMPORT UNIT_USER_PTR TosoUserGetAddress( void );
  2917.  
  2918. DLL_IMPORT BOOL TosoUserAddDataBlock( int Type, int ElemType, int ElemCount, const LPVOID Data, int Bytes );
  2919.  
  2920. DLL_IMPORT BOOL TosoUserAddEnd( void );
  2921.  
  2922. DLL_IMPORT UNIT_USER_PTR TosoUserInsert( int DrawingNum, const UNIT_PTR RefObj );
  2923.  
  2924. DLL_IMPORT void TosoUserClose( void );
  2925.  
  2926. DLL_IMPORT BOOL TosoUserFastInsert( void );
  2927.  
  2928. DLL_IMPORT UNIT_INSTANCE_PTR TosoInstanceOpen( void );
  2929.  
  2930. DLL_IMPORT UNIT_INSTANCE_PTR TosoInstanceGetAddress( void );
  2931.  
  2932. DLL_IMPORT BOOL TosoInstanceAddAttribute( int Type, const LPSTR Name, const LPSTR Text );
  2933.  
  2934. DLL_IMPORT BOOL TosoInstanceAddEnd( void );
  2935.  
  2936. DLL_IMPORT UNIT_INSTANCE_PTR TosoInstanceInsert( int DrawingNum, const UNIT_PTR RefObj );
  2937.  
  2938. DLL_IMPORT void TosoInstanceClose( void );
  2939.  
  2940. DLL_IMPORT BOOL TosoInstanceFastInsert( void );
  2941.  
  2942. DLL_IMPORT UNIT_BLOCK_PTR TosoBlockOpen( void );
  2943.  
  2944. DLL_IMPORT UNIT_BLOCK_PTR TosoBlockGetAddress( void );
  2945.  
  2946. DLL_IMPORT BOOL TosoBlockAddAttribute( int Type, const LPSTR Name, const LPSTR Text );
  2947.  
  2948. DLL_IMPORT BOOL TosoBlockAddEnd( void );
  2949.  
  2950. DLL_IMPORT UNIT_BLOCK_PTR TosoBlockInsert( int DrawingNum, const LPSTR LibraryName );
  2951.  
  2952. DLL_IMPORT void TosoBlockClose( void );
  2953.  
  2954. DLL_IMPORT XPROPERTY* TosoBlockFastInsert( BOOL CreateInstance, const MATRIX* Matrix );
  2955.  
  2956. DLL_IMPORT UNIT_BLOCK_PTR TosoGroupOpen( void );
  2957.  
  2958. DLL_IMPORT UNIT_BLOCK_PTR TosoGroupGetAddress( void );
  2959.  
  2960. DLL_IMPORT BOOL TosoGroupAddEnd( void );
  2961.  
  2962. DLL_IMPORT UNIT_BLOCK_PTR TosoGroupInsert( int DrawingNum );
  2963.  
  2964. DLL_IMPORT void TosoGroupClose( void );
  2965.  
  2966. DLL_IMPORT XPROPERTY* TosoGroupFastInsert( BOOL CreateInstance, const MATRIX* Matrix );
  2967.  
  2968. // New in Version 4.2!
  2969. DLL_IMPORT BOOL TosoGroupApplyToUser( UNIT_USER_PTR UserPtr );
  2970.  
  2971. //------------------------------------------------------------------------------------------------------
  2972.  
  2973. // New in Version 4.2!
  2974. DLL_IMPORT int TosoBitmapGetNumber( int DrawingNum );
  2975.  
  2976. // New in Version 4.2!
  2977. DLL_IMPORT BOOL TosoBitmapGetName( int DrawingNum, int BitmapIndex, LPSTR BitmapName );
  2978.  
  2979. // New in Version 4.2!
  2980. DLL_IMPORT BOOL TosoBitmapReadFromFile( int DrawingNum, const LPSTR FileName, LPSTR BitmapName );
  2981.  
  2982. // New in Version 4.2!
  2983. DLL_IMPORT BOOL TosoBitmapWriteToFile( int DrawingNum, int BitmapIndex, const LPSTR FileName );
  2984.  
  2985. // New in Version 4.2!
  2986. DLL_IMPORT BOOL TosoBitmapDelete( int DrawingNum, int BitmapIndex );
  2987.  
  2988. //------------------------------------------------------------------------------------------------------
  2989.  
  2990. DLL_IMPORT BOOL TosoPageGetDef( int DrawingNum, PAGEDEF* Data );
  2991.  
  2992. DLL_IMPORT BOOL TosoPageSetDef( int DrawingNum, const PAGEDEF* Data );
  2993.  
  2994. DLL_IMPORT BOOL TosoHatchGetCurrentDef( HATCHDEF* Data );
  2995.  
  2996. DLL_IMPORT BOOL TosoHatchGetOrigin( int DrawingNum, DPOINT* Data );
  2997.  
  2998. DLL_IMPORT BOOL TosoHatchGetDef( int DrawingNum, int Index, HATCHDEF* Data );
  2999.  
  3000. DLL_IMPORT BOOL TosoHatchSetDef( int DrawingNum, int Index, const HATCHDEF* Data );
  3001.  
  3002. DLL_IMPORT int TosoHatchGetActive( int DrawingNum );
  3003.  
  3004. DLL_IMPORT BOOL TosoHatchSetActive( int DrawingNum, int Index );
  3005.  
  3006. DLL_IMPORT BOOL TosoMultiLineGetDef( int DrawingNum, int Index, MULTILINEDEF* Data );
  3007.  
  3008. DLL_IMPORT BOOL TosoMultiLineSetDef( int DrawingNum, int Index, const MULTILINEDEF* Data );
  3009.  
  3010. DLL_IMPORT BOOL TosoSystemGetCurrentDef( SYSTEMDEF* Data );
  3011.  
  3012. DLL_IMPORT BOOL TosoSystemGetDef( int DrawingNum, int Index, SYSTEMDEF* Data );
  3013.  
  3014. DLL_IMPORT BOOL TosoSystemSetDef( int DrawingNum, int Index, const SYSTEMDEF* Data );
  3015.  
  3016. DLL_IMPORT int TosoSystemGetActive( int DrawingNum, int WindowNum );
  3017.  
  3018. DLL_IMPORT BOOL TosoSystemSetActive( int DrawingNum, int WindowNum, int Index );
  3019.  
  3020. DLL_IMPORT BOOL TosoPenGetCurrentDef( PENDEF* Data );
  3021.  
  3022. DLL_IMPORT BOOL TosoPenGetDef( int DrawingNum, int Index, PENDEF* Data );
  3023.  
  3024. DLL_IMPORT BOOL TosoPenSetDef( int DrawingNum, int Index, const PENDEF* Data );
  3025.  
  3026. DLL_IMPORT int TosoPenGetActive( int DrawingNum );
  3027.  
  3028. DLL_IMPORT BOOL TosoPenSetActive( int DrawingNum, int Index );
  3029.  
  3030. DLL_IMPORT BOOL TosoLineGetDef( int DrawingNum, int Index, LINEDEF* Data );
  3031.  
  3032. DLL_IMPORT BOOL TosoLineSetDef( int DrawingNum, int Index, const LINEDEF* Data );
  3033.  
  3034. DLL_IMPORT BOOL TosoLayerGetCurrentDef( LAYERDEF* Data );
  3035.  
  3036. DLL_IMPORT BOOL TosoLayerGetDef( int DrawingNum, int Index, LAYERDEF* Data );
  3037.  
  3038. DLL_IMPORT BOOL TosoLayerSetDef( int DrawingNum, int Index, const LAYERDEF* Data );
  3039.  
  3040. DLL_IMPORT int TosoLayerGetActive( int DrawingNum );
  3041.  
  3042. DLL_IMPORT BOOL TosoLayerSetActive( int DrawingNum, int Index );
  3043.  
  3044. //------------------------------------------------------------------------------------------------------
  3045.  
  3046. DLL_IMPORT int TosoImportGetNumber( void );
  3047.  
  3048. DLL_IMPORT BOOL TosoImportGetData( int Index, MODULE_DATA* ModuleData );
  3049.  
  3050. DLL_IMPORT int TosoExportGetNumber( void );
  3051.  
  3052. DLL_IMPORT BOOL TosoExportGetData( int Index, MODULE_DATA* ModuleData );
  3053.  
  3054. DLL_IMPORT int TosoModuleGetNumber( void );
  3055.  
  3056. DLL_IMPORT BOOL TosoModuleGetData( int Index, MODULE_DATA* ModuleData );
  3057.  
  3058. DLL_IMPORT BOOL TosoCommandAvailable( int CommandID );
  3059.  
  3060. DLL_IMPORT void TosoCommandInternal( int CommandID );
  3061.  
  3062. DLL_IMPORT void TosoUndoInitProcess( void );
  3063.  
  3064. DLL_IMPORT void TosoUndoCancelProcess( void );
  3065.  
  3066. DLL_IMPORT void TosoUndoFinishProcess( void );
  3067.  
  3068. DLL_IMPORT void TosoUndoUpdateLinks( void );
  3069.  
  3070. DLL_IMPORT void TosoUndoSetPrevious( void );
  3071.  
  3072. DLL_IMPORT BOOL TosoHookPositionStart( TOSOHOOKPOSITION_PROC CallBack );
  3073.  
  3074. DLL_IMPORT void TosoHookPositionEnd( TOSOHOOKPOSITION_PROC CallBack );
  3075.  
  3076. DLL_IMPORT BOOL TosoHookMouseStart( TOSOHOOKMOUSE_PROC CallBack );
  3077.  
  3078. DLL_IMPORT void TosoHookMouseEnd( TOSOHOOKMOUSE_PROC CallBack );
  3079.  
  3080. DLL_IMPORT BOOL TosoHookKeyStart( TOSOHOOKKEY_PROC CallBack );
  3081.  
  3082. DLL_IMPORT void TosoHookKeyEnd( TOSOHOOKKEY_PROC CallBack );
  3083.  
  3084. //------------------------------------------------------------------------------------------------------
  3085.  
  3086. DLL_IMPORT BOOL TosoProfileReadKeyOpen( const LPSTR KeyName, BOOL Common );
  3087.  
  3088. DLL_IMPORT BOOL TosoProfileReadInt( const LPSTR ValueName, int* Value );
  3089.  
  3090. DLL_IMPORT BOOL TosoProfileReadString( const LPSTR ValueName, LPSTR Value );
  3091.  
  3092. DLL_IMPORT BOOL TosoProfileReadData( const LPSTR ValueName, LPBYTE Value, int Size );
  3093.  
  3094. DLL_IMPORT void TosoProfileReadKeyClose( void );
  3095.  
  3096. DLL_IMPORT BOOL TosoProfileWriteKeyOpen( const LPSTR KeyName, BOOL Common );
  3097.  
  3098. DLL_IMPORT BOOL TosoProfileWriteInt( const LPSTR ValueName, int Value );
  3099.  
  3100. DLL_IMPORT BOOL TosoProfileWriteString( const LPSTR ValueName, const LPSTR Value );
  3101.  
  3102. DLL_IMPORT BOOL TosoProfileWriteData( const LPSTR ValueName, const LPBYTE Value, int Size );
  3103.  
  3104. DLL_IMPORT void TosoProfileWriteKeyClose( void );
  3105.  
  3106. DLL_IMPORT BOOL TosoProfileDeleteKey( const LPSTR KeyName, BOOL Common );
  3107.  
  3108. // New in Version 4.2!
  3109. DLL_IMPORT int TosoProfileGetDrawing( int DrawingNum, short OwnerID, int ProfileID, LPVOID ProfileData, int Size );
  3110.  
  3111. // New in Version 4.2!
  3112. DLL_IMPORT BOOL TosoProfileSetDrawing( int DrawingNum, short OwnerID, int ProfileID, const LPVOID ProfileData, int Size );
  3113.  
  3114. //------------------------------------------------------------------------------------------------------
  3115.  
  3116. DLL_IMPORT int TosoSettingGet( int Mode );
  3117.  
  3118. DLL_IMPORT void TosoSettingSet( int Mode, int Value );
  3119.  
  3120. DLL_IMPORT BOOL TosoDrawingNewFile( int DrawingNum, BOOL Prompt );
  3121.  
  3122. DLL_IMPORT BOOL TosoDrawingOpenFile( int DrawingNum, const LPSTR FileName, LONG OpenFlags, BOOL Prompt );
  3123.  
  3124. DLL_IMPORT BOOL TosoDrawingSaveFile( int DrawingNum, const LPSTR FileName, LONG SaveFlags, BOOL Prompt );
  3125.  
  3126. DLL_IMPORT int TosoDrawingGetActive( void );
  3127.  
  3128. DLL_IMPORT BOOL TosoDrawingSetActive( int DrawingNum );
  3129.  
  3130. DLL_IMPORT int TosoDrawingGetNumber( void );
  3131.  
  3132. DLL_IMPORT BOOL TosoDrawingGetInfo( int DrawingNum, LPSTR FileName, FILE_HEADER* FileHeader );
  3133.  
  3134. DLL_IMPORT int TosoLibraryGetNumber( void );
  3135.  
  3136. DLL_IMPORT BOOL TosoLibraryGetInfo( int LibraryNum, LPSTR FileName, FILE_HEADER* FileHeader );
  3137.  
  3138. DLL_IMPORT int TosoWindowGetMode( int DrawingNum );
  3139.  
  3140. DLL_IMPORT BOOL TosoWindowSetMode( int DrawingNum, int Mode );
  3141.  
  3142. DLL_IMPORT int TosoWindowGetActive( int DrawingNum );
  3143.  
  3144. DLL_IMPORT BOOL TosoWindowSetActive( int DrawingNum, int WindowNum );
  3145.  
  3146. DLL_IMPORT BOOL TosoWindowGetRect( int DrawingNum, int WindowNum, RECT* Rect, POINT* Offset );
  3147.  
  3148. DLL_IMPORT BOOL TosoWindowGetMatrix( int DrawingNum, int WindowNum, MATRIX* MatrixMMToPixel, MATRIX* MatrixPixelToMM );
  3149.  
  3150. DLL_IMPORT BOOL TosoWindowGetView( int DrawingNum, int WindowNum, DPOINT* Center, double* Zoom );
  3151.  
  3152. DLL_IMPORT BOOL TosoWindowSetViewAll( int DrawingNum, int WindowNum );
  3153.  
  3154. DLL_IMPORT BOOL TosoWindowSetViewPage( int DrawingNum, int WindowNum );
  3155.  
  3156. DLL_IMPORT BOOL TosoWindowSetViewScale( int DrawingNum, int WindowNum, const DPOINT* Center, double Zoom );
  3157.  
  3158. DLL_IMPORT BOOL TosoWindowSetViewArea( int DrawingNum, int WindowNum, const DPOINT* Point1, const DPOINT* Point2 );
  3159.  
  3160. DLL_IMPORT void TosoDrawWindowAll( void );
  3161.  
  3162. DLL_IMPORT void TosoDrawWindowArea( const DRECT* Data );
  3163.  
  3164. DLL_IMPORT void TosoDrawWindowSelection( BOOL ClearFlag );
  3165.  
  3166. DLL_IMPORT void TosoDrawNewObjects( void );
  3167.  
  3168. DLL_IMPORT void TosoDrawBlock( HWND hWindow, int DrawingNum, const LPSTR BlockName, const LPSTR LibraryName );
  3169.  
  3170. DLL_IMPORT void TosoDrawLineDef( HWND hWindow, LINEDEF* LineDef );
  3171.  
  3172. //------------------------------------------------------------------------------------------------------
  3173.  
  3174. DLL_IMPORT void TosoInitProperty( PROPERTY* Data );
  3175.  
  3176. DLL_IMPORT void TosoInitXProperty( XPROPERTY* Data );
  3177.  
  3178. DLL_IMPORT void TosoInitFontDef( FONTDEF* Data );
  3179.  
  3180. DLL_IMPORT void TosoInitDimLine( DIMLINE* Data );
  3181.  
  3182. DLL_IMPORT void TosoInitDimSmall( DIMSMALL* Data, BOOL UseGlobal );
  3183.  
  3184. DLL_IMPORT void TosoInitDimLarge( DIMLARGE* Data, BOOL UseGlobal );
  3185.  
  3186. DLL_IMPORT void TosoInitTextStandard( TEXTSTANDARD* Data1, TEXTREFERENCE* Data2 );
  3187.  
  3188. DLL_IMPORT void TosoInitTextFrame( TEXTFRAME* Data );
  3189.  
  3190. //------------------------------------------------------------------------------------------------------
  3191.  
  3192. DLL_IMPORT UINT TosoDialogHelpMessage( void );
  3193.  
  3194. DLL_IMPORT BOOL TosoDialogEnterIdle( HWND hWindow, WPARAM wParam, LPARAM lParam );
  3195.  
  3196. DLL_IMPORT BOOL TosoDialogPopupRegister( HWND hWindow );
  3197.  
  3198. DLL_IMPORT BOOL TosoDialogPopupUnregister( HWND hWindow );
  3199.  
  3200. DLL_IMPORT void TosoDialogPopupActivate( HWND hWindow, WPARAM wParam, LPARAM lParam );
  3201.  
  3202. DLL_IMPORT void TosoDialogPopupMove( HWND hWindow );
  3203.  
  3204. DLL_IMPORT void TosoDialogPopupSetCursor( HWND hWindow, WPARAM wParam, LPARAM lParam );
  3205.  
  3206. DLL_IMPORT void TosoDialogComboboxAdjust( HWND hWindow, int CtlID );
  3207.  
  3208. DLL_IMPORT void TosoDialogCustomButtonColor( const LPDRAWITEMSTRUCT DrawItem, COLORREF Color, BOOL Active );
  3209.  
  3210. DLL_IMPORT void TosoDialogCustomButtonText( const LPDRAWITEMSTRUCT DrawItem, const LPSTR Text, BOOL Active );
  3211.  
  3212. DLL_IMPORT void TosoDialogCustomButtonIcon( const LPDRAWITEMSTRUCT DrawItem, HICON hIcon, BOOL Active );
  3213.  
  3214. DLL_IMPORT void TosoDialogCustomListboxColor( const LPDRAWITEMSTRUCT DrawItem, COLORREF Color, const LPSTR Text );
  3215.  
  3216. DLL_IMPORT void TosoDialogCenter( HWND hWindow );
  3217.  
  3218. DLL_IMPORT BOOL TosoDialogSelection( HWND hWindow, const LPSTR Caption );
  3219.  
  3220. DLL_IMPORT BOOL TosoDialogColor( HWND hWindow, const LPSTR Caption, COLORREF* Data );
  3221.  
  3222. DLL_IMPORT BOOL TosoDialogProperty( HWND hWindow, const LPSTR Caption, PROPERTY* Data );
  3223.  
  3224. DLL_IMPORT BOOL TosoDialogXProperty( HWND hWindow, const LPSTR Caption, XPROPERTY* Data );
  3225.  
  3226. DLL_IMPORT BOOL TosoDialogFontDef( HWND hWindow, const LPSTR Caption, FONTDEF* Data );
  3227.  
  3228. DLL_IMPORT BOOL TosoDialogDimLine( HWND hWindow, const LPSTR Caption, DIMLINE* Data, int UseFlag );
  3229.  
  3230. DLL_IMPORT BOOL TosoDialogDimSmall( HWND hWindow, const LPSTR Caption, DIMSMALL* Data, BOOL UseGlobal, int UseFlag );
  3231.  
  3232. DLL_IMPORT BOOL TosoDialogDimLarge( HWND hWindow, const LPSTR Caption, DIMLARGE* Data, BOOL UseGlobal, int UseFlag );
  3233.  
  3234. DLL_IMPORT BOOL TosoDialogTextStandard( HWND hWindow, const LPSTR Caption,
  3235.                                         TEXTSTANDARD* Data1, TEXTREFERENCE* Data2, LPSTR EditText );
  3236.  
  3237. DLL_IMPORT BOOL TosoDialogTextFrame( HWND hWindow, const LPSTR Caption, TEXTFRAME* Data, LPSTR EditText );
  3238.  
  3239. DLL_IMPORT BOOL TosoDialogBlock( HWND hWindow, const LPSTR Caption,
  3240.                                  LPSTR BlockName, LPSTR LibraryName, BOOL LibChangePossible );
  3241.  
  3242. DLL_IMPORT void TosoDialogSelectLine( HWND hWindow, const RECT* ButtonRect,
  3243.                                       int Current, int BasicID, int ExtraID, int EditID );
  3244.  
  3245. DLL_IMPORT void TosoDialogSelectMultiLine( HWND hWindow, const RECT* ButtonRect,
  3246.                                            int Current, int BasicID, int ExtraID, int EditID );
  3247.  
  3248. DLL_IMPORT void TosoDialogSelectSystem( HWND hWindow, const RECT* ButtonRect,
  3249.                                         int Current, int BasicID, int ExtraID, int EditID );
  3250.  
  3251. DLL_IMPORT void TosoDialogSelectHatch( HWND hWindow, const RECT* ButtonRect,
  3252.                                        int Current, int BasicID, int ExtraID, int EditID );
  3253.  
  3254. DLL_IMPORT void TosoDialogSelectLayer( HWND hWindow, const RECT* ButtonRect,
  3255.                                       int Current, int BasicID, int ExtraID, int EditID );
  3256.  
  3257. DLL_IMPORT void TosoDialogSelectPen( HWND hWindow, const RECT* ButtonRect,
  3258.                                      int Current, int BasicID, int ExtraID, int EditID );
  3259.  
  3260. DLL_IMPORT void TosoDialogUpdateGuide( int GuideMode, LPSTR GuideText );
  3261.  
  3262. DLL_IMPORT BOOL TosoDialogShowProgress( const LPSTR Title, const LPSTR Text, BOOL HasPercentBar );
  3263.  
  3264. DLL_IMPORT void TosoDialogUpdateProgress( const LPSTR Text1, const LPSTR Text2, long Done, long Total );
  3265.  
  3266. DLL_IMPORT void TosoDialogHideProgress( void );
  3267.  
  3268. DLL_IMPORT BOOL TosoDialogIsCanceled( void );
  3269.  
  3270. //------------------------------------------------------------------------------------------------------
  3271.  
  3272. DLL_IMPORT BOOL TosoConvertIntString( LPSTR Text, int Value );
  3273.  
  3274. DLL_IMPORT BOOL TosoConvertDoubleString( LPSTR Text, double Value );
  3275.  
  3276. DLL_IMPORT BOOL TosoConvertDoubleStringEx( LPSTR Text, double Value, int TotalLen, int FractionLen );
  3277.  
  3278. DLL_IMPORT BOOL TosoConvertLengthString( LPSTR Text, double Value, LPSTR Unit );
  3279.  
  3280. DLL_IMPORT BOOL TosoConvertWidthString( LPSTR Text, double Value, LPSTR Unit );
  3281.  
  3282. DLL_IMPORT BOOL TosoConvertAngleString( LPSTR Text, double Value, LPSTR Unit );
  3283.  
  3284. DLL_IMPORT BOOL TosoConvertStringInt( int* Value, const LPSTR Text );
  3285.  
  3286. DLL_IMPORT BOOL TosoConvertStringDouble( double* Value, const LPSTR Text, HWND hParentWindow );
  3287.  
  3288. DLL_IMPORT BOOL TosoConvertStringDoubleEx( double* Value, const LPSTR Text, HWND hParentWindow,
  3289.                                            double LenMMPerUnit, double AngleRadPerUnit );
  3290.  
  3291. DLL_IMPORT BOOL TosoConvertStringLength( double* Value, const LPSTR Text, HWND hParentWindow );
  3292.  
  3293. DLL_IMPORT BOOL TosoConvertStringWidth( double* Value, const LPSTR Text, HWND hParentWindow );
  3294.  
  3295. DLL_IMPORT BOOL TosoConvertStringAngle( double* Value, const LPSTR Text, HWND hParentWindow );
  3296.  
  3297. //------------------------------------------------------------------------------------------------------
  3298.  
  3299. // New in Version 4.2!
  3300. DLL_IMPORT BOOL TosoGetBuildDate( const LPSTR Date, LPSTR Text );
  3301.  
  3302. // New in Version 4.2!
  3303. DLL_IMPORT BOOL TosoGetUnitTitle( LPSTR Text, const UNIT_PTR UnitPtr );
  3304.  
  3305. DLL_IMPORT BOOL TosoGetCommandTitle( LPSTR Text, int CommandID );
  3306.  
  3307. DLL_IMPORT HBITMAP TosoGetCommandIcon( int CommandID );
  3308.  
  3309. DLL_IMPORT HICON TosoGetStandardIcon( const LPSTR IconID );
  3310.  
  3311. //------------------------------------------------------------------------------------------------------
  3312.  
  3313. DLL_IMPORT BOOL TosoMatrixSeparate( const MATRIX* Matrix, double* ScaleX,   double* ScaleY,
  3314.                                                           double* Rotation, double* Distortion,
  3315.                                                           double* MoveX,    double* MoveY );
  3316.  
  3317. DLL_IMPORT BOOL TosoMatrixAssemble( MATRIX* Matrix, double ScaleX,   double ScaleY,
  3318.                                                     double Rotation, double Distortion,
  3319.                                                     double MoveX,    double MoveY );
  3320.  
  3321. DLL_IMPORT BOOL TosoMatrixInvert( const MATRIX* Matrix, MATRIX* InvertMatrix );
  3322.  
  3323. DLL_IMPORT void TosoMatrixInit( MATRIX* Matrix );
  3324.  
  3325. DLL_IMPORT void TosoMatrixRotate( MATRIX* Matrix, double Angle );
  3326.  
  3327. DLL_IMPORT void TosoMatrixMove( MATRIX* Matrix, double OffsetX, double OffsetY );
  3328.  
  3329. DLL_IMPORT void TosoMatrixScale( MATRIX* Matrix, double FactorX, double FactorY );
  3330.  
  3331. DLL_IMPORT void TosoMatrixSheer( MATRIX* Matrix, double FactorX, double FactorY );
  3332.  
  3333. DLL_IMPORT void TosoMatrixMultiply( MATRIX* Matrix, const MATRIX* Factor );
  3334.  
  3335. //------------------------------------------------------------------------------------------------------
  3336.  
  3337. DLL_IMPORT BOOL TosoCalcTextFrame( const TEXTSTANDARD* Data, const LPSTR Text, DRECT* Frame );
  3338.  
  3339. DLL_IMPORT BOOL TosoCalcBlockFrame( int DrawingNum, const LPSTR BlockName, const LPSTR LibraryName,
  3340.                                     const MATRIX* Matrix, DRECT* Frame, BOOL AutoLoad );
  3341.  
  3342. DLL_IMPORT BOOL TosoCalcCurvature( double x1, double y1,
  3343.                                    double x2, double y2, double x3, double y3, double* Result );
  3344.  
  3345. //------------------------------------------------------------------------------------------------------
  3346.  
  3347. DLL_IMPORT BOOL TosoGeoDistance( const GEO_OBJECT* GeoObj, double x, double y, double* Result );
  3348.  
  3349. DLL_IMPORT int TosoGeoIntersection( const GEO_OBJECT* GeoObj1, const GEO_OBJECT* GeoObj2, DPOINT* Result );
  3350.  
  3351. DLL_IMPORT int TosoGeoPerpendicular( const GEO_OBJECT* GeoObj, double x, double y, DPOINT* Result );
  3352.  
  3353. DLL_IMPORT int TosoGeoTangent( const GEO_OBJECT* GeoObj1, const GEO_OBJECT* GeoObj2, DPOINT* Result );
  3354.  
  3355. DLL_IMPORT int TosoGeoRadiusFit( const GEO_OBJECT* GeoObj1,
  3356.                                  const GEO_OBJECT* GeoObj2, double Radius, int ObjType, GEO_OBJECT* Result );
  3357.  
  3358. DLL_IMPORT int TosoGeoIncircle( const DPOINT* Point1, const DPOINT* Point2,
  3359.                                 const DPOINT* Point3, DPOINT* Result );
  3360.  
  3361. DLL_IMPORT int TosoGeoCircumcircle( const DPOINT* Point1, const DPOINT* Point2,
  3362.                                     const DPOINT* Point3, DPOINT* Result );
  3363.  
  3364. // New in Version 4.2!
  3365. DLL_IMPORT BOOL TosoGeoEquidistant( const UNIT_OBJECT_PTR ObjPtr1, UNIT_OBJECT_PTR ObjPtr2,
  3366.                                     double Distance, BOOL Rounded, const DPOINT* ReferencePoint );
  3367.  
  3368. // New in Version 4.2!
  3369. DLL_IMPORT BOOL TosoGeoPointInsideArea( const BUFFER_DATA* Data, double x, double y );
  3370.  
  3371. //------------------------------------------------------------------------------------------------------
  3372.  
  3373. DLL_IMPORT BOOL TosoEnumerateAll( int DrawingNum, int EnumFlag1, int EnumFlag2,
  3374.                                   int EnumMode, TOSOENUMOBJECT_PROC CallBack );
  3375.  
  3376. DLL_IMPORT BOOL TosoEnumerateLibrary( int DrawingNum, const LPSTR LibraryName,
  3377.                                       int EnumMode, TOSOENUMOBJECT_PROC CallBack );
  3378.  
  3379. DLL_IMPORT BOOL TosoEnumerateUnit( int DrawingNum, const UNIT_PTR UnitPtr,
  3380.                                    int EnumMode, TOSOENUMOBJECT_PROC CallBack );
  3381.  
  3382. DLL_IMPORT BOOL TosoEnumerateBlock( int DrawingNum, const LPSTR BlockName, const LPSTR LibraryName,
  3383.                                     int EnumMode, TOSOENUMOBJECT_PROC CallBack );
  3384.  
  3385. DLL_IMPORT BOOL TosoEnumerateChar( int DrawingNum, const FONTDEF* Font, int CharIndex, const MATRIX* Matrix,
  3386.                                    int EnumMode, TOSOENUMOBJECT_PROC CallBack );
  3387.  
  3388. DLL_IMPORT int TosoEnumerateInstanceAttrib( int DrawingNum, const UNIT_INSTANCE_PTR InstObj,
  3389.                                             TOSOENUMATTRIB_PROC CallBack );
  3390.  
  3391. DLL_IMPORT int TosoEnumerateBlockAttrib( int DrawingNum, const LPSTR BlockName, const LPSTR LibraryName,
  3392.                                          TOSOENUMATTRIB_PROC CallBack );
  3393.  
  3394. DLL_IMPORT BOOL TosoEnumerateIdent( int DrawingNum, TOSOENUMIDENT_PROC CallBack, BOOL Reversed );
  3395.  
  3396. DLL_IMPORT BOOL TosoEnumeratePoints( int DrawingNum, TOSOENUMPOINTS_PROC CallBack );
  3397.  
  3398. // New in Version 4.2!
  3399. DLL_IMPORT BOOL TosoEnumerateHatchLine( const BUFFER_DATA* Data, const MULTILINEDEF* MultiLine,
  3400.                                         double HatchTotalRotate, double HatchOffset1, double HatchOffset2,
  3401.                                         const DPOINT* HatchOrigin,
  3402.                                         TOSOHATCHOPENPATH_PROC  OpenPathCallBack,
  3403.                                         TOSOHATCHADDOBJECT_PROC AddObjectCallBack,
  3404.                                         TOSOHATCHCLOSEPATH_PROC ClosePathCallBack );
  3405.  
  3406. // New in Version 4.2!
  3407. DLL_IMPORT BOOL TosoEnumerateHatchBlock( const BUFFER_DATA* Data, const HATCHDEF* HatchDef,
  3408.                                          const DPOINT* HatchOrigin,
  3409.                                          TOSOHATCHOPENPATH_PROC  OpenPathCallBack,
  3410.                                          TOSOHATCHADDOBJECT_PROC AddObjectCallBack,
  3411.                                          TOSOHATCHCLOSEPATH_PROC ClosePathCallBack );
  3412.  
  3413. //------------------------------------------------------------------------------------------------------
  3414.  
  3415. // New in Version 4.2!
  3416. DLL_IMPORT BOOL TosoBufferAlloc( BUFFER_DATA* Data, int Size, BOOL ClosedOnly );
  3417.  
  3418. // New in Version 4.2!
  3419. DLL_IMPORT BOOL TosoBufferAddEnumerate( BUFFER_DATA* Data, int Flag );
  3420.  
  3421. // New in Version 4.2!
  3422. DLL_IMPORT BOOL TosoBufferAddUnit( BUFFER_DATA* Data, const UNIT_PTR UnitPtr );
  3423.  
  3424. // New in Version 4.2!
  3425. DLL_IMPORT BOOL TosoBufferPrepare( BUFFER_DATA* Data, double Tolerance );
  3426.  
  3427. // New in Version 4.2!
  3428. DLL_IMPORT BOOL TosoBufferFree( BUFFER_DATA* Data );
  3429.  
  3430. // New in Version 4.2!
  3431. DLL_IMPORT UNIT_PTR TosoUnitBuffer( void );
  3432.  
  3433. //------------------------------------------------------------------------------------------------------
  3434.  
  3435. DLL_IMPORT void TosoInputDrawPoint( HDC hDrawDC, double x, double y );
  3436.  
  3437. DLL_IMPORT void TosoInputDrawLine( HDC hDrawDC, double x1, double y1, double x2, double y2 );
  3438.  
  3439. DLL_IMPORT void TosoInputDrawEndless( HDC hDrawDC, double x1, double y1, double x2, double y2 );
  3440.  
  3441. DLL_IMPORT void TosoInputDrawBezier( HDC hDrawDC, double x1, double y1, double x2, double y2,
  3442.                                                   double x3, double y3, double x4, double y4 );
  3443.  
  3444. DLL_IMPORT void TosoInputDrawFrame( HDC hDrawDC, double x1, double y1, double x2, double y2,
  3445.                                                  double x3, double y3, double x4, double y4 );
  3446.  
  3447. DLL_IMPORT void TosoInputDrawCircle( HDC hDrawDC, double x1, double y1, double x2, double y2 );
  3448.  
  3449. DLL_IMPORT void TosoInputDrawCircleArc( HDC hDrawDC, double x1, double y1, double x2, double y2,
  3450.                                                      double x3, double y3, double x4, double y4, BOOL Positive );
  3451.  
  3452. DLL_IMPORT void TosoInputDrawEllipse( HDC hDrawDC, double x1, double y1,
  3453.                                                    double x2, double y2, double x3, double y3 );
  3454.  
  3455. DLL_IMPORT void TosoInputDrawEllipseArc( HDC hDrawDC, double x1, double y1,
  3456.                                                       double x2, double y2, double x3, double y3,
  3457.                                                       double x4, double y4, double x5, double y5, BOOL Positive );
  3458.  
  3459. DLL_IMPORT void TosoInputDrawReference( HDC hDrawDC, const GEO_OBJECT* GeoObject );
  3460.  
  3461. DLL_IMPORT int TosoInputGetIdentData( int DrawingNum, int PointIndex, GEO_OBJECT* GeoObject );
  3462.  
  3463. DLL_IMPORT int TosoInputGetIdentObject( int DrawingNum, int PointIndex, GEO_OBJECT* GeoObject );
  3464.  
  3465. DLL_IMPORT UNIT_PTR TosoInputGetIdentAddress( int DrawingNum, int PointIndex );
  3466.  
  3467. DLL_IMPORT int TosoInputGetGeneratedSurface( int DrawingNum, int PointIndex, int PointCount,
  3468.                                              UNIT_PTR ResultObj, int Bytes );
  3469.  
  3470. //------------------------------------------------------------------------------------------------------
  3471.  
  3472. DLL_IMPORT long TosoEditIdentCount( int DrawingNum, DRECT* Frame );
  3473.  
  3474. DLL_IMPORT BOOL TosoEditIdentMatrix( int DrawingNum, const MATRIX* Matrix, BOOL Duplicate );
  3475.  
  3476. DLL_IMPORT BOOL TosoEditIdentEnumModify( int DrawingNum, TOSOENUMOBJECT_PROC CallBack, BOOL Duplicate );
  3477.  
  3478. DLL_IMPORT void TosoEditDelete( int DrawingNum, UNIT_PTR UnitPtr );
  3479.  
  3480. // New in Version 4.2!
  3481. DLL_IMPORT UNIT_PTR TosoEditLinkBefore( int DrawingNum, UNIT_PTR UnitPtr, UNIT_PTR RefPtr, BOOL Duplicate );
  3482.  
  3483. // New in Version 4.2!
  3484. DLL_IMPORT UNIT_PTR TosoEditLinkBehind( int DrawingNum, UNIT_PTR UnitPtr, UNIT_PTR RefPtr, BOOL Duplicate );
  3485.  
  3486. // New in Version 4.2!
  3487. DLL_IMPORT BOOL TosoEditBlockDelete( int DrawingNum, const LPSTR BlockName, const LPSTR LibraryName, BOOL OnlyIfUnused );
  3488.  
  3489. DLL_IMPORT long TosoEditPointsCount( int DrawingNum, DRECT* Frame );
  3490.  
  3491. DLL_IMPORT BOOL TosoEditPointsMatrix( int DrawingNum, const MATRIX* Matrix, BOOL Duplicate );
  3492.  
  3493. // New in Version 4.2!
  3494. DLL_IMPORT void TosoEditUnitPointsMatrix( UNIT_PTR UnitPtr, const MATRIX* Matrix );
  3495.  
  3496. //------------------------------------------------------------------------------------------------------
  3497.  
  3498. // New in Version 4.2!
  3499. DLL_IMPORT BOOL TosoTransformCurveSurface( const UNIT_OBJECT_PTR ObjPtr1, UNIT_OBJECT_PTR ObjPtr2 );
  3500.  
  3501. // New in Version 4.2!
  3502. DLL_IMPORT BOOL TosoTransformDistortable( const UNIT_OBJECT_PTR ObjPtr1, UNIT_OBJECT_PTR ObjPtr2 );
  3503.  
  3504. // New in Version 4.2!
  3505. DLL_IMPORT BOOL TosoTransformInvert( const UNIT_OBJECT_PTR ObjPtr1, UNIT_OBJECT_PTR ObjPtr2 );
  3506.  
  3507. // New in Version 4.2!
  3508. DLL_IMPORT BOOL TosoTransformObjectType( const UNIT_OBJECT_PTR ObjPtr1, UNIT_OBJECT_PTR ObjPtr2, int ObjType );
  3509.  
  3510. //------------------------------------------------------------------------------------------------------
  3511.  
  3512. DLL_IMPORT BOOL TosoFileSetExtension( const LPSTR OldName, LPSTR NewName, const LPSTR Extension );
  3513.  
  3514. DLL_IMPORT BOOL TosoFileGetExtension( const LPSTR FullName, LPSTR Extension );
  3515.  
  3516. DLL_IMPORT BOOL TosoFileShortName( const LPSTR FullName, LPSTR ShortName );
  3517.  
  3518. DLL_IMPORT BOOL TosoFileSplitName( const LPSTR FullName, LPSTR Path, LPSTR Name );
  3519.  
  3520. DLL_IMPORT BOOL TosoFileFullPath( const LPSTR OldName, LPSTR NewName );
  3521.  
  3522. DLL_IMPORT BOOL TosoFileApplicationPath( const LPSTR OldName, LPSTR NewName );
  3523.  
  3524. //------------------------------------------------------------------------------------------------------
  3525.  
  3526. DLL_IMPORT BOOL TosoFileExist( const LPSTR FileName );
  3527.  
  3528. DLL_IMPORT BOOL TosoFileDelete( const LPSTR FileName );
  3529.  
  3530. DLL_IMPORT BOOL TosoFileOpen( HANDLE* FileHandle, const LPSTR FileName );
  3531.  
  3532. DLL_IMPORT BOOL TosoFileCreate( HANDLE* FileHandle, const LPSTR FileName );
  3533.  
  3534. DLL_IMPORT long TosoFileSize( HANDLE FileHandle );
  3535.  
  3536. DLL_IMPORT long TosoFileRead( HANDLE FileHandle, LPVOID Data, long Size );
  3537.  
  3538. DLL_IMPORT long TosoFileWrite( HANDLE FileHandle, const LPVOID Data, long Size );
  3539.  
  3540. DLL_IMPORT BOOL TosoFileSetPointer( HANDLE FileHandle, long Offset, DWORD Mode );
  3541.  
  3542. DLL_IMPORT BOOL TosoFileClose( HANDLE FileHandle );
  3543.  
  3544. DLL_IMPORT BOOL TosoFileCopy( const LPSTR SourceName, const LPSTR DestinName );
  3545.  
  3546. //------------------------------------------------------------------------------------------------------
  3547.  
  3548. DLL_IMPORT BOOL TosoFileWriteInitNull( void );
  3549.  
  3550. DLL_IMPORT BOOL TosoFileWriteInitDisk( HANDLE FileHandle );
  3551.  
  3552. DLL_IMPORT BOOL TosoFileWriteInitMemory( HGLOBAL hMemory, long MemorySize );
  3553.  
  3554. DLL_IMPORT BOOL TosoFileWriteData( const LPVOID Data, int Size );
  3555.  
  3556. DLL_IMPORT BOOL TosoFileWriteTextData( const LPSTR Data );
  3557.  
  3558. DLL_IMPORT BOOL TosoFileWriteFlush( void );
  3559.  
  3560. DLL_IMPORT void TosoFileWriteExit( void );
  3561.  
  3562. //------------------------------------------------------------------------------------------------------
  3563.  
  3564. DLL_IMPORT void TosoFileWriteNewline( void );
  3565.  
  3566. DLL_IMPORT void TosoFileWriteComma( void );
  3567.  
  3568. DLL_IMPORT void TosoFileWriteSemi( void );
  3569.  
  3570. DLL_IMPORT void TosoFileWriteComment( const LPSTR Value );
  3571.  
  3572. DLL_IMPORT void TosoFileWriteKeyword( int KeyNum );
  3573.  
  3574. //------------------------------------------------------------------------------------------------------
  3575.  
  3576. DLL_IMPORT void TosoFileWriteString( const LPSTR Value );
  3577. DLL_IMPORT void TosoFileWriteCommaString( const LPSTR Value );
  3578.  
  3579. DLL_IMPORT void TosoFileWriteBinary( const LPVOID Value, int Size );
  3580. DLL_IMPORT void TosoFileWriteCommaBinary( const LPVOID Value, int Size );
  3581.  
  3582. DLL_IMPORT void TosoFileWriteBool( BOOL Value );
  3583. DLL_IMPORT void TosoFileWriteCommaBool( BOOL Value );
  3584.  
  3585. DLL_IMPORT void TosoFileWriteShort( short Value );
  3586. DLL_IMPORT void TosoFileWriteCommaShort( short Value );
  3587.  
  3588. DLL_IMPORT void TosoFileWriteInt( int Value );
  3589. DLL_IMPORT void TosoFileWriteCommaInt( int Value );
  3590.  
  3591. DLL_IMPORT void TosoFileWriteDouble( double Value );
  3592. DLL_IMPORT void TosoFileWriteCommaDouble( double Value );
  3593.  
  3594. DLL_IMPORT void TosoFileWriteColorref( COLORREF Color );
  3595. DLL_IMPORT void TosoFileWriteCommaColorref( COLORREF Color );
  3596.  
  3597. DLL_IMPORT void TosoFileWriteFontdef( const FONTDEF* Font );
  3598. DLL_IMPORT void TosoFileWriteCommaFontdef( const FONTDEF* Font );
  3599.  
  3600. DLL_IMPORT void TosoFileWriteXProperty( const XPROPERTY* XProperty );
  3601. DLL_IMPORT void TosoFileWriteCommaXProperty( const XPROPERTY* XProperty );
  3602.  
  3603. DLL_IMPORT void TosoFileWriteProperty( const PROPERTY* Property );
  3604. DLL_IMPORT void TosoFileWriteCommaProperty( const PROPERTY* Property );
  3605.  
  3606. DLL_IMPORT void TosoFileWriteDimLine( const DIMLINE* DimLine );
  3607. DLL_IMPORT void TosoFileWriteCommaDimLine( const DIMLINE* DimLine );
  3608.  
  3609. DLL_IMPORT void TosoFileWriteDimSmall( const DIMSMALL* DimSmall );
  3610. DLL_IMPORT void TosoFileWriteCommaDimSmall( const DIMSMALL* DimSmall );
  3611.  
  3612. DLL_IMPORT void TosoFileWriteDimLarge( const DIMLARGE* DimLarge );
  3613. DLL_IMPORT void TosoFileWriteCommaDimLarge( const DIMLARGE* DimLarge );
  3614.  
  3615. DLL_IMPORT void TosoFileWriteTextStandard( const TEXTSTANDARD* TextStandard );
  3616. DLL_IMPORT void TosoFileWriteCommaTextStandard( const TEXTSTANDARD* TextStandard );
  3617.  
  3618. DLL_IMPORT void TosoFileWriteTextFrame( const TEXTFRAME* TextFrame );
  3619. DLL_IMPORT void TosoFileWriteCommaTextFrame( const TEXTFRAME* TextFrame );
  3620.  
  3621. DLL_IMPORT void TosoFileWriteTextReference( const TEXTREFERENCE* TextReference );
  3622. DLL_IMPORT void TosoFileWriteCommaTextReference( const TEXTREFERENCE* TextReference );
  3623.  
  3624. DLL_IMPORT void TosoFileWriteClipSurface( const CLIPSURFACE* ClipSurface );
  3625. DLL_IMPORT void TosoFileWriteCommaClipSurface( const CLIPSURFACE* ClipSurface );
  3626.  
  3627. DLL_IMPORT void TosoFileWriteBitmapRef( const BITMAPREF* BitmapRef );
  3628. DLL_IMPORT void TosoFileWriteCommaBitmapRef( const BITMAPREF* BitmapRef );
  3629.  
  3630. //------------------------------------------------------------------------------------------------------
  3631.  
  3632. DLL_IMPORT BOOL TosoFileWriteHeader( const LPSTR Header );
  3633.  
  3634. DLL_IMPORT BOOL TosoFileWriteEndOfFile( void );
  3635.  
  3636. DLL_IMPORT void TosoFileWriteZeros( BOOL Value );
  3637.  
  3638. DLL_IMPORT void TosoFileWriteDelimiters( const TOKEN_DATA* Data );
  3639.  
  3640. DLL_IMPORT BOOL TosoFileWriteError( void );
  3641.  
  3642. DLL_IMPORT long TosoFileWriteCurrentSize( void );
  3643.  
  3644. DLL_IMPORT long TosoFileWriteCurrentLine( void );
  3645.  
  3646. //------------------------------------------------------------------------------------------------------
  3647.  
  3648. DLL_IMPORT BOOL TosoFileReadInitDisk( HANDLE FileHandle );
  3649.  
  3650. DLL_IMPORT BOOL TosoFileReadInitMemory( HGLOBAL hMemory );
  3651.  
  3652. DLL_IMPORT BOOL TosoFileReadData( LPVOID Data, int Size );
  3653.  
  3654. DLL_IMPORT int TosoFileReadChar( void );
  3655.  
  3656. DLL_IMPORT BOOL TosoFileReadLine( LPSTR Data, int Size );
  3657.  
  3658. DLL_IMPORT void TosoFileReadExit( void );
  3659.  
  3660. //------------------------------------------------------------------------------------------------------
  3661.  
  3662. DLL_IMPORT void TosoFileReadSemi( void );
  3663.  
  3664. DLL_IMPORT void TosoFileReadComma( void );
  3665.  
  3666. DLL_IMPORT BOOL TosoFileReadContinue( void );
  3667.  
  3668. DLL_IMPORT int TosoFileReadLastKeyword( void );
  3669.  
  3670. DLL_IMPORT void TosoFileReadKeyword( void );
  3671.  
  3672. DLL_IMPORT void TosoFileReadNextKeyword( void );
  3673.  
  3674. DLL_IMPORT void TosoFileReadNextSection( void );
  3675.  
  3676. //------------------------------------------------------------------------------------------------------
  3677.  
  3678. DLL_IMPORT void TosoFileReadString( LPSTR Value, int Size );
  3679. DLL_IMPORT void TosoFileReadCommaString( LPSTR Value, int Size );
  3680.  
  3681. DLL_IMPORT void TosoFileReadBinary( LPVOID Value, int Size );
  3682. DLL_IMPORT void TosoFileReadCommaBinary( LPVOID Value, int Size );
  3683.  
  3684. DLL_IMPORT void TosoFileReadBool( BOOL* Value );
  3685. DLL_IMPORT void TosoFileReadCommaBool( BOOL* Value );
  3686.  
  3687. DLL_IMPORT void TosoFileReadShort( short* Value );
  3688. DLL_IMPORT void TosoFileReadCommaShort( short* Value );
  3689.  
  3690. DLL_IMPORT void TosoFileReadInt( int* Value );
  3691. DLL_IMPORT void TosoFileReadCommaInt( int* Value );
  3692.  
  3693. DLL_IMPORT void TosoFileReadDouble( double* Value );
  3694. DLL_IMPORT void TosoFileReadCommaDouble( double* Value );
  3695.  
  3696. DLL_IMPORT void TosoFileReadColorref( COLORREF* Color );
  3697. DLL_IMPORT void TosoFileReadCommaColorref( COLORREF* Color );
  3698.  
  3699. DLL_IMPORT void TosoFileReadFontdef( FONTDEF* Font );
  3700. DLL_IMPORT void TosoFileReadCommaFontdef( FONTDEF* Font );
  3701.  
  3702. DLL_IMPORT void TosoFileReadXProperty( XPROPERTY* XProperty );
  3703. DLL_IMPORT void TosoFileReadCommaXProperty( XPROPERTY* XProperty );
  3704.  
  3705. DLL_IMPORT void TosoFileReadProperty( PROPERTY* Property );
  3706. DLL_IMPORT void TosoFileReadCommaProperty( PROPERTY* Property );
  3707.  
  3708. DLL_IMPORT void TosoFileReadDimLine( DIMLINE* DimLine );
  3709. DLL_IMPORT void TosoFileReadCommaDimLine( DIMLINE* DimLine );
  3710.  
  3711. DLL_IMPORT void TosoFileReadDimSmall( DIMSMALL* DimSmall );
  3712. DLL_IMPORT void TosoFileReadCommaDimSmall( DIMSMALL* DimSmall );
  3713.  
  3714. DLL_IMPORT void TosoFileReadDimLarge( DIMLARGE* DimLarge );
  3715. DLL_IMPORT void TosoFileReadCommaDimLarge( DIMLARGE* DimLarge );
  3716.  
  3717. DLL_IMPORT void TosoFileReadTextStandard( TEXTSTANDARD* TextStandard );
  3718. DLL_IMPORT void TosoFileReadCommaTextStandard( TEXTSTANDARD* TextStandard );
  3719.  
  3720. DLL_IMPORT void TosoFileReadTextFrame( TEXTFRAME* TextFrame );
  3721. DLL_IMPORT void TosoFileReadCommaTextFrame( TEXTFRAME* TextFrame );
  3722.  
  3723. DLL_IMPORT void TosoFileReadTextReference( TEXTREFERENCE* TextReference );
  3724. DLL_IMPORT void TosoFileReadCommaTextReference( TEXTREFERENCE* TextReference );
  3725.  
  3726. DLL_IMPORT void TosoFileReadClipSurface( CLIPSURFACE* ClipSurface );
  3727. DLL_IMPORT void TosoFileReadCommaClipSurface( CLIPSURFACE* ClipSurface );
  3728.  
  3729. DLL_IMPORT void TosoFileReadBitmapRef( BITMAPREF* BitmapRef );
  3730. DLL_IMPORT void TosoFileReadCommaBitmapRef( BITMAPREF* BitmapRef );
  3731.  
  3732. //------------------------------------------------------------------------------------------------------
  3733.  
  3734. DLL_IMPORT BOOL TosoFileReadHeader( const LPSTR Header );
  3735.  
  3736. DLL_IMPORT BOOL TosoFileReadEndOfFile( void );
  3737.  
  3738. DLL_IMPORT void TosoFileReadDelimiters( const TOKEN_DATA* Data );
  3739.  
  3740. DLL_IMPORT BOOL TosoFileReadError( void );
  3741.  
  3742. DLL_IMPORT long TosoFileReadTotalSize( void );
  3743.  
  3744. DLL_IMPORT long TosoFileReadCurrentSize( void );
  3745.  
  3746. DLL_IMPORT long TosoFileReadCurrentLine( void );
  3747.  
  3748. #endif
  3749.  
  3750. //------------------------------------------------------------------------------------------------------
  3751.  
  3752. #endif
  3753.