fxruby 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (692) hide show
  1. data/ANNOUNCE +25 -0
  2. data/ChangeLog +10606 -0
  3. data/INSTALL +50 -0
  4. data/LICENSE +456 -0
  5. data/README +39 -0
  6. data/doc/apes02.html +21 -0
  7. data/doc/apes03.html +39 -0
  8. data/doc/book.html +3 -0
  9. data/doc/build.html +144 -0
  10. data/doc/ch03s02.html +24 -0
  11. data/doc/ch03s03.html +53 -0
  12. data/doc/ch03s04.html +37 -0
  13. data/doc/ch03s05.html +61 -0
  14. data/doc/ch04s02.html +72 -0
  15. data/doc/ch04s03.html +37 -0
  16. data/doc/ch04s04.html +72 -0
  17. data/doc/ch05s02.html +262 -0
  18. data/doc/ch05s03.html +128 -0
  19. data/doc/changes.html +75 -0
  20. data/doc/clipboardtut.html +68 -0
  21. data/doc/cvs.html +35 -0
  22. data/doc/differences.html +11 -0
  23. data/doc/dragdroptut.html +266 -0
  24. data/doc/events.html +36 -0
  25. data/doc/examples.html +104 -0
  26. data/doc/gems.html +73 -0
  27. data/doc/goals.html +39 -0
  28. data/doc/images/babelfish.png +0 -0
  29. data/doc/images/browser.png +0 -0
  30. data/doc/images/button.png +0 -0
  31. data/doc/images/call-chain-example.png +0 -0
  32. data/doc/images/colordialog.png +0 -0
  33. data/doc/images/datatarget.png +0 -0
  34. data/doc/images/dialog.png +0 -0
  35. data/doc/images/dilbert.png +0 -0
  36. data/doc/images/dirlist.png +0 -0
  37. data/doc/images/dropsite-droprejected.png +0 -0
  38. data/doc/images/foursplit.png +0 -0
  39. data/doc/images/gltest.png +0 -0
  40. data/doc/images/glviewer.png +0 -0
  41. data/doc/images/groupbox.png +0 -0
  42. data/doc/images/header.png +0 -0
  43. data/doc/images/hello-with-button.png +0 -0
  44. data/doc/images/hello-with-icon-1.png +0 -0
  45. data/doc/images/hello-with-icon-2.png +0 -0
  46. data/doc/images/hello-with-icon-3.png +0 -0
  47. data/doc/images/hello-with-tooltip.png +0 -0
  48. data/doc/images/hello-without-button.png +0 -0
  49. data/doc/images/hello.png +0 -0
  50. data/doc/images/hello2.png +0 -0
  51. data/doc/images/iconlist-bigicons.png +0 -0
  52. data/doc/images/iconlist-details.png +0 -0
  53. data/doc/images/image.png +0 -0
  54. data/doc/images/imageviewer.png +0 -0
  55. data/doc/images/inheritance.png +0 -0
  56. data/doc/images/mditest.png +0 -0
  57. data/doc/images/raabrowser.png +0 -0
  58. data/doc/images/scribble.png +0 -0
  59. data/doc/images/shutter.png +0 -0
  60. data/doc/images/splitter.png +0 -0
  61. data/doc/images/tabbook.png +0 -0
  62. data/doc/images/table.png +0 -0
  63. data/doc/images/tutorial1.png +0 -0
  64. data/doc/implementation.html +16 -0
  65. data/doc/infosources.html +33 -0
  66. data/doc/library.html +30 -0
  67. data/doc/opengl.html +73 -0
  68. data/doc/pt01.html +3 -0
  69. data/doc/pt02.html +3 -0
  70. data/doc/scintilla.html +36 -0
  71. data/doc/todo.html +40 -0
  72. data/doc/tutorial1.html +97 -0
  73. data/examples/RAA.rb +25 -0
  74. data/examples/README +53 -0
  75. data/examples/babelfish.rb +107 -0
  76. data/examples/bounce.rb +159 -0
  77. data/examples/browser.rb +191 -0
  78. data/examples/button.rb +160 -0
  79. data/examples/datatarget.rb +223 -0
  80. data/examples/dctest.rb +702 -0
  81. data/examples/dialog.rb +148 -0
  82. data/examples/dilbert.rb +105 -0
  83. data/examples/dirlist.rb +63 -0
  84. data/examples/dragdrop.rb +101 -0
  85. data/examples/dragsource.rb +81 -0
  86. data/examples/dropsite.rb +61 -0
  87. data/examples/foursplit.rb +103 -0
  88. data/examples/gltest.rb +342 -0
  89. data/examples/glviewer.rb +579 -0
  90. data/examples/groupbox.rb +422 -0
  91. data/examples/header.rb +150 -0
  92. data/examples/hello.rb +12 -0
  93. data/examples/hello2.rb +51 -0
  94. data/examples/iRAA.rb +153 -0
  95. data/examples/iconlist.rb +104 -0
  96. data/examples/icons/AngryGuyInBunnySuit.ico +0 -0
  97. data/examples/icons/FatBot.ico +0 -0
  98. data/examples/icons/FlippedySwitch.ico +0 -0
  99. data/examples/icons/LeGoon.ico +0 -0
  100. data/examples/icons/Net.ico +0 -0
  101. data/examples/icons/RedMacOS.ico +0 -0
  102. data/examples/icons/SawBlade.ico +0 -0
  103. data/examples/icons/backview.png +0 -0
  104. data/examples/icons/big.png +0 -0
  105. data/examples/icons/bigfolder.png +0 -0
  106. data/examples/icons/bigpenguin.png +0 -0
  107. data/examples/icons/bottomview.png +0 -0
  108. data/examples/icons/camera.png +0 -0
  109. data/examples/icons/capbutt.png +0 -0
  110. data/examples/icons/capnotlast.png +0 -0
  111. data/examples/icons/capproj.png +0 -0
  112. data/examples/icons/capround.png +0 -0
  113. data/examples/icons/colorpal.png +0 -0
  114. data/examples/icons/copy.png +0 -0
  115. data/examples/icons/cut.png +0 -0
  116. data/examples/icons/delimit.png +0 -0
  117. data/examples/icons/dippy.png +0 -0
  118. data/examples/icons/double_dash.png +0 -0
  119. data/examples/icons/filenew.png +0 -0
  120. data/examples/icons/fileopen.png +0 -0
  121. data/examples/icons/filesave.png +0 -0
  122. data/examples/icons/filesaveas.png +0 -0
  123. data/examples/icons/fonts.png +0 -0
  124. data/examples/icons/fox.png +0 -0
  125. data/examples/icons/foxicon.png +0 -0
  126. data/examples/icons/frontview.png +0 -0
  127. data/examples/icons/gem_big.png +0 -0
  128. data/examples/icons/gem_small.png +0 -0
  129. data/examples/icons/hello2.png +0 -0
  130. data/examples/icons/help.png +0 -0
  131. data/examples/icons/indent.png +0 -0
  132. data/examples/icons/jbevel.png +0 -0
  133. data/examples/icons/jmiter.png +0 -0
  134. data/examples/icons/jround.png +0 -0
  135. data/examples/icons/kill.png +0 -0
  136. data/examples/icons/leftview.png +0 -0
  137. data/examples/icons/light.png +0 -0
  138. data/examples/icons/minidoc.png +0 -0
  139. data/examples/icons/minifolder.png +0 -0
  140. data/examples/icons/minifolderopen.png +0 -0
  141. data/examples/icons/newfolder.png +0 -0
  142. data/examples/icons/nolight.png +0 -0
  143. data/examples/icons/onoff_dash.png +0 -0
  144. data/examples/icons/palette.png +0 -0
  145. data/examples/icons/parallel.png +0 -0
  146. data/examples/icons/paste.png +0 -0
  147. data/examples/icons/pattern.png +0 -0
  148. data/examples/icons/penguin.png +0 -0
  149. data/examples/icons/perspective.png +0 -0
  150. data/examples/icons/printicon.png +0 -0
  151. data/examples/icons/prop.png +0 -0
  152. data/examples/icons/redo.png +0 -0
  153. data/examples/icons/rightview.png +0 -0
  154. data/examples/icons/saveas.png +0 -0
  155. data/examples/icons/shutter1.png +0 -0
  156. data/examples/icons/shutter2.png +0 -0
  157. data/examples/icons/small.png +0 -0
  158. data/examples/icons/smoothlight.png +0 -0
  159. data/examples/icons/solid_line.png +0 -0
  160. data/examples/icons/tbuplevel.png +0 -0
  161. data/examples/icons/topview.png +0 -0
  162. data/examples/icons/undo.png +0 -0
  163. data/examples/icons/winapp.png +0 -0
  164. data/examples/icons/zoom.png +0 -0
  165. data/examples/image.rb +281 -0
  166. data/examples/imageviewer.rb +513 -0
  167. data/examples/inputs.rb +84 -0
  168. data/examples/mditest.rb +180 -0
  169. data/examples/pig.rb +77 -0
  170. data/examples/raabrowser.rb +132 -0
  171. data/examples/scintilla-test.rb +81 -0
  172. data/examples/scribble-orig.rb +186 -0
  173. data/examples/scribble.rb +166 -0
  174. data/examples/shutter.rb +158 -0
  175. data/examples/splitter.rb +211 -0
  176. data/examples/styledtext.rb +92 -0
  177. data/examples/tabbook.rb +124 -0
  178. data/examples/table.rb +187 -0
  179. data/examples/textedit/commands.rb +117 -0
  180. data/examples/textedit/helpwindow.rb +295 -0
  181. data/examples/textedit/prefdialog.rb +235 -0
  182. data/examples/textedit/textedit.rb +1767 -0
  183. data/ext/fox12/FXRbApp.cpp +127 -0
  184. data/ext/fox12/FXRbDataTarget.cpp +106 -0
  185. data/ext/fox12/FXRbGLViewer.cpp +89 -0
  186. data/ext/fox12/FXRuby.cpp +1818 -0
  187. data/ext/fox12/MANIFEST +189 -0
  188. data/ext/fox12/core_wrap.cpp +10119 -0
  189. data/ext/fox12/dc_wrap.cpp +2638 -0
  190. data/ext/fox12/dialogs_wrap.cpp +6244 -0
  191. data/ext/fox12/extconf.rb +176 -0
  192. data/ext/fox12/frames_wrap.cpp +8274 -0
  193. data/ext/fox12/fx3d_wrap.cpp +9315 -0
  194. data/ext/fox12/iconlist_wrap.cpp +3742 -0
  195. data/ext/fox12/icons_wrap.cpp +4040 -0
  196. data/ext/fox12/image_wrap.cpp +4026 -0
  197. data/ext/fox12/impl.cpp +1064 -0
  198. data/ext/fox12/include/FXMemoryBuffer.h +52 -0
  199. data/ext/fox12/include/FXRb4Splitter.h +54 -0
  200. data/ext/fox12/include/FXRbAccelTable.h +46 -0
  201. data/ext/fox12/include/FXRbApp.h +137 -0
  202. data/ext/fox12/include/FXRbAppVirtuals.h +15 -0
  203. data/ext/fox12/include/FXRbArrowButton.h +51 -0
  204. data/ext/fox12/include/FXRbBMPIcon.h +54 -0
  205. data/ext/fox12/include/FXRbBMPImage.h +54 -0
  206. data/ext/fox12/include/FXRbBitmap.h +115 -0
  207. data/ext/fox12/include/FXRbBitmapFrame.h +56 -0
  208. data/ext/fox12/include/FXRbBitmapView.h +52 -0
  209. data/ext/fox12/include/FXRbBitmapVirtuals.h +27 -0
  210. data/ext/fox12/include/FXRbButton.h +51 -0
  211. data/ext/fox12/include/FXRbCURCursor.h +60 -0
  212. data/ext/fox12/include/FXRbCanvas.h +51 -0
  213. data/ext/fox12/include/FXRbCheckButton.h +51 -0
  214. data/ext/fox12/include/FXRbColorBar.h +51 -0
  215. data/ext/fox12/include/FXRbColorDialog.h +53 -0
  216. data/ext/fox12/include/FXRbColorSelector.h +51 -0
  217. data/ext/fox12/include/FXRbColorWell.h +51 -0
  218. data/ext/fox12/include/FXRbColorWheel.h +51 -0
  219. data/ext/fox12/include/FXRbComboBox.h +56 -0
  220. data/ext/fox12/include/FXRbCommon.h +86 -0
  221. data/ext/fox12/include/FXRbComposite.h +51 -0
  222. data/ext/fox12/include/FXRbCursor.h +87 -0
  223. data/ext/fox12/include/FXRbCursorVirtuals.h +6 -0
  224. data/ext/fox12/include/FXRbDC.h +385 -0
  225. data/ext/fox12/include/FXRbDCPrint.h +49 -0
  226. data/ext/fox12/include/FXRbDCVirtuals.h +166 -0
  227. data/ext/fox12/include/FXRbDCWindow.h +64 -0
  228. data/ext/fox12/include/FXRbDataTarget.h +65 -0
  229. data/ext/fox12/include/FXRbDebugTarget.h +46 -0
  230. data/ext/fox12/include/FXRbDelegator.h +46 -0
  231. data/ext/fox12/include/FXRbDial.h +51 -0
  232. data/ext/fox12/include/FXRbDialogBox.h +68 -0
  233. data/ext/fox12/include/FXRbDialogBoxVirtuals.h +3 -0
  234. data/ext/fox12/include/FXRbDict.h +46 -0
  235. data/ext/fox12/include/FXRbDirBox.h +51 -0
  236. data/ext/fox12/include/FXRbDirDialog.h +53 -0
  237. data/ext/fox12/include/FXRbDirList.h +79 -0
  238. data/ext/fox12/include/FXRbDirSelector.h +51 -0
  239. data/ext/fox12/include/FXRbDocument.h +46 -0
  240. data/ext/fox12/include/FXRbDragCorner.h +51 -0
  241. data/ext/fox12/include/FXRbDrawable.h +64 -0
  242. data/ext/fox12/include/FXRbDrawableVirtuals.h +3 -0
  243. data/ext/fox12/include/FXRbDriveBox.h +51 -0
  244. data/ext/fox12/include/FXRbFileDialog.h +56 -0
  245. data/ext/fox12/include/FXRbFileDict.h +104 -0
  246. data/ext/fox12/include/FXRbFileDictVirtuals.h +9 -0
  247. data/ext/fox12/include/FXRbFileList.h +81 -0
  248. data/ext/fox12/include/FXRbFileSelector.h +51 -0
  249. data/ext/fox12/include/FXRbFoldingItemVirtuals.h +45 -0
  250. data/ext/fox12/include/FXRbFoldingList.h +183 -0
  251. data/ext/fox12/include/FXRbFont.h +70 -0
  252. data/ext/fox12/include/FXRbFontDialog.h +53 -0
  253. data/ext/fox12/include/FXRbFontSelector.h +51 -0
  254. data/ext/fox12/include/FXRbFrame.h +51 -0
  255. data/ext/fox12/include/FXRbGIFCursor.h +60 -0
  256. data/ext/fox12/include/FXRbGIFIcon.h +54 -0
  257. data/ext/fox12/include/FXRbGIFImage.h +54 -0
  258. data/ext/fox12/include/FXRbGLCanvas.h +92 -0
  259. data/ext/fox12/include/FXRbGLCanvasVirtuals.h +13 -0
  260. data/ext/fox12/include/FXRbGLContext.h +58 -0
  261. data/ext/fox12/include/FXRbGLObject.h +103 -0
  262. data/ext/fox12/include/FXRbGLObjectVirtuals.h +22 -0
  263. data/ext/fox12/include/FXRbGLShape.h +81 -0
  264. data/ext/fox12/include/FXRbGLShapeVirtuals.h +8 -0
  265. data/ext/fox12/include/FXRbGLViewer.h +83 -0
  266. data/ext/fox12/include/FXRbGLViewerVirtuals.h +6 -0
  267. data/ext/fox12/include/FXRbGLVisual.h +56 -0
  268. data/ext/fox12/include/FXRbGradientBar.h +55 -0
  269. data/ext/fox12/include/FXRbGroupBox.h +51 -0
  270. data/ext/fox12/include/FXRbHeader.h +125 -0
  271. data/ext/fox12/include/FXRbHeaderItemVirtuals.h +22 -0
  272. data/ext/fox12/include/FXRbHorizontalFrame.h +51 -0
  273. data/ext/fox12/include/FXRbICOIcon.h +54 -0
  274. data/ext/fox12/include/FXRbICOImage.h +54 -0
  275. data/ext/fox12/include/FXRbIcon.h +57 -0
  276. data/ext/fox12/include/FXRbIconItemVirtuals.h +71 -0
  277. data/ext/fox12/include/FXRbIconList.h +266 -0
  278. data/ext/fox12/include/FXRbIconListVirtuals.h +21 -0
  279. data/ext/fox12/include/FXRbId.h +74 -0
  280. data/ext/fox12/include/FXRbIdVirtuals.h +9 -0
  281. data/ext/fox12/include/FXRbImage.h +162 -0
  282. data/ext/fox12/include/FXRbImageFrame.h +56 -0
  283. data/ext/fox12/include/FXRbImageView.h +52 -0
  284. data/ext/fox12/include/FXRbImageVirtuals.h +51 -0
  285. data/ext/fox12/include/FXRbInputDialog.h +53 -0
  286. data/ext/fox12/include/FXRbJPGIcon.h +54 -0
  287. data/ext/fox12/include/FXRbJPGImage.h +54 -0
  288. data/ext/fox12/include/FXRbLabel.h +51 -0
  289. data/ext/fox12/include/FXRbList.h +204 -0
  290. data/ext/fox12/include/FXRbListBox.h +56 -0
  291. data/ext/fox12/include/FXRbListItemVirtuals.h +36 -0
  292. data/ext/fox12/include/FXRbListVirtuals.h +18 -0
  293. data/ext/fox12/include/FXRbMDIButton.h +162 -0
  294. data/ext/fox12/include/FXRbMDIChild.h +82 -0
  295. data/ext/fox12/include/FXRbMDIChildVirtuals.h +12 -0
  296. data/ext/fox12/include/FXRbMDIClient.h +80 -0
  297. data/ext/fox12/include/FXRbMDIClientVirtuals.h +12 -0
  298. data/ext/fox12/include/FXRbMainWindow.h +54 -0
  299. data/ext/fox12/include/FXRbMatrix.h +51 -0
  300. data/ext/fox12/include/FXRbMenuBar.h +63 -0
  301. data/ext/fox12/include/FXRbMenuButton.h +51 -0
  302. data/ext/fox12/include/FXRbMenuCaption.h +51 -0
  303. data/ext/fox12/include/FXRbMenuCascade.h +51 -0
  304. data/ext/fox12/include/FXRbMenuCheck.h +49 -0
  305. data/ext/fox12/include/FXRbMenuCommand.h +49 -0
  306. data/ext/fox12/include/FXRbMenuPane.h +52 -0
  307. data/ext/fox12/include/FXRbMenuRadio.h +49 -0
  308. data/ext/fox12/include/FXRbMenuSeparator.h +51 -0
  309. data/ext/fox12/include/FXRbMenuTitle.h +51 -0
  310. data/ext/fox12/include/FXRbMessageBox.h +56 -0
  311. data/ext/fox12/include/FXRbObject.h +67 -0
  312. data/ext/fox12/include/FXRbObjectVirtuals.h +9 -0
  313. data/ext/fox12/include/FXRbOptionMenu.h +73 -0
  314. data/ext/fox12/include/FXRbPCXIcon.h +54 -0
  315. data/ext/fox12/include/FXRbPCXImage.h +54 -0
  316. data/ext/fox12/include/FXRbPNGIcon.h +54 -0
  317. data/ext/fox12/include/FXRbPNGImage.h +54 -0
  318. data/ext/fox12/include/FXRbPPMIcon.h +54 -0
  319. data/ext/fox12/include/FXRbPPMImage.h +54 -0
  320. data/ext/fox12/include/FXRbPacker.h +51 -0
  321. data/ext/fox12/include/FXRbPicker.h +51 -0
  322. data/ext/fox12/include/FXRbPopup.h +70 -0
  323. data/ext/fox12/include/FXRbPopupVirtuals.h +6 -0
  324. data/ext/fox12/include/FXRbPrintDialog.h +53 -0
  325. data/ext/fox12/include/FXRbProgressBar.h +51 -0
  326. data/ext/fox12/include/FXRbProgressDialog.h +53 -0
  327. data/ext/fox12/include/FXRbRGBIcon.h +54 -0
  328. data/ext/fox12/include/FXRbRGBImage.h +54 -0
  329. data/ext/fox12/include/FXRbRadioButton.h +51 -0
  330. data/ext/fox12/include/FXRbRealSlider.h +51 -0
  331. data/ext/fox12/include/FXRbRealSpinner.h +64 -0
  332. data/ext/fox12/include/FXRbRealSpinnerVirtuals.h +3 -0
  333. data/ext/fox12/include/FXRbRecentFiles.h +49 -0
  334. data/ext/fox12/include/FXRbRegistry.h +46 -0
  335. data/ext/fox12/include/FXRbReplaceDialog.h +53 -0
  336. data/ext/fox12/include/FXRbRootWindow.h +51 -0
  337. data/ext/fox12/include/FXRbRuler.h +56 -0
  338. data/ext/fox12/include/FXRbScintilla.h +52 -0
  339. data/ext/fox12/include/FXRbScrollArea.h +82 -0
  340. data/ext/fox12/include/FXRbScrollAreaVirtuals.h +13 -0
  341. data/ext/fox12/include/FXRbScrollBar.h +73 -0
  342. data/ext/fox12/include/FXRbScrollPane.h +52 -0
  343. data/ext/fox12/include/FXRbScrollWindow.h +52 -0
  344. data/ext/fox12/include/FXRbSearchDialog.h +53 -0
  345. data/ext/fox12/include/FXRbSeparator.h +95 -0
  346. data/ext/fox12/include/FXRbSettings.h +46 -0
  347. data/ext/fox12/include/FXRbShell.h +56 -0
  348. data/ext/fox12/include/FXRbShutter.h +86 -0
  349. data/ext/fox12/include/FXRbShutterVirtuals.h +3 -0
  350. data/ext/fox12/include/FXRbSlider.h +51 -0
  351. data/ext/fox12/include/FXRbSpinner.h +64 -0
  352. data/ext/fox12/include/FXRbSpinnerVirtuals.h +3 -0
  353. data/ext/fox12/include/FXRbSplitter.h +54 -0
  354. data/ext/fox12/include/FXRbSpring.h +51 -0
  355. data/ext/fox12/include/FXRbStatusBar.h +51 -0
  356. data/ext/fox12/include/FXRbStatusLine.h +51 -0
  357. data/ext/fox12/include/FXRbStream.h +101 -0
  358. data/ext/fox12/include/FXRbStreamVirtuals.h +9 -0
  359. data/ext/fox12/include/FXRbStringDict.h +46 -0
  360. data/ext/fox12/include/FXRbSwitcher.h +51 -0
  361. data/ext/fox12/include/FXRbTGAIcon.h +54 -0
  362. data/ext/fox12/include/FXRbTGAImage.h +54 -0
  363. data/ext/fox12/include/FXRbTIFIcon.h +54 -0
  364. data/ext/fox12/include/FXRbTIFImage.h +54 -0
  365. data/ext/fox12/include/FXRbTabBar.h +64 -0
  366. data/ext/fox12/include/FXRbTabBarVirtuals.h +3 -0
  367. data/ext/fox12/include/FXRbTabBook.h +52 -0
  368. data/ext/fox12/include/FXRbTabItem.h +51 -0
  369. data/ext/fox12/include/FXRbTable.h +416 -0
  370. data/ext/fox12/include/FXRbTableItemVirtuals.h +68 -0
  371. data/ext/fox12/include/FXRbTableVirtuals.h +73 -0
  372. data/ext/fox12/include/FXRbText.h +89 -0
  373. data/ext/fox12/include/FXRbTextField.h +51 -0
  374. data/ext/fox12/include/FXRbTextVirtuals.h +9 -0
  375. data/ext/fox12/include/FXRbToggleButton.h +51 -0
  376. data/ext/fox12/include/FXRbToolBar.h +80 -0
  377. data/ext/fox12/include/FXRbToolBarGrip.h +51 -0
  378. data/ext/fox12/include/FXRbToolBarShell.h +52 -0
  379. data/ext/fox12/include/FXRbToolBarTab.h +51 -0
  380. data/ext/fox12/include/FXRbToolBarVirtuals.h +6 -0
  381. data/ext/fox12/include/FXRbToolTip.h +51 -0
  382. data/ext/fox12/include/FXRbTopWindow.h +91 -0
  383. data/ext/fox12/include/FXRbTopWindowVirtuals.h +15 -0
  384. data/ext/fox12/include/FXRbTreeItemVirtuals.h +42 -0
  385. data/ext/fox12/include/FXRbTreeList.h +249 -0
  386. data/ext/fox12/include/FXRbTreeListBox.h +53 -0
  387. data/ext/fox12/include/FXRbTreeListVirtuals.h +30 -0
  388. data/ext/fox12/include/FXRbTriStateButton.h +51 -0
  389. data/ext/fox12/include/FXRbVerticalFrame.h +51 -0
  390. data/ext/fox12/include/FXRbVisual.h +56 -0
  391. data/ext/fox12/include/FXRbWindow.h +200 -0
  392. data/ext/fox12/include/FXRbWindowVirtuals.h +69 -0
  393. data/ext/fox12/include/FXRbWizard.h +60 -0
  394. data/ext/fox12/include/FXRbXBMIcon.h +54 -0
  395. data/ext/fox12/include/FXRbXBMImage.h +54 -0
  396. data/ext/fox12/include/FXRbXPMIcon.h +54 -0
  397. data/ext/fox12/include/FXRbXPMImage.h +54 -0
  398. data/ext/fox12/include/FXRuby.h +728 -0
  399. data/ext/fox12/include/impl.h +201 -0
  400. data/ext/fox12/include/inlinestubs.h +1063 -0
  401. data/ext/fox12/label_wrap.cpp +4945 -0
  402. data/ext/fox12/layout_wrap.cpp +5061 -0
  403. data/ext/fox12/librb.c +636 -0
  404. data/ext/fox12/list_wrap.cpp +2212 -0
  405. data/ext/fox12/markfuncs.cpp +1568 -0
  406. data/ext/fox12/mdi_wrap.cpp +4521 -0
  407. data/ext/fox12/menu_wrap.cpp +4673 -0
  408. data/ext/fox12/scintilla_wrap.cpp +2245 -0
  409. data/ext/fox12/table_wrap.cpp +3581 -0
  410. data/ext/fox12/text_wrap.cpp +3539 -0
  411. data/ext/fox12/treelist_wrap.cpp +5609 -0
  412. data/ext/fox12/ui_wrap.cpp +10017 -0
  413. data/index.html +14 -0
  414. data/lib/fox12/aliases.rb +5211 -0
  415. data/lib/fox12/calendar.rb +218 -0
  416. data/lib/fox12/chore.rb +51 -0
  417. data/lib/fox12/colors.rb +282 -0
  418. data/lib/fox12/core.rb +249 -0
  419. data/lib/fox12/dict.rb +35 -0
  420. data/lib/fox12/glgroup.rb +165 -0
  421. data/lib/fox12/glshapes.rb +457 -0
  422. data/lib/fox12/input.rb +56 -0
  423. data/lib/fox12/irb.rb +179 -0
  424. data/lib/fox12/iterators.rb +331 -0
  425. data/lib/fox12/keys.rb +1376 -0
  426. data/lib/fox12/missingdep.rb +16 -0
  427. data/lib/fox12/pseudokeyboard.rb +36 -0
  428. data/lib/fox12/pseudomouse.rb +84 -0
  429. data/lib/fox12/responder.rb +72 -0
  430. data/lib/fox12/responder2.rb +122 -0
  431. data/lib/fox12/scintilla.rb +2629 -0
  432. data/lib/fox12/settings.rb +18 -0
  433. data/lib/fox12/signal.rb +68 -0
  434. data/lib/fox12/timeout.rb +58 -0
  435. data/lib/fox12/undolist.rb +456 -0
  436. data/lib/fox12/version.rb +11 -0
  437. data/rdoc-sources/FX4Splitter.rb +138 -0
  438. data/rdoc-sources/FXAccelTable.rb +67 -0
  439. data/rdoc-sources/FXApp.rb +557 -0
  440. data/rdoc-sources/FXArrowButton.rb +69 -0
  441. data/rdoc-sources/FXBMPIcon.rb +45 -0
  442. data/rdoc-sources/FXBMPImage.rb +20 -0
  443. data/rdoc-sources/FXBitmap.rb +78 -0
  444. data/rdoc-sources/FXBitmapFrame.rb +29 -0
  445. data/rdoc-sources/FXBitmapView.rb +41 -0
  446. data/rdoc-sources/FXButton.rb +43 -0
  447. data/rdoc-sources/FXCURCursor.rb +13 -0
  448. data/rdoc-sources/FXCanvas.rb +18 -0
  449. data/rdoc-sources/FXCheckButton.rb +57 -0
  450. data/rdoc-sources/FXColorBar.rb +43 -0
  451. data/rdoc-sources/FXColorDialog.rb +36 -0
  452. data/rdoc-sources/FXColorSelector.rb +65 -0
  453. data/rdoc-sources/FXColorWell.rb +57 -0
  454. data/rdoc-sources/FXColorWheel.rb +35 -0
  455. data/rdoc-sources/FXComboBox.rb +153 -0
  456. data/rdoc-sources/FXComposite.rb +34 -0
  457. data/rdoc-sources/FXCursor.rb +67 -0
  458. data/rdoc-sources/FXDC.rb +667 -0
  459. data/rdoc-sources/FXDCPrint.rb +127 -0
  460. data/rdoc-sources/FXDCWindow.rb +37 -0
  461. data/rdoc-sources/FXDataTarget.rb +41 -0
  462. data/rdoc-sources/FXDebugTarget.rb +25 -0
  463. data/rdoc-sources/FXDelegator.rb +23 -0
  464. data/rdoc-sources/FXDial.rb +68 -0
  465. data/rdoc-sources/FXDialogBox.rb +36 -0
  466. data/rdoc-sources/FXDict.rb +79 -0
  467. data/rdoc-sources/FXDirBox.rb +49 -0
  468. data/rdoc-sources/FXDirDialog.rb +18 -0
  469. data/rdoc-sources/FXDirList.rb +143 -0
  470. data/rdoc-sources/FXDirSelector.rb +30 -0
  471. data/rdoc-sources/FXDocument.rb +29 -0
  472. data/rdoc-sources/FXDragCorner.rb +19 -0
  473. data/rdoc-sources/FXDrawable.rb +27 -0
  474. data/rdoc-sources/FXDriveBox.rb +46 -0
  475. data/rdoc-sources/FXFileDialog.rb +132 -0
  476. data/rdoc-sources/FXFileDict.rb +168 -0
  477. data/rdoc-sources/FXFileList.rb +163 -0
  478. data/rdoc-sources/FXFileSelector.rb +148 -0
  479. data/rdoc-sources/FXFileStream.rb +24 -0
  480. data/rdoc-sources/FXFoldingList.rb +453 -0
  481. data/rdoc-sources/FXFont.rb +345 -0
  482. data/rdoc-sources/FXFontDialog.rb +14 -0
  483. data/rdoc-sources/FXFontSelector.rb +37 -0
  484. data/rdoc-sources/FXFrame.rb +47 -0
  485. data/rdoc-sources/FXGIFCursor.rb +38 -0
  486. data/rdoc-sources/FXGIFIcon.rb +21 -0
  487. data/rdoc-sources/FXGIFImage.rb +19 -0
  488. data/rdoc-sources/FXGLCanvas.rb +45 -0
  489. data/rdoc-sources/FXGLContext.rb +41 -0
  490. data/rdoc-sources/FXGLObject.rb +75 -0
  491. data/rdoc-sources/FXGLShape.rb +75 -0
  492. data/rdoc-sources/FXGLViewer.rb +309 -0
  493. data/rdoc-sources/FXGLVisual.rb +94 -0
  494. data/rdoc-sources/FXGradientBar.rb +291 -0
  495. data/rdoc-sources/FXGroupBox.rb +33 -0
  496. data/rdoc-sources/FXHeader.rb +377 -0
  497. data/rdoc-sources/FXHorizontalFrame.rb +29 -0
  498. data/rdoc-sources/FXICOIcon.rb +50 -0
  499. data/rdoc-sources/FXICOImage.rb +21 -0
  500. data/rdoc-sources/FXIcon.rb +38 -0
  501. data/rdoc-sources/FXIconList.rb +418 -0
  502. data/rdoc-sources/FXId.rb +34 -0
  503. data/rdoc-sources/FXImage.rb +198 -0
  504. data/rdoc-sources/FXImageFrame.rb +22 -0
  505. data/rdoc-sources/FXImageView.rb +35 -0
  506. data/rdoc-sources/FXInputDialog.rb +62 -0
  507. data/rdoc-sources/FXJPGIcon.rb +52 -0
  508. data/rdoc-sources/FXJPGImage.rb +25 -0
  509. data/rdoc-sources/FXLabel.rb +66 -0
  510. data/rdoc-sources/FXList.rb +412 -0
  511. data/rdoc-sources/FXListBox.rb +158 -0
  512. data/rdoc-sources/FXMDIButton.rb +67 -0
  513. data/rdoc-sources/FXMDIChild.rb +145 -0
  514. data/rdoc-sources/FXMDIClient.rb +67 -0
  515. data/rdoc-sources/FXMainWindow.rb +20 -0
  516. data/rdoc-sources/FXMat4.rb +171 -0
  517. data/rdoc-sources/FXMatrix.rb +57 -0
  518. data/rdoc-sources/FXMemoryBuffer.rb +19 -0
  519. data/rdoc-sources/FXMemoryStream.rb +45 -0
  520. data/rdoc-sources/FXMenuBar.rb +23 -0
  521. data/rdoc-sources/FXMenuButton.rb +84 -0
  522. data/rdoc-sources/FXMenuCaption.rb +47 -0
  523. data/rdoc-sources/FXMenuCascade.rb +18 -0
  524. data/rdoc-sources/FXMenuCheck.rb +30 -0
  525. data/rdoc-sources/FXMenuCommand.rb +27 -0
  526. data/rdoc-sources/FXMenuPane.rb +13 -0
  527. data/rdoc-sources/FXMenuRadio.rb +30 -0
  528. data/rdoc-sources/FXMenuSeparator.rb +21 -0
  529. data/rdoc-sources/FXMenuTitle.rb +27 -0
  530. data/rdoc-sources/FXMessageBox.rb +77 -0
  531. data/rdoc-sources/FXObject.rb +22 -0
  532. data/rdoc-sources/FXOptionMenu.rb +76 -0
  533. data/rdoc-sources/FXPCXIcon.rb +48 -0
  534. data/rdoc-sources/FXPCXImage.rb +21 -0
  535. data/rdoc-sources/FXPNGIcon.rb +48 -0
  536. data/rdoc-sources/FXPNGImage.rb +21 -0
  537. data/rdoc-sources/FXPPMIcon.rb +21 -0
  538. data/rdoc-sources/FXPPMImage.rb +21 -0
  539. data/rdoc-sources/FXPacker.rb +62 -0
  540. data/rdoc-sources/FXPicker.rb +27 -0
  541. data/rdoc-sources/FXPopup.rb +53 -0
  542. data/rdoc-sources/FXPrintDialog.rb +36 -0
  543. data/rdoc-sources/FXProgressBar.rb +57 -0
  544. data/rdoc-sources/FXProgressDialog.rb +36 -0
  545. data/rdoc-sources/FXQuatd.rb +1 -0
  546. data/rdoc-sources/FXQuatf.rb +1 -0
  547. data/rdoc-sources/FXRGBIcon.rb +49 -0
  548. data/rdoc-sources/FXRGBImage.rb +21 -0
  549. data/rdoc-sources/FXRadioButton.rb +64 -0
  550. data/rdoc-sources/FXRanged.rb +97 -0
  551. data/rdoc-sources/FXRangef.rb +97 -0
  552. data/rdoc-sources/FXRealSlider.rb +99 -0
  553. data/rdoc-sources/FXRealSpinner.rb +133 -0
  554. data/rdoc-sources/FXRecentFiles.rb +73 -0
  555. data/rdoc-sources/FXRectangle.rb +137 -0
  556. data/rdoc-sources/FXRegion.rb +64 -0
  557. data/rdoc-sources/FXRegistry.rb +39 -0
  558. data/rdoc-sources/FXReplaceDialog.rb +56 -0
  559. data/rdoc-sources/FXRootWindow.rb +17 -0
  560. data/rdoc-sources/FXRuler.rb +60 -0
  561. data/rdoc-sources/FXScintilla.rb +121 -0
  562. data/rdoc-sources/FXScrollArea.rb +86 -0
  563. data/rdoc-sources/FXScrollBar.rb +101 -0
  564. data/rdoc-sources/FXScrollPane.rb +23 -0
  565. data/rdoc-sources/FXScrollWindow.rb +38 -0
  566. data/rdoc-sources/FXSearchDialog.rb +24 -0
  567. data/rdoc-sources/FXSeparator.rb +64 -0
  568. data/rdoc-sources/FXSettings.rb +222 -0
  569. data/rdoc-sources/FXShell.rb +7 -0
  570. data/rdoc-sources/FXShutter.rb +97 -0
  571. data/rdoc-sources/FXSize.rb +30 -0
  572. data/rdoc-sources/FXSlider.rb +96 -0
  573. data/rdoc-sources/FXSphered.rb +65 -0
  574. data/rdoc-sources/FXSpheref.rb +65 -0
  575. data/rdoc-sources/FXSpinner.rb +132 -0
  576. data/rdoc-sources/FXSplitter.rb +88 -0
  577. data/rdoc-sources/FXSpring.rb +61 -0
  578. data/rdoc-sources/FXStatusBar.rb +42 -0
  579. data/rdoc-sources/FXStatusLine.rb +60 -0
  580. data/rdoc-sources/FXStream.rb +115 -0
  581. data/rdoc-sources/FXStringDict.rb +38 -0
  582. data/rdoc-sources/FXSwitcher.rb +78 -0
  583. data/rdoc-sources/FXTGAIcon.rb +48 -0
  584. data/rdoc-sources/FXTGAImage.rb +21 -0
  585. data/rdoc-sources/FXTIFIcon.rb +52 -0
  586. data/rdoc-sources/FXTIFImage.rb +24 -0
  587. data/rdoc-sources/FXTabBar.rb +76 -0
  588. data/rdoc-sources/FXTabBook.rb +38 -0
  589. data/rdoc-sources/FXTabItem.rb +51 -0
  590. data/rdoc-sources/FXTable.rb +654 -0
  591. data/rdoc-sources/FXText.rb +533 -0
  592. data/rdoc-sources/FXTextField.rb +141 -0
  593. data/rdoc-sources/FXToggleButton.rb +69 -0
  594. data/rdoc-sources/FXToolBar.rb +121 -0
  595. data/rdoc-sources/FXToolBarGrip.rb +55 -0
  596. data/rdoc-sources/FXToolBarShell.rb +44 -0
  597. data/rdoc-sources/FXToolTip.rb +36 -0
  598. data/rdoc-sources/FXTopWindow.rb +92 -0
  599. data/rdoc-sources/FXTreeList.rb +503 -0
  600. data/rdoc-sources/FXTreeListBox.rb +182 -0
  601. data/rdoc-sources/FXTriStateButton.rb +49 -0
  602. data/rdoc-sources/FXVec.rb +97 -0
  603. data/rdoc-sources/FXVec4.rb +91 -0
  604. data/rdoc-sources/FXVerticalFrame.rb +29 -0
  605. data/rdoc-sources/FXVisual.rb +79 -0
  606. data/rdoc-sources/FXWindow.rb +633 -0
  607. data/rdoc-sources/FXWizard.rb +63 -0
  608. data/rdoc-sources/FXXBMIcon.rb +22 -0
  609. data/rdoc-sources/FXXBMImage.rb +22 -0
  610. data/rdoc-sources/FXXPMIcon.rb +50 -0
  611. data/rdoc-sources/FXXPMImage.rb +21 -0
  612. data/rdoc-sources/README.rdoc +53 -0
  613. data/rdoc-sources/fxdefs.rb +90 -0
  614. data/tests/README +19 -0
  615. data/tests/TC_FXAccelTable.rb +43 -0
  616. data/tests/TC_FXApp.rb +15 -0
  617. data/tests/TC_FXArc.rb +26 -0
  618. data/tests/TC_FXButton.rb +72 -0
  619. data/tests/TC_FXCheckButton.rb +57 -0
  620. data/tests/TC_FXComboBox.rb +36 -0
  621. data/tests/TC_FXDC.rb +372 -0
  622. data/tests/TC_FXDCPrint.rb +102 -0
  623. data/tests/TC_FXDCWindow.rb +23 -0
  624. data/tests/TC_FXDataTarget.rb +24 -0
  625. data/tests/TC_FXDirList.rb +30 -0
  626. data/tests/TC_FXFileAssoc.rb +62 -0
  627. data/tests/TC_FXFileStream.rb +90 -0
  628. data/tests/TC_FXFont.rb +59 -0
  629. data/tests/TC_FXFontDesc.rb +62 -0
  630. data/tests/TC_FXGLGroup.rb +32 -0
  631. data/tests/TC_FXGLShape.rb +28 -0
  632. data/tests/TC_FXGLViewer.rb +18 -0
  633. data/tests/TC_FXGradientBar.rb +89 -0
  634. data/tests/TC_FXHeader.rb +82 -0
  635. data/tests/TC_FXIconDict.rb +52 -0
  636. data/tests/TC_FXIconList.rb +192 -0
  637. data/tests/TC_FXId.rb +19 -0
  638. data/tests/TC_FXImage.rb +144 -0
  639. data/tests/TC_FXLight.rb +33 -0
  640. data/tests/TC_FXList.rb +116 -0
  641. data/tests/TC_FXListBox.rb +49 -0
  642. data/tests/TC_FXMat4f.rb +228 -0
  643. data/tests/TC_FXMaterial.rb +75 -0
  644. data/tests/TC_FXMemoryStream.rb +87 -0
  645. data/tests/TC_FXMenuCommand.rb +26 -0
  646. data/tests/TC_FXPoint.rb +57 -0
  647. data/tests/TC_FXQuatf.rb +77 -0
  648. data/tests/TC_FXRadioButton.rb +57 -0
  649. data/tests/TC_FXRangef.rb +48 -0
  650. data/tests/TC_FXRectangle.rb +88 -0
  651. data/tests/TC_FXRegion.rb +54 -0
  652. data/tests/TC_FXRegistry.rb +27 -0
  653. data/tests/TC_FXScrollArea.rb +28 -0
  654. data/tests/TC_FXScrollWindow.rb +28 -0
  655. data/tests/TC_FXSegment.rb +22 -0
  656. data/tests/TC_FXShell.rb +26 -0
  657. data/tests/TC_FXSize.rb +54 -0
  658. data/tests/TC_FXStream.rb +11 -0
  659. data/tests/TC_FXTable.rb +468 -0
  660. data/tests/TC_FXTableItem.rb +48 -0
  661. data/tests/TC_FXText.rb +81 -0
  662. data/tests/TC_FXTopWindow.rb +32 -0
  663. data/tests/TC_FXTreeList.rb +83 -0
  664. data/tests/TC_FXTreeListBox.rb +23 -0
  665. data/tests/TC_FXUndoList.rb +43 -0
  666. data/tests/TC_FXVec2d.rb +142 -0
  667. data/tests/TC_FXVec2f.rb +137 -0
  668. data/tests/TC_FXVec3d.rb +150 -0
  669. data/tests/TC_FXVec3f.rb +150 -0
  670. data/tests/TC_FXVec4f.rb +158 -0
  671. data/tests/TC_FXViewport.rb +30 -0
  672. data/tests/TC_Misc.rb +157 -0
  673. data/tests/TC_downcast.rb +15 -0
  674. data/tests/TS_All.rb +25 -0
  675. data/tests/blankpage.ps +166 -0
  676. data/tests/doit.rb +5 -0
  677. data/tests/howdypage.ps +181 -0
  678. data/tests/stress1.rb +94 -0
  679. data/tests/stress2.rb +51 -0
  680. data/tests/stress3.rb +117 -0
  681. data/tests/testcase.rb +38 -0
  682. data/web/art/fxrubylogo.png +0 -0
  683. data/web/art/fxrubylogo_small.png +0 -0
  684. data/web/art/line.gif +0 -0
  685. data/web/art/oul_grey.gif +0 -0
  686. data/web/art/our.gif +0 -0
  687. data/web/downloads.html +91 -0
  688. data/web/home.html +109 -0
  689. data/web/menu.html +50 -0
  690. data/web/styles.css +167 -0
  691. data/web/top.html +15 -0
  692. metadata +737 -0
