Color text in control ... scintilla or something else !
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Color text in control ... scintilla or something else !
Hello,
I want your opinions about the best practice for coloring text in a control for viewing source code.
i saw some older posts in this forum about scintilla and gtkviewsource control...
Notice that i am a beginner and i found difficult the scintilla and gtk gui programming...
My favorite gui lib is window9.
Are there any way to use a color text in a textarea control with window9 ?
Are there any other way than window9 ?
Thanks Dim !
I want your opinions about the best practice for coloring text in a control for viewing source code.
i saw some older posts in this forum about scintilla and gtkviewsource control...
Notice that i am a beginner and i found difficult the scintilla and gtk gui programming...
My favorite gui lib is window9.
Are there any way to use a color text in a textarea control with window9 ?
Are there any other way than window9 ?
Thanks Dim !
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
Hello, with the help of VANYA, SARG, and chatGPT i learn the Lexilla and Scintilla api to create a test-highlight control in win64.
So far my main.bas code is:
This code works fine for style 0 but not for comments and keywords
Can anybody try it and debug-help ?
I provide the whole project here
https://www.mediafire.com/file/5b2u1mpc ... 1.zip/file
So far my main.bas code is:
Code: Select all
#include "windows.bi"
#include "scintilla.bi"
#include "scilexer.bi"
' Declare handles for Scintilla control and Lexilla DLL
Dim Shared As HWND hwndScintilla
Dim Shared As Any Ptr hLexilla
Dim Shared As Any Ptr hScintilla
Dim Shared As LRESULT result
' Declare function pointers for Lexilla functions
Dim As Function(ByVal name As ZString Ptr) As Any Ptr CreateLexer
' Window procedure to handle window messages
Function WindowProc(hWnd As HWND, msg As UINT, wParam As WPARAM, lParam As LPARAM) As LRESULT
Select Case msg
Case WM_CREATE
' Create Scintilla control within the window
hwndScintilla = CreateWindowEx(0, "Scintilla", "", _
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP, _
0, 0, 800, 600, _
hWnd, 0, GetModuleHandle(0), 0)
' Check if the Scintilla control was created successfully
If hwndScintilla = 0 Then
MessageBox(hWnd, "Failed to create Scintilla control.", "Error", MB_OK Or MB_ICONERROR)
Return -1
End If
' Set the lexer for FreeBASIC
SendMessage(hwndScintilla, SCI_SETLEXER, SCLEX_FREEBASIC, 0)
SendMessage(hwndScintilla, SCI_STYLECLEARALL, 0, 0)
Print "Cleared all styles."
''''''''''''''''''''''' FIXME '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Set style for comments (verify if style 1 is correct for comments)
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_COMMENT, RGB(0, 128, 0)) ' Green comments
Print "Set comment style color."
' Set style for keywords (verify if style 3 is correct for keywords)
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD, RGB(0, 0, 255)) ' Blue keywords
Print "Set keyword style color."
''''''''''''''''''''''' FIXME '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Set codepage
SendMessage(hwndScintilla, SCI_SETCODEPAGE, SC_CP_UTF8, 0)
' Set the initial text in Scintilla
Dim As String sampleCode = !"' Example FreeBASIC code\n\nPrint \"Hello, FreeBASIC!\"\nFor i = 1 To 10\n Print i\nNext i\n"
Dim As ZString Ptr samplePtr = StrPtr(sampleCode)
result = SendMessage(hwndScintilla, SCI_SETTEXT, 0, Cast(LPARAM, samplePtr))
' Debug print to check result of setting text
If result = 0 Then
Print "Text set successfully."
Else
Print "Failed to set text."
End If
' Force initial highlighting
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
Case WM_SIZE
' Resize the Scintilla control when the window resizes
MoveWindow(hwndScintilla, 0, 0, LoWord(lParam), HiWord(lParam), TRUE)
Case WM_NOTIFY
' Handle Scintilla notifications
Dim As NMHDR Ptr nmhdr = Cast(NMHDR Ptr, lParam)
If nmhdr->hwndFrom = hwndScintilla AndAlso nmhdr->code = SCN_MODIFIED Then
' Refresh highlighting when text is modified
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
Print "WM_NOTIFY"
End If
Case WM_CLOSE
' Clean up and exit the application
PostQuitMessage(0)
Return 0
End Select
UpdateWindow(hwndScintilla) ' Repaint the window
Return DefWindowProc(hWnd, msg, wParam, lParam)
End Function
Sub WAIT_()
Print "Hit any key to continue..."
Sleep
End Sub
' Entry point of the program
Dim As WNDCLASS wc
Dim As MSG msg
Dim As HWND hWnd
' Load Scintilla.dll dynamically
hScintilla = DylibLoad("Scintilla64.dll")
If hScintilla = 0 Then
Print "Failed to load Scintilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Load Lexilla.dll dynamically
hLexilla = DylibLoad("Lexilla64.dll")
If hLexilla = 0 Then
Print "Failed to load Lexilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Retrieve the CreateLexer function
CreateLexer = Cast(Function(ByVal name As ZString Ptr) As Any Ptr, DylibSymbol(hLexilla, "CreateLexer"))
If CreateLexer = 0 Then
Print "Failed to retrieve CreateLexer function."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create a custom lexer for FreeBASIC
Dim As Any Ptr lexer = CreateLexer("freebasic")
If lexer = 0 Then
Print "Failed to create BASIC lexer."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
Else
SendMessage(hwndScintilla, SCI_SETLEXER, Cast(WPARAM, lexer), 0)
Print "FreeBASIC lexer applied."
End If
' Define the window class name using a static ZString
Dim Shared As ZString * 25 className => "FreeBASICSyntaxHighlighter"
wc.style = CS_HREDRAW Or CS_VREDRAW
wc.lpfnWndProc = @WindowProc
wc.hInstance = GetModuleHandle(0)
wc.hCursor = LoadCursor(0, IDC_ARROW)
wc.hbrBackground = Cast(HBRUSH, COLOR_WINDOW + 1)
wc.lpszClassName = @className
' Register the window class
If RegisterClass(@wc) = 0 Then
Print "Failed to register window class."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create the main window
hWnd = CreateWindowEx(0, @className, "Lexilla FreeBASIC Example", _
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, _
0, 0, GetModuleHandle(0), 0)
' Check if the window was created successfully
If hWnd = 0 Then
Print "Failed to create main window."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Show the window
ShowWindow(hWnd, SW_SHOWNORMAL)
UpdateWindow(hWnd)
' Main message loop
While GetMessage(@msg, 0, 0, 0)
TranslateMessage(@msg)
DispatchMessage(@msg)
Wend
' Cleanup: Free the Lexilla DLL when done
DylibFree(hLexilla)
DylibFree(hScintilla)
Can anybody try it and debug-help ?
I provide the whole project here
https://www.mediafire.com/file/5b2u1mpc ... 1.zip/file
-
- Posts: 1050
- Joined: Jul 14, 2005 23:41
Re: Color text in control ... scintilla or something else !
Download the WinFBE Editor source code. Everything you ever want to know about using Scintilla in a FreeBasic Win32 application should be found in that source code.
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
Thanks, i will take a look !PaulSquires wrote: ↑Oct 22, 2024 22:41 Download the WinFBE Editor source code. Everything you ever want to know about using Scintilla in a FreeBasic Win32 application should be found in that source code.
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
BitDefender saysPaulSquires wrote: ↑Oct 22, 2024 22:41 Download the WinFBE Editor source code. Everything you ever want to know about using Scintilla in a FreeBasic Win32 application should be found in that source code.
WinFBE64.exe is infected with Trojan.GenericKD.70938088. The threat has been successfully blocked, your device is safe.
the download zip from main page of repo not Releases
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
The dll s are from https://www.scintilla.org/SciTEDownload.htmldemosthenesk wrote: ↑Oct 22, 2024 22:25 Hello, with the help of VANYA, SARG, and chatGPT i learn the Lexilla and Scintilla api to create a test-highlight control in win64.
So far my main.bas code is:This code works fine for style 0 but not for comments and keywordsCode: Select all
#include "windows.bi" #include "scintilla.bi" #include "scilexer.bi" ' Declare handles for Scintilla control and Lexilla DLL Dim Shared As HWND hwndScintilla Dim Shared As Any Ptr hLexilla Dim Shared As Any Ptr hScintilla Dim Shared As LRESULT result ' Declare function pointers for Lexilla functions Dim As Function(ByVal name As ZString Ptr) As Any Ptr CreateLexer ' Window procedure to handle window messages Function WindowProc(hWnd As HWND, msg As UINT, wParam As WPARAM, lParam As LPARAM) As LRESULT Select Case msg Case WM_CREATE ' Create Scintilla control within the window hwndScintilla = CreateWindowEx(0, "Scintilla", "", _ WS_CHILD Or WS_VISIBLE Or WS_TABSTOP, _ 0, 0, 800, 600, _ hWnd, 0, GetModuleHandle(0), 0) ' Check if the Scintilla control was created successfully If hwndScintilla = 0 Then MessageBox(hWnd, "Failed to create Scintilla control.", "Error", MB_OK Or MB_ICONERROR) Return -1 End If ' Set the lexer for FreeBASIC SendMessage(hwndScintilla, SCI_SETLEXER, SCLEX_FREEBASIC, 0) SendMessage(hwndScintilla, SCI_STYLECLEARALL, 0, 0) Print "Cleared all styles." ''''''''''''''''''''''' FIXME ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Set style for comments (verify if style 1 is correct for comments) SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_COMMENT, RGB(0, 128, 0)) ' Green comments Print "Set comment style color." ' Set style for keywords (verify if style 3 is correct for keywords) SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD, RGB(0, 0, 255)) ' Blue keywords Print "Set keyword style color." ''''''''''''''''''''''' FIXME ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Set codepage SendMessage(hwndScintilla, SCI_SETCODEPAGE, SC_CP_UTF8, 0) ' Set the initial text in Scintilla Dim As String sampleCode = !"' Example FreeBASIC code\n\nPrint \"Hello, FreeBASIC!\"\nFor i = 1 To 10\n Print i\nNext i\n" Dim As ZString Ptr samplePtr = StrPtr(sampleCode) result = SendMessage(hwndScintilla, SCI_SETTEXT, 0, Cast(LPARAM, samplePtr)) ' Debug print to check result of setting text If result = 0 Then Print "Text set successfully." Else Print "Failed to set text." End If ' Force initial highlighting result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1) If result = 0 Then Print "Syntax highlighting applied." Else Print "Failed to apply syntax highlighting." End If Case WM_SIZE ' Resize the Scintilla control when the window resizes MoveWindow(hwndScintilla, 0, 0, LoWord(lParam), HiWord(lParam), TRUE) Case WM_NOTIFY ' Handle Scintilla notifications Dim As NMHDR Ptr nmhdr = Cast(NMHDR Ptr, lParam) If nmhdr->hwndFrom = hwndScintilla AndAlso nmhdr->code = SCN_MODIFIED Then ' Refresh highlighting when text is modified result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1) If result = 0 Then Print "Syntax highlighting applied." Else Print "Failed to apply syntax highlighting." End If Print "WM_NOTIFY" End If Case WM_CLOSE ' Clean up and exit the application PostQuitMessage(0) Return 0 End Select UpdateWindow(hwndScintilla) ' Repaint the window Return DefWindowProc(hWnd, msg, wParam, lParam) End Function Sub WAIT_() Print "Hit any key to continue..." Sleep End Sub ' Entry point of the program Dim As WNDCLASS wc Dim As MSG msg Dim As HWND hWnd ' Load Scintilla.dll dynamically hScintilla = DylibLoad("Scintilla64.dll") If hScintilla = 0 Then Print "Failed to load Scintilla64.dll. Make sure the DLL is in the correct path." Sleep End End If ' Load Lexilla.dll dynamically hLexilla = DylibLoad("Lexilla64.dll") If hLexilla = 0 Then Print "Failed to load Lexilla64.dll. Make sure the DLL is in the correct path." Sleep End End If ' Retrieve the CreateLexer function CreateLexer = Cast(Function(ByVal name As ZString Ptr) As Any Ptr, DylibSymbol(hLexilla, "CreateLexer")) If CreateLexer = 0 Then Print "Failed to retrieve CreateLexer function." DylibFree(hLexilla) DylibFree(hScintilla) Sleep End If ' Create a custom lexer for FreeBASIC Dim As Any Ptr lexer = CreateLexer("freebasic") If lexer = 0 Then Print "Failed to create BASIC lexer." DylibFree(hLexilla) DylibFree(hScintilla) Sleep Else SendMessage(hwndScintilla, SCI_SETLEXER, Cast(WPARAM, lexer), 0) Print "FreeBASIC lexer applied." End If ' Define the window class name using a static ZString Dim Shared As ZString * 25 className => "FreeBASICSyntaxHighlighter" wc.style = CS_HREDRAW Or CS_VREDRAW wc.lpfnWndProc = @WindowProc wc.hInstance = GetModuleHandle(0) wc.hCursor = LoadCursor(0, IDC_ARROW) wc.hbrBackground = Cast(HBRUSH, COLOR_WINDOW + 1) wc.lpszClassName = @className ' Register the window class If RegisterClass(@wc) = 0 Then Print "Failed to register window class." DylibFree(hLexilla) DylibFree(hScintilla) Sleep End If ' Create the main window hWnd = CreateWindowEx(0, @className, "Lexilla FreeBASIC Example", _ WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, _ 0, 0, GetModuleHandle(0), 0) ' Check if the window was created successfully If hWnd = 0 Then Print "Failed to create main window." DylibFree(hLexilla) DylibFree(hScintilla) Sleep End If ' Show the window ShowWindow(hWnd, SW_SHOWNORMAL) UpdateWindow(hWnd) ' Main message loop While GetMessage(@msg, 0, 0, 0) TranslateMessage(@msg) DispatchMessage(@msg) Wend ' Cleanup: Free the Lexilla DLL when done DylibFree(hLexilla) DylibFree(hScintilla)
Can anybody try it and debug-help ?
I provide the whole project here
https://www.mediafire.com/file/5b2u1mpc ... 1.zip/file
Release 5.5.3
Re: Color text in control ... scintilla or something else !
Hi Demos,
Found different problems:
- set lexer to scintilla but window not yet created
- use of old function SCI_SETLEXER now SCI_SETILEXER
Too late here to continue, I'll do that tomorrow
Found different problems:
- set lexer to scintilla but window not yet created
- use of old function SCI_SETLEXER now SCI_SETILEXER
Too late here to continue, I'll do that tomorrow
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
i fix it as you suggest
https://www.mediafire.com/file/cz1uxlyo ... 2.zip/file
Code: Select all
#include "windows.bi"
#include "scintilla.bi"
#include "scilexer.bi"
' Declare handles for Scintilla control and Lexilla DLL
Dim Shared As HWND hwndScintilla
Dim Shared As Any Ptr hLexilla
Dim Shared As Any Ptr hScintilla
Dim Shared As LRESULT result
' Declare function pointers for Lexilla functions
Dim As Function(ByVal name As ZString Ptr) As Any Ptr CreateLexer
' Window procedure to handle window messages
Function WindowProc(hWnd As HWND, msg As UINT, wParam As WPARAM, lParam As LPARAM) As LRESULT
Select Case msg
Case WM_CREATE
' Create Scintilla control within the window
hwndScintilla = CreateWindowEx(0, "Scintilla", "", _
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP, _
0, 0, 800, 600, _
hWnd, 0, GetModuleHandle(0), 0)
' Check if the Scintilla control was created successfully
If hwndScintilla = 0 Then
MessageBox(hWnd, "Failed to create Scintilla control.", "Error", MB_OK Or MB_ICONERROR)
Return -1
End If
' Set the lexer for FreeBASIC
' SendMessage(hwndScintilla, SCI_SETLEXER, SCLEX_FREEBASIC, 0)
SendMessage(hwndScintilla, SCI_SETILEXER, SCLEX_FREEBASIC, 0) 'SCI_SETILEXER 'FIX BY SARG
SendMessage(hwndScintilla, SCI_STYLECLEARALL, 0, 0)
Print "Cleared all styles."
''''''''''''''''''''''' FIXME '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Set style for comments (verify if style 1 is correct for comments)
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_COMMENT, RGB(0, 128, 0)) ' Green comments
Print "Set comment style color."
' Set style for keywords (verify if style 3 is correct for keywords)
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD, RGB(0, 0, 255)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD2, RGB(0, 0, 255)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD3, RGB(0, 0, 255)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD4, RGB(0, 0, 255)) ' Blue keywords
Print "Set keyword style color."
''''''''''''''''''''''' FIXME '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Set codepage
SendMessage(hwndScintilla, SCI_SETCODEPAGE, SC_CP_UTF8, 0)
' Set the initial text in Scintilla
Dim As String sampleCode = !"' Example FreeBASIC code\n\nPrint \"Hello, FreeBASIC!\"\nFor i = 1 To 10\n Print i\nNext i\n"
Dim As ZString Ptr samplePtr = StrPtr(sampleCode)
result = SendMessage(hwndScintilla, SCI_SETTEXT, 0, Cast(LPARAM, samplePtr))
' Debug print to check result of setting text
If result = 0 Then
Print "Text set successfully."
Else
Print "Failed to set text."
End If
' Force initial highlighting
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
Case WM_SIZE
' Resize the Scintilla control when the window resizes
MoveWindow(hwndScintilla, 0, 0, LoWord(lParam), HiWord(lParam), TRUE)
Case WM_NOTIFY
' Handle Scintilla notifications
Dim As NMHDR Ptr nmhdr = Cast(NMHDR Ptr, lParam)
If nmhdr->hwndFrom = hwndScintilla AndAlso nmhdr->code = SCN_MODIFIED Then
' Refresh highlighting when text is modified
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
Print "WM_NOTIFY"
End If
Case WM_CLOSE
' Clean up and exit the application
PostQuitMessage(0)
Return 0
End Select
UpdateWindow(hwndScintilla) ' Repaint the window
Return DefWindowProc(hWnd, msg, wParam, lParam)
End Function
Sub WAIT_()
Print "Hit any key to continue..."
Sleep
End Sub
' Entry point of the program
Dim As WNDCLASS wc
Dim As MSG msg
Dim As HWND hWnd
' Load Scintilla.dll dynamically
hScintilla = DylibLoad("Scintilla64.dll")
If hScintilla = 0 Then
Print "Failed to load Scintilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Load Lexilla.dll dynamically
hLexilla = DylibLoad("Lexilla64.dll")
If hLexilla = 0 Then
Print "Failed to load Lexilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Retrieve the CreateLexer function
CreateLexer = Cast(Function(ByVal name As ZString Ptr) As Any Ptr, DylibSymbol(hLexilla, "CreateLexer"))
If CreateLexer = 0 Then
Print "Failed to retrieve CreateLexer function."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
'LEXER OLD
' Define the window class name using a static ZString
Dim Shared As ZString * 25 className => "FreeBASICSyntaxHighlighter"
wc.style = CS_HREDRAW Or CS_VREDRAW
wc.lpfnWndProc = @WindowProc
wc.hInstance = GetModuleHandle(0)
wc.hCursor = LoadCursor(0, IDC_ARROW)
wc.hbrBackground = Cast(HBRUSH, COLOR_WINDOW + 1)
wc.lpszClassName = @className
' Register the window class
If RegisterClass(@wc) = 0 Then
Print "Failed to register window class."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create the main window
hWnd = CreateWindowEx(0, @className, "Lexilla FreeBASIC Example", _
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, _
0, 0, GetModuleHandle(0), 0)
' Check if the window was created successfully
If hWnd = 0 Then
Print "Failed to create main window."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create a custom lexer for FreeBASIC
' lexer is created after window creation 'FIX BY SARG
Dim As Any Ptr lexer = CreateLexer("freebasic")
If lexer = 0 Then
Print "Failed to create BASIC lexer."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
Else
' SendMessage(hwndScintilla, SCI_SETLEXER, Cast(WPARAM, lexer), 0)
SendMessage(hwndScintilla, SCI_SETILEXER, 0, Cast(LPARAM, lexer)) 'SCI_SETILEXER 'FIX BY SARG
' SendMessage(hwndScintilla, SCI_SETILEXER, Cast(WPARAM, lexer),0) 'SCI_SETILEXER
Print "FreeBASIC lexer applied."
End If
' Show the window
ShowWindow(hWnd, SW_SHOWNORMAL)
UpdateWindow(hWnd)
' Main message loop
While GetMessage(@msg, 0, 0, 0)
TranslateMessage(@msg)
DispatchMessage(@msg)
Wend
' Cleanup: Free the Lexilla DLL when done
DylibFree(hLexilla)
DylibFree(hScintilla)
Re: Color text in control ... scintilla or something else !
Hello Demos..
1) Tried to Compile your Code example but at least I have Got an Error at the end of Code example..
Line 186... Warning 9(2): literal String too big, truncated
Second: Error Message: failed to load Scintilla64.dll make sure the DLL is in the correct path.
But I have done that one in a correct path
Used winfbe editor. Have downloaded all Files from ZIP File.
2) If I am using DyLibLoad "Scintilla.dll" and "Lexilla.dll " everything is working however fine.. Made this Test some minutes ago
Sci Windows Result:
Lexilla FreeBASIC Example (title)
'Example FreeBASIC Code
Print "Hello, FreeBASIC!'
for i= 1 to 10
Print i
Next i
1) Tried to Compile your Code example but at least I have Got an Error at the end of Code example..
Line 186... Warning 9(2): literal String too big, truncated
Second: Error Message: failed to load Scintilla64.dll make sure the DLL is in the correct path.
But I have done that one in a correct path
Used winfbe editor. Have downloaded all Files from ZIP File.
2) If I am using DyLibLoad "Scintilla.dll" and "Lexilla.dll " everything is working however fine.. Made this Test some minutes ago
Sci Windows Result:
Lexilla FreeBASIC Example (title)
'Example FreeBASIC Code
Print "Hello, FreeBASIC!'
for i= 1 to 10
Print i
Next i
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
Hello there Löwenherz !Löwenherz wrote: ↑Oct 23, 2024 12:20 Hello Demos..
1) Tried to Compile your Code example but at least I have Got an Error at the end of Code example..
Line 186... Warning 9(2): literal String too big, truncated
Second: Error Message: failed to load Scintilla64.dll make sure the DLL is in the correct path.
But I have done that one in a correct path
Used winfbe editor. Have downloaded all Files from ZIP File.
2) If I am using DyLibLoad "Scintilla.dll" and "Lexilla.dll " everything is working however fine.. Made this Test some minutes ago
Sci Windows Result:
Lexilla FreeBASIC Example (title)
'Example FreeBASIC Code
Print "Hello, FreeBASIC!'
for i= 1 to 10
Print i
Next i
Please use the latest version of dll 5.5.3
You can grab it from https://www.scintilla.org/SciTEDownload.html from Windows Executables
The latest code FIXED by SARG and me is below
http://www.mediafire.com/file/3um7ve023 ... lla1_3.zip
We can compile the code but there are some bugs in colors, no KEYWORD color and wrong colors for STRING and NUMBER
Please try the latest version !
main.bas
Code: Select all
#include "windows.bi"
#include "scintilla.bi"
#include "scilexer.bi"
' Declare handles for Scintilla control and Lexilla DLL
Dim Shared As HWND hwndScintilla
Dim Shared As Any Ptr hLexilla
Dim Shared As Any Ptr hScintilla
Dim Shared As LRESULT result
' Declare function pointers for Lexilla functions
Dim As Function(ByVal name As ZString Ptr) As Any Ptr CreateLexer
' Window procedure to handle window messages
Function WindowProc(hWnd As HWND, msg As UINT, wParam As WPARAM, lParam As LPARAM) As LRESULT
Select Case msg
Case WM_CREATE
' Create Scintilla control within the window
hwndScintilla = CreateWindowEx(0, "Scintilla", "", _
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP, _
0, 0, 800, 600, _
hWnd, 0, GetModuleHandle(0), 0)
' Check if the Scintilla control was created successfully
If hwndScintilla = 0 Then
MessageBox(hWnd, "Failed to create Scintilla control.", "Error", MB_OK Or MB_ICONERROR)
Return -1
End If
' Set codepage
SendMessage(hwndScintilla, SCI_SETCODEPAGE, SC_CP_UTF8, 0)
' Set the initial text in Scintilla
Dim As String sampleCode = !"' Example FreeBASIC code\n\nPrint \"Hello, FreeBASIC!\"\nFor i = 1 To 10\n Print i\nNext i\n"
Dim As ZString Ptr samplePtr = StrPtr(sampleCode)
result = SendMessage(hwndScintilla, SCI_SETTEXT, 0, Cast(LPARAM, samplePtr))
' Debug print to check result of setting text
If result = 0 Then
Print "Text set successfully."
Else
Print "Failed to set text."
End If
Case WM_SIZE
' Resize the Scintilla control when the window resizes
MoveWindow(hwndScintilla, 0, 0, LoWord(lParam), HiWord(lParam), TRUE)
Case WM_NOTIFY
' Handle Scintilla notifications
Dim As NMHDR Ptr nmhdr = Cast(NMHDR Ptr, lParam)
If nmhdr->hwndFrom = hwndScintilla AndAlso nmhdr->code = SCN_MODIFIED Then
' Refresh highlighting when text is modified
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
Print "WM_NOTIFY"
End If
Case WM_CLOSE
' Clean up and exit the application
PostQuitMessage(0)
Return 0
End Select
UpdateWindow(hwndScintilla) ' Repaint the window
Return DefWindowProc(hWnd, msg, wParam, lParam)
End Function
Sub WAIT_()
Print "Hit any key to continue..."
Sleep
End Sub
' Entry point of the program
Dim As WNDCLASS wc
Dim As MSG msg
Dim As HWND hWnd
' Load Scintilla.dll dynamically
hScintilla = DylibLoad("Scintilla64.dll")
If hScintilla = 0 Then
Print "Failed to load Scintilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Load Lexilla.dll dynamically
hLexilla = DylibLoad("Lexilla64.dll")
If hLexilla = 0 Then
Print "Failed to load Lexilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Retrieve the CreateLexer function
CreateLexer = Cast(Function(ByVal name As ZString Ptr) As Any Ptr, DylibSymbol(hLexilla, "CreateLexer"))
If CreateLexer = 0 Then
Print "Failed to retrieve CreateLexer function."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
'LEXER OLD
' Define the window class name using a static ZString
Dim Shared As ZString * 25 className => "FreeBASICSyntaxHighlighter"
wc.style = CS_HREDRAW Or CS_VREDRAW
wc.lpfnWndProc = @WindowProc
wc.hInstance = GetModuleHandle(0)
wc.hCursor = LoadCursor(0, IDC_ARROW)
wc.hbrBackground = Cast(HBRUSH, COLOR_WINDOW + 1)
wc.lpszClassName = @className
' Register the window class
If RegisterClass(@wc) = 0 Then
Print "Failed to register window class."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create the main window
hWnd = CreateWindowEx(0, @className, "Lexilla FreeBASIC Example", _
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, _
0, 0, GetModuleHandle(0), 0)
' Check if the window was created successfully
If hWnd = 0 Then
Print "Failed to create main window."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create a custom lexer for FreeBASIC
' lexer is created after window creation 'FIX BY SARG
Dim As Any Ptr lexer = CreateLexer("freebasic")
If lexer = 0 Then
Print "Failed to create BASIC lexer."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
Else
'set the lexer
SendMessage(hwndScintilla, SCI_SETILEXER, 0, Cast(LPARAM, lexer)) 'SCI_SETILEXER 'FIX BY SARG
Print "FreeBASIC lexer applied."
print "lexer=";SendMessage(hwndScintilla, SCI_GETLEXER,0,0)
'Clear ALL Styles
SendMessage(hwndScintilla, SCI_STYLECLEARALL, 0, 0)
Print "Cleared all styles."
''''''''''''''''''''''' FIXME '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Set style for comments
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_COMMENT, RGB(0, 128, 0)) ' Green comments
Print "Set comment style color."
' Set style for keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD, RGB(0, 0, 255)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD2, RGB(0, 0, 255)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD3, RGB(0, 0, 255)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD4, RGB(0, 0, 255)) ' Blue keywords
Print "Set keyword style color."
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_OPERATOR, RGB(0, 0, 255)) ' Blue operator
Print "Set operator style color."
'Set the Style for strings
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_STRING, RGB(0, 0, 255)) 'Blue strings
Print "Set strings style color."
'Set Styles for Numbers
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_NUMBER, RGB(255,0, 0)) 'Red numbers
Print "Set number style color."
''''''''''''''''''''''' FIXME '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Refresh highlighting for all text
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
End If
' Show the window
ShowWindow(hWnd, SW_SHOWNORMAL)
UpdateWindow(hWnd)
' Main message loop
While GetMessage(@msg, 0, 0, 0)
TranslateMessage(@msg)
DispatchMessage(@msg)
Wend
' Cleanup: Free the Lexilla DLL when done
DylibFree(hLexilla)
DylibFree(hScintilla)
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
scilexer.bi
Code: Select all
#pragma once
#define SCILEXER_H
const SCLEX_CONTAINER = 0
const SCLEX_NULL = 1
const SCLEX_PYTHON = 2
const SCLEX_CPP = 3
const SCLEX_HTML = 4
const SCLEX_XML = 5
const SCLEX_PERL = 6
const SCLEX_SQL = 7
const SCLEX_VB = 8
const SCLEX_PROPERTIES = 9
const SCLEX_ERRORLIST = 10
const SCLEX_MAKEFILE = 11
const SCLEX_BATCH = 12
const SCLEX_XCODE = 13
const SCLEX_LATEX = 14
const SCLEX_LUA = 15
const SCLEX_DIFF = 16
const SCLEX_CONF = 17
const SCLEX_PASCAL = 18
const SCLEX_AVE = 19
const SCLEX_ADA = 20
const SCLEX_LISP = 21
const SCLEX_RUBY = 22
const SCLEX_EIFFEL = 23
const SCLEX_EIFFELKW = 24
const SCLEX_TCL = 25
const SCLEX_NNCRONTAB = 26
const SCLEX_BULLANT = 27
const SCLEX_VBSCRIPT = 28
const SCLEX_BAAN = 31
const SCLEX_MATLAB = 32
const SCLEX_SCRIPTOL = 33
const SCLEX_ASM = 34
const SCLEX_CPPNOCASE = 35
const SCLEX_FORTRAN = 36
const SCLEX_F77 = 37
const SCLEX_CSS = 38
const SCLEX_POV = 39
const SCLEX_LOUT = 40
const SCLEX_ESCRIPT = 41
const SCLEX_PS = 42
const SCLEX_NSIS = 43
const SCLEX_MMIXAL = 44
const SCLEX_CLW = 45
const SCLEX_CLWNOCASE = 46
const SCLEX_LOT = 47
const SCLEX_YAML = 48
const SCLEX_TEX = 49
const SCLEX_METAPOST = 50
const SCLEX_POWERBASIC = 51
const SCLEX_FORTH = 52
const SCLEX_ERLANG = 53
const SCLEX_OCTAVE = 54
const SCLEX_MSSQL = 55
const SCLEX_VERILOG = 56
const SCLEX_KIX = 57
const SCLEX_GUI4CLI = 58
const SCLEX_SPECMAN = 59
const SCLEX_AU3 = 60
const SCLEX_APDL = 61
const SCLEX_BASH = 62
const SCLEX_ASN1 = 63
const SCLEX_VHDL = 64
const SCLEX_CAML = 65
const SCLEX_BLITZBASIC = 66
const SCLEX_PUREBASIC = 67
const SCLEX_HASKELL = 68
const SCLEX_PHPSCRIPT = 69
const SCLEX_TADS3 = 70
const SCLEX_REBOL = 71
const SCLEX_SMALLTALK = 72
const SCLEX_FLAGSHIP = 73
const SCLEX_CSOUND = 74
const SCLEX_FREEBASIC = 75
const SCLEX_INNOSETUP = 76
const SCLEX_OPAL = 77
const SCLEX_SPICE = 78
const SCLEX_D = 79
const SCLEX_CMAKE = 80
const SCLEX_GAP = 81
const SCLEX_PLM = 82
const SCLEX_PROGRESS = 83
const SCLEX_ABAQUS = 84
const SCLEX_ASYMPTOTE = 85
const SCLEX_R = 86
const SCLEX_MAGIK = 87
const SCLEX_POWERSHELL = 88
const SCLEX_MYSQL = 89
const SCLEX_PO = 90
const SCLEX_TAL = 91
const SCLEX_COBOL = 92
const SCLEX_TACL = 93
const SCLEX_SORCUS = 94
const SCLEX_POWERPRO = 95
const SCLEX_NIMROD = 96
const SCLEX_SML = 97
const SCLEX_MARKDOWN = 98
const SCLEX_TXT2TAGS = 99
const SCLEX_A68K = 100
const SCLEX_MODULA = 101
const SCLEX_COFFEESCRIPT = 102
const SCLEX_TCMD = 103
const SCLEX_AVS = 104
const SCLEX_ECL = 105
const SCLEX_OSCRIPT = 106
const SCLEX_VISUALPROLOG = 107
const SCLEX_LITERATEHASKELL = 108
const SCLEX_STTXT = 109
const SCLEX_KVIRC = 110
const SCLEX_RUST = 111
const SCLEX_DMAP = 112
const SCLEX_AS = 113
const SCLEX_DMIS = 114
const SCLEX_REGISTRY = 115
const SCLEX_BIBTEX = 116
const SCLEX_SREC = 117
const SCLEX_IHEX = 118
const SCLEX_TEHEX = 119
const SCLEX_JSON = 120
const SCLEX_EDIFACT = 121
const SCLEX_AUTOMATIC = 1000
const SCE_P_DEFAULT = 0
const SCE_P_COMMENTLINE = 1
const SCE_P_NUMBER = 2
const SCE_P_STRING = 3
const SCE_P_CHARACTER = 4
const SCE_P_WORD = 5
const SCE_P_TRIPLE = 6
const SCE_P_TRIPLEDOUBLE = 7
const SCE_P_CLASSNAME = 8
const SCE_P_DEFNAME = 9
const SCE_P_OPERATOR = 10
const SCE_P_IDENTIFIER = 11
const SCE_P_COMMENTBLOCK = 12
const SCE_P_STRINGEOL = 13
const SCE_P_WORD2 = 14
const SCE_P_DECORATOR = 15
const SCE_P_FSTRING = 16
const SCE_P_FCHARACTER = 17
const SCE_P_FTRIPLE = 18
const SCE_P_FTRIPLEDOUBLE = 19
const SCE_C_DEFAULT = 0
const SCE_C_COMMENT = 1
const SCE_C_COMMENTLINE = 2
const SCE_C_COMMENTDOC = 3
const SCE_C_NUMBER = 4
const SCE_C_WORD = 5
const SCE_C_STRING = 6
const SCE_C_CHARACTER = 7
const SCE_C_UUID = 8
const SCE_C_PREPROCESSOR = 9
const SCE_C_OPERATOR = 10
const SCE_C_IDENTIFIER = 11
const SCE_C_STRINGEOL = 12
const SCE_C_VERBATIM = 13
const SCE_C_REGEX = 14
const SCE_C_COMMENTLINEDOC = 15
const SCE_C_WORD2 = 16
const SCE_C_COMMENTDOCKEYWORD = 17
const SCE_C_COMMENTDOCKEYWORDERROR = 18
const SCE_C_GLOBALCLASS = 19
const SCE_C_STRINGRAW = 20
const SCE_C_TRIPLEVERBATIM = 21
const SCE_C_HASHQUOTEDSTRING = 22
const SCE_C_PREPROCESSORCOMMENT = 23
const SCE_C_PREPROCESSORCOMMENTDOC = 24
const SCE_C_USERLITERAL = 25
const SCE_C_TASKMARKER = 26
const SCE_C_ESCAPESEQUENCE = 27
const SCE_D_DEFAULT = 0
const SCE_D_COMMENT = 1
const SCE_D_COMMENTLINE = 2
const SCE_D_COMMENTDOC = 3
const SCE_D_COMMENTNESTED = 4
const SCE_D_NUMBER = 5
const SCE_D_WORD = 6
const SCE_D_WORD2 = 7
const SCE_D_WORD3 = 8
const SCE_D_TYPEDEF = 9
const SCE_D_STRING = 10
const SCE_D_STRINGEOL = 11
const SCE_D_CHARACTER = 12
const SCE_D_OPERATOR = 13
const SCE_D_IDENTIFIER = 14
const SCE_D_COMMENTLINEDOC = 15
const SCE_D_COMMENTDOCKEYWORD = 16
const SCE_D_COMMENTDOCKEYWORDERROR = 17
const SCE_D_STRINGB = 18
const SCE_D_STRINGR = 19
const SCE_D_WORD5 = 20
const SCE_D_WORD6 = 21
const SCE_D_WORD7 = 22
const SCE_TCL_DEFAULT = 0
const SCE_TCL_COMMENT = 1
const SCE_TCL_COMMENTLINE = 2
const SCE_TCL_NUMBER = 3
const SCE_TCL_WORD_IN_QUOTE = 4
const SCE_TCL_IN_QUOTE = 5
const SCE_TCL_OPERATOR = 6
const SCE_TCL_IDENTIFIER = 7
const SCE_TCL_SUBSTITUTION = 8
const SCE_TCL_SUB_BRACE = 9
const SCE_TCL_MODIFIER = 10
const SCE_TCL_EXPAND = 11
const SCE_TCL_WORD = 12
const SCE_TCL_WORD2 = 13
const SCE_TCL_WORD3 = 14
const SCE_TCL_WORD4 = 15
const SCE_TCL_WORD5 = 16
const SCE_TCL_WORD6 = 17
const SCE_TCL_WORD7 = 18
const SCE_TCL_WORD8 = 19
const SCE_TCL_COMMENT_BOX = 20
const SCE_TCL_BLOCK_COMMENT = 21
const SCE_H_DEFAULT = 0
const SCE_H_TAG = 1
const SCE_H_TAGUNKNOWN = 2
const SCE_H_ATTRIBUTE = 3
const SCE_H_ATTRIBUTEUNKNOWN = 4
const SCE_H_NUMBER = 5
const SCE_H_DOUBLESTRING = 6
const SCE_H_SINGLESTRING = 7
const SCE_H_OTHER = 8
const SCE_H_COMMENT = 9
const SCE_H_ENTITY = 10
const SCE_H_TAGEND = 11
const SCE_H_XMLSTART = 12
const SCE_H_XMLEND = 13
const SCE_H_SCRIPT = 14
const SCE_H_ASP = 15
const SCE_H_ASPAT = 16
const SCE_H_CDATA = 17
const SCE_H_QUESTION = 18
const SCE_H_VALUE = 19
const SCE_H_XCCOMMENT = 20
const SCE_H_SGML_DEFAULT = 21
const SCE_H_SGML_COMMAND = 22
const SCE_H_SGML_1ST_PARAM = 23
const SCE_H_SGML_DOUBLESTRING = 24
const SCE_H_SGML_SIMPLESTRING = 25
const SCE_H_SGML_ERROR = 26
const SCE_H_SGML_SPECIAL = 27
const SCE_H_SGML_ENTITY = 28
const SCE_H_SGML_COMMENT = 29
const SCE_H_SGML_1ST_PARAM_COMMENT = 30
const SCE_H_SGML_BLOCK_DEFAULT = 31
const SCE_HJ_START = 40
const SCE_HJ_DEFAULT = 41
const SCE_HJ_COMMENT = 42
const SCE_HJ_COMMENTLINE = 43
const SCE_HJ_COMMENTDOC = 44
const SCE_HJ_NUMBER = 45
const SCE_HJ_WORD = 46
const SCE_HJ_KEYWORD = 47
const SCE_HJ_DOUBLESTRING = 48
const SCE_HJ_SINGLESTRING = 49
const SCE_HJ_SYMBOLS = 50
const SCE_HJ_STRINGEOL = 51
const SCE_HJ_REGEX = 52
const SCE_HJA_START = 55
const SCE_HJA_DEFAULT = 56
const SCE_HJA_COMMENT = 57
const SCE_HJA_COMMENTLINE = 58
const SCE_HJA_COMMENTDOC = 59
const SCE_HJA_NUMBER = 60
const SCE_HJA_WORD = 61
const SCE_HJA_KEYWORD = 62
const SCE_HJA_DOUBLESTRING = 63
const SCE_HJA_SINGLESTRING = 64
const SCE_HJA_SYMBOLS = 65
const SCE_HJA_STRINGEOL = 66
const SCE_HJA_REGEX = 67
const SCE_HB_START = 70
const SCE_HB_DEFAULT = 71
const SCE_HB_COMMENTLINE = 72
const SCE_HB_NUMBER = 73
const SCE_HB_WORD = 74
const SCE_HB_STRING = 75
const SCE_HB_IDENTIFIER = 76
const SCE_HB_STRINGEOL = 77
const SCE_HBA_START = 80
const SCE_HBA_DEFAULT = 81
const SCE_HBA_COMMENTLINE = 82
const SCE_HBA_NUMBER = 83
const SCE_HBA_WORD = 84
const SCE_HBA_STRING = 85
const SCE_HBA_IDENTIFIER = 86
const SCE_HBA_STRINGEOL = 87
const SCE_HP_START = 90
const SCE_HP_DEFAULT = 91
const SCE_HP_COMMENTLINE = 92
const SCE_HP_NUMBER = 93
const SCE_HP_STRING = 94
const SCE_HP_CHARACTER = 95
const SCE_HP_WORD = 96
const SCE_HP_TRIPLE = 97
const SCE_HP_TRIPLEDOUBLE = 98
const SCE_HP_CLASSNAME = 99
const SCE_HP_DEFNAME = 100
const SCE_HP_OPERATOR = 101
const SCE_HP_IDENTIFIER = 102
const SCE_HPHP_COMPLEX_VARIABLE = 104
const SCE_HPA_START = 105
const SCE_HPA_DEFAULT = 106
const SCE_HPA_COMMENTLINE = 107
const SCE_HPA_NUMBER = 108
const SCE_HPA_STRING = 109
const SCE_HPA_CHARACTER = 110
const SCE_HPA_WORD = 111
const SCE_HPA_TRIPLE = 112
const SCE_HPA_TRIPLEDOUBLE = 113
const SCE_HPA_CLASSNAME = 114
const SCE_HPA_DEFNAME = 115
const SCE_HPA_OPERATOR = 116
const SCE_HPA_IDENTIFIER = 117
const SCE_HPHP_DEFAULT = 118
const SCE_HPHP_HSTRING = 119
const SCE_HPHP_SIMPLESTRING = 120
const SCE_HPHP_WORD = 121
const SCE_HPHP_NUMBER = 122
const SCE_HPHP_VARIABLE = 123
const SCE_HPHP_COMMENT = 124
const SCE_HPHP_COMMENTLINE = 125
const SCE_HPHP_HSTRING_VARIABLE = 126
const SCE_HPHP_OPERATOR = 127
const SCE_PL_DEFAULT = 0
const SCE_PL_ERROR = 1
const SCE_PL_COMMENTLINE = 2
const SCE_PL_POD = 3
const SCE_PL_NUMBER = 4
const SCE_PL_WORD = 5
const SCE_PL_STRING = 6
const SCE_PL_CHARACTER = 7
const SCE_PL_PUNCTUATION = 8
const SCE_PL_PREPROCESSOR = 9
const SCE_PL_OPERATOR = 10
const SCE_PL_IDENTIFIER = 11
const SCE_PL_SCALAR = 12
const SCE_PL_ARRAY = 13
const SCE_PL_HASH = 14
const SCE_PL_SYMBOLTABLE = 15
const SCE_PL_VARIABLE_INDEXER = 16
const SCE_PL_REGEX = 17
const SCE_PL_REGSUBST = 18
const SCE_PL_LONGQUOTE = 19
const SCE_PL_BACKTICKS = 20
const SCE_PL_DATASECTION = 21
const SCE_PL_HERE_DELIM = 22
const SCE_PL_HERE_Q = 23
const SCE_PL_HERE_QQ = 24
const SCE_PL_HERE_QX = 25
const SCE_PL_STRING_Q = 26
const SCE_PL_STRING_QQ = 27
const SCE_PL_STRING_QX = 28
const SCE_PL_STRING_QR = 29
const SCE_PL_STRING_QW = 30
const SCE_PL_POD_VERB = 31
const SCE_PL_SUB_PROTOTYPE = 40
const SCE_PL_FORMAT_IDENT = 41
const SCE_PL_FORMAT = 42
const SCE_PL_STRING_VAR = 43
const SCE_PL_XLAT = 44
const SCE_PL_REGEX_VAR = 54
const SCE_PL_REGSUBST_VAR = 55
const SCE_PL_BACKTICKS_VAR = 57
const SCE_PL_HERE_QQ_VAR = 61
const SCE_PL_HERE_QX_VAR = 62
const SCE_PL_STRING_QQ_VAR = 64
const SCE_PL_STRING_QX_VAR = 65
const SCE_PL_STRING_QR_VAR = 66
const SCE_RB_DEFAULT = 0
const SCE_RB_ERROR = 1
const SCE_RB_COMMENTLINE = 2
const SCE_RB_POD = 3
const SCE_RB_NUMBER = 4
const SCE_RB_WORD = 5
const SCE_RB_STRING = 6
const SCE_RB_CHARACTER = 7
const SCE_RB_CLASSNAME = 8
const SCE_RB_DEFNAME = 9
const SCE_RB_OPERATOR = 10
const SCE_RB_IDENTIFIER = 11
const SCE_RB_REGEX = 12
const SCE_RB_GLOBAL = 13
const SCE_RB_SYMBOL = 14
const SCE_RB_MODULE_NAME = 15
const SCE_RB_INSTANCE_VAR = 16
const SCE_RB_CLASS_VAR = 17
const SCE_RB_BACKTICKS = 18
const SCE_RB_DATASECTION = 19
const SCE_RB_HERE_DELIM = 20
const SCE_RB_HERE_Q = 21
const SCE_RB_HERE_QQ = 22
const SCE_RB_HERE_QX = 23
const SCE_RB_STRING_Q = 24
const SCE_RB_STRING_QQ = 25
const SCE_RB_STRING_QX = 26
const SCE_RB_STRING_QR = 27
const SCE_RB_STRING_QW = 28
const SCE_RB_WORD_DEMOTED = 29
const SCE_RB_STDIN = 30
const SCE_RB_STDOUT = 31
const SCE_RB_STDERR = 40
const SCE_RB_UPPER_BOUND = 41
const SCE_B_DEFAULT = 0
const SCE_B_COMMENT = 1
const SCE_B_NUMBER = 2
const SCE_B_KEYWORD = 3
const SCE_B_STRING = 4
const SCE_B_PREPROCESSOR = 5
const SCE_B_OPERATOR = 6
const SCE_B_IDENTIFIER = 7
const SCE_B_DATE = 8
const SCE_B_STRINGEOL = 9
const SCE_B_KEYWORD2 = 10
const SCE_B_KEYWORD3 = 11
const SCE_B_KEYWORD4 = 12
const SCE_B_CONSTANT = 13
const SCE_B_ASM = 14
const SCE_B_LABEL = 15
const SCE_B_ERROR = 16
const SCE_B_HEXNUMBER = 17
const SCE_B_BINNUMBER = 18
const SCE_B_COMMENTBLOCK = 19
const SCE_B_DOCLINE = 20
const SCE_B_DOCBLOCK = 21
const SCE_B_DOCKEYWORD = 22
const SCE_PROPS_DEFAULT = 0
const SCE_PROPS_COMMENT = 1
const SCE_PROPS_SECTION = 2
const SCE_PROPS_ASSIGNMENT = 3
const SCE_PROPS_DEFVAL = 4
const SCE_PROPS_KEY = 5
const SCE_L_DEFAULT = 0
const SCE_L_COMMAND = 1
const SCE_L_TAG = 2
const SCE_L_MATH = 3
const SCE_L_COMMENT = 4
const SCE_L_TAG2 = 5
const SCE_L_MATH2 = 6
const SCE_L_COMMENT2 = 7
const SCE_L_VERBATIM = 8
const SCE_L_SHORTCMD = 9
const SCE_L_SPECIAL = 10
const SCE_L_CMDOPT = 11
const SCE_L_ERROR = 12
const SCE_LUA_DEFAULT = 0
const SCE_LUA_COMMENT = 1
const SCE_LUA_COMMENTLINE = 2
const SCE_LUA_COMMENTDOC = 3
const SCE_LUA_NUMBER = 4
const SCE_LUA_WORD = 5
const SCE_LUA_STRING = 6
const SCE_LUA_CHARACTER = 7
const SCE_LUA_LITERALSTRING = 8
const SCE_LUA_PREPROCESSOR = 9
const SCE_LUA_OPERATOR = 10
const SCE_LUA_IDENTIFIER = 11
const SCE_LUA_STRINGEOL = 12
const SCE_LUA_WORD2 = 13
const SCE_LUA_WORD3 = 14
const SCE_LUA_WORD4 = 15
const SCE_LUA_WORD5 = 16
const SCE_LUA_WORD6 = 17
const SCE_LUA_WORD7 = 18
const SCE_LUA_WORD8 = 19
const SCE_LUA_LABEL = 20
const SCE_ERR_DEFAULT = 0
const SCE_ERR_PYTHON = 1
const SCE_ERR_GCC = 2
const SCE_ERR_MS = 3
const SCE_ERR_CMD = 4
const SCE_ERR_BORLAND = 5
const SCE_ERR_PERL = 6
const SCE_ERR_NET = 7
const SCE_ERR_LUA = 8
const SCE_ERR_CTAG = 9
const SCE_ERR_DIFF_CHANGED = 10
const SCE_ERR_DIFF_ADDITION = 11
const SCE_ERR_DIFF_DELETION = 12
const SCE_ERR_DIFF_MESSAGE = 13
const SCE_ERR_PHP = 14
const SCE_ERR_ELF = 15
const SCE_ERR_IFC = 16
const SCE_ERR_IFORT = 17
const SCE_ERR_ABSF = 18
const SCE_ERR_TIDY = 19
const SCE_ERR_JAVA_STACK = 20
const SCE_ERR_VALUE = 21
const SCE_ERR_GCC_INCLUDED_FROM = 22
const SCE_ERR_ESCSEQ = 23
const SCE_ERR_ESCSEQ_UNKNOWN = 24
const SCE_ERR_ES_BLACK = 40
const SCE_ERR_ES_RED = 41
const SCE_ERR_ES_GREEN = 42
const SCE_ERR_ES_BROWN = 43
const SCE_ERR_ES_BLUE = 44
const SCE_ERR_ES_MAGENTA = 45
const SCE_ERR_ES_CYAN = 46
const SCE_ERR_ES_GRAY = 47
const SCE_ERR_ES_DARK_GRAY = 48
const SCE_ERR_ES_BRIGHT_RED = 49
const SCE_ERR_ES_BRIGHT_GREEN = 50
const SCE_ERR_ES_YELLOW = 51
const SCE_ERR_ES_BRIGHT_BLUE = 52
const SCE_ERR_ES_BRIGHT_MAGENTA = 53
const SCE_ERR_ES_BRIGHT_CYAN = 54
const SCE_ERR_ES_WHITE = 55
const SCE_BAT_DEFAULT = 0
const SCE_BAT_COMMENT = 1
const SCE_BAT_WORD = 2
const SCE_BAT_LABEL = 3
const SCE_BAT_HIDE = 4
const SCE_BAT_COMMAND = 5
const SCE_BAT_IDENTIFIER = 6
const SCE_BAT_OPERATOR = 7
const SCE_TCMD_DEFAULT = 0
const SCE_TCMD_COMMENT = 1
const SCE_TCMD_WORD = 2
const SCE_TCMD_LABEL = 3
const SCE_TCMD_HIDE = 4
const SCE_TCMD_COMMAND = 5
const SCE_TCMD_IDENTIFIER = 6
const SCE_TCMD_OPERATOR = 7
const SCE_TCMD_ENVIRONMENT = 8
const SCE_TCMD_EXPANSION = 9
const SCE_TCMD_CLABEL = 10
const SCE_MAKE_DEFAULT = 0
const SCE_MAKE_COMMENT = 1
const SCE_MAKE_PREPROCESSOR = 2
const SCE_MAKE_IDENTIFIER = 3
const SCE_MAKE_OPERATOR = 4
const SCE_MAKE_TARGET = 5
const SCE_MAKE_IDEOL = 9
const SCE_DIFF_DEFAULT = 0
const SCE_DIFF_COMMENT = 1
const SCE_DIFF_COMMAND = 2
const SCE_DIFF_HEADER = 3
const SCE_DIFF_POSITION = 4
const SCE_DIFF_DELETED = 5
const SCE_DIFF_ADDED = 6
const SCE_DIFF_CHANGED = 7
const SCE_CONF_DEFAULT = 0
const SCE_CONF_COMMENT = 1
const SCE_CONF_NUMBER = 2
const SCE_CONF_IDENTIFIER = 3
const SCE_CONF_EXTENSION = 4
const SCE_CONF_PARAMETER = 5
const SCE_CONF_STRING = 6
const SCE_CONF_OPERATOR = 7
const SCE_CONF_IP = 8
const SCE_CONF_DIRECTIVE = 9
const SCE_AVE_DEFAULT = 0
const SCE_AVE_COMMENT = 1
const SCE_AVE_NUMBER = 2
const SCE_AVE_WORD = 3
const SCE_AVE_STRING = 6
const SCE_AVE_ENUM = 7
const SCE_AVE_STRINGEOL = 8
const SCE_AVE_IDENTIFIER = 9
const SCE_AVE_OPERATOR = 10
const SCE_AVE_WORD1 = 11
const SCE_AVE_WORD2 = 12
const SCE_AVE_WORD3 = 13
const SCE_AVE_WORD4 = 14
const SCE_AVE_WORD5 = 15
const SCE_AVE_WORD6 = 16
const SCE_ADA_DEFAULT = 0
const SCE_ADA_WORD = 1
const SCE_ADA_IDENTIFIER = 2
const SCE_ADA_NUMBER = 3
const SCE_ADA_DELIMITER = 4
const SCE_ADA_CHARACTER = 5
const SCE_ADA_CHARACTEREOL = 6
const SCE_ADA_STRING = 7
const SCE_ADA_STRINGEOL = 8
const SCE_ADA_LABEL = 9
const SCE_ADA_COMMENTLINE = 10
const SCE_ADA_ILLEGAL = 11
const SCE_BAAN_DEFAULT = 0
const SCE_BAAN_COMMENT = 1
const SCE_BAAN_COMMENTDOC = 2
const SCE_BAAN_NUMBER = 3
const SCE_BAAN_WORD = 4
const SCE_BAAN_STRING = 5
const SCE_BAAN_PREPROCESSOR = 6
const SCE_BAAN_OPERATOR = 7
const SCE_BAAN_IDENTIFIER = 8
const SCE_BAAN_STRINGEOL = 9
const SCE_BAAN_WORD2 = 10
const SCE_BAAN_WORD3 = 11
const SCE_BAAN_WORD4 = 12
const SCE_BAAN_WORD5 = 13
const SCE_BAAN_WORD6 = 14
const SCE_BAAN_WORD7 = 15
const SCE_BAAN_WORD8 = 16
const SCE_BAAN_WORD9 = 17
const SCE_BAAN_TABLEDEF = 18
const SCE_BAAN_TABLESQL = 19
const SCE_BAAN_FUNCTION = 20
const SCE_BAAN_DOMDEF = 21
const SCE_BAAN_FUNCDEF = 22
const SCE_BAAN_OBJECTDEF = 23
const SCE_BAAN_DEFINEDEF = 24
const SCE_LISP_DEFAULT = 0
const SCE_LISP_COMMENT = 1
const SCE_LISP_NUMBER = 2
const SCE_LISP_KEYWORD = 3
const SCE_LISP_KEYWORD_KW = 4
const SCE_LISP_SYMBOL = 5
const SCE_LISP_STRING = 6
const SCE_LISP_STRINGEOL = 8
const SCE_LISP_IDENTIFIER = 9
const SCE_LISP_OPERATOR = 10
const SCE_LISP_SPECIAL = 11
const SCE_LISP_MULTI_COMMENT = 12
const SCE_EIFFEL_DEFAULT = 0
const SCE_EIFFEL_COMMENTLINE = 1
const SCE_EIFFEL_NUMBER = 2
const SCE_EIFFEL_WORD = 3
const SCE_EIFFEL_STRING = 4
const SCE_EIFFEL_CHARACTER = 5
const SCE_EIFFEL_OPERATOR = 6
const SCE_EIFFEL_IDENTIFIER = 7
const SCE_EIFFEL_STRINGEOL = 8
const SCE_NNCRONTAB_DEFAULT = 0
const SCE_NNCRONTAB_COMMENT = 1
const SCE_NNCRONTAB_TASK = 2
const SCE_NNCRONTAB_SECTION = 3
const SCE_NNCRONTAB_KEYWORD = 4
const SCE_NNCRONTAB_MODIFIER = 5
const SCE_NNCRONTAB_ASTERISK = 6
const SCE_NNCRONTAB_NUMBER = 7
const SCE_NNCRONTAB_STRING = 8
const SCE_NNCRONTAB_ENVIRONMENT = 9
const SCE_NNCRONTAB_IDENTIFIER = 10
const SCE_FORTH_DEFAULT = 0
const SCE_FORTH_COMMENT = 1
const SCE_FORTH_COMMENT_ML = 2
const SCE_FORTH_IDENTIFIER = 3
const SCE_FORTH_CONTROL = 4
const SCE_FORTH_KEYWORD = 5
const SCE_FORTH_DEFWORD = 6
const SCE_FORTH_PREWORD1 = 7
const SCE_FORTH_PREWORD2 = 8
const SCE_FORTH_NUMBER = 9
const SCE_FORTH_STRING = 10
const SCE_FORTH_LOCALE = 11
const SCE_MATLAB_DEFAULT = 0
const SCE_MATLAB_COMMENT = 1
const SCE_MATLAB_COMMAND = 2
const SCE_MATLAB_NUMBER = 3
const SCE_MATLAB_KEYWORD = 4
const SCE_MATLAB_STRING = 5
const SCE_MATLAB_OPERATOR = 6
const SCE_MATLAB_IDENTIFIER = 7
const SCE_MATLAB_DOUBLEQUOTESTRING = 8
const SCE_SCRIPTOL_DEFAULT = 0
const SCE_SCRIPTOL_WHITE = 1
const SCE_SCRIPTOL_COMMENTLINE = 2
const SCE_SCRIPTOL_PERSISTENT = 3
const SCE_SCRIPTOL_CSTYLE = 4
const SCE_SCRIPTOL_COMMENTBLOCK = 5
const SCE_SCRIPTOL_NUMBER = 6
const SCE_SCRIPTOL_STRING = 7
const SCE_SCRIPTOL_CHARACTER = 8
const SCE_SCRIPTOL_STRINGEOL = 9
const SCE_SCRIPTOL_KEYWORD = 10
const SCE_SCRIPTOL_OPERATOR = 11
const SCE_SCRIPTOL_IDENTIFIER = 12
const SCE_SCRIPTOL_TRIPLE = 13
const SCE_SCRIPTOL_CLASSNAME = 14
const SCE_SCRIPTOL_PREPROCESSOR = 15
const SCE_ASM_DEFAULT = 0
const SCE_ASM_COMMENT = 1
const SCE_ASM_NUMBER = 2
const SCE_ASM_STRING = 3
const SCE_ASM_OPERATOR = 4
const SCE_ASM_IDENTIFIER = 5
const SCE_ASM_CPUINSTRUCTION = 6
const SCE_ASM_MATHINSTRUCTION = 7
const SCE_ASM_REGISTER = 8
const SCE_ASM_DIRECTIVE = 9
const SCE_ASM_DIRECTIVEOPERAND = 10
const SCE_ASM_COMMENTBLOCK = 11
const SCE_ASM_CHARACTER = 12
const SCE_ASM_STRINGEOL = 13
const SCE_ASM_EXTINSTRUCTION = 14
const SCE_ASM_COMMENTDIRECTIVE = 15
const SCE_F_DEFAULT = 0
const SCE_F_COMMENT = 1
const SCE_F_NUMBER = 2
const SCE_F_STRING1 = 3
const SCE_F_STRING2 = 4
const SCE_F_STRINGEOL = 5
const SCE_F_OPERATOR = 6
const SCE_F_IDENTIFIER = 7
const SCE_F_WORD = 8
const SCE_F_WORD2 = 9
const SCE_F_WORD3 = 10
const SCE_F_PREPROCESSOR = 11
const SCE_F_OPERATOR2 = 12
const SCE_F_LABEL = 13
const SCE_F_CONTINUATION = 14
const SCE_CSS_DEFAULT = 0
const SCE_CSS_TAG = 1
const SCE_CSS_CLASS = 2
const SCE_CSS_PSEUDOCLASS = 3
const SCE_CSS_UNKNOWN_PSEUDOCLASS = 4
const SCE_CSS_OPERATOR = 5
const SCE_CSS_IDENTIFIER = 6
const SCE_CSS_UNKNOWN_IDENTIFIER = 7
const SCE_CSS_VALUE = 8
const SCE_CSS_COMMENT = 9
const SCE_CSS_ID = 10
const SCE_CSS_IMPORTANT = 11
const SCE_CSS_DIRECTIVE = 12
const SCE_CSS_DOUBLESTRING = 13
const SCE_CSS_SINGLESTRING = 14
const SCE_CSS_IDENTIFIER2 = 15
const SCE_CSS_ATTRIBUTE = 16
const SCE_CSS_IDENTIFIER3 = 17
const SCE_CSS_PSEUDOELEMENT = 18
const SCE_CSS_EXTENDED_IDENTIFIER = 19
const SCE_CSS_EXTENDED_PSEUDOCLASS = 20
const SCE_CSS_EXTENDED_PSEUDOELEMENT = 21
const SCE_CSS_MEDIA = 22
const SCE_CSS_VARIABLE = 23
const SCE_POV_DEFAULT = 0
const SCE_POV_COMMENT = 1
const SCE_POV_COMMENTLINE = 2
const SCE_POV_NUMBER = 3
const SCE_POV_OPERATOR = 4
const SCE_POV_IDENTIFIER = 5
const SCE_POV_STRING = 6
const SCE_POV_STRINGEOL = 7
const SCE_POV_DIRECTIVE = 8
const SCE_POV_BADDIRECTIVE = 9
const SCE_POV_WORD2 = 10
const SCE_POV_WORD3 = 11
const SCE_POV_WORD4 = 12
const SCE_POV_WORD5 = 13
const SCE_POV_WORD6 = 14
const SCE_POV_WORD7 = 15
const SCE_POV_WORD8 = 16
const SCE_LOUT_DEFAULT = 0
const SCE_LOUT_COMMENT = 1
const SCE_LOUT_NUMBER = 2
const SCE_LOUT_WORD = 3
const SCE_LOUT_WORD2 = 4
const SCE_LOUT_WORD3 = 5
const SCE_LOUT_WORD4 = 6
const SCE_LOUT_STRING = 7
const SCE_LOUT_OPERATOR = 8
const SCE_LOUT_IDENTIFIER = 9
const SCE_LOUT_STRINGEOL = 10
const SCE_ESCRIPT_DEFAULT = 0
const SCE_ESCRIPT_COMMENT = 1
const SCE_ESCRIPT_COMMENTLINE = 2
const SCE_ESCRIPT_COMMENTDOC = 3
const SCE_ESCRIPT_NUMBER = 4
const SCE_ESCRIPT_WORD = 5
const SCE_ESCRIPT_STRING = 6
const SCE_ESCRIPT_OPERATOR = 7
const SCE_ESCRIPT_IDENTIFIER = 8
const SCE_ESCRIPT_BRACE = 9
const SCE_ESCRIPT_WORD2 = 10
const SCE_ESCRIPT_WORD3 = 11
const SCE_PS_DEFAULT = 0
const SCE_PS_COMMENT = 1
const SCE_PS_DSC_COMMENT = 2
const SCE_PS_DSC_VALUE = 3
const SCE_PS_NUMBER = 4
const SCE_PS_NAME = 5
const SCE_PS_KEYWORD = 6
const SCE_PS_LITERAL = 7
const SCE_PS_IMMEVAL = 8
const SCE_PS_PAREN_ARRAY = 9
const SCE_PS_PAREN_DICT = 10
const SCE_PS_PAREN_PROC = 11
const SCE_PS_TEXT = 12
const SCE_PS_HEXSTRING = 13
const SCE_PS_BASE85STRING = 14
const SCE_PS_BADSTRINGCHAR = 15
const SCE_NSIS_DEFAULT = 0
const SCE_NSIS_COMMENT = 1
const SCE_NSIS_STRINGDQ = 2
const SCE_NSIS_STRINGLQ = 3
const SCE_NSIS_STRINGRQ = 4
const SCE_NSIS_FUNCTION = 5
const SCE_NSIS_VARIABLE = 6
const SCE_NSIS_LABEL = 7
const SCE_NSIS_USERDEFINED = 8
const SCE_NSIS_SECTIONDEF = 9
const SCE_NSIS_SUBSECTIONDEF = 10
const SCE_NSIS_IFDEFINEDEF = 11
const SCE_NSIS_MACRODEF = 12
const SCE_NSIS_STRINGVAR = 13
const SCE_NSIS_NUMBER = 14
const SCE_NSIS_SECTIONGROUP = 15
const SCE_NSIS_PAGEEX = 16
const SCE_NSIS_FUNCTIONDEF = 17
const SCE_NSIS_COMMENTBOX = 18
const SCE_MMIXAL_LEADWS = 0
const SCE_MMIXAL_COMMENT = 1
const SCE_MMIXAL_LABEL = 2
const SCE_MMIXAL_OPCODE = 3
const SCE_MMIXAL_OPCODE_PRE = 4
const SCE_MMIXAL_OPCODE_VALID = 5
const SCE_MMIXAL_OPCODE_UNKNOWN = 6
const SCE_MMIXAL_OPCODE_POST = 7
const SCE_MMIXAL_OPERANDS = 8
const SCE_MMIXAL_NUMBER = 9
const SCE_MMIXAL_REF = 10
const SCE_MMIXAL_CHAR = 11
const SCE_MMIXAL_STRING = 12
const SCE_MMIXAL_REGISTER = 13
const SCE_MMIXAL_HEX = 14
const SCE_MMIXAL_OPERATOR = 15
const SCE_MMIXAL_SYMBOL = 16
const SCE_MMIXAL_INCLUDE = 17
const SCE_CLW_DEFAULT = 0
const SCE_CLW_LABEL = 1
const SCE_CLW_COMMENT = 2
const SCE_CLW_STRING = 3
const SCE_CLW_USER_IDENTIFIER = 4
const SCE_CLW_INTEGER_CONSTANT = 5
const SCE_CLW_REAL_CONSTANT = 6
const SCE_CLW_PICTURE_STRING = 7
const SCE_CLW_KEYWORD = 8
const SCE_CLW_COMPILER_DIRECTIVE = 9
const SCE_CLW_RUNTIME_EXPRESSIONS = 10
const SCE_CLW_BUILTIN_PROCEDURES_FUNCTION = 11
const SCE_CLW_STRUCTURE_DATA_TYPE = 12
const SCE_CLW_ATTRIBUTE = 13
const SCE_CLW_STANDARD_EQUATE = 14
const SCE_CLW_ERROR = 15
const SCE_CLW_DEPRECATED = 16
const SCE_LOT_DEFAULT = 0
const SCE_LOT_HEADER = 1
const SCE_LOT_BREAK = 2
const SCE_LOT_SET = 3
const SCE_LOT_PASS = 4
const SCE_LOT_FAIL = 5
const SCE_LOT_ABORT = 6
const SCE_YAML_DEFAULT = 0
const SCE_YAML_COMMENT = 1
const SCE_YAML_IDENTIFIER = 2
const SCE_YAML_KEYWORD = 3
const SCE_YAML_NUMBER = 4
const SCE_YAML_REFERENCE = 5
const SCE_YAML_DOCUMENT = 6
const SCE_YAML_TEXT = 7
const SCE_YAML_ERROR = 8
const SCE_YAML_OPERATOR = 9
const SCE_TEX_DEFAULT = 0
const SCE_TEX_SPECIAL = 1
const SCE_TEX_GROUP = 2
const SCE_TEX_SYMBOL = 3
const SCE_TEX_COMMAND = 4
const SCE_TEX_TEXT = 5
const SCE_METAPOST_DEFAULT = 0
const SCE_METAPOST_SPECIAL = 1
const SCE_METAPOST_GROUP = 2
const SCE_METAPOST_SYMBOL = 3
const SCE_METAPOST_COMMAND = 4
const SCE_METAPOST_TEXT = 5
const SCE_METAPOST_EXTRA = 6
const SCE_ERLANG_DEFAULT = 0
const SCE_ERLANG_COMMENT = 1
const SCE_ERLANG_VARIABLE = 2
const SCE_ERLANG_NUMBER = 3
const SCE_ERLANG_KEYWORD = 4
const SCE_ERLANG_STRING = 5
const SCE_ERLANG_OPERATOR = 6
const SCE_ERLANG_ATOM = 7
const SCE_ERLANG_FUNCTION_NAME = 8
const SCE_ERLANG_CHARACTER = 9
const SCE_ERLANG_MACRO = 10
const SCE_ERLANG_RECORD = 11
const SCE_ERLANG_PREPROC = 12
const SCE_ERLANG_NODE_NAME = 13
const SCE_ERLANG_COMMENT_FUNCTION = 14
const SCE_ERLANG_COMMENT_MODULE = 15
const SCE_ERLANG_COMMENT_DOC = 16
const SCE_ERLANG_COMMENT_DOC_MACRO = 17
const SCE_ERLANG_ATOM_QUOTED = 18
const SCE_ERLANG_MACRO_QUOTED = 19
const SCE_ERLANG_RECORD_QUOTED = 20
const SCE_ERLANG_NODE_NAME_QUOTED = 21
const SCE_ERLANG_BIFS = 22
const SCE_ERLANG_MODULES = 23
const SCE_ERLANG_MODULES_ATT = 24
const SCE_ERLANG_UNKNOWN = 31
const SCE_MSSQL_DEFAULT = 0
const SCE_MSSQL_COMMENT = 1
const SCE_MSSQL_LINE_COMMENT = 2
const SCE_MSSQL_NUMBER = 3
const SCE_MSSQL_STRING = 4
const SCE_MSSQL_OPERATOR = 5
const SCE_MSSQL_IDENTIFIER = 6
const SCE_MSSQL_VARIABLE = 7
const SCE_MSSQL_COLUMN_NAME = 8
const SCE_MSSQL_STATEMENT = 9
const SCE_MSSQL_DATATYPE = 10
const SCE_MSSQL_SYSTABLE = 11
const SCE_MSSQL_GLOBAL_VARIABLE = 12
const SCE_MSSQL_FUNCTION = 13
const SCE_MSSQL_STORED_PROCEDURE = 14
const SCE_MSSQL_DEFAULT_PREF_DATATYPE = 15
const SCE_MSSQL_COLUMN_NAME_2 = 16
const SCE_V_DEFAULT = 0
const SCE_V_COMMENT = 1
const SCE_V_COMMENTLINE = 2
const SCE_V_COMMENTLINEBANG = 3
const SCE_V_NUMBER = 4
const SCE_V_WORD = 5
const SCE_V_STRING = 6
const SCE_V_WORD2 = 7
const SCE_V_WORD3 = 8
const SCE_V_PREPROCESSOR = 9
const SCE_V_OPERATOR = 10
const SCE_V_IDENTIFIER = 11
const SCE_V_STRINGEOL = 12
const SCE_V_USER = 19
const SCE_V_COMMENT_WORD = 20
const SCE_V_INPUT = 21
const SCE_V_OUTPUT = 22
const SCE_V_INOUT = 23
const SCE_V_PORT_CONNECT = 24
const SCE_KIX_DEFAULT = 0
const SCE_KIX_COMMENT = 1
const SCE_KIX_STRING1 = 2
const SCE_KIX_STRING2 = 3
const SCE_KIX_NUMBER = 4
const SCE_KIX_VAR = 5
const SCE_KIX_MACRO = 6
const SCE_KIX_KEYWORD = 7
const SCE_KIX_FUNCTIONS = 8
const SCE_KIX_OPERATOR = 9
const SCE_KIX_COMMENTSTREAM = 10
const SCE_KIX_IDENTIFIER = 31
const SCE_GC_DEFAULT = 0
const SCE_GC_COMMENTLINE = 1
const SCE_GC_COMMENTBLOCK = 2
const SCE_GC_GLOBAL = 3
const SCE_GC_EVENT = 4
const SCE_GC_ATTRIBUTE = 5
const SCE_GC_CONTROL = 6
const SCE_GC_COMMAND = 7
const SCE_GC_STRING = 8
const SCE_GC_OPERATOR = 9
const SCE_SN_DEFAULT = 0
const SCE_SN_CODE = 1
const SCE_SN_COMMENTLINE = 2
const SCE_SN_COMMENTLINEBANG = 3
const SCE_SN_NUMBER = 4
const SCE_SN_WORD = 5
const SCE_SN_STRING = 6
const SCE_SN_WORD2 = 7
const SCE_SN_WORD3 = 8
const SCE_SN_PREPROCESSOR = 9
const SCE_SN_OPERATOR = 10
const SCE_SN_IDENTIFIER = 11
const SCE_SN_STRINGEOL = 12
const SCE_SN_REGEXTAG = 13
const SCE_SN_SIGNAL = 14
const SCE_SN_USER = 19
const SCE_AU3_DEFAULT = 0
const SCE_AU3_COMMENT = 1
const SCE_AU3_COMMENTBLOCK = 2
const SCE_AU3_NUMBER = 3
const SCE_AU3_FUNCTION = 4
const SCE_AU3_KEYWORD = 5
const SCE_AU3_MACRO = 6
const SCE_AU3_STRING = 7
const SCE_AU3_OPERATOR = 8
const SCE_AU3_VARIABLE = 9
const SCE_AU3_SENT = 10
const SCE_AU3_PREPROCESSOR = 11
const SCE_AU3_SPECIAL = 12
const SCE_AU3_EXPAND = 13
const SCE_AU3_COMOBJ = 14
const SCE_AU3_UDF = 15
const SCE_APDL_DEFAULT = 0
const SCE_APDL_COMMENT = 1
const SCE_APDL_COMMENTBLOCK = 2
const SCE_APDL_NUMBER = 3
const SCE_APDL_STRING = 4
const SCE_APDL_OPERATOR = 5
const SCE_APDL_WORD = 6
const SCE_APDL_PROCESSOR = 7
const SCE_APDL_COMMAND = 8
const SCE_APDL_SLASHCOMMAND = 9
const SCE_APDL_STARCOMMAND = 10
const SCE_APDL_ARGUMENT = 11
const SCE_APDL_FUNCTION = 12
const SCE_SH_DEFAULT = 0
const SCE_SH_ERROR = 1
const SCE_SH_COMMENTLINE = 2
const SCE_SH_NUMBER = 3
const SCE_SH_WORD = 4
const SCE_SH_STRING = 5
const SCE_SH_CHARACTER = 6
const SCE_SH_OPERATOR = 7
const SCE_SH_IDENTIFIER = 8
const SCE_SH_SCALAR = 9
const SCE_SH_PARAM = 10
const SCE_SH_BACKTICKS = 11
const SCE_SH_HERE_DELIM = 12
const SCE_SH_HERE_Q = 13
const SCE_ASN1_DEFAULT = 0
const SCE_ASN1_COMMENT = 1
const SCE_ASN1_IDENTIFIER = 2
const SCE_ASN1_STRING = 3
const SCE_ASN1_OID = 4
const SCE_ASN1_SCALAR = 5
const SCE_ASN1_KEYWORD = 6
const SCE_ASN1_ATTRIBUTE = 7
const SCE_ASN1_DESCRIPTOR = 8
const SCE_ASN1_TYPE = 9
const SCE_ASN1_OPERATOR = 10
const SCE_VHDL_DEFAULT = 0
const SCE_VHDL_COMMENT = 1
const SCE_VHDL_COMMENTLINEBANG = 2
const SCE_VHDL_NUMBER = 3
const SCE_VHDL_STRING = 4
const SCE_VHDL_OPERATOR = 5
const SCE_VHDL_IDENTIFIER = 6
const SCE_VHDL_STRINGEOL = 7
const SCE_VHDL_KEYWORD = 8
const SCE_VHDL_STDOPERATOR = 9
const SCE_VHDL_ATTRIBUTE = 10
const SCE_VHDL_STDFUNCTION = 11
const SCE_VHDL_STDPACKAGE = 12
const SCE_VHDL_STDTYPE = 13
const SCE_VHDL_USERWORD = 14
const SCE_VHDL_BLOCK_COMMENT = 15
const SCE_CAML_DEFAULT = 0
const SCE_CAML_IDENTIFIER = 1
const SCE_CAML_TAGNAME = 2
const SCE_CAML_KEYWORD = 3
const SCE_CAML_KEYWORD2 = 4
const SCE_CAML_KEYWORD3 = 5
const SCE_CAML_LINENUM = 6
const SCE_CAML_OPERATOR = 7
const SCE_CAML_NUMBER = 8
const SCE_CAML_CHAR = 9
const SCE_CAML_WHITE = 10
const SCE_CAML_STRING = 11
const SCE_CAML_COMMENT = 12
const SCE_CAML_COMMENT1 = 13
const SCE_CAML_COMMENT2 = 14
const SCE_CAML_COMMENT3 = 15
const SCE_HA_DEFAULT = 0
const SCE_HA_IDENTIFIER = 1
const SCE_HA_KEYWORD = 2
const SCE_HA_NUMBER = 3
const SCE_HA_STRING = 4
const SCE_HA_CHARACTER = 5
const SCE_HA_CLASS = 6
const SCE_HA_MODULE = 7
const SCE_HA_CAPITAL = 8
const SCE_HA_DATA = 9
const SCE_HA_IMPORT = 10
const SCE_HA_OPERATOR = 11
const SCE_HA_INSTANCE = 12
const SCE_HA_COMMENTLINE = 13
const SCE_HA_COMMENTBLOCK = 14
const SCE_HA_COMMENTBLOCK2 = 15
const SCE_HA_COMMENTBLOCK3 = 16
const SCE_HA_PRAGMA = 17
const SCE_HA_PREPROCESSOR = 18
const SCE_HA_STRINGEOL = 19
const SCE_HA_RESERVED_OPERATOR = 20
const SCE_HA_LITERATE_COMMENT = 21
const SCE_HA_LITERATE_CODEDELIM = 22
const SCE_T3_DEFAULT = 0
const SCE_T3_X_DEFAULT = 1
const SCE_T3_PREPROCESSOR = 2
const SCE_T3_BLOCK_COMMENT = 3
const SCE_T3_LINE_COMMENT = 4
const SCE_T3_OPERATOR = 5
const SCE_T3_KEYWORD = 6
const SCE_T3_NUMBER = 7
const SCE_T3_IDENTIFIER = 8
const SCE_T3_S_STRING = 9
const SCE_T3_D_STRING = 10
const SCE_T3_X_STRING = 11
const SCE_T3_LIB_DIRECTIVE = 12
const SCE_T3_MSG_PARAM = 13
const SCE_T3_HTML_TAG = 14
const SCE_T3_HTML_DEFAULT = 15
const SCE_T3_HTML_STRING = 16
const SCE_T3_USER1 = 17
const SCE_T3_USER2 = 18
const SCE_T3_USER3 = 19
const SCE_T3_BRACE = 20
const SCE_REBOL_DEFAULT = 0
const SCE_REBOL_COMMENTLINE = 1
const SCE_REBOL_COMMENTBLOCK = 2
const SCE_REBOL_PREFACE = 3
const SCE_REBOL_OPERATOR = 4
const SCE_REBOL_CHARACTER = 5
const SCE_REBOL_QUOTEDSTRING = 6
const SCE_REBOL_BRACEDSTRING = 7
const SCE_REBOL_NUMBER = 8
const SCE_REBOL_PAIR = 9
const SCE_REBOL_TUPLE = 10
const SCE_REBOL_BINARY = 11
const SCE_REBOL_MONEY = 12
const SCE_REBOL_ISSUE = 13
const SCE_REBOL_TAG = 14
const SCE_REBOL_FILE = 15
const SCE_REBOL_EMAIL = 16
const SCE_REBOL_URL = 17
const SCE_REBOL_DATE = 18
const SCE_REBOL_TIME = 19
const SCE_REBOL_IDENTIFIER = 20
const SCE_REBOL_WORD = 21
const SCE_REBOL_WORD2 = 22
const SCE_REBOL_WORD3 = 23
const SCE_REBOL_WORD4 = 24
const SCE_REBOL_WORD5 = 25
const SCE_REBOL_WORD6 = 26
const SCE_REBOL_WORD7 = 27
const SCE_REBOL_WORD8 = 28
const SCE_SQL_DEFAULT = 0
const SCE_SQL_COMMENT = 1
const SCE_SQL_COMMENTLINE = 2
const SCE_SQL_COMMENTDOC = 3
const SCE_SQL_NUMBER = 4
const SCE_SQL_WORD = 5
const SCE_SQL_STRING = 6
const SCE_SQL_CHARACTER = 7
const SCE_SQL_SQLPLUS = 8
const SCE_SQL_SQLPLUS_PROMPT = 9
const SCE_SQL_OPERATOR = 10
const SCE_SQL_IDENTIFIER = 11
const SCE_SQL_SQLPLUS_COMMENT = 13
const SCE_SQL_COMMENTLINEDOC = 15
const SCE_SQL_WORD2 = 16
const SCE_SQL_COMMENTDOCKEYWORD = 17
const SCE_SQL_COMMENTDOCKEYWORDERROR = 18
const SCE_SQL_USER1 = 19
const SCE_SQL_USER2 = 20
const SCE_SQL_USER3 = 21
const SCE_SQL_USER4 = 22
const SCE_SQL_QUOTEDIDENTIFIER = 23
const SCE_SQL_QOPERATOR = 24
const SCE_ST_DEFAULT = 0
const SCE_ST_STRING = 1
const SCE_ST_NUMBER = 2
const SCE_ST_COMMENT = 3
const SCE_ST_SYMBOL = 4
const SCE_ST_BINARY = 5
const SCE_ST_BOOL = 6
const SCE_ST_SELF = 7
const SCE_ST_SUPER = 8
const SCE_ST_NIL = 9
const SCE_ST_GLOBAL = 10
const SCE_ST_RETURN = 11
const SCE_ST_SPECIAL = 12
const SCE_ST_KWSEND = 13
const SCE_ST_ASSIGN = 14
const SCE_ST_CHARACTER = 15
const SCE_ST_SPEC_SEL = 16
const SCE_FS_DEFAULT = 0
const SCE_FS_COMMENT = 1
const SCE_FS_COMMENTLINE = 2
const SCE_FS_COMMENTDOC = 3
const SCE_FS_COMMENTLINEDOC = 4
const SCE_FS_COMMENTDOCKEYWORD = 5
const SCE_FS_COMMENTDOCKEYWORDERROR = 6
const SCE_FS_KEYWORD = 7
const SCE_FS_KEYWORD2 = 8
const SCE_FS_KEYWORD3 = 9
const SCE_FS_KEYWORD4 = 10
const SCE_FS_NUMBER = 11
const SCE_FS_STRING = 12
const SCE_FS_PREPROCESSOR = 13
const SCE_FS_OPERATOR = 14
const SCE_FS_IDENTIFIER = 15
const SCE_FS_DATE = 16
const SCE_FS_STRINGEOL = 17
const SCE_FS_CONSTANT = 18
const SCE_FS_WORDOPERATOR = 19
const SCE_FS_DISABLEDCODE = 20
const SCE_FS_DEFAULT_C = 21
const SCE_FS_COMMENTDOC_C = 22
const SCE_FS_COMMENTLINEDOC_C = 23
const SCE_FS_KEYWORD_C = 24
const SCE_FS_KEYWORD2_C = 25
const SCE_FS_NUMBER_C = 26
const SCE_FS_STRING_C = 27
const SCE_FS_PREPROCESSOR_C = 28
const SCE_FS_OPERATOR_C = 29
const SCE_FS_IDENTIFIER_C = 30
const SCE_FS_STRINGEOL_C = 31
const SCE_CSOUND_DEFAULT = 0
const SCE_CSOUND_COMMENT = 1
const SCE_CSOUND_NUMBER = 2
const SCE_CSOUND_OPERATOR = 3
const SCE_CSOUND_INSTR = 4
const SCE_CSOUND_IDENTIFIER = 5
const SCE_CSOUND_OPCODE = 6
const SCE_CSOUND_HEADERSTMT = 7
const SCE_CSOUND_USERKEYWORD = 8
const SCE_CSOUND_COMMENTBLOCK = 9
const SCE_CSOUND_PARAM = 10
const SCE_CSOUND_ARATE_VAR = 11
const SCE_CSOUND_KRATE_VAR = 12
const SCE_CSOUND_IRATE_VAR = 13
const SCE_CSOUND_GLOBAL_VAR = 14
const SCE_CSOUND_STRINGEOL = 15
const SCE_INNO_DEFAULT = 0
const SCE_INNO_COMMENT = 1
const SCE_INNO_KEYWORD = 2
const SCE_INNO_PARAMETER = 3
const SCE_INNO_SECTION = 4
const SCE_INNO_PREPROC = 5
const SCE_INNO_INLINE_EXPANSION = 6
const SCE_INNO_COMMENT_PASCAL = 7
const SCE_INNO_KEYWORD_PASCAL = 8
const SCE_INNO_KEYWORD_USER = 9
const SCE_INNO_STRING_DOUBLE = 10
const SCE_INNO_STRING_SINGLE = 11
const SCE_INNO_IDENTIFIER = 12
const SCE_OPAL_SPACE = 0
const SCE_OPAL_COMMENT_BLOCK = 1
const SCE_OPAL_COMMENT_LINE = 2
const SCE_OPAL_INTEGER = 3
const SCE_OPAL_KEYWORD = 4
const SCE_OPAL_SORT = 5
const SCE_OPAL_STRING = 6
const SCE_OPAL_PAR = 7
const SCE_OPAL_BOOL_CONST = 8
const SCE_OPAL_DEFAULT = 32
const SCE_SPICE_DEFAULT = 0
const SCE_SPICE_IDENTIFIER = 1
const SCE_SPICE_KEYWORD = 2
const SCE_SPICE_KEYWORD2 = 3
const SCE_SPICE_KEYWORD3 = 4
const SCE_SPICE_NUMBER = 5
const SCE_SPICE_DELIMITER = 6
const SCE_SPICE_VALUE = 7
const SCE_SPICE_COMMENTLINE = 8
const SCE_CMAKE_DEFAULT = 0
const SCE_CMAKE_COMMENT = 1
const SCE_CMAKE_STRINGDQ = 2
const SCE_CMAKE_STRINGLQ = 3
const SCE_CMAKE_STRINGRQ = 4
const SCE_CMAKE_COMMANDS = 5
const SCE_CMAKE_PARAMETERS = 6
const SCE_CMAKE_VARIABLE = 7
const SCE_CMAKE_USERDEFINED = 8
const SCE_CMAKE_WHILEDEF = 9
const SCE_CMAKE_FOREACHDEF = 10
const SCE_CMAKE_IFDEFINEDEF = 11
const SCE_CMAKE_MACRODEF = 12
const SCE_CMAKE_STRINGVAR = 13
const SCE_CMAKE_NUMBER = 14
const SCE_GAP_DEFAULT = 0
const SCE_GAP_IDENTIFIER = 1
const SCE_GAP_KEYWORD = 2
const SCE_GAP_KEYWORD2 = 3
const SCE_GAP_KEYWORD3 = 4
const SCE_GAP_KEYWORD4 = 5
const SCE_GAP_STRING = 6
const SCE_GAP_CHAR = 7
const SCE_GAP_OPERATOR = 8
const SCE_GAP_COMMENT = 9
const SCE_GAP_NUMBER = 10
const SCE_GAP_STRINGEOL = 11
const SCE_PLM_DEFAULT = 0
const SCE_PLM_COMMENT = 1
const SCE_PLM_STRING = 2
const SCE_PLM_NUMBER = 3
const SCE_PLM_IDENTIFIER = 4
const SCE_PLM_OPERATOR = 5
const SCE_PLM_CONTROL = 6
const SCE_PLM_KEYWORD = 7
const SCE_ABL_DEFAULT = 0
const SCE_ABL_NUMBER = 1
const SCE_ABL_WORD = 2
const SCE_ABL_STRING = 3
const SCE_ABL_CHARACTER = 4
const SCE_ABL_PREPROCESSOR = 5
const SCE_ABL_OPERATOR = 6
const SCE_ABL_IDENTIFIER = 7
const SCE_ABL_BLOCK = 8
const SCE_ABL_END = 9
const SCE_ABL_COMMENT = 10
const SCE_ABL_TASKMARKER = 11
const SCE_ABL_LINECOMMENT = 12
const SCE_ABAQUS_DEFAULT = 0
const SCE_ABAQUS_COMMENT = 1
const SCE_ABAQUS_COMMENTBLOCK = 2
const SCE_ABAQUS_NUMBER = 3
const SCE_ABAQUS_STRING = 4
const SCE_ABAQUS_OPERATOR = 5
const SCE_ABAQUS_WORD = 6
const SCE_ABAQUS_PROCESSOR = 7
const SCE_ABAQUS_COMMAND = 8
const SCE_ABAQUS_SLASHCOMMAND = 9
const SCE_ABAQUS_STARCOMMAND = 10
const SCE_ABAQUS_ARGUMENT = 11
const SCE_ABAQUS_FUNCTION = 12
const SCE_ASY_DEFAULT = 0
const SCE_ASY_COMMENT = 1
const SCE_ASY_COMMENTLINE = 2
const SCE_ASY_NUMBER = 3
const SCE_ASY_WORD = 4
const SCE_ASY_STRING = 5
const SCE_ASY_CHARACTER = 6
const SCE_ASY_OPERATOR = 7
const SCE_ASY_IDENTIFIER = 8
const SCE_ASY_STRINGEOL = 9
const SCE_ASY_COMMENTLINEDOC = 10
const SCE_ASY_WORD2 = 11
const SCE_R_DEFAULT = 0
const SCE_R_COMMENT = 1
const SCE_R_KWORD = 2
const SCE_R_BASEKWORD = 3
const SCE_R_OTHERKWORD = 4
const SCE_R_NUMBER = 5
const SCE_R_STRING = 6
const SCE_R_STRING2 = 7
const SCE_R_OPERATOR = 8
const SCE_R_IDENTIFIER = 9
const SCE_R_INFIX = 10
const SCE_R_INFIXEOL = 11
const SCE_MAGIK_DEFAULT = 0
const SCE_MAGIK_COMMENT = 1
const SCE_MAGIK_HYPER_COMMENT = 16
const SCE_MAGIK_STRING = 2
const SCE_MAGIK_CHARACTER = 3
const SCE_MAGIK_NUMBER = 4
const SCE_MAGIK_IDENTIFIER = 5
const SCE_MAGIK_OPERATOR = 6
const SCE_MAGIK_FLOW = 7
const SCE_MAGIK_CONTAINER = 8
const SCE_MAGIK_BRACKET_BLOCK = 9
const SCE_MAGIK_BRACE_BLOCK = 10
const SCE_MAGIK_SQBRACKET_BLOCK = 11
const SCE_MAGIK_UNKNOWN_KEYWORD = 12
const SCE_MAGIK_KEYWORD = 13
const SCE_MAGIK_PRAGMA = 14
const SCE_MAGIK_SYMBOL = 15
const SCE_POWERSHELL_DEFAULT = 0
const SCE_POWERSHELL_COMMENT = 1
const SCE_POWERSHELL_STRING = 2
const SCE_POWERSHELL_CHARACTER = 3
const SCE_POWERSHELL_NUMBER = 4
const SCE_POWERSHELL_VARIABLE = 5
const SCE_POWERSHELL_OPERATOR = 6
const SCE_POWERSHELL_IDENTIFIER = 7
const SCE_POWERSHELL_KEYWORD = 8
const SCE_POWERSHELL_CMDLET = 9
const SCE_POWERSHELL_ALIAS = 10
const SCE_POWERSHELL_FUNCTION = 11
const SCE_POWERSHELL_USER1 = 12
const SCE_POWERSHELL_COMMENTSTREAM = 13
const SCE_POWERSHELL_HERE_STRING = 14
const SCE_POWERSHELL_HERE_CHARACTER = 15
const SCE_POWERSHELL_COMMENTDOCKEYWORD = 16
const SCE_MYSQL_DEFAULT = 0
const SCE_MYSQL_COMMENT = 1
const SCE_MYSQL_COMMENTLINE = 2
const SCE_MYSQL_VARIABLE = 3
const SCE_MYSQL_SYSTEMVARIABLE = 4
const SCE_MYSQL_KNOWNSYSTEMVARIABLE = 5
const SCE_MYSQL_NUMBER = 6
const SCE_MYSQL_MAJORKEYWORD = 7
const SCE_MYSQL_KEYWORD = 8
const SCE_MYSQL_DATABASEOBJECT = 9
const SCE_MYSQL_PROCEDUREKEYWORD = 10
const SCE_MYSQL_STRING = 11
const SCE_MYSQL_SQSTRING = 12
const SCE_MYSQL_DQSTRING = 13
const SCE_MYSQL_OPERATOR = 14
const SCE_MYSQL_FUNCTION = 15
const SCE_MYSQL_IDENTIFIER = 16
const SCE_MYSQL_QUOTEDIDENTIFIER = 17
const SCE_MYSQL_USER1 = 18
const SCE_MYSQL_USER2 = 19
const SCE_MYSQL_USER3 = 20
const SCE_MYSQL_HIDDENCOMMAND = 21
const SCE_MYSQL_PLACEHOLDER = 22
const SCE_PO_DEFAULT = 0
const SCE_PO_COMMENT = 1
const SCE_PO_MSGID = 2
const SCE_PO_MSGID_TEXT = 3
const SCE_PO_MSGSTR = 4
const SCE_PO_MSGSTR_TEXT = 5
const SCE_PO_MSGCTXT = 6
const SCE_PO_MSGCTXT_TEXT = 7
const SCE_PO_FUZZY = 8
const SCE_PO_PROGRAMMER_COMMENT = 9
const SCE_PO_REFERENCE = 10
const SCE_PO_FLAGS = 11
const SCE_PO_MSGID_TEXT_EOL = 12
const SCE_PO_MSGSTR_TEXT_EOL = 13
const SCE_PO_MSGCTXT_TEXT_EOL = 14
const SCE_PO_ERROR = 15
const SCE_PAS_DEFAULT = 0
const SCE_PAS_IDENTIFIER = 1
const SCE_PAS_COMMENT = 2
const SCE_PAS_COMMENT2 = 3
const SCE_PAS_COMMENTLINE = 4
const SCE_PAS_PREPROCESSOR = 5
const SCE_PAS_PREPROCESSOR2 = 6
const SCE_PAS_NUMBER = 7
const SCE_PAS_HEXNUMBER = 8
const SCE_PAS_WORD = 9
const SCE_PAS_STRING = 10
const SCE_PAS_STRINGEOL = 11
const SCE_PAS_CHARACTER = 12
const SCE_PAS_OPERATOR = 13
const SCE_PAS_ASM = 14
const SCE_SORCUS_DEFAULT = 0
const SCE_SORCUS_COMMAND = 1
const SCE_SORCUS_PARAMETER = 2
const SCE_SORCUS_COMMENTLINE = 3
const SCE_SORCUS_STRING = 4
const SCE_SORCUS_STRINGEOL = 5
const SCE_SORCUS_IDENTIFIER = 6
const SCE_SORCUS_OPERATOR = 7
const SCE_SORCUS_NUMBER = 8
const SCE_SORCUS_CONSTANT = 9
const SCE_POWERPRO_DEFAULT = 0
const SCE_POWERPRO_COMMENTBLOCK = 1
const SCE_POWERPRO_COMMENTLINE = 2
const SCE_POWERPRO_NUMBER = 3
const SCE_POWERPRO_WORD = 4
const SCE_POWERPRO_WORD2 = 5
const SCE_POWERPRO_WORD3 = 6
const SCE_POWERPRO_WORD4 = 7
const SCE_POWERPRO_DOUBLEQUOTEDSTRING = 8
const SCE_POWERPRO_SINGLEQUOTEDSTRING = 9
const SCE_POWERPRO_LINECONTINUE = 10
const SCE_POWERPRO_OPERATOR = 11
const SCE_POWERPRO_IDENTIFIER = 12
const SCE_POWERPRO_STRINGEOL = 13
const SCE_POWERPRO_VERBATIM = 14
const SCE_POWERPRO_ALTQUOTE = 15
const SCE_POWERPRO_FUNCTION = 16
const SCE_SML_DEFAULT = 0
const SCE_SML_IDENTIFIER = 1
const SCE_SML_TAGNAME = 2
const SCE_SML_KEYWORD = 3
const SCE_SML_KEYWORD2 = 4
const SCE_SML_KEYWORD3 = 5
const SCE_SML_LINENUM = 6
const SCE_SML_OPERATOR = 7
const SCE_SML_NUMBER = 8
const SCE_SML_CHAR = 9
const SCE_SML_STRING = 11
const SCE_SML_COMMENT = 12
const SCE_SML_COMMENT1 = 13
const SCE_SML_COMMENT2 = 14
const SCE_SML_COMMENT3 = 15
const SCE_MARKDOWN_DEFAULT = 0
const SCE_MARKDOWN_LINE_BEGIN = 1
const SCE_MARKDOWN_STRONG1 = 2
const SCE_MARKDOWN_STRONG2 = 3
const SCE_MARKDOWN_EM1 = 4
const SCE_MARKDOWN_EM2 = 5
const SCE_MARKDOWN_HEADER1 = 6
const SCE_MARKDOWN_HEADER2 = 7
const SCE_MARKDOWN_HEADER3 = 8
const SCE_MARKDOWN_HEADER4 = 9
const SCE_MARKDOWN_HEADER5 = 10
const SCE_MARKDOWN_HEADER6 = 11
const SCE_MARKDOWN_PRECHAR = 12
const SCE_MARKDOWN_ULIST_ITEM = 13
const SCE_MARKDOWN_OLIST_ITEM = 14
const SCE_MARKDOWN_BLOCKQUOTE = 15
const SCE_MARKDOWN_STRIKEOUT = 16
const SCE_MARKDOWN_HRULE = 17
const SCE_MARKDOWN_LINK = 18
const SCE_MARKDOWN_CODE = 19
const SCE_MARKDOWN_CODE2 = 20
const SCE_MARKDOWN_CODEBK = 21
const SCE_TXT2TAGS_DEFAULT = 0
const SCE_TXT2TAGS_LINE_BEGIN = 1
const SCE_TXT2TAGS_STRONG1 = 2
const SCE_TXT2TAGS_STRONG2 = 3
const SCE_TXT2TAGS_EM1 = 4
const SCE_TXT2TAGS_EM2 = 5
const SCE_TXT2TAGS_HEADER1 = 6
const SCE_TXT2TAGS_HEADER2 = 7
const SCE_TXT2TAGS_HEADER3 = 8
const SCE_TXT2TAGS_HEADER4 = 9
const SCE_TXT2TAGS_HEADER5 = 10
const SCE_TXT2TAGS_HEADER6 = 11
const SCE_TXT2TAGS_PRECHAR = 12
const SCE_TXT2TAGS_ULIST_ITEM = 13
const SCE_TXT2TAGS_OLIST_ITEM = 14
const SCE_TXT2TAGS_BLOCKQUOTE = 15
const SCE_TXT2TAGS_STRIKEOUT = 16
const SCE_TXT2TAGS_HRULE = 17
const SCE_TXT2TAGS_LINK = 18
const SCE_TXT2TAGS_CODE = 19
const SCE_TXT2TAGS_CODE2 = 20
const SCE_TXT2TAGS_CODEBK = 21
const SCE_TXT2TAGS_COMMENT = 22
const SCE_TXT2TAGS_OPTION = 23
const SCE_TXT2TAGS_PREPROC = 24
const SCE_TXT2TAGS_POSTPROC = 25
const SCE_A68K_DEFAULT = 0
const SCE_A68K_COMMENT = 1
const SCE_A68K_NUMBER_DEC = 2
const SCE_A68K_NUMBER_BIN = 3
const SCE_A68K_NUMBER_HEX = 4
const SCE_A68K_STRING1 = 5
const SCE_A68K_OPERATOR = 6
const SCE_A68K_CPUINSTRUCTION = 7
const SCE_A68K_EXTINSTRUCTION = 8
const SCE_A68K_REGISTER = 9
const SCE_A68K_DIRECTIVE = 10
const SCE_A68K_MACRO_ARG = 11
const SCE_A68K_LABEL = 12
const SCE_A68K_STRING2 = 13
const SCE_A68K_IDENTIFIER = 14
const SCE_A68K_MACRO_DECLARATION = 15
const SCE_A68K_COMMENT_WORD = 16
const SCE_A68K_COMMENT_SPECIAL = 17
const SCE_A68K_COMMENT_DOXYGEN = 18
const SCE_MODULA_DEFAULT = 0
const SCE_MODULA_COMMENT = 1
const SCE_MODULA_DOXYCOMM = 2
const SCE_MODULA_DOXYKEY = 3
const SCE_MODULA_KEYWORD = 4
const SCE_MODULA_RESERVED = 5
const SCE_MODULA_NUMBER = 6
const SCE_MODULA_BASENUM = 7
const SCE_MODULA_FLOAT = 8
const SCE_MODULA_STRING = 9
const SCE_MODULA_STRSPEC = 10
const SCE_MODULA_CHAR = 11
const SCE_MODULA_CHARSPEC = 12
const SCE_MODULA_PROC = 13
const SCE_MODULA_PRAGMA = 14
const SCE_MODULA_PRGKEY = 15
const SCE_MODULA_OPERATOR = 16
const SCE_MODULA_BADSTR = 17
const SCE_COFFEESCRIPT_DEFAULT = 0
const SCE_COFFEESCRIPT_COMMENT = 1
const SCE_COFFEESCRIPT_COMMENTLINE = 2
const SCE_COFFEESCRIPT_COMMENTDOC = 3
const SCE_COFFEESCRIPT_NUMBER = 4
const SCE_COFFEESCRIPT_WORD = 5
const SCE_COFFEESCRIPT_STRING = 6
const SCE_COFFEESCRIPT_CHARACTER = 7
const SCE_COFFEESCRIPT_UUID = 8
const SCE_COFFEESCRIPT_PREPROCESSOR = 9
const SCE_COFFEESCRIPT_OPERATOR = 10
const SCE_COFFEESCRIPT_IDENTIFIER = 11
const SCE_COFFEESCRIPT_STRINGEOL = 12
const SCE_COFFEESCRIPT_VERBATIM = 13
const SCE_COFFEESCRIPT_REGEX = 14
const SCE_COFFEESCRIPT_COMMENTLINEDOC = 15
const SCE_COFFEESCRIPT_WORD2 = 16
const SCE_COFFEESCRIPT_COMMENTDOCKEYWORD = 17
const SCE_COFFEESCRIPT_COMMENTDOCKEYWORDERROR = 18
const SCE_COFFEESCRIPT_GLOBALCLASS = 19
const SCE_COFFEESCRIPT_STRINGRAW = 20
const SCE_COFFEESCRIPT_TRIPLEVERBATIM = 21
const SCE_COFFEESCRIPT_COMMENTBLOCK = 22
const SCE_COFFEESCRIPT_VERBOSE_REGEX = 23
const SCE_COFFEESCRIPT_VERBOSE_REGEX_COMMENT = 24
const SCE_COFFEESCRIPT_INSTANCEPROPERTY = 25
const SCE_AVS_DEFAULT = 0
const SCE_AVS_COMMENTBLOCK = 1
const SCE_AVS_COMMENTBLOCKN = 2
const SCE_AVS_COMMENTLINE = 3
const SCE_AVS_NUMBER = 4
const SCE_AVS_OPERATOR = 5
const SCE_AVS_IDENTIFIER = 6
const SCE_AVS_STRING = 7
const SCE_AVS_TRIPLESTRING = 8
const SCE_AVS_KEYWORD = 9
const SCE_AVS_FILTER = 10
const SCE_AVS_PLUGIN = 11
const SCE_AVS_FUNCTION = 12
const SCE_AVS_CLIPPROP = 13
const SCE_AVS_USERDFN = 14
const SCE_ECL_DEFAULT = 0
const SCE_ECL_COMMENT = 1
const SCE_ECL_COMMENTLINE = 2
const SCE_ECL_NUMBER = 3
const SCE_ECL_STRING = 4
const SCE_ECL_WORD0 = 5
const SCE_ECL_OPERATOR = 6
const SCE_ECL_CHARACTER = 7
const SCE_ECL_UUID = 8
const SCE_ECL_PREPROCESSOR = 9
const SCE_ECL_UNKNOWN = 10
const SCE_ECL_IDENTIFIER = 11
const SCE_ECL_STRINGEOL = 12
const SCE_ECL_VERBATIM = 13
const SCE_ECL_REGEX = 14
const SCE_ECL_COMMENTLINEDOC = 15
const SCE_ECL_WORD1 = 16
const SCE_ECL_COMMENTDOCKEYWORD = 17
const SCE_ECL_COMMENTDOCKEYWORDERROR = 18
const SCE_ECL_WORD2 = 19
const SCE_ECL_WORD3 = 20
const SCE_ECL_WORD4 = 21
const SCE_ECL_WORD5 = 22
const SCE_ECL_COMMENTDOC = 23
const SCE_ECL_ADDED = 24
const SCE_ECL_DELETED = 25
const SCE_ECL_CHANGED = 26
const SCE_ECL_MOVED = 27
const SCE_OSCRIPT_DEFAULT = 0
const SCE_OSCRIPT_LINE_COMMENT = 1
const SCE_OSCRIPT_BLOCK_COMMENT = 2
const SCE_OSCRIPT_DOC_COMMENT = 3
const SCE_OSCRIPT_PREPROCESSOR = 4
const SCE_OSCRIPT_NUMBER = 5
const SCE_OSCRIPT_SINGLEQUOTE_STRING = 6
const SCE_OSCRIPT_DOUBLEQUOTE_STRING = 7
const SCE_OSCRIPT_CONSTANT = 8
const SCE_OSCRIPT_IDENTIFIER = 9
const SCE_OSCRIPT_GLOBAL = 10
const SCE_OSCRIPT_KEYWORD = 11
const SCE_OSCRIPT_OPERATOR = 12
const SCE_OSCRIPT_LABEL = 13
const SCE_OSCRIPT_TYPE = 14
const SCE_OSCRIPT_FUNCTION = 15
const SCE_OSCRIPT_OBJECT = 16
const SCE_OSCRIPT_PROPERTY = 17
const SCE_OSCRIPT_METHOD = 18
const SCE_VISUALPROLOG_DEFAULT = 0
const SCE_VISUALPROLOG_KEY_MAJOR = 1
const SCE_VISUALPROLOG_KEY_MINOR = 2
const SCE_VISUALPROLOG_KEY_DIRECTIVE = 3
const SCE_VISUALPROLOG_COMMENT_BLOCK = 4
const SCE_VISUALPROLOG_COMMENT_LINE = 5
const SCE_VISUALPROLOG_COMMENT_KEY = 6
const SCE_VISUALPROLOG_COMMENT_KEY_ERROR = 7
const SCE_VISUALPROLOG_IDENTIFIER = 8
const SCE_VISUALPROLOG_VARIABLE = 9
const SCE_VISUALPROLOG_ANONYMOUS = 10
const SCE_VISUALPROLOG_NUMBER = 11
const SCE_VISUALPROLOG_OPERATOR = 12
const SCE_VISUALPROLOG_CHARACTER = 13
const SCE_VISUALPROLOG_CHARACTER_TOO_MANY = 14
const SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR = 15
const SCE_VISUALPROLOG_STRING = 16
const SCE_VISUALPROLOG_STRING_ESCAPE = 17
const SCE_VISUALPROLOG_STRING_ESCAPE_ERROR = 18
const SCE_VISUALPROLOG_STRING_EOL_OPEN = 19
const SCE_VISUALPROLOG_STRING_VERBATIM = 20
const SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL = 21
const SCE_VISUALPROLOG_STRING_VERBATIM_EOL = 22
const SCE_STTXT_DEFAULT = 0
const SCE_STTXT_COMMENT = 1
const SCE_STTXT_COMMENTLINE = 2
const SCE_STTXT_KEYWORD = 3
const SCE_STTXT_TYPE = 4
const SCE_STTXT_FUNCTION = 5
const SCE_STTXT_FB = 6
const SCE_STTXT_NUMBER = 7
const SCE_STTXT_HEXNUMBER = 8
const SCE_STTXT_PRAGMA = 9
const SCE_STTXT_OPERATOR = 10
const SCE_STTXT_CHARACTER = 11
const SCE_STTXT_STRING1 = 12
const SCE_STTXT_STRING2 = 13
const SCE_STTXT_STRINGEOL = 14
const SCE_STTXT_IDENTIFIER = 15
const SCE_STTXT_DATETIME = 16
const SCE_STTXT_VARS = 17
const SCE_STTXT_PRAGMAS = 18
const SCE_KVIRC_DEFAULT = 0
const SCE_KVIRC_COMMENT = 1
const SCE_KVIRC_COMMENTBLOCK = 2
const SCE_KVIRC_STRING = 3
const SCE_KVIRC_WORD = 4
const SCE_KVIRC_KEYWORD = 5
const SCE_KVIRC_FUNCTION_KEYWORD = 6
const SCE_KVIRC_FUNCTION = 7
const SCE_KVIRC_VARIABLE = 8
const SCE_KVIRC_NUMBER = 9
const SCE_KVIRC_OPERATOR = 10
const SCE_KVIRC_STRING_FUNCTION = 11
const SCE_KVIRC_STRING_VARIABLE = 12
const SCE_RUST_DEFAULT = 0
const SCE_RUST_COMMENTBLOCK = 1
const SCE_RUST_COMMENTLINE = 2
const SCE_RUST_COMMENTBLOCKDOC = 3
const SCE_RUST_COMMENTLINEDOC = 4
const SCE_RUST_NUMBER = 5
const SCE_RUST_WORD = 6
const SCE_RUST_WORD2 = 7
const SCE_RUST_WORD3 = 8
const SCE_RUST_WORD4 = 9
const SCE_RUST_WORD5 = 10
const SCE_RUST_WORD6 = 11
const SCE_RUST_WORD7 = 12
const SCE_RUST_STRING = 13
const SCE_RUST_STRINGR = 14
const SCE_RUST_CHARACTER = 15
const SCE_RUST_OPERATOR = 16
const SCE_RUST_IDENTIFIER = 17
const SCE_RUST_LIFETIME = 18
const SCE_RUST_MACRO = 19
const SCE_RUST_LEXERROR = 20
const SCE_RUST_BYTESTRING = 21
const SCE_RUST_BYTESTRINGR = 22
const SCE_RUST_BYTECHARACTER = 23
const SCE_DMAP_DEFAULT = 0
const SCE_DMAP_COMMENT = 1
const SCE_DMAP_NUMBER = 2
const SCE_DMAP_STRING1 = 3
const SCE_DMAP_STRING2 = 4
const SCE_DMAP_STRINGEOL = 5
const SCE_DMAP_OPERATOR = 6
const SCE_DMAP_IDENTIFIER = 7
const SCE_DMAP_WORD = 8
const SCE_DMAP_WORD2 = 9
const SCE_DMAP_WORD3 = 10
const SCE_DMIS_DEFAULT = 0
const SCE_DMIS_COMMENT = 1
const SCE_DMIS_STRING = 2
const SCE_DMIS_NUMBER = 3
const SCE_DMIS_KEYWORD = 4
const SCE_DMIS_MAJORWORD = 5
const SCE_DMIS_MINORWORD = 6
const SCE_DMIS_UNSUPPORTED_MAJOR = 7
const SCE_DMIS_UNSUPPORTED_MINOR = 8
const SCE_DMIS_LABEL = 9
const SCE_REG_DEFAULT = 0
const SCE_REG_COMMENT = 1
const SCE_REG_VALUENAME = 2
const SCE_REG_STRING = 3
const SCE_REG_HEXDIGIT = 4
const SCE_REG_VALUETYPE = 5
const SCE_REG_ADDEDKEY = 6
const SCE_REG_DELETEDKEY = 7
const SCE_REG_ESCAPED = 8
const SCE_REG_KEYPATH_GUID = 9
const SCE_REG_STRING_GUID = 10
const SCE_REG_PARAMETER = 11
const SCE_REG_OPERATOR = 12
const SCE_BIBTEX_DEFAULT = 0
const SCE_BIBTEX_ENTRY = 1
const SCE_BIBTEX_UNKNOWN_ENTRY = 2
const SCE_BIBTEX_KEY = 3
const SCE_BIBTEX_PARAMETER = 4
const SCE_BIBTEX_VALUE = 5
const SCE_BIBTEX_COMMENT = 6
const SCE_HEX_DEFAULT = 0
const SCE_HEX_RECSTART = 1
const SCE_HEX_RECTYPE = 2
const SCE_HEX_RECTYPE_UNKNOWN = 3
const SCE_HEX_BYTECOUNT = 4
const SCE_HEX_BYTECOUNT_WRONG = 5
const SCE_HEX_NOADDRESS = 6
const SCE_HEX_DATAADDRESS = 7
const SCE_HEX_RECCOUNT = 8
const SCE_HEX_STARTADDRESS = 9
const SCE_HEX_ADDRESSFIELD_UNKNOWN = 10
const SCE_HEX_EXTENDEDADDRESS = 11
const SCE_HEX_DATA_ODD = 12
const SCE_HEX_DATA_EVEN = 13
const SCE_HEX_DATA_UNKNOWN = 14
const SCE_HEX_DATA_EMPTY = 15
const SCE_HEX_CHECKSUM = 16
const SCE_HEX_CHECKSUM_WRONG = 17
const SCE_HEX_GARBAGE = 18
const SCE_JSON_DEFAULT = 0
const SCE_JSON_NUMBER = 1
const SCE_JSON_STRING = 2
const SCE_JSON_STRINGEOL = 3
const SCE_JSON_PROPERTYNAME = 4
const SCE_JSON_ESCAPESEQUENCE = 5
const SCE_JSON_LINECOMMENT = 6
const SCE_JSON_BLOCKCOMMENT = 7
const SCE_JSON_OPERATOR = 8
const SCE_JSON_URI = 9
const SCE_JSON_COMPACTIRI = 10
const SCE_JSON_KEYWORD = 11
const SCE_JSON_LDKEYWORD = 12
const SCE_JSON_ERROR = 13
const SCE_EDI_DEFAULT = 0
const SCE_EDI_SEGMENTSTART = 1
const SCE_EDI_SEGMENTEND = 2
const SCE_EDI_SEP_ELEMENT = 3
const SCE_EDI_SEP_COMPOSITE = 4
const SCE_EDI_SEP_RELEASE = 5
const SCE_EDI_UNA = 6
const SCE_EDI_UNH = 7
const SCE_EDI_BADSEGMENT = 8
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
scintilla.bi
Code: Select all
#pragma once
#include once "crt/long.bi"
#include once "crt/stdint.bi"
extern "C"
#define SCINTILLA_H
#ifdef __FB_WIN32__
declare function Scintilla_RegisterClasses(byval hInstance as any ptr) as long
declare function Scintilla_ReleaseResources() as long
#endif
declare function Scintilla_LinkLexers() as long
type uptr_t as uinteger
type sptr_t as integer
#define SCI_POSITION_H
type Sci_Position as long
type Sci_PositionU as ulong
type Sci_PositionCR as clong
type SciFnDirect as function(byval ptr as sptr_t, byval iMessage as ulong, byval wParam as uptr_t, byval lParam as sptr_t) as sptr_t
const INVALID_POSITION = -1
const SCI_START = 2000
const SCI_OPTIONAL_START = 3000
const SCI_LEXER_START = 4000
const SCI_ADDTEXT = 2001
const SCI_ADDSTYLEDTEXT = 2002
const SCI_INSERTTEXT = 2003
const SCI_CHANGEINSERTION = 2672
const SCI_CLEARALL = 2004
const SCI_DELETERANGE = 2645
const SCI_CLEARDOCUMENTSTYLE = 2005
const SCI_GETLENGTH = 2006
const SCI_GETCHARAT = 2007
const SCI_GETCURRENTPOS = 2008
const SCI_GETANCHOR = 2009
const SCI_GETSTYLEAT = 2010
const SCI_REDO = 2011
const SCI_SETUNDOCOLLECTION = 2012
const SCI_SELECTALL = 2013
const SCI_SETSAVEPOINT = 2014
const SCI_GETSTYLEDTEXT = 2015
const SCI_CANREDO = 2016
const SCI_MARKERLINEFROMHANDLE = 2017
const SCI_MARKERDELETEHANDLE = 2018
const SCI_GETUNDOCOLLECTION = 2019
const SCWS_INVISIBLE = 0
const SCWS_VISIBLEALWAYS = 1
const SCWS_VISIBLEAFTERINDENT = 2
const SCWS_VISIBLEONLYININDENT = 3
const SCI_GETVIEWWS = 2020
const SCI_SETVIEWWS = 2021
const SCTD_LONGARROW = 0
const SCTD_STRIKEOUT = 1
const SCI_GETTABDRAWMODE = 2698
const SCI_SETTABDRAWMODE = 2699
const SCI_POSITIONFROMPOINT = 2022
const SCI_POSITIONFROMPOINTCLOSE = 2023
const SCI_GOTOLINE = 2024
const SCI_GOTOPOS = 2025
const SCI_SETANCHOR = 2026
const SCI_GETCURLINE = 2027
const SCI_GETENDSTYLED = 2028
const SC_EOL_CRLF = 0
const SC_EOL_CR = 1
const SC_EOL_LF = 2
const SCI_CONVERTEOLS = 2029
const SCI_GETEOLMODE = 2030
const SCI_SETEOLMODE = 2031
const SCI_STARTSTYLING = 2032
const SCI_SETSTYLING = 2033
const SCI_GETBUFFEREDDRAW = 2034
const SCI_SETBUFFEREDDRAW = 2035
const SCI_SETTABWIDTH = 2036
const SCI_GETTABWIDTH = 2121
const SCI_CLEARTABSTOPS = 2675
const SCI_ADDTABSTOP = 2676
const SCI_GETNEXTTABSTOP = 2677
const SC_CP_UTF8 = 65001
const SCI_SETCODEPAGE = 2037
const SC_IME_WINDOWED = 0
const SC_IME_INLINE = 1
const SCI_GETIMEINTERACTION = 2678
const SCI_SETIMEINTERACTION = 2679
const MARKER_MAX = 31
const SC_MARK_CIRCLE = 0
const SC_MARK_ROUNDRECT = 1
const SC_MARK_ARROW = 2
const SC_MARK_SMALLRECT = 3
const SC_MARK_SHORTARROW = 4
const SC_MARK_EMPTY = 5
const SC_MARK_ARROWDOWN = 6
const SC_MARK_MINUS = 7
const SC_MARK_PLUS = 8
const SC_MARK_VLINE = 9
const SC_MARK_LCORNER = 10
const SC_MARK_TCORNER = 11
const SC_MARK_BOXPLUS = 12
const SC_MARK_BOXPLUSCONNECTED = 13
const SC_MARK_BOXMINUS = 14
const SC_MARK_BOXMINUSCONNECTED = 15
const SC_MARK_LCORNERCURVE = 16
const SC_MARK_TCORNERCURVE = 17
const SC_MARK_CIRCLEPLUS = 18
const SC_MARK_CIRCLEPLUSCONNECTED = 19
const SC_MARK_CIRCLEMINUS = 20
const SC_MARK_CIRCLEMINUSCONNECTED = 21
const SC_MARK_BACKGROUND = 22
const SC_MARK_DOTDOTDOT = 23
const SC_MARK_ARROWS = 24
const SC_MARK_PIXMAP = 25
const SC_MARK_FULLRECT = 26
const SC_MARK_LEFTRECT = 27
const SC_MARK_AVAILABLE = 28
const SC_MARK_UNDERLINE = 29
const SC_MARK_RGBAIMAGE = 30
const SC_MARK_BOOKMARK = 31
const SC_MARK_CHARACTER = 10000
const SC_MARKNUM_FOLDEREND = 25
const SC_MARKNUM_FOLDEROPENMID = 26
const SC_MARKNUM_FOLDERMIDTAIL = 27
const SC_MARKNUM_FOLDERTAIL = 28
const SC_MARKNUM_FOLDERSUB = 29
const SC_MARKNUM_FOLDER = 30
const SC_MARKNUM_FOLDEROPEN = 31
const SC_MASK_FOLDERS = &hFE000000
const SCI_MARKERDEFINE = 2040
const SCI_MARKERSETFORE = 2041
const SCI_MARKERSETBACK = 2042
const SCI_MARKERSETBACKSELECTED = 2292
const SCI_MARKERENABLEHIGHLIGHT = 2293
const SCI_MARKERADD = 2043
const SCI_MARKERDELETE = 2044
const SCI_MARKERDELETEALL = 2045
const SCI_MARKERGET = 2046
const SCI_MARKERNEXT = 2047
const SCI_MARKERPREVIOUS = 2048
const SCI_MARKERDEFINEPIXMAP = 2049
const SCI_MARKERADDSET = 2466
const SCI_MARKERSETALPHA = 2476
const SC_MAX_MARGIN = 4
const SC_MARGIN_SYMBOL = 0
const SC_MARGIN_NUMBER = 1
const SC_MARGIN_BACK = 2
const SC_MARGIN_FORE = 3
const SC_MARGIN_TEXT = 4
const SC_MARGIN_RTEXT = 5
const SC_MARGIN_COLOUR = 6
const SCI_SETMARGINTYPEN = 2240
const SCI_GETMARGINTYPEN = 2241
const SCI_SETMARGINWIDTHN = 2242
const SCI_GETMARGINWIDTHN = 2243
const SCI_SETMARGINMASKN = 2244
const SCI_GETMARGINMASKN = 2245
const SCI_SETMARGINSENSITIVEN = 2246
const SCI_GETMARGINSENSITIVEN = 2247
const SCI_SETMARGINCURSORN = 2248
const SCI_GETMARGINCURSORN = 2249
const SCI_SETMARGINBACKN = 2250
const SCI_GETMARGINBACKN = 2251
const SCI_SETMARGINS = 2252
const SCI_GETMARGINS = 2253
const STYLE_DEFAULT = 32
const STYLE_LINENUMBER = 33
const STYLE_BRACELIGHT = 34
const STYLE_BRACEBAD = 35
const STYLE_CONTROLCHAR = 36
const STYLE_INDENTGUIDE = 37
const STYLE_CALLTIP = 38
const STYLE_FOLDDISPLAYTEXT = 39
const STYLE_LASTPREDEFINED = 39
const STYLE_MAX = 255
const SC_CHARSET_ANSI = 0
const SC_CHARSET_DEFAULT = 1
const SC_CHARSET_BALTIC = 186
const SC_CHARSET_CHINESEBIG5 = 136
const SC_CHARSET_EASTEUROPE = 238
const SC_CHARSET_GB2312 = 134
const SC_CHARSET_GREEK = 161
const SC_CHARSET_HANGUL = 129
const SC_CHARSET_MAC = 77
const SC_CHARSET_OEM = 255
const SC_CHARSET_RUSSIAN = 204
const SC_CHARSET_OEM866 = 866
const SC_CHARSET_CYRILLIC = 1251
const SC_CHARSET_SHIFTJIS = 128
const SC_CHARSET_SYMBOL = 2
const SC_CHARSET_TURKISH = 162
const SC_CHARSET_JOHAB = 130
const SC_CHARSET_HEBREW = 177
const SC_CHARSET_ARABIC = 178
const SC_CHARSET_VIETNAMESE = 163
const SC_CHARSET_THAI = 222
const SC_CHARSET_8859_15 = 1000
const SCI_STYLECLEARALL = 2050
const SCI_STYLESETFORE = 2051
const SCI_STYLESETBACK = 2052
const SCI_STYLESETBOLD = 2053
const SCI_STYLESETITALIC = 2054
const SCI_STYLESETSIZE = 2055
const SCI_STYLESETFONT = 2056
const SCI_STYLESETEOLFILLED = 2057
const SCI_STYLERESETDEFAULT = 2058
const SCI_STYLESETUNDERLINE = 2059
const SC_CASE_MIXED = 0
const SC_CASE_UPPER = 1
const SC_CASE_LOWER = 2
const SC_CASE_CAMEL = 3
const SCI_STYLEGETFORE = 2481
const SCI_STYLEGETBACK = 2482
const SCI_STYLEGETBOLD = 2483
const SCI_STYLEGETITALIC = 2484
const SCI_STYLEGETSIZE = 2485
const SCI_STYLEGETFONT = 2486
const SCI_STYLEGETEOLFILLED = 2487
const SCI_STYLEGETUNDERLINE = 2488
const SCI_STYLEGETCASE = 2489
const SCI_STYLEGETCHARACTERSET = 2490
const SCI_STYLEGETVISIBLE = 2491
const SCI_STYLEGETCHANGEABLE = 2492
const SCI_STYLEGETHOTSPOT = 2493
const SCI_STYLESETCASE = 2060
const SC_FONT_SIZE_MULTIPLIER = 100
const SCI_STYLESETSIZEFRACTIONAL = 2061
const SCI_STYLEGETSIZEFRACTIONAL = 2062
const SC_WEIGHT_NORMAL = 400
const SC_WEIGHT_SEMIBOLD = 600
const SC_WEIGHT_BOLD = 700
const SCI_STYLESETWEIGHT = 2063
const SCI_STYLEGETWEIGHT = 2064
const SCI_STYLESETCHARACTERSET = 2066
const SCI_STYLESETHOTSPOT = 2409
const SCI_SETSELFORE = 2067
const SCI_SETSELBACK = 2068
const SCI_GETSELALPHA = 2477
const SCI_SETSELALPHA = 2478
const SCI_GETSELEOLFILLED = 2479
const SCI_SETSELEOLFILLED = 2480
const SCI_SETCARETFORE = 2069
const SCI_ASSIGNCMDKEY = 2070
const SCI_CLEARCMDKEY = 2071
const SCI_CLEARALLCMDKEYS = 2072
const SCI_SETSTYLINGEX = 2073
const SCI_STYLESETVISIBLE = 2074
const SCI_GETCARETPERIOD = 2075
const SCI_SETCARETPERIOD = 2076
const SCI_SETWORDCHARS = 2077
const SCI_GETWORDCHARS = 2646
const SCI_BEGINUNDOACTION = 2078
const SCI_ENDUNDOACTION = 2079
const INDIC_PLAIN = 0
const INDIC_SQUIGGLE = 1
const INDIC_TT = 2
const INDIC_DIAGONAL = 3
const INDIC_STRIKE = 4
const INDIC_HIDDEN = 5
const INDIC_BOX = 6
const INDIC_ROUNDBOX = 7
const INDIC_STRAIGHTBOX = 8
const INDIC_DASH = 9
const INDIC_DOTS = 10
const INDIC_SQUIGGLELOW = 11
const INDIC_DOTBOX = 12
const INDIC_SQUIGGLEPIXMAP = 13
const INDIC_COMPOSITIONTHICK = 14
const INDIC_COMPOSITIONTHIN = 15
const INDIC_FULLBOX = 16
const INDIC_TEXTFORE = 17
const INDIC_POINT = 18
const INDIC_POINTCHARACTER = 19
const INDIC_IME = 32
const INDIC_IME_MAX = 35
const INDIC_MAX = 35
const INDIC_CONTAINER = 8
const INDIC0_MASK = &h20
const INDIC1_MASK = &h40
const INDIC2_MASK = &h80
const INDICS_MASK = &hE0
const SCI_INDICSETSTYLE = 2080
const SCI_INDICGETSTYLE = 2081
const SCI_INDICSETFORE = 2082
const SCI_INDICGETFORE = 2083
const SCI_INDICSETUNDER = 2510
const SCI_INDICGETUNDER = 2511
const SCI_INDICSETHOVERSTYLE = 2680
const SCI_INDICGETHOVERSTYLE = 2681
const SCI_INDICSETHOVERFORE = 2682
const SCI_INDICGETHOVERFORE = 2683
const SC_INDICVALUEBIT = &h1000000
const SC_INDICVALUEMASK = &hFFFFFF
const SC_INDICFLAG_VALUEFORE = 1
const SCI_INDICSETFLAGS = 2684
const SCI_INDICGETFLAGS = 2685
const SCI_SETWHITESPACEFORE = 2084
const SCI_SETWHITESPACEBACK = 2085
const SCI_SETWHITESPACESIZE = 2086
const SCI_GETWHITESPACESIZE = 2087
const SCI_SETSTYLEBITS = 2090
const SCI_GETSTYLEBITS = 2091
const SCI_SETLINESTATE = 2092
const SCI_GETLINESTATE = 2093
const SCI_GETMAXLINESTATE = 2094
const SCI_GETCARETLINEVISIBLE = 2095
const SCI_SETCARETLINEVISIBLE = 2096
const SCI_GETCARETLINEBACK = 2097
const SCI_SETCARETLINEBACK = 2098
const SCI_STYLESETCHANGEABLE = 2099
const SCI_AUTOCSHOW = 2100
const SCI_AUTOCCANCEL = 2101
const SCI_AUTOCACTIVE = 2102
const SCI_AUTOCPOSSTART = 2103
const SCI_AUTOCCOMPLETE = 2104
const SCI_AUTOCSTOPS = 2105
const SCI_AUTOCSETSEPARATOR = 2106
const SCI_AUTOCGETSEPARATOR = 2107
const SCI_AUTOCSELECT = 2108
const SCI_AUTOCSETCANCELATSTART = 2110
const SCI_AUTOCGETCANCELATSTART = 2111
const SCI_AUTOCSETFILLUPS = 2112
const SCI_AUTOCSETCHOOSESINGLE = 2113
const SCI_AUTOCGETCHOOSESINGLE = 2114
const SCI_AUTOCSETIGNORECASE = 2115
const SCI_AUTOCGETIGNORECASE = 2116
const SCI_USERLISTSHOW = 2117
const SCI_AUTOCSETAUTOHIDE = 2118
const SCI_AUTOCGETAUTOHIDE = 2119
const SCI_AUTOCSETDROPRESTOFWORD = 2270
const SCI_AUTOCGETDROPRESTOFWORD = 2271
const SCI_REGISTERIMAGE = 2405
const SCI_CLEARREGISTEREDIMAGES = 2408
const SCI_AUTOCGETTYPESEPARATOR = 2285
const SCI_AUTOCSETTYPESEPARATOR = 2286
const SCI_AUTOCSETMAXWIDTH = 2208
const SCI_AUTOCGETMAXWIDTH = 2209
const SCI_AUTOCSETMAXHEIGHT = 2210
const SCI_AUTOCGETMAXHEIGHT = 2211
const SCI_SETINDENT = 2122
const SCI_GETINDENT = 2123
const SCI_SETUSETABS = 2124
const SCI_GETUSETABS = 2125
const SCI_SETLINEINDENTATION = 2126
const SCI_GETLINEINDENTATION = 2127
const SCI_GETLINEINDENTPOSITION = 2128
const SCI_GETCOLUMN = 2129
const SCI_COUNTCHARACTERS = 2633
const SCI_SETHSCROLLBAR = 2130
const SCI_GETHSCROLLBAR = 2131
const SC_IV_NONE = 0
const SC_IV_REAL = 1
const SC_IV_LOOKFORWARD = 2
const SC_IV_LOOKBOTH = 3
const SCI_SETINDENTATIONGUIDES = 2132
const SCI_GETINDENTATIONGUIDES = 2133
const SCI_SETHIGHLIGHTGUIDE = 2134
const SCI_GETHIGHLIGHTGUIDE = 2135
const SCI_GETLINEENDPOSITION = 2136
const SCI_GETCODEPAGE = 2137
const SCI_GETCARETFORE = 2138
const SCI_GETREADONLY = 2140
const SCI_SETCURRENTPOS = 2141
const SCI_SETSELECTIONSTART = 2142
const SCI_GETSELECTIONSTART = 2143
const SCI_SETSELECTIONEND = 2144
const SCI_GETSELECTIONEND = 2145
const SCI_SETEMPTYSELECTION = 2556
const SCI_SETPRINTMAGNIFICATION = 2146
const SCI_GETPRINTMAGNIFICATION = 2147
const SC_PRINT_NORMAL = 0
const SC_PRINT_INVERTLIGHT = 1
const SC_PRINT_BLACKONWHITE = 2
const SC_PRINT_COLOURONWHITE = 3
const SC_PRINT_COLOURONWHITEDEFAULTBG = 4
const SCI_SETPRINTCOLOURMODE = 2148
const SCI_GETPRINTCOLOURMODE = 2149
const SCFIND_WHOLEWORD = &h2
const SCFIND_MATCHCASE = &h4
const SCFIND_WORDSTART = &h00100000
const SCFIND_REGEXP = &h00200000
const SCFIND_POSIX = &h00400000
const SCFIND_CXX11REGEX = &h00800000
const SCI_FINDTEXT = 2150
const SCI_FORMATRANGE = 2151
const SCI_GETFIRSTVISIBLELINE = 2152
const SCI_GETLINE = 2153
const SCI_GETLINECOUNT = 2154
const SCI_SETMARGINLEFT = 2155
const SCI_GETMARGINLEFT = 2156
const SCI_SETMARGINRIGHT = 2157
const SCI_GETMARGINRIGHT = 2158
const SCI_GETMODIFY = 2159
const SCI_SETSEL = 2160
const SCI_GETSELTEXT = 2161
const SCI_GETTEXTRANGE = 2162
const SCI_HIDESELECTION = 2163
const SCI_POINTXFROMPOSITION = 2164
const SCI_POINTYFROMPOSITION = 2165
const SCI_LINEFROMPOSITION = 2166
const SCI_POSITIONFROMLINE = 2167
const SCI_LINESCROLL = 2168
const SCI_SCROLLCARET = 2169
const SCI_SCROLLRANGE = 2569
const SCI_REPLACESEL = 2170
const SCI_SETREADONLY = 2171
const SCI_NULL = 2172
const SCI_CANPASTE = 2173
const SCI_CANUNDO = 2174
const SCI_EMPTYUNDOBUFFER = 2175
const SCI_UNDO = 2176
const SCI_CUT = 2177
const SCI_COPY = 2178
const SCI_PASTE = 2179
const SCI_CLEAR = 2180
const SCI_SETTEXT = 2181
const SCI_GETTEXT = 2182
const SCI_GETTEXTLENGTH = 2183
const SCI_GETDIRECTFUNCTION = 2184
const SCI_GETDIRECTPOINTER = 2185
const SCI_SETOVERTYPE = 2186
const SCI_GETOVERTYPE = 2187
const SCI_SETCARETWIDTH = 2188
const SCI_GETCARETWIDTH = 2189
const SCI_SETTARGETSTART = 2190
const SCI_GETTARGETSTART = 2191
const SCI_SETTARGETEND = 2192
const SCI_GETTARGETEND = 2193
const SCI_SETTARGETRANGE = 2686
const SCI_GETTARGETTEXT = 2687
const SCI_TARGETFROMSELECTION = 2287
const SCI_TARGETWHOLEDOCUMENT = 2690
const SCI_REPLACETARGET = 2194
const SCI_REPLACETARGETRE = 2195
const SCI_SEARCHINTARGET = 2197
const SCI_SETSEARCHFLAGS = 2198
const SCI_GETSEARCHFLAGS = 2199
const SCI_CALLTIPSHOW = 2200
const SCI_CALLTIPCANCEL = 2201
const SCI_CALLTIPACTIVE = 2202
const SCI_CALLTIPPOSSTART = 2203
const SCI_CALLTIPSETPOSSTART = 2214
const SCI_CALLTIPSETHLT = 2204
const SCI_CALLTIPSETBACK = 2205
const SCI_CALLTIPSETFORE = 2206
const SCI_CALLTIPSETFOREHLT = 2207
const SCI_CALLTIPUSESTYLE = 2212
const SCI_CALLTIPSETPOSITION = 2213
const SCI_VISIBLEFROMDOCLINE = 2220
const SCI_DOCLINEFROMVISIBLE = 2221
const SCI_WRAPCOUNT = 2235
const SC_FOLDLEVELBASE = &h400
const SC_FOLDLEVELWHITEFLAG = &h1000
const SC_FOLDLEVELHEADERFLAG = &h2000
const SC_FOLDLEVELNUMBERMASK = &h0FFF
const SCI_SETFOLDLEVEL = 2222
const SCI_GETFOLDLEVEL = 2223
const SCI_GETLASTCHILD = 2224
const SCI_GETFOLDPARENT = 2225
const SCI_SHOWLINES = 2226
const SCI_HIDELINES = 2227
const SCI_GETLINEVISIBLE = 2228
const SCI_GETALLLINESVISIBLE = 2236
const SCI_SETFOLDEXPANDED = 2229
const SCI_GETFOLDEXPANDED = 2230
const SCI_TOGGLEFOLD = 2231
const SCI_TOGGLEFOLDSHOWTEXT = 2700
const SC_FOLDDISPLAYTEXT_HIDDEN = 0
const SC_FOLDDISPLAYTEXT_STANDARD = 1
const SC_FOLDDISPLAYTEXT_BOXED = 2
const SCI_FOLDDISPLAYTEXTSETSTYLE = 2701
const SC_FOLDACTION_CONTRACT = 0
const SC_FOLDACTION_EXPAND = 1
const SC_FOLDACTION_TOGGLE = 2
const SCI_FOLDLINE = 2237
const SCI_FOLDCHILDREN = 2238
const SCI_EXPANDCHILDREN = 2239
const SCI_FOLDALL = 2662
const SCI_ENSUREVISIBLE = 2232
const SC_AUTOMATICFOLD_SHOW = &h0001
const SC_AUTOMATICFOLD_CLICK = &h0002
const SC_AUTOMATICFOLD_CHANGE = &h0004
const SCI_SETAUTOMATICFOLD = 2663
const SCI_GETAUTOMATICFOLD = 2664
const SC_FOLDFLAG_LINEBEFORE_EXPANDED = &h0002
const SC_FOLDFLAG_LINEBEFORE_CONTRACTED = &h0004
const SC_FOLDFLAG_LINEAFTER_EXPANDED = &h0008
const SC_FOLDFLAG_LINEAFTER_CONTRACTED = &h0010
const SC_FOLDFLAG_LEVELNUMBERS = &h0040
const SC_FOLDFLAG_LINESTATE = &h0080
const SCI_SETFOLDFLAGS = 2233
const SCI_ENSUREVISIBLEENFORCEPOLICY = 2234
const SCI_SETTABINDENTS = 2260
const SCI_GETTABINDENTS = 2261
const SCI_SETBACKSPACEUNINDENTS = 2262
const SCI_GETBACKSPACEUNINDENTS = 2263
const SC_TIME_FOREVER = 10000000
const SCI_SETMOUSEDWELLTIME = 2264
const SCI_GETMOUSEDWELLTIME = 2265
const SCI_WORDSTARTPOSITION = 2266
const SCI_WORDENDPOSITION = 2267
const SCI_ISRANGEWORD = 2691
const SC_IDLESTYLING_NONE = 0
const SC_IDLESTYLING_TOVISIBLE = 1
const SC_IDLESTYLING_AFTERVISIBLE = 2
const SC_IDLESTYLING_ALL = 3
const SCI_SETIDLESTYLING = 2692
const SCI_GETIDLESTYLING = 2693
const SC_WRAP_NONE = 0
const SC_WRAP_WORD = 1
const SC_WRAP_CHAR = 2
const SC_WRAP_WHITESPACE = 3
const SCI_SETWRAPMODE = 2268
const SCI_GETWRAPMODE = 2269
const SC_WRAPVISUALFLAG_NONE = &h0000
const SC_WRAPVISUALFLAG_END = &h0001
const SC_WRAPVISUALFLAG_START = &h0002
const SC_WRAPVISUALFLAG_MARGIN = &h0004
const SCI_SETWRAPVISUALFLAGS = 2460
const SCI_GETWRAPVISUALFLAGS = 2461
const SC_WRAPVISUALFLAGLOC_DEFAULT = &h0000
const SC_WRAPVISUALFLAGLOC_END_BY_TEXT = &h0001
const SC_WRAPVISUALFLAGLOC_START_BY_TEXT = &h0002
const SCI_SETWRAPVISUALFLAGSLOCATION = 2462
const SCI_GETWRAPVISUALFLAGSLOCATION = 2463
const SCI_SETWRAPSTARTINDENT = 2464
const SCI_GETWRAPSTARTINDENT = 2465
const SC_WRAPINDENT_FIXED = 0
const SC_WRAPINDENT_SAME = 1
const SC_WRAPINDENT_INDENT = 2
const SCI_SETWRAPINDENTMODE = 2472
const SCI_GETWRAPINDENTMODE = 2473
const SC_CACHE_NONE = 0
const SC_CACHE_CARET = 1
const SC_CACHE_PAGE = 2
const SC_CACHE_DOCUMENT = 3
const SCI_SETLAYOUTCACHE = 2272
const SCI_GETLAYOUTCACHE = 2273
const SCI_SETSCROLLWIDTH = 2274
const SCI_GETSCROLLWIDTH = 2275
const SCI_SETSCROLLWIDTHTRACKING = 2516
const SCI_GETSCROLLWIDTHTRACKING = 2517
const SCI_TEXTWIDTH = 2276
const SCI_SETENDATLASTLINE = 2277
const SCI_GETENDATLASTLINE = 2278
const SCI_TEXTHEIGHT = 2279
const SCI_SETVSCROLLBAR = 2280
const SCI_GETVSCROLLBAR = 2281
const SCI_APPENDTEXT = 2282
const SCI_GETTWOPHASEDRAW = 2283
const SCI_SETTWOPHASEDRAW = 2284
const SC_PHASES_ONE = 0
const SC_PHASES_TWO = 1
const SC_PHASES_MULTIPLE = 2
const SCI_GETPHASESDRAW = 2673
const SCI_SETPHASESDRAW = 2674
const SC_EFF_QUALITY_MASK = &hF
const SC_EFF_QUALITY_DEFAULT = 0
const SC_EFF_QUALITY_NON_ANTIALIASED = 1
const SC_EFF_QUALITY_ANTIALIASED = 2
const SC_EFF_QUALITY_LCD_OPTIMIZED = 3
const SCI_SETFONTQUALITY = 2611
const SCI_GETFONTQUALITY = 2612
const SCI_SETFIRSTVISIBLELINE = 2613
const SC_MULTIPASTE_ONCE = 0
const SC_MULTIPASTE_EACH = 1
const SCI_SETMULTIPASTE = 2614
const SCI_GETMULTIPASTE = 2615
const SCI_GETTAG = 2616
const SCI_LINESJOIN = 2288
const SCI_LINESSPLIT = 2289
const SCI_SETFOLDMARGINCOLOUR = 2290
const SCI_SETFOLDMARGINHICOLOUR = 2291
const SCI_LINEDOWN = 2300
const SCI_LINEDOWNEXTEND = 2301
const SCI_LINEUP = 2302
const SCI_LINEUPEXTEND = 2303
const SCI_CHARLEFT = 2304
const SCI_CHARLEFTEXTEND = 2305
const SCI_CHARRIGHT = 2306
const SCI_CHARRIGHTEXTEND = 2307
const SCI_WORDLEFT = 2308
const SCI_WORDLEFTEXTEND = 2309
const SCI_WORDRIGHT = 2310
const SCI_WORDRIGHTEXTEND = 2311
const SCI_HOME = 2312
const SCI_HOMEEXTEND = 2313
const SCI_LINEEND = 2314
const SCI_LINEENDEXTEND = 2315
const SCI_DOCUMENTSTART = 2316
const SCI_DOCUMENTSTARTEXTEND = 2317
const SCI_DOCUMENTEND = 2318
const SCI_DOCUMENTENDEXTEND = 2319
const SCI_PAGEUP = 2320
const SCI_PAGEUPEXTEND = 2321
const SCI_PAGEDOWN = 2322
const SCI_PAGEDOWNEXTEND = 2323
const SCI_EDITTOGGLEOVERTYPE = 2324
const SCI_CANCEL = 2325
const SCI_DELETEBACK = 2326
const SCI_TAB = 2327
const SCI_BACKTAB = 2328
const SCI_NEWLINE = 2329
const SCI_FORMFEED = 2330
const SCI_VCHOME = 2331
const SCI_VCHOMEEXTEND = 2332
const SCI_ZOOMIN = 2333
const SCI_ZOOMOUT = 2334
const SCI_DELWORDLEFT = 2335
const SCI_DELWORDRIGHT = 2336
const SCI_DELWORDRIGHTEND = 2518
const SCI_LINECUT = 2337
const SCI_LINEDELETE = 2338
const SCI_LINETRANSPOSE = 2339
const SCI_LINEDUPLICATE = 2404
const SCI_LOWERCASE = 2340
const SCI_UPPERCASE = 2341
const SCI_LINESCROLLDOWN = 2342
const SCI_LINESCROLLUP = 2343
const SCI_DELETEBACKNOTLINE = 2344
const SCI_HOMEDISPLAY = 2345
const SCI_HOMEDISPLAYEXTEND = 2346
const SCI_LINEENDDISPLAY = 2347
const SCI_LINEENDDISPLAYEXTEND = 2348
const SCI_HOMEWRAP = 2349
const SCI_HOMEWRAPEXTEND = 2450
const SCI_LINEENDWRAP = 2451
const SCI_LINEENDWRAPEXTEND = 2452
const SCI_VCHOMEWRAP = 2453
const SCI_VCHOMEWRAPEXTEND = 2454
const SCI_LINECOPY = 2455
const SCI_MOVECARETINSIDEVIEW = 2401
const SCI_LINELENGTH = 2350
const SCI_BRACEHIGHLIGHT = 2351
const SCI_BRACEHIGHLIGHTINDICATOR = 2498
const SCI_BRACEBADLIGHT = 2352
const SCI_BRACEBADLIGHTINDICATOR = 2499
const SCI_BRACEMATCH = 2353
const SCI_GETVIEWEOL = 2355
const SCI_SETVIEWEOL = 2356
const SCI_GETDOCPOINTER = 2357
const SCI_SETDOCPOINTER = 2358
const SCI_SETMODEVENTMASK = 2359
const EDGE_NONE = 0
const EDGE_LINE = 1
const EDGE_BACKGROUND = 2
const EDGE_MULTILINE = 3
const SCI_GETEDGECOLUMN = 2360
const SCI_SETEDGECOLUMN = 2361
const SCI_GETEDGEMODE = 2362
const SCI_SETEDGEMODE = 2363
const SCI_GETEDGECOLOUR = 2364
const SCI_SETEDGECOLOUR = 2365
const SCI_MULTIEDGEADDLINE = 2694
const SCI_MULTIEDGECLEARALL = 2695
const SCI_SEARCHANCHOR = 2366
const SCI_SEARCHNEXT = 2367
const SCI_SEARCHPREV = 2368
const SCI_LINESONSCREEN = 2370
const SC_POPUP_NEVER = 0
const SC_POPUP_ALL = 1
const SC_POPUP_TEXT = 2
const SCI_USEPOPUP = 2371
const SCI_SELECTIONISRECTANGLE = 2372
const SCI_SETZOOM = 2373
const SCI_GETZOOM = 2374
const SCI_CREATEDOCUMENT = 2375
const SCI_ADDREFDOCUMENT = 2376
const SCI_RELEASEDOCUMENT = 2377
const SCI_GETMODEVENTMASK = 2378
const SCI_SETFOCUS = 2380
const SCI_GETFOCUS = 2381
const SC_STATUS_OK = 0
const SC_STATUS_FAILURE = 1
const SC_STATUS_BADALLOC = 2
const SC_STATUS_WARN_START = 1000
const SC_STATUS_WARN_REGEX = 1001
const SCI_SETSTATUS = 2382
const SCI_GETSTATUS = 2383
const SCI_SETMOUSEDOWNCAPTURES = 2384
const SCI_GETMOUSEDOWNCAPTURES = 2385
const SCI_SETMOUSEWHEELCAPTURES = 2696
const SCI_GETMOUSEWHEELCAPTURES = 2697
const SC_CURSORNORMAL = -1
const SC_CURSORARROW = 2
const SC_CURSORWAIT = 4
const SC_CURSORREVERSEARROW = 7
const SCI_SETCURSOR = 2386
const SCI_GETCURSOR = 2387
const SCI_SETCONTROLCHARSYMBOL = 2388
const SCI_GETCONTROLCHARSYMBOL = 2389
const SCI_WORDPARTLEFT = 2390
const SCI_WORDPARTLEFTEXTEND = 2391
const SCI_WORDPARTRIGHT = 2392
const SCI_WORDPARTRIGHTEXTEND = 2393
const VISIBLE_SLOP = &h01
const VISIBLE_STRICT = &h04
const SCI_SETVISIBLEPOLICY = 2394
const SCI_DELLINELEFT = 2395
const SCI_DELLINERIGHT = 2396
const SCI_SETXOFFSET = 2397
const SCI_GETXOFFSET = 2398
const SCI_CHOOSECARETX = 2399
const SCI_GRABFOCUS = 2400
const CARET_SLOP = &h01
const CARET_STRICT = &h04
const CARET_JUMPS = &h10
const CARET_EVEN = &h08
const SCI_SETXCARETPOLICY = 2402
const SCI_SETYCARETPOLICY = 2403
const SCI_SETPRINTWRAPMODE = 2406
const SCI_GETPRINTWRAPMODE = 2407
const SCI_SETHOTSPOTACTIVEFORE = 2410
const SCI_GETHOTSPOTACTIVEFORE = 2494
const SCI_SETHOTSPOTACTIVEBACK = 2411
const SCI_GETHOTSPOTACTIVEBACK = 2495
const SCI_SETHOTSPOTACTIVEUNDERLINE = 2412
const SCI_GETHOTSPOTACTIVEUNDERLINE = 2496
const SCI_SETHOTSPOTSINGLELINE = 2421
const SCI_GETHOTSPOTSINGLELINE = 2497
const SCI_PARADOWN = 2413
const SCI_PARADOWNEXTEND = 2414
const SCI_PARAUP = 2415
const SCI_PARAUPEXTEND = 2416
const SCI_POSITIONBEFORE = 2417
const SCI_POSITIONAFTER = 2418
const SCI_POSITIONRELATIVE = 2670
const SCI_COPYRANGE = 2419
const SCI_COPYTEXT = 2420
const SC_SEL_STREAM = 0
const SC_SEL_RECTANGLE = 1
const SC_SEL_LINES = 2
const SC_SEL_THIN = 3
const SCI_SETSELECTIONMODE = 2422
const SCI_GETSELECTIONMODE = 2423
const SCI_GETLINESELSTARTPOSITION = 2424
const SCI_GETLINESELENDPOSITION = 2425
const SCI_LINEDOWNRECTEXTEND = 2426
const SCI_LINEUPRECTEXTEND = 2427
const SCI_CHARLEFTRECTEXTEND = 2428
const SCI_CHARRIGHTRECTEXTEND = 2429
const SCI_HOMERECTEXTEND = 2430
const SCI_VCHOMERECTEXTEND = 2431
const SCI_LINEENDRECTEXTEND = 2432
const SCI_PAGEUPRECTEXTEND = 2433
const SCI_PAGEDOWNRECTEXTEND = 2434
const SCI_STUTTEREDPAGEUP = 2435
const SCI_STUTTEREDPAGEUPEXTEND = 2436
const SCI_STUTTEREDPAGEDOWN = 2437
const SCI_STUTTEREDPAGEDOWNEXTEND = 2438
const SCI_WORDLEFTEND = 2439
const SCI_WORDLEFTENDEXTEND = 2440
const SCI_WORDRIGHTEND = 2441
const SCI_WORDRIGHTENDEXTEND = 2442
const SCI_SETWHITESPACECHARS = 2443
const SCI_GETWHITESPACECHARS = 2647
const SCI_SETPUNCTUATIONCHARS = 2648
const SCI_GETPUNCTUATIONCHARS = 2649
const SCI_SETCHARSDEFAULT = 2444
const SCI_AUTOCGETCURRENT = 2445
const SCI_AUTOCGETCURRENTTEXT = 2610
const SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE = 0
const SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE = 1
const SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR = 2634
const SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR = 2635
const SC_MULTIAUTOC_ONCE = 0
const SC_MULTIAUTOC_EACH = 1
const SCI_AUTOCSETMULTI = 2636
const SCI_AUTOCGETMULTI = 2637
const SC_ORDER_PRESORTED = 0
const SC_ORDER_PERFORMSORT = 1
const SC_ORDER_CUSTOM = 2
const SCI_AUTOCSETORDER = 2660
const SCI_AUTOCGETORDER = 2661
const SCI_ALLOCATE = 2446
const SCI_TARGETASUTF8 = 2447
const SCI_SETLENGTHFORENCODE = 2448
const SCI_ENCODEDFROMUTF8 = 2449
const SCI_FINDCOLUMN = 2456
const SCI_GETCARETSTICKY = 2457
const SCI_SETCARETSTICKY = 2458
const SC_CARETSTICKY_OFF = 0
const SC_CARETSTICKY_ON = 1
const SC_CARETSTICKY_WHITESPACE = 2
const SCI_TOGGLECARETSTICKY = 2459
const SCI_SETPASTECONVERTENDINGS = 2467
const SCI_GETPASTECONVERTENDINGS = 2468
const SCI_SELECTIONDUPLICATE = 2469
const SC_ALPHA_TRANSPARENT = 0
const SC_ALPHA_OPAQUE = 255
const SC_ALPHA_NOALPHA = 256
const SCI_SETCARETLINEBACKALPHA = 2470
const SCI_GETCARETLINEBACKALPHA = 2471
const CARETSTYLE_INVISIBLE = 0
const CARETSTYLE_LINE = 1
const CARETSTYLE_BLOCK = 2
const SCI_SETCARETSTYLE = 2512
const SCI_GETCARETSTYLE = 2513
const SCI_SETINDICATORCURRENT = 2500
const SCI_GETINDICATORCURRENT = 2501
const SCI_SETINDICATORVALUE = 2502
const SCI_GETINDICATORVALUE = 2503
const SCI_INDICATORFILLRANGE = 2504
const SCI_INDICATORCLEARRANGE = 2505
const SCI_INDICATORALLONFOR = 2506
const SCI_INDICATORVALUEAT = 2507
const SCI_INDICATORSTART = 2508
const SCI_INDICATOREND = 2509
const SCI_SETPOSITIONCACHE = 2514
const SCI_GETPOSITIONCACHE = 2515
const SCI_COPYALLOWLINE = 2519
const SCI_GETCHARACTERPOINTER = 2520
const SCI_GETRANGEPOINTER = 2643
const SCI_GETGAPPOSITION = 2644
const SCI_INDICSETALPHA = 2523
const SCI_INDICGETALPHA = 2524
const SCI_INDICSETOUTLINEALPHA = 2558
const SCI_INDICGETOUTLINEALPHA = 2559
const SCI_SETEXTRAASCENT = 2525
const SCI_GETEXTRAASCENT = 2526
const SCI_SETEXTRADESCENT = 2527
const SCI_GETEXTRADESCENT = 2528
const SCI_MARKERSYMBOLDEFINED = 2529
const SCI_MARGINSETTEXT = 2530
const SCI_MARGINGETTEXT = 2531
const SCI_MARGINSETSTYLE = 2532
const SCI_MARGINGETSTYLE = 2533
const SCI_MARGINSETSTYLES = 2534
const SCI_MARGINGETSTYLES = 2535
const SCI_MARGINTEXTCLEARALL = 2536
const SCI_MARGINSETSTYLEOFFSET = 2537
const SCI_MARGINGETSTYLEOFFSET = 2538
const SC_MARGINOPTION_NONE = 0
const SC_MARGINOPTION_SUBLINESELECT = 1
const SCI_SETMARGINOPTIONS = 2539
const SCI_GETMARGINOPTIONS = 2557
const SCI_ANNOTATIONSETTEXT = 2540
const SCI_ANNOTATIONGETTEXT = 2541
const SCI_ANNOTATIONSETSTYLE = 2542
const SCI_ANNOTATIONGETSTYLE = 2543
const SCI_ANNOTATIONSETSTYLES = 2544
const SCI_ANNOTATIONGETSTYLES = 2545
const SCI_ANNOTATIONGETLINES = 2546
const SCI_ANNOTATIONCLEARALL = 2547
const ANNOTATION_HIDDEN = 0
const ANNOTATION_STANDARD = 1
const ANNOTATION_BOXED = 2
const ANNOTATION_INDENTED = 3
const SCI_ANNOTATIONSETVISIBLE = 2548
const SCI_ANNOTATIONGETVISIBLE = 2549
const SCI_ANNOTATIONSETSTYLEOFFSET = 2550
const SCI_ANNOTATIONGETSTYLEOFFSET = 2551
const SCI_RELEASEALLEXTENDEDSTYLES = 2552
const SCI_ALLOCATEEXTENDEDSTYLES = 2553
const UNDO_MAY_COALESCE = 1
const SCI_ADDUNDOACTION = 2560
const SCI_CHARPOSITIONFROMPOINT = 2561
const SCI_CHARPOSITIONFROMPOINTCLOSE = 2562
const SCI_SETMOUSESELECTIONRECTANGULARSWITCH = 2668
const SCI_GETMOUSESELECTIONRECTANGULARSWITCH = 2669
const SCI_SETMULTIPLESELECTION = 2563
const SCI_GETMULTIPLESELECTION = 2564
const SCI_SETADDITIONALSELECTIONTYPING = 2565
const SCI_GETADDITIONALSELECTIONTYPING = 2566
const SCI_SETADDITIONALCARETSBLINK = 2567
const SCI_GETADDITIONALCARETSBLINK = 2568
const SCI_SETADDITIONALCARETSVISIBLE = 2608
const SCI_GETADDITIONALCARETSVISIBLE = 2609
const SCI_GETSELECTIONS = 2570
const SCI_GETSELECTIONEMPTY = 2650
const SCI_CLEARSELECTIONS = 2571
const SCI_SETSELECTION = 2572
const SCI_ADDSELECTION = 2573
const SCI_DROPSELECTIONN = 2671
const SCI_SETMAINSELECTION = 2574
const SCI_GETMAINSELECTION = 2575
const SCI_SETSELECTIONNCARET = 2576
const SCI_GETSELECTIONNCARET = 2577
const SCI_SETSELECTIONNANCHOR = 2578
const SCI_GETSELECTIONNANCHOR = 2579
const SCI_SETSELECTIONNCARETVIRTUALSPACE = 2580
const SCI_GETSELECTIONNCARETVIRTUALSPACE = 2581
const SCI_SETSELECTIONNANCHORVIRTUALSPACE = 2582
const SCI_GETSELECTIONNANCHORVIRTUALSPACE = 2583
const SCI_SETSELECTIONNSTART = 2584
const SCI_GETSELECTIONNSTART = 2585
const SCI_SETSELECTIONNEND = 2586
const SCI_GETSELECTIONNEND = 2587
const SCI_SETRECTANGULARSELECTIONCARET = 2588
const SCI_GETRECTANGULARSELECTIONCARET = 2589
const SCI_SETRECTANGULARSELECTIONANCHOR = 2590
const SCI_GETRECTANGULARSELECTIONANCHOR = 2591
const SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2592
const SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2593
const SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2594
const SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2595
const SCVS_NONE = 0
const SCVS_RECTANGULARSELECTION = 1
const SCVS_USERACCESSIBLE = 2
const SCVS_NOWRAPLINESTART = 4
const SCI_SETVIRTUALSPACEOPTIONS = 2596
const SCI_GETVIRTUALSPACEOPTIONS = 2597
const SCI_SETRECTANGULARSELECTIONMODIFIER = 2598
const SCI_GETRECTANGULARSELECTIONMODIFIER = 2599
const SCI_SETADDITIONALSELFORE = 2600
const SCI_SETADDITIONALSELBACK = 2601
const SCI_SETADDITIONALSELALPHA = 2602
const SCI_GETADDITIONALSELALPHA = 2603
const SCI_SETADDITIONALCARETFORE = 2604
const SCI_GETADDITIONALCARETFORE = 2605
const SCI_ROTATESELECTION = 2606
const SCI_SWAPMAINANCHORCARET = 2607
const SCI_MULTIPLESELECTADDNEXT = 2688
const SCI_MULTIPLESELECTADDEACH = 2689
const SCI_CHANGELEXERSTATE = 2617
const SCI_CONTRACTEDFOLDNEXT = 2618
const SCI_VERTICALCENTRECARET = 2619
const SCI_MOVESELECTEDLINESUP = 2620
const SCI_MOVESELECTEDLINESDOWN = 2621
const SCI_SETIDENTIFIER = 2622
const SCI_GETIDENTIFIER = 2623
const SCI_RGBAIMAGESETWIDTH = 2624
const SCI_RGBAIMAGESETHEIGHT = 2625
const SCI_RGBAIMAGESETSCALE = 2651
const SCI_MARKERDEFINERGBAIMAGE = 2626
const SCI_REGISTERRGBAIMAGE = 2627
const SCI_SCROLLTOSTART = 2628
const SCI_SCROLLTOEND = 2629
const SC_TECHNOLOGY_DEFAULT = 0
const SC_TECHNOLOGY_DIRECTWRITE = 1
const SC_TECHNOLOGY_DIRECTWRITERETAIN = 2
const SC_TECHNOLOGY_DIRECTWRITEDC = 3
const SCI_SETTECHNOLOGY = 2630
const SCI_GETTECHNOLOGY = 2631
const SCI_CREATELOADER = 2632
const SCI_FINDINDICATORSHOW = 2640
const SCI_FINDINDICATORFLASH = 2641
const SCI_FINDINDICATORHIDE = 2642
const SCI_VCHOMEDISPLAY = 2652
const SCI_VCHOMEDISPLAYEXTEND = 2653
const SCI_GETCARETLINEVISIBLEALWAYS = 2654
const SCI_SETCARETLINEVISIBLEALWAYS = 2655
const SC_LINE_END_TYPE_DEFAULT = 0
const SC_LINE_END_TYPE_UNICODE = 1
const SCI_SETLINEENDTYPESALLOWED = 2656
const SCI_GETLINEENDTYPESALLOWED = 2657
const SCI_GETLINEENDTYPESACTIVE = 2658
const SCI_SETREPRESENTATION = 2665
const SCI_GETREPRESENTATION = 2666
const SCI_CLEARREPRESENTATION = 2667
const SCI_STARTRECORD = 3001
const SCI_STOPRECORD = 3002
const SCI_SETLEXER = 4001
const SCI_SETILEXER = 4033 'FIX by SARG
const SCI_GETLEXER = 4002
const SCI_COLOURISE = 4003
const SCI_SETPROPERTY = 4004
const KEYWORDSET_MAX = 8
const SCI_SETKEYWORDS = 4005
const SCI_SETLEXERLANGUAGE = 4006
const SCI_LOADLEXERLIBRARY = 4007
const SCI_GETPROPERTY = 4008
const SCI_GETPROPERTYEXPANDED = 4009
const SCI_GETPROPERTYINT = 4010
const SCI_GETSTYLEBITSNEEDED = 4011
const SCI_GETLEXERLANGUAGE = 4012
const SCI_PRIVATELEXERCALL = 4013
const SCI_PROPERTYNAMES = 4014
const SC_TYPE_BOOLEAN = 0
const SC_TYPE_INTEGER = 1
const SC_TYPE_STRING = 2
const SCI_PROPERTYTYPE = 4015
const SCI_DESCRIBEPROPERTY = 4016
const SCI_DESCRIBEKEYWORDSETS = 4017
const SCI_GETLINEENDTYPESSUPPORTED = 4018
const SCI_ALLOCATESUBSTYLES = 4020
const SCI_GETSUBSTYLESSTART = 4021
const SCI_GETSUBSTYLESLENGTH = 4022
const SCI_GETSTYLEFROMSUBSTYLE = 4027
const SCI_GETPRIMARYSTYLEFROMSTYLE = 4028
const SCI_FREESUBSTYLES = 4023
const SCI_SETIDENTIFIERS = 4024
const SCI_DISTANCETOSECONDARYSTYLES = 4025
const SCI_GETSUBSTYLEBASES = 4026
const SC_MOD_INSERTTEXT = &h1
const SC_MOD_DELETETEXT = &h2
const SC_MOD_CHANGESTYLE = &h4
const SC_MOD_CHANGEFOLD = &h8
const SC_PERFORMED_USER = &h10
const SC_PERFORMED_UNDO = &h20
const SC_PERFORMED_REDO = &h40
const SC_MULTISTEPUNDOREDO = &h80
const SC_LASTSTEPINUNDOREDO = &h100
const SC_MOD_CHANGEMARKER = &h200
const SC_MOD_BEFOREINSERT = &h400
const SC_MOD_BEFOREDELETE = &h800
const SC_MULTILINEUNDOREDO = &h1000
const SC_STARTACTION = &h2000
const SC_MOD_CHANGEINDICATOR = &h4000
const SC_MOD_CHANGELINESTATE = &h8000
const SC_MOD_CHANGEMARGIN = &h10000
const SC_MOD_CHANGEANNOTATION = &h20000
const SC_MOD_CONTAINER = &h40000
const SC_MOD_LEXERSTATE = &h80000
const SC_MOD_INSERTCHECK = &h100000
const SC_MOD_CHANGETABSTOPS = &h200000
const SC_MODEVENTMASKALL = &h3FFFFF
const SC_UPDATE_CONTENT = &h1
const SC_UPDATE_SELECTION = &h2
const SC_UPDATE_V_SCROLL = &h4
const SC_UPDATE_H_SCROLL = &h8
const SCEN_CHANGE = 768
const SCEN_SETFOCUS = 512
const SCEN_KILLFOCUS = 256
const SCK_DOWN = 300
const SCK_UP = 301
const SCK_LEFT = 302
const SCK_RIGHT = 303
const SCK_HOME = 304
const SCK_END = 305
const SCK_PRIOR = 306
const SCK_NEXT = 307
const SCK_DELETE = 308
const SCK_INSERT = 309
const SCK_ESCAPE = 7
const SCK_BACK = 8
const SCK_TAB = 9
const SCK_RETURN = 13
const SCK_ADD = 310
const SCK_SUBTRACT = 311
const SCK_DIVIDE = 312
const SCK_WIN = 313
const SCK_RWIN = 314
const SCK_MENU = 315
const SCMOD_NORM = 0
const SCMOD_SHIFT = 1
const SCMOD_CTRL = 2
const SCMOD_ALT = 4
const SCMOD_SUPER = 8
const SCMOD_META = 16
const SC_AC_FILLUP = 1
const SC_AC_DOUBLECLICK = 2
const SC_AC_TAB = 3
const SC_AC_NEWLINE = 4
const SC_AC_COMMAND = 5
const SCN_STYLENEEDED = 2000
const SCN_CHARADDED = 2001
const SCN_SAVEPOINTREACHED = 2002
const SCN_SAVEPOINTLEFT = 2003
const SCN_MODIFYATTEMPTRO = 2004
const SCN_KEY = 2005
const SCN_DOUBLECLICK = 2006
const SCN_UPDATEUI = 2007
const SCN_MODIFIED = 2008
const SCN_MACRORECORD = 2009
const SCN_MARGINCLICK = 2010
const SCN_NEEDSHOWN = 2011
const SCN_PAINTED = 2013
const SCN_USERLISTSELECTION = 2014
const SCN_URIDROPPED = 2015
const SCN_DWELLSTART = 2016
const SCN_DWELLEND = 2017
const SCN_ZOOM = 2018
const SCN_HOTSPOTCLICK = 2019
const SCN_HOTSPOTDOUBLECLICK = 2020
const SCN_CALLTIPCLICK = 2021
const SCN_AUTOCSELECTION = 2022
const SCN_INDICATORCLICK = 2023
const SCN_INDICATORRELEASE = 2024
const SCN_AUTOCCANCELLED = 2025
const SCN_AUTOCCHARDELETED = 2026
const SCN_HOTSPOTRELEASECLICK = 2027
const SCN_FOCUSIN = 2028
const SCN_FOCUSOUT = 2029
const SCN_AUTOCCOMPLETED = 2030
const SCN_MARGINRIGHTCLICK = 2031
type Sci_CharacterRange
cpMin as Sci_PositionCR
cpMax as Sci_PositionCR
end type
type Sci_TextRange
chrg as Sci_CharacterRange
lpstrText as zstring ptr
end type
type Sci_TextToFind
chrg as Sci_CharacterRange
lpstrText as const zstring ptr
chrgText as Sci_CharacterRange
end type
type Sci_SurfaceID as any ptr
type Sci_Rectangle
left as long
top as long
right as long
bottom as long
end type
type Sci_RangeToFormat
hdc as Sci_SurfaceID
hdcTarget as Sci_SurfaceID
rc as Sci_Rectangle
rcPage as Sci_Rectangle
chrg as Sci_CharacterRange
end type
type Sci_NotifyHeader
hwndFrom as any ptr
idFrom as uptr_t
code as ulong
end type
type SCNotification
nmhdr as Sci_NotifyHeader
position as Sci_Position
ch as long
modifiers as long
modificationType as long
text as const zstring ptr
length as Sci_Position
linesAdded as Sci_Position
message as long
wParam as uptr_t
lParam as sptr_t
line as Sci_Position
foldLevelNow as long
foldLevelPrev as long
margin as long
listType as long
x as long
y as long
token as long
annotationLinesAdded as Sci_Position
updated as long
listCompletionMethod as long
end type
end extern
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
one fix about COLORS RGB, in win32 API it is BGR,
https://stackoverflow.com/questions/367 ... olor-space
so the correct code is below
main.bas
Only the KEYWORD color bug remains now
https://stackoverflow.com/questions/367 ... olor-space
so the correct code is below
main.bas
Code: Select all
#include "windows.bi"
#include "scintilla.bi"
#include "scilexer.bi"
' Declare handles for Scintilla control and Lexilla DLL
Dim Shared As HWND hwndScintilla
Dim Shared As Any Ptr hLexilla
Dim Shared As Any Ptr hScintilla
Dim Shared As LRESULT result
' Declare function pointers for Lexilla functions
Dim As Function(ByVal name As ZString Ptr) As Any Ptr CreateLexer
' Window procedure to handle window messages
Function WindowProc(hWnd As HWND, msg As UINT, wParam As WPARAM, lParam As LPARAM) As LRESULT
Select Case msg
Case WM_CREATE
' Create Scintilla control within the window
hwndScintilla = CreateWindowEx(0, "Scintilla", "", _
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP, _
0, 0, 800, 600, _
hWnd, 0, GetModuleHandle(0), 0)
' Check if the Scintilla control was created successfully
If hwndScintilla = 0 Then
MessageBox(hWnd, "Failed to create Scintilla control.", "Error", MB_OK Or MB_ICONERROR)
Return -1
End If
' Set codepage
SendMessage(hwndScintilla, SCI_SETCODEPAGE, SC_CP_UTF8, 0)
' Set the initial text in Scintilla
Dim As String sampleCode = !"' Example FreeBASIC code\n\nPrint \"Hello, FreeBASIC!\"\nFor i = 1 To 10\n Print i\nNext i\n"
Dim As ZString Ptr samplePtr = StrPtr(sampleCode)
result = SendMessage(hwndScintilla, SCI_SETTEXT, 0, Cast(LPARAM, samplePtr))
' Debug print to check result of setting text
If result = 0 Then
Print "Text set successfully."
Else
Print "Failed to set text."
End If
Case WM_SIZE
' Resize the Scintilla control when the window resizes
MoveWindow(hwndScintilla, 0, 0, LoWord(lParam), HiWord(lParam), TRUE)
Case WM_NOTIFY
' Handle Scintilla notifications
Dim As NMHDR Ptr nmhdr = Cast(NMHDR Ptr, lParam)
If nmhdr->hwndFrom = hwndScintilla AndAlso nmhdr->code = SCN_MODIFIED Then
' Refresh highlighting when text is modified
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
Print "WM_NOTIFY"
End If
Case WM_CLOSE
' Clean up and exit the application
PostQuitMessage(0)
Return 0
End Select
UpdateWindow(hwndScintilla) ' Repaint the window
Return DefWindowProc(hWnd, msg, wParam, lParam)
End Function
Sub WAIT_()
Print "Hit any key to continue..."
Sleep
End Sub
' Entry point of the program
Dim As WNDCLASS wc
Dim As MSG msg
Dim As HWND hWnd
' Load Scintilla.dll dynamically
hScintilla = DylibLoad("Scintilla64.dll")
If hScintilla = 0 Then
Print "Failed to load Scintilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Load Lexilla.dll dynamically
hLexilla = DylibLoad("Lexilla64.dll")
If hLexilla = 0 Then
Print "Failed to load Lexilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Retrieve the CreateLexer function
CreateLexer = Cast(Function(ByVal name As ZString Ptr) As Any Ptr, DylibSymbol(hLexilla, "CreateLexer"))
If CreateLexer = 0 Then
Print "Failed to retrieve CreateLexer function."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Define the window class name using a static ZString
Dim Shared As ZString * 25 className => "FreeBASICSyntaxHighlighter"
wc.style = CS_HREDRAW Or CS_VREDRAW
wc.lpfnWndProc = @WindowProc
wc.hInstance = GetModuleHandle(0)
wc.hCursor = LoadCursor(0, IDC_ARROW)
wc.hbrBackground = Cast(HBRUSH, COLOR_WINDOW + 1)
wc.lpszClassName = @className
' Register the window class
If RegisterClass(@wc) = 0 Then
Print "Failed to register window class."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create the main window
hWnd = CreateWindowEx(0, @className, "Lexilla FreeBASIC Example", _
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, _
0, 0, GetModuleHandle(0), 0)
' Check if the window was created successfully
If hWnd = 0 Then
Print "Failed to create main window."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create a custom lexer for FreeBASIC
' lexer is created after window creation 'FIX BY SARG
Dim As Any Ptr lexer = CreateLexer("freebasic")
If lexer = 0 Then
Print "Failed to create BASIC lexer."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
Else
'set the lexer
SendMessage(hwndScintilla, SCI_SETILEXER, 0, Cast(LPARAM, lexer)) 'SCI_SETILEXER 'FIX BY SARG
Print "FreeBASIC lexer applied."
print "lexer=";SendMessage(hwndScintilla, SCI_GETLEXER,0,0)
'Clear ALL Styles
SendMessage(hwndScintilla, SCI_STYLECLEARALL, 0, 0)
Print "Cleared all styles."
''''''''''''''''''''''' FIXED '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''' Win32 API uses BGR not RGB https://stackoverflow.com/questions/367449/what-exactly-is-bgr-color-space
' Set style for comments
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_COMMENT, RGB(0, 128, 0)) ' Green comments
Print "Set comment style color."
''''''''''''''''''''''' FIXME KEYWORDS COLOR '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Set style for keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD, RGB(255, 0, 0)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD2, RGB(255, 0, 0)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD3, RGB(255, 0, 0)) ' Blue keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD4, RGB(255, 0, 0)) ' Blue keywords
Print "Set keyword style color."
''''''''''''''''''''''' FIXME KEYWORDS COLOR '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_OPERATOR, RGB(255, 0, 0)) ' Blue operator
Print "Set operator style color."
'Set the Style for strings
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_STRING, RGB(255, 0, 0)) 'Blue strings
Print "Set strings style color."
'Set Styles for Numbers
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_NUMBER, RGB(0,0, 255)) 'Red numbers
Print "Set number style color."
' Refresh highlighting for all text
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
End If
' Show the window
ShowWindow(hWnd, SW_SHOWNORMAL)
UpdateWindow(hWnd)
' Main message loop
While GetMessage(@msg, 0, 0, 0)
TranslateMessage(@msg)
DispatchMessage(@msg)
Wend
' Cleanup: Free the Lexilla DLL when done
DylibFree(hLexilla)
DylibFree(hScintilla)
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
Well we found it.... keywords should be in LOWERCASE and must use ZSTRING pointer
main.bas
project files
http://www.mediafire.com/file/5a462bale ... lla1_4.zip
main.bas
Code: Select all
#include "windows.bi"
#include "scintilla.bi"
#include "scilexer.bi"
' Declare handles for Scintilla control and Lexilla DLL
Dim Shared As HWND hwndScintilla
Dim Shared As Any Ptr hLexilla
Dim Shared As Any Ptr hScintilla
Dim Shared As LRESULT result
' Declare function pointers for Lexilla functions
Dim As Function(ByVal name As ZString Ptr) As Any Ptr CreateLexer
' Window procedure to handle window messages
Function WindowProc(hWnd As HWND, msg As UINT, wParam As WPARAM, lParam As LPARAM) As LRESULT
Select Case msg
Case WM_CREATE
' Create Scintilla control within the window
hwndScintilla = CreateWindowEx(0, "Scintilla", "", _
WS_CHILD Or WS_VISIBLE Or WS_TABSTOP, _
0, 0, 800, 600, _
hWnd, 0, GetModuleHandle(0), 0)
' Check if the Scintilla control was created successfully
If hwndScintilla = 0 Then
MessageBox(hWnd, "Failed to create Scintilla control.", "Error", MB_OK Or MB_ICONERROR)
Return -1
End If
' Set codepage
SendMessage(hwndScintilla, SCI_SETCODEPAGE, SC_CP_UTF8, 0)
' Set the initial text in Scintilla
Dim As String sampleCode = !"' Example FreeBASIC code\n\nPrint \"Hello, FreeBASIC!\"\nFor i = 1 To 10\n Print i\nNext i\n"
Dim As ZString Ptr samplePtr = StrPtr(sampleCode)
result = SendMessage(hwndScintilla, SCI_SETTEXT, 0, Cast(LPARAM, samplePtr))
' Debug print to check result of setting text
If result = 0 Then
Print "Text set successfully."
Else
Print "Failed to set text."
End If
Case WM_SIZE
' Resize the Scintilla control when the window resizes
MoveWindow(hwndScintilla, 0, 0, LoWord(lParam), HiWord(lParam), TRUE)
Case WM_NOTIFY
' Handle Scintilla notifications
Dim As NMHDR Ptr nmhdr = Cast(NMHDR Ptr, lParam)
If nmhdr->hwndFrom = hwndScintilla AndAlso nmhdr->code = SCN_MODIFIED Then
' Refresh highlighting when text is modified
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
Print "WM_NOTIFY"
End If
Case WM_CLOSE
' Clean up and exit the application
PostQuitMessage(0)
Return 0
End Select
UpdateWindow(hwndScintilla) ' Repaint the window
Return DefWindowProc(hWnd, msg, wParam, lParam)
End Function
Sub WAIT_()
Print "Hit any key to continue..."
Sleep
End Sub
' Entry point of the program
Dim As WNDCLASS wc
Dim As MSG msg
Dim As HWND hWnd
' Load Scintilla.dll dynamically
hScintilla = DylibLoad("Scintilla64.dll")
If hScintilla = 0 Then
Print "Failed to load Scintilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Load Lexilla.dll dynamically
hLexilla = DylibLoad("Lexilla64.dll")
If hLexilla = 0 Then
Print "Failed to load Lexilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Retrieve the CreateLexer function
CreateLexer = Cast(Function(ByVal name As ZString Ptr) As Any Ptr, DylibSymbol(hLexilla, "CreateLexer"))
If CreateLexer = 0 Then
Print "Failed to retrieve CreateLexer function."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Define the window class name using a static ZString
Dim Shared As ZString * 25 className => "FreeBASICSyntaxHighlighter"
wc.style = CS_HREDRAW Or CS_VREDRAW
wc.lpfnWndProc = @WindowProc
wc.hInstance = GetModuleHandle(0)
wc.hCursor = LoadCursor(0, IDC_ARROW)
wc.hbrBackground = Cast(HBRUSH, COLOR_WINDOW + 1)
wc.lpszClassName = @className
' Register the window class
If RegisterClass(@wc) = 0 Then
Print "Failed to register window class."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create the main window
hWnd = CreateWindowEx(0, @className, "Lexilla FreeBASIC Example", _
WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, _
0, 0, GetModuleHandle(0), 0)
' Check if the window was created successfully
If hWnd = 0 Then
Print "Failed to create main window."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
' Create a custom lexer for FreeBASIC
' lexer is created after window creation 'FIX BY SARG
Dim As Any Ptr lexer = CreateLexer("freebasic")
If lexer = 0 Then
Print "Failed to create FREEBASIC lexer."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
Else
'set the lexer
SendMessage(hwndScintilla, SCI_SETILEXER, 0, Cast(LPARAM, lexer)) 'SCI_SETILEXER 'FIX BY SARG
Print "FreeBASIC lexer applied."
print "lexer=";SendMessage(hwndScintilla, SCI_GETLEXER,0,0)
'Clear ALL Styles
SendMessage(hwndScintilla, SCI_STYLECLEARALL, 0, 0)
Print "Cleared all styles."
''''''''''''''''''''''' FIXED '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''' Win32 API uses BGR not RGB https://stackoverflow.com/questions/367449/what-exactly-is-bgr-color-space
' Set style for comments
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_COMMENT, RGB(0, 128, 0)) ' Green comments
Print "Set comment style color."
' Set keywords for FreeBASIC
Dim As String keywords0 = "print for next to" 'keywords should be in LOWERCASE
Dim As ZString Ptr ptr_keywords0 = StrPtr(keywords0)
SendMessage(hwndScintilla, SCI_SETKEYWORDS, 0, Cast(LPARAM, ptr_keywords0))
'SendMessage(hwndScintilla, SCI_SETKEYWORDS,0,Cast(integer,@"print,for")) 'FIX BY SARG
' Set style for keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD, RGB(88, 205, 255)) ' Yellow keywords
' SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD2, RGB(255, 0, 0)) ' Blue keywords
' SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD3, RGB(255, 0, 0)) ' Blue keywords
' SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD4, RGB(255, 0, 0)) ' Blue keywords
Print "Set keyword style color."
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_OPERATOR, RGB(255, 0, 0)) ' Blue operator
Print "Set operator style color."
'Set the Style for strings
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_STRING, RGB(255, 0, 0)) 'Blue strings
Print "Set strings style color."
'Set Styles for Numbers
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_NUMBER, RGB(0,0, 255)) 'Red numbers
Print "Set number style color."
' Refresh highlighting for all text
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
End If
' Show the window
ShowWindow(hWnd, SW_SHOWNORMAL)
UpdateWindow(hWnd)
' Main message loop
While GetMessage(@msg, 0, 0, 0)
TranslateMessage(@msg)
DispatchMessage(@msg)
Wend
' Cleanup: Free the Lexilla DLL when done
DylibFree(hLexilla)
DylibFree(hScintilla)
http://www.mediafire.com/file/5a462bale ... lla1_4.zip
-
- Posts: 293
- Joined: Jul 15, 2021 7:23
- Location: Greece
- Contact:
Re: Color text in control ... scintilla or something else !
Below is main.bas for scintilla and window9 GUI lib
project files
http://www.mediafire.com/file/koa1bxqvm ... illa02.zip
Code: Select all
#include "window9.bi"
#include "scintilla.bi"
#include "scilexer.bi"
' Declare handles for Scintilla control and Lexilla DLL
Dim Shared As HWND hwndScintilla
Dim Shared As Any Ptr hLexilla
Dim Shared As Any Ptr hScintilla
Dim Shared As LRESULT result
' Declare function pointers for Lexilla functions
Dim As Function(ByVal name As ZString Ptr) As Any Ptr CreateLexer
Declare Function win9GetCurrent() As HWND
Declare Function win9AddNewGadget(Byval gadget As Integer, Byval hWin As HWND) As Integer
Function getMessages(hwnd As hwnd , msg As Uinteger , wparam As wParam , lparam As lparam) As Integer
Select Case msg
Case WM_NOTIFY
' Handle Scintilla notifications
Dim As NMHDR Ptr nmhdr = Cast(NMHDR Ptr, lParam)
If nmhdr->hwndFrom = hwndScintilla AndAlso nmhdr->code = SCN_MODIFIED Then
' Refresh highlighting when text is modified
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
Print "WM_NOTIFY"
End If
End Select
Return 0
End Function
Function sciHWNDGadget(gadget As Long, x As Long, y As Long , w As Long , h As Long , Exstyle As Integer = 0) As HWND
hwndScintilla = CreateWindowEx(Exstyle,"Scintilla","", WS_CHILD Or WS_VISIBLE Or WS_CLIPCHILDREN,x,y,w,h,_
Cast(HWND,win9GetCurrent()),_
Cast(HMENU,Cint(gadget)),_
0, 0)
win9AddNewGadget(gadget,hwndScintilla)
Return hwndScintilla
End Function
' Load Scintilla.dll dynamically
hScintilla = DylibLoad("Scintilla64.dll")
If hScintilla = 0 Then
Print "Failed to load Scintilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Load Lexilla.dll dynamically
hLexilla = DylibLoad("Lexilla64.dll")
If hLexilla = 0 Then
Print "Failed to load Lexilla64.dll. Make sure the DLL is in the correct path."
Sleep
End
End If
' Retrieve the CreateLexer function
CreateLexer = Cast(Function(ByVal name As ZString Ptr) As Any Ptr, DylibSymbol(hLexilla, "CreateLexer"))
If CreateLexer = 0 Then
Print "Failed to retrieve CreateLexer function."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
End If
'Create main window
Var mainHWND = Openwindow( "sciHWND" , 10,10,450,460)
'Dim As Hwnd sciHWND = sciHWNDGadget( 1 , 10,10,400,400)
sciHWNDGadget( 1,10,10,400,400)
' Create a custom lexer for FreeBASIC
' lexer is created after window creation 'FIX BY SARG
Dim As Any Ptr lexer = CreateLexer("freebasic")
If lexer = 0 Then
Print "Failed to create FREEBASIC lexer."
DylibFree(hLexilla)
DylibFree(hScintilla)
Sleep
Else
'set the lexer
SendMessage(hwndScintilla, SCI_SETILEXER, 0, Cast(LPARAM, lexer)) 'SCI_SETILEXER 'FIX BY SARG
Print "FreeBASIC lexer applied."
print "lexer=";SendMessage(hwndScintilla, SCI_GETLEXER,0,0)
'Clear ALL Styles
SendMessage(hwndScintilla, SCI_STYLECLEARALL, 0, 0)
Print "Cleared all styles."
''''''''''''''''''''''' FIXED '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''''' Win32 API uses BGR not RGB https://stackoverflow.com/questions/367449/what-exactly-is-bgr-color-space
' Set style for comments
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_COMMENT, RGB(0, 128, 0)) ' Green comments
Print "Set comment style color."
' Set keywords for FreeBASIC
Dim As String keywords0 = "print for next to" 'keywords should be in LOWERCASE
Dim As ZString Ptr ptr_keywords0 = StrPtr(keywords0)
SendMessage(hwndScintilla, SCI_SETKEYWORDS, 0, Cast(LPARAM, ptr_keywords0))
' Set style for keywords
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD, RGB(223, 150, 42)) ' Light Blue keywords
' SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD2, RGB(255, 0, 0)) ' Blue keywords
' SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD3, RGB(255, 0, 0)) ' Blue keywords
' SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_KEYWORD4, RGB(255, 0, 0)) ' Blue keywords
Print "Set keyword style color."
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_OPERATOR, RGB(255, 0, 0)) ' Blue operator
Print "Set operator style color."
'Set the Style for strings
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_STRING, RGB(255, 0, 0)) 'Blue strings
Print "Set strings style color."
'Set Styles for Numbers
SendMessage(hwndScintilla, SCI_STYLESETFORE, SCE_B_NUMBER, RGB(0,0, 255)) 'Red numbers
Print "Set number style color."
' Refresh highlighting for all text
result = SendMessage(hwndScintilla, SCI_COLOURISE, 0, -1)
If result = 0 Then
Print "Syntax highlighting applied."
Else
Print "Failed to apply syntax highlighting."
End If
End If
' Set codepage
SendMessage(hwndScintilla, SCI_SETCODEPAGE, SC_CP_UTF8, 0)
' Set the initial text in Scintilla
Dim As String sampleCode = !"' Example FreeBASIC code\n\nPrint \"Hello, FreeBASIC!\"\nFor i = 1 To 10\n Print i\nNext i\n"
Dim As ZString Ptr samplePtr = StrPtr(sampleCode)
result = SendMessage(hwndScintilla, SCI_SETTEXT, 0, Cast(LPARAM, samplePtr))
' Debug print to check result of setting text
If result = 0 Then
Print "Text set successfully."
Else
Print "Failed to set text."
End If
' set callback for main window (mainHWND)
Setwindowcallback(Cint(@getMessages) , 0)
' Main event loop
Do
Var Event = Waitevent()
If Event = Eventclose Then Exit Do
Loop
' Cleanup: Free the Lexilla DLL when done
DylibFree(hLexilla)
DylibFree(hScintilla)
http://www.mediafire.com/file/koa1bxqvm ... illa02.zip