
INTERNAL FUNCTIONS - Default lexer functions. ScintillaSendMessage(id, #SCI_SETMARGINWIDTHN, #GOSCI_MARGINLINENUMBERS, t1) T1 = ScintillaSendMessage(id, #SCI_TEXTWIDTH, #STYLE_LINENUMBER, utf8Buffer) + *this\lineNumberAutoSizePadding + 10 Fill a UTF-8 buffer with the appropriate number of '9' 's. NumLines = ScintillaSendMessage(id, #SCI_GETLINECOUNT) If *this And *this\flags & #GOSCI_AUTOSIZELINENUMBERSMARGIN

Protected *this._GoScintilla, numLines, numChars, t1, utf8Buffer Procedure GOSCI_AutosizeLineNumberMarginXXX(id) The following internal function adjusts the line number margin in the case that the #GOSCI_AUTOSIZELINENUMBERSMARGIN creation flag was set.

The following structure is used to deal with call-tips.ĭeclare.i GOSCI_IsSeparatorXXX(*this._GoScintilla, symbol.a, *keyword.INTEGER)ĭeclare.i GOSCI_GetKeywordInfo(id, keyWord$)ĭeclare.i GOSCI_StyleNextSymbolXXX(*this._GoScintilla, *bytePtr.ASCII, numBytesRemaining, blnDoNotApplyStyle=#False, *keywordBuffer.INTEGER=0, *PtrIsWhiteSpace.INTEGER=0)ĭeclare GOSCI_SetStyleFont(id, styleIndex, fontName$, fontSize=-1, fontStyle=-1)ĭeclare GOSCI_SetState(id, stateType, value=0)
#Purebasic select case code
*bytePointer Used for left delimiters (separators).ĬodeCompletionChars.i Number of characters required to instigate code completion. PreviouslyRecordedStyle.i Used for left delimiters (separators). The following structure holds information (such as syntax highlighting info) on individual Scintilla controls.īlnLineCodeFoldOption.i 0 = no code folding, 1 = open fold, 2 = close fold. Prototype GOSCI_proto_Callback(id, *scinotify.SCNotification) #GOSCI_NUMNESTEDCALLTIPS = 100 Gives the upper bound of an array of keyword pointers.ĬompilerIf #PB_Compiler_OS = #PB_OS_Linux Used to separate the delimiter constants from the folding ones. XIncludeFile "GoScintilla_HeaderFile.pbi" If you wish to use additional markers then use numbers 1 to 31 with one of the user margins : #GOSCI_MARGINUSER1 or #GOSCI_MARGINUSER2. viii) Margin #GOSCI_MARGINNONFOLDINGSYMBOLS and marker index 0 is used for bookmarks. different lexical entities making up the line. If using your own function to style individual lines then you will need to use certain Scintilla functions to style the
#Purebasic select case how to
See the default function for details on how to construct vii) Use the GOSCI_SetLineStylingFunction() function to use your own lexer/styler. Unicode characters can appear in comments and literal strings only. vi) All 'keywords' (used by the syntax lexer) must contain only Ascii characters. Use GOSCI_Get/GOSCI_SetUseData() instead. v) Do not use Get/SetGadgetData() with Scintilla gadgets created through this library. iv) This uses the #SC_CP_UTF8 (UTF-8) code-page. iii) Individual Scintilla gadgets created with this library should not be accessed by multiple-threads at the same time. ii) Uses Purebasic's Scintilla library, which, under Windows, requires initialising with InitScintilla(). i) This helper-library allows easy access to syntax highlighting, code-completion etc.

* Platforms: All (though code completion and call-tips probably will not work on MacOSX). * Originally created with Purebasic 4.61 for Windows. * Thanks to Tenaja for making the adjustments for version 2.5. * Thanks also to Peyman for examples on implementing code-completion and call-tips. * Thanks to ts-soft for his ScintillaHelper library upon which this is, in some part, based. GoScintilla 3 is maintained by Tristano Ajmone on GitHub:
#Purebasic select case license
Released under the *WTFPL (Do What the Fuck You Want to Public License) license terms:

Minimum version of Purebasic required: 5.10 CompilerIf Defined(INCLUDE_GOSCINTILLA, #PB_Constant)=0