@@ -0,0 +1,16 @@
1
+ # This is a little helper function used by some of the examples to report
2
+ # missing dependencies information on startup. It's especially useful for the
3
+ # Windows distribution since people will often start the examples by double-
4
+ # clicking on an icon instead of running from the command line.
5
+
6
+ require 'fox12'
7
+
8
+ def missingDependency(msg)
9
+ app = Fox::FXApp.new("Dummy", "FoxTest")
10
+ app.init(ARGV)
11
+ mainWindow = Fox::FXMainWindow.new(app, "")
12
+ app.create
13
+ Fox::FXMessageBox.error(mainWindow, Fox::MBOX_OK, "Dependencies Missing", msg)
14
+ raise SystemExit
15
+ end
16
+
@@ -0,0 +1,36 @@
1
+ require 'fox12'
2
+
3
+ module Fox
4
+ #
5
+ # Based on a suggestion from Hugh Sasse on the fxruby-users mailing list,
6
+ # an FXPseudoKeyboard object provides a simple means to operate widgets
7
+ # programmatically, to aid test driven design. An FXPseudoKeyboard instance
8
+ # can be pointed at an FXObject and will manage the sending of events to
9
+ # it.
10
+ #
11
+ class FXPseudoKeyboard
12
+
13
+ attr_accessor :target
14
+
15
+ def initialize(tgt=nil)
16
+ @target = tgt
17
+ end
18
+
19
+ def doKeyPress
20
+ unless @target.nil?
21
+ evt = FXEvent.new
22
+ evt.type = Fox::SEL_KEYPRESS
23
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_KEYPRESS), evt)
24
+ end
25
+ end
26
+
27
+ def doKeyRelease
28
+ unless @target.nil?
29
+ evt = FXEvent.new
30
+ evt.type = Fox::SEL_KEYRELEASE
31
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_KEYRELEASE), evt)
32
+ end
33
+ end
34
+ end
35
+ end
36
+
@@ -0,0 +1,84 @@
1
+ require 'fox12'
2
+
3
+ module Fox
4
+ #
5
+ # Based on a suggestion from Hugh Sasse on the fxruby-users mailing list,
6
+ # an FXPseudoMouse object provides a simple means to operate widgets
7
+ # programmatically, to aid test driven design. An FXPseudoMouse instance
8
+ # can be pointed at an FXObject and will manage the sending of events to
9
+ # it.
10
+ #
11
+ class FXPseudoMouse < FXObject
12
+
13
+ attr_accessor :target
14
+
15
+ def initialize(tgt=nil)
16
+ @target = tgt
17
+ end
18
+
19
+ def doMotion
20
+ unless @target.nil?
21
+ evt = FXEvent.new
22
+ evt.type = Fox::SEL_MOTION
23
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_MOTION), evt)
24
+ end
25
+ end
26
+
27
+ def doMouseWheel
28
+ unless @target.nil?
29
+ evt = FXEvent.new
30
+ evt.type = Fox::SEL_MOUSEWHEEL
31
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_MOUSEWHEEL), evt)
32
+ end
33
+ end
34
+
35
+ def doLeftButtonPress
36
+ unless @target.nil?
37
+ evt = FXEvent.new
38
+ evt.type = Fox::SEL_LEFTBUTTONPRESS
39
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_LEFTBUTTONPRESS), evt)
40
+ end
41
+ end
42
+
43
+ def doLeftButtonRelease
44
+ unless @target.nil?
45
+ evt = FXEvent.new
46
+ evt.type = Fox::SEL_LEFTBUTTONRELEASE
47
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_LEFTBUTTONRELEASE), evt)
48
+ end
49
+ end
50
+
51
+ def doMiddleButtonPress
52
+ unless @target.nil?
53
+ evt = FXEvent.new
54
+ evt.type = Fox::SEL_MIDDLEBUTTONPRESS
55
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_MIDDLEBUTTONPRESS), evt)
56
+ end
57
+ end
58
+
59
+ def doMiddleButtonRelease
60
+ unless @target.nil?
61
+ evt = FXEvent.new
62
+ evt.type = Fox::SEL_MIDDLEBUTTONRELEASE
63
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_MIDDLEBUTTONRELEASE), evt)
64
+ end
65
+ end
66
+
67
+ def doRightButtonPress
68
+ unless @target.nil?
69
+ evt = FXEvent.new
70
+ evt.type = Fox::SEL_RIGHTBUTTONPRESS
71
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_RIGHTBUTTONPRESS), evt)
72
+ end
73
+ end
74
+
75
+ def doRightButtonRelease
76
+ unless @target.nil?
77
+ evt = FXEvent.new
78
+ evt.type = Fox::SEL_RIGHTBUTTONRELEASE
79
+ @target.handle(self, Fox.MKUINT(0, Fox::SEL_RIGHTBUTTONRELEASE), evt)
80
+ end
81
+ end
82
+ end
83
+ end
84
+
@@ -0,0 +1,72 @@
1
+ require 'fox12'
2
+
3
+ # Enumeration
4
+ def enum(start, count)
5
+ (start...(start+count)).to_a
6
+ end
7
+
8
+ module Responder
9
+ # Generates identifiers as class constants. Originally submitted by
10
+ # Sean O'Halpin, slightly modified by Lyle.
11
+ def identifier(*ids)
12
+ ids << :ID_LAST
13
+ base = self.class.superclass::ID_LAST
14
+ vals = enum(base, ids.size)
15
+ ids.each_index do |i|
16
+ unless self.class.const_defined?(ids[i])
17
+ self.class.class_eval("#{ids[i].id2name} = #{vals[i]}")
18
+ end
19
+ end
20
+ end
21
+
22
+ # Return the array of (selector -> func) associations
23
+ def messageMap
24
+ unless instance_variables.include? "@assocs"
25
+ @assocs = []
26
+ end
27
+ @assocs
28
+ end
29
+
30
+ # Look up array index of this message map entry
31
+ def assocIndex(lo, hi)
32
+ currIndex = -1
33
+ assocs = messageMap
34
+ assocs.each_index do |i|
35
+ if assocs[i][0] == lo && assocs[i][1] == hi
36
+ currIndex = i
37
+ end
38
+ end
39
+ currIndex
40
+ end
41
+
42
+ # Add new or replace existing map entry
43
+ def addMapEntry(lo, hi, func)
44
+ func = func.intern if func.is_a? String
45
+ currIndex = assocIndex(lo, hi)
46
+ if currIndex < 0
47
+ messageMap.push([lo, hi, func])
48
+ else
49
+ messageMap[currIndex] = [lo, hi, func]
50
+ end
51
+ end
52
+
53
+ # Define range of function types
54
+ def FXMAPTYPES(typelo, typehi, func)
55
+ addMapEntry(Fox.MKUINT(Fox::MINKEY, typelo), Fox.MKUINT(Fox::MAXKEY, typehi), func)
56
+ end
57
+
58
+ # Define one function type
59
+ def FXMAPTYPE(type, func)
60
+ addMapEntry(Fox.MKUINT(Fox::MINKEY, type), Fox.MKUINT(Fox::MAXKEY, type), func)
61
+ end
62
+
63
+ # Define range of functions
64
+ def FXMAPFUNCS(type, keylo, keyhi, func)
65
+ addMapEntry(Fox.MKUINT(keylo, type), Fox.MKUINT(keyhi, type), func)
66
+ end
67
+
68
+ # Define one function
69
+ def FXMAPFUNC(type, id, func)
70
+ addMapEntry(Fox.MKUINT(id, type), Fox.MKUINT(id, type), func)
71
+ end
72
+ end
@@ -0,0 +1,122 @@
1
+ require 'fox12/responder'
2
+
3
+ module Fox
4
+
5
+ #
6
+ # FXPseudoTarget instances act as the message target for any widgets that
7
+ # elect to use the #connect method to map certain message types to
8
+ # blocks.
9
+ #
10
+ class FXPseudoTarget < FXObject
11
+
12
+ include Responder
13
+
14
+ @@targets_of_pending_timers = {}
15
+ @@targets_of_pending_chores = {}
16
+ @@targets_of_pending_signals = {}
17
+ @@targets_of_pending_inputs = {}
18
+
19
+ #
20
+ # Returns an initialized FXPseudoTarget object.
21
+ #
22
+ def initialize
23
+ super
24
+ @blocks = {}
25
+ end
26
+
27
+ #
28
+ # Store an association between a message of type
29
+ # _messageType_ with a callable object or a block.
30
+ #
31
+ def pconnect(messageType, callableObject, block)
32
+ if callableObject.nil?
33
+ @blocks[messageType] = block
34
+ else
35
+ @blocks[messageType] = callableObject
36
+ end
37
+ FXMAPTYPE(messageType, :onHandleMsg)
38
+
39
+ case messageType
40
+ when SEL_TIMEOUT
41
+ @@targets_of_pending_timers[self] = self
42
+ when SEL_CHORE
43
+ @@targets_of_pending_chores[self] = self
44
+ when SEL_SIGNAL
45
+ @@targets_of_pending_signals[self] = self
46
+ when SEL_IO_READ, SEL_IO_WRITE, SEL_IO_EXCEPT
47
+ @@targets_of_pending_inputs[self] = self
48
+ end
49
+ end
50
+
51
+ #
52
+ # Handle a message from _sender_, with selector _sel_ and
53
+ # message data _ptr_.
54
+ #
55
+ def onHandleMsg(sender, sel, ptr)
56
+ messageType = Fox.FXSELTYPE(sel)
57
+ result = @blocks[messageType].call(sender, sel, ptr)
58
+ case messageType
59
+ when SEL_TIMEOUT
60
+ @@targets_of_pending_timers.delete(self)
61
+ when SEL_CHORE
62
+ @@targets_of_pending_chores.delete(self)
63
+ end
64
+ result
65
+ end
66
+ end
67
+ end
68
+
69
+ #
70
+ # The Responder2 module provides the #connect method,
71
+ # which is mixed-in to all classes that have a message
72
+ # target (i.e. Fox::FXDataTarget, Fox::FXRecentFiles
73
+ # and Fox::FXWindow).
74
+ #
75
+ module Responder2
76
+ #
77
+ # Assign a "handler" for all FOX messages of type _messageType_
78
+ # sent from this widget. When called with only one argument,
79
+ # a block is expected, e.g.
80
+ #
81
+ # aButton.connect(SEL_COMMAND) { |sender, selector, data|
82
+ # ... code to handle this event ...
83
+ # }
84
+ #
85
+ # The arguments passed into the block are the _sender_ of the
86
+ # message (i.e. the widget), the _selector_ for the message, and
87
+ # any message-specific _data_.
88
+ #
89
+ # When #connect is called with two arguments, the second argument
90
+ # should be some callable object such as a Method or Proc instance, e.g.
91
+ #
92
+ # aButton.connect(SEL_COMMAND, method(:onCommand))
93
+ #
94
+ # As with the one-argument form of #connect, the callable object
95
+ # will be "called" with three arguments (the sender, selector and
96
+ # message data).
97
+ #
98
+ def connect(messageType, callableObject=nil, &block)
99
+ unless instance_variables.include?('@pseudoTarget')
100
+ @pseudoTarget = Fox::FXPseudoTarget.new
101
+ self.target = @pseudoTarget
102
+ end
103
+ @pseudoTarget.pconnect(messageType, callableObject, block)
104
+ end
105
+ end
106
+
107
+ module Fox
108
+ class FXDataTarget
109
+ include Responder2
110
+ end
111
+ class FXRecentFiles
112
+ include Responder2
113
+ end
114
+ class FXWindow
115
+ include Responder2
116
+ end
117
+ end
118
+
119
+ require 'fox12/timeout'
120
+ require 'fox12/chore'
121
+ require 'fox12/signal'
122
+ require 'fox12/input'
@@ -0,0 +1,2629 @@
1
+ # This file is automatically generated from Scintilla.iface
2
+ # DO NOT MODIFY
3
+
4
+ module Fox
5
+ class FXScintilla
6
+ #
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+ # Basics
15
+
16
+ INVALID_POSITION = -1
17
+ # Define start of Scintilla messages to be greater than all edit (EM_*) messages
18
+ # as many EM_ messages can be used although that use is deprecated.
19
+ SCI_START = 2000
20
+ SCI_OPTIONAL_START = 3000
21
+ SCI_LEXER_START = 4000
22
+
23
+ # Add text to the document.
24
+ def addText(length, text)
25
+ sendMessage(2001, length, text)
26
+ end
27
+
28
+ # Add array of cells to document.
29
+ def addStyledText(length, c)
30
+ sendMessage(2002, length, c)
31
+ end
32
+
33
+ # Insert string at a position.
34
+ def insertText(pos, text)
35
+ sendMessage(2003, pos, text)
36
+ end
37
+
38
+ # Delete all text in the document.
39
+ def clearAll
40
+ sendMessage(2004, 0, 0)
41
+ end
42
+
43
+ # Set all style bytes to 0, remove all folding information.
44
+ def clearDocumentStyle
45
+ sendMessage(2005, 0, 0)
46
+ end
47
+
48
+ # The number of characters in the document.
49
+ def getLength
50
+ sendMessage(2006, 0, 0)
51
+ end
52
+
53
+ # Returns the character byte at the position.
54
+ def getCharAt(pos)
55
+ sendMessage(2007, pos, 0)
56
+ end
57
+
58
+ # Returns the position of the caret.
59
+ def getCurrentPos
60
+ sendMessage(2008, 0, 0)
61
+ end
62
+
63
+ # Returns the position of the opposite end of the selection to the caret.
64
+ def getAnchor
65
+ sendMessage(2009, 0, 0)
66
+ end
67
+
68
+ # Returns the style byte at the position.
69
+ def getStyleAt(pos)
70
+ sendMessage(2010, pos, 0)
71
+ end
72
+
73
+ # Redoes the next action on the undo history.
74
+ def redo
75
+ sendMessage(2011, 0, 0)
76
+ end
77
+
78
+ # Choose between collecting actions into the undo
79
+ # history and discarding them.
80
+ def setUndoCollection(collectUndo)
81
+ sendMessage(2012, collectUndo, 0)
82
+ end
83
+
84
+ # Select all the text in the document.
85
+ def selectAll
86
+ sendMessage(2013, 0, 0)
87
+ end
88
+
89
+ # Remember the current position in the undo history as the position
90
+ # at which the document was saved.
91
+ def setSavePoint
92
+ sendMessage(2014, 0, 0)
93
+ end
94
+
95
+ # Retrieve a buffer of cells.
96
+ # Returns the number of bytes in the buffer not including terminating nulls.
97
+ def getStyledText(tr)
98
+ sendMessage(2015, 0, tr)
99
+ end
100
+
101
+ # Are there any redoable actions in the undo history?
102
+ def canRedo
103
+ sendMessage(2016, 0, 0) == 1 ? true : false
104
+ end
105
+
106
+ # Retrieve the line number at which a particular marker is located.
107
+ def markerLineFromHandle(handle)
108
+ sendMessage(2017, handle, 0)
109
+ end
110
+
111
+ # Delete a marker.
112
+ def markerDeleteHandle(handle)
113
+ sendMessage(2018, handle, 0)
114
+ end
115
+
116
+ # Is undo history being collected?
117
+ def getUndoCollection
118
+ sendMessage(2019, 0, 0) == 1 ? true : false
119
+ end
120
+
121
+ SCWS_INVISIBLE = 0
122
+ SCWS_VISIBLEALWAYS = 1
123
+ SCWS_VISIBLEAFTERINDENT = 2
124
+
125
+ # Are white space characters currently visible?
126
+ # Returns one of SCWS_* constants.
127
+ def getViewWS
128
+ sendMessage(2020, 0, 0)
129
+ end
130
+
131
+ # Make white space characters invisible, always visible or visible outside indentation.
132
+ def setViewWS(viewWS)
133
+ sendMessage(2021, viewWS, 0)
134
+ end
135
+
136
+ # Find the position from a point within the window.
137
+ def positionFromPoint(x, y)
138
+ sendMessage(2022, x, y)
139
+ end
140
+
141
+ # Find the position from a point within the window but return
142
+ # INVALID_POSITION if not close to text.
143
+ def positionFromPointClose(x, y)
144
+ sendMessage(2023, x, y)
145
+ end
146
+
147
+ # Set caret to start of a line and ensure it is visible.
148
+ def gotoLine(line)
149
+ sendMessage(2024, line, 0)
150
+ end
151
+
152
+ # Set caret to a position and ensure it is visible.
153
+ def gotoPos(pos)
154
+ sendMessage(2025, pos, 0)
155
+ end
156
+
157
+ # Set the selection anchor to a position. The anchor is the opposite
158
+ # end of the selection from the caret.
159
+ def setAnchor(posAnchor)
160
+ sendMessage(2026, posAnchor, 0)
161
+ end
162
+
163
+ # Retrieve the text of the line containing the caret.
164
+ # Returns the index of the caret on the line.
165
+ def getCurLine(length)
166
+ buffer = "".ljust(length)
167
+ sendMessage(2027, length, buffer)
168
+ buffer
169
+ end
170
+
171
+ # Retrieve the position of the last correctly styled character.
172
+ def getEndStyled
173
+ sendMessage(2028, 0, 0)
174
+ end
175
+
176
+ SC_EOL_CRLF = 0
177
+ SC_EOL_CR = 1
178
+ SC_EOL_LF = 2
179
+
180
+ # Convert all line endings in the document to one mode.
181
+ def convertEOLs(eolMode)
182
+ sendMessage(2029, eolMode, 0)
183
+ end
184
+
185
+ # Retrieve the current end of line mode - one of CRLF, CR, or LF.
186
+ def getEOLMode
187
+ sendMessage(2030, 0, 0)
188
+ end
189
+
190
+ # Set the current end of line mode.
191
+ def setEOLMode(eolMode)
192
+ sendMessage(2031, eolMode, 0)
193
+ end
194
+
195
+ # Set the current styling position to pos and the styling mask to mask.
196
+ # The styling mask can be used to protect some bits in each styling byte from modification.
197
+ def startStyling(pos, mask)
198
+ sendMessage(2032, pos, mask)
199
+ end
200
+
201
+ # Change style from current styling position for length characters to a style
202
+ # and move the current styling position to after this newly styled segment.
203
+ def setStyling(length, style)
204
+ sendMessage(2033, length, style)
205
+ end
206
+
207
+ # Is drawing done first into a buffer or direct to the screen?
208
+ def getBufferedDraw
209
+ sendMessage(2034, 0, 0) == 1 ? true : false
210
+ end
211
+
212
+ # If drawing is buffered then each line of text is drawn into a bitmap buffer
213
+ # before drawing it to the screen to avoid flicker.
214
+ def setBufferedDraw(buffered)
215
+ sendMessage(2035, buffered, 0)
216
+ end
217
+
218
+ # Change the visible size of a tab to be a multiple of the width of a space character.
219
+ def setTabWidth(tabWidth)
220
+ sendMessage(2036, tabWidth, 0)
221
+ end
222
+
223
+ # Retrieve the visible size of a tab.
224
+ def getTabWidth
225
+ sendMessage(2121, 0, 0)
226
+ end
227
+
228
+ # The SC_CP_UTF8 value can be used to enter Unicode mode.
229
+ # This is the same value as CP_UTF8 in Windows
230
+ SC_CP_UTF8 = 65001
231
+
232
+ # The SC_CP_DBCS value can be used to indicate a DBCS mode for GTK+.
233
+ SC_CP_DBCS = 1
234
+
235
+ # Set the code page used to interpret the bytes of the document as characters.
236
+ # The SC_CP_UTF8 value can be used to enter Unicode mode.
237
+ def setCodePage(codePage)
238
+ sendMessage(2037, codePage, 0)
239
+ end
240
+
241
+ # In palette mode, Scintilla uses the environment's palette calls to display
242
+ # more colours. This may lead to ugly displays.
243
+ def setUsePalette(usePalette)
244
+ sendMessage(2039, usePalette, 0)
245
+ end
246
+
247
+ MARKER_MAX = 31
248
+ SC_MARK_CIRCLE = 0
249
+ SC_MARK_ROUNDRECT = 1
250
+ SC_MARK_ARROW = 2
251
+ SC_MARK_SMALLRECT = 3
252
+ SC_MARK_SHORTARROW = 4
253
+ SC_MARK_EMPTY = 5
254
+ SC_MARK_ARROWDOWN = 6
255
+ SC_MARK_MINUS = 7
256
+ SC_MARK_PLUS = 8
257
+
258
+ # Shapes used for outlining column.
259
+ SC_MARK_VLINE = 9
260
+ SC_MARK_LCORNER = 10
261
+ SC_MARK_TCORNER = 11
262
+ SC_MARK_BOXPLUS = 12
263
+ SC_MARK_BOXPLUSCONNECTED = 13
264
+ SC_MARK_BOXMINUS = 14
265
+ SC_MARK_BOXMINUSCONNECTED = 15
266
+ SC_MARK_LCORNERCURVE = 16
267
+ SC_MARK_TCORNERCURVE = 17
268
+ SC_MARK_CIRCLEPLUS = 18
269
+ SC_MARK_CIRCLEPLUSCONNECTED = 19
270
+ SC_MARK_CIRCLEMINUS = 20
271
+ SC_MARK_CIRCLEMINUSCONNECTED = 21
272
+
273
+ # Invisible mark that only sets the line background color.
274
+ SC_MARK_BACKGROUND = 22
275
+ SC_MARK_DOTDOTDOT = 23
276
+ SC_MARK_ARROWS = 24
277
+ SC_MARK_PIXMAP = 25
278
+
279
+ SC_MARK_CHARACTER = 10000
280
+
281
+ # Markers used for outlining column.
282
+ SC_MARKNUM_FOLDEREND = 25
283
+ SC_MARKNUM_FOLDEROPENMID = 26
284
+ SC_MARKNUM_FOLDERMIDTAIL = 27
285
+ SC_MARKNUM_FOLDERTAIL = 28
286
+ SC_MARKNUM_FOLDERSUB = 29
287
+ SC_MARKNUM_FOLDER = 30
288
+ SC_MARKNUM_FOLDEROPEN = 31
289
+
290
+ SC_MASK_FOLDERS = 0xFE000000
291
+
292
+ # Set the symbol used for a particular marker number.
293
+ def markerDefine(markerNumber, markerSymbol)
294
+ sendMessage(2040, markerNumber, markerSymbol)
295
+ end
296
+
297
+ # Set the foreground colour used for a particular marker number.
298
+ def markerSetFore(markerNumber, fore)
299
+ sendMessage(2041, markerNumber, fore & 0xffffff)
300
+ end
301
+
302
+ # Set the background colour used for a particular marker number.
303
+ def markerSetBack(markerNumber, back)
304
+ sendMessage(2042, markerNumber, back & 0xffffff)
305
+ end
306
+
307
+ # Add a marker to a line, returning an ID which can be used to find or delete the marker.
308
+ def markerAdd(line, markerNumber)
309
+ sendMessage(2043, line, markerNumber)
310
+ end
311
+
312
+ # Delete a marker from a line.
313
+ def markerDelete(line, markerNumber)
314
+ sendMessage(2044, line, markerNumber)
315
+ end
316
+
317
+ # Delete all markers with a particular number from all lines.
318
+ def markerDeleteAll(markerNumber)
319
+ sendMessage(2045, markerNumber, 0)
320
+ end
321
+
322
+ # Get a bit mask of all the markers set on a line.
323
+ def markerGet(line)
324
+ sendMessage(2046, line, 0)
325
+ end
326
+
327
+ # Find the next line after lineStart that includes a marker in mask.
328
+ def markerNext(lineStart, markerMask)
329
+ sendMessage(2047, lineStart, markerMask)
330
+ end
331
+
332
+ # Find the previous line before lineStart that includes a marker in mask.
333
+ def markerPrevious(lineStart, markerMask)
334
+ sendMessage(2048, lineStart, markerMask)
335
+ end
336
+
337
+ # Define a marker from a pixmap.
338
+ def markerDefinePixmap(markerNumber, pixmap)
339
+ sendMessage(2049, markerNumber, pixmap)
340
+ end
341
+
342
+ SC_MARGIN_SYMBOL = 0
343
+ SC_MARGIN_NUMBER = 1
344
+
345
+ # Set a margin to be either numeric or symbolic.
346
+ def setMarginTypeN(margin, marginType)
347
+ sendMessage(2240, margin, marginType)
348
+ end
349
+
350
+ # Retrieve the type of a margin.
351
+ def getMarginTypeN(margin)
352
+ sendMessage(2241, margin, 0)
353
+ end
354
+
355
+ # Set the width of a margin to a width expressed in pixels.
356
+ def setMarginWidthN(margin, pixelWidth)
357
+ sendMessage(2242, margin, pixelWidth)
358
+ end
359
+
360
+ # Retrieve the width of a margin in pixels.
361
+ def getMarginWidthN(margin)
362
+ sendMessage(2243, margin, 0)
363
+ end
364
+
365
+ # Set a mask that determines which markers are displayed in a margin.
366
+ def setMarginMaskN(margin, mask)
367
+ sendMessage(2244, margin, mask)
368
+ end
369
+
370
+ # Retrieve the marker mask of a margin.
371
+ def getMarginMaskN(margin)
372
+ sendMessage(2245, margin, 0)
373
+ end
374
+
375
+ # Make a margin sensitive or insensitive to mouse clicks.
376
+ def setMarginSensitiveN(margin, sensitive)
377
+ sendMessage(2246, margin, sensitive)
378
+ end
379
+
380
+ # Retrieve the mouse click sensitivity of a margin.
381
+ def getMarginSensitiveN(margin)
382
+ sendMessage(2247, margin, 0) == 1 ? true : false
383
+ end
384
+
385
+ # Styles in range 32..37 are predefined for parts of the UI and are not used as normal styles.
386
+ # Styles 38 and 39 are for future use.
387
+ STYLE_DEFAULT = 32
388
+ STYLE_LINENUMBER = 33
389
+ STYLE_BRACELIGHT = 34
390
+ STYLE_BRACEBAD = 35
391
+ STYLE_CONTROLCHAR = 36
392
+ STYLE_INDENTGUIDE = 37
393
+ STYLE_LASTPREDEFINED = 39
394
+ STYLE_MAX = 127
395
+
396
+ # Character set identifiers are used in StyleSetCharacterSet.
397
+ # The values are the same as the Windows *_CHARSET values.
398
+ SC_CHARSET_ANSI = 0
399
+ SC_CHARSET_DEFAULT = 1
400
+ SC_CHARSET_BALTIC = 186
401
+ SC_CHARSET_CHINESEBIG5 = 136
402
+ SC_CHARSET_EASTEUROPE = 238
403
+ SC_CHARSET_GB2312 = 134
404
+ SC_CHARSET_GREEK = 161
405
+ SC_CHARSET_HANGUL = 129
406
+ SC_CHARSET_MAC = 77
407
+ SC_CHARSET_OEM = 255
408
+ SC_CHARSET_RUSSIAN = 204
409
+ SC_CHARSET_SHIFTJIS = 128
410
+ SC_CHARSET_SYMBOL = 2
411
+ SC_CHARSET_TURKISH = 162
412
+ SC_CHARSET_JOHAB = 130
413
+ SC_CHARSET_HEBREW = 177
414
+ SC_CHARSET_ARABIC = 178
415
+ SC_CHARSET_VIETNAMESE = 163
416
+ SC_CHARSET_THAI = 222
417
+
418
+ # Clear all the styles and make equivalent to the global default style.
419
+ def styleClearAll
420
+ sendMessage(2050, 0, 0)
421
+ end
422
+
423
+ # Set the foreground colour of a style.
424
+ def styleSetFore(style, fore)
425
+ sendMessage(2051, style, fore & 0xffffff)
426
+ end
427
+
428
+ # Set the background colour of a style.
429
+ def styleSetBack(style, back)
430
+ sendMessage(2052, style, back & 0xffffff)
431
+ end
432
+
433
+ # Set a style to be bold or not.
434
+ def styleSetBold(style, bold)
435
+ sendMessage(2053, style, bold)
436
+ end
437
+
438
+ # Set a style to be italic or not.
439
+ def styleSetItalic(style, italic)
440
+ sendMessage(2054, style, italic)
441
+ end
442
+
443
+ # Set the size of characters of a style.
444
+ def styleSetSize(style, sizePoints)
445
+ sendMessage(2055, style, sizePoints)
446
+ end
447
+
448
+ # Set the font of a style.
449
+ def styleSetFont(style, fontName)
450
+ sendMessage(2056, style, fontName)
451
+ end
452
+
453
+ # Set a style to have its end of line filled or not.
454
+ def styleSetEOLFilled(style, filled)
455
+ sendMessage(2057, style, filled)
456
+ end
457
+
458
+ # Reset the default style to its state at startup
459
+ def styleResetDefault
460
+ sendMessage(2058, 0, 0)
461
+ end
462
+
463
+ # Set a style to be underlined or not.
464
+ def styleSetUnderline(style, underline)
465
+ sendMessage(2059, style, underline)
466
+ end
467
+
468
+ SC_CASE_MIXED = 0
469
+ SC_CASE_UPPER = 1
470
+ SC_CASE_LOWER = 2
471
+ # Set a style to be mixed case, or to force upper or lower case.
472
+ def styleSetCase(style, caseForce)
473
+ sendMessage(2060, style, caseForce)
474
+ end
475
+
476
+ # Set the character set of the font in a style.
477
+ def styleSetCharacterSet(style, characterSet)
478
+ sendMessage(2066, style, characterSet)
479
+ end
480
+
481
+ # Set the foreground colour of the selection and whether to use this setting.
482
+ def setSelFore(useSetting, fore)
483
+ sendMessage(2067, useSetting, fore & 0xffffff)
484
+ end
485
+
486
+ # Set the background colour of the selection and whether to use this setting.
487
+ def setSelBack(useSetting, back)
488
+ sendMessage(2068, useSetting, back & 0xffffff)
489
+ end
490
+
491
+ # Set the foreground colour of the caret.
492
+ def setCaretFore(fore)
493
+ sendMessage(2069, fore & 0xffffff, 0)
494
+ end
495
+
496
+ # When key+modifier combination km is pressed perform msg.
497
+ def assignCmdKey(km, msg)
498
+ sendMessage(2070, km, msg)
499
+ end
500
+
501
+ # When key+modifier combination km do nothing.
502
+ def clearCmdKey(km)
503
+ sendMessage(2071, km, 0)
504
+ end
505
+
506
+ # Drop all key mappings.
507
+ def clearAllCmdKeys
508
+ sendMessage(2072, 0, 0)
509
+ end
510
+
511
+ # Set the styles for a segment of the document.
512
+ def setStylingEx(length, styles)
513
+ sendMessage(2073, length, styles)
514
+ end
515
+
516
+ # Set a style to be visible or not.
517
+ def styleSetVisible(style, visible)
518
+ sendMessage(2074, style, visible)
519
+ end
520
+
521
+ # Get the time in milliseconds that the caret is on and off.
522
+ def getCaretPeriod
523
+ sendMessage(2075, 0, 0)
524
+ end
525
+
526
+ # Get the time in milliseconds that the caret is on and off. 0 = steady on.
527
+ def setCaretPeriod(periodMilliseconds)
528
+ sendMessage(2076, periodMilliseconds, 0)
529
+ end
530
+
531
+ # Set the set of characters making up words for when moving or selecting by word.
532
+ def setWordChars(characters)
533
+ sendMessage(2077, 0, characters)
534
+ end
535
+
536
+ # Start a sequence of actions that is undone and redone as a unit.
537
+ # May be nested.
538
+ def beginUndoAction
539
+ sendMessage(2078, 0, 0)
540
+ end
541
+
542
+ # End a sequence of actions that is undone and redone as a unit.
543
+ def endUndoAction
544
+ sendMessage(2079, 0, 0)
545
+ end
546
+
547
+ INDIC_MAX = 7
548
+ INDIC_PLAIN = 0
549
+ INDIC_SQUIGGLE = 1
550
+ INDIC_TT = 2
551
+ INDIC_DIAGONAL = 3
552
+ INDIC_STRIKE = 4
553
+ INDIC0_MASK = 0x20
554
+ INDIC1_MASK = 0x40
555
+ INDIC2_MASK = 0x80
556
+ INDICS_MASK = 0xE0
557
+
558
+ # Set an indicator to plain, squiggle or TT.
559
+ def indicSetStyle(indic, style)
560
+ sendMessage(2080, indic, style)
561
+ end
562
+
563
+ # Retrieve the style of an indicator.
564
+ def indicGetStyle(indic)
565
+ sendMessage(2081, indic, 0)
566
+ end
567
+
568
+ # Set the foreground colour of an indicator.
569
+ def indicSetFore(indic, fore)
570
+ sendMessage(2082, indic, fore & 0xffffff)
571
+ end
572
+
573
+ # Retrieve the foreground colour of an indicator.
574
+ def indicGetFore(indic)
575
+ sendMessage(2083, indic, 0)
576
+ end
577
+
578
+ # Set the foreground colour of all whitespace and whether to use this setting.
579
+ def setWhitespaceFore(useSetting, fore)
580
+ sendMessage(2084, useSetting, fore & 0xffffff)
581
+ end
582
+
583
+ # Set the background colour of all whitespace and whether to use this setting.
584
+ def setWhitespaceBack(useSetting, back)
585
+ sendMessage(2085, useSetting, back & 0xffffff)
586
+ end
587
+
588
+ # Divide each styling byte into lexical class bits (default: 5) and indicator
589
+ # bits (default: 3). If a lexer requires more than 32 lexical states, then this
590
+ # is used to expand the possible states.
591
+ def setStyleBits(bits)
592
+ sendMessage(2090, bits, 0)
593
+ end
594
+
595
+ # Retrieve number of bits in style bytes used to hold the lexical state.
596
+ def getStyleBits
597
+ sendMessage(2091, 0, 0)
598
+ end
599
+
600
+ # Used to hold extra styling information for each line.
601
+ def setLineState(line, state)
602
+ sendMessage(2092, line, state)
603
+ end
604
+
605
+ # Retrieve the extra styling information for a line.
606
+ def getLineState(line)
607
+ sendMessage(2093, line, 0)
608
+ end
609
+
610
+ # Retrieve the last line number that has line state.
611
+ def getMaxLineState
612
+ sendMessage(2094, 0, 0)
613
+ end
614
+
615
+ # Is the background of the line containing the caret in a different colour?
616
+ def getCaretLineVisible
617
+ sendMessage(2095, 0, 0) == 1 ? true : false
618
+ end
619
+
620
+ # Display the background of the line containing the caret in a different colour.
621
+ def setCaretLineVisible(show)
622
+ sendMessage(2096, show, 0)
623
+ end
624
+
625
+ # Get the colour of the background of the line containing the caret.
626
+ def getCaretLineBack
627
+ sendMessage(2097, 0, 0)
628
+ end
629
+
630
+ # Set the colour of the background of the line containing the caret.
631
+ def setCaretLineBack(back)
632
+ sendMessage(2098, back & 0xffffff, 0)
633
+ end
634
+
635
+ # Set a style to be changeable or not (read only).
636
+ # Experimental feature, currently buggy.
637
+ def styleSetChangeable(style, changeable)
638
+ sendMessage(2099, style, changeable)
639
+ end
640
+
641
+ # Display a auto-completion list.
642
+ # The lenEntered parameter indicates how many characters before
643
+ # the caret should be used to provide context.
644
+ def autoCShow(lenEntered, itemList)
645
+ sendMessage(2100, lenEntered, itemList)
646
+ end
647
+
648
+ # Remove the auto-completion list from the screen.
649
+ def autoCCancel
650
+ sendMessage(2101, 0, 0)
651
+ end
652
+
653
+ # Is there an auto-completion list visible?
654
+ def autoCActive
655
+ sendMessage(2102, 0, 0) == 1 ? true : false
656
+ end
657
+
658
+ # Retrieve the position of the caret when the auto-completion list was displayed.
659
+ def autoCPosStart
660
+ sendMessage(2103, 0, 0)
661
+ end
662
+
663
+ # User has selected an item so remove the list and insert the selection.
664
+ def autoCComplete
665
+ sendMessage(2104, 0, 0)
666
+ end
667
+
668
+ # Define a set of character that when typed cancel the auto-completion list.
669
+ def autoCStops(characterSet)
670
+ sendMessage(2105, 0, characterSet)
671
+ end
672
+
673
+ # Change the separator character in the string setting up an auto-completion list.
674
+ # Default is space but can be changed if items contain space.
675
+ def autoCSetSeparator(separatorCharacter)
676
+ sendMessage(2106, separatorCharacter, 0)
677
+ end
678
+
679
+ # Retrieve the auto-completion list separator character.
680
+ def autoCGetSeparator
681
+ sendMessage(2107, 0, 0)
682
+ end
683
+
684
+ # Select the item in the auto-completion list that starts with a string.
685
+ def autoCSelect(text)
686
+ sendMessage(2108, 0, text)
687
+ end
688
+
689
+ # Should the auto-completion list be cancelled if the user backspaces to a
690
+ # position before where the box was created.
691
+ def autoCSetCancelAtStart(cancel)
692
+ sendMessage(2110, cancel, 0)
693
+ end
694
+
695
+ # Retrieve whether auto-completion cancelled by backspacing before start.
696
+ def autoCGetCancelAtStart
697
+ sendMessage(2111, 0, 0) == 1 ? true : false
698
+ end
699
+
700
+ # Define a set of characters that when typed will cause the autocompletion to
701
+ # choose the selected item.
702
+ def autoCSetFillUps(characterSet)
703
+ sendMessage(2112, 0, characterSet)
704
+ end
705
+
706
+ # Should a single item auto-completion list automatically choose the item.
707
+ def autoCSetChooseSingle(chooseSingle)
708
+ sendMessage(2113, chooseSingle, 0)
709
+ end
710
+
711
+ # Retrieve whether a single item auto-completion list automatically choose the item.
712
+ def autoCGetChooseSingle
713
+ sendMessage(2114, 0, 0) == 1 ? true : false
714
+ end
715
+
716
+ # Set whether case is significant when performing auto-completion searches.
717
+ def autoCSetIgnoreCase(ignoreCase)
718
+ sendMessage(2115, ignoreCase, 0)
719
+ end
720
+
721
+ # Retrieve state of ignore case flag.
722
+ def autoCGetIgnoreCase
723
+ sendMessage(2116, 0, 0) == 1 ? true : false
724
+ end
725
+
726
+ # Display a list of strings and send notification when user chooses one.
727
+ def userListShow(listType, itemList)
728
+ sendMessage(2117, listType, itemList)
729
+ end
730
+
731
+ # Set whether or not autocompletion is hidden automatically when nothing matches.
732
+ def autoCSetAutoHide(autoHide)
733
+ sendMessage(2118, autoHide, 0)
734
+ end
735
+
736
+ # Retrieve whether or not autocompletion is hidden automatically when nothing matches.
737
+ def autoCGetAutoHide
738
+ sendMessage(2119, 0, 0) == 1 ? true : false
739
+ end
740
+
741
+ # Set whether or not autocompletion deletes any word characters
742
+ # after the inserted text upon completion.
743
+ def autoCSetDropRestOfWord(dropRestOfWord)
744
+ sendMessage(2270, dropRestOfWord, 0)
745
+ end
746
+
747
+ # Retrieve whether or not autocompletion deletes any word characters
748
+ # after the inserted text upon completion.
749
+ def autoCGetDropRestOfWord
750
+ sendMessage(2271, 0, 0) == 1 ? true : false
751
+ end
752
+
753
+ # Register an XPM image for use in autocompletion lists.
754
+ def registerImage(type, xpmData)
755
+ sendMessage(2405, type, xpmData)
756
+ end
757
+
758
+ # Clear all the registered XPM images.
759
+ def clearRegisteredImages
760
+ sendMessage(2408, 0, 0)
761
+ end
762
+
763
+ # Retrieve the auto-completion list type-separator character.
764
+ def autoCGetTypeSeparator
765
+ sendMessage(2285, 0, 0)
766
+ end
767
+
768
+ # Change the type-separator character in the string setting up an auto-completion list.
769
+ # Default is '?' but can be changed if items contain '?'.
770
+ def autoCSetTypeSeparator(separatorCharacter)
771
+ sendMessage(2286, separatorCharacter, 0)
772
+ end
773
+
774
+ # Set the number of spaces used for one level of indentation.
775
+ def setIndent(indentSize)
776
+ sendMessage(2122, indentSize, 0)
777
+ end
778
+
779
+ # Retrieve indentation size.
780
+ def getIndent
781
+ sendMessage(2123, 0, 0)
782
+ end
783
+
784
+ # Indentation will only use space characters if useTabs is false, otherwise
785
+ # it will use a combination of tabs and spaces.
786
+ def setUseTabs(useTabs)
787
+ sendMessage(2124, useTabs, 0)
788
+ end
789
+
790
+ # Retrieve whether tabs will be used in indentation.
791
+ def getUseTabs
792
+ sendMessage(2125, 0, 0) == 1 ? true : false
793
+ end
794
+
795
+ # Change the indentation of a line to a number of columns.
796
+ def setLineIndentation(line, indentSize)
797
+ sendMessage(2126, line, indentSize)
798
+ end
799
+
800
+ # Retrieve the number of columns that a line is indented.
801
+ def getLineIndentation(line)
802
+ sendMessage(2127, line, 0)
803
+ end
804
+
805
+ # Retrieve the position before the first non indentation character on a line.
806
+ def getLineIndentPosition(line)
807
+ sendMessage(2128, line, 0)
808
+ end
809
+
810
+ # Retrieve the column number of a position, taking tab width into account.
811
+ def getColumn(pos)
812
+ sendMessage(2129, pos, 0)
813
+ end
814
+
815
+ # Show or hide the horizontal scroll bar.
816
+ def setHScrollBar(show)
817
+ sendMessage(2130, show, 0)
818
+ end
819
+
820
+ # Is the horizontal scroll bar visible?
821
+ def getHScrollBar
822
+ sendMessage(2131, 0, 0) == 1 ? true : false
823
+ end
824
+
825
+ # Show or hide indentation guides.
826
+ def setIndentationGuides(show)
827
+ sendMessage(2132, show, 0)
828
+ end
829
+
830
+ # Are the indentation guides visible?
831
+ def getIndentationGuides
832
+ sendMessage(2133, 0, 0) == 1 ? true : false
833
+ end
834
+
835
+ # Set the highlighted indentation guide column.
836
+ # 0 = no highlighted guide.
837
+ def setHighlightGuide(column)
838
+ sendMessage(2134, column, 0)
839
+ end
840
+
841
+ # Get the highlighted indentation guide column.
842
+ def getHighlightGuide
843
+ sendMessage(2135, 0, 0)
844
+ end
845
+
846
+ # Get the position after the last visible characters on a line.
847
+ def getLineEndPosition(line)
848
+ sendMessage(2136, line, 0)
849
+ end
850
+
851
+ # Get the code page used to interpret the bytes of the document as characters.
852
+ def getCodePage
853
+ sendMessage(2137, 0, 0)
854
+ end
855
+
856
+ # Get the foreground colour of the caret.
857
+ def getCaretFore
858
+ sendMessage(2138, 0, 0)
859
+ end
860
+
861
+ # In palette mode?
862
+ def getUsePalette
863
+ sendMessage(2139, 0, 0) == 1 ? true : false
864
+ end
865
+
866
+ # In read-only mode?
867
+ def getReadOnly
868
+ sendMessage(2140, 0, 0) == 1 ? true : false
869
+ end
870
+
871
+ # Sets the position of the caret.
872
+ def setCurrentPos(pos)
873
+ sendMessage(2141, pos, 0)
874
+ end
875
+
876
+ # Sets the position that starts the selection - this becomes the anchor.
877
+ def setSelectionStart(pos)
878
+ sendMessage(2142, pos, 0)
879
+ end
880
+
881
+ # Returns the position at the start of the selection.
882
+ def getSelectionStart
883
+ sendMessage(2143, 0, 0)
884
+ end
885
+
886
+ # Sets the position that ends the selection - this becomes the currentPosition.
887
+ def setSelectionEnd(pos)
888
+ sendMessage(2144, pos, 0)
889
+ end
890
+
891
+ # Returns the position at the end of the selection.
892
+ def getSelectionEnd
893
+ sendMessage(2145, 0, 0)
894
+ end
895
+
896
+ # Sets the print magnification added to the point size of each style for printing.
897
+ def setPrintMagnification(magnification)
898
+ sendMessage(2146, magnification, 0)
899
+ end
900
+
901
+ # Returns the print magnification.
902
+ def getPrintMagnification
903
+ sendMessage(2147, 0, 0)
904
+ end
905
+
906
+ # PrintColourMode - use same colours as screen.
907
+ SC_PRINT_NORMAL = 0
908
+ # PrintColourMode - invert the light value of each style for printing.
909
+ SC_PRINT_INVERTLIGHT = 1
910
+ # PrintColourMode - force black text on white background for printing.
911
+ SC_PRINT_BLACKONWHITE = 2
912
+ # PrintColourMode - text stays coloured, but all background is forced to be white for printing.
913
+ SC_PRINT_COLOURONWHITE = 3
914
+ # PrintColourMode - only the default-background is forced to be white for printing.
915
+ SC_PRINT_COLOURONWHITEDEFAULTBG = 4
916
+
917
+ # Modify colours when printing for clearer printed text.
918
+ def setPrintColourMode(mode)
919
+ sendMessage(2148, mode, 0)
920
+ end
921
+
922
+ # Returns the print colour mode.
923
+ def getPrintColourMode
924
+ sendMessage(2149, 0, 0)
925
+ end
926
+
927
+ SCFIND_WHOLEWORD = 2
928
+ SCFIND_MATCHCASE = 4
929
+ SCFIND_WORDSTART = 0x00100000
930
+ SCFIND_REGEXP = 0x00200000
931
+
932
+ # Find some text in the document.
933
+ def findText(flags, ft)
934
+ sendMessage(2150, flags, ft)
935
+ end
936
+
937
+ # On Windows, will draw the document into a display context such as a printer.
938
+ def formatRange(draw, fr)
939
+ sendMessage(2151, draw, fr)
940
+ end
941
+
942
+ # Retrieve the display line at the top of the display.
943
+ def getFirstVisibleLine
944
+ sendMessage(2152, 0, 0)
945
+ end
946
+
947
+ # Retrieve the contents of a line.
948
+ # Returns the length of the line.
949
+ def getLine(line)
950
+ buffer = "".ljust(line)
951
+ sendMessage(2153, line, buffer)
952
+ buffer
953
+ end
954
+
955
+ # Returns the number of lines in the document. There is always at least one.
956
+ def getLineCount
957
+ sendMessage(2154, 0, 0)
958
+ end
959
+
960
+ # Sets the size in pixels of the left margin.
961
+ def setMarginLeft(pixelWidth)
962
+ sendMessage(2155, 0, pixelWidth)
963
+ end
964
+
965
+ # Returns the size in pixels of the left margin.
966
+ def getMarginLeft
967
+ sendMessage(2156, 0, 0)
968
+ end
969
+
970
+ # Sets the size in pixels of the right margin.
971
+ def setMarginRight(pixelWidth)
972
+ sendMessage(2157, 0, pixelWidth)
973
+ end
974
+
975
+ # Returns the size in pixels of the right margin.
976
+ def getMarginRight
977
+ sendMessage(2158, 0, 0)
978
+ end
979
+
980
+ # Is the document different from when it was last saved?
981
+ def getModify
982
+ sendMessage(2159, 0, 0) == 1 ? true : false
983
+ end
984
+
985
+ # Select a range of text.
986
+ def setSel(start, last)
987
+ sendMessage(2160, start, last)
988
+ end
989
+
990
+ # Retrieve the selected text.
991
+ # Return the length of the text.
992
+ def getSelText
993
+ sendMessage(2161, 0, text)
994
+ end
995
+
996
+ # Retrieve a range of text.
997
+ # Return the length of the text.
998
+ def getTextRange(tr)
999
+ sendMessage(2162, 0, tr)
1000
+ end
1001
+
1002
+ # Draw the selection in normal style or with selection highlighted.
1003
+ def hideSelection(normal)
1004
+ sendMessage(2163, normal, 0)
1005
+ end
1006
+
1007
+ # Retrieve the x value of the point in the window where a position is displayed.
1008
+ def pointXFromPosition(pos)
1009
+ sendMessage(2164, 0, pos)
1010
+ end
1011
+
1012
+ # Retrieve the y value of the point in the window where a position is displayed.
1013
+ def pointYFromPosition(pos)
1014
+ sendMessage(2165, 0, pos)
1015
+ end
1016
+
1017
+ # Retrieve the line containing a position.
1018
+ def lineFromPosition(pos)
1019
+ sendMessage(2166, pos, 0)
1020
+ end
1021
+
1022
+ # Retrieve the position at the start of a line.
1023
+ def positionFromLine(line)
1024
+ sendMessage(2167, line, 0)
1025
+ end
1026
+
1027
+ # Scroll horizontally and vertically.
1028
+ def lineScroll(columns, lines)
1029
+ sendMessage(2168, columns, lines)
1030
+ end
1031
+
1032
+ # Ensure the caret is visible.
1033
+ def scrollCaret
1034
+ sendMessage(2169, 0, 0)
1035
+ end
1036
+
1037
+ # Replace the selected text with the argument text.
1038
+ def replaceSel(text)
1039
+ sendMessage(2170, 0, text)
1040
+ end
1041
+
1042
+ # Set to read only or read write.
1043
+ def setReadOnly(readOnly)
1044
+ sendMessage(2171, readOnly, 0)
1045
+ end
1046
+
1047
+ # Null operation.
1048
+ def null
1049
+ sendMessage(2172, 0, 0)
1050
+ end
1051
+
1052
+ # Will a paste succeed?
1053
+ def canPaste
1054
+ sendMessage(2173, 0, 0) == 1 ? true : false
1055
+ end
1056
+
1057
+ # Are there any undoable actions in the undo history?
1058
+ def canUndo
1059
+ sendMessage(2174, 0, 0) == 1 ? true : false
1060
+ end
1061
+
1062
+ # Delete the undo history.
1063
+ def emptyUndoBuffer
1064
+ sendMessage(2175, 0, 0)
1065
+ end
1066
+
1067
+ # Undo one action in the undo history.
1068
+ def undo
1069
+ sendMessage(2176, 0, 0)
1070
+ end
1071
+
1072
+ # Cut the selection to the clipboard.
1073
+ def cut
1074
+ sendMessage(2177, 0, 0)
1075
+ end
1076
+
1077
+ # Copy the selection to the clipboard.
1078
+ def copy
1079
+ sendMessage(2178, 0, 0)
1080
+ end
1081
+
1082
+ # Paste the contents of the clipboard into the document replacing the selection.
1083
+ def paste
1084
+ sendMessage(2179, 0, 0)
1085
+ end
1086
+
1087
+ # Clear the selection.
1088
+ def clear
1089
+ sendMessage(2180, 0, 0)
1090
+ end
1091
+
1092
+ # Replace the contents of the document with the argument text.
1093
+ def setText(text)
1094
+ sendMessage(2181, 0, text)
1095
+ end
1096
+
1097
+ # Retrieve all the text in the document.
1098
+ # Returns number of characters retrieved.
1099
+ def getText(length)
1100
+ buffer = "".ljust(length)
1101
+ sendMessage(2182, length, buffer)
1102
+ buffer
1103
+ end
1104
+
1105
+ # Retrieve the number of characters in the document.
1106
+ def getTextLength
1107
+ sendMessage(2183, 0, 0)
1108
+ end
1109
+
1110
+ # Retrieve a pointer to a function that processes messages for this Scintilla.
1111
+ def getDirectFunction
1112
+ sendMessage(2184, 0, 0)
1113
+ end
1114
+
1115
+ # Retrieve a pointer value to use as the first argument when calling
1116
+ # the function returned by GetDirectFunction.
1117
+ def getDirectPointer
1118
+ sendMessage(2185, 0, 0)
1119
+ end
1120
+
1121
+ # Set to overtype (true) or insert mode.
1122
+ def setOvertype(overtype)
1123
+ sendMessage(2186, overtype, 0)
1124
+ end
1125
+
1126
+ # Returns true if overtype mode is active otherwise false is returned.
1127
+ def getOvertype
1128
+ sendMessage(2187, 0, 0) == 1 ? true : false
1129
+ end
1130
+
1131
+ # Set the width of the insert mode caret.
1132
+ def setCaretWidth(pixelWidth)
1133
+ sendMessage(2188, pixelWidth, 0)
1134
+ end
1135
+
1136
+ # Returns the width of the insert mode caret.
1137
+ def getCaretWidth
1138
+ sendMessage(2189, 0, 0)
1139
+ end
1140
+
1141
+ # Sets the position that starts the target which is used for updating the
1142
+ # document without affecting the scroll position.
1143
+ def setTargetStart(pos)
1144
+ sendMessage(2190, pos, 0)
1145
+ end
1146
+
1147
+ # Get the position that starts the target.
1148
+ def getTargetStart
1149
+ sendMessage(2191, 0, 0)
1150
+ end
1151
+
1152
+ # Sets the position that ends the target which is used for updating the
1153
+ # document without affecting the scroll position.
1154
+ def setTargetEnd(pos)
1155
+ sendMessage(2192, pos, 0)
1156
+ end
1157
+
1158
+ # Get the position that ends the target.
1159
+ def getTargetEnd
1160
+ sendMessage(2193, 0, 0)
1161
+ end
1162
+
1163
+ # Replace the target text with the argument text.
1164
+ # Text is counted so it can contain nulls.
1165
+ # Returns the length of the replacement text.
1166
+ def replaceTarget(length, text)
1167
+ sendMessage(2194, length, text)
1168
+ end
1169
+
1170
+ # Replace the target text with the argument text after \d processing.
1171
+ # Text is counted so it can contain nulls.
1172
+ # Looks for \d where d is between 1 and 9 and replaces these with the strings
1173
+ # matched in the last search operation which were surrounded by \( and \).
1174
+ # Returns the length of the replacement text including any change
1175
+ # caused by processing the \d patterns.
1176
+ def replaceTargetRE(length, text)
1177
+ sendMessage(2195, length, text)
1178
+ end
1179
+
1180
+ # Search for a counted string in the target and set the target to the found
1181
+ # range. Text is counted so it can contain nulls.
1182
+ # Returns length of range or -1 for failure in which case target is not moved.
1183
+ def searchInTarget(length, text)
1184
+ sendMessage(2197, length, text)
1185
+ end
1186
+
1187
+ # Set the search flags used by SearchInTarget.
1188
+ def setSearchFlags(flags)
1189
+ sendMessage(2198, flags, 0)
1190
+ end
1191
+
1192
+ # Get the search flags used by SearchInTarget.
1193
+ def getSearchFlags
1194
+ sendMessage(2199, 0, 0)
1195
+ end
1196
+
1197
+ # Show a call tip containing a definition near position pos.
1198
+ def callTipShow(pos, definition)
1199
+ sendMessage(2200, pos, definition)
1200
+ end
1201
+
1202
+ # Remove the call tip from the screen.
1203
+ def callTipCancel
1204
+ sendMessage(2201, 0, 0)
1205
+ end
1206
+
1207
+ # Is there an active call tip?
1208
+ def callTipActive
1209
+ sendMessage(2202, 0, 0) == 1 ? true : false
1210
+ end
1211
+
1212
+ # Retrieve the position where the caret was before displaying the call tip.
1213
+ def callTipPosStart
1214
+ sendMessage(2203, 0, 0)
1215
+ end
1216
+
1217
+ # Highlight a segment of the definition.
1218
+ def callTipSetHlt(start, last)
1219
+ sendMessage(2204, start, last)
1220
+ end
1221
+
1222
+ # Set the background colour for the call tip.
1223
+ def callTipSetBack(back)
1224
+ sendMessage(2205, back & 0xffffff, 0)
1225
+ end
1226
+
1227
+ # Find the display line of a document line taking hidden lines into account.
1228
+ def visibleFromDocLine(line)
1229
+ sendMessage(2220, line, 0)
1230
+ end
1231
+
1232
+ # Find the document line of a display line taking hidden lines into account.
1233
+ def docLineFromVisible(lineDisplay)
1234
+ sendMessage(2221, lineDisplay, 0)
1235
+ end
1236
+
1237
+ SC_FOLDLEVELBASE = 0x400
1238
+ SC_FOLDLEVELWHITEFLAG = 0x1000
1239
+ SC_FOLDLEVELHEADERFLAG = 0x2000
1240
+ SC_FOLDLEVELBOXHEADERFLAG = 0x4000
1241
+ SC_FOLDLEVELBOXFOOTERFLAG = 0x8000
1242
+ SC_FOLDLEVELCONTRACTED = 0x10000
1243
+ SC_FOLDLEVELUNINDENT = 0x20000
1244
+ SC_FOLDLEVELNUMBERMASK = 0x0FFF
1245
+
1246
+ # Set the fold level of a line.
1247
+ # This encodes an integer level along with flags indicating whether the
1248
+ # line is a header and whether it is effectively white space.
1249
+ def setFoldLevel(line, level)
1250
+ sendMessage(2222, line, level)
1251
+ end
1252
+
1253
+ # Retrieve the fold level of a line.
1254
+ def getFoldLevel(line)
1255
+ sendMessage(2223, line, 0)
1256
+ end
1257
+
1258
+ # Find the last child line of a header line.
1259
+ def getLastChild(line, level)
1260
+ sendMessage(2224, line, level)
1261
+ end
1262
+
1263
+ # Find the parent line of a child line.
1264
+ def getFoldParent(line)
1265
+ sendMessage(2225, line, 0)
1266
+ end
1267
+
1268
+ # Make a range of lines visible.
1269
+ def showLines(lineStart, lineEnd)
1270
+ sendMessage(2226, lineStart, lineEnd)
1271
+ end
1272
+
1273
+ # Make a range of lines invisible.
1274
+ def hideLines(lineStart, lineEnd)
1275
+ sendMessage(2227, lineStart, lineEnd)
1276
+ end
1277
+
1278
+ # Is a line visible?
1279
+ def getLineVisible(line)
1280
+ sendMessage(2228, line, 0) == 1 ? true : false
1281
+ end
1282
+
1283
+ # Show the children of a header line.
1284
+ def setFoldExpanded(line, expanded)
1285
+ sendMessage(2229, line, expanded)
1286
+ end
1287
+
1288
+ # Is a header line expanded?
1289
+ def getFoldExpanded(line)
1290
+ sendMessage(2230, line, 0) == 1 ? true : false
1291
+ end
1292
+
1293
+ # Switch a header line between expanded and contracted.
1294
+ def toggleFold(line)
1295
+ sendMessage(2231, line, 0)
1296
+ end
1297
+
1298
+ # Ensure a particular line is visible by expanding any header line hiding it.
1299
+ def ensureVisible(line)
1300
+ sendMessage(2232, line, 0)
1301
+ end
1302
+
1303
+ SC_FOLDFLAG_LINEBEFORE_EXPANDED = 0x0002
1304
+ SC_FOLDFLAG_LINEBEFORE_CONTRACTED = 0x0004
1305
+ SC_FOLDFLAG_LINEAFTER_EXPANDED = 0x0008
1306
+ SC_FOLDFLAG_LINEAFTER_CONTRACTED = 0x0010
1307
+ SC_FOLDFLAG_LEVELNUMBERS = 0x0040
1308
+ SC_FOLDFLAG_BOX = 0x0001
1309
+
1310
+ # Set some style options for folding.
1311
+ def setFoldFlags(flags)
1312
+ sendMessage(2233, flags, 0)
1313
+ end
1314
+
1315
+ # Ensure a particular line is visible by expanding any header line hiding it.
1316
+ # Use the currently set visibility policy to determine which range to display.
1317
+ def ensureVisibleEnforcePolicy(line)
1318
+ sendMessage(2234, line, 0)
1319
+ end
1320
+
1321
+ # Sets whether a tab pressed when caret is within indentation indents.
1322
+ def setTabIndents(tabIndents)
1323
+ sendMessage(2260, tabIndents, 0)
1324
+ end
1325
+
1326
+ # Does a tab pressed when caret is within indentation indent?
1327
+ def getTabIndents
1328
+ sendMessage(2261, 0, 0) == 1 ? true : false
1329
+ end
1330
+
1331
+ # Sets whether a backspace pressed when caret is within indentation unindents.
1332
+ def setBackSpaceUnIndents(bsUnIndents)
1333
+ sendMessage(2262, bsUnIndents, 0)
1334
+ end
1335
+
1336
+ # Does a backspace pressed when caret is within indentation unindent?
1337
+ def getBackSpaceUnIndents
1338
+ sendMessage(2263, 0, 0) == 1 ? true : false
1339
+ end
1340
+
1341
+ SC_TIME_FOREVER = 10000000
1342
+
1343
+ # Sets the time the mouse must sit still to generate a mouse dwell event.
1344
+ def setMouseDwellTime(periodMilliseconds)
1345
+ sendMessage(2264, periodMilliseconds, 0)
1346
+ end
1347
+
1348
+ # Retrieve the time the mouse must sit still to generate a mouse dwell event.
1349
+ def getMouseDwellTime
1350
+ sendMessage(2265, 0, 0)
1351
+ end
1352
+
1353
+ # Get position of start of word.
1354
+ def wordStartPosition(pos, onlyWordCharacters)
1355
+ sendMessage(2266, pos, onlyWordCharacters)
1356
+ end
1357
+
1358
+ # Get position of end of word.
1359
+ def wordEndPosition(pos, onlyWordCharacters)
1360
+ sendMessage(2267, pos, onlyWordCharacters)
1361
+ end
1362
+
1363
+ SC_WRAP_NONE = 0
1364
+ SC_WRAP_WORD = 1
1365
+
1366
+ # Sets whether text is word wrapped.
1367
+ def setWrapMode(mode)
1368
+ sendMessage(2268, mode, 0)
1369
+ end
1370
+
1371
+ # Retrieve whether text is word wrapped.
1372
+ def getWrapMode
1373
+ sendMessage(2269, 0, 0)
1374
+ end
1375
+
1376
+ SC_CACHE_NONE = 0
1377
+ SC_CACHE_CARET = 1
1378
+ SC_CACHE_PAGE = 2
1379
+ SC_CACHE_DOCUMENT = 3
1380
+
1381
+ # Sets the degree of caching of layout information.
1382
+ def setLayoutCache(mode)
1383
+ sendMessage(2272, mode, 0)
1384
+ end
1385
+
1386
+ # Retrieve the degree of caching of layout information.
1387
+ def getLayoutCache
1388
+ sendMessage(2273, 0, 0)
1389
+ end
1390
+
1391
+ # Sets the document width assumed for scrolling.
1392
+ def setScrollWidth(pixelWidth)
1393
+ sendMessage(2274, pixelWidth, 0)
1394
+ end
1395
+
1396
+ # Retrieve the document width assumed for scrolling.
1397
+ def getScrollWidth
1398
+ sendMessage(2275, 0, 0)
1399
+ end
1400
+
1401
+ # Measure the pixel width of some text in a particular style.
1402
+ # Nul terminated text argument.
1403
+ # Does not handle tab or control characters.
1404
+ def textWidth(style, text)
1405
+ sendMessage(2276, style, text)
1406
+ end
1407
+
1408
+ # Sets the scroll range so that maximum scroll position has
1409
+ # the last line at the bottom of the view (default).
1410
+ # Setting this to false allows scrolling one page below the last line.
1411
+ def setEndAtLastLine(endAtLastLine)
1412
+ sendMessage(2277, endAtLastLine, 0)
1413
+ end
1414
+
1415
+ # Retrieve whether the maximum scroll position has the last
1416
+ # line at the bottom of the view.
1417
+ def getEndAtLastLine
1418
+ sendMessage(2278, 0, 0)
1419
+ end
1420
+
1421
+ # Retrieve the height of a particular line of text in pixels.
1422
+ def textHeight(line)
1423
+ sendMessage(2279, line, 0)
1424
+ end
1425
+
1426
+ # Show or hide the vertical scroll bar.
1427
+ def setVScrollBar(show)
1428
+ sendMessage(2280, show, 0)
1429
+ end
1430
+
1431
+ # Is the vertical scroll bar visible?
1432
+ def getVScrollBar
1433
+ sendMessage(2281, 0, 0) == 1 ? true : false
1434
+ end
1435
+
1436
+ # Append a string to the end of the document without changing the selection.
1437
+ def appendText(length, text)
1438
+ sendMessage(2282, length, text)
1439
+ end
1440
+
1441
+ # Is drawing done in two phases with backgrounds drawn before faoregrounds?
1442
+ def getTwoPhaseDraw
1443
+ sendMessage(2283, 0, 0) == 1 ? true : false
1444
+ end
1445
+
1446
+ # In twoPhaseDraw mode, drawing is performed in two phases, first the background
1447
+ # and then the foreground. This avoids chopping off characters that overlap the next run.
1448
+ def setTwoPhaseDraw(twoPhase)
1449
+ sendMessage(2284, twoPhase, 0)
1450
+ end
1451
+
1452
+ # Make the target range start and end be the same as the selection range start and end.
1453
+ def targetFromSelection
1454
+ sendMessage(2287, 0, 0)
1455
+ end
1456
+
1457
+ # Join the lines in the target.
1458
+ # This is an experimental feature and may be changed or removed.
1459
+ def linesJoin
1460
+ sendMessage(2288, 0, 0)
1461
+ end
1462
+
1463
+ # Split the lines in the target into lines that are less wide than pixelWidth
1464
+ # where possible.
1465
+ def linesSplit(pixelWidth)
1466
+ sendMessage(2289, pixelWidth, 0)
1467
+ end
1468
+
1469
+ # Set the colours used as a chequerboard pattern in the fold margin
1470
+ def setFoldMarginColour(useSetting, back)
1471
+ sendMessage(2290, useSetting, back & 0xffffff)
1472
+ end
1473
+ def setFoldMarginHiColour(useSetting, fore)
1474
+ sendMessage(2291, useSetting, fore & 0xffffff)
1475
+ end
1476
+
1477
+
1478
+ # Move caret down one line.
1479
+ def lineDown
1480
+ sendMessage(2300, 0, 0)
1481
+ end
1482
+
1483
+ # Move caret down one line extending selection to new caret position.
1484
+ def lineDownExtend
1485
+ sendMessage(2301, 0, 0)
1486
+ end
1487
+
1488
+ # Move caret up one line.
1489
+ def lineUp
1490
+ sendMessage(2302, 0, 0)
1491
+ end
1492
+
1493
+ # Move caret up one line extending selection to new caret position.
1494
+ def lineUpExtend
1495
+ sendMessage(2303, 0, 0)
1496
+ end
1497
+
1498
+ # Move caret left one character.
1499
+ def charLeft
1500
+ sendMessage(2304, 0, 0)
1501
+ end
1502
+
1503
+ # Move caret left one character extending selection to new caret position.
1504
+ def charLeftExtend
1505
+ sendMessage(2305, 0, 0)
1506
+ end
1507
+
1508
+ # Move caret right one character.
1509
+ def charRight
1510
+ sendMessage(2306, 0, 0)
1511
+ end
1512
+
1513
+ # Move caret right one character extending selection to new caret position.
1514
+ def charRightExtend
1515
+ sendMessage(2307, 0, 0)
1516
+ end
1517
+
1518
+ # Move caret left one word.
1519
+ def wordLeft
1520
+ sendMessage(2308, 0, 0)
1521
+ end
1522
+
1523
+ # Move caret left one word extending selection to new caret position.
1524
+ def wordLeftExtend
1525
+ sendMessage(2309, 0, 0)
1526
+ end
1527
+
1528
+ # Move caret right one word.
1529
+ def wordRight
1530
+ sendMessage(2310, 0, 0)
1531
+ end
1532
+
1533
+ # Move caret right one word extending selection to new caret position.
1534
+ def wordRightExtend
1535
+ sendMessage(2311, 0, 0)
1536
+ end
1537
+
1538
+ # Move caret to first position on line.
1539
+ def home
1540
+ sendMessage(2312, 0, 0)
1541
+ end
1542
+
1543
+ # Move caret to first position on line extending selection to new caret position.
1544
+ def homeExtend
1545
+ sendMessage(2313, 0, 0)
1546
+ end
1547
+
1548
+ # Move caret to last position on line.
1549
+ def lineEnd
1550
+ sendMessage(2314, 0, 0)
1551
+ end
1552
+
1553
+ # Move caret to last position on line extending selection to new caret position.
1554
+ def lineEndExtend
1555
+ sendMessage(2315, 0, 0)
1556
+ end
1557
+
1558
+ # Move caret to first position in document.
1559
+ def documentStart
1560
+ sendMessage(2316, 0, 0)
1561
+ end
1562
+
1563
+ # Move caret to first position in document extending selection to new caret position.
1564
+ def documentStartExtend
1565
+ sendMessage(2317, 0, 0)
1566
+ end
1567
+
1568
+ # Move caret to last position in document.
1569
+ def documentEnd
1570
+ sendMessage(2318, 0, 0)
1571
+ end
1572
+
1573
+ # Move caret to last position in document extending selection to new caret position.
1574
+ def documentEndExtend
1575
+ sendMessage(2319, 0, 0)
1576
+ end
1577
+
1578
+ # Move caret one page up.
1579
+ def pageUp
1580
+ sendMessage(2320, 0, 0)
1581
+ end
1582
+
1583
+ # Move caret one page up extending selection to new caret position.
1584
+ def pageUpExtend
1585
+ sendMessage(2321, 0, 0)
1586
+ end
1587
+
1588
+ # Move caret one page down.
1589
+ def pageDown
1590
+ sendMessage(2322, 0, 0)
1591
+ end
1592
+
1593
+ # Move caret one page down extending selection to new caret position.
1594
+ def pageDownExtend
1595
+ sendMessage(2323, 0, 0)
1596
+ end
1597
+
1598
+ # Switch from insert to overtype mode or the reverse.
1599
+ def editToggleOvertype
1600
+ sendMessage(2324, 0, 0)
1601
+ end
1602
+
1603
+ # Cancel any modes such as call tip or auto-completion list display.
1604
+ def cancel
1605
+ sendMessage(2325, 0, 0)
1606
+ end
1607
+
1608
+ # Delete the selection or if no selection, the character before the caret.
1609
+ def deleteBack
1610
+ sendMessage(2326, 0, 0)
1611
+ end
1612
+
1613
+ # If selection is empty or all on one line replace the selection with a tab character.
1614
+ # If more than one line selected, indent the lines.
1615
+ def tab
1616
+ sendMessage(2327, 0, 0)
1617
+ end
1618
+
1619
+ # Dedent the selected lines.
1620
+ def backTab
1621
+ sendMessage(2328, 0, 0)
1622
+ end
1623
+
1624
+ # Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
1625
+ def newLine
1626
+ sendMessage(2329, 0, 0)
1627
+ end
1628
+
1629
+ # Insert a Form Feed character.
1630
+ def formFeed
1631
+ sendMessage(2330, 0, 0)
1632
+ end
1633
+
1634
+ # Move caret to before first visible character on line.
1635
+ # If already there move to first character on line.
1636
+ def vCHome
1637
+ sendMessage(2331, 0, 0)
1638
+ end
1639
+
1640
+ # Like VCHome but extending selection to new caret position.
1641
+ def vCHomeExtend
1642
+ sendMessage(2332, 0, 0)
1643
+ end
1644
+
1645
+ # Magnify the displayed text by increasing the sizes by 1 point.
1646
+ def zoomIn
1647
+ sendMessage(2333, 0, 0)
1648
+ end
1649
+
1650
+ # Make the displayed text smaller by decreasing the sizes by 1 point.
1651
+ def zoomOut
1652
+ sendMessage(2334, 0, 0)
1653
+ end
1654
+
1655
+ # Delete the word to the left of the caret.
1656
+ def delWordLeft
1657
+ sendMessage(2335, 0, 0)
1658
+ end
1659
+
1660
+ # Delete the word to the right of the caret.
1661
+ def delWordRight
1662
+ sendMessage(2336, 0, 0)
1663
+ end
1664
+
1665
+ # Cut the line containing the caret.
1666
+ def lineCut
1667
+ sendMessage(2337, 0, 0)
1668
+ end
1669
+
1670
+ # Delete the line containing the caret.
1671
+ def lineDelete
1672
+ sendMessage(2338, 0, 0)
1673
+ end
1674
+
1675
+ # Switch the current line with the previous.
1676
+ def lineTranspose
1677
+ sendMessage(2339, 0, 0)
1678
+ end
1679
+
1680
+ # Duplicate the current line.
1681
+ def lineDuplicate
1682
+ sendMessage(2404, 0, 0)
1683
+ end
1684
+
1685
+ # Transform the selection to lower case.
1686
+ def lowerCase
1687
+ sendMessage(2340, 0, 0)
1688
+ end
1689
+
1690
+ # Transform the selection to upper case.
1691
+ def upperCase
1692
+ sendMessage(2341, 0, 0)
1693
+ end
1694
+
1695
+ # Scroll the document down, keeping the caret visible.
1696
+ def lineScrollDown
1697
+ sendMessage(2342, 0, 0)
1698
+ end
1699
+
1700
+ # Scroll the document up, keeping the caret visible.
1701
+ def lineScrollUp
1702
+ sendMessage(2343, 0, 0)
1703
+ end
1704
+
1705
+ # Delete the selection or if no selection, the character before the caret.
1706
+ # Will not delete the character before at the start of a line.
1707
+ def deleteBackNotLine
1708
+ sendMessage(2344, 0, 0)
1709
+ end
1710
+
1711
+ # Move caret to first position on display line.
1712
+ def homeDisplay
1713
+ sendMessage(2345, 0, 0)
1714
+ end
1715
+
1716
+ # Move caret to first position on display line extending selection to
1717
+ # new caret position.
1718
+ def homeDisplayExtend
1719
+ sendMessage(2346, 0, 0)
1720
+ end
1721
+
1722
+ # Move caret to last position on display line.
1723
+ def lineEndDisplay
1724
+ sendMessage(2347, 0, 0)
1725
+ end
1726
+
1727
+ # Move caret to last position on display line extending selection to new
1728
+ # caret position.
1729
+ def lineEndDisplayExtend
1730
+ sendMessage(2348, 0, 0)
1731
+ end
1732
+
1733
+ # Move the caret inside current view if it's not there already.
1734
+ def moveCaretInsideView
1735
+ sendMessage(2401, 0, 0)
1736
+ end
1737
+
1738
+ # How many characters are on a line, not including end of line characters?
1739
+ def lineLength(line)
1740
+ sendMessage(2350, line, 0)
1741
+ end
1742
+
1743
+ # Highlight the characters at two positions.
1744
+ def braceHighlight(pos1, pos2)
1745
+ sendMessage(2351, pos1, pos2)
1746
+ end
1747
+
1748
+ # Highlight the character at a position indicating there is no matching brace.
1749
+ def braceBadLight(pos)
1750
+ sendMessage(2352, pos, 0)
1751
+ end
1752
+
1753
+ # Find the position of a matching brace or INVALID_POSITION if no match.
1754
+ def braceMatch(pos)
1755
+ sendMessage(2353, pos, 0)
1756
+ end
1757
+
1758
+ # Are the end of line characters visible?
1759
+ def getViewEOL
1760
+ sendMessage(2355, 0, 0) == 1 ? true : false
1761
+ end
1762
+
1763
+ # Make the end of line characters visible or invisible.
1764
+ def setViewEOL(visible)
1765
+ sendMessage(2356, visible, 0)
1766
+ end
1767
+
1768
+ # Retrieve a pointer to the document object.
1769
+ def getDocPointer
1770
+ sendMessage(2357, 0, 0)
1771
+ end
1772
+
1773
+ # Change the document object used.
1774
+ def setDocPointer(pointer)
1775
+ sendMessage(2358, 0, pointer)
1776
+ end
1777
+
1778
+ # Set which document modification events are sent to the container.
1779
+ def setModEventMask(mask)
1780
+ sendMessage(2359, mask, 0)
1781
+ end
1782
+
1783
+ EDGE_NONE = 0
1784
+ EDGE_LINE = 1
1785
+ EDGE_BACKGROUND = 2
1786
+
1787
+ # Retrieve the column number which text should be kept within.
1788
+ def getEdgeColumn
1789
+ sendMessage(2360, 0, 0)
1790
+ end
1791
+
1792
+ # Set the column number of the edge.
1793
+ # If text goes past the edge then it is highlighted.
1794
+ def setEdgeColumn(column)
1795
+ sendMessage(2361, column, 0)
1796
+ end
1797
+
1798
+ # Retrieve the edge highlight mode.
1799
+ def getEdgeMode
1800
+ sendMessage(2362, 0, 0)
1801
+ end
1802
+
1803
+ # The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
1804
+ # goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
1805
+ def setEdgeMode(mode)
1806
+ sendMessage(2363, mode, 0)
1807
+ end
1808
+
1809
+ # Retrieve the colour used in edge indication.
1810
+ def getEdgeColour
1811
+ sendMessage(2364, 0, 0)
1812
+ end
1813
+
1814
+ # Change the colour used in edge indication.
1815
+ def setEdgeColour(edgeColour)
1816
+ sendMessage(2365, edgeColour & 0xffffff, 0)
1817
+ end
1818
+
1819
+ # Sets the current caret position to be the search anchor.
1820
+ def searchAnchor
1821
+ sendMessage(2366, 0, 0)
1822
+ end
1823
+
1824
+ # Find some text starting at the search anchor.
1825
+ # Does not ensure the selection is visible.
1826
+ def searchNext(flags, text)
1827
+ sendMessage(2367, flags, text)
1828
+ end
1829
+
1830
+ # Find some text starting at the search anchor and moving backwards.
1831
+ # Does not ensure the selection is visible.
1832
+ def searchPrev(flags, text)
1833
+ sendMessage(2368, flags, text)
1834
+ end
1835
+
1836
+ # Retrieves the number of lines completely visible.
1837
+ def linesOnScreen
1838
+ sendMessage(2370, 0, 0)
1839
+ end
1840
+
1841
+ # Set whether a pop up menu is displayed automatically when the user presses
1842
+ # the wrong mouse button.
1843
+ def usePopUp(allowPopUp)
1844
+ sendMessage(2371, allowPopUp, 0)
1845
+ end
1846
+
1847
+ # Is the selection rectangular? The alternative is the more common stream selection.
1848
+ def selectionIsRectangle
1849
+ sendMessage(2372, 0, 0) == 1 ? true : false
1850
+ end
1851
+
1852
+ # Set the zoom level. This number of points is added to the size of all fonts.
1853
+ # It may be positive to magnify or negative to reduce.
1854
+ def setZoom(zoom)
1855
+ sendMessage(2373, zoom, 0)
1856
+ end
1857
+ # Retrieve the zoom level.
1858
+ def getZoom
1859
+ sendMessage(2374, 0, 0)
1860
+ end
1861
+
1862
+ # Create a new document object.
1863
+ # Starts with reference count of 1 and not selected into editor.
1864
+ def createDocument
1865
+ sendMessage(2375, 0, 0)
1866
+ end
1867
+ # Extend life of document.
1868
+ def addRefDocument(doc)
1869
+ sendMessage(2376, 0, doc)
1870
+ end
1871
+ # Release a reference to the document, deleting document if it fades to black.
1872
+ def releaseDocument(doc)
1873
+ sendMessage(2377, 0, doc)
1874
+ end
1875
+
1876
+ # Get which document modification events are sent to the container.
1877
+ def getModEventMask
1878
+ sendMessage(2378, 0, 0)
1879
+ end
1880
+
1881
+ # Change internal focus flag.
1882
+ def setFocusFlag(focus)
1883
+ sendMessage(2380, focus, 0)
1884
+ end
1885
+ # Get internal focus flag.
1886
+ def getFocus
1887
+ sendMessage(2381, 0, 0) == 1 ? true : false
1888
+ end
1889
+
1890
+ # Change error status - 0 = OK.
1891
+ def setStatus(statusCode)
1892
+ sendMessage(2382, statusCode, 0)
1893
+ end
1894
+ # Get error status.
1895
+ def getStatus
1896
+ sendMessage(2383, 0, 0)
1897
+ end
1898
+
1899
+ # Set whether the mouse is captured when its button is pressed.
1900
+ def setMouseDownCaptures(captures)
1901
+ sendMessage(2384, captures, 0)
1902
+ end
1903
+ # Get whether mouse gets captured.
1904
+ def getMouseDownCaptures
1905
+ sendMessage(2385, 0, 0) == 1 ? true : false
1906
+ end
1907
+
1908
+ SC_CURSORNORMAL = -1
1909
+ SC_CURSORWAIT = 4
1910
+ # Sets the cursor to one of the SC_CURSOR* values.
1911
+ def setCursor(cursorType)
1912
+ sendMessage(2386, cursorType, 0)
1913
+ end
1914
+ # Get cursor type.
1915
+ def getCursor
1916
+ sendMessage(2387, 0, 0)
1917
+ end
1918
+
1919
+ # Change the way control characters are displayed:
1920
+ # If symbol is < 32, keep the drawn way, else, use the given character.
1921
+ def setControlCharSymbol(symbol)
1922
+ sendMessage(2388, symbol, 0)
1923
+ end
1924
+ # Get the way control characters are displayed.
1925
+ def getControlCharSymbol
1926
+ sendMessage(2389, 0, 0)
1927
+ end
1928
+
1929
+ # Move to the previous change in capitalisation.
1930
+ def wordPartLeft
1931
+ sendMessage(2390, 0, 0)
1932
+ end
1933
+ # Move to the previous change in capitalisation extending selection
1934
+ # to new caret position.
1935
+ def wordPartLeftExtend
1936
+ sendMessage(2391, 0, 0)
1937
+ end
1938
+ # Move to the change next in capitalisation.
1939
+ def wordPartRight
1940
+ sendMessage(2392, 0, 0)
1941
+ end
1942
+ # Move to the next change in capitalisation extending selection
1943
+ # to new caret position.
1944
+ def wordPartRightExtend
1945
+ sendMessage(2393, 0, 0)
1946
+ end
1947
+
1948
+ # Constants for use with SetVisiblePolicy, similar to SetCaretPolicy.
1949
+ VISIBLE_SLOP = 0x01
1950
+ VISIBLE_STRICT = 0x04
1951
+ # Set the way the display area is determined when a particular line
1952
+ # is to be moved to by Find, FindNext, GotoLine, etc.
1953
+ def setVisiblePolicy(visiblePolicy, visibleSlop)
1954
+ sendMessage(2394, visiblePolicy, visibleSlop)
1955
+ end
1956
+
1957
+ # Delete back from the current position to the start of the line.
1958
+ def delLineLeft
1959
+ sendMessage(2395, 0, 0)
1960
+ end
1961
+
1962
+ # Delete forwards from the current position to the end of the line.
1963
+ def delLineRight
1964
+ sendMessage(2396, 0, 0)
1965
+ end
1966
+
1967
+ # Get and Set the xOffset (ie, horizonal scroll position).
1968
+ def setXOffset(newOffset)
1969
+ sendMessage(2397, newOffset, 0)
1970
+ end
1971
+ def getXOffset
1972
+ sendMessage(2398, 0, 0)
1973
+ end
1974
+
1975
+ # Set the last x chosen value to be the caret x position
1976
+ def chooseCaretX
1977
+ sendMessage(2399, 0, 0)
1978
+ end
1979
+
1980
+ # Set the focus to this Scintilla widget.
1981
+ # GTK+ Specific.
1982
+ def grabFocus
1983
+ sendMessage(2400, 0, 0)
1984
+ end
1985
+
1986
+ # Caret policy, used by SetXCaretPolicy and SetYCaretPolicy.
1987
+ # If CARET_SLOP is set, we can define a slop value: caretSlop.
1988
+ # This value defines an unwanted zone (UZ) where the caret is... unwanted.
1989
+ # This zone is defined as a number of pixels near the vertical margins,
1990
+ # and as a number of lines near the horizontal margins.
1991
+ # By keeping the caret away from the edges, it is seen within its context,
1992
+ # so it is likely that the identifier that the caret is on can be completely seen,
1993
+ # and that the current line is seen with some of the lines following it which are
1994
+ # often dependent on that line.
1995
+ CARET_SLOP = 0x01
1996
+ # If CARET_STRICT is set, the policy is enforced... strictly.
1997
+ # The caret is centred on the display if slop is not set,
1998
+ # and cannot go in the UZ if slop is set.
1999
+ CARET_STRICT = 0x04
2000
+ # If CARET_JUMPS is set, the display is moved more energetically
2001
+ # so the caret can move in the same direction longer before the policy is applied again.
2002
+ CARET_JUMPS = 0x10
2003
+ # If CARET_EVEN is not set, instead of having symmetrical UZs,
2004
+ # the left and bottom UZs are extended up to right and top UZs respectively.
2005
+ # This way, we favour the displaying of useful information: the begining of lines,
2006
+ # where most code reside, and the lines after the caret, eg. the body of a function.
2007
+ CARET_EVEN = 0x08
2008
+
2009
+ # Set the way the caret is kept visible when going sideway.
2010
+ # The exclusion zone is given in pixels.
2011
+ def setXCaretPolicy(caretPolicy, caretSlop)
2012
+ sendMessage(2402, caretPolicy, caretSlop)
2013
+ end
2014
+
2015
+ # Set the way the line the caret is on is kept visible.
2016
+ # The exclusion zone is given in lines.
2017
+ def setYCaretPolicy(caretPolicy, caretSlop)
2018
+ sendMessage(2403, caretPolicy, caretSlop)
2019
+ end
2020
+
2021
+ # Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
2022
+ def setPrintWrapMode(mode)
2023
+ sendMessage(2406, mode, 0)
2024
+ end
2025
+
2026
+ # Is printing line wrapped.
2027
+ def getPrintWrapMode
2028
+ sendMessage(2407, 0, 0)
2029
+ end
2030
+
2031
+ # Start notifying the container of all key presses and commands.
2032
+ def startRecord
2033
+ sendMessage(3001, 0, 0)
2034
+ end
2035
+
2036
+ # Stop notifying the container of all key presses and commands.
2037
+ def stopRecord
2038
+ sendMessage(3002, 0, 0)
2039
+ end
2040
+
2041
+ # Set the lexing language of the document.
2042
+ def setLexer(lexer)
2043
+ sendMessage(4001, lexer, 0)
2044
+ end
2045
+
2046
+ # Retrieve the lexing language of the document.
2047
+ def getLexer
2048
+ sendMessage(4002, 0, 0)
2049
+ end
2050
+
2051
+ # Colourise a segment of the document using the current lexing language.
2052
+ def colourise(start, last)
2053
+ sendMessage(4003, start, last)
2054
+ end
2055
+
2056
+ # Set up a value that may be used by a lexer for some optional feature.
2057
+ def setProperty(key, value)
2058
+ sendMessage(4004, key, value)
2059
+ end
2060
+
2061
+ # Set up the key words used by the lexer.
2062
+ def setKeyWords(keywordSet, keyWords)
2063
+ sendMessage(4005, keywordSet, keyWords)
2064
+ end
2065
+
2066
+ # Set the lexing language of the document based on string name.
2067
+ def setLexerLanguage(language)
2068
+ sendMessage(4006, 0, language)
2069
+ end
2070
+
2071
+ # Notifications
2072
+ # Type of modification and the action which caused the modification.
2073
+ # These are defined as a bit mask to make it easy to specify which notifications are wanted.
2074
+ # One bit is set from each of SC_MOD_* and SC_PERFORMED_*.
2075
+ SC_MOD_INSERTTEXT = 0x1
2076
+ SC_MOD_DELETETEXT = 0x2
2077
+ SC_MOD_CHANGESTYLE = 0x4
2078
+ SC_MOD_CHANGEFOLD = 0x8
2079
+ SC_PERFORMED_USER = 0x10
2080
+ SC_PERFORMED_UNDO = 0x20
2081
+ SC_PERFORMED_REDO = 0x40
2082
+ SC_LASTSTEPINUNDOREDO = 0x100
2083
+ SC_MOD_CHANGEMARKER = 0x200
2084
+ SC_MOD_BEFOREINSERT = 0x400
2085
+ SC_MOD_BEFOREDELETE = 0x800
2086
+ SC_MODEVENTMASKALL = 0xF77
2087
+
2088
+ # For compatibility, these go through the COMMAND notification rather than NOTIFY
2089
+ # and should have had exactly the same values as the EN_* constants.
2090
+ # Unfortunately the SETFOCUS and KILLFOCUS are flipped over from EN_*
2091
+ # As clients depend on these constants, this will not be changed.
2092
+ SCEN_CHANGE = 768
2093
+ SCEN_SETFOCUS = 512
2094
+ SCEN_KILLFOCUS = 256
2095
+
2096
+ # Symbolic key codes and modifier flags.
2097
+ # ASCII and other printable characters below 256.
2098
+ # Extended keys above 300.
2099
+
2100
+ SCK_DOWN = 300
2101
+ SCK_UP = 301
2102
+ SCK_LEFT = 302
2103
+ SCK_RIGHT = 303
2104
+ SCK_HOME = 304
2105
+ SCK_END = 305
2106
+ SCK_PRIOR = 306
2107
+ SCK_NEXT = 307
2108
+ SCK_DELETE = 308
2109
+ SCK_INSERT = 309
2110
+ SCK_ESCAPE = 7
2111
+ SCK_BACK = 8
2112
+ SCK_TAB = 9
2113
+ SCK_RETURN = 13
2114
+ SCK_ADD = 310
2115
+ SCK_SUBTRACT = 311
2116
+ SCK_DIVIDE = 312
2117
+
2118
+ SCMOD_SHIFT = 1
2119
+ SCMOD_CTRL = 2
2120
+ SCMOD_ALT = 4
2121
+
2122
+ # For SciLexer.h
2123
+ SCLEX_CONTAINER = 0
2124
+ SCLEX_NULL = 1
2125
+ SCLEX_PYTHON = 2
2126
+ SCLEX_CPP = 3
2127
+ SCLEX_HTML = 4
2128
+ SCLEX_XML = 5
2129
+ SCLEX_PERL = 6
2130
+ SCLEX_SQL = 7
2131
+ SCLEX_VB = 8
2132
+ SCLEX_PROPERTIES = 9
2133
+ SCLEX_ERRORLIST = 10
2134
+ SCLEX_MAKEFILE = 11
2135
+ SCLEX_BATCH = 12
2136
+ SCLEX_XCODE = 13
2137
+ SCLEX_LATEX = 14
2138
+ SCLEX_LUA = 15
2139
+ SCLEX_DIFF = 16
2140
+ SCLEX_CONF = 17
2141
+ SCLEX_PASCAL = 18
2142
+ SCLEX_AVE = 19
2143
+ SCLEX_ADA = 20
2144
+ SCLEX_LISP = 21
2145
+ SCLEX_RUBY = 22
2146
+ SCLEX_EIFFEL = 23
2147
+ SCLEX_EIFFELKW = 24
2148
+ SCLEX_TCL = 25
2149
+ SCLEX_NNCRONTAB = 26
2150
+ SCLEX_BULLANT = 27
2151
+ SCLEX_VBSCRIPT = 28
2152
+ SCLEX_ASP = 29
2153
+ SCLEX_PHP = 30
2154
+ SCLEX_BAAN = 31
2155
+ SCLEX_MATLAB = 32
2156
+ SCLEX_SCRIPTOL = 33
2157
+ SCLEX_ASM = 34
2158
+ SCLEX_CPPNOCASE = 35
2159
+ SCLEX_FORTRAN = 36
2160
+ SCLEX_F77 = 37
2161
+ SCLEX_CSS = 38
2162
+
2163
+ # When a lexer specifies its language as SCLEX_AUTOMATIC it receives a
2164
+ # value assigned in sequence from SCLEX_AUTOMATIC+1.
2165
+ SCLEX_AUTOMATIC = 1000
2166
+ # Lexical states for SCLEX_PYTHON
2167
+ SCE_P_DEFAULT = 0
2168
+ SCE_P_COMMENTLINE = 1
2169
+ SCE_P_NUMBER = 2
2170
+ SCE_P_STRING = 3
2171
+ SCE_P_CHARACTER = 4
2172
+ SCE_P_WORD = 5
2173
+ SCE_P_TRIPLE = 6
2174
+ SCE_P_TRIPLEDOUBLE = 7
2175
+ SCE_P_CLASSNAME = 8
2176
+ SCE_P_DEFNAME = 9
2177
+ SCE_P_OPERATOR = 10
2178
+ SCE_P_IDENTIFIER = 11
2179
+ SCE_P_COMMENTBLOCK = 12
2180
+ SCE_P_STRINGEOL = 13
2181
+ # Lexical states for SCLEX_CPP
2182
+ SCE_C_DEFAULT = 0
2183
+ SCE_C_COMMENT = 1
2184
+ SCE_C_COMMENTLINE = 2
2185
+ SCE_C_COMMENTDOC = 3
2186
+ SCE_C_NUMBER = 4
2187
+ SCE_C_WORD = 5
2188
+ SCE_C_STRING = 6
2189
+ SCE_C_CHARACTER = 7
2190
+ SCE_C_UUID = 8
2191
+ SCE_C_PREPROCESSOR = 9
2192
+ SCE_C_OPERATOR = 10
2193
+ SCE_C_IDENTIFIER = 11
2194
+ SCE_C_STRINGEOL = 12
2195
+ SCE_C_VERBATIM = 13
2196
+ SCE_C_REGEX = 14
2197
+ SCE_C_COMMENTLINEDOC = 15
2198
+ SCE_C_WORD2 = 16
2199
+ SCE_C_COMMENTDOCKEYWORD = 17
2200
+ SCE_C_COMMENTDOCKEYWORDERROR = 18
2201
+ # Lexical states for SCLEX_HTML, SCLEX_XML
2202
+ SCE_H_DEFAULT = 0
2203
+ SCE_H_TAG = 1
2204
+ SCE_H_TAGUNKNOWN = 2
2205
+ SCE_H_ATTRIBUTE = 3
2206
+ SCE_H_ATTRIBUTEUNKNOWN = 4
2207
+ SCE_H_NUMBER = 5
2208
+ SCE_H_DOUBLESTRING = 6
2209
+ SCE_H_SINGLESTRING = 7
2210
+ SCE_H_OTHER = 8
2211
+ SCE_H_COMMENT = 9
2212
+ SCE_H_ENTITY = 10
2213
+ # XML and ASP
2214
+ SCE_H_TAGEND = 11
2215
+ SCE_H_XMLSTART = 12
2216
+ SCE_H_XMLEND = 13
2217
+ SCE_H_SCRIPT = 14
2218
+ SCE_H_ASP = 15
2219
+ SCE_H_ASPAT = 16
2220
+ SCE_H_CDATA = 17
2221
+ SCE_H_QUESTION = 18
2222
+ # More HTML
2223
+ SCE_H_VALUE = 19
2224
+ # X-Code
2225
+ SCE_H_XCCOMMENT = 20
2226
+ # SGML
2227
+ SCE_H_SGML_DEFAULT = 21
2228
+ SCE_H_SGML_COMMAND = 22
2229
+ SCE_H_SGML_1ST_PARAM = 23
2230
+ SCE_H_SGML_DOUBLESTRING = 24
2231
+ SCE_H_SGML_SIMPLESTRING = 25
2232
+ SCE_H_SGML_ERROR = 26
2233
+ SCE_H_SGML_SPECIAL = 27
2234
+ SCE_H_SGML_ENTITY = 28
2235
+ SCE_H_SGML_COMMENT = 29
2236
+ SCE_H_SGML_1ST_PARAM_COMMENT = 30
2237
+ SCE_H_SGML_BLOCK_DEFAULT = 31
2238
+ # Embedded Javascript
2239
+ SCE_HJ_START = 40
2240
+ SCE_HJ_DEFAULT = 41
2241
+ SCE_HJ_COMMENT = 42
2242
+ SCE_HJ_COMMENTLINE = 43
2243
+ SCE_HJ_COMMENTDOC = 44
2244
+ SCE_HJ_NUMBER = 45
2245
+ SCE_HJ_WORD = 46
2246
+ SCE_HJ_KEYWORD = 47
2247
+ SCE_HJ_DOUBLESTRING = 48
2248
+ SCE_HJ_SINGLESTRING = 49
2249
+ SCE_HJ_SYMBOLS = 50
2250
+ SCE_HJ_STRINGEOL = 51
2251
+ SCE_HJ_REGEX = 52
2252
+ # ASP Javascript
2253
+ SCE_HJA_START = 55
2254
+ SCE_HJA_DEFAULT = 56
2255
+ SCE_HJA_COMMENT = 57
2256
+ SCE_HJA_COMMENTLINE = 58
2257
+ SCE_HJA_COMMENTDOC = 59
2258
+ SCE_HJA_NUMBER = 60
2259
+ SCE_HJA_WORD = 61
2260
+ SCE_HJA_KEYWORD = 62
2261
+ SCE_HJA_DOUBLESTRING = 63
2262
+ SCE_HJA_SINGLESTRING = 64
2263
+ SCE_HJA_SYMBOLS = 65
2264
+ SCE_HJA_STRINGEOL = 66
2265
+ SCE_HJA_REGEX = 67
2266
+ # Embedded VBScript
2267
+ SCE_HB_START = 70
2268
+ SCE_HB_DEFAULT = 71
2269
+ SCE_HB_COMMENTLINE = 72
2270
+ SCE_HB_NUMBER = 73
2271
+ SCE_HB_WORD = 74
2272
+ SCE_HB_STRING = 75
2273
+ SCE_HB_IDENTIFIER = 76
2274
+ SCE_HB_STRINGEOL = 77
2275
+ # ASP VBScript
2276
+ SCE_HBA_START = 80
2277
+ SCE_HBA_DEFAULT = 81
2278
+ SCE_HBA_COMMENTLINE = 82
2279
+ SCE_HBA_NUMBER = 83
2280
+ SCE_HBA_WORD = 84
2281
+ SCE_HBA_STRING = 85
2282
+ SCE_HBA_IDENTIFIER = 86
2283
+ SCE_HBA_STRINGEOL = 87
2284
+ # Embedded Python
2285
+ SCE_HP_START = 90
2286
+ SCE_HP_DEFAULT = 91
2287
+ SCE_HP_COMMENTLINE = 92
2288
+ SCE_HP_NUMBER = 93
2289
+ SCE_HP_STRING = 94
2290
+ SCE_HP_CHARACTER = 95
2291
+ SCE_HP_WORD = 96
2292
+ SCE_HP_TRIPLE = 97
2293
+ SCE_HP_TRIPLEDOUBLE = 98
2294
+ SCE_HP_CLASSNAME = 99
2295
+ SCE_HP_DEFNAME = 100
2296
+ SCE_HP_OPERATOR = 101
2297
+ SCE_HP_IDENTIFIER = 102
2298
+ # ASP Python
2299
+ SCE_HPA_START = 105
2300
+ SCE_HPA_DEFAULT = 106
2301
+ SCE_HPA_COMMENTLINE = 107
2302
+ SCE_HPA_NUMBER = 108
2303
+ SCE_HPA_STRING = 109
2304
+ SCE_HPA_CHARACTER = 110
2305
+ SCE_HPA_WORD = 111
2306
+ SCE_HPA_TRIPLE = 112
2307
+ SCE_HPA_TRIPLEDOUBLE = 113
2308
+ SCE_HPA_CLASSNAME = 114
2309
+ SCE_HPA_DEFNAME = 115
2310
+ SCE_HPA_OPERATOR = 116
2311
+ SCE_HPA_IDENTIFIER = 117
2312
+ # PHP
2313
+ SCE_HPHP_DEFAULT = 118
2314
+ SCE_HPHP_HSTRING = 119
2315
+ SCE_HPHP_SIMPLESTRING = 120
2316
+ SCE_HPHP_WORD = 121
2317
+ SCE_HPHP_NUMBER = 122
2318
+ SCE_HPHP_VARIABLE = 123
2319
+ SCE_HPHP_COMMENT = 124
2320
+ SCE_HPHP_COMMENTLINE = 125
2321
+ SCE_HPHP_HSTRING_VARIABLE = 126
2322
+ SCE_HPHP_OPERATOR = 127
2323
+ # Lexical states for SCLEX_PERL
2324
+ SCE_PL_DEFAULT = 0
2325
+ SCE_PL_ERROR = 1
2326
+ SCE_PL_COMMENTLINE = 2
2327
+ SCE_PL_POD = 3
2328
+ SCE_PL_NUMBER = 4
2329
+ SCE_PL_WORD = 5
2330
+ SCE_PL_STRING = 6
2331
+ SCE_PL_CHARACTER = 7
2332
+ SCE_PL_PUNCTUATION = 8
2333
+ SCE_PL_PREPROCESSOR = 9
2334
+ SCE_PL_OPERATOR = 10
2335
+ SCE_PL_IDENTIFIER = 11
2336
+ SCE_PL_SCALAR = 12
2337
+ SCE_PL_ARRAY = 13
2338
+ SCE_PL_HASH = 14
2339
+ SCE_PL_SYMBOLTABLE = 15
2340
+ SCE_PL_REGEX = 17
2341
+ SCE_PL_REGSUBST = 18
2342
+ SCE_PL_LONGQUOTE = 19
2343
+ SCE_PL_BACKTICKS = 20
2344
+ SCE_PL_DATASECTION = 21
2345
+ SCE_PL_HERE_DELIM = 22
2346
+ SCE_PL_HERE_Q = 23
2347
+ SCE_PL_HERE_QQ = 24
2348
+ SCE_PL_HERE_QX = 25
2349
+ SCE_PL_STRING_Q = 26
2350
+ SCE_PL_STRING_QQ = 27
2351
+ SCE_PL_STRING_QX = 28
2352
+ SCE_PL_STRING_QR = 29
2353
+ SCE_PL_STRING_QW = 30
2354
+ # Lexical states for SCLEX_VB, SCLEX_VBSCRIPT
2355
+ SCE_B_DEFAULT = 0
2356
+ SCE_B_COMMENT = 1
2357
+ SCE_B_NUMBER = 2
2358
+ SCE_B_KEYWORD = 3
2359
+ SCE_B_STRING = 4
2360
+ SCE_B_PREPROCESSOR = 5
2361
+ SCE_B_OPERATOR = 6
2362
+ SCE_B_IDENTIFIER = 7
2363
+ SCE_B_DATE = 8
2364
+ # Lexical states for SCLEX_PROPERTIES
2365
+ SCE_PROPS_DEFAULT = 0
2366
+ SCE_PROPS_COMMENT = 1
2367
+ SCE_PROPS_SECTION = 2
2368
+ SCE_PROPS_ASSIGNMENT = 3
2369
+ SCE_PROPS_DEFVAL = 4
2370
+ # Lexical states for SCLEX_LATEX
2371
+ SCE_L_DEFAULT = 0
2372
+ SCE_L_COMMAND = 1
2373
+ SCE_L_TAG = 2
2374
+ SCE_L_MATH = 3
2375
+ SCE_L_COMMENT = 4
2376
+ # Lexical states for SCLEX_LUA
2377
+ SCE_LUA_DEFAULT = 0
2378
+ SCE_LUA_COMMENT = 1
2379
+ SCE_LUA_COMMENTLINE = 2
2380
+ SCE_LUA_COMMENTDOC = 3
2381
+ SCE_LUA_NUMBER = 4
2382
+ SCE_LUA_WORD = 5
2383
+ SCE_LUA_STRING = 6
2384
+ SCE_LUA_CHARACTER = 7
2385
+ SCE_LUA_LITERALSTRING = 8
2386
+ SCE_LUA_PREPROCESSOR = 9
2387
+ SCE_LUA_OPERATOR = 10
2388
+ SCE_LUA_IDENTIFIER = 11
2389
+ SCE_LUA_STRINGEOL = 12
2390
+ SCE_LUA_WORD2 = 13
2391
+ SCE_LUA_WORD3 = 14
2392
+ SCE_LUA_WORD4 = 15
2393
+ SCE_LUA_WORD5 = 16
2394
+ SCE_LUA_WORD6 = 17
2395
+ # Lexical states for SCLEX_ERRORLIST
2396
+ SCE_ERR_DEFAULT = 0
2397
+ SCE_ERR_PYTHON = 1
2398
+ SCE_ERR_GCC = 2
2399
+ SCE_ERR_MS = 3
2400
+ SCE_ERR_CMD = 4
2401
+ SCE_ERR_BORLAND = 5
2402
+ SCE_ERR_PERL = 6
2403
+ SCE_ERR_NET = 7
2404
+ SCE_ERR_LUA = 8
2405
+ SCE_ERR_CTAG = 9
2406
+ SCE_ERR_DIFF_CHANGED = 10
2407
+ SCE_ERR_DIFF_ADDITION = 11
2408
+ SCE_ERR_DIFF_DELETION = 12
2409
+ SCE_ERR_DIFF_MESSAGE = 13
2410
+ SCE_ERR_PHP = 14
2411
+ # Lexical states for SCLEX_BATCH
2412
+ SCE_BAT_DEFAULT = 0
2413
+ SCE_BAT_COMMENT = 1
2414
+ SCE_BAT_WORD = 2
2415
+ SCE_BAT_LABEL = 3
2416
+ SCE_BAT_HIDE = 4
2417
+ SCE_BAT_COMMAND = 5
2418
+ SCE_BAT_IDENTIFIER = 6
2419
+ SCE_BAT_OPERATOR = 7
2420
+ # Lexical states for SCLEX_MAKEFILE
2421
+ SCE_MAKE_DEFAULT = 0
2422
+ SCE_MAKE_COMMENT = 1
2423
+ SCE_MAKE_PREPROCESSOR = 2
2424
+ SCE_MAKE_IDENTIFIER = 3
2425
+ SCE_MAKE_OPERATOR = 4
2426
+ SCE_MAKE_TARGET = 5
2427
+ SCE_MAKE_IDEOL = 9
2428
+ # Lexical states for SCLEX_DIFF
2429
+ SCE_DIFF_DEFAULT = 0
2430
+ SCE_DIFF_COMMENT = 1
2431
+ SCE_DIFF_COMMAND = 2
2432
+ SCE_DIFF_HEADER = 3
2433
+ SCE_DIFF_POSITION = 4
2434
+ SCE_DIFF_DELETED = 5
2435
+ SCE_DIFF_ADDED = 6
2436
+ # Lexical states for SCLEX_CONF (Apache Configuration Files Lexer)
2437
+ SCE_CONF_DEFAULT = 0
2438
+ SCE_CONF_COMMENT = 1
2439
+ SCE_CONF_NUMBER = 2
2440
+ SCE_CONF_IDENTIFIER = 3
2441
+ SCE_CONF_EXTENSION = 4
2442
+ SCE_CONF_PARAMETER = 5
2443
+ SCE_CONF_STRING = 6
2444
+ SCE_CONF_OPERATOR = 7
2445
+ SCE_CONF_IP = 8
2446
+ SCE_CONF_DIRECTIVE = 9
2447
+ # Lexical states for SCLEX_AVE, Avenue
2448
+ SCE_AVE_DEFAULT = 0
2449
+ SCE_AVE_COMMENT = 1
2450
+ SCE_AVE_NUMBER = 2
2451
+ SCE_AVE_WORD = 3
2452
+ SCE_AVE_STRING = 6
2453
+ SCE_AVE_ENUM = 7
2454
+ SCE_AVE_STRINGEOL = 8
2455
+ SCE_AVE_IDENTIFIER = 9
2456
+ SCE_AVE_OPERATOR = 10
2457
+ SCE_AVE_WORD1 = 11
2458
+ SCE_AVE_WORD2 = 12
2459
+ SCE_AVE_WORD3 = 13
2460
+ SCE_AVE_WORD4 = 14
2461
+ SCE_AVE_WORD5 = 15
2462
+ SCE_AVE_WORD6 = 16
2463
+ # Lexical states for SCLEX_ADA
2464
+ SCE_ADA_DEFAULT = 0
2465
+ SCE_ADA_WORD = 1
2466
+ SCE_ADA_IDENTIFIER = 2
2467
+ SCE_ADA_NUMBER = 3
2468
+ SCE_ADA_DELIMITER = 4
2469
+ SCE_ADA_CHARACTER = 5
2470
+ SCE_ADA_CHARACTEREOL = 6
2471
+ SCE_ADA_STRING = 7
2472
+ SCE_ADA_STRINGEOL = 8
2473
+ SCE_ADA_LABEL = 9
2474
+ SCE_ADA_COMMENTLINE = 10
2475
+ SCE_ADA_ILLEGAL = 11
2476
+ # Lexical states for SCLEX_BAAN
2477
+ SCE_BAAN_DEFAULT = 0
2478
+ SCE_BAAN_COMMENT = 1
2479
+ SCE_BAAN_COMMENTDOC = 2
2480
+ SCE_BAAN_NUMBER = 3
2481
+ SCE_BAAN_WORD = 4
2482
+ SCE_BAAN_STRING = 5
2483
+ SCE_BAAN_PREPROCESSOR = 6
2484
+ SCE_BAAN_OPERATOR = 7
2485
+ SCE_BAAN_IDENTIFIER = 8
2486
+ SCE_BAAN_STRINGEOL = 9
2487
+ SCE_BAAN_WORD2 = 10
2488
+ # Lexical states for SCLEX_LISP
2489
+ SCE_LISP_DEFAULT = 0
2490
+ SCE_LISP_COMMENT = 1
2491
+ SCE_LISP_NUMBER = 2
2492
+ SCE_LISP_KEYWORD = 3
2493
+ SCE_LISP_STRING = 6
2494
+ SCE_LISP_STRINGEOL = 8
2495
+ SCE_LISP_IDENTIFIER = 9
2496
+ SCE_LISP_OPERATOR = 10
2497
+ # Lexical states for SCLEX_EIFFEL and SCLEX_EIFFELKW
2498
+ SCE_EIFFEL_DEFAULT = 0
2499
+ SCE_EIFFEL_COMMENTLINE = 1
2500
+ SCE_EIFFEL_NUMBER = 2
2501
+ SCE_EIFFEL_WORD = 3
2502
+ SCE_EIFFEL_STRING = 4
2503
+ SCE_EIFFEL_CHARACTER = 5
2504
+ SCE_EIFFEL_OPERATOR = 6
2505
+ SCE_EIFFEL_IDENTIFIER = 7
2506
+ SCE_EIFFEL_STRINGEOL = 8
2507
+ # Lexical states for SCLEX_NNCRONTAB (nnCron crontab Lexer)
2508
+ SCE_NNCRONTAB_DEFAULT = 0
2509
+ SCE_NNCRONTAB_COMMENT = 1
2510
+ SCE_NNCRONTAB_TASK = 2
2511
+ SCE_NNCRONTAB_SECTION = 3
2512
+ SCE_NNCRONTAB_KEYWORD = 4
2513
+ SCE_NNCRONTAB_MODIFIER = 5
2514
+ SCE_NNCRONTAB_ASTERISK = 6
2515
+ SCE_NNCRONTAB_NUMBER = 7
2516
+ SCE_NNCRONTAB_STRING = 8
2517
+ SCE_NNCRONTAB_ENVIRONMENT = 9
2518
+ SCE_NNCRONTAB_IDENTIFIER = 10
2519
+ # Lexical states for SCLEX_MATLAB
2520
+ SCE_MATLAB_DEFAULT = 0
2521
+ SCE_MATLAB_COMMENT = 1
2522
+ SCE_MATLAB_COMMAND = 2
2523
+ SCE_MATLAB_NUMBER = 3
2524
+ SCE_MATLAB_KEYWORD = 4
2525
+ SCE_MATLAB_STRING = 5
2526
+ SCE_MATLAB_OPERATOR = 6
2527
+ SCE_MATLAB_IDENTIFIER = 7
2528
+ # Lexical states for SCLEX_SCRIPTOL
2529
+ SCE_SCRIPTOL_DEFAULT = 0
2530
+ SCE_SCRIPTOL_COMMENT = 1
2531
+ SCE_SCRIPTOL_COMMENTLINE = 2
2532
+ SCE_SCRIPTOL_COMMENTDOC = 3
2533
+ SCE_SCRIPTOL_NUMBER = 4
2534
+ SCE_SCRIPTOL_WORD = 5
2535
+ SCE_SCRIPTOL_STRING = 6
2536
+ SCE_SCRIPTOL_CHARACTER = 7
2537
+ SCE_SCRIPTOL_UUID = 8
2538
+ SCE_SCRIPTOL_PREPROCESSOR = 9
2539
+ SCE_SCRIPTOL_OPERATOR = 10
2540
+ SCE_SCRIPTOL_IDENTIFIER = 11
2541
+ SCE_SCRIPTOL_STRINGEOL = 12
2542
+ SCE_SCRIPTOL_VERBATIM = 13
2543
+ SCE_SCRIPTOL_REGEX = 14
2544
+ SCE_SCRIPTOL_COMMENTLINEDOC = 15
2545
+ SCE_SCRIPTOL_WORD2 = 16
2546
+ SCE_SCRIPTOL_COMMENTDOCKEYWORD = 17
2547
+ SCE_SCRIPTOL_COMMENTDOCKEYWORDERROR = 18
2548
+ SCE_SCRIPTOL_COMMENTBASIC = 19
2549
+ # Lexical states for SCLEX_ASM
2550
+ SCE_ASM_DEFAULT = 0
2551
+ SCE_ASM_COMMENT = 1
2552
+ SCE_ASM_NUMBER = 2
2553
+ SCE_ASM_STRING = 3
2554
+ SCE_ASM_OPERATOR = 4
2555
+ SCE_ASM_IDENTIFIER = 5
2556
+ SCE_ASM_CPUINSTRUCTION = 6
2557
+ SCE_ASM_MATHINSTRUCTION = 7
2558
+ SCE_ASM_REGISTER = 8
2559
+ SCE_ASM_DIRECTIVE = 9
2560
+ SCE_ASM_DIRECTIVEOPERAND = 10
2561
+ # Lexical states for SCLEX_FORTRAN
2562
+ SCE_F_DEFAULT = 0
2563
+ SCE_F_COMMENT = 1
2564
+ SCE_F_NUMBER = 2
2565
+ SCE_F_STRING1 = 3
2566
+ SCE_F_STRING2 = 4
2567
+ SCE_F_STRINGEOL = 5
2568
+ SCE_F_OPERATOR = 6
2569
+ SCE_F_IDENTIFIER = 7
2570
+ SCE_F_WORD = 8
2571
+ SCE_F_WORD2 = 9
2572
+ SCE_F_WORD3 = 10
2573
+ SCE_F_PREPROCESSOR = 11
2574
+ SCE_F_OPERATOR2 = 12
2575
+ SCE_F_LABEL = 13
2576
+ SCE_F_CONTINUATION = 14
2577
+ # Lexical states for SCLEX_CSS
2578
+ SCE_CSS_DEFAULT = 0
2579
+ SCE_CSS_TAG = 1
2580
+ SCE_CSS_CLASS = 2
2581
+ SCE_CSS_PSEUDOCLASS = 3
2582
+ SCE_CSS_UNKNOWN_PSEUDOCLASS = 4
2583
+ SCE_CSS_OPERATOR = 5
2584
+ SCE_CSS_IDENTIFIER = 6
2585
+ SCE_CSS_UNKNOWN_IDENTIFIER = 7
2586
+ SCE_CSS_VALUE = 8
2587
+ SCE_CSS_COMMENT = 9
2588
+ SCE_CSS_ID = 10
2589
+ SCE_CSS_IMPORTANT = 11
2590
+ SCE_CSS_DIRECTIVE = 12
2591
+
2592
+ # Events
2593
+
2594
+ SCN_STYLENEEDED = 2000
2595
+ SCN_CHARADDED = 2001
2596
+ SCN_SAVEPOINTREACHED = 2002
2597
+ SCN_SAVEPOINTLEFT = 2003
2598
+ SCN_MODIFYATTEMPTRO = 2004
2599
+ # GTK+ Specific to work around focus and accelerator problems:
2600
+ SCN_KEY = 2005
2601
+ SCN_DOUBLECLICK = 2006
2602
+ SCN_UPDATEUI = 2007
2603
+ SCN_MODIFIED = 2008
2604
+ SCN_MACRORECORD = 2009
2605
+ SCN_MARGINCLICK = 2010
2606
+ SCN_NEEDSHOWN = 2011
2607
+ SCN_PAINTED = 2013
2608
+ SCN_USERLISTSELECTION = 2014
2609
+ SCN_URIDROPPED = 2015
2610
+ SCN_DWELLSTART = 2016
2611
+ SCN_DWELLEND = 2017
2612
+ SCN_ZOOM = 2018
2613
+
2614
+ # Deprecated
2615
+
2616
+ # CARET_POLICY changed in 1.47
2617
+ def setCaretPolicy(caretPolicy, caretSlop)
2618
+ sendMessage(2369, caretPolicy, caretSlop)
2619
+ end
2620
+ CARET_CENTER = 0x02
2621
+ CARET_XEVEN = 0x08
2622
+ CARET_XJUMPS = 0x10
2623
+
2624
+ # The old name for SCN_UPDATEUI
2625
+ SCN_CHECKBRACE = 2007
2626
+ SCN_POSCHANGED = 2012
2627
+
2628
+ end
2629
+ end