Scintilla_iface.cs 97 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047
  1. // NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc.
  2. //
  3. // This file should stay in sync with the CPP project file
  4. // "notepad-plus-plus/scintilla/include/Scintilla.iface"
  5. // found at
  6. // https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.iface
  7. using System;
  8. using System.Runtime.InteropServices;
  9. namespace Kbg.NppPluginNET.PluginInfrastructure
  10. {
  11. /// <summary>
  12. /// Compatible with Windows NMHDR.
  13. /// hwndFrom is really an environment specific window handle or pointer
  14. /// but most clients of Scintilla.h do not have this type visible.
  15. /// </summary>
  16. [StructLayout(LayoutKind.Sequential)]
  17. public struct ScNotificationHeader
  18. {
  19. /// <summary>
  20. /// environment specific window handle/pointer
  21. /// </summary>
  22. public IntPtr hwndFrom;
  23. /// <summary>
  24. /// CtrlID of the window issuing the notification
  25. /// </summary>
  26. public IntPtr IdFrom;
  27. /// <summary>
  28. /// The SCN_* notification Code
  29. /// </summary>
  30. public uint Code;
  31. }
  32. [StructLayout(LayoutKind.Sequential)]
  33. public struct ScNotification
  34. {
  35. public ScNotificationHeader Header;
  36. private int position; /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */
  37. public int character; /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, SCN_USERLISTSELECTION */
  38. public int Mmodifiers; /* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE */
  39. public int ModificationType; /* SCN_MODIFIED - modification types are name "SC_MOD_*" */
  40. public IntPtr TextPointer; /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */
  41. public int Length; /* SCN_MODIFIED */
  42. public int LinesAdded; /* SCN_MODIFIED */
  43. public int Message; /* SCN_MACRORECORD */
  44. public IntPtr wParam; /* SCN_MACRORECORD */
  45. public IntPtr lParam; /* SCN_MACRORECORD */
  46. /// <summary>
  47. /// 0-based index
  48. /// </summary>
  49. public int LineNumber; /* SCN_MODIFIED */
  50. public int FoldLevelNow; /* SCN_MODIFIED */
  51. public int FoldLevelPrev; /* SCN_MODIFIED */
  52. public int Margin; /* SCN_MARGINCLICK */
  53. public int ListType; /* SCN_USERLISTSELECTION */
  54. public int X; /* SCN_DWELLSTART, SCN_DWELLEND */
  55. public int Y; /* SCN_DWELLSTART, SCN_DWELLEND */
  56. public int Token; /* SCN_MODIFIED with SC_MOD_CONTAINER */
  57. public int AnnotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */
  58. public int Updated; /* SCN_UPDATEUI */
  59. public int ListCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */
  60. /// <summary>
  61. /// SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION
  62. /// </summary>
  63. public Position Position { get { return new Position(position); } }
  64. /// <summary>
  65. /// Character of the notification - eg keydown
  66. /// SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, SCN_USERLISTSELECTION
  67. /// </summary>
  68. public char Character { get { return (char) character; } }
  69. }
  70. [Flags]
  71. public enum SciMsg : uint
  72. {
  73. /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */
  74. INVALID_POSITION = 0xFFFFFFFF,
  75. SCI_START = 2000,
  76. SCI_OPTIONAL_START = 3000,
  77. SCI_LEXER_START = 4000,
  78. /// Add text to the document at current position.
  79. SCI_ADDTEXT = 2001,
  80. /// Add array of cells to document.
  81. SCI_ADDSTYLEDTEXT = 2002,
  82. /// Insert string at a position.
  83. SCI_INSERTTEXT = 2003,
  84. /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK
  85. SCI_CHANGEINSERTION = 2672,
  86. /// Delete all text in the document.
  87. SCI_CLEARALL = 2004,
  88. /// Delete a range of text in the document.
  89. SCI_DELETERANGE = 2645,
  90. /// Set all style bytes to 0, remove all folding information.
  91. SCI_CLEARDOCUMENTSTYLE = 2005,
  92. /// Returns the number of bytes in the document.
  93. SCI_GETLENGTH = 2006,
  94. /// Returns the character byte at the position.
  95. SCI_GETCHARAT = 2007,
  96. /// Returns the position of the caret.
  97. SCI_GETCURRENTPOS = 2008,
  98. /// Returns the position of the opposite end of the selection to the caret.
  99. SCI_GETANCHOR = 2009,
  100. /// Returns the style byte at the position.
  101. SCI_GETSTYLEAT = 2010,
  102. /// Redoes the next action on the undo history.
  103. SCI_REDO = 2011,
  104. /// Choose between collecting actions into the undo
  105. /// history and discarding them.
  106. SCI_SETUNDOCOLLECTION = 2012,
  107. /// Select all the text in the document.
  108. SCI_SELECTALL = 2013,
  109. /// Remember the current position in the undo history as the position
  110. /// at which the document was saved.
  111. SCI_SETSAVEPOINT = 2014,
  112. /// Retrieve a buffer of cells.
  113. /// Returns the number of bytes in the buffer not including terminating NULs.
  114. SCI_GETSTYLEDTEXT = 2015,
  115. /// Are there any redoable actions in the undo history?
  116. SCI_CANREDO = 2016,
  117. /// Retrieve the line number at which a particular marker is located.
  118. SCI_MARKERLINEFROMHANDLE = 2017,
  119. /// Delete a marker.
  120. SCI_MARKERDELETEHANDLE = 2018,
  121. /// Is undo history being collected?
  122. SCI_GETUNDOCOLLECTION = 2019,
  123. SCWS_INVISIBLE = 0,
  124. SCWS_VISIBLEALWAYS = 1,
  125. SCWS_VISIBLEAFTERINDENT = 2,
  126. /// Are white space characters currently visible?
  127. /// Returns one of SCWS_* constants.
  128. SCI_GETVIEWWS = 2020,
  129. /// Make white space characters invisible, always visible or visible outside indentation.
  130. SCI_SETVIEWWS = 2021,
  131. /// Find the position from a point within the window.
  132. SCI_POSITIONFROMPOINT = 2022,
  133. /// Find the position from a point within the window but return
  134. /// INVALID_POSITION if not close to text.
  135. SCI_POSITIONFROMPOINTCLOSE = 2023,
  136. /// Set caret to start of a line and ensure it is visible.
  137. SCI_GOTOLINE = 2024,
  138. /// Set caret to a position and ensure it is visible.
  139. SCI_GOTOPOS = 2025,
  140. /// Set the selection anchor to a position. The anchor is the opposite
  141. /// end of the selection from the caret.
  142. SCI_SETANCHOR = 2026,
  143. /// Retrieve the text of the line containing the caret.
  144. /// Returns the index of the caret on the line.
  145. /// Result is NUL-terminated.
  146. SCI_GETCURLINE = 2027,
  147. /// Retrieve the position of the last correctly styled character.
  148. SCI_GETENDSTYLED = 2028,
  149. SC_EOL_CRLF = 0,
  150. SC_EOL_CR = 1,
  151. SC_EOL_LF = 2,
  152. /// Convert all line endings in the document to one mode.
  153. SCI_CONVERTEOLS = 2029,
  154. /// Retrieve the current end of line mode - one of CRLF, CR, or LF.
  155. SCI_GETEOLMODE = 2030,
  156. /// Set the current end of line mode.
  157. SCI_SETEOLMODE = 2031,
  158. /// Set the current styling position to pos and the styling mask to mask.
  159. /// The styling mask can be used to protect some bits in each styling byte from modification.
  160. SCI_STARTSTYLING = 2032,
  161. /// Change style from current styling position for length characters to a style
  162. /// and move the current styling position to after this newly styled segment.
  163. SCI_SETSTYLING = 2033,
  164. /// Is drawing done first into a buffer or direct to the screen?
  165. SCI_GETBUFFEREDDRAW = 2034,
  166. /// If drawing is buffered then each line of text is drawn into a bitmap buffer
  167. /// before drawing it to the screen to avoid flicker.
  168. SCI_SETBUFFEREDDRAW = 2035,
  169. /// Change the visible size of a tab to be a multiple of the width of a space character.
  170. SCI_SETTABWIDTH = 2036,
  171. /// Retrieve the visible size of a tab.
  172. SCI_GETTABWIDTH = 2121,
  173. /// Clear explicit tabstops on a line.
  174. SCI_CLEARTABSTOPS = 2675,
  175. /// Add an explicit tab stop for a line.
  176. SCI_ADDTABSTOP = 2676,
  177. /// Find the next explicit tab stop position on a line after a position.
  178. SCI_GETNEXTTABSTOP = 2677,
  179. SC_CP_UTF8 = 65001,
  180. /// Set the code page used to interpret the bytes of the document as characters.
  181. /// The SC_CP_UTF8 value can be used to enter Unicode mode.
  182. SCI_SETCODEPAGE = 2037,
  183. SC_IME_WINDOWED = 0,
  184. SC_IME_INLINE = 1,
  185. /// Is the IME displayed in a winow or inline?
  186. SCI_GETIMEINTERACTION = 2678,
  187. /// Choose to display the the IME in a winow or inline.
  188. SCI_SETIMEINTERACTION = 2679,
  189. MARKER_MAX = 31,
  190. SC_MARK_CIRCLE = 0,
  191. SC_MARK_ROUNDRECT = 1,
  192. SC_MARK_ARROW = 2,
  193. SC_MARK_SMALLRECT = 3,
  194. SC_MARK_SHORTARROW = 4,
  195. SC_MARK_EMPTY = 5,
  196. SC_MARK_ARROWDOWN = 6,
  197. SC_MARK_MINUS = 7,
  198. SC_MARK_PLUS = 8,
  199. SC_MARK_VLINE = 9,
  200. SC_MARK_LCORNER = 10,
  201. SC_MARK_TCORNER = 11,
  202. SC_MARK_BOXPLUS = 12,
  203. SC_MARK_BOXPLUSCONNECTED = 13,
  204. SC_MARK_BOXMINUS = 14,
  205. SC_MARK_BOXMINUSCONNECTED = 15,
  206. SC_MARK_LCORNERCURVE = 16,
  207. SC_MARK_TCORNERCURVE = 17,
  208. SC_MARK_CIRCLEPLUS = 18,
  209. SC_MARK_CIRCLEPLUSCONNECTED = 19,
  210. SC_MARK_CIRCLEMINUS = 20,
  211. SC_MARK_CIRCLEMINUSCONNECTED = 21,
  212. SC_MARK_BACKGROUND = 22,
  213. SC_MARK_DOTDOTDOT = 23,
  214. SC_MARK_ARROWS = 24,
  215. SC_MARK_PIXMAP = 25,
  216. SC_MARK_FULLRECT = 26,
  217. SC_MARK_LEFTRECT = 27,
  218. SC_MARK_AVAILABLE = 28,
  219. SC_MARK_UNDERLINE = 29,
  220. SC_MARK_RGBAIMAGE = 30,
  221. SC_MARK_BOOKMARK = 31,
  222. SC_MARK_CHARACTER = 10000,
  223. SC_MARKNUM_FOLDEREND = 25,
  224. SC_MARKNUM_FOLDEROPENMID = 26,
  225. SC_MARKNUM_FOLDERMIDTAIL = 27,
  226. SC_MARKNUM_FOLDERTAIL = 28,
  227. SC_MARKNUM_FOLDERSUB = 29,
  228. SC_MARKNUM_FOLDER = 30,
  229. SC_MARKNUM_FOLDEROPEN = 31,
  230. SC_MASK_FOLDERS = 0xFE000000,
  231. /// Set the symbol used for a particular marker number.
  232. SCI_MARKERDEFINE = 2040,
  233. /// Set the foreground colour used for a particular marker number.
  234. SCI_MARKERSETFORE = 2041,
  235. /// Set the background colour used for a particular marker number.
  236. SCI_MARKERSETBACK = 2042,
  237. /// Set the background colour used for a particular marker number when its folding block is selected.
  238. SCI_MARKERSETBACKSELECTED = 2292,
  239. /// Enable/disable highlight for current folding bloc (smallest one that contains the caret)
  240. SCI_MARKERENABLEHIGHLIGHT = 2293,
  241. /// Add a marker to a line, returning an ID which can be used to find or delete the marker.
  242. SCI_MARKERADD = 2043,
  243. /// Delete a marker from a line.
  244. SCI_MARKERDELETE = 2044,
  245. /// Delete all markers with a particular number from all lines.
  246. SCI_MARKERDELETEALL = 2045,
  247. /// Get a bit mask of all the markers set on a line.
  248. SCI_MARKERGET = 2046,
  249. /// Find the next line at or after lineStart that includes a marker in mask.
  250. /// Return -1 when no more lines.
  251. SCI_MARKERNEXT = 2047,
  252. /// Find the previous line before lineStart that includes a marker in mask.
  253. SCI_MARKERPREVIOUS = 2048,
  254. /// Define a marker from a pixmap.
  255. SCI_MARKERDEFINEPIXMAP = 2049,
  256. /// Add a set of markers to a line.
  257. SCI_MARKERADDSET = 2466,
  258. /// Set the alpha used for a marker that is drawn in the text area, not the margin.
  259. SCI_MARKERSETALPHA = 2476,
  260. SC_MAX_MARGIN = 4,
  261. SC_MARGIN_SYMBOL = 0,
  262. SC_MARGIN_NUMBER = 1,
  263. SC_MARGIN_BACK = 2,
  264. SC_MARGIN_FORE = 3,
  265. SC_MARGIN_TEXT = 4,
  266. SC_MARGIN_RTEXT = 5,
  267. /// Set a margin to be either numeric or symbolic.
  268. SCI_SETMARGINTYPEN = 2240,
  269. /// Retrieve the type of a margin.
  270. SCI_GETMARGINTYPEN = 2241,
  271. /// Set the width of a margin to a width expressed in pixels.
  272. SCI_SETMARGINWIDTHN = 2242,
  273. /// Retrieve the width of a margin in pixels.
  274. SCI_GETMARGINWIDTHN = 2243,
  275. /// Set a mask that determines which markers are displayed in a margin.
  276. SCI_SETMARGINMASKN = 2244,
  277. /// Retrieve the marker mask of a margin.
  278. SCI_GETMARGINMASKN = 2245,
  279. /// Make a margin sensitive or insensitive to mouse clicks.
  280. SCI_SETMARGINSENSITIVEN = 2246,
  281. /// Retrieve the mouse click sensitivity of a margin.
  282. SCI_GETMARGINSENSITIVEN = 2247,
  283. /// Set the cursor shown when the mouse is inside a margin.
  284. SCI_SETMARGINCURSORN = 2248,
  285. /// Retrieve the cursor shown in a margin.
  286. SCI_GETMARGINCURSORN = 2249,
  287. STYLE_DEFAULT = 32,
  288. STYLE_LINENUMBER = 33,
  289. STYLE_BRACELIGHT = 34,
  290. STYLE_BRACEBAD = 35,
  291. STYLE_CONTROLCHAR = 36,
  292. STYLE_INDENTGUIDE = 37,
  293. STYLE_CALLTIP = 38,
  294. STYLE_LASTPREDEFINED = 39,
  295. STYLE_MAX = 255,
  296. SC_CHARSET_ANSI = 0,
  297. SC_CHARSET_DEFAULT = 1,
  298. SC_CHARSET_BALTIC = 186,
  299. SC_CHARSET_CHINESEBIG5 = 136,
  300. SC_CHARSET_EASTEUROPE = 238,
  301. SC_CHARSET_GB2312 = 134,
  302. SC_CHARSET_GREEK = 161,
  303. SC_CHARSET_HANGUL = 129,
  304. SC_CHARSET_MAC = 77,
  305. SC_CHARSET_OEM = 255,
  306. SC_CHARSET_RUSSIAN = 204,
  307. SC_CHARSET_CYRILLIC = 1251,
  308. SC_CHARSET_SHIFTJIS = 128,
  309. SC_CHARSET_SYMBOL = 2,
  310. SC_CHARSET_TURKISH = 162,
  311. SC_CHARSET_JOHAB = 130,
  312. SC_CHARSET_HEBREW = 177,
  313. SC_CHARSET_ARABIC = 178,
  314. SC_CHARSET_VIETNAMESE = 163,
  315. SC_CHARSET_THAI = 222,
  316. SC_CHARSET_8859_15 = 1000,
  317. /// Clear all the styles and make equivalent to the global default style.
  318. SCI_STYLECLEARALL = 2050,
  319. /// Set the foreground colour of a style.
  320. SCI_STYLESETFORE = 2051,
  321. /// Set the background colour of a style.
  322. SCI_STYLESETBACK = 2052,
  323. /// Set a style to be bold or not.
  324. SCI_STYLESETBOLD = 2053,
  325. /// Set a style to be italic or not.
  326. SCI_STYLESETITALIC = 2054,
  327. /// Set the size of characters of a style.
  328. SCI_STYLESETSIZE = 2055,
  329. /// Set the font of a style.
  330. SCI_STYLESETFONT = 2056,
  331. /// Set a style to have its end of line filled or not.
  332. SCI_STYLESETEOLFILLED = 2057,
  333. /// Reset the default style to its state at startup
  334. SCI_STYLERESETDEFAULT = 2058,
  335. /// Set a style to be underlined or not.
  336. SCI_STYLESETUNDERLINE = 2059,
  337. SC_CASE_MIXED = 0,
  338. SC_CASE_UPPER = 1,
  339. SC_CASE_LOWER = 2,
  340. /// Get the foreground colour of a style.
  341. SCI_STYLEGETFORE = 2481,
  342. /// Get the background colour of a style.
  343. SCI_STYLEGETBACK = 2482,
  344. /// Get is a style bold or not.
  345. SCI_STYLEGETBOLD = 2483,
  346. /// Get is a style italic or not.
  347. SCI_STYLEGETITALIC = 2484,
  348. /// Get the size of characters of a style.
  349. SCI_STYLEGETSIZE = 2485,
  350. /// Get the font of a style.
  351. /// Returns the length of the fontName
  352. /// Result is NUL-terminated.
  353. SCI_STYLEGETFONT = 2486,
  354. /// Get is a style to have its end of line filled or not.
  355. SCI_STYLEGETEOLFILLED = 2487,
  356. /// Get is a style underlined or not.
  357. SCI_STYLEGETUNDERLINE = 2488,
  358. /// Get is a style mixed case, or to force upper or lower case.
  359. SCI_STYLEGETCASE = 2489,
  360. /// Get the character get of the font in a style.
  361. SCI_STYLEGETCHARACTERSET = 2490,
  362. /// Get is a style visible or not.
  363. SCI_STYLEGETVISIBLE = 2491,
  364. /// Get is a style changeable or not (read only).
  365. /// Experimental feature, currently buggy.
  366. SCI_STYLEGETCHANGEABLE = 2492,
  367. /// Get is a style a hotspot or not.
  368. SCI_STYLEGETHOTSPOT = 2493,
  369. /// Set a style to be mixed case, or to force upper or lower case.
  370. SCI_STYLESETCASE = 2060,
  371. SC_FONT_SIZE_MULTIPLIER = 100,
  372. /// Set the size of characters of a style. Size is in points multiplied by 100.
  373. SCI_STYLESETSIZEFRACTIONAL = 2061,
  374. /// Get the size of characters of a style in points multiplied by 100
  375. SCI_STYLEGETSIZEFRACTIONAL = 2062,
  376. SC_WEIGHT_NORMAL = 400,
  377. SC_WEIGHT_SEMIBOLD = 600,
  378. SC_WEIGHT_BOLD = 700,
  379. /// Set the weight of characters of a style.
  380. SCI_STYLESETWEIGHT = 2063,
  381. /// Get the weight of characters of a style.
  382. SCI_STYLEGETWEIGHT = 2064,
  383. /// Set the character set of the font in a style.
  384. SCI_STYLESETCHARACTERSET = 2066,
  385. /// Set a style to be a hotspot or not.
  386. SCI_STYLESETHOTSPOT = 2409,
  387. /// Set the foreground colour of the main and additional selections and whether to use this setting.
  388. SCI_SETSELFORE = 2067,
  389. /// Set the background colour of the main and additional selections and whether to use this setting.
  390. SCI_SETSELBACK = 2068,
  391. /// Get the alpha of the selection.
  392. SCI_GETSELALPHA = 2477,
  393. /// Set the alpha of the selection.
  394. SCI_SETSELALPHA = 2478,
  395. /// Is the selection end of line filled?
  396. SCI_GETSELEOLFILLED = 2479,
  397. /// Set the selection to have its end of line filled or not.
  398. SCI_SETSELEOLFILLED = 2480,
  399. /// Set the foreground colour of the caret.
  400. SCI_SETCARETFORE = 2069,
  401. /// When key+modifier combination km is pressed perform msg.
  402. SCI_ASSIGNCMDKEY = 2070,
  403. /// When key+modifier combination km is pressed do nothing.
  404. SCI_CLEARCMDKEY = 2071,
  405. /// Drop all key mappings.
  406. SCI_CLEARALLCMDKEYS = 2072,
  407. /// Set the styles for a segment of the document.
  408. SCI_SETSTYLINGEX = 2073,
  409. /// Set a style to be visible or not.
  410. SCI_STYLESETVISIBLE = 2074,
  411. /// Get the time in milliseconds that the caret is on and off.
  412. SCI_GETCARETPERIOD = 2075,
  413. /// Get the time in milliseconds that the caret is on and off. 0 = steady on.
  414. SCI_SETCARETPERIOD = 2076,
  415. /// Set the set of characters making up words for when moving or selecting by word.
  416. /// First sets defaults like SetCharsDefault.
  417. SCI_SETWORDCHARS = 2077,
  418. /// Get the set of characters making up words for when moving or selecting by word.
  419. /// Returns the number of characters
  420. SCI_GETWORDCHARS = 2646,
  421. /// Start a sequence of actions that is undone and redone as a unit.
  422. /// May be nested.
  423. SCI_BEGINUNDOACTION = 2078,
  424. /// End a sequence of actions that is undone and redone as a unit.
  425. SCI_ENDUNDOACTION = 2079,
  426. INDIC_PLAIN = 0,
  427. INDIC_SQUIGGLE = 1,
  428. INDIC_TT = 2,
  429. INDIC_DIAGONAL = 3,
  430. INDIC_STRIKE = 4,
  431. INDIC_HIDDEN = 5,
  432. INDIC_BOX = 6,
  433. INDIC_ROUNDBOX = 7,
  434. INDIC_STRAIGHTBOX = 8,
  435. INDIC_DASH = 9,
  436. INDIC_DOTS = 10,
  437. INDIC_SQUIGGLELOW = 11,
  438. INDIC_DOTBOX = 12,
  439. INDIC_SQUIGGLEPIXMAP = 13,
  440. INDIC_COMPOSITIONTHICK = 14,
  441. INDIC_COMPOSITIONTHIN = 15,
  442. INDIC_FULLBOX = 16,
  443. INDIC_TEXTFORE = 17,
  444. INDIC_IME = 32,
  445. INDIC_IME_MAX = 35,
  446. INDIC_MAX = 35,
  447. INDIC_CONTAINER = 8,
  448. INDIC0_MASK = 0x20,
  449. INDIC1_MASK = 0x40,
  450. INDIC2_MASK = 0x80,
  451. INDICS_MASK = 0xE0,
  452. /// Set an indicator to plain, squiggle or TT.
  453. SCI_INDICSETSTYLE = 2080,
  454. /// Retrieve the style of an indicator.
  455. SCI_INDICGETSTYLE = 2081,
  456. /// Set the foreground colour of an indicator.
  457. SCI_INDICSETFORE = 2082,
  458. /// Retrieve the foreground colour of an indicator.
  459. SCI_INDICGETFORE = 2083,
  460. /// Set an indicator to draw under text or over(default).
  461. SCI_INDICSETUNDER = 2510,
  462. /// Retrieve whether indicator drawn under or over text.
  463. SCI_INDICGETUNDER = 2511,
  464. /// Set a hover indicator to plain, squiggle or TT.
  465. SCI_INDICSETHOVERSTYLE = 2680,
  466. /// Retrieve the hover style of an indicator.
  467. SCI_INDICGETHOVERSTYLE = 2681,
  468. /// Set the foreground hover colour of an indicator.
  469. SCI_INDICSETHOVERFORE = 2682,
  470. /// Retrieve the foreground hover colour of an indicator.
  471. SCI_INDICGETHOVERFORE = 2683,
  472. SC_INDICVALUEBIT = 0x1000000,
  473. SC_INDICVALUEMASK = 0xFFFFFF,
  474. SC_INDICFLAG_VALUEFORE = 1,
  475. /// Set the attributes of an indicator.
  476. SCI_INDICSETFLAGS = 2684,
  477. /// Retrieve the attributes of an indicator.
  478. SCI_INDICGETFLAGS = 2685,
  479. /// Set the foreground colour of all whitespace and whether to use this setting.
  480. SCI_SETWHITESPACEFORE = 2084,
  481. /// Set the background colour of all whitespace and whether to use this setting.
  482. SCI_SETWHITESPACEBACK = 2085,
  483. /// Set the size of the dots used to mark space characters.
  484. SCI_SETWHITESPACESIZE = 2086,
  485. /// Get the size of the dots used to mark space characters.
  486. SCI_GETWHITESPACESIZE = 2087,
  487. /// Divide each styling byte into lexical class bits (default: 5) and indicator
  488. /// bits (default: 3). If a lexer requires more than 32 lexical states, then this
  489. /// is used to expand the possible states.
  490. SCI_SETSTYLEBITS = 2090,
  491. /// Retrieve number of bits in style bytes used to hold the lexical state.
  492. SCI_GETSTYLEBITS = 2091,
  493. /// Used to hold extra styling information for each line.
  494. SCI_SETLINESTATE = 2092,
  495. /// Retrieve the extra styling information for a line.
  496. SCI_GETLINESTATE = 2093,
  497. /// Retrieve the last line number that has line state.
  498. SCI_GETMAXLINESTATE = 2094,
  499. /// Is the background of the line containing the caret in a different colour?
  500. SCI_GETCARETLINEVISIBLE = 2095,
  501. /// Display the background of the line containing the caret in a different colour.
  502. SCI_SETCARETLINEVISIBLE = 2096,
  503. /// Get the colour of the background of the line containing the caret.
  504. SCI_GETCARETLINEBACK = 2097,
  505. /// Set the colour of the background of the line containing the caret.
  506. SCI_SETCARETLINEBACK = 2098,
  507. /// Set a style to be changeable or not (read only).
  508. /// Experimental feature, currently buggy.
  509. SCI_STYLESETCHANGEABLE = 2099,
  510. /// Display a auto-completion list.
  511. /// The lenEntered parameter indicates how many characters before
  512. /// the caret should be used to provide context.
  513. SCI_AUTOCSHOW = 2100,
  514. /// Remove the auto-completion list from the screen.
  515. SCI_AUTOCCANCEL = 2101,
  516. /// Is there an auto-completion list visible?
  517. SCI_AUTOCACTIVE = 2102,
  518. /// Retrieve the position of the caret when the auto-completion list was displayed.
  519. SCI_AUTOCPOSSTART = 2103,
  520. /// User has selected an item so remove the list and insert the selection.
  521. SCI_AUTOCCOMPLETE = 2104,
  522. /// Define a set of character that when typed cancel the auto-completion list.
  523. SCI_AUTOCSTOPS = 2105,
  524. /// Change the separator character in the string setting up an auto-completion list.
  525. /// Default is space but can be changed if items contain space.
  526. SCI_AUTOCSETSEPARATOR = 2106,
  527. /// Retrieve the auto-completion list separator character.
  528. SCI_AUTOCGETSEPARATOR = 2107,
  529. /// Select the item in the auto-completion list that starts with a string.
  530. SCI_AUTOCSELECT = 2108,
  531. /// Should the auto-completion list be cancelled if the user backspaces to a
  532. /// position before where the box was created.
  533. SCI_AUTOCSETCANCELATSTART = 2110,
  534. /// Retrieve whether auto-completion cancelled by backspacing before start.
  535. SCI_AUTOCGETCANCELATSTART = 2111,
  536. /// Define a set of characters that when typed will cause the autocompletion to
  537. /// choose the selected item.
  538. SCI_AUTOCSETFILLUPS = 2112,
  539. /// Should a single item auto-completion list automatically choose the item.
  540. SCI_AUTOCSETCHOOSESINGLE = 2113,
  541. /// Retrieve whether a single item auto-completion list automatically choose the item.
  542. SCI_AUTOCGETCHOOSESINGLE = 2114,
  543. /// Set whether case is significant when performing auto-completion searches.
  544. SCI_AUTOCSETIGNORECASE = 2115,
  545. /// Retrieve state of ignore case flag.
  546. SCI_AUTOCGETIGNORECASE = 2116,
  547. /// Display a list of strings and send notification when user chooses one.
  548. SCI_USERLISTSHOW = 2117,
  549. /// Set whether or not autocompletion is hidden automatically when nothing matches.
  550. SCI_AUTOCSETAUTOHIDE = 2118,
  551. /// Retrieve whether or not autocompletion is hidden automatically when nothing matches.
  552. SCI_AUTOCGETAUTOHIDE = 2119,
  553. /// Set whether or not autocompletion deletes any word characters
  554. /// after the inserted text upon completion.
  555. SCI_AUTOCSETDROPRESTOFWORD = 2270,
  556. /// Retrieve whether or not autocompletion deletes any word characters
  557. /// after the inserted text upon completion.
  558. SCI_AUTOCGETDROPRESTOFWORD = 2271,
  559. /// Register an XPM image for use in autocompletion lists.
  560. SCI_REGISTERIMAGE = 2405,
  561. /// Clear all the registered XPM images.
  562. SCI_CLEARREGISTEREDIMAGES = 2408,
  563. /// Retrieve the auto-completion list type-separator character.
  564. SCI_AUTOCGETTYPESEPARATOR = 2285,
  565. /// Change the type-separator character in the string setting up an auto-completion list.
  566. /// Default is '?' but can be changed if items contain '?'.
  567. SCI_AUTOCSETTYPESEPARATOR = 2286,
  568. /// Set the maximum width, in characters, of auto-completion and user lists.
  569. /// Set to 0 to autosize to fit longest item, which is the default.
  570. SCI_AUTOCSETMAXWIDTH = 2208,
  571. /// Get the maximum width, in characters, of auto-completion and user lists.
  572. SCI_AUTOCGETMAXWIDTH = 2209,
  573. /// Set the maximum height, in rows, of auto-completion and user lists.
  574. /// The default is 5 rows.
  575. SCI_AUTOCSETMAXHEIGHT = 2210,
  576. /// Set the maximum height, in rows, of auto-completion and user lists.
  577. SCI_AUTOCGETMAXHEIGHT = 2211,
  578. /// Set the number of spaces used for one level of indentation.
  579. SCI_SETINDENT = 2122,
  580. /// Retrieve indentation size.
  581. SCI_GETINDENT = 2123,
  582. /// Indentation will only use space characters if useTabs is false, otherwise
  583. /// it will use a combination of tabs and spaces.
  584. SCI_SETUSETABS = 2124,
  585. /// Retrieve whether tabs will be used in indentation.
  586. SCI_GETUSETABS = 2125,
  587. /// Change the indentation of a line to a number of columns.
  588. SCI_SETLINEINDENTATION = 2126,
  589. /// Retrieve the number of columns that a line is indented.
  590. SCI_GETLINEINDENTATION = 2127,
  591. /// Retrieve the position before the first non indentation character on a line.
  592. SCI_GETLINEINDENTPOSITION = 2128,
  593. /// Retrieve the column number of a position, taking tab width into account.
  594. SCI_GETCOLUMN = 2129,
  595. /// Count characters between two positions.
  596. SCI_COUNTCHARACTERS = 2633,
  597. /// Show or hide the horizontal scroll bar.
  598. SCI_SETHSCROLLBAR = 2130,
  599. /// Is the horizontal scroll bar visible?
  600. SCI_GETHSCROLLBAR = 2131,
  601. SC_IV_NONE = 0,
  602. SC_IV_REAL = 1,
  603. SC_IV_LOOKFORWARD = 2,
  604. SC_IV_LOOKBOTH = 3,
  605. /// Show or hide indentation guides.
  606. SCI_SETINDENTATIONGUIDES = 2132,
  607. /// Are the indentation guides visible?
  608. SCI_GETINDENTATIONGUIDES = 2133,
  609. /// Set the highlighted indentation guide column.
  610. /// 0 = no highlighted guide.
  611. SCI_SETHIGHLIGHTGUIDE = 2134,
  612. /// Get the highlighted indentation guide column.
  613. SCI_GETHIGHLIGHTGUIDE = 2135,
  614. /// Get the position after the last visible characters on a line.
  615. SCI_GETLINEENDPOSITION = 2136,
  616. /// Get the code page used to interpret the bytes of the document as characters.
  617. SCI_GETCODEPAGE = 2137,
  618. /// Get the foreground colour of the caret.
  619. SCI_GETCARETFORE = 2138,
  620. /// In read-only mode?
  621. SCI_GETREADONLY = 2140,
  622. /// Sets the position of the caret.
  623. SCI_SETCURRENTPOS = 2141,
  624. /// Sets the position that starts the selection - this becomes the anchor.
  625. SCI_SETSELECTIONSTART = 2142,
  626. /// Returns the position at the start of the selection.
  627. SCI_GETSELECTIONSTART = 2143,
  628. /// Sets the position that ends the selection - this becomes the currentPosition.
  629. SCI_SETSELECTIONEND = 2144,
  630. /// Returns the position at the end of the selection.
  631. SCI_GETSELECTIONEND = 2145,
  632. /// Set caret to a position, while removing any existing selection.
  633. SCI_SETEMPTYSELECTION = 2556,
  634. /// Sets the print magnification added to the point size of each style for printing.
  635. SCI_SETPRINTMAGNIFICATION = 2146,
  636. /// Returns the print magnification.
  637. SCI_GETPRINTMAGNIFICATION = 2147,
  638. SC_PRINT_NORMAL = 0,
  639. SC_PRINT_INVERTLIGHT = 1,
  640. SC_PRINT_BLACKONWHITE = 2,
  641. SC_PRINT_COLOURONWHITE = 3,
  642. SC_PRINT_COLOURONWHITEDEFAULTBG = 4,
  643. /// Modify colours when printing for clearer printed text.
  644. SCI_SETPRINTCOLOURMODE = 2148,
  645. /// Returns the print colour mode.
  646. SCI_GETPRINTCOLOURMODE = 2149,
  647. SCFIND_WHOLEWORD = 0x2,
  648. SCFIND_MATCHCASE = 0x4,
  649. SCFIND_WORDSTART = 0x00100000,
  650. SCFIND_REGEXP = 0x00200000,
  651. SCFIND_POSIX = 0x00400000,
  652. SCFIND_CXX11REGEX = 0x00800000,
  653. /// Find some text in the document.
  654. SCI_FINDTEXT = 2150,
  655. /// On Windows, will draw the document into a display context such as a printer.
  656. SCI_FORMATRANGE = 2151,
  657. /// Retrieve the display line at the top of the display.
  658. SCI_GETFIRSTVISIBLELINE = 2152,
  659. /// Retrieve the contents of a line.
  660. /// Returns the length of the line.
  661. SCI_GETLINE = 2153,
  662. /// Returns the number of lines in the document. There is always at least one.
  663. SCI_GETLINECOUNT = 2154,
  664. /// Sets the size in pixels of the left margin.
  665. SCI_SETMARGINLEFT = 2155,
  666. /// Returns the size in pixels of the left margin.
  667. SCI_GETMARGINLEFT = 2156,
  668. /// Sets the size in pixels of the right margin.
  669. SCI_SETMARGINRIGHT = 2157,
  670. /// Returns the size in pixels of the right margin.
  671. SCI_GETMARGINRIGHT = 2158,
  672. /// Is the document different from when it was last saved?
  673. SCI_GETMODIFY = 2159,
  674. /// Select a range of text.
  675. SCI_SETSEL = 2160,
  676. /// Retrieve the selected text.
  677. /// Return the length of the text.
  678. /// Result is NUL-terminated.
  679. SCI_GETSELTEXT = 2161,
  680. /// Retrieve a range of text.
  681. /// Return the length of the text.
  682. SCI_GETTEXTRANGE = 2162,
  683. /// Draw the selection in normal style or with selection highlighted.
  684. SCI_HIDESELECTION = 2163,
  685. /// Retrieve the x value of the point in the window where a position is displayed.
  686. SCI_POINTXFROMPOSITION = 2164,
  687. /// Retrieve the y value of the point in the window where a position is displayed.
  688. SCI_POINTYFROMPOSITION = 2165,
  689. /// Retrieve the line containing a position.
  690. SCI_LINEFROMPOSITION = 2166,
  691. /// Retrieve the position at the start of a line.
  692. SCI_POSITIONFROMLINE = 2167,
  693. /// Scroll horizontally and vertically.
  694. SCI_LINESCROLL = 2168,
  695. /// Ensure the caret is visible.
  696. SCI_SCROLLCARET = 2169,
  697. /// Scroll the argument positions and the range between them into view giving
  698. /// priority to the primary position then the secondary position.
  699. /// This may be used to make a search match visible.
  700. SCI_SCROLLRANGE = 2569,
  701. /// Replace the selected text with the argument text.
  702. SCI_REPLACESEL = 2170,
  703. /// Set to read only or read write.
  704. SCI_SETREADONLY = 2171,
  705. /// Null operation.
  706. SCI_NULL = 2172,
  707. /// Will a paste succeed?
  708. SCI_CANPASTE = 2173,
  709. /// Are there any undoable actions in the undo history?
  710. SCI_CANUNDO = 2174,
  711. /// Delete the undo history.
  712. SCI_EMPTYUNDOBUFFER = 2175,
  713. /// Undo one action in the undo history.
  714. SCI_UNDO = 2176,
  715. /// Cut the selection to the clipboard.
  716. SCI_CUT = 2177,
  717. /// Copy the selection to the clipboard.
  718. SCI_COPY = 2178,
  719. /// Paste the contents of the clipboard into the document replacing the selection.
  720. SCI_PASTE = 2179,
  721. /// Clear the selection.
  722. SCI_CLEAR = 2180,
  723. /// Replace the contents of the document with the argument text.
  724. SCI_SETTEXT = 2181,
  725. /// Retrieve all the text in the document.
  726. /// Returns number of characters retrieved.
  727. /// Result is NUL-terminated.
  728. SCI_GETTEXT = 2182,
  729. /// Retrieve the number of characters in the document.
  730. SCI_GETTEXTLENGTH = 2183,
  731. /// Retrieve a pointer to a function that processes messages for this Scintilla.
  732. SCI_GETDIRECTFUNCTION = 2184,
  733. /// Retrieve a pointer value to use as the first argument when calling
  734. /// the function returned by GetDirectFunction.
  735. SCI_GETDIRECTPOINTER = 2185,
  736. /// Set to overtype (true) or insert mode.
  737. SCI_SETOVERTYPE = 2186,
  738. /// Returns true if overtype mode is active otherwise false is returned.
  739. SCI_GETOVERTYPE = 2187,
  740. /// Set the width of the insert mode caret.
  741. SCI_SETCARETWIDTH = 2188,
  742. /// Returns the width of the insert mode caret.
  743. SCI_GETCARETWIDTH = 2189,
  744. /// Sets the position that starts the target which is used for updating the
  745. /// document without affecting the scroll position.
  746. SCI_SETTARGETSTART = 2190,
  747. /// Get the position that starts the target.
  748. SCI_GETTARGETSTART = 2191,
  749. /// Sets the position that ends the target which is used for updating the
  750. /// document without affecting the scroll position.
  751. SCI_SETTARGETEND = 2192,
  752. /// Get the position that ends the target.
  753. SCI_GETTARGETEND = 2193,
  754. /// Sets both the start and end of the target in one call.
  755. SCI_SETTARGETRANGE = 2686,
  756. /// Retrieve the text in the target.
  757. SCI_GETTARGETTEXT = 2687,
  758. /// Replace the target text with the argument text.
  759. /// Text is counted so it can contain NULs.
  760. /// Returns the length of the replacement text.
  761. SCI_REPLACETARGET = 2194,
  762. /// Replace the target text with the argument text after \d processing.
  763. /// Text is counted so it can contain NULs.
  764. /// Looks for \d where d is between 1 and 9 and replaces these with the strings
  765. /// matched in the last search operation which were surrounded by \( and \).
  766. /// Returns the length of the replacement text including any change
  767. /// caused by processing the \d patterns.
  768. SCI_REPLACETARGETRE = 2195,
  769. /// Search for a counted string in the target and set the target to the found
  770. /// range. Text is counted so it can contain NULs.
  771. /// Returns length of range or -1 for failure in which case target is not moved.
  772. SCI_SEARCHINTARGET = 2197,
  773. /// Set the search flags used by SearchInTarget.
  774. SCI_SETSEARCHFLAGS = 2198,
  775. /// Get the search flags used by SearchInTarget.
  776. SCI_GETSEARCHFLAGS = 2199,
  777. /// Show a call tip containing a definition near position pos.
  778. SCI_CALLTIPSHOW = 2200,
  779. /// Remove the call tip from the screen.
  780. SCI_CALLTIPCANCEL = 2201,
  781. /// Is there an active call tip?
  782. SCI_CALLTIPACTIVE = 2202,
  783. /// Retrieve the position where the caret was before displaying the call tip.
  784. SCI_CALLTIPPOSSTART = 2203,
  785. /// Set the start position in order to change when backspacing removes the calltip.
  786. SCI_CALLTIPSETPOSSTART = 2214,
  787. /// Highlight a segment of the definition.
  788. SCI_CALLTIPSETHLT = 2204,
  789. /// Set the background colour for the call tip.
  790. SCI_CALLTIPSETBACK = 2205,
  791. /// Set the foreground colour for the call tip.
  792. SCI_CALLTIPSETFORE = 2206,
  793. /// Set the foreground colour for the highlighted part of the call tip.
  794. SCI_CALLTIPSETFOREHLT = 2207,
  795. /// Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
  796. SCI_CALLTIPUSESTYLE = 2212,
  797. /// Set position of calltip, above or below text.
  798. SCI_CALLTIPSETPOSITION = 2213,
  799. /// Find the display line of a document line taking hidden lines into account.
  800. SCI_VISIBLEFROMDOCLINE = 2220,
  801. /// Find the document line of a display line taking hidden lines into account.
  802. SCI_DOCLINEFROMVISIBLE = 2221,
  803. /// The number of display lines needed to wrap a document line
  804. SCI_WRAPCOUNT = 2235,
  805. SC_FOLDLEVELBASE = 0x400,
  806. SC_FOLDLEVELWHITEFLAG = 0x1000,
  807. SC_FOLDLEVELHEADERFLAG = 0x2000,
  808. SC_FOLDLEVELNUMBERMASK = 0x0FFF,
  809. /// Set the fold level of a line.
  810. /// This encodes an integer level along with flags indicating whether the
  811. /// line is a header and whether it is effectively white space.
  812. SCI_SETFOLDLEVEL = 2222,
  813. /// Retrieve the fold level of a line.
  814. SCI_GETFOLDLEVEL = 2223,
  815. /// Find the last child line of a header line.
  816. SCI_GETLASTCHILD = 2224,
  817. /// Find the parent line of a child line.
  818. SCI_GETFOLDPARENT = 2225,
  819. /// Make a range of lines visible.
  820. SCI_SHOWLINES = 2226,
  821. /// Make a range of lines invisible.
  822. SCI_HIDELINES = 2227,
  823. /// Is a line visible?
  824. SCI_GETLINEVISIBLE = 2228,
  825. /// Are all lines visible?
  826. SCI_GETALLLINESVISIBLE = 2236,
  827. /// Show the children of a header line.
  828. SCI_SETFOLDEXPANDED = 2229,
  829. /// Is a header line expanded?
  830. SCI_GETFOLDEXPANDED = 2230,
  831. /// Switch a header line between expanded and contracted.
  832. SCI_TOGGLEFOLD = 2231,
  833. SC_FOLDACTION_CONTRACT = 0,
  834. SC_FOLDACTION_EXPAND = 1,
  835. SC_FOLDACTION_TOGGLE = 2,
  836. /// Expand or contract a fold header.
  837. SCI_FOLDLINE = 2237,
  838. /// Expand or contract a fold header and its children.
  839. SCI_FOLDCHILDREN = 2238,
  840. /// Expand a fold header and all children. Use the level argument instead of the line's current level.
  841. SCI_EXPANDCHILDREN = 2239,
  842. /// Expand or contract all fold headers.
  843. SCI_FOLDALL = 2662,
  844. /// Ensure a particular line is visible by expanding any header line hiding it.
  845. SCI_ENSUREVISIBLE = 2232,
  846. SC_AUTOMATICFOLD_SHOW = 0x0001,
  847. SC_AUTOMATICFOLD_CLICK = 0x0002,
  848. SC_AUTOMATICFOLD_CHANGE = 0x0004,
  849. /// Set automatic folding behaviours.
  850. SCI_SETAUTOMATICFOLD = 2663,
  851. /// Get automatic folding behaviours.
  852. SCI_GETAUTOMATICFOLD = 2664,
  853. SC_FOLDFLAG_LINEBEFORE_EXPANDED = 0x0002,
  854. SC_FOLDFLAG_LINEBEFORE_CONTRACTED = 0x0004,
  855. SC_FOLDFLAG_LINEAFTER_EXPANDED = 0x0008,
  856. SC_FOLDFLAG_LINEAFTER_CONTRACTED = 0x0010,
  857. SC_FOLDFLAG_LEVELNUMBERS = 0x0040,
  858. SC_FOLDFLAG_LINESTATE = 0x0080,
  859. /// Set some style options for folding.
  860. SCI_SETFOLDFLAGS = 2233,
  861. /// Ensure a particular line is visible by expanding any header line hiding it.
  862. /// Use the currently set visibility policy to determine which range to display.
  863. SCI_ENSUREVISIBLEENFORCEPOLICY = 2234,
  864. /// Sets whether a tab pressed when caret is within indentation indents.
  865. SCI_SETTABINDENTS = 2260,
  866. /// Does a tab pressed when caret is within indentation indent?
  867. SCI_GETTABINDENTS = 2261,
  868. /// Sets whether a backspace pressed when caret is within indentation unindents.
  869. SCI_SETBACKSPACEUNINDENTS = 2262,
  870. /// Does a backspace pressed when caret is within indentation unindent?
  871. SCI_GETBACKSPACEUNINDENTS = 2263,
  872. SC_TIME_FOREVER = 10000000,
  873. /// Sets the time the mouse must sit still to generate a mouse dwell event.
  874. SCI_SETMOUSEDWELLTIME = 2264,
  875. /// Retrieve the time the mouse must sit still to generate a mouse dwell event.
  876. SCI_GETMOUSEDWELLTIME = 2265,
  877. /// Get position of start of word.
  878. SCI_WORDSTARTPOSITION = 2266,
  879. /// Get position of end of word.
  880. SCI_WORDENDPOSITION = 2267,
  881. SC_WRAP_NONE = 0,
  882. SC_WRAP_WORD = 1,
  883. SC_WRAP_CHAR = 2,
  884. SC_WRAP_WHITESPACE = 3,
  885. /// Sets whether text is word wrapped.
  886. SCI_SETWRAPMODE = 2268,
  887. /// Retrieve whether text is word wrapped.
  888. SCI_GETWRAPMODE = 2269,
  889. SC_WRAPVISUALFLAG_NONE = 0x0000,
  890. SC_WRAPVISUALFLAG_END = 0x0001,
  891. SC_WRAPVISUALFLAG_START = 0x0002,
  892. SC_WRAPVISUALFLAG_MARGIN = 0x0004,
  893. /// Set the display mode of visual flags for wrapped lines.
  894. SCI_SETWRAPVISUALFLAGS = 2460,
  895. /// Retrive the display mode of visual flags for wrapped lines.
  896. SCI_GETWRAPVISUALFLAGS = 2461,
  897. SC_WRAPVISUALFLAGLOC_DEFAULT = 0x0000,
  898. SC_WRAPVISUALFLAGLOC_END_BY_TEXT = 0x0001,
  899. SC_WRAPVISUALFLAGLOC_START_BY_TEXT = 0x0002,
  900. /// Set the location of visual flags for wrapped lines.
  901. SCI_SETWRAPVISUALFLAGSLOCATION = 2462,
  902. /// Retrive the location of visual flags for wrapped lines.
  903. SCI_GETWRAPVISUALFLAGSLOCATION = 2463,
  904. /// Set the start indent for wrapped lines.
  905. SCI_SETWRAPSTARTINDENT = 2464,
  906. /// Retrive the start indent for wrapped lines.
  907. SCI_GETWRAPSTARTINDENT = 2465,
  908. SC_WRAPINDENT_FIXED = 0,
  909. SC_WRAPINDENT_SAME = 1,
  910. SC_WRAPINDENT_INDENT = 2,
  911. /// Sets how wrapped sublines are placed. Default is fixed.
  912. SCI_SETWRAPINDENTMODE = 2472,
  913. /// Retrieve how wrapped sublines are placed. Default is fixed.
  914. SCI_GETWRAPINDENTMODE = 2473,
  915. SC_CACHE_NONE = 0,
  916. SC_CACHE_CARET = 1,
  917. SC_CACHE_PAGE = 2,
  918. SC_CACHE_DOCUMENT = 3,
  919. /// Sets the degree of caching of layout information.
  920. SCI_SETLAYOUTCACHE = 2272,
  921. /// Retrieve the degree of caching of layout information.
  922. SCI_GETLAYOUTCACHE = 2273,
  923. /// Sets the document width assumed for scrolling.
  924. SCI_SETSCROLLWIDTH = 2274,
  925. /// Retrieve the document width assumed for scrolling.
  926. SCI_GETSCROLLWIDTH = 2275,
  927. /// Sets whether the maximum width line displayed is used to set scroll width.
  928. SCI_SETSCROLLWIDTHTRACKING = 2516,
  929. /// Retrieve whether the scroll width tracks wide lines.
  930. SCI_GETSCROLLWIDTHTRACKING = 2517,
  931. /// Measure the pixel width of some text in a particular style.
  932. /// NUL terminated text argument.
  933. /// Does not handle tab or control characters.
  934. SCI_TEXTWIDTH = 2276,
  935. /// Sets the scroll range so that maximum scroll position has
  936. /// the last line at the bottom of the view (default).
  937. /// Setting this to false allows scrolling one page below the last line.
  938. SCI_SETENDATLASTLINE = 2277,
  939. /// Retrieve whether the maximum scroll position has the last
  940. /// line at the bottom of the view.
  941. SCI_GETENDATLASTLINE = 2278,
  942. /// Retrieve the height of a particular line of text in pixels.
  943. SCI_TEXTHEIGHT = 2279,
  944. /// Show or hide the vertical scroll bar.
  945. SCI_SETVSCROLLBAR = 2280,
  946. /// Is the vertical scroll bar visible?
  947. SCI_GETVSCROLLBAR = 2281,
  948. /// Append a string to the end of the document without changing the selection.
  949. SCI_APPENDTEXT = 2282,
  950. /// Is drawing done in two phases with backgrounds drawn before foregrounds?
  951. SCI_GETTWOPHASEDRAW = 2283,
  952. /// In twoPhaseDraw mode, drawing is performed in two phases, first the background
  953. /// and then the foreground. This avoids chopping off characters that overlap the next run.
  954. SCI_SETTWOPHASEDRAW = 2284,
  955. SC_PHASES_ONE = 0,
  956. SC_PHASES_TWO = 1,
  957. SC_PHASES_MULTIPLE = 2,
  958. /// How many phases is drawing done in?
  959. SCI_GETPHASESDRAW = 2673,
  960. /// In one phase draw, text is drawn in a series of rectangular blocks with no overlap.
  961. /// In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally.
  962. /// In multiple phase draw, each element is drawn over the whole drawing area, allowing text
  963. /// to overlap from one line to the next.
  964. SCI_SETPHASESDRAW = 2674,
  965. SC_EFF_QUALITY_MASK = 0xF,
  966. SC_EFF_QUALITY_DEFAULT = 0,
  967. SC_EFF_QUALITY_NON_ANTIALIASED = 1,
  968. SC_EFF_QUALITY_ANTIALIASED = 2,
  969. SC_EFF_QUALITY_LCD_OPTIMIZED = 3,
  970. /// Choose the quality level for text from the FontQuality enumeration.
  971. SCI_SETFONTQUALITY = 2611,
  972. /// Retrieve the quality level for text.
  973. SCI_GETFONTQUALITY = 2612,
  974. /// Scroll so that a display line is at the top of the display.
  975. SCI_SETFIRSTVISIBLELINE = 2613,
  976. SC_MULTIPASTE_ONCE = 0,
  977. SC_MULTIPASTE_EACH = 1,
  978. /// Change the effect of pasting when there are multiple selections.
  979. SCI_SETMULTIPASTE = 2614,
  980. /// Retrieve the effect of pasting when there are multiple selections..
  981. SCI_GETMULTIPASTE = 2615,
  982. /// Retrieve the value of a tag from a regular expression search.
  983. /// Result is NUL-terminated.
  984. SCI_GETTAG = 2616,
  985. /// Make the target range start and end be the same as the selection range start and end.
  986. SCI_TARGETFROMSELECTION = 2287,
  987. /// Join the lines in the target.
  988. SCI_LINESJOIN = 2288,
  989. /// Split the lines in the target into lines that are less wide than pixelWidth
  990. /// where possible.
  991. SCI_LINESSPLIT = 2289,
  992. /// Set the colours used as a chequerboard pattern in the fold margin
  993. SCI_SETFOLDMARGINCOLOUR = 2290,
  994. /// Set the colours used as a chequerboard pattern in the fold margin
  995. SCI_SETFOLDMARGINHICOLOUR = 2291,
  996. /// Move caret down one line.
  997. SCI_LINEDOWN = 2300,
  998. /// Move caret down one line extending selection to new caret position.
  999. SCI_LINEDOWNEXTEND = 2301,
  1000. /// Move caret up one line.
  1001. SCI_LINEUP = 2302,
  1002. /// Move caret up one line extending selection to new caret position.
  1003. SCI_LINEUPEXTEND = 2303,
  1004. /// Move caret left one character.
  1005. SCI_CHARLEFT = 2304,
  1006. /// Move caret left one character extending selection to new caret position.
  1007. SCI_CHARLEFTEXTEND = 2305,
  1008. /// Move caret right one character.
  1009. SCI_CHARRIGHT = 2306,
  1010. /// Move caret right one character extending selection to new caret position.
  1011. SCI_CHARRIGHTEXTEND = 2307,
  1012. /// Move caret left one word.
  1013. SCI_WORDLEFT = 2308,
  1014. /// Move caret left one word extending selection to new caret position.
  1015. SCI_WORDLEFTEXTEND = 2309,
  1016. /// Move caret right one word.
  1017. SCI_WORDRIGHT = 2310,
  1018. /// Move caret right one word extending selection to new caret position.
  1019. SCI_WORDRIGHTEXTEND = 2311,
  1020. /// Move caret to first position on line.
  1021. SCI_HOME = 2312,
  1022. /// Move caret to first position on line extending selection to new caret position.
  1023. SCI_HOMEEXTEND = 2313,
  1024. /// Move caret to last position on line.
  1025. SCI_LINEEND = 2314,
  1026. /// Move caret to last position on line extending selection to new caret position.
  1027. SCI_LINEENDEXTEND = 2315,
  1028. /// Move caret to first position in document.
  1029. SCI_DOCUMENTSTART = 2316,
  1030. /// Move caret to first position in document extending selection to new caret position.
  1031. SCI_DOCUMENTSTARTEXTEND = 2317,
  1032. /// Move caret to last position in document.
  1033. SCI_DOCUMENTEND = 2318,
  1034. /// Move caret to last position in document extending selection to new caret position.
  1035. SCI_DOCUMENTENDEXTEND = 2319,
  1036. /// Move caret one page up.
  1037. SCI_PAGEUP = 2320,
  1038. /// Move caret one page up extending selection to new caret position.
  1039. SCI_PAGEUPEXTEND = 2321,
  1040. /// Move caret one page down.
  1041. SCI_PAGEDOWN = 2322,
  1042. /// Move caret one page down extending selection to new caret position.
  1043. SCI_PAGEDOWNEXTEND = 2323,
  1044. /// Switch from insert to overtype mode or the reverse.
  1045. SCI_EDITTOGGLEOVERTYPE = 2324,
  1046. /// Cancel any modes such as call tip or auto-completion list display.
  1047. SCI_CANCEL = 2325,
  1048. /// Delete the selection or if no selection, the character before the caret.
  1049. SCI_DELETEBACK = 2326,
  1050. /// If selection is empty or all on one line replace the selection with a tab character.
  1051. /// If more than one line selected, indent the lines.
  1052. SCI_TAB = 2327,
  1053. /// Dedent the selected lines.
  1054. SCI_BACKTAB = 2328,
  1055. /// Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
  1056. SCI_NEWLINE = 2329,
  1057. /// Insert a Form Feed character.
  1058. SCI_FORMFEED = 2330,
  1059. /// Move caret to before first visible character on line.
  1060. /// If already there move to first character on line.
  1061. SCI_VCHOME = 2331,
  1062. /// Like VCHome but extending selection to new caret position.
  1063. SCI_VCHOMEEXTEND = 2332,
  1064. /// Magnify the displayed text by increasing the sizes by 1 point.
  1065. SCI_ZOOMIN = 2333,
  1066. /// Make the displayed text smaller by decreasing the sizes by 1 point.
  1067. SCI_ZOOMOUT = 2334,
  1068. /// Delete the word to the left of the caret.
  1069. SCI_DELWORDLEFT = 2335,
  1070. /// Delete the word to the right of the caret.
  1071. SCI_DELWORDRIGHT = 2336,
  1072. /// Delete the word to the right of the caret, but not the trailing non-word characters.
  1073. SCI_DELWORDRIGHTEND = 2518,
  1074. /// Cut the line containing the caret.
  1075. SCI_LINECUT = 2337,
  1076. /// Delete the line containing the caret.
  1077. SCI_LINEDELETE = 2338,
  1078. /// Switch the current line with the previous.
  1079. SCI_LINETRANSPOSE = 2339,
  1080. /// Duplicate the current line.
  1081. SCI_LINEDUPLICATE = 2404,
  1082. /// Transform the selection to lower case.
  1083. SCI_LOWERCASE = 2340,
  1084. /// Transform the selection to upper case.
  1085. SCI_UPPERCASE = 2341,
  1086. /// Scroll the document down, keeping the caret visible.
  1087. SCI_LINESCROLLDOWN = 2342,
  1088. /// Scroll the document up, keeping the caret visible.
  1089. SCI_LINESCROLLUP = 2343,
  1090. /// Delete the selection or if no selection, the character before the caret.
  1091. /// Will not delete the character before at the start of a line.
  1092. SCI_DELETEBACKNOTLINE = 2344,
  1093. /// Move caret to first position on display line.
  1094. SCI_HOMEDISPLAY = 2345,
  1095. /// Move caret to first position on display line extending selection to
  1096. /// new caret position.
  1097. SCI_HOMEDISPLAYEXTEND = 2346,
  1098. /// Move caret to last position on display line.
  1099. SCI_LINEENDDISPLAY = 2347,
  1100. /// Move caret to last position on display line extending selection to new
  1101. /// caret position.
  1102. SCI_LINEENDDISPLAYEXTEND = 2348,
  1103. /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
  1104. /// except they behave differently when word-wrap is enabled:
  1105. /// They go first to the start / end of the display line, like (Home|LineEnd)Display
  1106. /// The difference is that, the cursor is already at the point, it goes on to the start
  1107. /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
  1108. SCI_HOMEWRAP = 2349,
  1109. /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
  1110. /// except they behave differently when word-wrap is enabled:
  1111. /// They go first to the start / end of the display line, like (Home|LineEnd)Display
  1112. /// The difference is that, the cursor is already at the point, it goes on to the start
  1113. /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
  1114. SCI_HOMEWRAPEXTEND = 2450,
  1115. /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
  1116. /// except they behave differently when word-wrap is enabled:
  1117. /// They go first to the start / end of the display line, like (Home|LineEnd)Display
  1118. /// The difference is that, the cursor is already at the point, it goes on to the start
  1119. /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
  1120. SCI_LINEENDWRAP = 2451,
  1121. /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
  1122. /// except they behave differently when word-wrap is enabled:
  1123. /// They go first to the start / end of the display line, like (Home|LineEnd)Display
  1124. /// The difference is that, the cursor is already at the point, it goes on to the start
  1125. /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
  1126. SCI_LINEENDWRAPEXTEND = 2452,
  1127. /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
  1128. /// except they behave differently when word-wrap is enabled:
  1129. /// They go first to the start / end of the display line, like (Home|LineEnd)Display
  1130. /// The difference is that, the cursor is already at the point, it goes on to the start
  1131. /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
  1132. SCI_VCHOMEWRAP = 2453,
  1133. /// These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)?
  1134. /// except they behave differently when word-wrap is enabled:
  1135. /// They go first to the start / end of the display line, like (Home|LineEnd)Display
  1136. /// The difference is that, the cursor is already at the point, it goes on to the start
  1137. /// or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
  1138. SCI_VCHOMEWRAPEXTEND = 2454,
  1139. /// Copy the line containing the caret.
  1140. SCI_LINECOPY = 2455,
  1141. /// Move the caret inside current view if it's not there already.
  1142. SCI_MOVECARETINSIDEVIEW = 2401,
  1143. /// How many characters are on a line, including end of line characters?
  1144. SCI_LINELENGTH = 2350,
  1145. /// Highlight the characters at two positions.
  1146. SCI_BRACEHIGHLIGHT = 2351,
  1147. /// Use specified indicator to highlight matching braces instead of changing their style.
  1148. SCI_BRACEHIGHLIGHTINDICATOR = 2498,
  1149. /// Highlight the character at a position indicating there is no matching brace.
  1150. SCI_BRACEBADLIGHT = 2352,
  1151. /// Use specified indicator to highlight non matching brace instead of changing its style.
  1152. SCI_BRACEBADLIGHTINDICATOR = 2499,
  1153. /// Find the position of a matching brace or INVALID_POSITION if no match.
  1154. SCI_BRACEMATCH = 2353,
  1155. /// Are the end of line characters visible?
  1156. SCI_GETVIEWEOL = 2355,
  1157. /// Make the end of line characters visible or invisible.
  1158. SCI_SETVIEWEOL = 2356,
  1159. /// Retrieve a pointer to the document object.
  1160. SCI_GETDOCPOINTER = 2357,
  1161. /// Change the document object used.
  1162. SCI_SETDOCPOINTER = 2358,
  1163. /// Set which document modification events are sent to the container.
  1164. SCI_SETMODEVENTMASK = 2359,
  1165. EDGE_NONE = 0,
  1166. EDGE_LINE = 1,
  1167. EDGE_BACKGROUND = 2,
  1168. /// Retrieve the column number which text should be kept within.
  1169. SCI_GETEDGECOLUMN = 2360,
  1170. /// Set the column number of the edge.
  1171. /// If text goes past the edge then it is highlighted.
  1172. SCI_SETEDGECOLUMN = 2361,
  1173. /// Retrieve the edge highlight mode.
  1174. SCI_GETEDGEMODE = 2362,
  1175. /// The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
  1176. /// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
  1177. SCI_SETEDGEMODE = 2363,
  1178. /// Retrieve the colour used in edge indication.
  1179. SCI_GETEDGECOLOUR = 2364,
  1180. /// Change the colour used in edge indication.
  1181. SCI_SETEDGECOLOUR = 2365,
  1182. /// Sets the current caret position to be the search anchor.
  1183. SCI_SEARCHANCHOR = 2366,
  1184. /// Find some text starting at the search anchor.
  1185. /// Does not ensure the selection is visible.
  1186. SCI_SEARCHNEXT = 2367,
  1187. /// Find some text starting at the search anchor and moving backwards.
  1188. /// Does not ensure the selection is visible.
  1189. SCI_SEARCHPREV = 2368,
  1190. /// Retrieves the number of lines completely visible.
  1191. SCI_LINESONSCREEN = 2370,
  1192. /// Set whether a pop up menu is displayed automatically when the user presses
  1193. /// the wrong mouse button.
  1194. SCI_USEPOPUP = 2371,
  1195. /// Is the selection rectangular? The alternative is the more common stream selection.
  1196. SCI_SELECTIONISRECTANGLE = 2372,
  1197. /// Set the zoom level. This number of points is added to the size of all fonts.
  1198. /// It may be positive to magnify or negative to reduce.
  1199. SCI_SETZOOM = 2373,
  1200. /// Retrieve the zoom level.
  1201. SCI_GETZOOM = 2374,
  1202. /// Create a new document object.
  1203. /// Starts with reference count of 1 and not selected into editor.
  1204. SCI_CREATEDOCUMENT = 2375,
  1205. /// Extend life of document.
  1206. SCI_ADDREFDOCUMENT = 2376,
  1207. /// Release a reference to the document, deleting document if it fades to black.
  1208. SCI_RELEASEDOCUMENT = 2377,
  1209. /// Get which document modification events are sent to the container.
  1210. SCI_GETMODEVENTMASK = 2378,
  1211. /// Change internal focus flag.
  1212. SCI_SETFOCUS = 2380,
  1213. /// Get internal focus flag.
  1214. SCI_GETFOCUS = 2381,
  1215. SC_STATUS_OK = 0,
  1216. SC_STATUS_FAILURE = 1,
  1217. SC_STATUS_BADALLOC = 2,
  1218. SC_STATUS_WARN_START = 1000,
  1219. SC_STATUS_WARN_REGEX = 1001,
  1220. /// Change error status - 0 = OK.
  1221. SCI_SETSTATUS = 2382,
  1222. /// Get error status.
  1223. SCI_GETSTATUS = 2383,
  1224. /// Set whether the mouse is captured when its button is pressed.
  1225. SCI_SETMOUSEDOWNCAPTURES = 2384,
  1226. /// Get whether mouse gets captured.
  1227. SCI_GETMOUSEDOWNCAPTURES = 2385,
  1228. SC_CURSORNORMAL = 0xFFFFFFFF,
  1229. SC_CURSORARROW = 2,
  1230. SC_CURSORWAIT = 4,
  1231. SC_CURSORREVERSEARROW = 7,
  1232. /// Sets the cursor to one of the SC_CURSOR* values.
  1233. SCI_SETCURSOR = 2386,
  1234. /// Get cursor type.
  1235. SCI_GETCURSOR = 2387,
  1236. /// Change the way control characters are displayed:
  1237. /// If symbol is < 32, keep the drawn way, else, use the given character.
  1238. SCI_SETCONTROLCHARSYMBOL = 2388,
  1239. /// Get the way control characters are displayed.
  1240. SCI_GETCONTROLCHARSYMBOL = 2389,
  1241. /// Move to the previous change in capitalisation.
  1242. SCI_WORDPARTLEFT = 2390,
  1243. /// Move to the previous change in capitalisation extending selection
  1244. /// to new caret position.
  1245. SCI_WORDPARTLEFTEXTEND = 2391,
  1246. /// Move to the change next in capitalisation.
  1247. SCI_WORDPARTRIGHT = 2392,
  1248. /// Move to the next change in capitalisation extending selection
  1249. /// to new caret position.
  1250. SCI_WORDPARTRIGHTEXTEND = 2393,
  1251. VISIBLE_SLOP = 0x01,
  1252. VISIBLE_STRICT = 0x04,
  1253. /// Set the way the display area is determined when a particular line
  1254. /// is to be moved to by Find, FindNext, GotoLine, etc.
  1255. SCI_SETVISIBLEPOLICY = 2394,
  1256. /// Delete back from the current position to the start of the line.
  1257. SCI_DELLINELEFT = 2395,
  1258. /// Delete forwards from the current position to the end of the line.
  1259. SCI_DELLINERIGHT = 2396,
  1260. /// Get and Set the xOffset (ie, horizontal scroll position).
  1261. SCI_SETXOFFSET = 2397,
  1262. /// Get and Set the xOffset (ie, horizontal scroll position).
  1263. SCI_GETXOFFSET = 2398,
  1264. /// Set the last x chosen value to be the caret x position.
  1265. SCI_CHOOSECARETX = 2399,
  1266. /// Set the focus to this Scintilla widget.
  1267. SCI_GRABFOCUS = 2400,
  1268. CARET_SLOP = 0x01,
  1269. CARET_STRICT = 0x04,
  1270. CARET_JUMPS = 0x10,
  1271. CARET_EVEN = 0x08,
  1272. /// Set the way the caret is kept visible when going sideways.
  1273. /// The exclusion zone is given in pixels.
  1274. SCI_SETXCARETPOLICY = 2402,
  1275. /// Set the way the line the caret is on is kept visible.
  1276. /// The exclusion zone is given in lines.
  1277. SCI_SETYCARETPOLICY = 2403,
  1278. /// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
  1279. SCI_SETPRINTWRAPMODE = 2406,
  1280. /// Is printing line wrapped?
  1281. SCI_GETPRINTWRAPMODE = 2407,
  1282. /// Set a fore colour for active hotspots.
  1283. SCI_SETHOTSPOTACTIVEFORE = 2410,
  1284. /// Get the fore colour for active hotspots.
  1285. SCI_GETHOTSPOTACTIVEFORE = 2494,
  1286. /// Set a back colour for active hotspots.
  1287. SCI_SETHOTSPOTACTIVEBACK = 2411,
  1288. /// Get the back colour for active hotspots.
  1289. SCI_GETHOTSPOTACTIVEBACK = 2495,
  1290. /// Enable / Disable underlining active hotspots.
  1291. SCI_SETHOTSPOTACTIVEUNDERLINE = 2412,
  1292. /// Get whether underlining for active hotspots.
  1293. SCI_GETHOTSPOTACTIVEUNDERLINE = 2496,
  1294. /// Limit hotspots to single line so hotspots on two lines don't merge.
  1295. SCI_SETHOTSPOTSINGLELINE = 2421,
  1296. /// Get the HotspotSingleLine property
  1297. SCI_GETHOTSPOTSINGLELINE = 2497,
  1298. /// Move caret between paragraphs (delimited by empty lines).
  1299. SCI_PARADOWN = 2413,
  1300. /// Move caret between paragraphs (delimited by empty lines).
  1301. SCI_PARADOWNEXTEND = 2414,
  1302. /// Move caret between paragraphs (delimited by empty lines).
  1303. SCI_PARAUP = 2415,
  1304. /// Move caret between paragraphs (delimited by empty lines).
  1305. SCI_PARAUPEXTEND = 2416,
  1306. /// Given a valid document position, return the previous position taking code
  1307. /// page into account. Returns 0 if passed 0.
  1308. SCI_POSITIONBEFORE = 2417,
  1309. /// Given a valid document position, return the next position taking code
  1310. /// page into account. Maximum value returned is the last position in the document.
  1311. SCI_POSITIONAFTER = 2418,
  1312. /// Given a valid document position, return a position that differs in a number
  1313. /// of characters. Returned value is always between 0 and last position in document.
  1314. SCI_POSITIONRELATIVE = 2670,
  1315. /// Copy a range of text to the clipboard. Positions are clipped into the document.
  1316. SCI_COPYRANGE = 2419,
  1317. /// Copy argument text to the clipboard.
  1318. SCI_COPYTEXT = 2420,
  1319. SC_SEL_STREAM = 0,
  1320. SC_SEL_RECTANGLE = 1,
  1321. SC_SEL_LINES = 2,
  1322. SC_SEL_THIN = 3,
  1323. /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or
  1324. /// by lines (SC_SEL_LINES).
  1325. SCI_SETSELECTIONMODE = 2422,
  1326. /// Get the mode of the current selection.
  1327. SCI_GETSELECTIONMODE = 2423,
  1328. /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
  1329. SCI_GETLINESELSTARTPOSITION = 2424,
  1330. /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
  1331. SCI_GETLINESELENDPOSITION = 2425,
  1332. /// Move caret down one line, extending rectangular selection to new caret position.
  1333. SCI_LINEDOWNRECTEXTEND = 2426,
  1334. /// Move caret up one line, extending rectangular selection to new caret position.
  1335. SCI_LINEUPRECTEXTEND = 2427,
  1336. /// Move caret left one character, extending rectangular selection to new caret position.
  1337. SCI_CHARLEFTRECTEXTEND = 2428,
  1338. /// Move caret right one character, extending rectangular selection to new caret position.
  1339. SCI_CHARRIGHTRECTEXTEND = 2429,
  1340. /// Move caret to first position on line, extending rectangular selection to new caret position.
  1341. SCI_HOMERECTEXTEND = 2430,
  1342. /// Move caret to before first visible character on line.
  1343. /// If already there move to first character on line.
  1344. /// In either case, extend rectangular selection to new caret position.
  1345. SCI_VCHOMERECTEXTEND = 2431,
  1346. /// Move caret to last position on line, extending rectangular selection to new caret position.
  1347. SCI_LINEENDRECTEXTEND = 2432,
  1348. /// Move caret one page up, extending rectangular selection to new caret position.
  1349. SCI_PAGEUPRECTEXTEND = 2433,
  1350. /// Move caret one page down, extending rectangular selection to new caret position.
  1351. SCI_PAGEDOWNRECTEXTEND = 2434,
  1352. /// Move caret to top of page, or one page up if already at top of page.
  1353. SCI_STUTTEREDPAGEUP = 2435,
  1354. /// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
  1355. SCI_STUTTEREDPAGEUPEXTEND = 2436,
  1356. /// Move caret to bottom of page, or one page down if already at bottom of page.
  1357. SCI_STUTTEREDPAGEDOWN = 2437,
  1358. /// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
  1359. SCI_STUTTEREDPAGEDOWNEXTEND = 2438,
  1360. /// Move caret left one word, position cursor at end of word.
  1361. SCI_WORDLEFTEND = 2439,
  1362. /// Move caret left one word, position cursor at end of word, extending selection to new caret position.
  1363. SCI_WORDLEFTENDEXTEND = 2440,
  1364. /// Move caret right one word, position cursor at end of word.
  1365. SCI_WORDRIGHTEND = 2441,
  1366. /// Move caret right one word, position cursor at end of word, extending selection to new caret position.
  1367. SCI_WORDRIGHTENDEXTEND = 2442,
  1368. /// Set the set of characters making up whitespace for when moving or selecting by word.
  1369. /// Should be called after SetWordChars.
  1370. SCI_SETWHITESPACECHARS = 2443,
  1371. /// Get the set of characters making up whitespace for when moving or selecting by word.
  1372. SCI_GETWHITESPACECHARS = 2647,
  1373. /// Set the set of characters making up punctuation characters
  1374. /// Should be called after SetWordChars.
  1375. SCI_SETPUNCTUATIONCHARS = 2648,
  1376. /// Get the set of characters making up punctuation characters
  1377. SCI_GETPUNCTUATIONCHARS = 2649,
  1378. /// Reset the set of characters for whitespace and word characters to the defaults.
  1379. SCI_SETCHARSDEFAULT = 2444,
  1380. /// Get currently selected item position in the auto-completion list
  1381. SCI_AUTOCGETCURRENT = 2445,
  1382. /// Get currently selected item text in the auto-completion list
  1383. /// Returns the length of the item text
  1384. /// Result is NUL-terminated.
  1385. SCI_AUTOCGETCURRENTTEXT = 2610,
  1386. SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE = 0,
  1387. SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE = 1,
  1388. /// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.
  1389. SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR = 2634,
  1390. /// Get auto-completion case insensitive behaviour.
  1391. SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR = 2635,
  1392. SC_MULTIAUTOC_ONCE = 0,
  1393. SC_MULTIAUTOC_EACH = 1,
  1394. /// Change the effect of autocompleting when there are multiple selections.
  1395. SCI_AUTOCSETMULTI = 2636,
  1396. /// Retrieve the effect of autocompleting when there are multiple selections..
  1397. SCI_AUTOCGETMULTI = 2637,
  1398. SC_ORDER_PRESORTED = 0,
  1399. SC_ORDER_PERFORMSORT = 1,
  1400. SC_ORDER_CUSTOM = 2,
  1401. /// Set the way autocompletion lists are ordered.
  1402. SCI_AUTOCSETORDER = 2660,
  1403. /// Get the way autocompletion lists are ordered.
  1404. SCI_AUTOCGETORDER = 2661,
  1405. /// Enlarge the document to a particular size of text bytes.
  1406. SCI_ALLOCATE = 2446,
  1407. /// Returns the target converted to UTF8.
  1408. /// Return the length in bytes.
  1409. SCI_TARGETASUTF8 = 2447,
  1410. /// Set the length of the utf8 argument for calling EncodedFromUTF8.
  1411. /// Set to -1 and the string will be measured to the first nul.
  1412. SCI_SETLENGTHFORENCODE = 2448,
  1413. /// Translates a UTF8 string into the document encoding.
  1414. /// Return the length of the result in bytes.
  1415. /// On error return 0.
  1416. SCI_ENCODEDFROMUTF8 = 2449,
  1417. /// Find the position of a column on a line taking into account tabs and
  1418. /// multi-byte characters. If beyond end of line, return line end position.
  1419. SCI_FINDCOLUMN = 2456,
  1420. /// Can the caret preferred x position only be changed by explicit movement commands?
  1421. SCI_GETCARETSTICKY = 2457,
  1422. /// Stop the caret preferred x position changing when the user types.
  1423. SCI_SETCARETSTICKY = 2458,
  1424. SC_CARETSTICKY_OFF = 0,
  1425. SC_CARETSTICKY_ON = 1,
  1426. SC_CARETSTICKY_WHITESPACE = 2,
  1427. /// Switch between sticky and non-sticky: meant to be bound to a key.
  1428. SCI_TOGGLECARETSTICKY = 2459,
  1429. /// Enable/Disable convert-on-paste for line endings
  1430. SCI_SETPASTECONVERTENDINGS = 2467,
  1431. /// Get convert-on-paste setting
  1432. SCI_GETPASTECONVERTENDINGS = 2468,
  1433. /// Duplicate the selection. If selection empty duplicate the line containing the caret.
  1434. SCI_SELECTIONDUPLICATE = 2469,
  1435. SC_ALPHA_TRANSPARENT = 0,
  1436. SC_ALPHA_OPAQUE = 255,
  1437. SC_ALPHA_NOALPHA = 256,
  1438. /// Set background alpha of the caret line.
  1439. SCI_SETCARETLINEBACKALPHA = 2470,
  1440. /// Get the background alpha of the caret line.
  1441. SCI_GETCARETLINEBACKALPHA = 2471,
  1442. CARETSTYLE_INVISIBLE = 0,
  1443. CARETSTYLE_LINE = 1,
  1444. CARETSTYLE_BLOCK = 2,
  1445. /// Set the style of the caret to be drawn.
  1446. SCI_SETCARETSTYLE = 2512,
  1447. /// Returns the current style of the caret.
  1448. SCI_GETCARETSTYLE = 2513,
  1449. /// Set the indicator used for IndicatorFillRange and IndicatorClearRange
  1450. SCI_SETINDICATORCURRENT = 2500,
  1451. /// Get the current indicator
  1452. SCI_GETINDICATORCURRENT = 2501,
  1453. /// Set the value used for IndicatorFillRange
  1454. SCI_SETINDICATORVALUE = 2502,
  1455. /// Get the current indicator value
  1456. SCI_GETINDICATORVALUE = 2503,
  1457. /// Turn a indicator on over a range.
  1458. SCI_INDICATORFILLRANGE = 2504,
  1459. /// Turn a indicator off over a range.
  1460. SCI_INDICATORCLEARRANGE = 2505,
  1461. /// Are any indicators present at position?
  1462. SCI_INDICATORALLONFOR = 2506,
  1463. /// What value does a particular indicator have at at a position?
  1464. SCI_INDICATORVALUEAT = 2507,
  1465. /// Where does a particular indicator start?
  1466. SCI_INDICATORSTART = 2508,
  1467. /// Where does a particular indicator end?
  1468. SCI_INDICATOREND = 2509,
  1469. /// Set number of entries in position cache
  1470. SCI_SETPOSITIONCACHE = 2514,
  1471. /// How many entries are allocated to the position cache?
  1472. SCI_GETPOSITIONCACHE = 2515,
  1473. /// Copy the selection, if selection empty copy the line with the caret
  1474. SCI_COPYALLOWLINE = 2519,
  1475. /// Compact the document buffer and return a read-only pointer to the
  1476. /// characters in the document.
  1477. SCI_GETCHARACTERPOINTER = 2520,
  1478. /// Return a read-only pointer to a range of characters in the document.
  1479. /// May move the gap so that the range is contiguous, but will only move up
  1480. /// to rangeLength bytes.
  1481. SCI_GETRANGEPOINTER = 2643,
  1482. /// Return a position which, to avoid performance costs, should not be within
  1483. /// the range of a call to GetRangePointer.
  1484. SCI_GETGAPPOSITION = 2644,
  1485. /// Set the alpha fill colour of the given indicator.
  1486. SCI_INDICSETALPHA = 2523,
  1487. /// Get the alpha fill colour of the given indicator.
  1488. SCI_INDICGETALPHA = 2524,
  1489. /// Set the alpha outline colour of the given indicator.
  1490. SCI_INDICSETOUTLINEALPHA = 2558,
  1491. /// Get the alpha outline colour of the given indicator.
  1492. SCI_INDICGETOUTLINEALPHA = 2559,
  1493. /// Set extra ascent for each line
  1494. SCI_SETEXTRAASCENT = 2525,
  1495. /// Get extra ascent for each line
  1496. SCI_GETEXTRAASCENT = 2526,
  1497. /// Set extra descent for each line
  1498. SCI_SETEXTRADESCENT = 2527,
  1499. /// Get extra descent for each line
  1500. SCI_GETEXTRADESCENT = 2528,
  1501. /// Which symbol was defined for markerNumber with MarkerDefine
  1502. SCI_MARKERSYMBOLDEFINED = 2529,
  1503. /// Set the text in the text margin for a line
  1504. SCI_MARGINSETTEXT = 2530,
  1505. /// Get the text in the text margin for a line
  1506. SCI_MARGINGETTEXT = 2531,
  1507. /// Set the style number for the text margin for a line
  1508. SCI_MARGINSETSTYLE = 2532,
  1509. /// Get the style number for the text margin for a line
  1510. SCI_MARGINGETSTYLE = 2533,
  1511. /// Set the style in the text margin for a line
  1512. SCI_MARGINSETSTYLES = 2534,
  1513. /// Get the styles in the text margin for a line
  1514. SCI_MARGINGETSTYLES = 2535,
  1515. /// Clear the margin text on all lines
  1516. SCI_MARGINTEXTCLEARALL = 2536,
  1517. /// Get the start of the range of style numbers used for margin text
  1518. SCI_MARGINSETSTYLEOFFSET = 2537,
  1519. /// Get the start of the range of style numbers used for margin text
  1520. SCI_MARGINGETSTYLEOFFSET = 2538,
  1521. SC_MARGINOPTION_NONE = 0,
  1522. SC_MARGINOPTION_SUBLINESELECT = 1,
  1523. /// Set the margin options.
  1524. SCI_SETMARGINOPTIONS = 2539,
  1525. /// Get the margin options.
  1526. SCI_GETMARGINOPTIONS = 2557,
  1527. /// Set the annotation text for a line
  1528. SCI_ANNOTATIONSETTEXT = 2540,
  1529. /// Get the annotation text for a line
  1530. SCI_ANNOTATIONGETTEXT = 2541,
  1531. /// Set the style number for the annotations for a line
  1532. SCI_ANNOTATIONSETSTYLE = 2542,
  1533. /// Get the style number for the annotations for a line
  1534. SCI_ANNOTATIONGETSTYLE = 2543,
  1535. /// Set the annotation styles for a line
  1536. SCI_ANNOTATIONSETSTYLES = 2544,
  1537. /// Get the annotation styles for a line
  1538. SCI_ANNOTATIONGETSTYLES = 2545,
  1539. /// Get the number of annotation lines for a line
  1540. SCI_ANNOTATIONGETLINES = 2546,
  1541. /// Clear the annotations from all lines
  1542. SCI_ANNOTATIONCLEARALL = 2547,
  1543. ANNOTATION_HIDDEN = 0,
  1544. ANNOTATION_STANDARD = 1,
  1545. ANNOTATION_BOXED = 2,
  1546. ANNOTATION_INDENTED = 3,
  1547. /// Set the visibility for the annotations for a view
  1548. SCI_ANNOTATIONSETVISIBLE = 2548,
  1549. /// Get the visibility for the annotations for a view
  1550. SCI_ANNOTATIONGETVISIBLE = 2549,
  1551. /// Get the start of the range of style numbers used for annotations
  1552. SCI_ANNOTATIONSETSTYLEOFFSET = 2550,
  1553. /// Get the start of the range of style numbers used for annotations
  1554. SCI_ANNOTATIONGETSTYLEOFFSET = 2551,
  1555. /// Release all extended (>255) style numbers
  1556. SCI_RELEASEALLEXTENDEDSTYLES = 2552,
  1557. /// Allocate some extended (>255) style numbers and return the start of the range
  1558. SCI_ALLOCATEEXTENDEDSTYLES = 2553,
  1559. UNDO_MAY_COALESCE = 1,
  1560. /// Add a container action to the undo stack
  1561. SCI_ADDUNDOACTION = 2560,
  1562. /// Find the position of a character from a point within the window.
  1563. SCI_CHARPOSITIONFROMPOINT = 2561,
  1564. /// Find the position of a character from a point within the window.
  1565. /// Return INVALID_POSITION if not close to text.
  1566. SCI_CHARPOSITIONFROMPOINTCLOSE = 2562,
  1567. /// Set whether switching to rectangular mode while selecting with the mouse is allowed.
  1568. SCI_SETMOUSESELECTIONRECTANGULARSWITCH = 2668,
  1569. /// Whether switching to rectangular mode while selecting with the mouse is allowed.
  1570. SCI_GETMOUSESELECTIONRECTANGULARSWITCH = 2669,
  1571. /// Set whether multiple selections can be made
  1572. SCI_SETMULTIPLESELECTION = 2563,
  1573. /// Whether multiple selections can be made
  1574. SCI_GETMULTIPLESELECTION = 2564,
  1575. /// Set whether typing can be performed into multiple selections
  1576. SCI_SETADDITIONALSELECTIONTYPING = 2565,
  1577. /// Whether typing can be performed into multiple selections
  1578. SCI_GETADDITIONALSELECTIONTYPING = 2566,
  1579. /// Set whether additional carets will blink
  1580. SCI_SETADDITIONALCARETSBLINK = 2567,
  1581. /// Whether additional carets will blink
  1582. SCI_GETADDITIONALCARETSBLINK = 2568,
  1583. /// Set whether additional carets are visible
  1584. SCI_SETADDITIONALCARETSVISIBLE = 2608,
  1585. /// Whether additional carets are visible
  1586. SCI_GETADDITIONALCARETSVISIBLE = 2609,
  1587. /// How many selections are there?
  1588. SCI_GETSELECTIONS = 2570,
  1589. /// Is every selected range empty?
  1590. SCI_GETSELECTIONEMPTY = 2650,
  1591. /// Clear selections to a single empty stream selection
  1592. SCI_CLEARSELECTIONS = 2571,
  1593. /// Set a simple selection
  1594. SCI_SETSELECTION = 2572,
  1595. /// Add a selection
  1596. SCI_ADDSELECTION = 2573,
  1597. /// Drop one selection
  1598. SCI_DROPSELECTIONN = 2671,
  1599. /// Set the main selection
  1600. SCI_SETMAINSELECTION = 2574,
  1601. /// Which selection is the main selection
  1602. SCI_GETMAINSELECTION = 2575,
  1603. /// Which selection is the main selection
  1604. SCI_SETSELECTIONNCARET = 2576,
  1605. /// Which selection is the main selection
  1606. SCI_GETSELECTIONNCARET = 2577,
  1607. /// Which selection is the main selection
  1608. SCI_SETSELECTIONNANCHOR = 2578,
  1609. /// Which selection is the main selection
  1610. SCI_GETSELECTIONNANCHOR = 2579,
  1611. /// Which selection is the main selection
  1612. SCI_SETSELECTIONNCARETVIRTUALSPACE = 2580,
  1613. /// Which selection is the main selection
  1614. SCI_GETSELECTIONNCARETVIRTUALSPACE = 2581,
  1615. /// Which selection is the main selection
  1616. SCI_SETSELECTIONNANCHORVIRTUALSPACE = 2582,
  1617. /// Which selection is the main selection
  1618. SCI_GETSELECTIONNANCHORVIRTUALSPACE = 2583,
  1619. /// Sets the position that starts the selection - this becomes the anchor.
  1620. SCI_SETSELECTIONNSTART = 2584,
  1621. /// Returns the position at the start of the selection.
  1622. SCI_GETSELECTIONNSTART = 2585,
  1623. /// Sets the position that ends the selection - this becomes the currentPosition.
  1624. SCI_SETSELECTIONNEND = 2586,
  1625. /// Returns the position at the end of the selection.
  1626. SCI_GETSELECTIONNEND = 2587,
  1627. /// Returns the position at the end of the selection.
  1628. SCI_SETRECTANGULARSELECTIONCARET = 2588,
  1629. /// Returns the position at the end of the selection.
  1630. SCI_GETRECTANGULARSELECTIONCARET = 2589,
  1631. /// Returns the position at the end of the selection.
  1632. SCI_SETRECTANGULARSELECTIONANCHOR = 2590,
  1633. /// Returns the position at the end of the selection.
  1634. SCI_GETRECTANGULARSELECTIONANCHOR = 2591,
  1635. /// Returns the position at the end of the selection.
  1636. SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2592,
  1637. /// Returns the position at the end of the selection.
  1638. SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2593,
  1639. /// Returns the position at the end of the selection.
  1640. SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2594,
  1641. /// Returns the position at the end of the selection.
  1642. SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2595,
  1643. SCVS_NONE = 0,
  1644. SCVS_RECTANGULARSELECTION = 1,
  1645. SCVS_USERACCESSIBLE = 2,
  1646. /// Returns the position at the end of the selection.
  1647. SCI_SETVIRTUALSPACEOPTIONS = 2596,
  1648. /// Returns the position at the end of the selection.
  1649. SCI_GETVIRTUALSPACEOPTIONS = 2597,
  1650. /// On GTK+, allow selecting the modifier key to use for mouse-based
  1651. /// rectangular selection. Often the window manager requires Alt+Mouse Drag
  1652. /// for moving windows.
  1653. /// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER.
  1654. SCI_SETRECTANGULARSELECTIONMODIFIER = 2598,
  1655. /// Get the modifier key used for rectangular selection.
  1656. SCI_GETRECTANGULARSELECTIONMODIFIER = 2599,
  1657. /// Set the foreground colour of additional selections.
  1658. /// Must have previously called SetSelFore with non-zero first argument for this to have an effect.
  1659. SCI_SETADDITIONALSELFORE = 2600,
  1660. /// Set the background colour of additional selections.
  1661. /// Must have previously called SetSelBack with non-zero first argument for this to have an effect.
  1662. SCI_SETADDITIONALSELBACK = 2601,
  1663. /// Set the alpha of the selection.
  1664. SCI_SETADDITIONALSELALPHA = 2602,
  1665. /// Get the alpha of the selection.
  1666. SCI_GETADDITIONALSELALPHA = 2603,
  1667. /// Set the foreground colour of additional carets.
  1668. SCI_SETADDITIONALCARETFORE = 2604,
  1669. /// Get the foreground colour of additional carets.
  1670. SCI_GETADDITIONALCARETFORE = 2605,
  1671. /// Set the main selection to the next selection.
  1672. SCI_ROTATESELECTION = 2606,
  1673. /// Swap that caret and anchor of the main selection.
  1674. SCI_SWAPMAINANCHORCARET = 2607,
  1675. /// Indicate that the internal state of a lexer has changed over a range and therefore
  1676. /// there may be a need to redraw.
  1677. SCI_CHANGELEXERSTATE = 2617,
  1678. /// Find the next line at or after lineStart that is a contracted fold header line.
  1679. /// Return -1 when no more lines.
  1680. SCI_CONTRACTEDFOLDNEXT = 2618,
  1681. /// Centre current line in window.
  1682. SCI_VERTICALCENTRECARET = 2619,
  1683. /// Move the selected lines up one line, shifting the line above after the selection
  1684. SCI_MOVESELECTEDLINESUP = 2620,
  1685. /// Move the selected lines down one line, shifting the line below before the selection
  1686. SCI_MOVESELECTEDLINESDOWN = 2621,
  1687. /// Set the identifier reported as IdFrom in notification messages.
  1688. SCI_SETIDENTIFIER = 2622,
  1689. /// Get the identifier.
  1690. SCI_GETIDENTIFIER = 2623,
  1691. /// Set the width for future RGBA image data.
  1692. SCI_RGBAIMAGESETWIDTH = 2624,
  1693. /// Set the height for future RGBA image data.
  1694. SCI_RGBAIMAGESETHEIGHT = 2625,
  1695. /// Set the scale factor in percent for future RGBA image data.
  1696. SCI_RGBAIMAGESETSCALE = 2651,
  1697. /// Define a marker from RGBA data.
  1698. /// It has the width and height from RGBAImageSetWidth/Height
  1699. SCI_MARKERDEFINERGBAIMAGE = 2626,
  1700. /// Register an RGBA image for use in autocompletion lists.
  1701. /// It has the width and height from RGBAImageSetWidth/Height
  1702. SCI_REGISTERRGBAIMAGE = 2627,
  1703. /// Scroll to start of document.
  1704. SCI_SCROLLTOSTART = 2628,
  1705. /// Scroll to end of document.
  1706. SCI_SCROLLTOEND = 2629,
  1707. SC_TECHNOLOGY_DEFAULT = 0,
  1708. SC_TECHNOLOGY_DIRECTWRITE = 1,
  1709. SC_TECHNOLOGY_DIRECTWRITERETAIN = 2,
  1710. SC_TECHNOLOGY_DIRECTWRITEDC = 3,
  1711. /// Set the technology used.
  1712. SCI_SETTECHNOLOGY = 2630,
  1713. /// Get the tech.
  1714. SCI_GETTECHNOLOGY = 2631,
  1715. /// Create an ILoader*.
  1716. SCI_CREATELOADER = 2632,
  1717. /// On OS X, show a find indicator.
  1718. SCI_FINDINDICATORSHOW = 2640,
  1719. /// On OS X, flash a find indicator, then fade out.
  1720. SCI_FINDINDICATORFLASH = 2641,
  1721. /// On OS X, hide the find indicator.
  1722. SCI_FINDINDICATORHIDE = 2642,
  1723. /// Move caret to before first visible character on display line.
  1724. /// If already there move to first character on display line.
  1725. SCI_VCHOMEDISPLAY = 2652,
  1726. /// Like VCHomeDisplay but extending selection to new caret position.
  1727. SCI_VCHOMEDISPLAYEXTEND = 2653,
  1728. /// Is the caret line always visible?
  1729. SCI_GETCARETLINEVISIBLEALWAYS = 2654,
  1730. /// Sets the caret line to always visible.
  1731. SCI_SETCARETLINEVISIBLEALWAYS = 2655,
  1732. SC_LINE_END_TYPE_DEFAULT = 0,
  1733. SC_LINE_END_TYPE_UNICODE = 1,
  1734. /// Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.
  1735. SCI_SETLINEENDTYPESALLOWED = 2656,
  1736. /// Get the line end types currently allowed.
  1737. SCI_GETLINEENDTYPESALLOWED = 2657,
  1738. /// Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.
  1739. SCI_GETLINEENDTYPESACTIVE = 2658,
  1740. /// Set the way a character is drawn.
  1741. SCI_SETREPRESENTATION = 2665,
  1742. /// Set the way a character is drawn.
  1743. /// Result is NUL-terminated.
  1744. SCI_GETREPRESENTATION = 2666,
  1745. /// Remove a character representation.
  1746. SCI_CLEARREPRESENTATION = 2667,
  1747. /// Start notifying the container of all key presses and commands.
  1748. SCI_STARTRECORD = 3001,
  1749. /// Stop notifying the container of all key presses and commands.
  1750. SCI_STOPRECORD = 3002,
  1751. /// Set the lexing language of the document.
  1752. SCI_SETLEXER = 4001,
  1753. /// Retrieve the lexing language of the document.
  1754. SCI_GETLEXER = 4002,
  1755. /// Colourise a segment of the document using the current lexing language.
  1756. SCI_COLOURISE = 4003,
  1757. /// Set up a value that may be used by a lexer for some optional feature.
  1758. SCI_SETPROPERTY = 4004,
  1759. KEYWORDSET_MAX = 8,
  1760. /// Set up the key words used by the lexer.
  1761. SCI_SETKEYWORDS = 4005,
  1762. /// Set the lexing language of the document based on string name.
  1763. SCI_SETLEXERLANGUAGE = 4006,
  1764. /// Load a lexer library (dll / so).
  1765. SCI_LOADLEXERLIBRARY = 4007,
  1766. /// Retrieve a "property" value previously set with SetProperty.
  1767. /// Result is NUL-terminated.
  1768. SCI_GETPROPERTY = 4008,
  1769. /// Retrieve a "property" value previously set with SetProperty,
  1770. /// with "$()" variable replacement on returned buffer.
  1771. /// Result is NUL-terminated.
  1772. SCI_GETPROPERTYEXPANDED = 4009,
  1773. /// Retrieve a "property" value previously set with SetProperty,
  1774. /// interpreted as an int AFTER any "$()" variable replacement.
  1775. SCI_GETPROPERTYINT = 4010,
  1776. /// Retrieve the number of bits the current lexer needs for styling.
  1777. SCI_GETSTYLEBITSNEEDED = 4011,
  1778. /// Retrieve the name of the lexer.
  1779. /// Return the length of the text.
  1780. /// Result is NUL-terminated.
  1781. SCI_GETLEXERLANGUAGE = 4012,
  1782. /// For private communication between an application and a known lexer.
  1783. SCI_PRIVATELEXERCALL = 4013,
  1784. /// Retrieve a '\n' separated list of properties understood by the current lexer.
  1785. /// Result is NUL-terminated.
  1786. SCI_PROPERTYNAMES = 4014,
  1787. SC_TYPE_BOOLEAN = 0,
  1788. SC_TYPE_INTEGER = 1,
  1789. SC_TYPE_STRING = 2,
  1790. /// Retrieve the type of a property.
  1791. SCI_PROPERTYTYPE = 4015,
  1792. /// Describe a property.
  1793. /// Result is NUL-terminated.
  1794. SCI_DESCRIBEPROPERTY = 4016,
  1795. /// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
  1796. /// Result is NUL-terminated.
  1797. SCI_DESCRIBEKEYWORDSETS = 4017,
  1798. /// Bit set of LineEndType enumertion for which line ends beyond the standard
  1799. /// LF, CR, and CRLF are supported by the lexer.
  1800. SCI_GETLINEENDTYPESSUPPORTED = 4018,
  1801. /// Allocate a set of sub styles for a particular base style, returning start of range
  1802. SCI_ALLOCATESUBSTYLES = 4020,
  1803. /// The starting style number for the sub styles associated with a base style
  1804. SCI_GETSUBSTYLESSTART = 4021,
  1805. /// The number of sub styles associated with a base style
  1806. SCI_GETSUBSTYLESLENGTH = 4022,
  1807. /// For a sub style, return the base style, else return the argument.
  1808. SCI_GETSTYLEFROMSUBSTYLE = 4027,
  1809. /// For a secondary style, return the primary style, else return the argument.
  1810. SCI_GETPRIMARYSTYLEFROMSTYLE = 4028,
  1811. /// Free allocated sub styles
  1812. SCI_FREESUBSTYLES = 4023,
  1813. /// Set the identifiers that are shown in a particular style
  1814. SCI_SETIDENTIFIERS = 4024,
  1815. /// Where styles are duplicated by a feature such as active/inactive code
  1816. /// return the distance between the two types.
  1817. SCI_DISTANCETOSECONDARYSTYLES = 4025,
  1818. /// Get the set of base styles that can be extended with sub styles
  1819. /// Result is NUL-terminated.
  1820. SCI_GETSUBSTYLEBASES = 4026,
  1821. SC_MOD_INSERTTEXT = 0x1,
  1822. SC_MOD_DELETETEXT = 0x2,
  1823. SC_MOD_CHANGESTYLE = 0x4,
  1824. SC_MOD_CHANGEFOLD = 0x8,
  1825. SC_PERFORMED_USER = 0x10,
  1826. SC_PERFORMED_UNDO = 0x20,
  1827. SC_PERFORMED_REDO = 0x40,
  1828. SC_MULTISTEPUNDOREDO = 0x80,
  1829. SC_LASTSTEPINUNDOREDO = 0x100,
  1830. SC_MOD_CHANGEMARKER = 0x200,
  1831. SC_MOD_BEFOREINSERT = 0x400,
  1832. SC_MOD_BEFOREDELETE = 0x800,
  1833. SC_MULTILINEUNDOREDO = 0x1000,
  1834. SC_STARTACTION = 0x2000,
  1835. SC_MOD_CHANGEINDICATOR = 0x4000,
  1836. SC_MOD_CHANGELINESTATE = 0x8000,
  1837. SC_MOD_CHANGEMARGIN = 0x10000,
  1838. SC_MOD_CHANGEANNOTATION = 0x20000,
  1839. SC_MOD_CONTAINER = 0x40000,
  1840. SC_MOD_LEXERSTATE = 0x80000,
  1841. SC_MOD_INSERTCHECK = 0x100000,
  1842. SC_MOD_CHANGETABSTOPS = 0x200000,
  1843. SC_MODEVENTMASKALL = 0x3FFFFF,
  1844. SC_UPDATE_CONTENT = 0x1,
  1845. SC_UPDATE_SELECTION = 0x2,
  1846. SC_UPDATE_V_SCROLL = 0x4,
  1847. SC_UPDATE_H_SCROLL = 0x8,
  1848. SCEN_CHANGE = 768,
  1849. SCEN_SETFOCUS = 512,
  1850. SCEN_KILLFOCUS = 256,
  1851. SCK_DOWN = 300,
  1852. SCK_UP = 301,
  1853. SCK_LEFT = 302,
  1854. SCK_RIGHT = 303,
  1855. SCK_HOME = 304,
  1856. SCK_END = 305,
  1857. SCK_PRIOR = 306,
  1858. SCK_NEXT = 307,
  1859. SCK_DELETE = 308,
  1860. SCK_INSERT = 309,
  1861. SCK_ESCAPE = 7,
  1862. SCK_BACK = 8,
  1863. SCK_TAB = 9,
  1864. SCK_RETURN = 13,
  1865. SCK_ADD = 310,
  1866. SCK_SUBTRACT = 311,
  1867. SCK_DIVIDE = 312,
  1868. SCK_WIN = 313,
  1869. SCK_RWIN = 314,
  1870. SCK_MENU = 315,
  1871. SCMOD_NORM = 0,
  1872. SCMOD_SHIFT = 1,
  1873. SCMOD_CTRL = 2,
  1874. SCMOD_ALT = 4,
  1875. SCMOD_SUPER = 8,
  1876. SCMOD_META = 16,
  1877. /// Events
  1878. SCN_STYLENEEDED = 2000,
  1879. /// Events
  1880. SCN_CHARADDED = 2001,
  1881. /// Events
  1882. SCN_SAVEPOINTREACHED = 2002,
  1883. /// Events
  1884. SCN_SAVEPOINTLEFT = 2003,
  1885. /// Events
  1886. SCN_MODIFYATTEMPTRO = 2004,
  1887. /// GTK+ Specific to work around focus and accelerator problems:
  1888. SCN_KEY = 2005,
  1889. /// GTK+ Specific to work around focus and accelerator problems:
  1890. SCN_DOUBLECLICK = 2006,
  1891. /// GTK+ Specific to work around focus and accelerator problems:
  1892. SCN_UPDATEUI = 2007,
  1893. /// GTK+ Specific to work around focus and accelerator problems:
  1894. SCN_MODIFIED = 2008,
  1895. /// GTK+ Specific to work around focus and accelerator problems:
  1896. SCN_MACRORECORD = 2009,
  1897. /// GTK+ Specific to work around focus and accelerator problems:
  1898. SCN_MARGINCLICK = 2010,
  1899. /// GTK+ Specific to work around focus and accelerator problems:
  1900. SCN_NEEDSHOWN = 2011,
  1901. /// GTK+ Specific to work around focus and accelerator problems:
  1902. SCN_PAINTED = 2013,
  1903. /// GTK+ Specific to work around focus and accelerator problems:
  1904. SCN_USERLISTSELECTION = 2014,
  1905. /// GTK+ Specific to work around focus and accelerator problems:
  1906. SCN_URIDROPPED = 2015,
  1907. /// GTK+ Specific to work around focus and accelerator problems:
  1908. SCN_DWELLSTART = 2016,
  1909. /// GTK+ Specific to work around focus and accelerator problems:
  1910. SCN_DWELLEND = 2017,
  1911. /// GTK+ Specific to work around focus and accelerator problems:
  1912. SCN_ZOOM = 2018,
  1913. /// GTK+ Specific to work around focus and accelerator problems:
  1914. SCN_HOTSPOTCLICK = 2019,
  1915. /// GTK+ Specific to work around focus and accelerator problems:
  1916. SCN_HOTSPOTDOUBLECLICK = 2020,
  1917. /// GTK+ Specific to work around focus and accelerator problems:
  1918. SCN_CALLTIPCLICK = 2021,
  1919. /// GTK+ Specific to work around focus and accelerator problems:
  1920. SCN_AUTOCSELECTION = 2022,
  1921. /// GTK+ Specific to work around focus and accelerator problems:
  1922. SCN_INDICATORCLICK = 2023,
  1923. /// GTK+ Specific to work around focus and accelerator problems:
  1924. SCN_INDICATORRELEASE = 2024,
  1925. /// GTK+ Specific to work around focus and accelerator problems:
  1926. SCN_AUTOCCANCELLED = 2025,
  1927. /// GTK+ Specific to work around focus and accelerator problems:
  1928. SCN_AUTOCCHARDELETED = 2026,
  1929. /// GTK+ Specific to work around focus and accelerator problems:
  1930. SCN_HOTSPOTRELEASECLICK = 2027,
  1931. /// GTK+ Specific to work around focus and accelerator problems:
  1932. SCN_FOCUSIN = 2028,
  1933. /// GTK+ Specific to work around focus and accelerator problems:
  1934. SCN_FOCUSOUT = 2029,
  1935. SC_CP_DBCS = 1,
  1936. /// Deprecated in 2.30
  1937. /// In palette mode?
  1938. SCI_GETUSEPALETTE = 2139,
  1939. /// In palette mode, Scintilla uses the environment's palette calls to display
  1940. /// more colours. This may lead to ugly displays.
  1941. SCI_SETUSEPALETTE = 2039,
  1942. /// Deprecated in 3.5.5
  1943. /// Always interpret keyboard input as Unicode
  1944. SCI_SETKEYSUNICODE = 2521,
  1945. /// Are keys always interpreted as Unicode?
  1946. SCI_GETKEYSUNICODE = 2522,
  1947. /* --Autogenerated -- end of section automatically generated from Scintilla.iface */
  1948. SC_SEARCHRESULT_LINEBUFFERMAXLENGTH = 1024
  1949. }
  1950. public class TextToFind : IDisposable
  1951. {
  1952. Sci_TextToFind _sciTextToFind;
  1953. IntPtr _ptrSciTextToFind;
  1954. bool _disposed = false;
  1955. /// <summary>
  1956. /// text to find
  1957. /// </summary>
  1958. /// <param name="chrRange">range to search</param>
  1959. /// <param name="searchText">the search pattern</param>
  1960. public TextToFind(CharacterRange chrRange, string searchText)
  1961. {
  1962. _sciTextToFind.chrg = chrRange;
  1963. _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(searchText);
  1964. }
  1965. /// <summary>
  1966. /// text to find
  1967. /// </summary>
  1968. /// <param name="cpmin">range to search</param>
  1969. /// <param name="cpmax">range to search</param>
  1970. /// <param name="searchText">the search pattern</param>
  1971. public TextToFind(int cpmin, int cpmax, string searchText)
  1972. {
  1973. _sciTextToFind.chrg.cpMin = cpmin;
  1974. _sciTextToFind.chrg.cpMax = cpmax;
  1975. _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(searchText);
  1976. }
  1977. [StructLayout(LayoutKind.Sequential)]
  1978. struct Sci_TextToFind
  1979. {
  1980. public CharacterRange chrg;
  1981. public IntPtr lpstrText;
  1982. public CharacterRange chrgText;
  1983. }
  1984. public IntPtr NativePointer { get { _initNativeStruct(); return _ptrSciTextToFind; } }
  1985. public string lpstrText { set { _freeNativeString(); _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(value); } }
  1986. public CharacterRange chrg { get { _readNativeStruct(); return _sciTextToFind.chrg; } set { _sciTextToFind.chrg = value; _initNativeStruct(); } }
  1987. public CharacterRange chrgText { get { _readNativeStruct(); return _sciTextToFind.chrgText; } }
  1988. void _initNativeStruct()
  1989. {
  1990. if (_ptrSciTextToFind == IntPtr.Zero)
  1991. _ptrSciTextToFind = Marshal.AllocHGlobal(Marshal.SizeOf(_sciTextToFind));
  1992. Marshal.StructureToPtr(_sciTextToFind, _ptrSciTextToFind, false);
  1993. }
  1994. void _readNativeStruct()
  1995. {
  1996. if (_ptrSciTextToFind != IntPtr.Zero)
  1997. _sciTextToFind = (Sci_TextToFind)Marshal.PtrToStructure(_ptrSciTextToFind, typeof(Sci_TextToFind));
  1998. }
  1999. void _freeNativeString()
  2000. {
  2001. if (_sciTextToFind.lpstrText != IntPtr.Zero) Marshal.FreeHGlobal(_sciTextToFind.lpstrText);
  2002. }
  2003. public void Dispose()
  2004. {
  2005. if (!_disposed)
  2006. {
  2007. _freeNativeString();
  2008. if (_ptrSciTextToFind != IntPtr.Zero) Marshal.FreeHGlobal(_ptrSciTextToFind);
  2009. _disposed = true;
  2010. }
  2011. }
  2012. ~TextToFind()
  2013. {
  2014. Dispose();
  2015. }
  2016. }
  2017. }