PageRenderTime 60ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 1ms

/ScintillaNET/Scintilla.INativeScintilla.cs

https://bitbucket.org/nekokun/nekokun
C# | 3611 lines | 2293 code | 1078 blank | 240 comment | 115 complexity | 91ca24d9c4b2d03877d8de6e21307ce1 MD5 | raw file
Possible License(s): MIT, CC-BY-SA-3.0

Large files files are truncated, but you can click here to view the full file

  1. #region Using Directives
  2. using System;
  3. using System.Drawing;
  4. using System.Text;
  5. using System.Windows.Forms;
  6. #endregion Using Directives
  7. namespace ScintillaNET
  8. {
  9. public partial class Scintilla
  10. {
  11. #region Fields
  12. private static readonly object _autoCSelectionEventKey = new object();
  13. private static readonly object _callTipClickEventKeyNative = new object();
  14. private static readonly object _charAddedEventKeyNative = new object();
  15. private static readonly object _doubleClickEventKey = new object();
  16. private static readonly object _dwellEndEventKeyNative = new object();
  17. private static readonly object _dwellStartEventKeyNative = new object();
  18. private static readonly object _hotspotClickEventKey = new object();
  19. private static readonly object _hotspotDoubleClickEventKey = new object();
  20. private static readonly object _indicatorClickKeyNative = new object();
  21. private static readonly object _indicatorReleaseKeyNative = new object();
  22. private static readonly object _keyEventKey = new object();
  23. private static readonly object _macroRecordEventKeyNative = new object();
  24. private static readonly object _marginClickEventKeyNative = new object();
  25. private static readonly object _modifiedEventKey = new object();
  26. private static readonly object _modifyAttemptROEventKey = new object();
  27. private static readonly object _needShownEventKey = new object();
  28. private static readonly object _paintedEventKey = new object();
  29. private static readonly object _savePointLeftEventKeyNative = new object();
  30. private static readonly object _savePointReachedEventKeyNative = new object();
  31. private static readonly object _styleNeededEventKeyNative = new object();
  32. private static readonly object _updateUIEventKey = new object();
  33. private static readonly object _uriDroppedEventKeyNative = new object();
  34. private static readonly object _userListSelectionEventKeyNative = new object();
  35. private static readonly object _zoomEventKey = new object();
  36. private LastSelection lastSelection = new LastSelection();
  37. private const uint TEXT_MODIFIED_FLAGS = Constants.SC_MOD_BEFOREDELETE | Constants.SC_MOD_BEFOREINSERT |
  38. Constants.SC_MOD_DELETETEXT | Constants.SC_MOD_INSERTTEXT;
  39. #endregion Fields
  40. #region Methods
  41. internal void FireAutoCSelection(NativeScintillaEventArgs ea)
  42. {
  43. if (Events[_autoCSelectionEventKey] != null)
  44. ((EventHandler<NativeScintillaEventArgs>)Events[_autoCSelectionEventKey])(this, ea);
  45. OnAutoCompleteAccepted(new AutoCompleteAcceptedEventArgs(ea.SCNotification, _encoding));
  46. }
  47. internal void FireCallTipClick(NativeScintillaEventArgs ea)
  48. {
  49. if(Events[_callTipClickEventKeyNative] != null)
  50. ((EventHandler<NativeScintillaEventArgs>)Events[_callTipClickEventKeyNative])(this, ea);
  51. FireCallTipClick(ea.SCNotification.position);
  52. }
  53. internal void FireCharAdded(NativeScintillaEventArgs ea)
  54. {
  55. if(Events[_charAddedEventKeyNative] != null)
  56. ((EventHandler<NativeScintillaEventArgs>)Events[_charAddedEventKeyNative])(this, ea);
  57. OnCharAdded(new CharAddedEventArgs(ea.SCNotification.ch));
  58. }
  59. internal void FireDoubleClick(NativeScintillaEventArgs ea)
  60. {
  61. if(Events[_doubleClickEventKey] != null)
  62. ((EventHandler<NativeScintillaEventArgs>)Events[_doubleClickEventKey])(this, ea);
  63. }
  64. internal void FireDwellEnd(NativeScintillaEventArgs ea)
  65. {
  66. if(Events[_dwellEndEventKeyNative] != null)
  67. ((EventHandler<NativeScintillaEventArgs>)Events[_dwellEndEventKeyNative])(this, ea);
  68. OnDwellEnd(new ScintillaMouseEventArgs(ea.SCNotification.x, ea.SCNotification.y, ea.SCNotification.position));
  69. }
  70. internal void FireDwellStart(NativeScintillaEventArgs ea)
  71. {
  72. if(Events[_dwellStartEventKeyNative] != null)
  73. ((EventHandler<NativeScintillaEventArgs>)Events[_dwellStartEventKeyNative])(this, ea);
  74. OnDwellStart(new ScintillaMouseEventArgs(ea.SCNotification.x, ea.SCNotification.y, ea.SCNotification.position));
  75. }
  76. internal void FireIndicatorClick(NativeScintillaEventArgs ea)
  77. {
  78. if (Events[_indicatorClickKeyNative] != null)
  79. ((EventHandler<NativeScintillaEventArgs>)Events[_indicatorClickKeyNative])(this, ea);
  80. OnIndicatorClick(new ScintillaMouseEventArgs(ea.SCNotification.x, ea.SCNotification.y, ea.SCNotification.position));
  81. }
  82. internal void FireIndicatorRelease(NativeScintillaEventArgs ea)
  83. {
  84. if (Events[_indicatorReleaseKeyNative] != null)
  85. ((EventHandler<NativeScintillaEventArgs>)Events[_indicatorReleaseKeyNative])(this, ea);
  86. }
  87. internal void FireKey(NativeScintillaEventArgs ea)
  88. {
  89. if(Events[_keyEventKey] != null)
  90. ((EventHandler<NativeScintillaEventArgs>)Events[_keyEventKey])(this, ea);
  91. }
  92. internal void FireMacroRecord(NativeScintillaEventArgs ea)
  93. {
  94. if(Events[_macroRecordEventKeyNative] != null)
  95. ((EventHandler<NativeScintillaEventArgs>)Events[_macroRecordEventKeyNative])(this, ea);
  96. OnMacroRecord(new MacroRecordEventArgs(ea));
  97. }
  98. internal void FireMarginClick(NativeScintillaEventArgs ea)
  99. {
  100. if(Events[_marginClickEventKeyNative] != null)
  101. ((EventHandler<NativeScintillaEventArgs>)Events[_marginClickEventKeyNative])(this, ea);
  102. FireMarginClick(ea.SCNotification);
  103. }
  104. private void FireModified(NativeScintillaEventArgs ea)
  105. {
  106. // First we fire the INativeScintilla Modified event.
  107. if(Events[_modifiedEventKey] != null)
  108. ((EventHandler<NativeScintillaEventArgs>)Events[_modifiedEventKey])(this, ea);
  109. // Now we use raw information from the Modified event to construct
  110. // some more user friendly Events to fire.
  111. SCNotification scn = ea.SCNotification;
  112. int modType = scn.modificationType;
  113. if((modType & TEXT_MODIFIED_FLAGS) > 0)
  114. {
  115. TextModifiedEventArgs mea = new TextModifiedEventArgs
  116. (
  117. modType,
  118. (modType & Constants.SC_PERFORMED_USER) != 0,
  119. scn.line,
  120. scn.position,
  121. scn.length,
  122. scn.linesAdded,
  123. Utilities.IntPtrToString(_encoding, scn.text, scn.length)
  124. );
  125. // These messages all get fired seperately hence the if else ifs
  126. if ((modType & Constants.SC_MOD_BEFOREDELETE) > 0)
  127. {
  128. OnBeforeTextDelete(mea);
  129. }
  130. else if ((modType & Constants.SC_MOD_BEFOREINSERT) > 0)
  131. {
  132. OnBeforeTextInsert(mea);
  133. }
  134. else if ((modType & Constants.SC_MOD_DELETETEXT) > 0)
  135. {
  136. OnTextDeleted(mea);
  137. }
  138. else if ((modType & Constants.SC_MOD_INSERTTEXT) > 0)
  139. {
  140. OnTextInserted(mea);
  141. }
  142. }
  143. else if((modType & Constants.SC_MOD_CHANGEFOLD) > 0)
  144. {
  145. FoldChangedEventArgs fea = new FoldChangedEventArgs(scn.line, scn.foldLevelNow, scn.foldLevelPrev, scn.modificationType);
  146. OnFoldChanged(fea);
  147. }
  148. else if((modType & Constants.SC_MOD_CHANGESTYLE) > 0)
  149. {
  150. StyleChangedEventArgs sea = new StyleChangedEventArgs(scn.position, scn.length, scn.modificationType);
  151. OnStyleChanged(sea);
  152. }
  153. else if((modType & Constants.SC_MOD_CHANGEMARKER) > 0)
  154. {
  155. MarkerChangedEventArgs mea = new MarkerChangedEventArgs(scn.line, scn.modificationType);
  156. OnMarkerChanged(mea);
  157. }
  158. OnDocumentChange(ea);
  159. }
  160. internal void FireModifyAttemptRO(NativeScintillaEventArgs ea)
  161. {
  162. if(Events[_modifyAttemptROEventKey] != null)
  163. ((EventHandler<NativeScintillaEventArgs>)Events[_modifyAttemptROEventKey])(this, ea);
  164. OnReadOnlyModifyAttempt(EventArgs.Empty);
  165. }
  166. internal void FireNeedShown(NativeScintillaEventArgs ea)
  167. {
  168. if(Events[_needShownEventKey] != null)
  169. ((EventHandler<NativeScintillaEventArgs>)Events[_needShownEventKey])(this, ea);
  170. // Again, this shoold look familiar...
  171. int pos = ea.SCNotification.position;
  172. int firstLine = _ns.LineFromPosition(pos);
  173. int lastLine = _ns.LineFromPosition(pos + ea.SCNotification.length - 1);
  174. OnLinesNeedShown(new LinesNeedShownEventArgs(firstLine, lastLine));
  175. }
  176. internal void FirePainted(NativeScintillaEventArgs ea)
  177. {
  178. if(Events[_paintedEventKey] != null)
  179. ((EventHandler<NativeScintillaEventArgs>)Events[_paintedEventKey])(this, ea);
  180. }
  181. internal void FireSavePointLeft(NativeScintillaEventArgs ea)
  182. {
  183. if(Events[_savePointLeftEventKeyNative] != null)
  184. ((EventHandler<NativeScintillaEventArgs>)Events[_savePointLeftEventKeyNative])(this, ea);
  185. // Update the local property (and if necessary raise the changed event)
  186. Modified = true;
  187. }
  188. internal void FireSavePointReached(NativeScintillaEventArgs ea)
  189. {
  190. if(Events[_savePointReachedEventKeyNative] != null)
  191. ((EventHandler<NativeScintillaEventArgs>)Events[_savePointReachedEventKeyNative])(this, ea);
  192. // Update the local property (and if necessary raise the changed event)
  193. Modified = false;
  194. }
  195. internal void FireStyleNeeded(NativeScintillaEventArgs ea)
  196. {
  197. if(Events[_styleNeededEventKeyNative] != null)
  198. ((EventHandler<NativeScintillaEventArgs>)Events[_styleNeededEventKeyNative])(this, ea);
  199. // TODO: When this event fires it fires A LOT over and over again if
  200. // you don't actually style the document. Additionally I'm making 2
  201. // more calls to Scintilla to get the Start position of the style
  202. // range. I need to come up with a good way to supress this logic
  203. // unless the client app is actually interested in it.
  204. // Now that we've fired the Native event we do the same for the
  205. // SourceEdit's StyleNeeded event. This code should look VERY familliar
  206. // to anyone who's read the Scintilla Documentation
  207. int startPos = _ns.GetEndStyled();
  208. int lineNumber = _ns.LineFromPosition(startPos);
  209. startPos = _ns.PositionFromLine(lineNumber);
  210. StyleNeededEventArgs snea = new StyleNeededEventArgs(new Range(startPos, ea.SCNotification.position, this));
  211. OnStyleNeeded(snea);
  212. }
  213. internal void FireUpdateUI(NativeScintillaEventArgs ea)
  214. {
  215. if (Events[_updateUIEventKey] != null)
  216. ((EventHandler<NativeScintillaEventArgs>)Events[_updateUIEventKey])(this, ea);
  217. // The SCN_UPDATEUI Notification message is sent whenever text, style or
  218. // selection range changes. This means that the SelectionChangeEvent could
  219. // potentially fire without the selection actually having changed. However
  220. // I feel that it's important enough that SelectionChanged gets its own
  221. // event.
  222. if (lastSelection.Start != this.Selection.Start
  223. || lastSelection.End != this.Selection.End
  224. || lastSelection.Length != this.Selection.Length)
  225. {
  226. OnSelectionChanged(EventArgs.Empty);
  227. }
  228. //I think the selection changed event should only be fired if the selection differs
  229. //from the selection values in the previous call to this function
  230. //so here we take note of what the selection was last time
  231. lastSelection.Start = this.Selection.Start;
  232. lastSelection.End = this.Selection.End;
  233. lastSelection.Length = this.Selection.Length;
  234. }
  235. internal void FireUriDropped(NativeScintillaEventArgs ea)
  236. {
  237. if(Events[_uriDroppedEventKeyNative] != null)
  238. ((EventHandler<NativeScintillaEventArgs>)Events[_uriDroppedEventKeyNative])(this, ea);
  239. }
  240. internal void FireUserListSelection(NativeScintillaEventArgs ea)
  241. {
  242. if(Events[_userListSelectionEventKeyNative] != null)
  243. ((EventHandler<NativeScintillaEventArgs>)Events[_userListSelectionEventKeyNative])(this, ea);
  244. }
  245. internal void FireZoom(NativeScintillaEventArgs ea)
  246. {
  247. if(Events[_zoomEventKey] != null)
  248. ((EventHandler<NativeScintillaEventArgs>)Events[_zoomEventKey])(this, ea);
  249. OnZoomChanged(EventArgs.Empty);
  250. }
  251. void INativeScintilla.AddRefDocument(IntPtr pDoc)
  252. {
  253. _ns.SendMessageDirect(Constants.SCI_ADDREFDOCUMENT, IntPtr.Zero, pDoc);
  254. }
  255. unsafe void INativeScintilla.AddStyledText(int length, byte[] s)
  256. {
  257. fixed (byte* bp = s)
  258. _ns.SendMessageDirect(Constants.SCI_ADDSTYLEDTEXT, (IntPtr)length, (IntPtr)bp);
  259. }
  260. void INativeScintilla.AddText(int length, string s)
  261. {
  262. _ns.SendMessageDirect(Constants.SCI_ADDTEXT, length, s);
  263. }
  264. void INativeScintilla.Allocate(int bytes)
  265. {
  266. _ns.SendMessageDirect(Constants.SCI_ALLOCATE, bytes, 0);
  267. }
  268. void INativeScintilla.AppendText(int length, string s)
  269. {
  270. _ns.SendMessageDirect(Constants.SCI_APPENDTEXT, length, s);
  271. }
  272. void INativeScintilla.AssignCmdKey(int keyDefinition, int sciCommand)
  273. {
  274. _ns.SendMessageDirect(Constants.SCI_ASSIGNCMDKEY, keyDefinition, sciCommand);
  275. }
  276. bool INativeScintilla.AutoCActive()
  277. {
  278. return _ns.SendMessageDirect(Constants.SCI_AUTOCACTIVE, 0, 0) != 0;
  279. }
  280. void INativeScintilla.AutoCCancel()
  281. {
  282. _ns.SendMessageDirect(Constants.SCI_AUTOCCANCEL, 0, 0);
  283. }
  284. void INativeScintilla.AutoCComplete()
  285. {
  286. _ns.SendMessageDirect(Constants.SCI_AUTOCCOMPLETE, 0, 0);
  287. }
  288. bool INativeScintilla.AutoCGetAutoHide()
  289. {
  290. return _ns.SendMessageDirect(Constants.SCI_AUTOCGETAUTOHIDE, 0, 0) != 0;
  291. }
  292. bool INativeScintilla.AutoCGetCancelAtStart()
  293. {
  294. return _ns.SendMessageDirect(Constants.SCI_AUTOCGETCANCELATSTART, 0, 0) != 0;
  295. }
  296. bool INativeScintilla.AutoCGetChooseSingle()
  297. {
  298. return _ns.SendMessageDirect(Constants.SCI_AUTOCGETCHOOSESINGLE, 0, 0) != 0;
  299. }
  300. int INativeScintilla.AutoCGetCurrent()
  301. {
  302. return _ns.SendMessageDirect(Constants.SCI_AUTOCGETCURRENT, 0, 0);
  303. }
  304. bool INativeScintilla.AutoCGetDropRestOfWord()
  305. {
  306. return _ns.SendMessageDirect(Constants.SCI_AUTOCGETDROPRESTOFWORD, 0, 0) != 0;
  307. }
  308. bool INativeScintilla.AutoCGetIgnoreCase()
  309. {
  310. return _ns.SendMessageDirect(Constants.SCI_AUTOCGETIGNORECASE, 0, 0) != 0;
  311. }
  312. int INativeScintilla.AutoCGetMaxHeight()
  313. {
  314. return _ns.SendMessageDirect(Constants.SCI_AUTOCGETMAXHEIGHT, 0, 0);
  315. }
  316. int INativeScintilla.AutoCGetMaxWidth()
  317. {
  318. return _ns.SendMessageDirect(Constants.SCI_AUTOCGETMAXWIDTH, 0, 0);
  319. }
  320. char INativeScintilla.AutoCGetSeparator()
  321. {
  322. return (char)_ns.SendMessageDirect(Constants.SCI_AUTOCGETSEPARATOR, 0, 0);
  323. }
  324. char INativeScintilla.AutoCGetTypeSeparator()
  325. {
  326. return (char)_ns.SendMessageDirect(Constants.SCI_AUTOCGETTYPESEPARATOR, 0, 0);
  327. }
  328. int INativeScintilla.AutoCPosStart()
  329. {
  330. return _ns.SendMessageDirect(Constants.SCI_AUTOCPOSSTART, 0, 0);
  331. }
  332. void INativeScintilla.AutoCSelect(string select)
  333. {
  334. _ns.SendMessageDirect(Constants.SCI_AUTOCSELECT, VOID.NULL, select);
  335. }
  336. void INativeScintilla.AutoCSetAutoHide(bool autoHide)
  337. {
  338. _ns.SendMessageDirect(Constants.SCI_AUTOCSETAUTOHIDE, autoHide, 0);
  339. }
  340. void INativeScintilla.AutoCSetCancelAtStart(bool cancel)
  341. {
  342. _ns.SendMessageDirect(Constants.SCI_AUTOCSETCANCELATSTART, cancel, 0);
  343. }
  344. void INativeScintilla.AutoCSetChooseSingle(bool chooseSingle)
  345. {
  346. _ns.SendMessageDirect(Constants.SCI_AUTOCSETCHOOSESINGLE, chooseSingle, 0);
  347. }
  348. void INativeScintilla.AutoCSetDropRestOfWord(bool dropRestOfWord)
  349. {
  350. _ns.SendMessageDirect(Constants.SCI_AUTOCSETDROPRESTOFWORD, dropRestOfWord, 0);
  351. }
  352. void INativeScintilla.AutoCSetFillUps(string chars)
  353. {
  354. _ns.SendMessageDirect(Constants.SCI_AUTOCSETFILLUPS, VOID.NULL, chars);
  355. }
  356. void INativeScintilla.AutoCSetIgnoreCase(bool ignoreCase)
  357. {
  358. _ns.SendMessageDirect(Constants.SCI_AUTOCSETIGNORECASE, ignoreCase, 0);
  359. }
  360. void INativeScintilla.AutoCSetMaxHeight(int rowCount)
  361. {
  362. _ns.SendMessageDirect(Constants.SCI_AUTOCSETMAXHEIGHT, rowCount, 0);
  363. }
  364. void INativeScintilla.AutoCSetMaxWidth(int characterCount)
  365. {
  366. _ns.SendMessageDirect(Constants.SCI_AUTOCSETMAXWIDTH, characterCount, 0);
  367. }
  368. void INativeScintilla.AutoCSetSeparator(char separator)
  369. {
  370. _ns.SendMessageDirect(Constants.SCI_AUTOCSETSEPARATOR, separator, 0);
  371. }
  372. void INativeScintilla.AutoCSetTypeSeparator(char separatorCharacter)
  373. {
  374. _ns.SendMessageDirect(Constants.SCI_AUTOCSETTYPESEPARATOR, (int)separatorCharacter, 0);
  375. }
  376. void INativeScintilla.AutoCShow(int lenEntered, string list)
  377. {
  378. _ns.SendMessageDirect(Constants.SCI_AUTOCSHOW, lenEntered, list);
  379. }
  380. void INativeScintilla.AutoCStops(string chars)
  381. {
  382. _ns.SendMessageDirect(Constants.SCI_AUTOCSTOPS, VOID.NULL, chars);
  383. }
  384. void INativeScintilla.BackTab()
  385. {
  386. _ns.SendMessageDirect(Constants.SCI_BACKTAB, 0, 0);
  387. }
  388. void INativeScintilla.BeginUndoAction()
  389. {
  390. _ns.SendMessageDirect(Constants.SCI_BEGINUNDOACTION, 0, 0);
  391. }
  392. void INativeScintilla.BraceBadLight(int pos1)
  393. {
  394. _ns.SendMessageDirect(Constants.SCI_BRACEBADLIGHT, pos1, 0);
  395. }
  396. void INativeScintilla.BraceHighlight(int pos1, int pos2)
  397. {
  398. _ns.SendMessageDirect(Constants.SCI_BRACEHIGHLIGHT, pos1, pos2);
  399. }
  400. int INativeScintilla.BraceMatch(int pos, int maxReStyle)
  401. {
  402. return _ns.SendMessageDirect(Constants.SCI_BRACEMATCH, pos, maxReStyle);
  403. }
  404. bool INativeScintilla.CallTipActive()
  405. {
  406. return _ns.SendMessageDirect(Constants.SCI_CALLTIPACTIVE, 0, 0) != 0;
  407. }
  408. void INativeScintilla.CallTipCancel()
  409. {
  410. _ns.SendMessageDirect(Constants.SCI_CALLTIPCANCEL, 0, 0);
  411. }
  412. int INativeScintilla.CallTipGetPosStart()
  413. {
  414. return _ns.SendMessageDirect(Constants.SCI_CALLTIPPOSSTART, 0, 0);
  415. }
  416. void INativeScintilla.CallTipSetBack(int colour)
  417. {
  418. _ns.SendMessageDirect(Constants.SCI_CALLTIPSETBACK, colour, 0);
  419. }
  420. void INativeScintilla.CallTipSetFore(int colour)
  421. {
  422. _ns.SendMessageDirect(Constants.SCI_CALLTIPSETFORE, colour, 0);
  423. }
  424. void INativeScintilla.CallTipSetForeHlt(int colour)
  425. {
  426. _ns.SendMessageDirect(Constants.SCI_CALLTIPSETFOREHLT, colour, 0);
  427. }
  428. void INativeScintilla.CallTipSetHlt(int hlStart, int hlEnd)
  429. {
  430. _ns.SendMessageDirect(Constants.SCI_CALLTIPSETHLT, hlStart, hlEnd);
  431. }
  432. void INativeScintilla.CallTipShow(int posStart, string definition)
  433. {
  434. _ns.SendMessageDirect(Constants.SCI_CALLTIPSHOW, posStart, definition);
  435. }
  436. void INativeScintilla.CallTipUseStyle(int tabsize)
  437. {
  438. _ns.SendMessageDirect(Constants.SCI_CALLTIPUSESTYLE, tabsize, 0);
  439. }
  440. void INativeScintilla.Cancel()
  441. {
  442. _ns.SendMessageDirect(Constants.SCI_CANCEL, 0, 0);
  443. }
  444. bool INativeScintilla.CanRedo()
  445. {
  446. return _ns.SendMessageDirect(Constants.SCI_CANREDO, 0, 0) != 0;
  447. }
  448. bool INativeScintilla.CanUndo()
  449. {
  450. return _ns.SendMessageDirect(Constants.SCI_CANUNDO, 0, 0) != 0;
  451. }
  452. void INativeScintilla.CharLeft()
  453. {
  454. _ns.SendMessageDirect(Constants.SCI_CHARLEFT, 0, 0);
  455. }
  456. void INativeScintilla.CharLeftExtend()
  457. {
  458. _ns.SendMessageDirect(Constants.SCI_CHARLEFTEXTEND, 0, 0);
  459. }
  460. void INativeScintilla.CharLeftRectExtend()
  461. {
  462. _ns.SendMessageDirect(Constants.SCI_CHARLEFTRECTEXTEND, 0, 0);
  463. }
  464. void INativeScintilla.CharRight()
  465. {
  466. _ns.SendMessageDirect(Constants.SCI_CHARRIGHT, 0, 0);
  467. }
  468. void INativeScintilla.CharRightExtend()
  469. {
  470. _ns.SendMessageDirect(Constants.SCI_CHARRIGHTEXTEND, 0, 0);
  471. }
  472. void INativeScintilla.CharRightRectExtend()
  473. {
  474. _ns.SendMessageDirect(Constants.SCI_CHARRIGHTRECTEXTEND, 0, 0);
  475. }
  476. void INativeScintilla.ChooseCaretX()
  477. {
  478. _ns.SendMessageDirect(Constants.SCI_CHOOSECARETX, 0, 0);
  479. }
  480. void INativeScintilla.Clear()
  481. {
  482. _ns.SendMessageDirect(Constants.SCI_CLEAR, 0, 0);
  483. }
  484. void INativeScintilla.ClearAll()
  485. {
  486. _ns.SendMessageDirect(Constants.SCI_CLEARALL, 0, 0);
  487. }
  488. void INativeScintilla.ClearAllCmdKeys()
  489. {
  490. _ns.SendMessageDirect(Constants.SCI_CLEARALLCMDKEYS, 0, 0);
  491. }
  492. void INativeScintilla.ClearCmdKey(int keyDefinition)
  493. {
  494. _ns.SendMessageDirect(Constants.SCI_CLEARCMDKEY, keyDefinition, 0);
  495. }
  496. void INativeScintilla.ClearDocumentStyle()
  497. {
  498. _ns.SendMessageDirect(Constants.SCI_CLEARDOCUMENTSTYLE, 0, 0);
  499. }
  500. void INativeScintilla.ClearRegisteredImages()
  501. {
  502. _ns.SendMessageDirect(Constants.SCI_CLEARREGISTEREDIMAGES, 0, 0);
  503. }
  504. void INativeScintilla.Colourise(int start, int end)
  505. {
  506. _ns.SendMessageDirect(Constants.SCI_COLOURISE, start, end);
  507. }
  508. void INativeScintilla.ConvertEols(int eolMode)
  509. {
  510. _ns.SendMessageDirect(Constants.SCI_CONVERTEOLS, eolMode, 0);
  511. }
  512. IntPtr INativeScintilla.CreateDocument()
  513. {
  514. return (IntPtr)_ns.SendMessageDirect(Constants.SCI_CREATEDOCUMENT, 0, 0);
  515. }
  516. void INativeScintilla.DeleteBack()
  517. {
  518. _ns.SendMessageDirect(Constants.SCI_DELETEBACK, 0, 0);
  519. }
  520. void INativeScintilla.DeleteBackNotLine()
  521. {
  522. _ns.SendMessageDirect(Constants.SCI_DELETEBACKNOTLINE, 0, 0);
  523. }
  524. void INativeScintilla.DelLineLeft()
  525. {
  526. _ns.SendMessageDirect(Constants.SCI_DELLINELEFT, 0, 0);
  527. }
  528. void INativeScintilla.DelLineRight()
  529. {
  530. _ns.SendMessageDirect(Constants.SCI_DELLINERIGHT, 0, 0);
  531. }
  532. void INativeScintilla.DelWordLeft()
  533. {
  534. _ns.SendMessageDirect(Constants.SCI_DELWORDLEFT, 0, 0);
  535. }
  536. void INativeScintilla.DelWordRight()
  537. {
  538. _ns.SendMessageDirect(Constants.SCI_DELWORDRIGHT, 0, 0);
  539. }
  540. int INativeScintilla.DocLineFromVisible(int displayLine)
  541. {
  542. return _ns.SendMessageDirect(Constants.SCI_DOCLINEFROMVISIBLE, displayLine, 0);
  543. }
  544. void INativeScintilla.DocumentEnd()
  545. {
  546. _ns.SendMessageDirect(Constants.SCI_DOCUMENTEND, 0, 0);
  547. }
  548. void INativeScintilla.DocumentEndExtend()
  549. {
  550. _ns.SendMessageDirect(2319, 0, 0);
  551. }
  552. void INativeScintilla.DocumentStart()
  553. {
  554. _ns.SendMessageDirect(Constants.SCI_DOCUMENTSTART, 0, 0);
  555. }
  556. void INativeScintilla.DocumentStartExtend()
  557. {
  558. _ns.SendMessageDirect(Constants.SCI_DOCUMENTSTARTEXTEND, 0, 0);
  559. }
  560. void INativeScintilla.EditToggleOvertype()
  561. {
  562. _ns.SendMessageDirect(Constants.SCI_EDITTOGGLEOVERTYPE, 0, 0);
  563. }
  564. void INativeScintilla.EmptyUndoBuffer()
  565. {
  566. _ns.SendMessageDirect(Constants.SCI_EMPTYUNDOBUFFER, 0, 0);
  567. }
  568. int INativeScintilla.EncodeFromUtf8(string utf8, out string encoded)
  569. {
  570. throw new NotSupportedException();
  571. }
  572. void INativeScintilla.EndUndoAction()
  573. {
  574. _ns.SendMessageDirect(Constants.SCI_ENDUNDOACTION, 0, 0);
  575. }
  576. void INativeScintilla.EnsureVisible(int line)
  577. {
  578. _ns.SendMessageDirect(Constants.SCI_ENSUREVISIBLE, line, 0);
  579. }
  580. void INativeScintilla.EnsureVisibleEnforcePolicy(int line)
  581. {
  582. _ns.SendMessageDirect(Constants.SCI_ENSUREVISIBLEENFORCEPOLICY, line, 0);
  583. }
  584. int INativeScintilla.FindColumn(int line, int column)
  585. {
  586. return _ns.SendMessageDirect(Constants.SCI_FINDCOLUMN, line, column);
  587. }
  588. unsafe int INativeScintilla.FindText(int searchFlags, ref TextToFind ttf)
  589. {
  590. // {wi17869} 2008-08-15 Chris Rickard
  591. // searchFlags weren't getting sent to SendMessageDirect. IntPtr.Zero was.
  592. // This has been fixed
  593. fixed (TextToFind* ttfp = &ttf)
  594. return (int)_ns.SendMessageDirect(Constants.SCI_FINDTEXT, (IntPtr)searchFlags, (IntPtr)ttfp);
  595. }
  596. unsafe int INativeScintilla.FormatRange(bool bDraw, ref RangeToFormat pfr)
  597. {
  598. fixed (RangeToFormat* rtfp = &pfr)
  599. return (int)_ns.SendMessageDirect(Constants.SCI_FORMATRANGE, (IntPtr)(bDraw ? 1 : 0), (IntPtr)rtfp);
  600. }
  601. void INativeScintilla.FormFeed()
  602. {
  603. _ns.SendMessageDirect(Constants.SCI_FORMFEED, 0, 0);
  604. }
  605. int INativeScintilla.GetAnchor()
  606. {
  607. return _ns.SendMessageDirect(Constants.SCI_GETANCHOR, 0, 0);
  608. }
  609. bool INativeScintilla.GetBackSpaceUnIndents()
  610. {
  611. return _ns.SendMessageDirect(Constants.SCI_GETBACKSPACEUNINDENTS, 0, 0) != 0;
  612. }
  613. bool INativeScintilla.GetBufferedDraw()
  614. {
  615. return _ns.SendMessageDirect(Constants.SCI_GETBUFFEREDDRAW, 0, 0) != 0;
  616. }
  617. int INativeScintilla.GetCaretFore()
  618. {
  619. return _ns.SendMessageDirect(Constants.SCI_GETCARETFORE, 0, 0);
  620. }
  621. int INativeScintilla.GetCaretLineBack()
  622. {
  623. return _ns.SendMessageDirect(Constants.SCI_GETCARETLINEBACK, 0, 0);
  624. }
  625. int INativeScintilla.GetCaretLineBackAlpha()
  626. {
  627. return _ns.SendMessageDirect(Constants.SCI_GETCARETLINEBACKALPHA, 0, 0);
  628. }
  629. bool INativeScintilla.GetCaretLineVisible()
  630. {
  631. return _ns.SendMessageDirect(Constants.SCI_GETCARETLINEVISIBLE, 0, 0) != 0;
  632. }
  633. int INativeScintilla.GetCaretPeriod()
  634. {
  635. return _ns.SendMessageDirect(Constants.SCI_GETCARETPERIOD, 0, 0);
  636. }
  637. bool INativeScintilla.GetCaretSticky()
  638. {
  639. return _ns.SendMessageDirect(Constants.SCI_GETCARETSTICKY, 0, 0) != 0;
  640. }
  641. int INativeScintilla.GetCaretStyle()
  642. {
  643. return _ns.SendMessageDirect(Constants.SCI_GETCARETSTYLE, 0, 0);
  644. }
  645. int INativeScintilla.GetCaretWidth()
  646. {
  647. return _ns.SendMessageDirect(Constants.SCI_GETCARETWIDTH, 0, 0);
  648. }
  649. char INativeScintilla.GetCharAt(int position)
  650. {
  651. return (char)_ns.SendMessageDirect(Constants.SCI_GETCHARAT, position, 0);
  652. }
  653. int INativeScintilla.GetCodePage()
  654. {
  655. return _ns.SendMessageDirect(Constants.SCI_GETCODEPAGE, 0, 0);
  656. }
  657. int INativeScintilla.GetColumn(int position)
  658. {
  659. return _ns.SendMessageDirect(Constants.SCI_GETCOLUMN, position, 0);
  660. }
  661. int INativeScintilla.GetControlCharSymbol()
  662. {
  663. return _ns.SendMessageDirect(Constants.SCI_GETCONTROLCHARSYMBOL, 0, 0);
  664. }
  665. int INativeScintilla.GetCurrentPos()
  666. {
  667. return _ns.SendMessageDirect(Constants.SCI_GETCURRENTPOS, 0, 0);
  668. }
  669. int INativeScintilla.GetCursor()
  670. {
  671. return _ns.SendMessageDirect(Constants.SCI_GETCURSOR, 0, 0);
  672. }
  673. IntPtr INativeScintilla.GetDocPointer()
  674. {
  675. return _ns.SendMessageDirect(Constants.SCI_GETDOCPOINTER, IntPtr.Zero, IntPtr.Zero);
  676. }
  677. int INativeScintilla.GetEdgeColour()
  678. {
  679. return _ns.SendMessageDirect(Constants.SCI_GETEDGECOLOUR, 0, 0);
  680. }
  681. int INativeScintilla.GetEdgeColumn()
  682. {
  683. return _ns.SendMessageDirect(Constants.SCI_GETEDGECOLUMN, 0, 0);
  684. }
  685. int INativeScintilla.GetEdgeMode()
  686. {
  687. return _ns.SendMessageDirect(Constants.SCI_GETEDGEMODE, 0, 0);
  688. }
  689. bool INativeScintilla.GetEndAtLastLine()
  690. {
  691. return _ns.SendMessageDirect(Constants.SCI_GETENDATLASTLINE, 0, 0) != 0;
  692. }
  693. int INativeScintilla.GetEndStyled()
  694. {
  695. return _ns.SendMessageDirect(Constants.SCI_GETENDSTYLED, 0, 0);
  696. }
  697. int INativeScintilla.GetEolMode()
  698. {
  699. return _ns.SendMessageDirect(Constants.SCI_GETEOLMODE, 0, 0);
  700. }
  701. int INativeScintilla.GetFirstVisibleLine()
  702. {
  703. return _ns.SendMessageDirect(Constants.SCI_GETFIRSTVISIBLELINE, 0, 0);
  704. }
  705. bool INativeScintilla.GetFocus()
  706. {
  707. return _ns.SendMessageDirect(Constants.SCI_GETFOCUS, 0, 0) != 0;
  708. }
  709. bool INativeScintilla.GetFoldExpanded(int line)
  710. {
  711. return _ns.SendMessageDirect(Constants.SCI_GETFOLDEXPANDED, line, 0) != 0;
  712. }
  713. uint INativeScintilla.GetFoldLevel(int line)
  714. {
  715. return (uint)_ns.SendMessageDirect(Constants.SCI_GETFOLDLEVEL, line, 0);
  716. }
  717. int INativeScintilla.GetFoldParent(int line)
  718. {
  719. return _ns.SendMessageDirect(Constants.SCI_GETFOLDPARENT, line, 0);
  720. }
  721. int INativeScintilla.GetHighlightGuide()
  722. {
  723. return _ns.SendMessageDirect(Constants.SCI_GETHIGHLIGHTGUIDE, 0, 0);
  724. }
  725. int INativeScintilla.GetHotspotActiveBack()
  726. {
  727. return _ns.SendMessageDirect(Constants.SCI_GETHOTSPOTACTIVEBACK, 0, 0);
  728. }
  729. int INativeScintilla.GetHotspotActiveFore()
  730. {
  731. return _ns.SendMessageDirect(Constants.SCI_GETHOTSPOTACTIVEFORE, 0, 0);
  732. }
  733. bool INativeScintilla.GetHotspotActiveUnderline()
  734. {
  735. return _ns.SendMessageDirect(Constants.SCI_GETHOTSPOTACTIVEUNDERLINE, 0, 0) != 0;
  736. }
  737. bool INativeScintilla.GetHotspotSingleLine()
  738. {
  739. return _ns.SendMessageDirect(Constants.SCI_GETHOTSPOTSINGLELINE, 0, 0) != 0;
  740. }
  741. bool INativeScintilla.GetHScrollBar()
  742. {
  743. return _ns.SendMessageDirect(Constants.SCI_GETHSCROLLBAR, 0, 0) != 0;
  744. }
  745. int INativeScintilla.GetIndent()
  746. {
  747. return _ns.SendMessageDirect(Constants.SCI_GETINDENT, 0, 0);
  748. }
  749. bool INativeScintilla.GetIndentationGuides()
  750. {
  751. return _ns.SendMessageDirect(Constants.SCI_GETINDENTATIONGUIDES, 0, 0) != 0;
  752. }
  753. int INativeScintilla.GetIndicatorCurrent()
  754. {
  755. return _ns.SendMessageDirect(Constants.SCI_GETINDICATORCURRENT, 0, 0);
  756. }
  757. int INativeScintilla.GetIndicatorValue()
  758. {
  759. return _ns.SendMessageDirect(Constants.SCI_GETINDICATORVALUE, 0, 0);
  760. }
  761. int INativeScintilla.GetLastChild(int line, int level)
  762. {
  763. return _ns.SendMessageDirect(Constants.SCI_GETLASTCHILD, line, level);
  764. }
  765. int INativeScintilla.GetLength()
  766. {
  767. return _ns.SendMessageDirect(Constants.SCI_GETLENGTH, 0, 0);
  768. }
  769. int INativeScintilla.GetLexer()
  770. {
  771. return _ns.SendMessageDirect(Constants.SCI_GETLEXER, 0, 0);
  772. }
  773. int INativeScintilla.GetLine(int line, out string text)
  774. {
  775. int length = _ns.SendMessageDirect(Constants.SCI_GETLINE, line, 0);
  776. if (length == 0)
  777. {
  778. text = string.Empty;
  779. return 0;
  780. }
  781. return _ns.SendMessageDirect(Constants.SCI_GETLINE, (IntPtr)line, out text, length);
  782. }
  783. int INativeScintilla.GetLineEndPosition(int line)
  784. {
  785. return _ns.SendMessageDirect(Constants.SCI_GETLINEENDPOSITION, line, 0);
  786. }
  787. int INativeScintilla.GetLineIndentation(int line)
  788. {
  789. return _ns.SendMessageDirect(Constants.SCI_GETLINEINDENTATION, line, 0);
  790. }
  791. int INativeScintilla.GetLineIndentPosition(int line)
  792. {
  793. return _ns.SendMessageDirect(Constants.SCI_GETLINEINDENTPOSITION, line, 0);
  794. }
  795. int INativeScintilla.GetLineSelEndPosition(int line)
  796. {
  797. return _ns.SendMessageDirect(Constants.SCI_GETLINESELENDPOSITION, line, 0);
  798. }
  799. int INativeScintilla.GetLineSelStartPosition(int line)
  800. {
  801. return _ns.SendMessageDirect(Constants.SCI_GETLINESELSTARTPOSITION, line, 0);
  802. }
  803. int INativeScintilla.GetLineState(int line)
  804. {
  805. return _ns.SendMessageDirect(Constants.SCI_GETLINESTATE, line, 0);
  806. }
  807. bool INativeScintilla.GetLineVisible(int line)
  808. {
  809. return _ns.SendMessageDirect(Constants.SCI_GETLINEVISIBLE, line, 0) != 0;
  810. }
  811. int INativeScintilla.GetMarginLeft()
  812. {
  813. return _ns.SendMessageDirect(Constants.SCI_GETMARGINLEFT, 0, 0);
  814. }
  815. int INativeScintilla.GetMarginMaskN(int margin)
  816. {
  817. return _ns.SendMessageDirect(Constants.SCI_GETMARGINMASKN, margin, 0);
  818. }
  819. int INativeScintilla.GetMarginRight()
  820. {
  821. return _ns.SendMessageDirect(Constants.SCI_GETMARGINRIGHT, 0, 0);
  822. }
  823. bool INativeScintilla.GetMarginSensitiveN(int margin)
  824. {
  825. return _ns.SendMessageDirect(Constants.SCI_GETMARGINSENSITIVEN, margin, 0) != 0;
  826. }
  827. int INativeScintilla.GetMarginTypeN(int margin)
  828. {
  829. return _ns.SendMessageDirect(Constants.SCI_GETMARGINTYPEN, margin, 0);
  830. }
  831. int INativeScintilla.GetMarginWidthN(int margin)
  832. {
  833. return _ns.SendMessageDirect(Constants.SCI_GETMARGINWIDTHN, margin, 0);
  834. }
  835. int INativeScintilla.GetMaxLineState()
  836. {
  837. return _ns.SendMessageDirect(Constants.SCI_GETMAXLINESTATE, 0, 0);
  838. }
  839. int INativeScintilla.GetModEventMask()
  840. {
  841. return _ns.SendMessageDirect(Constants.SCI_GETMODEVENTMASK, 0, 0);
  842. }
  843. bool INativeScintilla.GetModify()
  844. {
  845. return _ns.SendMessageDirect(Constants.SCI_GETMODIFY, 0, 0) != 0;
  846. }
  847. bool INativeScintilla.GetMouseDownCaptures()
  848. {
  849. return _ns.SendMessageDirect(Constants.SCI_GETMOUSEDOWNCAPTURES, 0, 0) != 0;
  850. }
  851. int INativeScintilla.GetMouseDwellTime()
  852. {
  853. return _ns.SendMessageDirect(Constants.SCI_GETMOUSEDWELLTIME, 0, 0);
  854. }
  855. bool INativeScintilla.GetOvertype()
  856. {
  857. return _ns.SendMessageDirect(Constants.SCI_GETOVERTYPE, 0, 0) != 0;
  858. }
  859. int INativeScintilla.GetPrintColourMode()
  860. {
  861. return _ns.SendMessageDirect(Constants.SCI_GETPRINTCOLOURMODE, 0, 0);
  862. }
  863. int INativeScintilla.GetPrintMagnification()
  864. {
  865. return _ns.SendMessageDirect(Constants.SCI_GETPRINTMAGNIFICATION, 0, 0);
  866. }
  867. int INativeScintilla.GetPrintWrapMode()
  868. {
  869. return _ns.SendMessageDirect(Constants.SCI_GETPRINTWRAPMODE, 0, 0);
  870. }
  871. void INativeScintilla.GetProperty(string key, out string value)
  872. {
  873. _ns.SendMessageDirect(Constants.SCI_GETPROPERTY, key, out value);
  874. }
  875. void INativeScintilla.GetPropertyExpanded(string key, out string value)
  876. {
  877. _ns.SendMessageDirect(Constants.SCI_GETPROPERTYEXPANDED, key, out value);
  878. }
  879. int INativeScintilla.GetPropertyInt(string key, int @default)
  880. {
  881. return _ns.SendMessageDirect(Constants.SCI_GETPROPERTYINT, key, @default);
  882. }
  883. bool INativeScintilla.GetReadOnly()
  884. {
  885. return _ns.SendMessageDirect(Constants.SCI_GETREADONLY, 0, 0) != 0;
  886. }
  887. int INativeScintilla.GetScrollWidth()
  888. {
  889. return _ns.SendMessageDirect(Constants.SCI_GETSCROLLWIDTH, 0, 0);
  890. }
  891. int INativeScintilla.GetSearchFlags()
  892. {
  893. return _ns.SendMessageDirect(Constants.SCI_GETSEARCHFLAGS, 0, 0);
  894. }
  895. int INativeScintilla.GetSelectionEnd()
  896. {
  897. return _ns.SendMessageDirect(Constants.SCI_GETSELECTIONEND, 0, 0);
  898. }
  899. int INativeScintilla.GetSelectionMode()
  900. {
  901. return _ns.SendMessageDirect(Constants.SCI_GETSELECTIONMODE, 0, 0);
  902. }
  903. int INativeScintilla.GetSelectionStart()
  904. {
  905. return _ns.SendMessageDirect(Constants.SCI_GETSELECTIONSTART, 0, 0);
  906. }
  907. void INativeScintilla.GetSelText(out string text)
  908. {
  909. int length = _ns.GetSelectionEnd() - _ns.GetSelectionStart() + 1;
  910. _ns.SendMessageDirect(Constants.SCI_GETSELTEXT, IntPtr.Zero, out text, length);
  911. }
  912. int INativeScintilla.GetStatus()
  913. {
  914. return _ns.SendMessageDirect(Constants.SCI_GETSTATUS, 0, 0);
  915. }
  916. byte INativeScintilla.GetStyleAt(int position)
  917. {
  918. return (byte)_ns.SendMessageDirect(Constants.SCI_GETSTYLEAT, position, 0);
  919. }
  920. int INativeScintilla.GetStyleBits()
  921. {
  922. return _ns.SendMessageDirect(Constants.SCI_GETSTYLEBITS, 0, 0);
  923. }
  924. int INativeScintilla.GetStyleBitsNeeded()
  925. {
  926. return _ns.SendMessageDirect(Constants.SCI_GETSTYLEBITSNEEDED, 0, 0);
  927. }
  928. unsafe void INativeScintilla.GetStyledText(ref TextRange tr)
  929. {
  930. fixed (TextRange* trp = &tr)
  931. _ns.SendMessageDirect(Constants.SCI_GETSTYLEDTEXT, IntPtr.Zero, (IntPtr)trp);
  932. }
  933. bool INativeScintilla.GetTabIndents()
  934. {
  935. return _ns.SendMessageDirect(Constants.SCI_GETTABINDENTS, 0, 0) != 0;
  936. }
  937. int INativeScintilla.GetTabWidth()
  938. {
  939. return _ns.SendMessageDirect(Constants.SCI_GETTABWIDTH, 0, 0);
  940. }
  941. int INativeScintilla.GetTargetEnd()
  942. {
  943. return _ns.SendMessageDirect(Constants.SCI_GETTARGETEND, 0, 0);
  944. }
  945. int INativeScintilla.GetTargetStart()
  946. {
  947. return _ns.SendMessageDirect(Constants.SCI_GETTARGETSTART, 0, 0);
  948. }
  949. int INativeScintilla.GetText(int length, out string text)
  950. {
  951. return (int)_ns.SendMessageDirect(Constants.SCI_GETTEXT, (IntPtr)length, out text, length);
  952. }
  953. unsafe int INativeScintilla.GetTextRange(ref TextRange tr)
  954. {
  955. fixed (TextRange* trp = &tr)
  956. return (int)_ns.SendMessageDirect(Constants.SCI_GETTEXTRANGE, IntPtr.Zero, (IntPtr)trp);
  957. }
  958. int INativeScintilla.GetTextLength()
  959. {
  960. return _ns.SendMessageDirect(Constants.SCI_GETTEXTLENGTH, 0, 0);
  961. }
  962. bool INativeScintilla.GetTwoPhaseDraw()
  963. {
  964. return _ns.SendMessageDirect(Constants.SCI_GETTWOPHASEDRAW, 0, 0) != 0;
  965. }
  966. bool INativeScintilla.GetUndoCollection()
  967. {
  968. return _ns.SendMessageDirect(Constants.SCI_GETUNDOCOLLECTION, 0, 0) != 0;
  969. }
  970. bool INativeScintilla.GetUsePalette()
  971. {
  972. return _ns.SendMessageDirect(Constants.SCI_GETUSEPALETTE, 0, 0) != 0;
  973. }
  974. bool INativeScintilla.GetUseTabs()
  975. {
  976. return _ns.SendMessageDirect(Constants.SCI_GETUSETABS, 0, 0) != 0;
  977. }
  978. bool INativeScintilla.GetViewEol()
  979. {
  980. return _ns.SendMessageDirect(Constants.SCI_GETVIEWEOL, 0, 0) != 0;
  981. }
  982. int INativeScintilla.GetViewWs()
  983. {
  984. return _ns.SendMessageDirect(Constants.SCI_GETVIEWWS, 0, 0);
  985. }
  986. bool INativeScintilla.GetVScrollBar()
  987. {
  988. return _ns.SendMessageDirect(Constants.SCI_GETVSCROLLBAR, 0, 0) != 0;
  989. }
  990. int INativeScintilla.GetXOffset()
  991. {
  992. return _ns.SendMessageDirect(Constants.SCI_GETXOFFSET, 0, 0);
  993. }
  994. int INativeScintilla.GetZoom()
  995. {
  996. return _ns.SendMessageDirect(Constants.SCI_GETZOOM, 0, 0);
  997. }
  998. void INativeScintilla.GotoLine(int line)
  999. {
  1000. _ns.SendMessageDirect(Constants.SCI_GOTOLINE, line, 0);
  1001. }
  1002. void INativeScintilla.GotoPos(int position)
  1003. {
  1004. _ns.SendMessageDirect(Constants.SCI_GOTOPOS, position, 0);
  1005. }
  1006. void INativeScintilla.GrabFocus()
  1007. {
  1008. _ns.SendMessageDirect(Constants.SCI_GRABFOCUS, 0, 0);
  1009. }
  1010. void INativeScintilla.HideLines(int lineStart, int lineEnd)
  1011. {
  1012. _ns.SendMessageDirect(Constants.SCI_HIDELINES, lineStart, lineEnd);
  1013. }
  1014. void INativeScintilla.HideSelection(bool hide)
  1015. {
  1016. _ns.SendMessageDirect(Constants.SCI_HIDESELECTION, hide, 0);
  1017. }
  1018. void INativeScintilla.Home()
  1019. {
  1020. _ns.SendMessageDirect(Constants.SCI_HOME, 0, 0);
  1021. }
  1022. void INativeScintilla.HomeDisplay()
  1023. {
  1024. _ns.SendMessageDirect(Constants.SCI_HOMEDISPLAY, 0, 0);
  1025. }
  1026. void INativeScintilla.HomeDisplayExtend()
  1027. {
  1028. _ns.SendMessageDirect(Constants.SCI_HOMEDISPLAYEXTEND, 0, 0);
  1029. }
  1030. void INativeScintilla.HomeExtend()
  1031. {
  1032. _ns.SendMessageDirect(Constants.SCI_HOMEEXTEND, 0, 0);
  1033. }
  1034. void INativeScintilla.HomeRectExtend()
  1035. {
  1036. _ns.SendMessageDirect(Constants.SCI_HOMERECTEXTEND, 0, 0);
  1037. }
  1038. void INativeScintilla.HomeWrap()
  1039. {
  1040. _ns.SendMessageDirect(Constants.SCI_HOMEWRAP, 0, 0);
  1041. }
  1042. void INativeScintilla.HomeWrapExtend()
  1043. {
  1044. _ns.SendMessageDirect(Constants.SCI_HOMEWRAPEXTEND, 0, 0);
  1045. }
  1046. uint INativeScintilla.IndicatorAllOnFor(int position)
  1047. {
  1048. return (uint)_ns.SendMessageDirect(Constants.SCI_INDICATORALLONFOR, position, 0);
  1049. }
  1050. void INativeScintilla.IndicatorClearRange(int position, int fillLength)
  1051. {
  1052. _ns.SendMessageDirect(Constants.SCI_INDICATORCLEARRANGE, position, fillLength);
  1053. }
  1054. int INativeScintilla.IndicatorEnd(int indicator, int position)
  1055. {
  1056. return _ns.SendMessageDirect(Constants.SCI_INDICATOREND, indicator, position);
  1057. }
  1058. void INativeScintilla.IndicatorFillRange(int position, int fillLength)
  1059. {
  1060. _ns.SendMessageDirect(Constants.SCI_INDICATORFILLRANGE, position, fillLength);
  1061. }
  1062. int INativeScintilla.IndicatorStart(int indicator, int position)
  1063. {
  1064. return _ns.SendMessageDirect(Constants.SCI_INDICATORSTART, indicator, position);
  1065. }
  1066. int INativeScintilla.IndicatorValueAt(int indicator, int position)
  1067. {
  1068. return _ns.SendMessageDirect(Constants.SCI_INDICATORVALUEAT, indicator, position);
  1069. }
  1070. int INativeScintilla.IndicGetFore(int indicatorNumber)
  1071. {
  1072. return _ns.SendMessageDirect(Constants.SCI_INDICGETFORE, indicatorNumber, 0);
  1073. }
  1074. int INativeScintilla.IndicGetStyle(int indicatorNumber)
  1075. {
  1076. return _ns.SendMessageDirect(Constants.SCI_INDICGETSTYLE, indicatorNumber, 0);
  1077. }
  1078. bool INativeScintilla.IndicGetUnder(int indicatorNumber)
  1079. {
  1080. return _ns.SendMessageDirect(Constants.SCI_INDICGETUNDER, indicatorNumber, 0) != 0;
  1081. }
  1082. void INativeScintilla.IndicSetFore(int indicatorNumber, int colour)
  1083. {
  1084. _ns.SendMessageDirect(Constants.SCI_INDICSETFORE, indicatorNumber, colour);
  1085. }
  1086. void INativeScintilla.IndicSetStyle(int indicatorNumber, int indicatorStyle)
  1087. {
  1088. _ns.SendMessageDirect(Constants.SCI_INDICSETSTYLE, indicatorNumber, indicatorStyle);
  1089. }
  1090. void INativeScintilla.IndicSetUnder(int indicatorNumber, bool under)
  1091. {
  1092. _ns.SendMessageDirect(Constants.SCI_INDICSETUNDER, indicatorNumber, under);
  1093. }
  1094. void INativeScintilla.InsertText(int pos, string text)
  1095. {
  1096. _ns.SendMessageDirect(Constants.SCI_INSERTTEXT, pos, text);
  1097. }
  1098. void INativeScintilla.LineCopy()
  1099. {
  1100. _ns.SendMessageDirect(Constants.SCI_LINECOPY, 0, 0);
  1101. }
  1102. void INativeScintilla.LineCut()
  1103. {
  1104. _ns.SendMessageDirect(Constants.SCI_LINECUT, 0, 0);
  1105. }
  1106. void INativeScintilla.LineDelete()
  1107. {
  1108. _ns.SendMessageDirect(Constants.SCI_LINEDELETE, 0, 0);
  1109. }
  1110. void INativeScintilla.LineDown()
  1111. {
  1112. _ns.SendMessageDirect(Constants.SCI_LINEDOWN, 0, 0);
  1113. }
  1114. void INativeScintilla.LineDownExtend()
  1115. {
  1116. _ns.SendMessageDirect(Constants.SCI_LINEDOWNEXTEND, 0, 0);
  1117. }
  1118. void INativeScintilla.LineDownRectExtend()
  1119. {
  1120. _ns.SendMessageDirect(Constants.SCI_LINEDOWNRECTEXTEND, 0, 0);
  1121. }
  1122. void INativeScintilla.LineDuplicate()
  1123. {
  1124. _ns.SendMessageDirect(Constants.SCI_LINEDUPLICATE, 0, 0);
  1125. }
  1126. void INativeScintilla.LineEnd()
  1127. {
  1128. _ns.SendMessageDirect(Constants.SCI_LINEEND, 0, 0);
  1129. }
  1130. void INativeScintilla.LineEndDisplay()
  1131. {
  1132. _ns.SendMessageDirect(Constants.SCI_LINEENDDISPLAY, 0, 0);
  1133. }
  1134. void INativeScintilla.LineEndDisplayExtend()
  1135. {
  1136. _ns.SendMessageDirect(Constants.SCI_LINEENDDISPLAYEXTEND, 0, 0);
  1137. }
  1138. void INativeScintilla.LineEndExtend()
  1139. {
  1140. _ns.SendMessageDirect(Constants.SCI_LINEENDEXTEND, 0, 0);
  1141. }
  1142. void INativeScintilla.LineEndRectExtend()
  1143. {
  1144. _ns.SendMessageDirect(Constants.SCI_LINEENDRECTEXTEND, 0, 0);
  1145. }
  1146. void INativeScintilla.LineEndWrap()
  1147. {
  1148. _ns.SendMessageDirect(Constants.SCI_LINEENDWRAP, 0, 0);
  1149. }
  1150. void INativeScintilla.LineEndWrapExtend()
  1151. {
  1152. _ns.SendMessageDirect(Constants.SCI_LINEENDWRAPEXTEND, 0, 0);
  1153. }
  1154. int INativeScintilla.LineFromPosition(int pos)
  1155. {
  1156. return _ns.SendMessageDirect(Constants.SCI_LINEFROMPOSITION, pos, 0);
  1157. }
  1158. int INativeScintilla.LineLength(int line)
  1159. {
  1160. return _ns.SendMessageDirect(Constants.SCI_LINELENGTH, line, 0);
  1161. }
  1162. void INativeScintilla.LineScroll(int columns, int lines)
  1163. {
  1164. _ns.SendMessageDirect(Constants.SCI_LINESCROLL, columns, lines);
  1165. }
  1166. void INativeScintilla.LineScrollDown()
  1167. {
  1168. _ns.SendMessageDirect(Constants.SCI_LINESCROLLDOWN, 0, 0);
  1169. }
  1170. void INativeScintilla.LineScrollUp()
  1171. {
  1172. _ns.SendMessageDirect(Constants.SCI_LINESCROLLUP, 0, 0);
  1173. }
  1174. int INativeScintilla.LinesOnScreen()
  1175. {
  1176. return _ns.SendMessageDirect(Constants.SCI_LINESONSCREEN, 0, 0);
  1177. }
  1178. void INativeScintilla.LineTranspose()
  1179. {
  1180. _ns.SendMessageDirect(Constants.SCI_LINETRANSPOSE, 0, 0);
  1181. }
  1182. void INativeScintilla.LineUp()
  1183. {
  1184. _ns.SendMessageDirect(Constants.SCI_LINEUP, 0, 0);
  1185. }
  1186. void INativeScintilla.LineUpExtend()
  1187. {
  1188. _ns.SendMessageDirect(Constants.SCI_LINEUPEXTEND, 0, 0);
  1189. }
  1190. void INativeScintilla.LineUpRectExtend()
  1191. {
  1192. _ns.SendMessageDirect(Constants.SCI_LINEUPRECTEXTEND, 0, 0);
  1193. }
  1194. void INativeScintilla.LoadLexerLibrary(string path)
  1195. {
  1196. _ns.SendMessageDirect(Constants.SCI_LOADLEXERLIBRARY, VOID.NULL, path);
  1197. }
  1198. void INativeS

Large files files are truncated, but you can click here to view the full file