home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 August / PCWorld_2000-08_cd.bin / Software / TemaCD / xbasic / xbpro.exe / xb / xgr.dec < prev    next >
Text File  |  2000-01-12  |  32KB  |  689 lines

  1. '
  2. '
  3. ' **********************************************
  4. ' *****  GraphicsDesigner COMPOSITE TYPES  *****
  5. ' **********************************************
  6. '
  7. TYPE MESSAGE
  8.     XLONG     .wingrid            ' window/grid number
  9.     XLONG     .message            ' message number
  10.     XLONG     .v0                 ' arguments
  11.     XLONG     .v1
  12.     XLONG     .v2
  13.     XLONG     .v3
  14.     XLONG     .r0
  15.     XLONG     .r1
  16. END TYPE
  17. '
  18. '
  19. ' ************************************************
  20. ' *****  GraphicsDesigner Library Functions  *****
  21. ' ************************************************
  22. '
  23. ' Miscellaneous Functions
  24. '
  25. EXTERNAL FUNCTION  Xgr                       ()
  26. EXTERNAL FUNCTION  XgrBorderNameToNumber     (border$, @border)
  27. EXTERNAL FUNCTION  XgrBorderNumberToName     (border, @border$)
  28. EXTERNAL FUNCTION  XgrBorderNumberToWidth    (border, @width)
  29. EXTERNAL FUNCTION  XgrColorNameToNumber      (color$, @color)
  30. EXTERNAL FUNCTION  XgrColorNumberToName      (color, @color$)
  31. EXTERNAL FUNCTION  XgrCreateFont             (font, fontName$, fontSize, fontWeight, fontItalic, fontAngle)
  32. EXTERNAL FUNCTION  XgrCursorNameToNumber     (cursorName$, @cursorNumber)
  33. EXTERNAL FUNCTION  XgrCursorNumberToName     (cursorNumber, @cursorName$)
  34. EXTERNAL FUNCTION  XgrDestroyFont            (font)
  35. EXTERNAL FUNCTION  XgrGetClipboard           (clipboard, clipType, text$, UBYTE image[])
  36. EXTERNAL FUNCTION  XgrGetCursor              (cursor)
  37. EXTERNAL FUNCTION  XgrGetCursorOverride      (cursor)
  38. EXTERNAL FUNCTION  XgrGetDisplaySize         (display$, width, height, borderWidth, titleHeight)
  39. EXTERNAL FUNCTION  XgrGetFontInfo            (font, fontName$, pointSize, weight, italic, angle)
  40. EXTERNAL FUNCTION  XgrGetFontNames           (count, fontNames$[])
  41. EXTERNAL FUNCTION  XgrGetFontMetrics         (font, maxCharWidth, maxCharHeight, ascent, descent, gap, flags)
  42. EXTERNAL FUNCTION  XgrGetKeystateModify      (state, @modify, @edit)
  43. EXTERNAL FUNCTION  XgrGetTextArrayImageSize  (font, @text$[], @w, @h, @width, @height, extraX, extraY)
  44. EXTERNAL FUNCTION  XgrGetTextImageSize       (font, @text$, @dx, @dy, @width, @height, gap, space)
  45. EXTERNAL FUNCTION  XgrGridToSystemWindow     (grid, @swindow, @dx, @dy, @width, @height)
  46. EXTERNAL FUNCTION  XgrIconNameToNumber       (iconName$, iconNumber)
  47. EXTERNAL FUNCTION  XgrIconNumberToName       (iconNumber, iconName$)
  48. EXTERNAL FUNCTION  XgrRegisterCursor         (cursorName$, cursor)
  49. EXTERNAL FUNCTION  XgrRegisterIcon           (iconName$, icon)
  50. EXTERNAL FUNCTION  XgrSetClipboard           (clipboard, clipType, text$, UBYTE image[])
  51. EXTERNAL FUNCTION  XgrSetCursor              (cursor, oldCursor)
  52. EXTERNAL FUNCTION  XgrSetCursorOverride      (cursor, oldCursorOverride)
  53. EXTERNAL FUNCTION  XgrSystemWindowToWindow   (swindow, @window, @top)
  54. EXTERNAL FUNCTION  XgrWindowToSystemWindow   (window, @swindow, @dx, @dy, @width, @height)
  55. EXTERNAL FUNCTION  XgrVersion$               ()
  56. '
  57. ' Color Functions
  58. '
  59. EXTERNAL FUNCTION  XgrConvertColorToRGB      (color, red, green, blue)
  60. EXTERNAL FUNCTION  XgrConvertRGBToColor      (red, green, blue, color)
  61. EXTERNAL FUNCTION  XgrGetBackgroundColor     (grid, color)
  62. EXTERNAL FUNCTION  XgrGetBackgroundRGB       (grid, red, green, blue)
  63. EXTERNAL FUNCTION  XgrGetDefaultColors       (back, draw, low, high, dull, acc, lowText, highText)
  64. EXTERNAL FUNCTION  XgrGetDrawingColor        (grid, color)
  65. EXTERNAL FUNCTION  XgrGetDrawingRGB          (grid, red, green, blue)
  66. EXTERNAL FUNCTION  XgrGetGridColors          (grid, back, draw, low, high, dull, acc, lowText, highText)
  67. EXTERNAL FUNCTION  XgrSetBackgroundColor     (grid, color)
  68. EXTERNAL FUNCTION  XgrSetBackgroundRGB       (grid, red, green, blue)
  69. EXTERNAL FUNCTION  XgrSetDefaultColors       (back, draw, low, high, dull, acc, lowText, highText)
  70. EXTERNAL FUNCTION  XgrSetDrawingColor        (grid, color)
  71. EXTERNAL FUNCTION  XgrSetDrawingRGB          (grid, red, green, blue)
  72. EXTERNAL FUNCTION  XgrSetGridColors          (grid, back, draw, low, high, dull, acc, lowText, highText)
  73. '
  74. ' Window Functions
  75. '
  76. EXTERNAL FUNCTION  XgrClearWindow              (window, color)
  77. EXTERNAL FUNCTION  XgrClearWindowAndImages     (window, color)
  78. EXTERNAL FUNCTION  XgrCreateWindow             (window, windowType, xDisp, yDisp, width, height, winFunc, display$)
  79. EXTERNAL FUNCTION  XgrDestroyWindow            (window)
  80. EXTERNAL FUNCTION  XgrDisplayWindow            (window)
  81. EXTERNAL FUNCTION  XgrGetModalWindow           (window)
  82. EXTERNAL FUNCTION  XgrGetWindowFunction        (window, func)
  83. EXTERNAL FUNCTION  XgrGetWindowIcon            (window, icon)
  84. EXTERNAL FUNCTION  XgrGetWindowPositionAndSize (window, xDisp, yDisp, width, height)
  85. EXTERNAL FUNCTION  XgrGetWindowState           (window, state)
  86. EXTERNAL FUNCTION  XgrGetWindowTitle           (window, title$)
  87. EXTERNAL FUNCTION  XgrHideWindow               (window)
  88. EXTERNAL FUNCTION  XgrMaximizeWindow           (window)
  89. EXTERNAL FUNCTION  XgrMinimizeWindow           (window)
  90. EXTERNAL FUNCTION  XgrRestoreWindow            (window)
  91. EXTERNAL FUNCTION  XgrSetModalWindow           (window)
  92. EXTERNAL FUNCTION  XgrSetWindowFunction        (window, func)
  93. EXTERNAL FUNCTION  XgrSetWindowIcon            (window, icon)
  94. EXTERNAL FUNCTION  XgrSetWindowPositionAndSize (window, xDisp, yDisp, width, height)
  95. EXTERNAL FUNCTION  XgrSetWindowState           (window, state)
  96. EXTERNAL FUNCTION  XgrSetWindowTitle           (window, title$)
  97. EXTERNAL FUNCTION  XgrShowWindow               (window)
  98. '
  99. ' Grid Functions
  100. '
  101. EXTERNAL FUNCTION  XgrClearGrid              (grid, color)
  102. EXTERNAL FUNCTION  XgrCloneGrid              (grid, newGrid, newWindow, newParent, xWin, yWin)
  103. EXTERNAL FUNCTION  XgrConvertDisplayToGrid   (grid, xDisp, yDisp, xGrid, yGrid)
  104. EXTERNAL FUNCTION  XgrConvertDisplayToLocal  (grid, xDisp, yDisp, x, y)
  105. EXTERNAL FUNCTION  XgrConvertDisplayToScaled (grid, xDisp, yDisp, x#, y#)
  106. EXTERNAL FUNCTION  XgrConvertDisplayToWindow (grid, xDisp, yDisp, xWin, yWin)
  107. EXTERNAL FUNCTION  XgrConvertGridToDisplay   (grid, xGrid, yGrid, xDisp, yDisp)
  108. EXTERNAL FUNCTION  XgrConvertGridToLocal     (grid, xGrid, yGrid, x, y)
  109. EXTERNAL FUNCTION  XgrConvertGridToScaled    (grid, xGrid, yGrid, x#, y#)
  110. EXTERNAL FUNCTION  XgrConvertGridToWindow    (grid, xGrid, yGrid, xWin, yWin)
  111. EXTERNAL FUNCTION  XgrConvertLocalToDisplay  (grid, xGrid, yGrid, xDisp, yDisp)
  112. EXTERNAL FUNCTION  XgrConvertLocalToGrid     (grid, xGrid, yGrid, x, y)
  113. EXTERNAL FUNCTION  XgrConvertLocalToScaled   (grid, xGrid, yGrid, x#, y#)
  114. EXTERNAL FUNCTION  XgrConvertLocalToWindow   (grid, xGrid, yGrid, xWin, yWin)
  115. EXTERNAL FUNCTION  XgrConvertScaledToDisplay (grid, x#, y#, xDisp, yDisp)
  116. EXTERNAL FUNCTION  XgrConvertScaledToGrid    (grid, x#, y#, xGrid, yGrid)
  117. EXTERNAL FUNCTION  XgrConvertScaledToLocal   (grid, x#, y#, x, y)
  118. EXTERNAL FUNCTION  XgrConvertScaledToWindow  (grid, x#, y#, xWin, yWin)
  119. EXTERNAL FUNCTION  XgrConvertWindowToDisplay (grid, xWin, yWin, xDisp, yDisp)
  120. EXTERNAL FUNCTION  XgrConvertWindowToGrid    (grid, xWin, yWin, xGrid, yGrid)
  121. EXTERNAL FUNCTION  XgrConvertWindowToLocal   (grid, xWin, yWin, x, y)
  122. EXTERNAL FUNCTION  XgrConvertWindowToScaled  (grid, xWin, yWin, x#, y#)
  123. EXTERNAL FUNCTION  XgrCreateGrid             (grid, gridType, x, y, width, height, window, parent, func)
  124. EXTERNAL FUNCTION  XgrDestroyGrid            (grid)
  125. EXTERNAL FUNCTION  XgrGetGridBorder          (grid, border, borderUp, borderDown, borderFlags)
  126. EXTERNAL FUNCTION  XgrGetGridBorderOffset    (grid, left, top, right, bottom)
  127. EXTERNAL FUNCTION  XgrGetGridBox             (grid, x1, y1, x2, y2)
  128. EXTERNAL FUNCTION  XgrGetGridBoxDisplay      (grid, x1Disp, y1Disp, x2Disp, y2Disp)
  129. EXTERNAL FUNCTION  XgrGetGridBoxGrid         (grid, x1Grid, y1Grid, x2Grid, y2Grid)
  130. EXTERNAL FUNCTION  XgrGetGridBoxLocal        (grid, x1, y1, x2, y2)
  131. EXTERNAL FUNCTION  XgrGetGridBoxScaled       (grid, x1#, y1#, x2#, y2#)
  132. EXTERNAL FUNCTION  XgrGetGridBoxWindow       (grid, x1Win, y1Win, x2Win, y2Win)
  133. EXTERNAL FUNCTION  XgrGetGridBuffer          (grid, @buffer, @x, @y)
  134. EXTERNAL FUNCTION  XgrGetGridCharacterMapArray   (grid, @map[])
  135. EXTERNAL FUNCTION  XgrGetGridClip            (grid, clipGrid)
  136. EXTERNAL FUNCTION  XgrGetGridCoords          (grid, xWin, yWin, x1, y1, x2, y2)
  137. EXTERNAL FUNCTION  XgrGetGridDrawingMode     (grid, drawingMode, lineStyle, lineWidth)
  138. EXTERNAL FUNCTION  XgrGetGridFont            (grid, font)
  139. EXTERNAL FUNCTION  XgrGetGridFunction        (grid, func)
  140. EXTERNAL FUNCTION  XgrGetGridParent          (grid, parent)
  141. EXTERNAL FUNCTION  XgrGetGridPositionAndSize (grid, x, y, width, height)
  142. EXTERNAL FUNCTION  XgrGetGridState           (grid, state)
  143. EXTERNAL FUNCTION  XgrGetGridType            (grid, gridType)
  144. EXTERNAL FUNCTION  XgrGetGridWindow          (grid, window)
  145. EXTERNAL FUNCTION  XgrGridTypeNameToNumber   (gridTypeName$, gridTypeNumber)
  146. EXTERNAL FUNCTION  XgrGridTypeNumberToName   (gridTypeNumber, gridTypeName$)
  147. EXTERNAL FUNCTION  XgrRegisterGridType       (gridTypeName$, gridType)
  148. EXTERNAL FUNCTION  XgrSetGridBorder          (grid, border, borderUp, borderDown, borderFlags)
  149. EXTERNAL FUNCTION  XgrSetGridBorderOffset    (grid, left, top, right, bottom)
  150. EXTERNAL FUNCTION  XgrSetGridBox             (grid, x1, y1, x2, y2)
  151. EXTERNAL FUNCTION  XgrSetGridBoxGrid         (grid, x1Grid, y1Grid, x2Grid, y2Grid)
  152. EXTERNAL FUNCTION  XgrSetGridBoxScaled       (grid, x1#, y1#, x2#, y2#)
  153. EXTERNAL FUNCTION  XgrSetGridBoxScaledAt     (grid, x1#, y1#, x2#, y2#, x1, y1, x2, y2)
  154. EXTERNAL FUNCTION  XgrSetGridBuffer          (grid, buffer, x, y)
  155. EXTERNAL FUNCTION  XgrSetGridCharacterMapArray   (grid, @map[])
  156. EXTERNAL FUNCTION  XgrSetGridClip            (grid, clipGrid)
  157. EXTERNAL FUNCTION  XgrSetGridDrawingMode     (grid, drawingMode, lineStyle, lineWidth)
  158. EXTERNAL FUNCTION  XgrSetGridFont            (grid, font)
  159. EXTERNAL FUNCTION  XgrSetGridFunction        (grid, func)
  160. EXTERNAL FUNCTION  XgrSetGridParent          (grid, parent)
  161. EXTERNAL FUNCTION  XgrSetGridPositionAndSize (grid, x, y, width, height)
  162. EXTERNAL FUNCTION  XgrSetGridState           (grid, state)
  163. EXTERNAL FUNCTION  XgrSetGridTimer           (grid, msTimeInterval)
  164. EXTERNAL FUNCTION  XgrSetGridType            (grid, gridType)
  165. '
  166. ' Drawing Functions
  167. '
  168. EXTERNAL FUNCTION  XgrDrawArc                (grid, color, r, startAngle#, endAngle#)
  169. EXTERNAL FUNCTION  XgrDrawArcGrid            (grid, color, r, startAngle#, endAngle#)
  170. EXTERNAL FUNCTION  XgrDrawArcScaled          (grid, color, r#, startAngle#, endAngle#)
  171. EXTERNAL FUNCTION  XgrDrawBorder             (grid, border, back, low, high, x1, y1, x2, y2)
  172. EXTERNAL FUNCTION  XgrDrawBorderGrid         (grid, border, back, low, high, x1Grid, y1Grid, x2Grid, y2Grid)
  173. EXTERNAL FUNCTION  XgrDrawBorderScaled       (grid, border, back, low, high, x1#, y1#, x2#, y2#)
  174. EXTERNAL FUNCTION  XgrDrawBox                (grid, color, x1, y1, x2, y2)
  175. EXTERNAL FUNCTION  XgrDrawBoxGrid            (grid, color, x1Grid, y1Grid, x2Grid, y2Grid)
  176. EXTERNAL FUNCTION  XgrDrawBoxScaled          (grid, color, x1#, y1#, x2#, y2#)
  177. EXTERNAL FUNCTION  XgrDrawCircle             (grid, color, r)
  178. EXTERNAL FUNCTION  XgrDrawCircleGrid         (grid, color, r)
  179. EXTERNAL FUNCTION  XgrDrawCircleScaled       (grid, color, r#)
  180. EXTERNAL FUNCTION  XgrDrawGridBorder         (grid, border)
  181. EXTERNAL FUNCTION  XgrDrawIcon               (grid, icon, x, y)
  182. EXTERNAL FUNCTION  XgrDrawIconGrid           (grid, icon, xGrid, yGrid)
  183. EXTERNAL FUNCTION  XgrDrawIconScaled         (grid, icon, x#, y#)
  184. EXTERNAL FUNCTION  XgrDrawLine               (grid, color, x1, y1, x2, y2)
  185. EXTERNAL FUNCTION  XgrDrawLineGrid           (grid, color, x1Grid, y1Grid, x2Grid, y2Grid)
  186. EXTERNAL FUNCTION  XgrDrawLineScaled         (grid, color, x1#, y1#, x2#, y2#)
  187. EXTERNAL FUNCTION  XgrDrawLineTo             (grid, color, x, y)
  188. EXTERNAL FUNCTION  XgrDrawLineToGrid         (grid, color, xGrid, yGrid)
  189. EXTERNAL FUNCTION  XgrDrawLineToScaled       (grid, color, x#, y#)
  190. EXTERNAL FUNCTION  XgrDrawLineToDelta        (grid, color, dx, dy)
  191. EXTERNAL FUNCTION  XgrDrawLineToDeltaGrid    (grid, color, dxGrid, dyGrid)
  192. EXTERNAL FUNCTION  XgrDrawLineToDeltaScaled  (grid, color, dx#, dy#)
  193. EXTERNAL FUNCTION  XgrDrawLines              (grid, color, first, count, ANY lines[])
  194. EXTERNAL FUNCTION  XgrDrawLinesGrid          (grid, color, first, count, ANY lines[])
  195. EXTERNAL FUNCTION  XgrDrawLinesScaled        (grid, color, first, count, ANY lines[])
  196. EXTERNAL FUNCTION  XgrDrawLinesTo            (grid, color, first, count, ANY lines[])
  197. EXTERNAL FUNCTION  XgrDrawLinesToGrid        (grid, color, first, count, ANY lines[])
  198. EXTERNAL FUNCTION  XgrDrawLinesToScaled      (grid, color, first, count, ANY lines[])
  199. EXTERNAL FUNCTION  XgrDrawPoint              (grid, color, x, y)
  200. EXTERNAL FUNCTION  XgrDrawPointGrid          (grid, color, xGrid, yGrid)
  201. EXTERNAL FUNCTION  XgrDrawPointScaled        (grid, color, x#, y#)
  202. EXTERNAL FUNCTION  XgrDrawPoints             (grid, color, first, count, ANY points[])
  203. EXTERNAL FUNCTION  XgrDrawPointsGrid         (grid, color, first, count, ANY points[])
  204. EXTERNAL FUNCTION  XgrDrawPointsScaled       (grid, color, first, count, ANY points[])
  205. EXTERNAL FUNCTION  XgrDrawText               (grid, color, text$)
  206. EXTERNAL FUNCTION  XgrDrawTextGrid           (grid, color, text$)
  207. EXTERNAL FUNCTION  XgrDrawTextScaled         (grid, color, text$)
  208. EXTERNAL FUNCTION  XgrDrawTextFill           (grid, color, text$)
  209. EXTERNAL FUNCTION  XgrDrawTextFillGrid       (grid, color, text$)
  210. EXTERNAL FUNCTION  XgrDrawTextFillScaled     (grid, color, text$)
  211. EXTERNAL FUNCTION  XgrFillBox                (grid, color, x1, y1, x2, y2)
  212. EXTERNAL FUNCTION  XgrFillBoxGrid            (grid, color, x1Grid, y1Grid, x2Grid, y2Grid)
  213. EXTERNAL FUNCTION  XgrFillBoxScaled          (grid, color, x1#, y1#, x2#, y2#)
  214. EXTERNAL FUNCTION  XgrFillTriangle           (grid, color, style, direction, x1, y1, x2, y2)
  215. EXTERNAL FUNCTION  XgrFillTriangleGrid       (grid, color, style, direction, x1Grid, y1Grid, x2Grid, y2Grid)
  216. EXTERNAL FUNCTION  XgrFillTriangleScaled     (grid, color, style, direction, x1#, y1#, x2#, y2#)
  217. EXTERNAL FUNCTION  XgrGetDrawpoint           (grid, x, y)
  218. EXTERNAL FUNCTION  XgrGetDrawpointGrid       (grid, xGrid, yGrid)
  219. EXTERNAL FUNCTION  XgrGetDrawpointScaled     (grid, x#, y#)
  220. EXTERNAL FUNCTION  XgrGrabPoint              (grid, x, y, red, green, blue, color)
  221. EXTERNAL FUNCTION  XgrGrabPointGrid          (grid, xGrid, yGrid, red, green, blue, color)
  222. EXTERNAL FUNCTION  XgrGrabPointScaled        (grid, x#, y#, red, green, blue, color)
  223. EXTERNAL FUNCTION  XgrMoveDelta              (grid, dx, dy)
  224. EXTERNAL FUNCTION  XgrMoveDeltaGrid          (grid, dxGrid, dyGrid)
  225. EXTERNAL FUNCTION  XgrMoveDeltaScaled        (grid, dx#, dy#)
  226. EXTERNAL FUNCTION  XgrMoveTo                 (grid, x, y)
  227. EXTERNAL FUNCTION  XgrMoveToGrid             (grid, xGrid, yGrid)
  228. EXTERNAL FUNCTION  XgrMoveToScaled           (grid, x#, y#)
  229. EXTERNAL FUNCTION  XgrSetDrawpoint           (grid, x, y)
  230. EXTERNAL FUNCTION  XgrSetDrawpointGrid       (grid, xGrid, yGrid)
  231. EXTERNAL FUNCTION  XgrSetDrawpointScaled     (grid, x#, y#)
  232. '
  233. ' Image Functions
  234. '
  235. EXTERNAL FUNCTION  XgrCopyImage              (destGrid, srcGrid)
  236. EXTERNAL FUNCTION  XgrDrawImage              (destGrid, srcGrid, x1, y1, x2, y2, dx1, dy1)
  237. EXTERNAL FUNCTION  XgrDrawImageExtend        (destGrid, srcGrid, x1, y1, x2, y2, dx1, dy1)
  238. EXTERNAL FUNCTION  XgrDrawImageExtendScaled  (destGrid, srcGrid, x1, y1, x2, y2, dx1, dy1)
  239. EXTERNAL FUNCTION  XgrDrawImageScaled        (destGrid, srcGrid, x1, y1, x2, y2, dx1, dy1)
  240. EXTERNAL FUNCTION  XgrGetImage               (grid, UBYTE image[])
  241. EXTERNAL FUNCTION  XgrGetImageArrayInfo      (UBYTE image[], bitsPerPixel, width, height)
  242. EXTERNAL FUNCTION  XgrLoadImage              (fileName$, UBYTE image[])
  243. EXTERNAL FUNCTION  XgrRefreshGrid            (grid)
  244. EXTERNAL FUNCTION  XgrSaveImage              (fileName$, UBYTE image[])
  245. EXTERNAL FUNCTION  XgrSetImage               (grid, UBYTE image[])
  246. '
  247. ' Focus Functions
  248. '
  249. EXTERNAL FUNCTION  XgrGetMouseFocus          (window, grid)
  250. EXTERNAL FUNCTION  XgrGetMouseInfo           (window, grid, x, y, state, time)
  251. EXTERNAL FUNCTION  XgrGetSelectedWindow      (window)
  252. EXTERNAL FUNCTION  XgrGetTextSelectionGrid   (grid)
  253. EXTERNAL FUNCTION  XgrSetMouseFocus          (window, grid)
  254. EXTERNAL FUNCTION  XgrSetSelectedWindow      (window)
  255. EXTERNAL FUNCTION  XgrSetTextSelectionGrid   (grid)
  256. '
  257. ' Message Functions
  258. '
  259. EXTERNAL FUNCTION  XgrAddMessage                (wingrid, message, v0, v1, v2, v3, r0, ANY)
  260. EXTERNAL FUNCTION  XgrDeleteMessages            (count)
  261. EXTERNAL FUNCTION  XgrGetCEO                    (func)
  262. EXTERNAL FUNCTION  XgrGetMessages               (count, MESSAGE messages[])
  263. EXTERNAL FUNCTION  XgrGetMessageType            (message, messageType)
  264. EXTERNAL FUNCTION  XgrJamMessage                (wingrid, message, v0, v1, v2, v3, r0, ANY)
  265. EXTERNAL FUNCTION  XgrMessageNameToNumber       (messageName$, messageNumber)
  266. EXTERNAL FUNCTION  XgrMessageNames              (count, messages$[])
  267. EXTERNAL FUNCTION  XgrMessageNumberToName       (messageNumber, messageName$)
  268. EXTERNAL FUNCTION  XgrMessagesPending           (count)
  269. EXTERNAL FUNCTION  XgrPeekMessage               (wingrid, message, v0, v1, v2, v3, r0, ANY)
  270. EXTERNAL FUNCTION  XgrProcessMessages           (maxCount)
  271. EXTERNAL FUNCTION  XgrRedrawWindow              (window, action, xWin, yWin, width, height)
  272. EXTERNAL FUNCTION  XgrRegisterMessage           (message$, message)
  273. EXTERNAL FUNCTION  XgrSendMessage               (wingrid, message, v0, v1, v2, v3, r0, ANY)
  274. EXTERNAL FUNCTION  XgrSendMessageToWindow       (wingrid, message, v0, v1, v2, v3, r0, ANY)
  275. EXTERNAL FUNCTION  XgrSendStringMessage         (wingrid, message$, v0, v1, v2, v3, r0, ANY)
  276. EXTERNAL FUNCTION  XgrSendStringMessageToWindow (wingrid, message$, v0, v1, v2, v3, r0, ANY)
  277. EXTERNAL FUNCTION  XgrSetCEO                    (func)
  278. '
  279. ' ****************************************
  280. ' *****  GraphicsDesigner Constants  *****
  281. ' ****************************************
  282. '
  283. ' *****  kind of entity  *****
  284. '
  285.   $$KindWindow          = 1    ' same as $$Window
  286.   $$KindGrid            = 2    ' same as $$Grid
  287.   $$KindImage           = 4    ' same as $$Image
  288.   $$Window              = 1    ' window = top level window, including pop-up
  289.   $$Grid                = 2    ' grid = subwindow
  290.   $$Image               = 4    ' image = pixmap
  291. '
  292. ' permanently defined grid types (also registered as #GridTypeXXXX)
  293. '
  294.   $$GridTypeCoordinate  = 0    ' coordinate grid
  295.   $$GridTypeImage       = 1    ' memory image
  296.   $$GridTypeBuffer      = 1    ' alias
  297. '
  298. ' permanently defined clipboard types
  299. '
  300.   $$ClipboardTypeNone   = 0    ' no contents
  301.   $$ClipboardTypeText   = 1    ' ASCII text
  302.   $$ClipboardTypeImage  = 2    ' DIB image
  303. '
  304. ' *****  debug type  *****
  305. '
  306.   $$DebugBrief          = 1
  307.   $$DebugWordy          = 2
  308.   $$DebugError          = 4
  309. '
  310. ' *****  monitor type  *****
  311. '
  312.   $$MonitorContext      = 1
  313.   $$MonitorHelp         = 2
  314.   $$MonitorKeyboard     = 4
  315.   $$MonitorMouse        = 8
  316. '
  317. ' *****  window types  *****
  318. '
  319.   $$WindowTypeTopMost        = 0x80000000
  320.   $$WindowTypeNoSelect       = 0x40000000
  321.   $$WindowTypeNoFrame        = 0x20000000
  322.   $$WindowTypeResizeFrame    = 0x10000000
  323.   $$WindowTypeTitleBar       = 0x08000000
  324.   $$WindowTypeSystemMenu     = 0x04000000
  325.   $$WindowTypeMinimizeBox    = 0x02000000
  326.   $$WindowTypeMinimizeButton = 0x02000000
  327.   $$WindowTypeMaximizeBox    = 0x01000000
  328.   $$WindowTypeMaximizeButton = 0x01000000
  329.   $$WindowTypeModal          = 0x99000000
  330.   $$WindowTypeNormal         = 0x1F000000
  331.   $$WindowTypeFixedSize      = 0x08000000
  332.   $$WindowTypeDefault        = 0x00000000
  333.   $$WindowTypeCloseMinimize  = 0x00010000
  334.   $$WindowTypeCloseHide      = 0x00020000
  335.   $$WindowTypeCloseDestroy   = 0x00040000
  336.   $$WindowTypeCloseTerminate = 0x00080000
  337. '
  338. ' *****  window states  *****
  339. '
  340.   $$WindowHidden        = 0
  341.   $$WindowDisplayed     = 1
  342.   $$WindowMinimized     = 2
  343.   $$WindowMaximized     = 3
  344. '
  345. ' *****  grid states  *****
  346. '
  347.   $$GridDisabled        = 0
  348.   $$GridEnabled         = 1
  349. '
  350. ' *****  grid border styles  *****
  351. '
  352.   $$BorderNone          =  0
  353.   $$BorderFlat          =  1 : $$BorderFlat1  =  1
  354.   $$BorderFlat2         =  2
  355.   $$BorderFlat4         =  3
  356.   $$BorderHiLine1       =  4 : $$BorderLine1  =  4
  357.   $$BorderHiLine2       =  5 : $$BorderLine2  =  5
  358.   $$BorderHiLine4       =  6 : $$BorderLine4  =  6
  359.   $$BorderLoLine1       =  7
  360.   $$BorderLoLine2       =  8
  361.   $$BorderLoLine4       =  9
  362.   $$BorderRaise1        = 10 : $$BorderRaise  = 10
  363.   $$BorderRaise2        = 11
  364.   $$BorderRaise4        = 12
  365.   $$BorderLower1        = 13 : $$BorderLower  = 13
  366.   $$BorderLower2        = 14
  367.   $$BorderLower4        = 15
  368.   $$BorderFrame         = 16
  369.   $$BorderDrain         = 17
  370.   $$BorderRidge         = 18
  371.   $$BorderValley        = 19
  372.   $$BorderWide          = 20  ' window frame border w/o resize marks
  373.   $$BorderResize        = 21  ' window frame resize border
  374.   $$BorderWindow        = 22  ' wide window frame border w/o resize marks
  375.   $$BorderWindowResize  = 23  ' wide window frame with resize marks
  376.   $$BorderRise2         = 24
  377.   $$BorderSink2         = 25
  378.   $$BorderUpper         = 31  ' highest valid border number
  379. '
  380. ' *****  drawing modes  *****
  381. '
  382.   $$DrawCOPY            = 0    ' obsolete set
  383.   $$DrawSET             = 0
  384.   $$DrawXOR             = 1
  385.   $$DrawAND             = 2
  386.   $$DrawOR              = 3
  387.   $$DrawMax             = 3
  388. '
  389.   $$DrawModeCOPY        = 0    ' new set
  390.   $$DrawModeSET         = 0
  391.   $$DrawModeXOR         = 1
  392.   $$DrawModeAND         = 2
  393.   $$DrawModeOR          = 3
  394.   $$DrawModeMax         = 3
  395. '
  396.   $$LineSolid           = 0    ' obsolete set
  397.   $$LineDash            = 1
  398.   $$LineDot             = 2
  399.   $$LineDashDot         = 3
  400.   $$LineDashDotDot      = 4
  401.   $$LineMax             = 4
  402. '
  403.   $$LineStyleSolid      = 0    ' new set
  404.   $$LineStyleDash       = 1
  405.   $$LineStyleDot        = 2
  406.   $$LineStyleDashDot    = 3
  407.   $$LineStyleDashDotDot = 4
  408.   $$LineStyleMax        = 4
  409. '
  410.   $$LineFill            = 0x0010
  411.   $$LineFillDash        = 0x0011
  412.   $$LineFillDot         = 0x0012
  413.   $$LineFillDashDot     = 0x0013
  414.   $$LineFillDashDotDot  = 0x0014
  415. '
  416.   $$TriangleUp          = 0x0010
  417.   $$TriangleRight       = 0x0014
  418.   $$TriangleDown        = 0x0018
  419.   $$TriangleLeft        = 0x001C
  420. '
  421.   $$CurrentColor        = -1
  422.   $$DefaultColor        = -1
  423. '
  424.   $$ClipTypeNone        = 0    ' none = no contents
  425.   $$ClipTypeText        = 1    ' ASCII text
  426.   $$ClipTypeImage       = 2    ' DIB format image
  427. '
  428. ' ****************************************************
  429. ' *****  standard colors with names  (0 to 124)  *****
  430. ' ****************************************************
  431. '
  432. '   0xRRGGBBCC
  433. '     RR          = 0x00 to 0xFF (0 to 255) red intensity
  434. '       GG        = 0x00 to 0xFF (0 to 255) green intensity
  435. '         BB      = 0x00 to 0xFF (0 to 255) blue intensity
  436. '           CC    = 0x00 to 0x7C (0 to 124) standard color number
  437. '
  438. ' ColorConstant  Decimal  Hexadecimal
  439. '
  440. '                         color#    RRGGBBCC
  441.   $$Black               =   0   ' 0x00000000
  442.   $$DarkBlue            =   1   ' 0x00003F01
  443.   $$MediumBlue          =   2   ' 0x00007F02
  444.   $$Blue                =   2   ' 0x00007F02
  445.   $$BrightBlue          =   3   ' 0x0000BF03
  446.   $$LightBlue           =   4   ' 0x0000FF04
  447.   $$DarkGreen           =   5   ' 0x003F0005
  448.   $$MediumGreen         =  10   ' 0x007F000A
  449.   $$Green               =  10   ' 0x007F000A
  450.   $$BrightGreen         =  15   ' 0x00BF000F
  451.   $$LightGreen          =  20   ' 0x00FF0014
  452.   $$DarkCyan            =   6   ' 0x003F3F06
  453.   $$MediumCyan          =  12   ' 0x007F7F0C
  454.   $$Cyan                =  12   ' 0x007F7F0C
  455.   $$BrightCyan          =  18   ' 0x00BFBF12
  456.   $$LightCyan           =  24   ' 0x00FFFF18
  457.   $$DarkRed             =  25   ' 0x3F000019
  458.   $$MediumRed           =  50   ' 0x7F000032
  459.   $$Red                 =  50   ' 0x7F000032
  460.   $$BrightRed           =  75   ' 0xBF00004B
  461.   $$LightRed            = 100   ' 0xFF000064
  462.   $$DarkMagenta         =  26   ' 0x3F003F1A
  463.   $$MediumMagenta       =  52   ' 0x7F007F34
  464.   $$Magenta             =  52   ' 0x7F007F34
  465.   $$BrightMagenta       =  78   ' 0xBF00BF4E
  466.   $$LightMagenta        = 104   ' 0xFF00FF68
  467.   $$DarkBrown           =  30   ' 0x3F3F001E
  468.   $$MediumBrown         =  60   ' 0x7F7F003C
  469.   $$Brown               =  60   ' 0x7F7F003C
  470.   $$Yellow              =  90   ' 0xBFBF005A
  471.   $$BrightYellow        = 120   ' 0xFFFF0078
  472.   $$LightYellow         = 120   ' 0xFFFF0078
  473.   $$DarkGrey            =  31   ' 0x3F3F3F1F
  474.   $$MediumGrey          =  62   ' 0x7F7F7F3E
  475.   $$Grey                =  62   ' 0x7F7F7F3E
  476.   $$LightGrey           =  93   ' 0xBFBFBF5D
  477.   $$BrightGrey          =  93   ' 0xBFBFBF5D
  478.   $$DarkSteel           =  32   ' 0x3F3F7F20
  479.   $$MediumSteel         =  63   ' 0x7F7FBF3F
  480.   $$Steel               =  63   ' 0x7F7FBF3F
  481.   $$BrightSteel         =  94   ' 0xBFBFFF5E
  482.   $$MediumOrange        =  81   ' 0xBF3F3F51
  483.   $$Orange              =  81   ' 0xBF3F3F51
  484.   $$BrightOrange        = 112   ' 0xFF7F7F70
  485.   $$LightOrange         = 112   ' 0xFF7F7F70
  486.   $$MediumAqua          =  42   ' 0x3FBF7F2A
  487.   $$Aqua                =  42   ' 0x3FBF7F2A
  488.   $$BrightAqua          =  73   ' 0x7FFFBF49
  489.   $$DarkViolet          =  57   ' 0x7F3F7F39
  490.   $$MediumViolet        =  88   ' 0xBF7FBF58
  491.   $$Violet              =  88   ' 0xBF7FBF58
  492.   $$BrightViolet        = 119   ' 0xFFBFFF77
  493.   $$White               = 124   ' 0xFFFFFF7C
  494. '
  495. ' keyboard key and mouse button bits in mouse messages
  496. '
  497.   $$MouseShiftKey       = 0x00010000  ' bit 16 = ShiftKey
  498.   $$MouseControlKey     = 0x00020000  ' bit 17 = ControlKey
  499.   $$MouseAltKey         = 0x00040000  ' bit 18 = AltKey
  500.   $$MouseMod1Key        = 0x00040000  ' bit 18 = Mod1Key (alias AltKey)
  501.   $$MouseMod2Key        = 0x00080000  ' bit 19 = Mod2Key
  502.   $$MouseMod3Key        = 0x00100000  ' bit 20 = Mod3Key
  503.   $$MouseMod4Key        = 0x00200000  ' bit 21 = Mod4Key
  504.   $$MouseMod5Key        = 0x00400000  ' bit 22 = Mod5Key
  505.   $$MouseButton1        = 0x01000000  ' bit 24 = MouseButton1  left button
  506.   $$MouseButton2        = 0x02000000  ' bit 25 = MouseButton2  middle button
  507.   $$MouseButton3        = 0x04000000  ' bit 26 = MouseButton3  right button
  508.   $$MouseButton4        = 0x08000000  ' bit 27 = MouseButton4  extra button
  509.   $$MouseButton5        = 0x10000000  ' bit 28 = MouseButton5  extra button
  510.   $$MouseButtonMask     = 0x1F000000  '
  511. '
  512.   $$ShiftBit            = 0x00010000  ' bit 16
  513.   $$ControlBit          = 0x00020000  ' bit 17
  514.   $$CtrlBit             = 0x00020000  ' bit 17  alias
  515.   $$AltBit              = 0x00040000  ' bit 18
  516.   $$RightAltBit         = 0x00080000  ' bit 19
  517.   $$RightShiftBit       = 0x00400000  ' bit 22
  518.   $$RightControlBit     = 0x00800000  ' bit 23
  519.   $$LeftButtonBit       = 0x01000000  ' bit 24
  520.   $$MiddleButtonBit     = 0x02000000  ' bit 25
  521.   $$RightButtonBit      = 0x04000000  ' bit 26
  522.   $$HelpButtonBit       = 0x04000000  ' bit 26
  523. '
  524. ' *****  key types  *****
  525. '
  526.   $$KeyTypeVirtualKey   = 0
  527.   $$KeyTypeAscii        = 1
  528.   $$KeyTypeUnicode      = 2
  529. '
  530. ' *****  ASCII "control" characters  *****
  531. '
  532.   $$AsciiAlarm          = 0x07    ' \a
  533.   $$AsciiBell           = 0x07    ' \a
  534.   $$AsciiBackspace      = 0x08    ' \b
  535.   $$AsciiTab            = 0x09    ' \t
  536.   $$AsciiLinefeed       = 0x0A    ' \n
  537.   $$AsciiNewline        = 0x0A    ' \n
  538.   $$AsciiVerticalTab    = 0x0B    ' \v
  539.   $$AsciiFormFeed       = 0x0C    ' \f
  540.   $$AsciiEnter          = 0x0D    ' \r
  541.   $$AsciiReturn         = 0x0D    ' \r
  542.   $$AsciiEscape         = 0x1B    '  \e
  543.   $$AsciiDelete         = 0x7F    ' \d
  544. '
  545. ' *****  virtual key codes  *****
  546. '
  547.   $$VirtualKey          = BITFIELD (8,24)
  548.   $$KeyLeftButton       = 0x01
  549.   $$KeyRightButton      = 0x02
  550.   $$KeyBreak            = 0x03
  551.   $$KeyMiddleButton     = 0x04
  552.   $$KeyBackspace        = 0x08
  553.   $$KeyTab              = 0x09
  554.   $$KeyClear            = 0x0C
  555.   $$KeyEnter            = 0x0D
  556.   $$KeyShift            = 0x10
  557.   $$KeyControl          = 0x11
  558.   $$KeyAlt              = 0x12
  559.   $$KeyPause            = 0x13
  560.   $$KeyCapLock          = 0x14
  561.   $$KeyEscape           = 0x1B
  562.   $$KeyControlA         = 0x01
  563.   $$KeyControlB         = 0x02
  564.   $$KeyControlC         = 0x03
  565.   $$KeyControlD         = 0x04
  566.   $$KeyControlE         = 0x05
  567.   $$KeyControlF         = 0x06
  568.   $$KeyControlG         = 0x07
  569.   $$KeyControlH         = 0x08
  570.   $$KeyControlI         = 0x09
  571.   $$KeyControlJ         = 0x0A
  572.   $$KeyControlK         = 0x0B
  573.   $$KeyControlL         = 0x0C
  574.   $$KeyControlM         = 0x0D
  575.   $$KeyControlN         = 0x0E
  576.   $$KeyControlO         = 0x0F
  577.   $$KeyControlP         = 0x10
  578.   $$KeyControlQ         = 0x11
  579.   $$KeyControlR         = 0x12
  580.   $$KeyControlS         = 0x13
  581.   $$KeyControlT         = 0x14
  582.   $$KeyControlU         = 0x15
  583.   $$KeyControlV         = 0x16
  584.   $$KeyControlW         = 0x17
  585.   $$KeyControlX         = 0x18
  586.   $$KeyControlY         = 0x19
  587.   $$KeyControlZ         = 0x1A
  588.   $$KeySpace            = 0x20
  589.   $$KeyPageUp           = 0x21
  590.   $$KeyPageDown         = 0x22
  591.   $$KeyEnd              = 0x23
  592.   $$KeyHome             = 0x24
  593.   $$KeyLeftArrow        = 0x25
  594.   $$KeyUpArrow          = 0x26
  595.   $$KeyRightArrow       = 0x27
  596.   $$KeyDownArrow        = 0x28
  597.   $$KeySelect           = 0x29
  598.   $$KeyExecute          = 0x2B
  599.   $$KeyPrintScreen      = 0x2C
  600.   $$KeyInsert           = 0x2D
  601.   $$KeyDelete           = 0x2E
  602.   $$KeyHelp             = 0x2F
  603.   $$Key0                = 0x30
  604.   $$Key1                = 0x31
  605.   $$Key2                = 0x32
  606.   $$Key3                = 0x33
  607.   $$Key4                = 0x34
  608.   $$Key5                = 0x35
  609.   $$Key6                = 0x36
  610.   $$Key7                = 0x37
  611.   $$Key8                = 0x38
  612.   $$Key9                = 0x39
  613.   $$KeyA                = 0x41
  614.   $$KeyB                = 0x42
  615.   $$KeyC                = 0x43
  616.   $$KeyD                = 0x44
  617.   $$KeyE                = 0x45
  618.   $$KeyF                = 0x46
  619.   $$KeyG                = 0x47
  620.   $$KeyH                = 0x48
  621.   $$KeyI                = 0x49
  622.   $$KeyJ                = 0x4A
  623.   $$KeyK                = 0x4B
  624.   $$KeyL                = 0x4C
  625.   $$KeyM                = 0x4D
  626.   $$KeyN                = 0x4E
  627.   $$KeyO                = 0x4F
  628.   $$KeyP                = 0x50
  629.   $$KeyQ                = 0x51
  630.   $$KeyR                = 0x52
  631.   $$KeyS                = 0x53
  632.   $$KeyT                = 0x54
  633.   $$KeyU                = 0x55
  634.   $$KeyV                = 0x56
  635.   $$KeyW                = 0x57
  636.   $$KeyX                = 0x58
  637.   $$KeyY                = 0x59
  638.   $$KeyZ                = 0x5A
  639.   $$KeyLeftWindow       = 0x5B
  640.   $$KeyRightWindow      = 0x5C
  641.   $$KeyApps             = 0x5D
  642.   $$KeyPad0             = 0x60
  643.   $$KeyPad1             = 0x61
  644.   $$KeyPad2             = 0x62
  645.   $$KeyPad3             = 0x63
  646.   $$KeyPad4             = 0x64
  647.   $$KeyPad5             = 0x65
  648.   $$KeyPad6             = 0x66
  649.   $$KeyPad7             = 0x67
  650.   $$KeyPad8             = 0x68
  651.   $$KeyPad9             = 0x69
  652.   $$KeyPadMultiply      = 0x6A
  653.   $$KeyPadAdd           = 0x6B
  654.   $$KeyPadSubtract      = 0x6D
  655.   $$KeyPadDecimalPoint  = 0x6E
  656.   $$KeyPadDivide        = 0x6F
  657.   $$KeyF1               = 0x70
  658.   $$KeyF2               = 0x71
  659.   $$KeyF3               = 0x72
  660.   $$KeyF4               = 0x73
  661.   $$KeyF5               = 0x74
  662.   $$KeyF6               = 0x75
  663.   $$KeyF7               = 0x76
  664.   $$KeyF8               = 0x77
  665.   $$KeyF9               = 0x78
  666.   $$KeyF10              = 0x79
  667.   $$KeyF11              = 0x7A
  668.   $$KeyF12              = 0x7B
  669.   $$KeyF13              = 0x7C
  670.   $$KeyF14              = 0x7D
  671.   $$KeyF15              = 0x7E
  672.   $$KeyF16              = 0x7F
  673.   $$KeyF17              = 0x80
  674.   $$KeyF18              = 0x81
  675.   $$KeyF19              = 0x82
  676.   $$KeyF20              = 0x83
  677.   $$KeyF21              = 0x84
  678.   $$KeyF22              = 0x85
  679.   $$KeyF23              = 0x86
  680.   $$KeyF24              = 0x87
  681.   $$KeyNumLock          = 0x90
  682.   $$KeyScroll           = 0x91
  683.   $$KeyLeftShift        = 0xA0
  684.   $$KeyRightShift       = 0xA1
  685.   $$KeyLeftControl      = 0xA2
  686.   $$KeyRightControl     = 0xA3
  687.   $$KeyLeftMenu         = 0xA4
  688.   $$KeyRightMenu        = 0xA5
  689.