home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 December / PCWorld_2002-12_cd.bin / Software / Komercni / Baltik / katB.exe / katB / DESIGN / DESIGN_H.API < prev    next >
Text File  |  2002-09-20  |  7KB  |  229 lines

  1. ////////////////////////////////////////////////////////////////////////////////
  2. //----------------------------------------------------------------------------//
  3. //-----project DESINGER, copyright 2002 Libor Bareτ-------------------------//
  4. //----------------------------------------------------------------------------//
  5.  
  6.  
  7.  
  8.  
  9. //#define true 1
  10. //#define false 0
  11.  
  12. //# pragma stack = 10000
  13.  
  14.  
  15. // something to store 2 variables int in one long
  16.  
  17. #define MAKELONG(x,y) ((long)(((int)(x))|((long)((int)(y))) << 16 ))
  18. #define LOWORD(x) ((int)(x))
  19. #define HIWORD(x) ((int)(((long)(x) >> 16 ) & 0xFFFF))
  20. // no comment :-)
  21. #define MAX(x,y) (( x > y ? x : y))
  22. #define MIN(x,y) (( x < y ? x : y))
  23.  
  24. #define LPARAM long
  25. #define HWND unsigned
  26. #define WPARAM long
  27. #define DWORD long
  28. #define LONG long
  29. #define INT int
  30. #define UINT unsigned
  31. #define bool char
  32.  
  33. // messages ...
  34.  
  35. #define WM_LBUTTONDOWN 1
  36. #define WM_RBUTTONDOWN 2
  37. #define WM_MOUSEMOVE 3
  38. #define WM_MOUSELEAVE 4
  39. #define WM_MOUSEENTER 5
  40. #define WM_RBUTTONUP 6
  41. #define WM_LBUTTONUP 7
  42. #define WM_PAINT 8
  43. #define WM_COMMAND 9
  44. #define WM_CLOSE 10
  45. #define WM_SETFOCUS 11
  46. #define WM_KILLFOCUS 12
  47. #define WM_TIMER 13
  48. #define WM_CHAR 14
  49. #define WM_DESTROY 15
  50. #define WM_SHOWWINDOW 16
  51. #define WM_SETTEXT 17
  52.  
  53. #define DIA_PAINTOBJECT 100
  54. #define DIA_KILLFOCUS 101
  55. #define DIA_SETFOCUS 102
  56. #define DIA_DRAWCLIPRECT 103
  57.  
  58. #define LV_SELCHANGE 200
  59. #define LV_ITEMCLICK 201
  60.  
  61.  
  62. #define ED_ENTER 200
  63.  
  64. typedef struct tagLine{
  65.           int x;
  66.           int y;
  67.           int x2;
  68.           int y2;
  69. }LINE;
  70. typedef struct tagRect{
  71.      int left;
  72.      int top;
  73.      int right;
  74.      int bottom;
  75. }RECT;
  76.  
  77. typedef struct tagSize{
  78.         int x,y;
  79. }SIZE;
  80.  
  81. typedef struct tagPoint{
  82.      int left;
  83.      int top;
  84. }POINT;
  85. typedef struct tagMenu{
  86.     string strItem;
  87.     int nID;
  88.     int hBitmap;
  89.  
  90. }MENU;
  91. typedef struct tagClassItem{
  92.         string strText;
  93.         long nType;
  94.                 RECT nRectType;
  95. }CLASSITEM;
  96. typedef struct tagDIAGRAMCELL{
  97.     string ClassName;                                                   // 1B  per char
  98.     RECT Rect;                                                                  // 4*2B
  99.     unsigned nType;                                                                 // 2B
  100.     long dwFlags;                                                              // 4B
  101.     void* pOperation;                                                   // 2B
  102.     void* pVariable;                                                    // 2B
  103. //    struct tagDIAGRAMCELL** pDependents;               // 2B
  104.     int* pDependents;               // 2B
  105.     int nSizeDependents;                                                // 2B
  106.     int nSizeVariable;                                                  // 2B
  107.     int nSizeOperation;                                                 // 2B
  108.     RECT PT;                                                                // 4*2 B
  109.     string strExStereotypes;                                    // 1B per char
  110.     string strExProperties;                                             // 1B per char
  111.     int nBreakA,nBreakB,nBreakC;                                // 3*2 B
  112.  
  113. }DIAGRAMCELL;                                                           // TOTAL = 36B + strlen strings
  114.  
  115.  
  116.  
  117. typedef struct tagWnd{
  118.     string szText;        // ??
  119.     unsigned hBitmap;
  120.     char hFont;
  121.     long dwStyle;          //  4   26
  122.     unsigned nType;             //  2   30
  123.     unsigned hWnd;              //  2   32
  124.     unsigned nID;               //  2   34
  125.     RECT Rect;          //  2*4=8   42
  126.     long misc;
  127.     int lParam;
  128.     int misc2;
  129.     void* pData;
  130.     struct tagWnd* pParent;
  131.     struct tagWnd** pChild;
  132.         int nChildSize;
  133. }WND;                   //   ==
  134.  
  135. #define DFC_CAPTION             1
  136. #define DFC_MENU                2
  137. #define DFC_SCROLL              3
  138. #define DFC_BUTTON              4
  139. #define DFC_MENUPOPUP           5
  140. #define DFC_EDIT                7
  141. #define DFC_COMBOBOX            8
  142. #define DFC_LISTBOX            9
  143. #define DFC_SCROLLBARVER          10
  144. #define DFC_SCROLLBARHOR          11
  145. #define DFC_DIALOG 12
  146. #define DFC_GROUPBOX 13
  147. #define DFC_CUSTOM              6
  148.  
  149.  
  150.  
  151. #define DFCS_MENUNORMAL         0x0000000L
  152. #define DFCS_MENUCHECKED        0x0000001L
  153. #define DFCS_MENUOVER           0x0000002L
  154. #define DFCS_MENUARROWRIGHT     0x0000004L
  155.  
  156. #define DFCS_SCROLLUP           0x0000010L
  157. #define DFCS_SCROLLDOWN         0x0000020L
  158. #define DFCS_SCROLLLEFT         0x0000040L
  159. #define DFCS_SCROLLRIGHT        0x0000080L
  160.  
  161. #define DFCS_BUTTONCHECK        0x0000001L
  162. #define DFCS_BUTTONRADIO        0x0000002L
  163. #define DFCS_BUTTONPUSH         0x0000004L
  164.  
  165. #define DFCS_INACTIVE           0x0000100L
  166. #define DFCS_PUSHED             0x0000200L
  167. #define DFCS_FLAT               0x0001000L
  168.  
  169.  
  170. #define DES_CLIENT              0x0001
  171. #define DES_STATIC              0x0002
  172. #define DES_MODAL               0x0004
  173.  
  174. // Window flags
  175. #define WS_VISIBLE              0x00020000L
  176. #define WS_TABSTOP              0x00040000L
  177. #define WS_DISABLE              0x00080000L
  178. #define WS_MOUSEOVER            0x00100000L
  179. #define WS_CLIENTEDGE           0x00200000L
  180. #define WS_FOCUS                0x00400000L
  181. #define WS_NOTXP                0x00800000L
  182.  
  183.  
  184. // DrawText flags
  185. #define DT_TOP              0x00000000  
  186. #define DT_LEFT             0x00000000
  187. #define DT_CENTER           0x00000001
  188. #define DT_RIGHT            0x00000002
  189. #define DT_VCENTER          0x00000004
  190. #define DT_BOTTOM           0x00000008
  191. #define DT_MODIFYSTRING     0x00000010
  192. #define DT_UNDERLINE        0x00000020
  193.  
  194. // scrollbars :
  195.  
  196. #define SC_CAPTURE_TOP      0x00000001L
  197. #define SC_CAPTURE_BOTTOM   0x00000002L
  198. #define SC_CAPTURE_MIDDLE   0x00000004L
  199. #define SC_MOUSEOVER        0x00000008L
  200.  
  201. #define LV_AUTOSELECT       0x00000400L
  202.  
  203.  
  204.  
  205. // button event ...
  206. #define BN_CLICK                
  207.  
  208.  
  209. // KONEC SOUBORU
  210.  
  211.  
  212.  
  213. #define FONT_SYSTEM 0
  214. #define FONT_TAHOMA_8 5
  215. #define FONT_TAHOMA_BOLD_8 6
  216. #define FONT_TAHOMA_ITALIC_8 2
  217. #define FONT_TAHOMA_BOLD_ITALIC_8 4
  218. #define FONT_ARIAL_BOLD_10 1
  219. #define FONT_ARIAL_BOLD_ITALIC_10 3
  220.  
  221.  
  222.  
  223.  
  224.  
  225. ///////////////////////////////////////////////////////////////////////////
  226. ///////////////////////////////////////////////////////////////////////////
  227. ///////////////////////////////////////////////////////////////////////////
  228. ///////////////////////////////////////////////////////////////////////////
  229.