diff --git a/.gitignore b/.gitignore index fe986af..4433602 100644 --- a/.gitignore +++ b/.gitignore @@ -134,7 +134,7 @@ publish/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore -**/packages/* +# **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # If using the old MSBuild-Integrated Package Restore, uncomment this: diff --git a/.wakatime-project b/.wakatime-project deleted file mode 100644 index 0970915..0000000 --- a/.wakatime-project +++ /dev/null @@ -1 +0,0 @@ -notepadpp-wakatime \ No newline at end of file diff --git a/DllExport.bat b/DllExport.bat new file mode 100644 index 0000000..8c4603a --- /dev/null +++ b/DllExport.bat @@ -0,0 +1,509 @@ +@echo off +:: Copyright (c) 2016-2021 Denis Kuzmin [x-3F@outlook.com] github/3F +:: https://github.com/3F/DllExport +if "%~1"=="/?" goto bq +set "aa=%~dpnx0" +set ab=%* +set ac=%* +if defined ab ( +if defined __p_call ( +set ac=%ac:^^=^% +) else ( +set ab=%ab:^=^^% +) +) +set wMgrArgs=%ac% +set ad=%ab:!=^!% +setlocal enableDelayedExpansion +set "ae=^" +set "ad=!ad:%%=%%%%!" +set "ad=!ad:&=%%ae%%&!" +set "af=1.7.4" +set "wAction=Configure" +set "ag=DllExport" +set "ah=tools/net.r_eg.DllExport.Wizard.targets" +set "ai=packages" +set "aj=https://www.nuget.org/api/v2/package/" +set "ak=build_info.txt" +set "al=!aa!" +set "wRootPath=!cd!" +set /a wDxpOpt=0 +set "am=" +set "an=" +set "ao=" +set "ap=" +set "aq=" +set "ar=" +set "as=" +set "at=" +set "au=" +set "av=" +set /a aw=0 +if not defined ab ( +if defined wAction goto br +goto bq +) +call :bs bk !ad! bl +goto bt +:bq +echo. +@echo .NET DllExport v1.7.4.29858+c1cc52f +@echo Copyright (c) 2009-2015 Robert Giesecke +@echo Copyright (c) 2016-2021 Denis Kuzmin ^ github/3F +echo. +echo MIT License +@echo https://github.com/3F/DllExport +echo Based on hMSBuild, MvsSln, +GetNuTool: https://github.com/3F +echo. +@echo. +@echo Usage: DllExport [args to DllExport] [args to GetNuTool] [args to hMSBuild] +echo ------ +echo. +echo Arguments +echo --------- +echo -action {type} - Specified action for Wizard. Where {type}: +echo * Configure - To configure DllExport for specific projects. +echo * Update - To update pkg reference for already configured projects. +echo * Restore - To restore configured DllExport. +echo * Export - To export configured projects data. +echo * Recover - To re-configure projects via predefined/exported data. +echo * Unset - To unset all data from specified projects. +echo * Upgrade - Aggregates an Update action with additions for upgrading. +echo. +echo -sln-dir {path} - Path to directory with .sln files to be processed. +echo -sln-file {path} - Optional predefined .sln file to be processed. +echo -metalib {path} - Relative path to meta library. +echo -metacor {path} - Relative path to meta core library. +echo -dxp-target {path} - Relative path to entrypoint wrapper of the main core. +echo -dxp-version {num} - Specific version of DllExport. Where {num}: +echo * Versions: 1.7.3 ... +echo * Keywords: +echo `actual` - Unspecified local/latest remote version; +echo ( Only if you know what you are doing ) +echo. +echo -msb {path} - Full path to specific msbuild. +echo -hMSBuild {args} - Access to hMSBuild tool (packed) https://github.com/3F/hMSBuild +echo -packages {path} - A common directory for packages. +echo -server {url} - Url for searching remote packages. +echo -proxy {cfg} - To use proxy. The format: [usr[:pwd]@]host[:port] +echo -pkg-link {uri} - Direct link to package from the source via specified URI. +echo -force - Aggressive behavior, e.g. like removing pkg when updating. +echo -no-mgr - Do not use %~nx0 for automatic restore the remote package. +echo -mgr-up - Updates %~nx0 to version from '-dxp-version'. +echo -wz-target {path} - Relative path to entrypoint wrapper of the main wizard. +echo -pe-exp-list {module} - To list all available exports from PE32/PE32+ module. +echo -eng - Try to use english language for all build messages. +echo -GetNuTool {args} - Access to GetNuTool (integrated) https://github.com/3F/GetNuTool +echo -debug - To show additional information. +echo -version - Displays version for which (together with) it was compiled. +echo -build-info - Displays actual build information from selected DllExport. +echo -help - Displays this help. Aliases: -help -h +echo. +echo Flags +echo ----- +echo __p_call - To use the call-type logic when invoking %~nx0 +echo. +echo Samples +echo ------- +echo DllExport -action Configure -force -pkg-link http://host/v1.7.3.nupkg +echo DllExport -action Restore -sln-file "Conari.sln" +echo DllExport -proxy guest:1234@10.0.2.15:7428 -action Configure +echo. +echo DllExport -mgr-up -dxp-version 1.7.3 +echo DllExport -action Upgrade -dxp-version 1.7.3 +echo. +echo DllExport -GetNuTool /p:ngpackages="Conari;regXwild" +echo DllExport -pe-exp-list bin\Debug\regXwild.dll +goto bu +:bt +set /a ax=0 +:bv +set ay=!bk[%ax%]! +if [!ay!]==[-help] ( goto bq ) else if [!ay!]==[-h] ( goto bq ) else if [!ay!]==[-?] ( goto bq ) +if [!ay!]==[-debug] ( +set am=1 +goto bw +) else if [!ay!]==[-action] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wAction=!v! +for %%g in (Restore, Configure, Update, Export, Recover, Unset, Upgrade, Default) do ( +if "!v!"=="%%g" goto bw +) +echo Unknown -action !v! +exit/B 1 +) else if [!ay!]==[-sln-dir] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wSlnDir=!v! +goto bw +) else if [!ay!]==[-sln-file] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wSlnFile=!v! +goto bw +) else if [!ay!]==[-metalib] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wMetaLib=!v! +goto bw +) else if [!ay!]==[-metacor] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wMetaCor=!v! +goto bw +) else if [!ay!]==[-dxp-target] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wDxpTarget=!v! +goto bw +) else if [!ay!]==[-dxp-version] ( set /a "ax+=1" & call :bx bk[!ax!] v +set af=!v! +goto bw +) else if [!ay!]==[-msb] ( set /a "ax+=1" & call :bx bk[!ax!] v +set ao=!v! +goto bw +) else if [!ay!]==[-packages] ( set /a "ax+=1" & call :bx bk[!ax!] v +set ai=!v! +goto bw +) else if [!ay!]==[-server] ( set /a "ax+=1" & call :bx bk[!ax!] v +set aj=!v! +goto bw +) else if [!ay!]==[-proxy] ( set /a "ax+=1" & call :bx bk[!ax!] v +set at=!v! +set wProxy=!v! +goto bw +) else if [!ay!]==[-pkg-link] ( set /a "ax+=1" & call :bx bk[!ax!] v +set ap=!v! +set af=!ay! +goto bw +) else if [!ay!]==[-force] ( +set ar=1 +goto bw +) else if [!ay!]==[-no-mgr] ( +set /a wDxpOpt^|=1 +goto bw +) else if [!ay!]==[-mgr-up] ( +set as=1 +goto bw +) else if [!ay!]==[-wz-target] ( set /a "ax+=1" & call :bx bk[!ax!] v +set ah=!v! +goto bw +) else if [!ay!]==[-pe-exp-list] ( set /a "ax+=1" & call :bx bk[!ax!] v +set aq=!v! +goto bw +) else if [!ay!]==[-eng] ( +chcp 437 >nul +goto bw +) else if [!ay!]==[-GetNuTool] ( +call :by -GetNuTool 10 +set /a aw=!ERRORLEVEL! & goto bu +) else if [!ay!]==[-hMSBuild] ( +set av=1 & goto br +) else if [!ay!]==[-version] ( +@echo v1.7.4.29858+c1cc52f %__dxp_pv% +goto bu +) else if [!ay!]==[-build-info] ( +set an=1 +goto bw +) else if [!ay!]==[-tests] ( set /a "ax+=1" & call :bx bk[!ax!] v +set au=!v! +goto bw +) else ( +echo Incorrect key: !ay! +set /a aw=1 +goto bu +) +:bw +set /a "ax+=1" & if %ax% LSS !bl! goto bv +:br +call :bz "dxpName = " ag +call :bz "dxpVersion = " af +call :bz "-sln-dir = " wSlnDir +call :bz "-sln-file = " wSlnFile +call :bz "-metalib = " wMetaLib +call :bz "-metacor = " wMetaCor +call :bz "-dxp-target = " wDxpTarget +call :bz "-wz-target = " ah +call :bz "#opt " wDxpOpt +if defined af ( +if "!af!"=="actual" ( +set "af=" +) +) +set wPkgVer=!af! +if z%wAction%==zUpgrade ( +call :bz "Upgrade is on" +set as=1 +set ar=1 +) +call :b0 ai +set "ai=!ai!\\" +set "az=!ag!" +set "wPkgPath=!ai!!ag!" +if defined af ( +set "az=!az!/!af!" +set "wPkgPath=!wPkgPath!.!af!" +) +if defined ar ( +if exist "!wPkgPath!" ( +call :bz "Removing old version before continue. '-force' key rule. " wPkgPath +rmdir /S/Q "!wPkgPath!" +) +) +set a0="!wPkgPath!\\!ah!" +call :bz "wPkgPath = " wPkgPath +if not exist !a0! ( +if exist "!wPkgPath!" ( +call :bz "Trying to replace obsolete version ... " wPkgPath +rmdir /S/Q "!wPkgPath!" +) +call :bz "-pkg-link = " ap +call :bz "-server = " aj +if defined ap ( +set aj=!ap! +if "!aj::=!"=="!aj!" ( +set aj=!cd!/!aj! +) +if "!wPkgPath::=!"=="!wPkgPath!" ( +set "a1=../" +) +set "az=:!a1!!wPkgPath!|" +) +if defined ao ( +set a2=-msbuild "!ao!" +) +set a3=!a2! /p:ngserver="!aj!" /p:ngpackages="!az!" /p:ngpath="!ai!" /p:proxycfg="!at! " +call :bz "GetNuTool call: " a3 +if defined am ( +call :b1 !a3! +) else ( +call :b1 !a3! >nul +) +) +if defined av ( +call :by -hMSBuild 9 +set /a aw=!ERRORLEVEL! & goto bu +) +if defined aq ( +"!wPkgPath!\\tools\\PeViewer.exe" -list -pemodule "!aq!" +set /a aw=%ERRORLEVEL% +goto bu +) +if defined an ( +call :bz "buildInfo = " wPkgPath ak +if not exist "!wPkgPath!\\!ak!" ( +echo information about build is not available. +set /a aw=2 +goto bu +) +type "!wPkgPath!\\!ak!" +goto bu +) +if not exist !a0! ( +echo Something went wrong. Try to use another keys. +set /a aw=2 +goto bu +) +call :bz "wRootPath = " wRootPath +call :bz "wAction = " wAction +call :bz "wMgrArgs = " wMgrArgs +if defined ao ( +call :bz "Use specific MSBuild tools: " ao +set a4="!ao!" +goto b2 +) +call :b3 bm & set a4="!bm!" +if "!ERRORLEVEL!"=="0" goto b2 +echo MSBuild tools was not found. Try with `-msb` key. +set /a aw=2 +goto bu +:b2 +if not defined a4 ( +echo Something went wrong. Use `-debug` key for details. +set /a aw=2 +goto bu +) +if not defined au ( +if not defined ao if defined wPkgPath ( +set a4="!wPkgPath!\\hMSBuild" +for /f "tokens=*" %%i in ('!a4! -version') do set a5=%%i +call :b4 !a5! bn +call :bz "hMSBuild -v" a5 bn +if !bn! GEQ 230 ( +call :bz "2.3+" +set a4=!a4! -vsw-as "-requiresAny -requires Microsoft.NetCore.Component.SDK Microsoft.Net.Core.Component.SDK -products * -latest -prerelease" +) +) +call :bz "Target: " a4 a0 +call !a4! /nologo /v:m /m:4 !a0! +) +:bu +if defined au ( +echo Running Tests ... "!au!" +call :b3 bo +"!bo!" /nologo /v:m /m:4 "!au!" +exit/B 0 +) +if defined as ( +(copy /B/Y "!wPkgPath!\\DllExport.bat" "!al!" > nul) && ( echo Manager has been updated. & exit/B 0 ) || ( (echo -mgr-up failed:!aw! 1>&2) & exit/B 1 ) +) +exit/B !aw! +:b4 +set a6=%~1 +for /f "tokens=1,2 delims=." %%a in ("!a6!") do ( +set _=%%b & set /a _*=10 & set /a %2=%%a!_! +) +exit/B 0 +:by +set ay=%~1 +set /a a7=%~2 +call :bz "accessing to !ay! ..." +for /L %%p IN (0,1,8181) DO ( +if "!ad:~%%p,%a7%!"=="!ay!" ( +set a8=!ad:~%%p! +set a9=!a8:~%a7%! +if defined av ( +call "!wPkgPath!\\hMSBuild" !a9! +) else ( +call :b1 !a9! +) +exit/B !ERRORLEVEL! +) +) +call :bz "!ay! is corrupted: " ad +exit/B 1 +:b3 +call :bz "Searching from .NET Framework - .NET 4.0, ..." +for %%v in (4.0, 3.5, 2.0) do ( +call :b5 %%v Y & if defined Y ( +set %1=!Y! +exit/B 0 +) +) +call :bz "msb -netfx: not found" +set "%1=" +exit/B 2 +:b5 +call :bz "check %1" +for /F "usebackq tokens=2* skip=2" %%a in ( +`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%1" /v MSBuildToolsPath 2^> nul` +) do if exist %%b ( +set a_=%%~b +call :bz ":msbfound " a_ +call :b6 a_ bp +set %2=!bp! +exit/B 0 +) +set "%2=" +exit/B 0 +:b6 +set %2=!%~1!\MSBuild.exe +exit/B 0 +:bz +if defined am ( +set ba=%1 +set ba=!ba:~0,-1! +set ba=!ba:~1! +echo.[%TIME% ] !ba! !%2! !%3! +) +exit/B 0 +:b0 +call :b7 %1 +call :b8 %1 +exit/B 0 +:b7 +call :b9 %1 "-=1" +exit/B 0 +:b8 +call :b9 %1 "+=1" +exit/B 0 +:b9 +set bb=z!%1!z +if "%~2"=="-=1" (set "bc=1") else (set "bc=") +if defined bc ( +set /a "i=-2" +) else ( +set /a "i=1" +) +:b_ +if "!bb:~%i%,1!"==" " ( +set /a "i%~2" +goto b_ +) +if defined bc set /a "i+=1" +if defined bc ( +set "%1=!bb:~1,%i%!" +) else ( +set "%1=!bb:~%i%,-1!" +) +exit/B 0 +:bs +set "bd=%~1" +set /a ax=-1 +:ca +set /a ax+=1 +set %bd%[!ax!]=%~2 +shift & if not "%~3"=="" goto ca +set /a ax-=1 +set %1=!ax! +exit/B 0 +:bx +set %2=!%1! +exit/B 0 +:b1 +setlocal disableDelayedExpansion +@echo off +:: GetNuTool - Executable version +:: Copyright (c) 2015-2018,2020 Denis Kuzmin [ x-3F@outlook.com ] +:: https://github.com/3F/GetNuTool +set be=gnt.core +set bf="%temp%\%random%%random%%be%" +if "%~1"=="-unpack" goto cb +set bg=%* +if defined __p_call if defined bg set bg=%bg:^^=^% +set bh=%__p_msb% +if defined bh goto cc +if "%~1"=="-msbuild" goto cd +for %%v in (4.0, 14.0, 12.0, 3.5, 2.0) do ( +for /F "usebackq tokens=2* skip=2" %%a in ( +`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath 2^> nul` +) do if exist %%b ( +set bh="%%~b\MSBuild.exe" +goto cc +) +) +echo MSBuild was not found. Try -msbuild "fullpath" args 1>&2 +exit/B 2 +:cd +shift +set bh=%1 +shift +set bi=%bg:!= #__b_ECL## % +setlocal enableDelayedExpansion +set bi=!bi:%%=%%%%! +:ce +for /F "tokens=1* delims==" %%a in ("!bi!") do ( +if "%%~b"=="" ( +call :cf !bi! +exit/B %ERRORLEVEL% +) +set bi=%%a #__b_EQ## %%b +) +goto ce +:cf +shift & shift +set "bg=" +:cg +set bg=!bg! %1 +shift & if not "%~2"=="" goto cg +set bg=!bg: #__b_EQ## ==! +setlocal disableDelayedExpansion +set bg=%bg: #__b_ECL## =!% +:cc +call :ch +call %bh% %bf% /nologo /p:wpath="%cd%/" /v:m /m:4 %bg% +set "bh=" +set bj=%ERRORLEVEL% +del /Q/F %bf% +exit/B %bj% +:cb +set bf="%cd%\%be%" +echo Generating minified version in %bf% ... +:ch +%bf% +set a=PropertyGroup&set b=Condition&set c=ngpackages&set d=Target&set e=DependsOnTargets&set f=TaskCoreDllPath&set g=MSBuildToolsPath&set h=UsingTask&set i=CodeTaskFactory&set j=ParameterGroup&set k=Reference&set l=Include&set m=System&set n=Using&set o=Namespace&set p=IsNullOrEmpty&set q=return&set r=string&set s=delegate&set t=foreach&set u=WriteLine&set v=Combine&set w=Console.WriteLine&set x=Directory&set y=GetNuTool&set z=StringComparison&set _=EXT_NUSPEC +^ - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WakaTime/ILMergeOrder.txt b/WakaTime/ILMergeOrder.txt deleted file mode 100644 index 3fda7f5..0000000 --- a/WakaTime/ILMergeOrder.txt +++ /dev/null @@ -1,4 +0,0 @@ -# this file contains the partial list of the merged assemblies in the merge order -# you can fill it from the obj\CONFIG\PROJECT.ilmerge generated on every build -# and finetune merge order to your satisfaction - diff --git a/WakaTime/Properties/Resources.Designer.cs b/WakaTime/ImageResources.Designer.cs similarity index 85% rename from WakaTime/Properties/Resources.Designer.cs rename to WakaTime/ImageResources.Designer.cs index ebe71d2..3b9a429 100644 --- a/WakaTime/Properties/Resources.Designer.cs +++ b/WakaTime/ImageResources.Designer.cs @@ -1,73 +1,73 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WakaTime.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WakaTime.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap wakatime { - get { - object obj = ResourceManager.GetObject("wakatime", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WakaTime { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class ImageResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal ImageResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WakaTime.ImageResources", typeof(ImageResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap WakaTime { + get { + object obj = ResourceManager.GetObject("WakaTime", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/WakaTime/Properties/Resources.resx b/WakaTime/ImageResources.resx similarity index 94% rename from WakaTime/Properties/Resources.resx rename to WakaTime/ImageResources.resx index 1e06994..3b1a0a9 100644 --- a/WakaTime/Properties/Resources.resx +++ b/WakaTime/ImageResources.resx @@ -1,124 +1,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\wakatime-16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Assets\wakatime-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/WakaTime/JSONSerializer.cs b/WakaTime/JSONSerializer.cs new file mode 100644 index 0000000..c15ca1a --- /dev/null +++ b/WakaTime/JSONSerializer.cs @@ -0,0 +1,44 @@ +using System.Collections.ObjectModel; +using System.IO; +using System.Runtime.Serialization.Json; +using System.Text; + +namespace WakaTime +{ + public static class JSONSerializer + { + /// + /// Serializes an object to JSON + /// + public static string Serialize(TType instance) where TType : class + { + var serializer = new DataContractJsonSerializer(typeof(TType)); + using (var stream = new MemoryStream()) + { + serializer.WriteObject(stream, instance); + return Encoding.Default.GetString(stream.ToArray()); + } + } + + /// + /// Serializes a collection of Heartbeat to JSON + /// + public static string SerializeArrayHeartbeat(Collection instance) + { + var heartbeats = string.Join(",", instance); + return $"[{heartbeats}]"; + } + + /// + /// DeSerializes an object from JSON + /// + public static TType DeSerialize(string json) where TType : class + { + using (var stream = new MemoryStream(Encoding.Default.GetBytes(json))) + { + var serializer = new DataContractJsonSerializer(typeof(TType)); + return serializer.ReadObject(stream) as TType; + } + } + } +} \ No newline at end of file diff --git a/WakaTime/Logger.cs b/WakaTime/Logger.cs index 7ed472b..68c827b 100644 --- a/WakaTime/Logger.cs +++ b/WakaTime/Logger.cs @@ -1,69 +1,81 @@ -using System; -using System.IO; -using System.Windows.Forms; - -namespace WakaTime -{ - internal enum LogLevel - { - Debug = 1, - Info, - Warning, - HandledException - }; - - internal static class Logger - { - internal static void Debug(string msg) - { - if (!WakaTimePackage.Config.Debug) - return; - - Log(LogLevel.Debug, msg); - } - - internal static void Info(string msg) - { - Log(LogLevel.Info, msg); - } - - internal static void Warning(string msg) - { - Log(LogLevel.Warning, msg); - } - - internal static void Error(string msg, Exception ex = null) - { - var exceptionMessage = $"{msg}: {ex}"; - - Log(LogLevel.HandledException, exceptionMessage); - } - - internal static void Log(LogLevel level, string msg) - { - try - { - var writer = Setup(); - if (writer == null) return; - - writer.WriteLine("[Wakatime {0} {1:hh:mm:ss tt}] {2}", Enum.GetName(level.GetType(), level), DateTime.Now, msg); - writer.Flush(); - writer.Close(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString(), "Error writing to WakaTime.log", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - } - } - - private static StreamWriter Setup() - { - var configDir = Dependencies.AppDataDirectory; - if (string.IsNullOrWhiteSpace(configDir)) return null; - - var filename = $"{configDir}\\{Constants.PluginName}.log"; - var writer = new StreamWriter(File.Open(filename, FileMode.Append, FileAccess.Write)); - return writer; - } - } -} +using System; +using System.IO; +using System.Windows.Forms; + +namespace WakaTime +{ + public class Logger + { + private readonly bool _isDebugEnabled; + private readonly StreamWriter _writer; + + public Logger(string configFilepath) + { + var configFile = new ConfigFile(configFilepath); + + _isDebugEnabled = configFile.GetSettingAsBoolean("debug"); + + var filename = $"{AppDataDirectory}\\notepadpp-wakatime.log"; + + _writer = new StreamWriter(File.Open(filename, FileMode.Append, FileAccess.Write)); + } + + private static string AppDataDirectory + { + get + { + var roamingFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + var appFolder = Path.Combine(roamingFolder, "WakaTime"); + + // Create folder if it does not exist + if (!Directory.Exists(appFolder)) + Directory.CreateDirectory(appFolder); + + return appFolder; + } + } + + public void Debug(string msg) + { + if (!_isDebugEnabled) + return; + + Log(LogLevel.Debug, msg); + } + + public void Info(string msg) + { + Log(LogLevel.Info, msg); + } + + public void Warning(string msg) + { + Log(LogLevel.Warning, msg); + } + + public void Error(string msg, Exception ex = null) + { + var exceptionMessage = $"{msg}: {ex}"; + + Log(LogLevel.HandledException, exceptionMessage); + } + + private void Log(LogLevel level, string msg) + { + try + { + _writer.WriteLine("[Wakatime {0} {1:hh:mm:ss tt}] {2}", Enum.GetName(level.GetType(), level), DateTime.Now, msg); + _writer.Flush(); + } + catch (Exception ex) + { + MessageBox.Show(ex.ToString(), "Error writing to notepadpp-wakatime.log", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + } + + public void Close() + { + _writer?.Close(); + } + } +} diff --git a/WakaTime/Metadata.cs b/WakaTime/Metadata.cs new file mode 100644 index 0000000..bab3767 --- /dev/null +++ b/WakaTime/Metadata.cs @@ -0,0 +1,10 @@ +namespace WakaTime +{ + public class Metadata + { + public string EditorVersion { get; set; } + public string EditorName { get; set; } + public string PluginVersion { get; set; } + public string PluginName { get; set; } + } +} diff --git a/WakaTime/NativeMethods.cs b/WakaTime/NativeMethods.cs index dd75849..a7e09bc 100644 --- a/WakaTime/NativeMethods.cs +++ b/WakaTime/NativeMethods.cs @@ -1,20 +1,12 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace WakaTime -{ - internal static class NativeMethods - { - [DllImport("kernel32")] - internal static extern long WritePrivateProfileString(string section, string key, string val, string filePath); - - [DllImport("kernel32")] - internal static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, - int size, string filePath); - - [DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool IsWow64Process([In] IntPtr hProcess, [Out] out bool wow64Process); - } -} +using System; +using System.Runtime.InteropServices; + +namespace WakaTime +{ + internal static class NativeMethods + { + [DllImport("kernel32.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)] + [return: MarshalAs(UnmanagedType.Bool)] + internal static extern bool IsWow64Process([In] IntPtr hProcess, [Out] out bool wow64Process); + } +} diff --git a/WakaTime/PluginInfrastructure/ClikeStringArray.cs b/WakaTime/PluginInfrastructure/ClikeStringArray.cs index 7bc1b21..46e1b81 100644 --- a/WakaTime/PluginInfrastructure/ClikeStringArray.cs +++ b/WakaTime/PluginInfrastructure/ClikeStringArray.cs @@ -1,77 +1,77 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - public class ClikeStringArray : IDisposable - { - IntPtr _nativeArray; - List _nativeItems; - bool _disposed = false; - - public ClikeStringArray(int num, int stringCapacity) - { - _nativeArray = Marshal.AllocHGlobal((num + 1) * IntPtr.Size); - _nativeItems = new List(); - for (int i = 0; i < num; i++) - { - IntPtr item = Marshal.AllocHGlobal(stringCapacity); - Marshal.WriteIntPtr(_nativeArray + (i * IntPtr.Size), item); - _nativeItems.Add(item); - } - Marshal.WriteIntPtr(_nativeArray + (num * IntPtr.Size), IntPtr.Zero); - } - public ClikeStringArray(List lstStrings) - { - _nativeArray = Marshal.AllocHGlobal((lstStrings.Count + 1) * IntPtr.Size); - _nativeItems = new List(); - for (int i = 0; i < lstStrings.Count; i++) - { - IntPtr item = Marshal.StringToHGlobalUni(lstStrings[i]); - Marshal.WriteIntPtr(_nativeArray + (i * IntPtr.Size), item); - _nativeItems.Add(item); - } - Marshal.WriteIntPtr(_nativeArray + (lstStrings.Count * IntPtr.Size), IntPtr.Zero); - } - - public IntPtr NativePointer { get { return _nativeArray; } } - public List ManagedStringsAnsi { get { return _getManagedItems(false); } } - public List ManagedStringsUnicode { get { return _getManagedItems(true); } } - List _getManagedItems(bool unicode) - { - List _managedItems = new List(); - for (int i = 0; i < _nativeItems.Count; i++) - { - if (unicode) _managedItems.Add(Marshal.PtrToStringUni(_nativeItems[i])); - else _managedItems.Add(Marshal.PtrToStringAnsi(_nativeItems[i])); - } - return _managedItems; - } - - public void Dispose() - { - try - { - if (!_disposed) - { - for (int i = 0; i < _nativeItems.Count; i++) - if (_nativeItems[i] != IntPtr.Zero) Marshal.FreeHGlobal(_nativeItems[i]); - if (_nativeArray != IntPtr.Zero) Marshal.FreeHGlobal(_nativeArray); - _disposed = true; - } - } - catch (Exception e) - { - MessageBox.Show(MethodBase.GetCurrentMethod().ToString() +": "+ e.Message, this.GetType().Name); - } - } - ~ClikeStringArray() - { - Dispose(); - } - } +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows.Forms; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + public class ClikeStringArray : IDisposable + { + IntPtr _nativeArray; + List _nativeItems; + bool _disposed = false; + + public ClikeStringArray(int num, int stringCapacity) + { + _nativeArray = Marshal.AllocHGlobal((num + 1) * IntPtr.Size); + _nativeItems = new List(); + for (int i = 0; i < num; i++) + { + IntPtr item = Marshal.AllocHGlobal(stringCapacity); + Marshal.WriteIntPtr(_nativeArray + (i * IntPtr.Size), item); + _nativeItems.Add(item); + } + Marshal.WriteIntPtr(_nativeArray + (num * IntPtr.Size), IntPtr.Zero); + } + public ClikeStringArray(List lstStrings) + { + _nativeArray = Marshal.AllocHGlobal((lstStrings.Count + 1) * IntPtr.Size); + _nativeItems = new List(); + for (int i = 0; i < lstStrings.Count; i++) + { + IntPtr item = Marshal.StringToHGlobalUni(lstStrings[i]); + Marshal.WriteIntPtr(_nativeArray + (i * IntPtr.Size), item); + _nativeItems.Add(item); + } + Marshal.WriteIntPtr(_nativeArray + (lstStrings.Count * IntPtr.Size), IntPtr.Zero); + } + + public IntPtr NativePointer { get { return _nativeArray; } } + public List ManagedStringsAnsi { get { return _getManagedItems(false); } } + public List ManagedStringsUnicode { get { return _getManagedItems(true); } } + List _getManagedItems(bool unicode) + { + List _managedItems = new List(); + for (int i = 0; i < _nativeItems.Count; i++) + { + if (unicode) _managedItems.Add(Marshal.PtrToStringUni(_nativeItems[i])); + else _managedItems.Add(Marshal.PtrToStringAnsi(_nativeItems[i])); + } + return _managedItems; + } + + public void Dispose() + { + try + { + if (!_disposed) + { + for (int i = 0; i < _nativeItems.Count; i++) + if (_nativeItems[i] != IntPtr.Zero) Marshal.FreeHGlobal(_nativeItems[i]); + if (_nativeArray != IntPtr.Zero) Marshal.FreeHGlobal(_nativeArray); + _disposed = true; + } + } + catch (Exception e) + { + MessageBox.Show(MethodBase.GetCurrentMethod().ToString() +": "+ e.Message, this.GetType().Name); + } + } + ~ClikeStringArray() + { + Dispose(); + } + } } \ No newline at end of file diff --git a/WakaTime/PluginInfrastructure/DllExport/DllExportAttribute.cs b/WakaTime/PluginInfrastructure/DllExport/DllExportAttribute.cs deleted file mode 100644 index 60fbcbe..0000000 --- a/WakaTime/PluginInfrastructure/DllExport/DllExportAttribute.cs +++ /dev/null @@ -1,29 +0,0 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using System.Runtime.InteropServices; - -namespace NppPlugin.DllExport -{ - [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] - partial class DllExportAttribute : Attribute - { - public DllExportAttribute() - { - } - - public DllExportAttribute(string exportName) - : this(exportName, CallingConvention.StdCall) - { - } - - public DllExportAttribute(string exportName, CallingConvention callingConvention) - { - ExportName = exportName; - CallingConvention = callingConvention; - } - - public CallingConvention CallingConvention { get; set; } - - public string ExportName { get; set; } - } -} \ No newline at end of file diff --git a/WakaTime/PluginInfrastructure/DllExport/Mono.Cecil.dll b/WakaTime/PluginInfrastructure/DllExport/Mono.Cecil.dll deleted file mode 100644 index ffe9b57..0000000 Binary files a/WakaTime/PluginInfrastructure/DllExport/Mono.Cecil.dll and /dev/null differ diff --git a/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.MSBuild.dll b/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.MSBuild.dll deleted file mode 100644 index c3c9de8..0000000 Binary files a/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.MSBuild.dll and /dev/null differ diff --git a/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.dll b/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.dll deleted file mode 100644 index f673ed5..0000000 Binary files a/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.dll and /dev/null differ diff --git a/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.targets b/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.targets deleted file mode 100644 index b7bdd41..0000000 --- a/WakaTime/PluginInfrastructure/DllExport/NppPlugin.DllExport.targets +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - $(DevEnvDir)\..\..\VC\bin - - - - - - - - - - diff --git a/WakaTime/PluginInfrastructure/Docking_h.cs b/WakaTime/PluginInfrastructure/Docking_h.cs index bb256da..b31abdc 100644 --- a/WakaTime/PluginInfrastructure/Docking_h.cs +++ b/WakaTime/PluginInfrastructure/Docking_h.cs @@ -1,71 +1,71 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -// -// This file should stay in sync with the CPP project file -// "notepad-plus-plus/PowerEditor/src/WinControls/DockingWnd/Docking.h" -// found at -// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/WinControls/DockingWnd/Docking.h - -using System; -using System.Runtime.InteropServices; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - - [Flags] - public enum NppTbMsg : uint - { - // styles for containers - //CAPTION_TOP = 1, - //CAPTION_BOTTOM = 0, - - // defines for docking manager - CONT_LEFT = 0, - CONT_RIGHT = 1, - CONT_TOP = 2, - CONT_BOTTOM = 3, - DOCKCONT_MAX = 4, - - // mask params for plugins of internal dialogs - DWS_ICONTAB = 0x00000001, // Icon for tabs are available - DWS_ICONBAR = 0x00000002, // Icon for icon bar are available (currently not supported) - DWS_ADDINFO = 0x00000004, // Additional information are in use - DWS_PARAMSALL = (DWS_ICONTAB | DWS_ICONBAR | DWS_ADDINFO), - - // default docking values for first call of plugin - DWS_DF_CONT_LEFT = (CONT_LEFT << 28), // default docking on left - DWS_DF_CONT_RIGHT = (CONT_RIGHT << 28), // default docking on right - DWS_DF_CONT_TOP = (CONT_TOP << 28), // default docking on top - DWS_DF_CONT_BOTTOM = (CONT_BOTTOM << 28), // default docking on bottom - DWS_DF_FLOATING = 0x80000000 // default state is floating - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct NppTbData - { - public IntPtr hClient; // HWND: client Window Handle - public string pszName; // TCHAR*: name of plugin (shown in window) - public int dlgID; // int: a funcItem provides the function pointer to start a dialog. Please parse here these ID - // user modifications - public NppTbMsg uMask; // UINT: mask params: look to above defines - public uint hIconTab; // HICON: icon for tabs - public string pszAddInfo; // TCHAR*: for plugin to display additional informations - // internal data, do not use !!! - public RECT rcFloat; // RECT: floating position - public int iPrevCont; // int: stores the privious container (toggling between float and dock) - public string pszModuleName; // const TCHAR*: it's the plugin file name. It's used to identify the plugin - } - - [StructLayout(LayoutKind.Sequential)] - public struct RECT - { - public RECT(int left, int top, int right, int bottom) - { - Left = left; Top = top; Right = right; Bottom = bottom; - } - public int Left; - public int Top; - public int Right; - public int Bottom; - } - -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +// +// This file should stay in sync with the CPP project file +// "notepad-plus-plus/PowerEditor/src/WinControls/DockingWnd/Docking.h" +// found at +// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/WinControls/DockingWnd/Docking.h + +using System; +using System.Runtime.InteropServices; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + + [Flags] + public enum NppTbMsg : uint + { + // styles for containers + //CAPTION_TOP = 1, + //CAPTION_BOTTOM = 0, + + // defines for docking manager + CONT_LEFT = 0, + CONT_RIGHT = 1, + CONT_TOP = 2, + CONT_BOTTOM = 3, + DOCKCONT_MAX = 4, + + // mask params for plugins of internal dialogs + DWS_ICONTAB = 0x00000001, // Icon for tabs are available + DWS_ICONBAR = 0x00000002, // Icon for icon bar are available (currently not supported) + DWS_ADDINFO = 0x00000004, // Additional information are in use + DWS_PARAMSALL = (DWS_ICONTAB | DWS_ICONBAR | DWS_ADDINFO), + + // default docking values for first call of plugin + DWS_DF_CONT_LEFT = (CONT_LEFT << 28), // default docking on left + DWS_DF_CONT_RIGHT = (CONT_RIGHT << 28), // default docking on right + DWS_DF_CONT_TOP = (CONT_TOP << 28), // default docking on top + DWS_DF_CONT_BOTTOM = (CONT_BOTTOM << 28), // default docking on bottom + DWS_DF_FLOATING = 0x80000000 // default state is floating + } + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + public struct NppTbData + { + public IntPtr hClient; // HWND: client Window Handle + public string pszName; // TCHAR*: name of plugin (shown in window) + public int dlgID; // int: a funcItem provides the function pointer to start a dialog. Please parse here these ID + // user modifications + public NppTbMsg uMask; // UINT: mask params: look to above defines + public uint hIconTab; // HICON: icon for tabs + public string pszAddInfo; // TCHAR*: for plugin to display additional informations + // internal data, do not use !!! + public RECT rcFloat; // RECT: floating position + public int iPrevCont; // int: stores the privious container (toggling between float and dock) + public string pszModuleName; // const TCHAR*: it's the plugin file name. It's used to identify the plugin + } + + [StructLayout(LayoutKind.Sequential)] + public struct RECT + { + public RECT(int left, int top, int right, int bottom) + { + Left = left; Top = top; Right = right; Bottom = bottom; + } + public int Left; + public int Top; + public int Right; + public int Bottom; + } + +} diff --git a/WakaTime/PluginInfrastructure/GatewayDomain.cs b/WakaTime/PluginInfrastructure/GatewayDomain.cs index af8fd5b..905176b 100644 --- a/WakaTime/PluginInfrastructure/GatewayDomain.cs +++ b/WakaTime/PluginInfrastructure/GatewayDomain.cs @@ -1,991 +1,991 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - /// - /// Colours are set using the RGB format (Red, Green, Blue). The intensity of each colour is set in the range 0 to 255. - /// If you have three such intensities, they are combined as: red | (green << 8) | (blue << 16). - /// If you set all intensities to 255, the colour is white. If you set all intensities to 0, the colour is black. - /// When you set a colour, you are making a request. What you will get depends on the capabilities of the system and the current screen mode. - /// - public class Colour - { - public readonly int Red, Green, Blue; - - public Colour(int rgb) - { - Red = rgb & 0xFF; - Green = (rgb >> 8) & 0xFF; - Blue = (rgb >> 16) & 0xFF; - } - - /// - /// - /// - /// a number 0-255 - /// a number 0-255 - /// a number 0-255 - public Colour(int red, int green, int blue) - { - if(red > 255 || red < 0) - throw new ArgumentOutOfRangeException("red", "must be 0-255"); - if(green > 255 || green < 0) - throw new ArgumentOutOfRangeException("green", "must be 0-255"); - if(blue > 255 || blue < 0) - throw new ArgumentOutOfRangeException("blue", "must be 0-255"); - Red = red; - Green = green; - Blue = blue; - } - - public int Value - { - get { return Red + (Green << 8) + (Blue << 16); } - } - } - - /// - /// Positions within the Scintilla document refer to a character or the gap before that character. - /// The first character in a document is 0, the second 1 and so on. If a document contains nLen characters, the last character is numbered nLen-1. The caret exists between character positions and can be located from before the first character (0) to after the last character (nLen). - /// - /// There are places where the caret can not go where two character bytes make up one character. - /// This occurs when a DBCS character from a language like Japanese is included in the document or when line ends are marked with the CP/M - /// standard of a carriage return followed by a line feed.The INVALID_POSITION constant(-1) represents an invalid position within the document. - /// - /// All lines of text in Scintilla are the same height, and this height is calculated from the largest font in any current style.This restriction - /// is for performance; if lines differed in height then calculations involving positioning of text would require the text to be styled first. - /// - /// If you use messages, there is nothing to stop you setting a position that is in the middle of a CRLF pair, or in the middle of a 2 byte character. - /// However, keyboard commands will not move the caret into such positions. - /// - public class Position : IEquatable - { - private readonly int pos; - - public Position(int pos) - { - this.pos = pos; - } - - public int Value - { - get { return pos; } - } - - public static Position operator +(Position a, Position b) - { - return new Position(a.pos + b.pos); - } - - public static Position operator -(Position a, Position b) - { - return new Position(a.pos - b.pos); - } - - public static bool operator ==(Position a, Position b) - { - if (ReferenceEquals(a, b)) - return true; - if (ReferenceEquals(a, null)) - return false; - if (ReferenceEquals(b, null)) - return false; - return a.pos == b.pos; - } - - public static bool operator !=(Position a, Position b) - { - return !(a == b); - } - - public static bool operator >(Position a, Position b) - { - return a.Value > b.Value; - } - - public static bool operator <(Position a, Position b) - { - return a.Value < b.Value; - } - - public static Position Min(Position a, Position b) - { - if (a < b) - return a; - return b; - } - - public static Position Max(Position a, Position b) - { - if (a > b) - return a; - return b; - } - - public override string ToString() - { - return "Postion: " + pos; - } - - public bool Equals(Position other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - return pos == other.pos; - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != this.GetType()) return false; - return Equals((Position)obj); - } - - public override int GetHashCode() - { - return pos; - } - } - - /// - /// Class containing key and modifiers - /// - /// The key code is a visible or control character or a key from the SCK_* enumeration, which contains: - /// SCK_ADD, SCK_BACK, SCK_DELETE, SCK_DIVIDE, SCK_DOWN, SCK_END, SCK_ESCAPE, SCK_HOME, SCK_INSERT, SCK_LEFT, SCK_MENU, SCK_NEXT(Page Down), SCK_PRIOR(Page Up), S - /// CK_RETURN, SCK_RIGHT, SCK_RWIN, SCK_SUBTRACT, SCK_TAB, SCK_UP, and SCK_WIN. - /// - /// The modifiers are a combination of zero or more of SCMOD_ALT, SCMOD_CTRL, SCMOD_SHIFT, SCMOD_META, and SCMOD_SUPER. - /// On OS X, the Command key is mapped to SCMOD_CTRL and the Control key to SCMOD_META.SCMOD_SUPER is only available on GTK+ which is commonly the Windows key. - /// If you are building a table, you might want to use SCMOD_NORM, which has the value 0, to mean no modifiers. - /// - public class KeyModifier - { - private readonly int value; - - /// - /// The key code is a visible or control character or a key from the SCK_* enumeration, which contains: - /// SCK_ADD, SCK_BACK, SCK_DELETE, SCK_DIVIDE, SCK_DOWN, SCK_END, SCK_ESCAPE, SCK_HOME, SCK_INSERT, SCK_LEFT, SCK_MENU, SCK_NEXT(Page Down), SCK_PRIOR(Page Up), - /// SCK_RETURN, SCK_RIGHT, SCK_RWIN, SCK_SUBTRACT, SCK_TAB, SCK_UP, and SCK_WIN. - /// - /// The modifiers are a combination of zero or more of SCMOD_ALT, SCMOD_CTRL, SCMOD_SHIFT, SCMOD_META, and SCMOD_SUPER. - /// On OS X, the Command key is mapped to SCMOD_CTRL and the Control key to SCMOD_META.SCMOD_SUPER is only available on GTK+ which is commonly the Windows key. - /// If you are building a table, you might want to use SCMOD_NORM, which has the value 0, to mean no modifiers. - /// - public KeyModifier(SciMsg SCK_KeyCode, SciMsg SCMOD_modifier) - { - value = (int) SCK_KeyCode | ((int) SCMOD_modifier << 16); - } - - public int Value - { - get { return Value; } - } - } - - [StructLayout(LayoutKind.Sequential)] - public struct CharacterRange - { - public CharacterRange(int cpmin, int cpmax) { cpMin = cpmin; cpMax = cpmax; } - public int cpMin; - public int cpMax; - } - - public class Cells - { - char[] charactersAndStyles; - - public Cells(char[] charactersAndStyles) - { - this.charactersAndStyles = charactersAndStyles; - } - public char[] Value { get { return charactersAndStyles; } } - } - - public class TextRange : IDisposable - { - Sci_TextRange _sciTextRange; - IntPtr _ptrSciTextRange; - bool _disposed = false; - - public TextRange(CharacterRange chrRange, int stringCapacity) - { - _sciTextRange.chrg = chrRange; - _sciTextRange.lpstrText = Marshal.AllocHGlobal(stringCapacity); - } - public TextRange(int cpmin, int cpmax, int stringCapacity) - { - _sciTextRange.chrg.cpMin = cpmin; - _sciTextRange.chrg.cpMax = cpmax; - _sciTextRange.lpstrText = Marshal.AllocHGlobal(stringCapacity); - } - - [StructLayout(LayoutKind.Sequential)] - struct Sci_TextRange - { - public CharacterRange chrg; - public IntPtr lpstrText; - } - public IntPtr NativePointer { get { _initNativeStruct(); return _ptrSciTextRange; } } - public string lpstrText { get { _readNativeStruct(); return Marshal.PtrToStringAnsi(_sciTextRange.lpstrText); } } - public CharacterRange chrg { get { _readNativeStruct(); return _sciTextRange.chrg; } set { _sciTextRange.chrg = value; _initNativeStruct(); } } - - void _initNativeStruct() - { - if (_ptrSciTextRange == IntPtr.Zero) - _ptrSciTextRange = Marshal.AllocHGlobal(Marshal.SizeOf(_sciTextRange)); - Marshal.StructureToPtr(_sciTextRange, _ptrSciTextRange, false); - } - - void _readNativeStruct() - { - if (_ptrSciTextRange != IntPtr.Zero) - _sciTextRange = (Sci_TextRange)Marshal.PtrToStructure(_ptrSciTextRange, typeof(Sci_TextRange)); - } - - public void Dispose() - { - if (!_disposed) - { - if (_sciTextRange.lpstrText != IntPtr.Zero) Marshal.FreeHGlobal(_sciTextRange.lpstrText); - if (_ptrSciTextRange != IntPtr.Zero) Marshal.FreeHGlobal(_ptrSciTextRange); - _disposed = true; - } - } - - ~TextRange() - { - Dispose(); - } - } - - - /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ - /// Is undo history being collected? (Scintilla feature SCWS_) - public enum WhiteSpace - { - INVISIBLE = 0, - VISIBLEALWAYS = 1, - VISIBLEAFTERINDENT = 2, - VISIBLEONLYININDENT = 3 - } - /// Make white space characters invisible, always visible or visible outside indentation. (Scintilla feature SCTD_) - public enum TabDrawMode - { - LONGARROW = 0, - STRIKEOUT = 1 - } - /// Retrieve the position of the last correctly styled character. (Scintilla feature SC_EOL_) - public enum EndOfLine - { - CRLF = 0, - CR = 1, - LF = 2 - } - /// - /// Set the code page used to interpret the bytes of the document as characters. - /// The SC_CP_UTF8 value can be used to enter Unicode mode. - /// (Scintilla feature SC_IME_) - /// - public enum IMEInteraction - { - WINDOWED = 0, - INLINE = 1 - } - /// Choose to display the the IME in a winow or inline. (Scintilla feature SC_MARK_) - public enum MarkerSymbol - { - CIRCLE = 0, - ROUNDRECT = 1, - ARROW = 2, - SMALLRECT = 3, - SHORTARROW = 4, - EMPTY = 5, - ARROWDOWN = 6, - MINUS = 7, - PLUS = 8, - VLINE = 9, - LCORNER = 10, - TCORNER = 11, - BOXPLUS = 12, - BOXPLUSCONNECTED = 13, - BOXMINUS = 14, - BOXMINUSCONNECTED = 15, - LCORNERCURVE = 16, - TCORNERCURVE = 17, - CIRCLEPLUS = 18, - CIRCLEPLUSCONNECTED = 19, - CIRCLEMINUS = 20, - CIRCLEMINUSCONNECTED = 21, - BACKGROUND = 22, - DOTDOTDOT = 23, - ARROWS = 24, - PIXMAP = 25, - FULLRECT = 26, - LEFTRECT = 27, - AVAILABLE = 28, - UNDERLINE = 29, - RGBAIMAGE = 30, - BOOKMARK = 31, - VERTICALBOOKMARK = 32, - CHARACTER = 10000 - } - /// Invisible mark that only sets the line background colour. (Scintilla feature SC_MARKNUM_) - public enum MarkerOutline - { - FOLDEREND = 25, - FOLDEROPENMID = 26, - FOLDERMIDTAIL = 27, - FOLDERTAIL = 28, - FOLDERSUB = 29, - FOLDER = 30, - FOLDEROPEN = 31 - } - /// Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature SC_MARGIN_) - public enum MarginType - { - SYMBOL = 0, - NUMBER = 1, - BACK = 2, - FORE = 3, - TEXT = 4, - RTEXT = 5, - COLOUR = 6 - } - /// Styles in range 32..39 are predefined for parts of the UI and are not used as normal styles. (Scintilla feature STYLE_) - public enum StylesCommon - { - DEFAULT = 32, - LINENUMBER = 33, - BRACELIGHT = 34, - BRACEBAD = 35, - CONTROLCHAR = 36, - INDENTGUIDE = 37, - CALLTIP = 38, - FOLDDISPLAYTEXT = 39, - LASTPREDEFINED = 39, - MAX = 255 - } - /// - /// Character set identifiers are used in StyleSetCharacterSet. - /// The values are the same as the Windows *_CHARSET values. - /// (Scintilla feature SC_CHARSET_) - /// - public enum CharacterSet - { - ANSI = 0, - DEFAULT = 1, - BALTIC = 186, - CHINESEBIG5 = 136, - EASTEUROPE = 238, - GB2312 = 134, - GREEK = 161, - HANGUL = 129, - MAC = 77, - OEM = 255, - RUSSIAN = 204, - OEM866 = 866, - CYRILLIC = 1251, - SHIFTJIS = 128, - SYMBOL = 2, - TURKISH = 162, - JOHAB = 130, - HEBREW = 177, - ARABIC = 178, - VIETNAMESE = 163, - THAI = 222, - _8859_15 = 1000 - } - /// Set a style to be underlined or not. (Scintilla feature SC_CASE_) - public enum CaseVisible - { - MIXED = 0, - UPPER = 1, - LOWER = 2, - CAMEL = 3 - } - /// Get the size of characters of a style in points multiplied by 100 (Scintilla feature SC_WEIGHT_) - public enum FontWeight - { - NORMAL = 400, - SEMIBOLD = 600, - BOLD = 700 - } - /// Indicator style enumeration and some constants (Scintilla feature INDIC_) - public enum IndicatorStyle - { - PLAIN = 0, - SQUIGGLE = 1, - TT = 2, - DIAGONAL = 3, - STRIKE = 4, - HIDDEN = 5, - BOX = 6, - ROUNDBOX = 7, - STRAIGHTBOX = 8, - DASH = 9, - DOTS = 10, - SQUIGGLELOW = 11, - DOTBOX = 12, - SQUIGGLEPIXMAP = 13, - COMPOSITIONTHICK = 14, - COMPOSITIONTHIN = 15, - FULLBOX = 16, - TEXTFORE = 17, - POINT = 18, - POINTCHARACTER = 19, - GRADIENT = 20, - GRADIENTCENTRE = 21, - CONTAINER = 8, - IME = 32, - IME_MAX = 35, - MAX = 35 - } - /// - /// INDIC_CONTAINER, INDIC_IME, INDIC_IME_MAX, and INDIC_MAX are indicator numbers, - /// not IndicatorStyles so should not really be in the INDIC_ enumeration. - /// They are redeclared in IndicatorNumbers INDICATOR_. - /// (Scintilla feature INDICATOR_) - /// - public enum IndicatorNumbers - { - CONTAINER = 8, - IME = 32, - IME_MAX = 35, - MAX = 35 - } - /// Retrieve the foreground hover colour of an indicator. (Scintilla feature SC_INDICVALUE) - public enum IndicValue - { - BIT = 0x1000000, - MASK = 0xFFFFFF - } - /// Retrieve the foreground hover colour of an indicator. (Scintilla feature SC_INDICFLAG_) - public enum IndicFlag - { - VALUEFORE = 1 - } - /// Is the horizontal scroll bar visible? (Scintilla feature SC_IV_) - public enum IndentView - { - NONE = 0, - REAL = 1, - LOOKFORWARD = 2, - LOOKBOTH = 3 - } - /// Returns the print magnification. (Scintilla feature SC_PRINT_) - public enum PrintOption - { - NORMAL = 0, - INVERTLIGHT = 1, - BLACKONWHITE = 2, - COLOURONWHITE = 3, - COLOURONWHITEDEFAULTBG = 4, - SCREENCOLOURS = 5 - } - /// Returns the print colour mode. (Scintilla feature SCFIND_) - public enum FindOption - { - NONE = 0x0, - WHOLEWORD = 0x2, - MATCHCASE = 0x4, - WORDSTART = 0x00100000, - REGEXP = 0x00200000, - POSIX = 0x00400000, - CXX11REGEX = 0x00800000 - } - /// The number of display lines needed to wrap a document line (Scintilla feature SC_FOLDLEVEL) - public enum FoldLevel - { - BASE = 0x400, - WHITEFLAG = 0x1000, - HEADERFLAG = 0x2000, - NUMBERMASK = 0x0FFF - } - /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature SC_FOLDDISPLAYTEXT_) - public enum FoldDisplayTextStyle - { - HIDDEN = 0, - STANDARD = 1, - BOXED = 2 - } - /// Get the default fold display text. (Scintilla feature SC_FOLDACTION_) - public enum FoldAction - { - CONTRACT = 0, - EXPAND = 1, - TOGGLE = 2 - } - /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature SC_AUTOMATICFOLD_) - public enum AutomaticFold - { - SHOW = 0x0001, - CLICK = 0x0002, - CHANGE = 0x0004 - } - /// Get automatic folding behaviours. (Scintilla feature SC_FOLDFLAG_) - public enum FoldFlag - { - LINEBEFORE_EXPANDED = 0x0002, - LINEBEFORE_CONTRACTED = 0x0004, - LINEAFTER_EXPANDED = 0x0008, - LINEAFTER_CONTRACTED = 0x0010, - LEVELNUMBERS = 0x0040, - LINESTATE = 0x0080 - } - /// Is the range start..end considered a word? (Scintilla feature SC_IDLESTYLING_) - public enum IdleStyling - { - NONE = 0, - TOVISIBLE = 1, - AFTERVISIBLE = 2, - ALL = 3 - } - /// Retrieve the limits to idle styling. (Scintilla feature SC_WRAP_) - public enum Wrap - { - NONE = 0, - WORD = 1, - CHAR = 2, - WHITESPACE = 3 - } - /// Retrieve whether text is word wrapped. (Scintilla feature SC_WRAPVISUALFLAG_) - public enum WrapVisualFlag - { - NONE = 0x0000, - END = 0x0001, - START = 0x0002, - MARGIN = 0x0004 - } - /// Retrive the display mode of visual flags for wrapped lines. (Scintilla feature SC_WRAPVISUALFLAGLOC_) - public enum WrapVisualLocation - { - DEFAULT = 0x0000, - END_BY_TEXT = 0x0001, - START_BY_TEXT = 0x0002 - } - /// Retrive the start indent for wrapped lines. (Scintilla feature SC_WRAPINDENT_) - public enum WrapIndentMode - { - FIXED = 0, - SAME = 1, - INDENT = 2, - DEEPINDENT = 3 - } - /// Retrieve how wrapped sublines are placed. Default is fixed. (Scintilla feature SC_CACHE_) - public enum LineCache - { - NONE = 0, - CARET = 1, - PAGE = 2, - DOCUMENT = 3 - } - /// Append a string to the end of the document without changing the selection. (Scintilla feature SC_PHASES_) - public enum PhasesDraw - { - ONE = 0, - TWO = 1, - MULTIPLE = 2 - } - /// Control font anti-aliasing. (Scintilla feature SC_EFF_) - public enum FontQuality - { - QUALITY_MASK = 0xF, - QUALITY_DEFAULT = 0, - QUALITY_NON_ANTIALIASED = 1, - QUALITY_ANTIALIASED = 2, - QUALITY_LCD_OPTIMIZED = 3 - } - /// Scroll so that a display line is at the top of the display. (Scintilla feature SC_MULTIPASTE_) - public enum MultiPaste - { - ONCE = 0, - EACH = 1 - } - /// Set the other colour used as a chequerboard pattern in the fold margin (Scintilla feature SC_ACCESSIBILITY_) - public enum Accessibility - { - DISABLED = 0, - ENABLED = 1 - } - /// Set which document modification events are sent to the container. (Scintilla feature EDGE_) - public enum EdgeVisualStyle - { - NONE = 0, - LINE = 1, - BACKGROUND = 2, - MULTILINE = 3 - } - /// Retrieves the number of lines completely visible. (Scintilla feature SC_POPUP_) - public enum PopUp - { - NEVER = 0, - ALL = 1, - TEXT = 2 - } - /// Retrieve the zoom level. (Scintilla feature SC_DOCUMENTOPTION_) - public enum DocumentOption - { - DEFAULT = 0, - STYLES_NONE = 0x1, - TEXT_LARGE = 0x100 - } - /// Get internal focus flag. (Scintilla feature SC_STATUS_) - public enum Status - { - OK = 0, - FAILURE = 1, - BADALLOC = 2, - WARN_START = 1000, - WARN_REGEX = 1001 - } - /// Get whether mouse wheel can be active outside the window. (Scintilla feature SC_CURSOR) - public enum CursorShape - { - NORMAL = -1, - ARROW = 2, - WAIT = 4, - REVERSEARROW = 7 - } - /// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. (Scintilla feature VISIBLE_) - public enum VisiblePolicy - { - SLOP = 0x01, - STRICT = 0x04 - } - /// Set the focus to this Scintilla widget. (Scintilla feature CARET_) - public enum CaretPolicy - { - SLOP = 0x01, - STRICT = 0x04, - JUMPS = 0x10, - EVEN = 0x08 - } - /// Copy argument text to the clipboard. (Scintilla feature SC_SEL_) - public enum SelectionMode - { - STREAM = 0, - RECTANGLE = 1, - LINES = 2, - THIN = 3 - } - /// - /// Get currently selected item text in the auto-completion list - /// Returns the length of the item text - /// Result is NUL-terminated. - /// (Scintilla feature SC_CASEINSENSITIVEBEHAVIOUR_) - /// - public enum CaseInsensitiveBehaviour - { - RESPECTCASE = 0, - IGNORECASE = 1 - } - /// Get auto-completion case insensitive behaviour. (Scintilla feature SC_MULTIAUTOC_) - public enum MultiAutoComplete - { - ONCE = 0, - EACH = 1 - } - /// Retrieve the effect of autocompleting when there are multiple selections. (Scintilla feature SC_ORDER_) - public enum Ordering - { - PRESORTED = 0, - PERFORMSORT = 1, - CUSTOM = 2 - } - /// Stop the caret preferred x position changing when the user types. (Scintilla feature SC_CARETSTICKY_) - public enum CaretSticky - { - OFF = 0, - ON = 1, - WHITESPACE = 2 - } - /// Duplicate the selection. If selection empty duplicate the line containing the caret. (Scintilla feature SC_ALPHA_) - public enum Alpha - { - TRANSPARENT = 0, - OPAQUE = 255, - NOALPHA = 256 - } - /// Get the background alpha of the caret line. (Scintilla feature CARETSTYLE_) - public enum CaretStyle - { - INVISIBLE = 0, - LINE = 1, - BLOCK = 2, - OVERSTRIKE_BAR = 0, - OVERSTRIKE_BLOCK = 0x10, - INS_MASK = 0xF, - BLOCK_AFTER = 0x100 - } - /// Get the start of the range of style numbers used for margin text (Scintilla feature SC_MARGINOPTION_) - public enum MarginOption - { - NONE = 0, - SUBLINESELECT = 1 - } - /// Clear the annotations from all lines (Scintilla feature ANNOTATION_) - public enum AnnotationVisible - { - HIDDEN = 0, - STANDARD = 1, - BOXED = 2, - INDENTED = 3 - } - /// Allocate some extended (>255) style numbers and return the start of the range (Scintilla feature UNDO_) - public enum UndoFlags - { - NONE = 0, - MAY_COALESCE = 1 - } - /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature SCVS_) - public enum VirtualSpace - { - NONE = 0, - RECTANGULARSELECTION = 1, - USERACCESSIBLE = 2, - NOWRAPLINESTART = 4 - } - /// Scroll to end of document. (Scintilla feature SC_TECHNOLOGY_) - public enum Technology - { - DEFAULT = 0, - DIRECTWRITE = 1, - DIRECTWRITERETAIN = 2, - DIRECTWRITEDC = 3 - } - /// - /// Line end types which may be used in addition to LF, CR, and CRLF - /// SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator, - /// U+2029 Paragraph Separator, and U+0085 Next Line - /// (Scintilla feature SC_LINE_END_TYPE_) - /// - public enum LineEndType - { - DEFAULT = 0, - UNICODE = 1 - } - /// - /// Retrieve a '\n' separated list of properties understood by the current lexer. - /// Result is NUL-terminated. - /// (Scintilla feature SC_TYPE_) - /// - public enum TypeProperty - { - BOOLEAN = 0, - INTEGER = 1, - STRING = 2 - } - /// - /// Notifications - /// Type of modification and the action which caused the modification. - /// These are defined as a bit mask to make it easy to specify which notifications are wanted. - /// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. - /// (Scintilla feature SC_MOD_ SC_PERFORMED_ SC_MULTISTEPUNDOREDO SC_LASTSTEPINUNDOREDO SC_MULTILINEUNDOREDO SC_STARTACTION SC_MODEVENTMASKALL) - /// - public enum ModificationFlags - { - } - /// - /// Notifications - /// Type of modification and the action which caused the modification. - /// These are defined as a bit mask to make it easy to specify which notifications are wanted. - /// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. - /// (Scintilla feature SC_UPDATE_) - /// - public enum Update - { - CONTENT = 0x1, - SELECTION = 0x2, - V_SCROLL = 0x4, - H_SCROLL = 0x8 - } - /// - /// Symbolic key codes and modifier flags. - /// ASCII and other printable characters below 256. - /// Extended keys above 300. - /// (Scintilla feature SCMOD_) - /// - public enum KeyMod - { - NORM = 0, - SHIFT = 1, - CTRL = 2, - ALT = 4, - SUPER = 8, - META = 16 - } - /// - /// Symbolic key codes and modifier flags. - /// ASCII and other printable characters below 256. - /// Extended keys above 300. - /// (Scintilla feature SC_AC_) - /// - public enum CompletionMethods - { - FILLUP = 1, - DOUBLECLICK = 2, - TAB = 3, - NEWLINE = 4, - COMMAND = 5 - } - /// characterSource for SCN_CHARADDED (Scintilla feature SC_CHARACTERSOURCE_) - public enum CharacterSource - { - DIRECT_INPUT = 0, - TENTATIVE_INPUT = 1, - IME_RESULT = 2 - } - /// For SciLexer.h (Scintilla feature SCLEX_) - public enum Lexer - { - CONTAINER = 0, - NULL = 1, - PYTHON = 2, - CPP = 3, - HTML = 4, - XML = 5, - PERL = 6, - SQL = 7, - VB = 8, - PROPERTIES = 9, - ERRORLIST = 10, - MAKEFILE = 11, - BATCH = 12, - XCODE = 13, - LATEX = 14, - LUA = 15, - DIFF = 16, - CONF = 17, - PASCAL = 18, - AVE = 19, - ADA = 20, - LISP = 21, - RUBY = 22, - EIFFEL = 23, - EIFFELKW = 24, - TCL = 25, - NNCRONTAB = 26, - BULLANT = 27, - VBSCRIPT = 28, - BAAN = 31, - MATLAB = 32, - SCRIPTOL = 33, - ASM = 34, - CPPNOCASE = 35, - FORTRAN = 36, - F77 = 37, - CSS = 38, - POV = 39, - LOUT = 40, - ESCRIPT = 41, - PS = 42, - NSIS = 43, - MMIXAL = 44, - CLW = 45, - CLWNOCASE = 46, - LOT = 47, - YAML = 48, - TEX = 49, - METAPOST = 50, - POWERBASIC = 51, - FORTH = 52, - ERLANG = 53, - OCTAVE = 54, - MSSQL = 55, - VERILOG = 56, - KIX = 57, - GUI4CLI = 58, - SPECMAN = 59, - AU3 = 60, - APDL = 61, - BASH = 62, - ASN1 = 63, - VHDL = 64, - CAML = 65, - BLITZBASIC = 66, - PUREBASIC = 67, - HASKELL = 68, - PHPSCRIPT = 69, - TADS3 = 70, - REBOL = 71, - SMALLTALK = 72, - FLAGSHIP = 73, - CSOUND = 74, - FREEBASIC = 75, - INNOSETUP = 76, - OPAL = 77, - SPICE = 78, - D = 79, - CMAKE = 80, - GAP = 81, - PLM = 82, - PROGRESS = 83, - ABAQUS = 84, - ASYMPTOTE = 85, - R = 86, - MAGIK = 87, - POWERSHELL = 88, - MYSQL = 89, - PO = 90, - TAL = 91, - COBOL = 92, - TACL = 93, - SORCUS = 94, - POWERPRO = 95, - NIMROD = 96, - SML = 97, - MARKDOWN = 98, - TXT2TAGS = 99, - A68K = 100, - MODULA = 101, - COFFEESCRIPT = 102, - TCMD = 103, - AVS = 104, - ECL = 105, - OSCRIPT = 106, - VISUALPROLOG = 107, - LITERATEHASKELL = 108, - STTXT = 109, - KVIRC = 110, - RUST = 111, - DMAP = 112, - AS = 113, - DMIS = 114, - REGISTRY = 115, - BIBTEX = 116, - SREC = 117, - IHEX = 118, - TEHEX = 119, - JSON = 120, - EDIFACT = 121, - INDENT = 122, - MAXIMA = 123, - STATA = 124, - SAS = 125, - NIM = 126, - CIL = 127, - X12 = 128, - DATAFLEX = 129, - AUTOMATIC = 1000 - } - /// GTK Specific to work around focus and accelerator problems: (Scintilla feature SC_BIDIRECTIONAL_) - public enum Bidirectional - { - DISABLED = 0, - L2R = 1, - R2L = 2 - } - /// Set bidirectional text display state. (Scintilla feature SC_LINECHARACTERINDEX_) - public enum LineCharacterIndexType - { - NONE = 0, - UTF32 = 1, - UTF16 = 2 - } - /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ - -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + /// + /// Colours are set using the RGB format (Red, Green, Blue). The intensity of each colour is set in the range 0 to 255. + /// If you have three such intensities, they are combined as: red | (green << 8) | (blue << 16). + /// If you set all intensities to 255, the colour is white. If you set all intensities to 0, the colour is black. + /// When you set a colour, you are making a request. What you will get depends on the capabilities of the system and the current screen mode. + /// + public class Colour + { + public readonly int Red, Green, Blue; + + public Colour(int rgb) + { + Red = rgb & 0xFF; + Green = (rgb >> 8) & 0xFF; + Blue = (rgb >> 16) & 0xFF; + } + + /// + /// + /// + /// a number 0-255 + /// a number 0-255 + /// a number 0-255 + public Colour(int red, int green, int blue) + { + if(red > 255 || red < 0) + throw new ArgumentOutOfRangeException("red", "must be 0-255"); + if(green > 255 || green < 0) + throw new ArgumentOutOfRangeException("green", "must be 0-255"); + if(blue > 255 || blue < 0) + throw new ArgumentOutOfRangeException("blue", "must be 0-255"); + Red = red; + Green = green; + Blue = blue; + } + + public int Value + { + get { return Red + (Green << 8) + (Blue << 16); } + } + } + + /// + /// Positions within the Scintilla document refer to a character or the gap before that character. + /// The first character in a document is 0, the second 1 and so on. If a document contains nLen characters, the last character is numbered nLen-1. The caret exists between character positions and can be located from before the first character (0) to after the last character (nLen). + /// + /// There are places where the caret can not go where two character bytes make up one character. + /// This occurs when a DBCS character from a language like Japanese is included in the document or when line ends are marked with the CP/M + /// standard of a carriage return followed by a line feed.The INVALID_POSITION constant(-1) represents an invalid position within the document. + /// + /// All lines of text in Scintilla are the same height, and this height is calculated from the largest font in any current style.This restriction + /// is for performance; if lines differed in height then calculations involving positioning of text would require the text to be styled first. + /// + /// If you use messages, there is nothing to stop you setting a position that is in the middle of a CRLF pair, or in the middle of a 2 byte character. + /// However, keyboard commands will not move the caret into such positions. + /// + public class Position : IEquatable + { + private readonly int pos; + + public Position(int pos) + { + this.pos = pos; + } + + public int Value + { + get { return pos; } + } + + public static Position operator +(Position a, Position b) + { + return new Position(a.pos + b.pos); + } + + public static Position operator -(Position a, Position b) + { + return new Position(a.pos - b.pos); + } + + public static bool operator ==(Position a, Position b) + { + if (ReferenceEquals(a, b)) + return true; + if (ReferenceEquals(a, null)) + return false; + if (ReferenceEquals(b, null)) + return false; + return a.pos == b.pos; + } + + public static bool operator !=(Position a, Position b) + { + return !(a == b); + } + + public static bool operator >(Position a, Position b) + { + return a.Value > b.Value; + } + + public static bool operator <(Position a, Position b) + { + return a.Value < b.Value; + } + + public static Position Min(Position a, Position b) + { + if (a < b) + return a; + return b; + } + + public static Position Max(Position a, Position b) + { + if (a > b) + return a; + return b; + } + + public override string ToString() + { + return "Postion: " + pos; + } + + public bool Equals(Position other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return pos == other.pos; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != this.GetType()) return false; + return Equals((Position)obj); + } + + public override int GetHashCode() + { + return pos; + } + } + + /// + /// Class containing key and modifiers + /// + /// The key code is a visible or control character or a key from the SCK_* enumeration, which contains: + /// SCK_ADD, SCK_BACK, SCK_DELETE, SCK_DIVIDE, SCK_DOWN, SCK_END, SCK_ESCAPE, SCK_HOME, SCK_INSERT, SCK_LEFT, SCK_MENU, SCK_NEXT(Page Down), SCK_PRIOR(Page Up), S + /// CK_RETURN, SCK_RIGHT, SCK_RWIN, SCK_SUBTRACT, SCK_TAB, SCK_UP, and SCK_WIN. + /// + /// The modifiers are a combination of zero or more of SCMOD_ALT, SCMOD_CTRL, SCMOD_SHIFT, SCMOD_META, and SCMOD_SUPER. + /// On OS X, the Command key is mapped to SCMOD_CTRL and the Control key to SCMOD_META.SCMOD_SUPER is only available on GTK+ which is commonly the Windows key. + /// If you are building a table, you might want to use SCMOD_NORM, which has the value 0, to mean no modifiers. + /// + public class KeyModifier + { + private readonly int value; + + /// + /// The key code is a visible or control character or a key from the SCK_* enumeration, which contains: + /// SCK_ADD, SCK_BACK, SCK_DELETE, SCK_DIVIDE, SCK_DOWN, SCK_END, SCK_ESCAPE, SCK_HOME, SCK_INSERT, SCK_LEFT, SCK_MENU, SCK_NEXT(Page Down), SCK_PRIOR(Page Up), + /// SCK_RETURN, SCK_RIGHT, SCK_RWIN, SCK_SUBTRACT, SCK_TAB, SCK_UP, and SCK_WIN. + /// + /// The modifiers are a combination of zero or more of SCMOD_ALT, SCMOD_CTRL, SCMOD_SHIFT, SCMOD_META, and SCMOD_SUPER. + /// On OS X, the Command key is mapped to SCMOD_CTRL and the Control key to SCMOD_META.SCMOD_SUPER is only available on GTK+ which is commonly the Windows key. + /// If you are building a table, you might want to use SCMOD_NORM, which has the value 0, to mean no modifiers. + /// + public KeyModifier(SciMsg SCK_KeyCode, SciMsg SCMOD_modifier) + { + value = (int) SCK_KeyCode | ((int) SCMOD_modifier << 16); + } + + public int Value + { + get { return Value; } + } + } + + [StructLayout(LayoutKind.Sequential)] + public struct CharacterRange + { + public CharacterRange(int cpmin, int cpmax) { cpMin = cpmin; cpMax = cpmax; } + public int cpMin; + public int cpMax; + } + + public class Cells + { + char[] charactersAndStyles; + + public Cells(char[] charactersAndStyles) + { + this.charactersAndStyles = charactersAndStyles; + } + public char[] Value { get { return charactersAndStyles; } } + } + + public class TextRange : IDisposable + { + Sci_TextRange _sciTextRange; + IntPtr _ptrSciTextRange; + bool _disposed = false; + + public TextRange(CharacterRange chrRange, int stringCapacity) + { + _sciTextRange.chrg = chrRange; + _sciTextRange.lpstrText = Marshal.AllocHGlobal(stringCapacity); + } + public TextRange(int cpmin, int cpmax, int stringCapacity) + { + _sciTextRange.chrg.cpMin = cpmin; + _sciTextRange.chrg.cpMax = cpmax; + _sciTextRange.lpstrText = Marshal.AllocHGlobal(stringCapacity); + } + + [StructLayout(LayoutKind.Sequential)] + struct Sci_TextRange + { + public CharacterRange chrg; + public IntPtr lpstrText; + } + public IntPtr NativePointer { get { _initNativeStruct(); return _ptrSciTextRange; } } + public string lpstrText { get { _readNativeStruct(); return Marshal.PtrToStringAnsi(_sciTextRange.lpstrText); } } + public CharacterRange chrg { get { _readNativeStruct(); return _sciTextRange.chrg; } set { _sciTextRange.chrg = value; _initNativeStruct(); } } + + void _initNativeStruct() + { + if (_ptrSciTextRange == IntPtr.Zero) + _ptrSciTextRange = Marshal.AllocHGlobal(Marshal.SizeOf(_sciTextRange)); + Marshal.StructureToPtr(_sciTextRange, _ptrSciTextRange, false); + } + + void _readNativeStruct() + { + if (_ptrSciTextRange != IntPtr.Zero) + _sciTextRange = (Sci_TextRange)Marshal.PtrToStructure(_ptrSciTextRange, typeof(Sci_TextRange)); + } + + public void Dispose() + { + if (!_disposed) + { + if (_sciTextRange.lpstrText != IntPtr.Zero) Marshal.FreeHGlobal(_sciTextRange.lpstrText); + if (_ptrSciTextRange != IntPtr.Zero) Marshal.FreeHGlobal(_ptrSciTextRange); + _disposed = true; + } + } + + ~TextRange() + { + Dispose(); + } + } + + + /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ + /// Is undo history being collected? (Scintilla feature SCWS_) + public enum WhiteSpace + { + INVISIBLE = 0, + VISIBLEALWAYS = 1, + VISIBLEAFTERINDENT = 2, + VISIBLEONLYININDENT = 3 + } + /// Make white space characters invisible, always visible or visible outside indentation. (Scintilla feature SCTD_) + public enum TabDrawMode + { + LONGARROW = 0, + STRIKEOUT = 1 + } + /// Retrieve the position of the last correctly styled character. (Scintilla feature SC_EOL_) + public enum EndOfLine + { + CRLF = 0, + CR = 1, + LF = 2 + } + /// + /// Set the code page used to interpret the bytes of the document as characters. + /// The SC_CP_UTF8 value can be used to enter Unicode mode. + /// (Scintilla feature SC_IME_) + /// + public enum IMEInteraction + { + WINDOWED = 0, + INLINE = 1 + } + /// Choose to display the the IME in a winow or inline. (Scintilla feature SC_MARK_) + public enum MarkerSymbol + { + CIRCLE = 0, + ROUNDRECT = 1, + ARROW = 2, + SMALLRECT = 3, + SHORTARROW = 4, + EMPTY = 5, + ARROWDOWN = 6, + MINUS = 7, + PLUS = 8, + VLINE = 9, + LCORNER = 10, + TCORNER = 11, + BOXPLUS = 12, + BOXPLUSCONNECTED = 13, + BOXMINUS = 14, + BOXMINUSCONNECTED = 15, + LCORNERCURVE = 16, + TCORNERCURVE = 17, + CIRCLEPLUS = 18, + CIRCLEPLUSCONNECTED = 19, + CIRCLEMINUS = 20, + CIRCLEMINUSCONNECTED = 21, + BACKGROUND = 22, + DOTDOTDOT = 23, + ARROWS = 24, + PIXMAP = 25, + FULLRECT = 26, + LEFTRECT = 27, + AVAILABLE = 28, + UNDERLINE = 29, + RGBAIMAGE = 30, + BOOKMARK = 31, + VERTICALBOOKMARK = 32, + CHARACTER = 10000 + } + /// Invisible mark that only sets the line background colour. (Scintilla feature SC_MARKNUM_) + public enum MarkerOutline + { + FOLDEREND = 25, + FOLDEROPENMID = 26, + FOLDERMIDTAIL = 27, + FOLDERTAIL = 28, + FOLDERSUB = 29, + FOLDER = 30, + FOLDEROPEN = 31 + } + /// Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature SC_MARGIN_) + public enum MarginType + { + SYMBOL = 0, + NUMBER = 1, + BACK = 2, + FORE = 3, + TEXT = 4, + RTEXT = 5, + COLOUR = 6 + } + /// Styles in range 32..39 are predefined for parts of the UI and are not used as normal styles. (Scintilla feature STYLE_) + public enum StylesCommon + { + DEFAULT = 32, + LINENUMBER = 33, + BRACELIGHT = 34, + BRACEBAD = 35, + CONTROLCHAR = 36, + INDENTGUIDE = 37, + CALLTIP = 38, + FOLDDISPLAYTEXT = 39, + LASTPREDEFINED = 39, + MAX = 255 + } + /// + /// Character set identifiers are used in StyleSetCharacterSet. + /// The values are the same as the Windows *_CHARSET values. + /// (Scintilla feature SC_CHARSET_) + /// + public enum CharacterSet + { + ANSI = 0, + DEFAULT = 1, + BALTIC = 186, + CHINESEBIG5 = 136, + EASTEUROPE = 238, + GB2312 = 134, + GREEK = 161, + HANGUL = 129, + MAC = 77, + OEM = 255, + RUSSIAN = 204, + OEM866 = 866, + CYRILLIC = 1251, + SHIFTJIS = 128, + SYMBOL = 2, + TURKISH = 162, + JOHAB = 130, + HEBREW = 177, + ARABIC = 178, + VIETNAMESE = 163, + THAI = 222, + _8859_15 = 1000 + } + /// Set a style to be underlined or not. (Scintilla feature SC_CASE_) + public enum CaseVisible + { + MIXED = 0, + UPPER = 1, + LOWER = 2, + CAMEL = 3 + } + /// Get the size of characters of a style in points multiplied by 100 (Scintilla feature SC_WEIGHT_) + public enum FontWeight + { + NORMAL = 400, + SEMIBOLD = 600, + BOLD = 700 + } + /// Indicator style enumeration and some constants (Scintilla feature INDIC_) + public enum IndicatorStyle + { + PLAIN = 0, + SQUIGGLE = 1, + TT = 2, + DIAGONAL = 3, + STRIKE = 4, + HIDDEN = 5, + BOX = 6, + ROUNDBOX = 7, + STRAIGHTBOX = 8, + DASH = 9, + DOTS = 10, + SQUIGGLELOW = 11, + DOTBOX = 12, + SQUIGGLEPIXMAP = 13, + COMPOSITIONTHICK = 14, + COMPOSITIONTHIN = 15, + FULLBOX = 16, + TEXTFORE = 17, + POINT = 18, + POINTCHARACTER = 19, + GRADIENT = 20, + GRADIENTCENTRE = 21, + CONTAINER = 8, + IME = 32, + IME_MAX = 35, + MAX = 35 + } + /// + /// INDIC_CONTAINER, INDIC_IME, INDIC_IME_MAX, and INDIC_MAX are indicator numbers, + /// not IndicatorStyles so should not really be in the INDIC_ enumeration. + /// They are redeclared in IndicatorNumbers INDICATOR_. + /// (Scintilla feature INDICATOR_) + /// + public enum IndicatorNumbers + { + CONTAINER = 8, + IME = 32, + IME_MAX = 35, + MAX = 35 + } + /// Retrieve the foreground hover colour of an indicator. (Scintilla feature SC_INDICVALUE) + public enum IndicValue + { + BIT = 0x1000000, + MASK = 0xFFFFFF + } + /// Retrieve the foreground hover colour of an indicator. (Scintilla feature SC_INDICFLAG_) + public enum IndicFlag + { + VALUEFORE = 1 + } + /// Is the horizontal scroll bar visible? (Scintilla feature SC_IV_) + public enum IndentView + { + NONE = 0, + REAL = 1, + LOOKFORWARD = 2, + LOOKBOTH = 3 + } + /// Returns the print magnification. (Scintilla feature SC_PRINT_) + public enum PrintOption + { + NORMAL = 0, + INVERTLIGHT = 1, + BLACKONWHITE = 2, + COLOURONWHITE = 3, + COLOURONWHITEDEFAULTBG = 4, + SCREENCOLOURS = 5 + } + /// Returns the print colour mode. (Scintilla feature SCFIND_) + public enum FindOption + { + NONE = 0x0, + WHOLEWORD = 0x2, + MATCHCASE = 0x4, + WORDSTART = 0x00100000, + REGEXP = 0x00200000, + POSIX = 0x00400000, + CXX11REGEX = 0x00800000 + } + /// The number of display lines needed to wrap a document line (Scintilla feature SC_FOLDLEVEL) + public enum FoldLevel + { + BASE = 0x400, + WHITEFLAG = 0x1000, + HEADERFLAG = 0x2000, + NUMBERMASK = 0x0FFF + } + /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature SC_FOLDDISPLAYTEXT_) + public enum FoldDisplayTextStyle + { + HIDDEN = 0, + STANDARD = 1, + BOXED = 2 + } + /// Get the default fold display text. (Scintilla feature SC_FOLDACTION_) + public enum FoldAction + { + CONTRACT = 0, + EXPAND = 1, + TOGGLE = 2 + } + /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature SC_AUTOMATICFOLD_) + public enum AutomaticFold + { + SHOW = 0x0001, + CLICK = 0x0002, + CHANGE = 0x0004 + } + /// Get automatic folding behaviours. (Scintilla feature SC_FOLDFLAG_) + public enum FoldFlag + { + LINEBEFORE_EXPANDED = 0x0002, + LINEBEFORE_CONTRACTED = 0x0004, + LINEAFTER_EXPANDED = 0x0008, + LINEAFTER_CONTRACTED = 0x0010, + LEVELNUMBERS = 0x0040, + LINESTATE = 0x0080 + } + /// Is the range start..end considered a word? (Scintilla feature SC_IDLESTYLING_) + public enum IdleStyling + { + NONE = 0, + TOVISIBLE = 1, + AFTERVISIBLE = 2, + ALL = 3 + } + /// Retrieve the limits to idle styling. (Scintilla feature SC_WRAP_) + public enum Wrap + { + NONE = 0, + WORD = 1, + CHAR = 2, + WHITESPACE = 3 + } + /// Retrieve whether text is word wrapped. (Scintilla feature SC_WRAPVISUALFLAG_) + public enum WrapVisualFlag + { + NONE = 0x0000, + END = 0x0001, + START = 0x0002, + MARGIN = 0x0004 + } + /// Retrive the display mode of visual flags for wrapped lines. (Scintilla feature SC_WRAPVISUALFLAGLOC_) + public enum WrapVisualLocation + { + DEFAULT = 0x0000, + END_BY_TEXT = 0x0001, + START_BY_TEXT = 0x0002 + } + /// Retrive the start indent for wrapped lines. (Scintilla feature SC_WRAPINDENT_) + public enum WrapIndentMode + { + FIXED = 0, + SAME = 1, + INDENT = 2, + DEEPINDENT = 3 + } + /// Retrieve how wrapped sublines are placed. Default is fixed. (Scintilla feature SC_CACHE_) + public enum LineCache + { + NONE = 0, + CARET = 1, + PAGE = 2, + DOCUMENT = 3 + } + /// Append a string to the end of the document without changing the selection. (Scintilla feature SC_PHASES_) + public enum PhasesDraw + { + ONE = 0, + TWO = 1, + MULTIPLE = 2 + } + /// Control font anti-aliasing. (Scintilla feature SC_EFF_) + public enum FontQuality + { + QUALITY_MASK = 0xF, + QUALITY_DEFAULT = 0, + QUALITY_NON_ANTIALIASED = 1, + QUALITY_ANTIALIASED = 2, + QUALITY_LCD_OPTIMIZED = 3 + } + /// Scroll so that a display line is at the top of the display. (Scintilla feature SC_MULTIPASTE_) + public enum MultiPaste + { + ONCE = 0, + EACH = 1 + } + /// Set the other colour used as a chequerboard pattern in the fold margin (Scintilla feature SC_ACCESSIBILITY_) + public enum Accessibility + { + DISABLED = 0, + ENABLED = 1 + } + /// Set which document modification events are sent to the container. (Scintilla feature EDGE_) + public enum EdgeVisualStyle + { + NONE = 0, + LINE = 1, + BACKGROUND = 2, + MULTILINE = 3 + } + /// Retrieves the number of lines completely visible. (Scintilla feature SC_POPUP_) + public enum PopUp + { + NEVER = 0, + ALL = 1, + TEXT = 2 + } + /// Retrieve the zoom level. (Scintilla feature SC_DOCUMENTOPTION_) + public enum DocumentOption + { + DEFAULT = 0, + STYLES_NONE = 0x1, + TEXT_LARGE = 0x100 + } + /// Get internal focus flag. (Scintilla feature SC_STATUS_) + public enum Status + { + OK = 0, + FAILURE = 1, + BADALLOC = 2, + WARN_START = 1000, + WARN_REGEX = 1001 + } + /// Get whether mouse wheel can be active outside the window. (Scintilla feature SC_CURSOR) + public enum CursorShape + { + NORMAL = -1, + ARROW = 2, + WAIT = 4, + REVERSEARROW = 7 + } + /// Constants for use with SetVisiblePolicy, similar to SetCaretPolicy. (Scintilla feature VISIBLE_) + public enum VisiblePolicy + { + SLOP = 0x01, + STRICT = 0x04 + } + /// Set the focus to this Scintilla widget. (Scintilla feature CARET_) + public enum CaretPolicy + { + SLOP = 0x01, + STRICT = 0x04, + JUMPS = 0x10, + EVEN = 0x08 + } + /// Copy argument text to the clipboard. (Scintilla feature SC_SEL_) + public enum SelectionMode + { + STREAM = 0, + RECTANGLE = 1, + LINES = 2, + THIN = 3 + } + /// + /// Get currently selected item text in the auto-completion list + /// Returns the length of the item text + /// Result is NUL-terminated. + /// (Scintilla feature SC_CASEINSENSITIVEBEHAVIOUR_) + /// + public enum CaseInsensitiveBehaviour + { + RESPECTCASE = 0, + IGNORECASE = 1 + } + /// Get auto-completion case insensitive behaviour. (Scintilla feature SC_MULTIAUTOC_) + public enum MultiAutoComplete + { + ONCE = 0, + EACH = 1 + } + /// Retrieve the effect of autocompleting when there are multiple selections. (Scintilla feature SC_ORDER_) + public enum Ordering + { + PRESORTED = 0, + PERFORMSORT = 1, + CUSTOM = 2 + } + /// Stop the caret preferred x position changing when the user types. (Scintilla feature SC_CARETSTICKY_) + public enum CaretSticky + { + OFF = 0, + ON = 1, + WHITESPACE = 2 + } + /// Duplicate the selection. If selection empty duplicate the line containing the caret. (Scintilla feature SC_ALPHA_) + public enum Alpha + { + TRANSPARENT = 0, + OPAQUE = 255, + NOALPHA = 256 + } + /// Get the background alpha of the caret line. (Scintilla feature CARETSTYLE_) + public enum CaretStyle + { + INVISIBLE = 0, + LINE = 1, + BLOCK = 2, + OVERSTRIKE_BAR = 0, + OVERSTRIKE_BLOCK = 0x10, + INS_MASK = 0xF, + BLOCK_AFTER = 0x100 + } + /// Get the start of the range of style numbers used for margin text (Scintilla feature SC_MARGINOPTION_) + public enum MarginOption + { + NONE = 0, + SUBLINESELECT = 1 + } + /// Clear the annotations from all lines (Scintilla feature ANNOTATION_) + public enum AnnotationVisible + { + HIDDEN = 0, + STANDARD = 1, + BOXED = 2, + INDENTED = 3 + } + /// Allocate some extended (>255) style numbers and return the start of the range (Scintilla feature UNDO_) + public enum UndoFlags + { + NONE = 0, + MAY_COALESCE = 1 + } + /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature SCVS_) + public enum VirtualSpace + { + NONE = 0, + RECTANGULARSELECTION = 1, + USERACCESSIBLE = 2, + NOWRAPLINESTART = 4 + } + /// Scroll to end of document. (Scintilla feature SC_TECHNOLOGY_) + public enum Technology + { + DEFAULT = 0, + DIRECTWRITE = 1, + DIRECTWRITERETAIN = 2, + DIRECTWRITEDC = 3 + } + /// + /// Line end types which may be used in addition to LF, CR, and CRLF + /// SC_LINE_END_TYPE_UNICODE includes U+2028 Line Separator, + /// U+2029 Paragraph Separator, and U+0085 Next Line + /// (Scintilla feature SC_LINE_END_TYPE_) + /// + public enum LineEndType + { + DEFAULT = 0, + UNICODE = 1 + } + /// + /// Retrieve a '\n' separated list of properties understood by the current lexer. + /// Result is NUL-terminated. + /// (Scintilla feature SC_TYPE_) + /// + public enum TypeProperty + { + BOOLEAN = 0, + INTEGER = 1, + STRING = 2 + } + /// + /// Notifications + /// Type of modification and the action which caused the modification. + /// These are defined as a bit mask to make it easy to specify which notifications are wanted. + /// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. + /// (Scintilla feature SC_MOD_ SC_PERFORMED_ SC_MULTISTEPUNDOREDO SC_LASTSTEPINUNDOREDO SC_MULTILINEUNDOREDO SC_STARTACTION SC_MODEVENTMASKALL) + /// + public enum ModificationFlags + { + } + /// + /// Notifications + /// Type of modification and the action which caused the modification. + /// These are defined as a bit mask to make it easy to specify which notifications are wanted. + /// One bit is set from each of SC_MOD_* and SC_PERFORMED_*. + /// (Scintilla feature SC_UPDATE_) + /// + public enum Update + { + CONTENT = 0x1, + SELECTION = 0x2, + V_SCROLL = 0x4, + H_SCROLL = 0x8 + } + /// + /// Symbolic key codes and modifier flags. + /// ASCII and other printable characters below 256. + /// Extended keys above 300. + /// (Scintilla feature SCMOD_) + /// + public enum KeyMod + { + NORM = 0, + SHIFT = 1, + CTRL = 2, + ALT = 4, + SUPER = 8, + META = 16 + } + /// + /// Symbolic key codes and modifier flags. + /// ASCII and other printable characters below 256. + /// Extended keys above 300. + /// (Scintilla feature SC_AC_) + /// + public enum CompletionMethods + { + FILLUP = 1, + DOUBLECLICK = 2, + TAB = 3, + NEWLINE = 4, + COMMAND = 5 + } + /// characterSource for SCN_CHARADDED (Scintilla feature SC_CHARACTERSOURCE_) + public enum CharacterSource + { + DIRECT_INPUT = 0, + TENTATIVE_INPUT = 1, + IME_RESULT = 2 + } + /// For SciLexer.h (Scintilla feature SCLEX_) + public enum Lexer + { + CONTAINER = 0, + NULL = 1, + PYTHON = 2, + CPP = 3, + HTML = 4, + XML = 5, + PERL = 6, + SQL = 7, + VB = 8, + PROPERTIES = 9, + ERRORLIST = 10, + MAKEFILE = 11, + BATCH = 12, + XCODE = 13, + LATEX = 14, + LUA = 15, + DIFF = 16, + CONF = 17, + PASCAL = 18, + AVE = 19, + ADA = 20, + LISP = 21, + RUBY = 22, + EIFFEL = 23, + EIFFELKW = 24, + TCL = 25, + NNCRONTAB = 26, + BULLANT = 27, + VBSCRIPT = 28, + BAAN = 31, + MATLAB = 32, + SCRIPTOL = 33, + ASM = 34, + CPPNOCASE = 35, + FORTRAN = 36, + F77 = 37, + CSS = 38, + POV = 39, + LOUT = 40, + ESCRIPT = 41, + PS = 42, + NSIS = 43, + MMIXAL = 44, + CLW = 45, + CLWNOCASE = 46, + LOT = 47, + YAML = 48, + TEX = 49, + METAPOST = 50, + POWERBASIC = 51, + FORTH = 52, + ERLANG = 53, + OCTAVE = 54, + MSSQL = 55, + VERILOG = 56, + KIX = 57, + GUI4CLI = 58, + SPECMAN = 59, + AU3 = 60, + APDL = 61, + BASH = 62, + ASN1 = 63, + VHDL = 64, + CAML = 65, + BLITZBASIC = 66, + PUREBASIC = 67, + HASKELL = 68, + PHPSCRIPT = 69, + TADS3 = 70, + REBOL = 71, + SMALLTALK = 72, + FLAGSHIP = 73, + CSOUND = 74, + FREEBASIC = 75, + INNOSETUP = 76, + OPAL = 77, + SPICE = 78, + D = 79, + CMAKE = 80, + GAP = 81, + PLM = 82, + PROGRESS = 83, + ABAQUS = 84, + ASYMPTOTE = 85, + R = 86, + MAGIK = 87, + POWERSHELL = 88, + MYSQL = 89, + PO = 90, + TAL = 91, + COBOL = 92, + TACL = 93, + SORCUS = 94, + POWERPRO = 95, + NIMROD = 96, + SML = 97, + MARKDOWN = 98, + TXT2TAGS = 99, + A68K = 100, + MODULA = 101, + COFFEESCRIPT = 102, + TCMD = 103, + AVS = 104, + ECL = 105, + OSCRIPT = 106, + VISUALPROLOG = 107, + LITERATEHASKELL = 108, + STTXT = 109, + KVIRC = 110, + RUST = 111, + DMAP = 112, + AS = 113, + DMIS = 114, + REGISTRY = 115, + BIBTEX = 116, + SREC = 117, + IHEX = 118, + TEHEX = 119, + JSON = 120, + EDIFACT = 121, + INDENT = 122, + MAXIMA = 123, + STATA = 124, + SAS = 125, + NIM = 126, + CIL = 127, + X12 = 128, + DATAFLEX = 129, + AUTOMATIC = 1000 + } + /// GTK Specific to work around focus and accelerator problems: (Scintilla feature SC_BIDIRECTIONAL_) + public enum Bidirectional + { + DISABLED = 0, + L2R = 1, + R2L = 2 + } + /// Set bidirectional text display state. (Scintilla feature SC_LINECHARACTERINDEX_) + public enum LineCharacterIndexType + { + NONE = 0, + UTF32 = 1, + UTF16 = 2 + } + /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ + +} diff --git a/WakaTime/PluginInfrastructure/IScintillaGateway.cs b/WakaTime/PluginInfrastructure/IScintillaGateway.cs index 981e1b7..e3f2834 100644 --- a/WakaTime/PluginInfrastructure/IScintillaGateway.cs +++ b/WakaTime/PluginInfrastructure/IScintillaGateway.cs @@ -1,2705 +1,2705 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using static Kbg.NppPluginNET.PluginInfrastructure.Win32; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - - /// - /// This it the plugin-writers primary interface to Notepad++/Scintilla. - /// It takes away all the complexity with command numbers and Int-pointer casting. - /// - /// See http://www.scintilla.org/ScintillaDoc.html for further details. - /// - public interface IScintillaGateway - { - int GetSelectionLength(); - void AppendTextAndMoveCursor(string text); - void InsertTextAndMoveCursor(string text); - void SelectCurrentLine(); - void ClearSelectionToCursor(); - - /// - /// Get the current line from the current position - /// - int GetCurrentLineNumber(); - - /// - /// Get the scroll information for the current Scintilla window. - /// - /// Arguments for the scroll information such as tracking - /// Which scroll bar information are you looking for - /// A ScrollInfo struct with information of the current scroll state - ScrollInfo GetScrollInfo(ScrollInfoMask mask = ScrollInfoMask.SIF_ALL, ScrollInfoBar scrollBar = ScrollInfoBar.SB_BOTH); - - /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ - /// Add text to the document at current position. (Scintilla feature 2001) - unsafe void AddText(int length, string text); - - /// Add array of cells to document. (Scintilla feature 2002) - unsafe void AddStyledText(int length, Cells c); - - /// Insert string at a position. (Scintilla feature 2003) - unsafe void InsertText(int pos, string text); - - /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK (Scintilla feature 2672) - unsafe void ChangeInsertion(int length, string text); - - /// Delete all text in the document. (Scintilla feature 2004) - void ClearAll(); - - /// Delete a range of text in the document. (Scintilla feature 2645) - void DeleteRange(int start, int lengthDelete); - - /// Set all style bytes to 0, remove all folding information. (Scintilla feature 2005) - void ClearDocumentStyle(); - - /// Returns the number of bytes in the document. (Scintilla feature 2006) - int GetLength(); - - /// Returns the character byte at the position. (Scintilla feature 2007) - int GetCharAt(int pos); - - /// Returns the position of the caret. (Scintilla feature 2008) - int GetCurrentPos(); - - /// Returns the position of the opposite end of the selection to the caret. (Scintilla feature 2009) - int GetAnchor(); - - /// Returns the style byte at the position. (Scintilla feature 2010) - int GetStyleAt(int pos); - - /// Redoes the next action on the undo history. (Scintilla feature 2011) - void Redo(); - - /// - /// Choose between collecting actions into the undo - /// history and discarding them. - /// (Scintilla feature 2012) - /// - void SetUndoCollection(bool collectUndo); - - /// Select all the text in the document. (Scintilla feature 2013) - void SelectAll(); - - /// - /// Remember the current position in the undo history as the position - /// at which the document was saved. - /// (Scintilla feature 2014) - /// - void SetSavePoint(); - - /// - /// Retrieve a buffer of cells. - /// Returns the number of bytes in the buffer not including terminating NULs. - /// (Scintilla feature 2015) - /// - int GetStyledText(TextRange tr); - - /// Are there any redoable actions in the undo history? (Scintilla feature 2016) - bool CanRedo(); - - /// Retrieve the line number at which a particular marker is located. (Scintilla feature 2017) - int MarkerLineFromHandle(int markerHandle); - - /// Delete a marker. (Scintilla feature 2018) - void MarkerDeleteHandle(int markerHandle); - - /// Is undo history being collected? (Scintilla feature 2019) - bool GetUndoCollection(); - - /// - /// Are white space characters currently visible? - /// Returns one of SCWS_* constants. - /// (Scintilla feature 2020) - /// - WhiteSpace GetViewWS(); - - /// Make white space characters invisible, always visible or visible outside indentation. (Scintilla feature 2021) - void SetViewWS(WhiteSpace viewWS); - - /// - /// Retrieve the current tab draw mode. - /// Returns one of SCTD_* constants. - /// (Scintilla feature 2698) - /// - TabDrawMode GetTabDrawMode(); - - /// Set how tabs are drawn when visible. (Scintilla feature 2699) - void SetTabDrawMode(TabDrawMode tabDrawMode); - - /// Find the position from a point within the window. (Scintilla feature 2022) - int PositionFromPoint(int x, int y); - - /// - /// Find the position from a point within the window but return - /// INVALID_POSITION if not close to text. - /// (Scintilla feature 2023) - /// - int PositionFromPointClose(int x, int y); - - /// Set caret to start of a line and ensure it is visible. (Scintilla feature 2024) - void GotoLine(int line); - - /// Set caret to a position and ensure it is visible. (Scintilla feature 2025) - void GotoPos(int caret); - - /// - /// Set the selection anchor to a position. The anchor is the opposite - /// end of the selection from the caret. - /// (Scintilla feature 2026) - /// - void SetAnchor(int anchor); - - /// - /// Retrieve the text of the line containing the caret. - /// Returns the index of the caret on the line. - /// Result is NUL-terminated. - /// (Scintilla feature 2027) - /// - unsafe string GetCurLine(int length); - - /// Retrieve the position of the last correctly styled character. (Scintilla feature 2028) - int GetEndStyled(); - - /// Convert all line endings in the document to one mode. (Scintilla feature 2029) - void ConvertEOLs(EndOfLine eolMode); - - /// Retrieve the current end of line mode - one of CRLF, CR, or LF. (Scintilla feature 2030) - EndOfLine GetEOLMode(); - - /// Set the current end of line mode. (Scintilla feature 2031) - void SetEOLMode(EndOfLine eolMode); - - /// - /// Set the current styling position to start. - /// The unused parameter is no longer used and should be set to 0. - /// (Scintilla feature 2032) - /// - void StartStyling(int start, int unused); - - /// - /// Change style from current styling position for length characters to a style - /// and move the current styling position to after this newly styled segment. - /// (Scintilla feature 2033) - /// - void SetStyling(int length, int style); - - /// Is drawing done first into a buffer or direct to the screen? (Scintilla feature 2034) - bool GetBufferedDraw(); - - /// - /// If drawing is buffered then each line of text is drawn into a bitmap buffer - /// before drawing it to the screen to avoid flicker. - /// (Scintilla feature 2035) - /// - void SetBufferedDraw(bool buffered); - - /// Change the visible size of a tab to be a multiple of the width of a space character. (Scintilla feature 2036) - void SetTabWidth(int tabWidth); - - /// Retrieve the visible size of a tab. (Scintilla feature 2121) - int GetTabWidth(); - - /// Clear explicit tabstops on a line. (Scintilla feature 2675) - void ClearTabStops(int line); - - /// Add an explicit tab stop for a line. (Scintilla feature 2676) - void AddTabStop(int line, int x); - - /// Find the next explicit tab stop position on a line after a position. (Scintilla feature 2677) - int GetNextTabStop(int line, int x); - - /// - /// Set the code page used to interpret the bytes of the document as characters. - /// The SC_CP_UTF8 value can be used to enter Unicode mode. - /// (Scintilla feature 2037) - /// - void SetCodePage(int codePage); - - /// Is the IME displayed in a window or inline? (Scintilla feature 2678) - IMEInteraction GetIMEInteraction(); - - /// Choose to display the the IME in a winow or inline. (Scintilla feature 2679) - void SetIMEInteraction(IMEInteraction imeInteraction); - - /// Set the symbol used for a particular marker number. (Scintilla feature 2040) - void MarkerDefine(int markerNumber, MarkerSymbol markerSymbol); - - /// Set the foreground colour used for a particular marker number. (Scintilla feature 2041) - void MarkerSetFore(int markerNumber, Colour fore); - - /// Set the background colour used for a particular marker number. (Scintilla feature 2042) - void MarkerSetBack(int markerNumber, Colour back); - - /// Set the background colour used for a particular marker number when its folding block is selected. (Scintilla feature 2292) - void MarkerSetBackSelected(int markerNumber, Colour back); - - /// Enable/disable highlight for current folding bloc (smallest one that contains the caret) (Scintilla feature 2293) - void MarkerEnableHighlight(bool enabled); - - /// Add a marker to a line, returning an ID which can be used to find or delete the marker. (Scintilla feature 2043) - int MarkerAdd(int line, int markerNumber); - - /// Delete a marker from a line. (Scintilla feature 2044) - void MarkerDelete(int line, int markerNumber); - - /// Delete all markers with a particular number from all lines. (Scintilla feature 2045) - void MarkerDeleteAll(int markerNumber); - - /// Get a bit mask of all the markers set on a line. (Scintilla feature 2046) - int MarkerGet(int line); - - /// - /// Find the next line at or after lineStart that includes a marker in mask. - /// Return -1 when no more lines. - /// (Scintilla feature 2047) - /// - int MarkerNext(int lineStart, int markerMask); - - /// Find the previous line before lineStart that includes a marker in mask. (Scintilla feature 2048) - int MarkerPrevious(int lineStart, int markerMask); - - /// Define a marker from a pixmap. (Scintilla feature 2049) - unsafe void MarkerDefinePixmap(int markerNumber, string pixmap); - - /// Add a set of markers to a line. (Scintilla feature 2466) - void MarkerAddSet(int line, int markerSet); - - /// Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature 2476) - void MarkerSetAlpha(int markerNumber, Alpha alpha); - - /// Set a margin to be either numeric or symbolic. (Scintilla feature 2240) - void SetMarginTypeN(int margin, MarginType marginType); - - /// Retrieve the type of a margin. (Scintilla feature 2241) - MarginType GetMarginTypeN(int margin); - - /// Set the width of a margin to a width expressed in pixels. (Scintilla feature 2242) - void SetMarginWidthN(int margin, int pixelWidth); - - /// Retrieve the width of a margin in pixels. (Scintilla feature 2243) - int GetMarginWidthN(int margin); - - /// Set a mask that determines which markers are displayed in a margin. (Scintilla feature 2244) - void SetMarginMaskN(int margin, int mask); - - /// Retrieve the marker mask of a margin. (Scintilla feature 2245) - int GetMarginMaskN(int margin); - - /// Make a margin sensitive or insensitive to mouse clicks. (Scintilla feature 2246) - void SetMarginSensitiveN(int margin, bool sensitive); - - /// Retrieve the mouse click sensitivity of a margin. (Scintilla feature 2247) - bool GetMarginSensitiveN(int margin); - - /// Set the cursor shown when the mouse is inside a margin. (Scintilla feature 2248) - void SetMarginCursorN(int margin, CursorShape cursor); - - /// Retrieve the cursor shown in a margin. (Scintilla feature 2249) - CursorShape GetMarginCursorN(int margin); - - /// Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. (Scintilla feature 2250) - void SetMarginBackN(int margin, Colour back); - - /// Retrieve the background colour of a margin (Scintilla feature 2251) - Colour GetMarginBackN(int margin); - - /// Allocate a non-standard number of margins. (Scintilla feature 2252) - void SetMargins(int margins); - - /// How many margins are there?. (Scintilla feature 2253) - int GetMargins(); - - /// Clear all the styles and make equivalent to the global default style. (Scintilla feature 2050) - void StyleClearAll(); - - /// Set the foreground colour of a style. (Scintilla feature 2051) - void StyleSetFore(int style, Colour fore); - - /// Set the background colour of a style. (Scintilla feature 2052) - void StyleSetBack(int style, Colour back); - - /// Set a style to be bold or not. (Scintilla feature 2053) - void StyleSetBold(int style, bool bold); - - /// Set a style to be italic or not. (Scintilla feature 2054) - void StyleSetItalic(int style, bool italic); - - /// Set the size of characters of a style. (Scintilla feature 2055) - void StyleSetSize(int style, int sizePoints); - - /// Set the font of a style. (Scintilla feature 2056) - unsafe void StyleSetFont(int style, string fontName); - - /// Set a style to have its end of line filled or not. (Scintilla feature 2057) - void StyleSetEOLFilled(int style, bool eolFilled); - - /// Reset the default style to its state at startup (Scintilla feature 2058) - void StyleResetDefault(); - - /// Set a style to be underlined or not. (Scintilla feature 2059) - void StyleSetUnderline(int style, bool underline); - - /// Get the foreground colour of a style. (Scintilla feature 2481) - Colour StyleGetFore(int style); - - /// Get the background colour of a style. (Scintilla feature 2482) - Colour StyleGetBack(int style); - - /// Get is a style bold or not. (Scintilla feature 2483) - bool StyleGetBold(int style); - - /// Get is a style italic or not. (Scintilla feature 2484) - bool StyleGetItalic(int style); - - /// Get the size of characters of a style. (Scintilla feature 2485) - int StyleGetSize(int style); - - /// - /// Get the font of a style. - /// Returns the length of the fontName - /// Result is NUL-terminated. - /// (Scintilla feature 2486) - /// - unsafe string StyleGetFont(int style); - - /// Get is a style to have its end of line filled or not. (Scintilla feature 2487) - bool StyleGetEOLFilled(int style); - - /// Get is a style underlined or not. (Scintilla feature 2488) - bool StyleGetUnderline(int style); - - /// Get is a style mixed case, or to force upper or lower case. (Scintilla feature 2489) - CaseVisible StyleGetCase(int style); - - /// Get the character get of the font in a style. (Scintilla feature 2490) - CharacterSet StyleGetCharacterSet(int style); - - /// Get is a style visible or not. (Scintilla feature 2491) - bool StyleGetVisible(int style); - - /// - /// Get is a style changeable or not (read only). - /// Experimental feature, currently buggy. - /// (Scintilla feature 2492) - /// - bool StyleGetChangeable(int style); - - /// Get is a style a hotspot or not. (Scintilla feature 2493) - bool StyleGetHotSpot(int style); - - /// Set a style to be mixed case, or to force upper or lower case. (Scintilla feature 2060) - void StyleSetCase(int style, CaseVisible caseVisible); - - /// Set the size of characters of a style. Size is in points multiplied by 100. (Scintilla feature 2061) - void StyleSetSizeFractional(int style, int sizeHundredthPoints); - - /// Get the size of characters of a style in points multiplied by 100 (Scintilla feature 2062) - int StyleGetSizeFractional(int style); - - /// Set the weight of characters of a style. (Scintilla feature 2063) - void StyleSetWeight(int style, FontWeight weight); - - /// Get the weight of characters of a style. (Scintilla feature 2064) - FontWeight StyleGetWeight(int style); - - /// Set the character set of the font in a style. (Scintilla feature 2066) - void StyleSetCharacterSet(int style, CharacterSet characterSet); - - /// Set a style to be a hotspot or not. (Scintilla feature 2409) - void StyleSetHotSpot(int style, bool hotspot); - - /// Set the foreground colour of the main and additional selections and whether to use this setting. (Scintilla feature 2067) - void SetSelFore(bool useSetting, Colour fore); - - /// Set the background colour of the main and additional selections and whether to use this setting. (Scintilla feature 2068) - void SetSelBack(bool useSetting, Colour back); - - /// Get the alpha of the selection. (Scintilla feature 2477) - Alpha GetSelAlpha(); - - /// Set the alpha of the selection. (Scintilla feature 2478) - void SetSelAlpha(Alpha alpha); - - /// Is the selection end of line filled? (Scintilla feature 2479) - bool GetSelEOLFilled(); - - /// Set the selection to have its end of line filled or not. (Scintilla feature 2480) - void SetSelEOLFilled(bool filled); - - /// Set the foreground colour of the caret. (Scintilla feature 2069) - void SetCaretFore(Colour fore); - - /// When key+modifier combination keyDefinition is pressed perform sciCommand. (Scintilla feature 2070) - void AssignCmdKey(KeyModifier keyDefinition, int sciCommand); - - /// When key+modifier combination keyDefinition is pressed do nothing. (Scintilla feature 2071) - void ClearCmdKey(KeyModifier keyDefinition); - - /// Drop all key mappings. (Scintilla feature 2072) - void ClearAllCmdKeys(); - - /// Set the styles for a segment of the document. (Scintilla feature 2073) - unsafe void SetStylingEx(int length, string styles); - - /// Set a style to be visible or not. (Scintilla feature 2074) - void StyleSetVisible(int style, bool visible); - - /// Get the time in milliseconds that the caret is on and off. (Scintilla feature 2075) - int GetCaretPeriod(); - - /// Get the time in milliseconds that the caret is on and off. 0 = steady on. (Scintilla feature 2076) - void SetCaretPeriod(int periodMilliseconds); - - /// - /// Set the set of characters making up words for when moving or selecting by word. - /// First sets defaults like SetCharsDefault. - /// (Scintilla feature 2077) - /// - unsafe void SetWordChars(string characters); - - /// - /// Get the set of characters making up words for when moving or selecting by word. - /// Returns the number of characters - /// (Scintilla feature 2646) - /// - unsafe string GetWordChars(); - - /// Set the number of characters to have directly indexed categories (Scintilla feature 2720) - void SetCharacterCategoryOptimization(int countCharacters); - - /// Get the number of characters to have directly indexed categories (Scintilla feature 2721) - int GetCharacterCategoryOptimization(); - - /// - /// Start a sequence of actions that is undone and redone as a unit. - /// May be nested. - /// (Scintilla feature 2078) - /// - void BeginUndoAction(); - - /// End a sequence of actions that is undone and redone as a unit. (Scintilla feature 2079) - void EndUndoAction(); - - /// Set an indicator to plain, squiggle or TT. (Scintilla feature 2080) - void IndicSetStyle(int indicator, IndicatorStyle indicatorStyle); - - /// Retrieve the style of an indicator. (Scintilla feature 2081) - IndicatorStyle IndicGetStyle(int indicator); - - /// Set the foreground colour of an indicator. (Scintilla feature 2082) - void IndicSetFore(int indicator, Colour fore); - - /// Retrieve the foreground colour of an indicator. (Scintilla feature 2083) - Colour IndicGetFore(int indicator); - - /// Set an indicator to draw under text or over(default). (Scintilla feature 2510) - void IndicSetUnder(int indicator, bool under); - - /// Retrieve whether indicator drawn under or over text. (Scintilla feature 2511) - bool IndicGetUnder(int indicator); - - /// Set a hover indicator to plain, squiggle or TT. (Scintilla feature 2680) - void IndicSetHoverStyle(int indicator, IndicatorStyle indicatorStyle); - - /// Retrieve the hover style of an indicator. (Scintilla feature 2681) - IndicatorStyle IndicGetHoverStyle(int indicator); - - /// Set the foreground hover colour of an indicator. (Scintilla feature 2682) - void IndicSetHoverFore(int indicator, Colour fore); - - /// Retrieve the foreground hover colour of an indicator. (Scintilla feature 2683) - Colour IndicGetHoverFore(int indicator); - - /// Set the attributes of an indicator. (Scintilla feature 2684) - void IndicSetFlags(int indicator, IndicFlag flags); - - /// Retrieve the attributes of an indicator. (Scintilla feature 2685) - IndicFlag IndicGetFlags(int indicator); - - /// Set the foreground colour of all whitespace and whether to use this setting. (Scintilla feature 2084) - void SetWhitespaceFore(bool useSetting, Colour fore); - - /// Set the background colour of all whitespace and whether to use this setting. (Scintilla feature 2085) - void SetWhitespaceBack(bool useSetting, Colour back); - - /// Set the size of the dots used to mark space characters. (Scintilla feature 2086) - void SetWhitespaceSize(int size); - - /// Get the size of the dots used to mark space characters. (Scintilla feature 2087) - int GetWhitespaceSize(); - - /// Used to hold extra styling information for each line. (Scintilla feature 2092) - void SetLineState(int line, int state); - - /// Retrieve the extra styling information for a line. (Scintilla feature 2093) - int GetLineState(int line); - - /// Retrieve the last line number that has line state. (Scintilla feature 2094) - int GetMaxLineState(); - - /// Is the background of the line containing the caret in a different colour? (Scintilla feature 2095) - bool GetCaretLineVisible(); - - /// Display the background of the line containing the caret in a different colour. (Scintilla feature 2096) - void SetCaretLineVisible(bool show); - - /// Get the colour of the background of the line containing the caret. (Scintilla feature 2097) - Colour GetCaretLineBack(); - - /// Set the colour of the background of the line containing the caret. (Scintilla feature 2098) - void SetCaretLineBack(Colour back); - - /// - /// Retrieve the caret line frame width. - /// Width = 0 means this option is disabled. - /// (Scintilla feature 2704) - /// - int GetCaretLineFrame(); - - /// - /// Display the caret line framed. - /// Set width != 0 to enable this option and width = 0 to disable it. - /// (Scintilla feature 2705) - /// - void SetCaretLineFrame(int width); - - /// - /// Set a style to be changeable or not (read only). - /// Experimental feature, currently buggy. - /// (Scintilla feature 2099) - /// - void StyleSetChangeable(int style, bool changeable); - - /// - /// Display a auto-completion list. - /// The lengthEntered parameter indicates how many characters before - /// the caret should be used to provide context. - /// (Scintilla feature 2100) - /// - unsafe void AutoCShow(int lengthEntered, string itemList); - - /// Remove the auto-completion list from the screen. (Scintilla feature 2101) - void AutoCCancel(); - - /// Is there an auto-completion list visible? (Scintilla feature 2102) - bool AutoCActive(); - - /// Retrieve the position of the caret when the auto-completion list was displayed. (Scintilla feature 2103) - int AutoCPosStart(); - - /// User has selected an item so remove the list and insert the selection. (Scintilla feature 2104) - void AutoCComplete(); - - /// Define a set of character that when typed cancel the auto-completion list. (Scintilla feature 2105) - unsafe void AutoCStops(string characterSet); - - /// - /// Change the separator character in the string setting up an auto-completion list. - /// Default is space but can be changed if items contain space. - /// (Scintilla feature 2106) - /// - void AutoCSetSeparator(int separatorCharacter); - - /// Retrieve the auto-completion list separator character. (Scintilla feature 2107) - int AutoCGetSeparator(); - - /// Select the item in the auto-completion list that starts with a string. (Scintilla feature 2108) - unsafe void AutoCSelect(string select); - - /// - /// Should the auto-completion list be cancelled if the user backspaces to a - /// position before where the box was created. - /// (Scintilla feature 2110) - /// - void AutoCSetCancelAtStart(bool cancel); - - /// Retrieve whether auto-completion cancelled by backspacing before start. (Scintilla feature 2111) - bool AutoCGetCancelAtStart(); - - /// - /// Define a set of characters that when typed will cause the autocompletion to - /// choose the selected item. - /// (Scintilla feature 2112) - /// - unsafe void AutoCSetFillUps(string characterSet); - - /// Should a single item auto-completion list automatically choose the item. (Scintilla feature 2113) - void AutoCSetChooseSingle(bool chooseSingle); - - /// Retrieve whether a single item auto-completion list automatically choose the item. (Scintilla feature 2114) - bool AutoCGetChooseSingle(); - - /// Set whether case is significant when performing auto-completion searches. (Scintilla feature 2115) - void AutoCSetIgnoreCase(bool ignoreCase); - - /// Retrieve state of ignore case flag. (Scintilla feature 2116) - bool AutoCGetIgnoreCase(); - - /// Display a list of strings and send notification when user chooses one. (Scintilla feature 2117) - unsafe void UserListShow(int listType, string itemList); - - /// Set whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2118) - void AutoCSetAutoHide(bool autoHide); - - /// Retrieve whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2119) - bool AutoCGetAutoHide(); - - /// - /// Set whether or not autocompletion deletes any word characters - /// after the inserted text upon completion. - /// (Scintilla feature 2270) - /// - void AutoCSetDropRestOfWord(bool dropRestOfWord); - - /// - /// Retrieve whether or not autocompletion deletes any word characters - /// after the inserted text upon completion. - /// (Scintilla feature 2271) - /// - bool AutoCGetDropRestOfWord(); - - /// Register an XPM image for use in autocompletion lists. (Scintilla feature 2405) - unsafe void RegisterImage(int type, string xpmData); - - /// Clear all the registered XPM images. (Scintilla feature 2408) - void ClearRegisteredImages(); - - /// Retrieve the auto-completion list type-separator character. (Scintilla feature 2285) - int AutoCGetTypeSeparator(); - - /// - /// Change the type-separator character in the string setting up an auto-completion list. - /// Default is '?' but can be changed if items contain '?'. - /// (Scintilla feature 2286) - /// - void AutoCSetTypeSeparator(int separatorCharacter); - - /// - /// Set the maximum width, in characters, of auto-completion and user lists. - /// Set to 0 to autosize to fit longest item, which is the default. - /// (Scintilla feature 2208) - /// - void AutoCSetMaxWidth(int characterCount); - - /// Get the maximum width, in characters, of auto-completion and user lists. (Scintilla feature 2209) - int AutoCGetMaxWidth(); - - /// - /// Set the maximum height, in rows, of auto-completion and user lists. - /// The default is 5 rows. - /// (Scintilla feature 2210) - /// - void AutoCSetMaxHeight(int rowCount); - - /// Set the maximum height, in rows, of auto-completion and user lists. (Scintilla feature 2211) - int AutoCGetMaxHeight(); - - /// Set the number of spaces used for one level of indentation. (Scintilla feature 2122) - void SetIndent(int indentSize); - - /// Retrieve indentation size. (Scintilla feature 2123) - int GetIndent(); - - /// - /// Indentation will only use space characters if useTabs is false, otherwise - /// it will use a combination of tabs and spaces. - /// (Scintilla feature 2124) - /// - void SetUseTabs(bool useTabs); - - /// Retrieve whether tabs will be used in indentation. (Scintilla feature 2125) - bool GetUseTabs(); - - /// Change the indentation of a line to a number of columns. (Scintilla feature 2126) - void SetLineIndentation(int line, int indentation); - - /// Retrieve the number of columns that a line is indented. (Scintilla feature 2127) - int GetLineIndentation(int line); - - /// Retrieve the position before the first non indentation character on a line. (Scintilla feature 2128) - int GetLineIndentPosition(int line); - - /// Retrieve the column number of a position, taking tab width into account. (Scintilla feature 2129) - int GetColumn(int pos); - - /// Count characters between two positions. (Scintilla feature 2633) - int CountCharacters(int start, int end); - - /// Count code units between two positions. (Scintilla feature 2715) - int CountCodeUnits(int start, int end); - - /// Show or hide the horizontal scroll bar. (Scintilla feature 2130) - void SetHScrollBar(bool visible); - - /// Is the horizontal scroll bar visible? (Scintilla feature 2131) - bool GetHScrollBar(); - - /// Show or hide indentation guides. (Scintilla feature 2132) - void SetIndentationGuides(IndentView indentView); - - /// Are the indentation guides visible? (Scintilla feature 2133) - IndentView GetIndentationGuides(); - - /// - /// Set the highlighted indentation guide column. - /// 0 = no highlighted guide. - /// (Scintilla feature 2134) - /// - void SetHighlightGuide(int column); - - /// Get the highlighted indentation guide column. (Scintilla feature 2135) - int GetHighlightGuide(); - - /// Get the position after the last visible characters on a line. (Scintilla feature 2136) - int GetLineEndPosition(int line); - - /// Get the code page used to interpret the bytes of the document as characters. (Scintilla feature 2137) - int GetCodePage(); - - /// Get the foreground colour of the caret. (Scintilla feature 2138) - Colour GetCaretFore(); - - /// In read-only mode? (Scintilla feature 2140) - bool GetReadOnly(); - - /// Sets the position of the caret. (Scintilla feature 2141) - void SetCurrentPos(int caret); - - /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2142) - void SetSelectionStart(int anchor); - - /// Returns the position at the start of the selection. (Scintilla feature 2143) - int GetSelectionStart(); - - /// Sets the position that ends the selection - this becomes the caret. (Scintilla feature 2144) - void SetSelectionEnd(int caret); - - /// Returns the position at the end of the selection. (Scintilla feature 2145) - int GetSelectionEnd(); - - /// Set caret to a position, while removing any existing selection. (Scintilla feature 2556) - void SetEmptySelection(int caret); - - /// Sets the print magnification added to the point size of each style for printing. (Scintilla feature 2146) - void SetPrintMagnification(int magnification); - - /// Returns the print magnification. (Scintilla feature 2147) - int GetPrintMagnification(); - - /// Modify colours when printing for clearer printed text. (Scintilla feature 2148) - void SetPrintColourMode(PrintOption mode); - - /// Returns the print colour mode. (Scintilla feature 2149) - PrintOption GetPrintColourMode(); - - /// Find some text in the document. (Scintilla feature 2150) - int FindText(FindOption searchFlags, TextToFind ft); - - /// Retrieve the display line at the top of the display. (Scintilla feature 2152) - int GetFirstVisibleLine(); - - /// - /// Retrieve the contents of a line. - /// Returns the length of the line. - /// (Scintilla feature 2153) - /// - unsafe string GetLine(int line); - - /// Returns the number of lines in the document. There is always at least one. (Scintilla feature 2154) - int GetLineCount(); - - /// Sets the size in pixels of the left margin. (Scintilla feature 2155) - void SetMarginLeft(int pixelWidth); - - /// Returns the size in pixels of the left margin. (Scintilla feature 2156) - int GetMarginLeft(); - - /// Sets the size in pixels of the right margin. (Scintilla feature 2157) - void SetMarginRight(int pixelWidth); - - /// Returns the size in pixels of the right margin. (Scintilla feature 2158) - int GetMarginRight(); - - /// Is the document different from when it was last saved? (Scintilla feature 2159) - bool GetModify(); - - /// Select a range of text. (Scintilla feature 2160) - void SetSel(int anchor, int caret); - - /// - /// Retrieve the selected text. - /// Return the length of the text. - /// Result is NUL-terminated. - /// (Scintilla feature 2161) - /// - unsafe string GetSelText(); - - /// - /// Retrieve a range of text. - /// Return the length of the text. - /// (Scintilla feature 2162) - /// - int GetTextRange(TextRange tr); - - /// Draw the selection either highlighted or in normal (non-highlighted) style. (Scintilla feature 2163) - void HideSelection(bool hide); - - /// Retrieve the x value of the point in the window where a position is displayed. (Scintilla feature 2164) - int PointXFromPosition(int pos); - - /// Retrieve the y value of the point in the window where a position is displayed. (Scintilla feature 2165) - int PointYFromPosition(int pos); - - /// Retrieve the line containing a position. (Scintilla feature 2166) - int LineFromPosition(int pos); - - /// Retrieve the position at the start of a line. (Scintilla feature 2167) - int PositionFromLine(int line); - - /// Scroll horizontally and vertically. (Scintilla feature 2168) - void LineScroll(int columns, int lines); - - /// Ensure the caret is visible. (Scintilla feature 2169) - void ScrollCaret(); - - /// - /// Scroll the argument positions and the range between them into view giving - /// priority to the primary position then the secondary position. - /// This may be used to make a search match visible. - /// (Scintilla feature 2569) - /// - void ScrollRange(int secondary, int primary); - - /// Replace the selected text with the argument text. (Scintilla feature 2170) - unsafe void ReplaceSel(string text); - - /// Set to read only or read write. (Scintilla feature 2171) - void SetReadOnly(bool readOnly); - - /// Null operation. (Scintilla feature 2172) - void Null(); - - /// Will a paste succeed? (Scintilla feature 2173) - bool CanPaste(); - - /// Are there any undoable actions in the undo history? (Scintilla feature 2174) - bool CanUndo(); - - /// Delete the undo history. (Scintilla feature 2175) - void EmptyUndoBuffer(); - - /// Undo one action in the undo history. (Scintilla feature 2176) - void Undo(); - - /// Cut the selection to the clipboard. (Scintilla feature 2177) - void Cut(); - - /// Copy the selection to the clipboard. (Scintilla feature 2178) - void Copy(); - - /// Paste the contents of the clipboard into the document replacing the selection. (Scintilla feature 2179) - void Paste(); - - /// Clear the selection. (Scintilla feature 2180) - void Clear(); - - /// Replace the contents of the document with the argument text. (Scintilla feature 2181) - unsafe void SetText(string text); - - /// - /// Retrieve all the text in the document. - /// Returns number of characters retrieved. - /// Result is NUL-terminated. - /// (Scintilla feature 2182) - /// - unsafe string GetText(int length); - - /// Retrieve the number of characters in the document. (Scintilla feature 2183) - int GetTextLength(); - - /// Retrieve a pointer to a function that processes messages for this Scintilla. (Scintilla feature 2184) - IntPtr GetDirectFunction(); - - /// - /// Retrieve a pointer value to use as the first argument when calling - /// the function returned by GetDirectFunction. - /// (Scintilla feature 2185) - /// - IntPtr GetDirectPointer(); - - /// Set to overtype (true) or insert mode. (Scintilla feature 2186) - void SetOvertype(bool overType); - - /// Returns true if overtype mode is active otherwise false is returned. (Scintilla feature 2187) - bool GetOvertype(); - - /// Set the width of the insert mode caret. (Scintilla feature 2188) - void SetCaretWidth(int pixelWidth); - - /// Returns the width of the insert mode caret. (Scintilla feature 2189) - int GetCaretWidth(); - - /// - /// Sets the position that starts the target which is used for updating the - /// document without affecting the scroll position. - /// (Scintilla feature 2190) - /// - void SetTargetStart(int start); - - /// Get the position that starts the target. (Scintilla feature 2191) - int GetTargetStart(); - - /// - /// Sets the position that ends the target which is used for updating the - /// document without affecting the scroll position. - /// (Scintilla feature 2192) - /// - void SetTargetEnd(int end); - - /// Get the position that ends the target. (Scintilla feature 2193) - int GetTargetEnd(); - - /// Sets both the start and end of the target in one call. (Scintilla feature 2686) - void SetTargetRange(int start, int end); - - /// Retrieve the text in the target. (Scintilla feature 2687) - unsafe string GetTargetText(); - - /// Make the target range start and end be the same as the selection range start and end. (Scintilla feature 2287) - void TargetFromSelection(); - - /// Sets the target to the whole document. (Scintilla feature 2690) - void TargetWholeDocument(); - - /// - /// Replace the target text with the argument text. - /// Text is counted so it can contain NULs. - /// Returns the length of the replacement text. - /// (Scintilla feature 2194) - /// - unsafe int ReplaceTarget(int length, string text); - - /// - /// Replace the target text with the argument text after \d processing. - /// Text is counted so it can contain NULs. - /// Looks for \d where d is between 1 and 9 and replaces these with the strings - /// matched in the last search operation which were surrounded by \( and \). - /// Returns the length of the replacement text including any change - /// caused by processing the \d patterns. - /// (Scintilla feature 2195) - /// - unsafe int ReplaceTargetRE(int length, string text); - - /// - /// Search for a counted string in the target and set the target to the found - /// range. Text is counted so it can contain NULs. - /// Returns start of found range or -1 for failure in which case target is not moved. - /// (Scintilla feature 2197) - /// - unsafe int SearchInTarget(int length, string text); - - /// Set the search flags used by SearchInTarget. (Scintilla feature 2198) - void SetSearchFlags(FindOption searchFlags); - - /// Get the search flags used by SearchInTarget. (Scintilla feature 2199) - FindOption GetSearchFlags(); - - /// Show a call tip containing a definition near position pos. (Scintilla feature 2200) - unsafe void CallTipShow(int pos, string definition); - - /// Remove the call tip from the screen. (Scintilla feature 2201) - void CallTipCancel(); - - /// Is there an active call tip? (Scintilla feature 2202) - bool CallTipActive(); - - /// Retrieve the position where the caret was before displaying the call tip. (Scintilla feature 2203) - int CallTipPosStart(); - - /// Set the start position in order to change when backspacing removes the calltip. (Scintilla feature 2214) - void CallTipSetPosStart(int posStart); - - /// Highlight a segment of the definition. (Scintilla feature 2204) - void CallTipSetHlt(int highlightStart, int highlightEnd); - - /// Set the background colour for the call tip. (Scintilla feature 2205) - void CallTipSetBack(Colour back); - - /// Set the foreground colour for the call tip. (Scintilla feature 2206) - void CallTipSetFore(Colour fore); - - /// Set the foreground colour for the highlighted part of the call tip. (Scintilla feature 2207) - void CallTipSetForeHlt(Colour fore); - - /// Enable use of STYLE_CALLTIP and set call tip tab size in pixels. (Scintilla feature 2212) - void CallTipUseStyle(int tabSize); - - /// Set position of calltip, above or below text. (Scintilla feature 2213) - void CallTipSetPosition(bool above); - - /// Find the display line of a document line taking hidden lines into account. (Scintilla feature 2220) - int VisibleFromDocLine(int docLine); - - /// Find the document line of a display line taking hidden lines into account. (Scintilla feature 2221) - int DocLineFromVisible(int displayLine); - - /// The number of display lines needed to wrap a document line (Scintilla feature 2235) - int WrapCount(int docLine); - - /// - /// Set the fold level of a line. - /// This encodes an integer level along with flags indicating whether the - /// line is a header and whether it is effectively white space. - /// (Scintilla feature 2222) - /// - void SetFoldLevel(int line, FoldLevel level); - - /// Retrieve the fold level of a line. (Scintilla feature 2223) - FoldLevel GetFoldLevel(int line); - - /// Find the last child line of a header line. (Scintilla feature 2224) - int GetLastChild(int line, FoldLevel level); - - /// Find the parent line of a child line. (Scintilla feature 2225) - int GetFoldParent(int line); - - /// Make a range of lines visible. (Scintilla feature 2226) - void ShowLines(int lineStart, int lineEnd); - - /// Make a range of lines invisible. (Scintilla feature 2227) - void HideLines(int lineStart, int lineEnd); - - /// Is a line visible? (Scintilla feature 2228) - bool GetLineVisible(int line); - - /// Are all lines visible? (Scintilla feature 2236) - bool GetAllLinesVisible(); - - /// Show the children of a header line. (Scintilla feature 2229) - void SetFoldExpanded(int line, bool expanded); - - /// Is a header line expanded? (Scintilla feature 2230) - bool GetFoldExpanded(int line); - - /// Switch a header line between expanded and contracted. (Scintilla feature 2231) - void ToggleFold(int line); - - /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature 2700) - unsafe void ToggleFoldShowText(int line, string text); - - /// Set the style of fold display text. (Scintilla feature 2701) - void FoldDisplayTextSetStyle(FoldDisplayTextStyle style); - - /// Get the style of fold display text. (Scintilla feature 2707) - FoldDisplayTextStyle FoldDisplayTextGetStyle(); - - /// Set the default fold display text. (Scintilla feature 2722) - unsafe void SetDefaultFoldDisplayText(string text); - - /// Get the default fold display text. (Scintilla feature 2723) - unsafe string GetDefaultFoldDisplayText(); - - /// Expand or contract a fold header. (Scintilla feature 2237) - void FoldLine(int line, FoldAction action); - - /// Expand or contract a fold header and its children. (Scintilla feature 2238) - void FoldChildren(int line, FoldAction action); - - /// Expand a fold header and all children. Use the level argument instead of the line's current level. (Scintilla feature 2239) - void ExpandChildren(int line, FoldLevel level); - - /// Expand or contract all fold headers. (Scintilla feature 2662) - void FoldAll(FoldAction action); - - /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature 2232) - void EnsureVisible(int line); - - /// Set automatic folding behaviours. (Scintilla feature 2663) - void SetAutomaticFold(AutomaticFold automaticFold); - - /// Get automatic folding behaviours. (Scintilla feature 2664) - AutomaticFold GetAutomaticFold(); - - /// Set some style options for folding. (Scintilla feature 2233) - void SetFoldFlags(FoldFlag flags); - - /// - /// Ensure a particular line is visible by expanding any header line hiding it. - /// Use the currently set visibility policy to determine which range to display. - /// (Scintilla feature 2234) - /// - void EnsureVisibleEnforcePolicy(int line); - - /// Sets whether a tab pressed when caret is within indentation indents. (Scintilla feature 2260) - void SetTabIndents(bool tabIndents); - - /// Does a tab pressed when caret is within indentation indent? (Scintilla feature 2261) - bool GetTabIndents(); - - /// Sets whether a backspace pressed when caret is within indentation unindents. (Scintilla feature 2262) - void SetBackSpaceUnIndents(bool bsUnIndents); - - /// Does a backspace pressed when caret is within indentation unindent? (Scintilla feature 2263) - bool GetBackSpaceUnIndents(); - - /// Sets the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2264) - void SetMouseDwellTime(int periodMilliseconds); - - /// Retrieve the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2265) - int GetMouseDwellTime(); - - /// Get position of start of word. (Scintilla feature 2266) - int WordStartPosition(int pos, bool onlyWordCharacters); - - /// Get position of end of word. (Scintilla feature 2267) - int WordEndPosition(int pos, bool onlyWordCharacters); - - /// Is the range start..end considered a word? (Scintilla feature 2691) - bool IsRangeWord(int start, int end); - - /// Sets limits to idle styling. (Scintilla feature 2692) - void SetIdleStyling(IdleStyling idleStyling); - - /// Retrieve the limits to idle styling. (Scintilla feature 2693) - IdleStyling GetIdleStyling(); - - /// Sets whether text is word wrapped. (Scintilla feature 2268) - void SetWrapMode(Wrap wrapMode); - - /// Retrieve whether text is word wrapped. (Scintilla feature 2269) - Wrap GetWrapMode(); - - /// Set the display mode of visual flags for wrapped lines. (Scintilla feature 2460) - void SetWrapVisualFlags(WrapVisualFlag wrapVisualFlags); - - /// Retrive the display mode of visual flags for wrapped lines. (Scintilla feature 2461) - WrapVisualFlag GetWrapVisualFlags(); - - /// Set the location of visual flags for wrapped lines. (Scintilla feature 2462) - void SetWrapVisualFlagsLocation(WrapVisualLocation wrapVisualFlagsLocation); - - /// Retrive the location of visual flags for wrapped lines. (Scintilla feature 2463) - WrapVisualLocation GetWrapVisualFlagsLocation(); - - /// Set the start indent for wrapped lines. (Scintilla feature 2464) - void SetWrapStartIndent(int indent); - - /// Retrive the start indent for wrapped lines. (Scintilla feature 2465) - int GetWrapStartIndent(); - - /// Sets how wrapped sublines are placed. Default is fixed. (Scintilla feature 2472) - void SetWrapIndentMode(WrapIndentMode wrapIndentMode); - - /// Retrieve how wrapped sublines are placed. Default is fixed. (Scintilla feature 2473) - WrapIndentMode GetWrapIndentMode(); - - /// Sets the degree of caching of layout information. (Scintilla feature 2272) - void SetLayoutCache(LineCache cacheMode); - - /// Retrieve the degree of caching of layout information. (Scintilla feature 2273) - LineCache GetLayoutCache(); - - /// Sets the document width assumed for scrolling. (Scintilla feature 2274) - void SetScrollWidth(int pixelWidth); - - /// Retrieve the document width assumed for scrolling. (Scintilla feature 2275) - int GetScrollWidth(); - - /// Sets whether the maximum width line displayed is used to set scroll width. (Scintilla feature 2516) - void SetScrollWidthTracking(bool tracking); - - /// Retrieve whether the scroll width tracks wide lines. (Scintilla feature 2517) - bool GetScrollWidthTracking(); - - /// - /// Measure the pixel width of some text in a particular style. - /// NUL terminated text argument. - /// Does not handle tab or control characters. - /// (Scintilla feature 2276) - /// - unsafe int TextWidth(int style, string text); - - /// - /// Sets the scroll range so that maximum scroll position has - /// the last line at the bottom of the view (default). - /// Setting this to false allows scrolling one page below the last line. - /// (Scintilla feature 2277) - /// - void SetEndAtLastLine(bool endAtLastLine); - - /// - /// Retrieve whether the maximum scroll position has the last - /// line at the bottom of the view. - /// (Scintilla feature 2278) - /// - bool GetEndAtLastLine(); - - /// Retrieve the height of a particular line of text in pixels. (Scintilla feature 2279) - int TextHeight(int line); - - /// Show or hide the vertical scroll bar. (Scintilla feature 2280) - void SetVScrollBar(bool visible); - - /// Is the vertical scroll bar visible? (Scintilla feature 2281) - bool GetVScrollBar(); - - /// Append a string to the end of the document without changing the selection. (Scintilla feature 2282) - unsafe void AppendText(int length, string text); - - /// How many phases is drawing done in? (Scintilla feature 2673) - PhasesDraw GetPhasesDraw(); - - /// - /// In one phase draw, text is drawn in a series of rectangular blocks with no overlap. - /// In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. - /// In multiple phase draw, each element is drawn over the whole drawing area, allowing text - /// to overlap from one line to the next. - /// (Scintilla feature 2674) - /// - void SetPhasesDraw(PhasesDraw phases); - - /// Choose the quality level for text from the FontQuality enumeration. (Scintilla feature 2611) - void SetFontQuality(FontQuality fontQuality); - - /// Retrieve the quality level for text. (Scintilla feature 2612) - FontQuality GetFontQuality(); - - /// Scroll so that a display line is at the top of the display. (Scintilla feature 2613) - void SetFirstVisibleLine(int displayLine); - - /// Change the effect of pasting when there are multiple selections. (Scintilla feature 2614) - void SetMultiPaste(MultiPaste multiPaste); - - /// Retrieve the effect of pasting when there are multiple selections. (Scintilla feature 2615) - MultiPaste GetMultiPaste(); - - /// - /// Retrieve the value of a tag from a regular expression search. - /// Result is NUL-terminated. - /// (Scintilla feature 2616) - /// - unsafe string GetTag(int tagNumber); - - /// Join the lines in the target. (Scintilla feature 2288) - void LinesJoin(); - - /// - /// Split the lines in the target into lines that are less wide than pixelWidth - /// where possible. - /// (Scintilla feature 2289) - /// - void LinesSplit(int pixelWidth); - - /// Set one of the colours used as a chequerboard pattern in the fold margin (Scintilla feature 2290) - void SetFoldMarginColour(bool useSetting, Colour back); - - /// Set the other colour used as a chequerboard pattern in the fold margin (Scintilla feature 2291) - void SetFoldMarginHiColour(bool useSetting, Colour fore); - - /// Enable or disable accessibility. (Scintilla feature 2702) - void SetAccessibility(Accessibility accessibility); - - /// Report accessibility status. (Scintilla feature 2703) - Accessibility GetAccessibility(); - - /// Move caret down one line. (Scintilla feature 2300) - void LineDown(); - - /// Move caret down one line extending selection to new caret position. (Scintilla feature 2301) - void LineDownExtend(); - - /// Move caret up one line. (Scintilla feature 2302) - void LineUp(); - - /// Move caret up one line extending selection to new caret position. (Scintilla feature 2303) - void LineUpExtend(); - - /// Move caret left one character. (Scintilla feature 2304) - void CharLeft(); - - /// Move caret left one character extending selection to new caret position. (Scintilla feature 2305) - void CharLeftExtend(); - - /// Move caret right one character. (Scintilla feature 2306) - void CharRight(); - - /// Move caret right one character extending selection to new caret position. (Scintilla feature 2307) - void CharRightExtend(); - - /// Move caret left one word. (Scintilla feature 2308) - void WordLeft(); - - /// Move caret left one word extending selection to new caret position. (Scintilla feature 2309) - void WordLeftExtend(); - - /// Move caret right one word. (Scintilla feature 2310) - void WordRight(); - - /// Move caret right one word extending selection to new caret position. (Scintilla feature 2311) - void WordRightExtend(); - - /// Move caret to first position on line. (Scintilla feature 2312) - void Home(); - - /// Move caret to first position on line extending selection to new caret position. (Scintilla feature 2313) - void HomeExtend(); - - /// Move caret to last position on line. (Scintilla feature 2314) - void LineEnd(); - - /// Move caret to last position on line extending selection to new caret position. (Scintilla feature 2315) - void LineEndExtend(); - - /// Move caret to first position in document. (Scintilla feature 2316) - void DocumentStart(); - - /// Move caret to first position in document extending selection to new caret position. (Scintilla feature 2317) - void DocumentStartExtend(); - - /// Move caret to last position in document. (Scintilla feature 2318) - void DocumentEnd(); - - /// Move caret to last position in document extending selection to new caret position. (Scintilla feature 2319) - void DocumentEndExtend(); - - /// Move caret one page up. (Scintilla feature 2320) - void PageUp(); - - /// Move caret one page up extending selection to new caret position. (Scintilla feature 2321) - void PageUpExtend(); - - /// Move caret one page down. (Scintilla feature 2322) - void PageDown(); - - /// Move caret one page down extending selection to new caret position. (Scintilla feature 2323) - void PageDownExtend(); - - /// Switch from insert to overtype mode or the reverse. (Scintilla feature 2324) - void EditToggleOvertype(); - - /// Cancel any modes such as call tip or auto-completion list display. (Scintilla feature 2325) - void Cancel(); - - /// Delete the selection or if no selection, the character before the caret. (Scintilla feature 2326) - void DeleteBack(); - - /// - /// If selection is empty or all on one line replace the selection with a tab character. - /// If more than one line selected, indent the lines. - /// (Scintilla feature 2327) - /// - void Tab(); - - /// Dedent the selected lines. (Scintilla feature 2328) - void BackTab(); - - /// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. (Scintilla feature 2329) - void NewLine(); - - /// Insert a Form Feed character. (Scintilla feature 2330) - void FormFeed(); - - /// - /// Move caret to before first visible character on line. - /// If already there move to first character on line. - /// (Scintilla feature 2331) - /// - void VCHome(); - - /// Like VCHome but extending selection to new caret position. (Scintilla feature 2332) - void VCHomeExtend(); - - /// Magnify the displayed text by increasing the sizes by 1 point. (Scintilla feature 2333) - void ZoomIn(); - - /// Make the displayed text smaller by decreasing the sizes by 1 point. (Scintilla feature 2334) - void ZoomOut(); - - /// Delete the word to the left of the caret. (Scintilla feature 2335) - void DelWordLeft(); - - /// Delete the word to the right of the caret. (Scintilla feature 2336) - void DelWordRight(); - - /// Delete the word to the right of the caret, but not the trailing non-word characters. (Scintilla feature 2518) - void DelWordRightEnd(); - - /// Cut the line containing the caret. (Scintilla feature 2337) - void LineCut(); - - /// Delete the line containing the caret. (Scintilla feature 2338) - void LineDelete(); - - /// Switch the current line with the previous. (Scintilla feature 2339) - void LineTranspose(); - - /// Reverse order of selected lines. (Scintilla feature 2354) - void LineReverse(); - - /// Duplicate the current line. (Scintilla feature 2404) - void LineDuplicate(); - - /// Transform the selection to lower case. (Scintilla feature 2340) - void LowerCase(); - - /// Transform the selection to upper case. (Scintilla feature 2341) - void UpperCase(); - - /// Scroll the document down, keeping the caret visible. (Scintilla feature 2342) - void LineScrollDown(); - - /// Scroll the document up, keeping the caret visible. (Scintilla feature 2343) - void LineScrollUp(); - - /// - /// Delete the selection or if no selection, the character before the caret. - /// Will not delete the character before at the start of a line. - /// (Scintilla feature 2344) - /// - void DeleteBackNotLine(); - - /// Move caret to first position on display line. (Scintilla feature 2345) - void HomeDisplay(); - - /// - /// Move caret to first position on display line extending selection to - /// new caret position. - /// (Scintilla feature 2346) - /// - void HomeDisplayExtend(); - - /// Move caret to last position on display line. (Scintilla feature 2347) - void LineEndDisplay(); - - /// - /// Move caret to last position on display line extending selection to new - /// caret position. - /// (Scintilla feature 2348) - /// - void LineEndDisplayExtend(); - - /// - /// Like Home but when word-wrap is enabled goes first to start of display line - /// HomeDisplay, then to start of document line Home. - /// (Scintilla feature 2349) - /// - void HomeWrap(); - - /// - /// Like HomeExtend but when word-wrap is enabled extends first to start of display line - /// HomeDisplayExtend, then to start of document line HomeExtend. - /// (Scintilla feature 2450) - /// - void HomeWrapExtend(); - - /// - /// Like LineEnd but when word-wrap is enabled goes first to end of display line - /// LineEndDisplay, then to start of document line LineEnd. - /// (Scintilla feature 2451) - /// - void LineEndWrap(); - - /// - /// Like LineEndExtend but when word-wrap is enabled extends first to end of display line - /// LineEndDisplayExtend, then to start of document line LineEndExtend. - /// (Scintilla feature 2452) - /// - void LineEndWrapExtend(); - - /// - /// Like VCHome but when word-wrap is enabled goes first to start of display line - /// VCHomeDisplay, then behaves like VCHome. - /// (Scintilla feature 2453) - /// - void VCHomeWrap(); - - /// - /// Like VCHomeExtend but when word-wrap is enabled extends first to start of display line - /// VCHomeDisplayExtend, then behaves like VCHomeExtend. - /// (Scintilla feature 2454) - /// - void VCHomeWrapExtend(); - - /// Copy the line containing the caret. (Scintilla feature 2455) - void LineCopy(); - - /// Move the caret inside current view if it's not there already. (Scintilla feature 2401) - void MoveCaretInsideView(); - - /// How many characters are on a line, including end of line characters? (Scintilla feature 2350) - int LineLength(int line); - - /// Highlight the characters at two positions. (Scintilla feature 2351) - void BraceHighlight(int posA, int posB); - - /// Use specified indicator to highlight matching braces instead of changing their style. (Scintilla feature 2498) - void BraceHighlightIndicator(bool useSetting, int indicator); - - /// Highlight the character at a position indicating there is no matching brace. (Scintilla feature 2352) - void BraceBadLight(int pos); - - /// Use specified indicator to highlight non matching brace instead of changing its style. (Scintilla feature 2499) - void BraceBadLightIndicator(bool useSetting, int indicator); - - /// - /// Find the position of a matching brace or INVALID_POSITION if no match. - /// The maxReStyle must be 0 for now. It may be defined in a future release. - /// (Scintilla feature 2353) - /// - int BraceMatch(int pos, int maxReStyle); - - /// Are the end of line characters visible? (Scintilla feature 2355) - bool GetViewEOL(); - - /// Make the end of line characters visible or invisible. (Scintilla feature 2356) - void SetViewEOL(bool visible); - - /// Retrieve a pointer to the document object. (Scintilla feature 2357) - IntPtr GetDocPointer(); - - /// Change the document object used. (Scintilla feature 2358) - void SetDocPointer(IntPtr doc); - - /// Set which document modification events are sent to the container. (Scintilla feature 2359) - void SetModEventMask(ModificationFlags eventMask); - - /// Retrieve the column number which text should be kept within. (Scintilla feature 2360) - int GetEdgeColumn(); - - /// - /// Set the column number of the edge. - /// If text goes past the edge then it is highlighted. - /// (Scintilla feature 2361) - /// - void SetEdgeColumn(int column); - - /// Retrieve the edge highlight mode. (Scintilla feature 2362) - EdgeVisualStyle GetEdgeMode(); - - /// - /// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that - /// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). - /// (Scintilla feature 2363) - /// - void SetEdgeMode(EdgeVisualStyle edgeMode); - - /// Retrieve the colour used in edge indication. (Scintilla feature 2364) - Colour GetEdgeColour(); - - /// Change the colour used in edge indication. (Scintilla feature 2365) - void SetEdgeColour(Colour edgeColour); - - /// Add a new vertical edge to the view. (Scintilla feature 2694) - void MultiEdgeAddLine(int column, Colour edgeColour); - - /// Clear all vertical edges. (Scintilla feature 2695) - void MultiEdgeClearAll(); - - /// Sets the current caret position to be the search anchor. (Scintilla feature 2366) - void SearchAnchor(); - - /// - /// Find some text starting at the search anchor. - /// Does not ensure the selection is visible. - /// (Scintilla feature 2367) - /// - unsafe int SearchNext(FindOption searchFlags, string text); - - /// - /// Find some text starting at the search anchor and moving backwards. - /// Does not ensure the selection is visible. - /// (Scintilla feature 2368) - /// - unsafe int SearchPrev(FindOption searchFlags, string text); - - /// Retrieves the number of lines completely visible. (Scintilla feature 2370) - int LinesOnScreen(); - - /// - /// Set whether a pop up menu is displayed automatically when the user presses - /// the wrong mouse button on certain areas. - /// (Scintilla feature 2371) - /// - void UsePopUp(PopUp popUpMode); - - /// Is the selection rectangular? The alternative is the more common stream selection. (Scintilla feature 2372) - bool SelectionIsRectangle(); - - /// - /// Set the zoom level. This number of points is added to the size of all fonts. - /// It may be positive to magnify or negative to reduce. - /// (Scintilla feature 2373) - /// - void SetZoom(int zoomInPoints); - - /// Retrieve the zoom level. (Scintilla feature 2374) - int GetZoom(); - - /// - /// Create a new document object. - /// Starts with reference count of 1 and not selected into editor. - /// (Scintilla feature 2375) - /// - IntPtr CreateDocument(int bytes, DocumentOption documentOptions); - - /// Extend life of document. (Scintilla feature 2376) - void AddRefDocument(IntPtr doc); - - /// Release a reference to the document, deleting document if it fades to black. (Scintilla feature 2377) - void ReleaseDocument(IntPtr doc); - - /// Get which document options are set. (Scintilla feature 2379) - DocumentOption GetDocumentOptions(); - - /// Get which document modification events are sent to the container. (Scintilla feature 2378) - ModificationFlags GetModEventMask(); - - /// Set whether command events are sent to the container. (Scintilla feature 2717) - void SetCommandEvents(bool commandEvents); - - /// Get whether command events are sent to the container. (Scintilla feature 2718) - bool GetCommandEvents(); - - /// Change internal focus flag. (Scintilla feature 2380) - void SetFocus(bool focus); - - /// Get internal focus flag. (Scintilla feature 2381) - bool GetFocus(); - - /// Change error status - 0 = OK. (Scintilla feature 2382) - void SetStatus(Status status); - - /// Get error status. (Scintilla feature 2383) - Status GetStatus(); - - /// Set whether the mouse is captured when its button is pressed. (Scintilla feature 2384) - void SetMouseDownCaptures(bool captures); - - /// Get whether mouse gets captured. (Scintilla feature 2385) - bool GetMouseDownCaptures(); - - /// Set whether the mouse wheel can be active outside the window. (Scintilla feature 2696) - void SetMouseWheelCaptures(bool captures); - - /// Get whether mouse wheel can be active outside the window. (Scintilla feature 2697) - bool GetMouseWheelCaptures(); - - /// Sets the cursor to one of the SC_CURSOR* values. (Scintilla feature 2386) - void SetCursor(CursorShape cursorType); - - /// Get cursor type. (Scintilla feature 2387) - CursorShape GetCursor(); - - /// - /// Change the way control characters are displayed: - /// If symbol is < 32, keep the drawn way, else, use the given character. - /// (Scintilla feature 2388) - /// - void SetControlCharSymbol(int symbol); - - /// Get the way control characters are displayed. (Scintilla feature 2389) - int GetControlCharSymbol(); - - /// Move to the previous change in capitalisation. (Scintilla feature 2390) - void WordPartLeft(); - - /// - /// Move to the previous change in capitalisation extending selection - /// to new caret position. - /// (Scintilla feature 2391) - /// - void WordPartLeftExtend(); - - /// Move to the change next in capitalisation. (Scintilla feature 2392) - void WordPartRight(); - - /// - /// Move to the next change in capitalisation extending selection - /// to new caret position. - /// (Scintilla feature 2393) - /// - void WordPartRightExtend(); - - /// - /// Set the way the display area is determined when a particular line - /// is to be moved to by Find, FindNext, GotoLine, etc. - /// (Scintilla feature 2394) - /// - void SetVisiblePolicy(VisiblePolicy visiblePolicy, int visibleSlop); - - /// Delete back from the current position to the start of the line. (Scintilla feature 2395) - void DelLineLeft(); - - /// Delete forwards from the current position to the end of the line. (Scintilla feature 2396) - void DelLineRight(); - - /// Set the xOffset (ie, horizontal scroll position). (Scintilla feature 2397) - void SetXOffset(int xOffset); - - /// Get the xOffset (ie, horizontal scroll position). (Scintilla feature 2398) - int GetXOffset(); - - /// Set the last x chosen value to be the caret x position. (Scintilla feature 2399) - void ChooseCaretX(); - - /// Set the focus to this Scintilla widget. (Scintilla feature 2400) - void GrabFocus(); - - /// - /// Set the way the caret is kept visible when going sideways. - /// The exclusion zone is given in pixels. - /// (Scintilla feature 2402) - /// - void SetXCaretPolicy(CaretPolicy caretPolicy, int caretSlop); - - /// - /// Set the way the line the caret is on is kept visible. - /// The exclusion zone is given in lines. - /// (Scintilla feature 2403) - /// - void SetYCaretPolicy(CaretPolicy caretPolicy, int caretSlop); - - /// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). (Scintilla feature 2406) - void SetPrintWrapMode(Wrap wrapMode); - - /// Is printing line wrapped? (Scintilla feature 2407) - Wrap GetPrintWrapMode(); - - /// Set a fore colour for active hotspots. (Scintilla feature 2410) - void SetHotspotActiveFore(bool useSetting, Colour fore); - - /// Get the fore colour for active hotspots. (Scintilla feature 2494) - Colour GetHotspotActiveFore(); - - /// Set a back colour for active hotspots. (Scintilla feature 2411) - void SetHotspotActiveBack(bool useSetting, Colour back); - - /// Get the back colour for active hotspots. (Scintilla feature 2495) - Colour GetHotspotActiveBack(); - - /// Enable / Disable underlining active hotspots. (Scintilla feature 2412) - void SetHotspotActiveUnderline(bool underline); - - /// Get whether underlining for active hotspots. (Scintilla feature 2496) - bool GetHotspotActiveUnderline(); - - /// Limit hotspots to single line so hotspots on two lines don't merge. (Scintilla feature 2421) - void SetHotspotSingleLine(bool singleLine); - - /// Get the HotspotSingleLine property (Scintilla feature 2497) - bool GetHotspotSingleLine(); - - /// Move caret down one paragraph (delimited by empty lines). (Scintilla feature 2413) - void ParaDown(); - - /// Extend selection down one paragraph (delimited by empty lines). (Scintilla feature 2414) - void ParaDownExtend(); - - /// Move caret up one paragraph (delimited by empty lines). (Scintilla feature 2415) - void ParaUp(); - - /// Extend selection up one paragraph (delimited by empty lines). (Scintilla feature 2416) - void ParaUpExtend(); - - /// - /// Given a valid document position, return the previous position taking code - /// page into account. Returns 0 if passed 0. - /// (Scintilla feature 2417) - /// - int PositionBefore(int pos); - - /// - /// Given a valid document position, return the next position taking code - /// page into account. Maximum value returned is the last position in the document. - /// (Scintilla feature 2418) - /// - int PositionAfter(int pos); - - /// - /// Given a valid document position, return a position that differs in a number - /// of characters. Returned value is always between 0 and last position in document. - /// (Scintilla feature 2670) - /// - int PositionRelative(int pos, int relative); - - /// - /// Given a valid document position, return a position that differs in a number - /// of UTF-16 code units. Returned value is always between 0 and last position in document. - /// The result may point half way (2 bytes) inside a non-BMP character. - /// (Scintilla feature 2716) - /// - int PositionRelativeCodeUnits(int pos, int relative); - - /// Copy a range of text to the clipboard. Positions are clipped into the document. (Scintilla feature 2419) - void CopyRange(int start, int end); - - /// Copy argument text to the clipboard. (Scintilla feature 2420) - unsafe void CopyText(int length, string text); - - /// - /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or - /// by lines (SC_SEL_LINES). - /// (Scintilla feature 2422) - /// - void SetSelectionMode(SelectionMode selectionMode); - - /// Get the mode of the current selection. (Scintilla feature 2423) - SelectionMode GetSelectionMode(); - - /// Get whether or not regular caret moves will extend or reduce the selection. (Scintilla feature 2706) - bool GetMoveExtendsSelection(); - - /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2424) - int GetLineSelStartPosition(int line); - - /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2425) - int GetLineSelEndPosition(int line); - - /// Move caret down one line, extending rectangular selection to new caret position. (Scintilla feature 2426) - void LineDownRectExtend(); - - /// Move caret up one line, extending rectangular selection to new caret position. (Scintilla feature 2427) - void LineUpRectExtend(); - - /// Move caret left one character, extending rectangular selection to new caret position. (Scintilla feature 2428) - void CharLeftRectExtend(); - - /// Move caret right one character, extending rectangular selection to new caret position. (Scintilla feature 2429) - void CharRightRectExtend(); - - /// Move caret to first position on line, extending rectangular selection to new caret position. (Scintilla feature 2430) - void HomeRectExtend(); - - /// - /// Move caret to before first visible character on line. - /// If already there move to first character on line. - /// In either case, extend rectangular selection to new caret position. - /// (Scintilla feature 2431) - /// - void VCHomeRectExtend(); - - /// Move caret to last position on line, extending rectangular selection to new caret position. (Scintilla feature 2432) - void LineEndRectExtend(); - - /// Move caret one page up, extending rectangular selection to new caret position. (Scintilla feature 2433) - void PageUpRectExtend(); - - /// Move caret one page down, extending rectangular selection to new caret position. (Scintilla feature 2434) - void PageDownRectExtend(); - - /// Move caret to top of page, or one page up if already at top of page. (Scintilla feature 2435) - void StutteredPageUp(); - - /// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. (Scintilla feature 2436) - void StutteredPageUpExtend(); - - /// Move caret to bottom of page, or one page down if already at bottom of page. (Scintilla feature 2437) - void StutteredPageDown(); - - /// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. (Scintilla feature 2438) - void StutteredPageDownExtend(); - - /// Move caret left one word, position cursor at end of word. (Scintilla feature 2439) - void WordLeftEnd(); - - /// Move caret left one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2440) - void WordLeftEndExtend(); - - /// Move caret right one word, position cursor at end of word. (Scintilla feature 2441) - void WordRightEnd(); - - /// Move caret right one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2442) - void WordRightEndExtend(); - - /// - /// Set the set of characters making up whitespace for when moving or selecting by word. - /// Should be called after SetWordChars. - /// (Scintilla feature 2443) - /// - unsafe void SetWhitespaceChars(string characters); - - /// Get the set of characters making up whitespace for when moving or selecting by word. (Scintilla feature 2647) - unsafe string GetWhitespaceChars(); - - /// - /// Set the set of characters making up punctuation characters - /// Should be called after SetWordChars. - /// (Scintilla feature 2648) - /// - unsafe void SetPunctuationChars(string characters); - - /// Get the set of characters making up punctuation characters (Scintilla feature 2649) - unsafe string GetPunctuationChars(); - - /// Reset the set of characters for whitespace and word characters to the defaults. (Scintilla feature 2444) - void SetCharsDefault(); - - /// Get currently selected item position in the auto-completion list (Scintilla feature 2445) - int AutoCGetCurrent(); - - /// - /// Get currently selected item text in the auto-completion list - /// Returns the length of the item text - /// Result is NUL-terminated. - /// (Scintilla feature 2610) - /// - unsafe string AutoCGetCurrentText(); - - /// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. (Scintilla feature 2634) - void AutoCSetCaseInsensitiveBehaviour(CaseInsensitiveBehaviour behaviour); - - /// Get auto-completion case insensitive behaviour. (Scintilla feature 2635) - CaseInsensitiveBehaviour AutoCGetCaseInsensitiveBehaviour(); - - /// Change the effect of autocompleting when there are multiple selections. (Scintilla feature 2636) - void AutoCSetMulti(MultiAutoComplete multi); - - /// Retrieve the effect of autocompleting when there are multiple selections. (Scintilla feature 2637) - MultiAutoComplete AutoCGetMulti(); - - /// Set the way autocompletion lists are ordered. (Scintilla feature 2660) - void AutoCSetOrder(Ordering order); - - /// Get the way autocompletion lists are ordered. (Scintilla feature 2661) - Ordering AutoCGetOrder(); - - /// Enlarge the document to a particular size of text bytes. (Scintilla feature 2446) - void Allocate(int bytes); - - /// - /// Returns the target converted to UTF8. - /// Return the length in bytes. - /// (Scintilla feature 2447) - /// - unsafe string TargetAsUTF8(); - - /// - /// Set the length of the utf8 argument for calling EncodedFromUTF8. - /// Set to -1 and the string will be measured to the first nul. - /// (Scintilla feature 2448) - /// - void SetLengthForEncode(int bytes); - - /// - /// Translates a UTF8 string into the document encoding. - /// Return the length of the result in bytes. - /// On error return 0. - /// (Scintilla feature 2449) - /// - unsafe string EncodedFromUTF8(string utf8); - - /// - /// Find the position of a column on a line taking into account tabs and - /// multi-byte characters. If beyond end of line, return line end position. - /// (Scintilla feature 2456) - /// - int FindColumn(int line, int column); - - /// Can the caret preferred x position only be changed by explicit movement commands? (Scintilla feature 2457) - CaretSticky GetCaretSticky(); - - /// Stop the caret preferred x position changing when the user types. (Scintilla feature 2458) - void SetCaretSticky(CaretSticky useCaretStickyBehaviour); - - /// Switch between sticky and non-sticky: meant to be bound to a key. (Scintilla feature 2459) - void ToggleCaretSticky(); - - /// Enable/Disable convert-on-paste for line endings (Scintilla feature 2467) - void SetPasteConvertEndings(bool convert); - - /// Get convert-on-paste setting (Scintilla feature 2468) - bool GetPasteConvertEndings(); - - /// Duplicate the selection. If selection empty duplicate the line containing the caret. (Scintilla feature 2469) - void SelectionDuplicate(); - - /// Set background alpha of the caret line. (Scintilla feature 2470) - void SetCaretLineBackAlpha(Alpha alpha); - - /// Get the background alpha of the caret line. (Scintilla feature 2471) - Alpha GetCaretLineBackAlpha(); - - /// Set the style of the caret to be drawn. (Scintilla feature 2512) - void SetCaretStyle(CaretStyle caretStyle); - - /// Returns the current style of the caret. (Scintilla feature 2513) - CaretStyle GetCaretStyle(); - - /// Set the indicator used for IndicatorFillRange and IndicatorClearRange (Scintilla feature 2500) - void SetIndicatorCurrent(int indicator); - - /// Get the current indicator (Scintilla feature 2501) - int GetIndicatorCurrent(); - - /// Set the value used for IndicatorFillRange (Scintilla feature 2502) - void SetIndicatorValue(int value); - - /// Get the current indicator value (Scintilla feature 2503) - int GetIndicatorValue(); - - /// Turn a indicator on over a range. (Scintilla feature 2504) - void IndicatorFillRange(int start, int lengthFill); - - /// Turn a indicator off over a range. (Scintilla feature 2505) - void IndicatorClearRange(int start, int lengthClear); - - /// Are any indicators present at pos? (Scintilla feature 2506) - int IndicatorAllOnFor(int pos); - - /// What value does a particular indicator have at a position? (Scintilla feature 2507) - int IndicatorValueAt(int indicator, int pos); - - /// Where does a particular indicator start? (Scintilla feature 2508) - int IndicatorStart(int indicator, int pos); - - /// Where does a particular indicator end? (Scintilla feature 2509) - int IndicatorEnd(int indicator, int pos); - - /// Set number of entries in position cache (Scintilla feature 2514) - void SetPositionCache(int size); - - /// How many entries are allocated to the position cache? (Scintilla feature 2515) - int GetPositionCache(); - - /// Copy the selection, if selection empty copy the line with the caret (Scintilla feature 2519) - void CopyAllowLine(); - - /// - /// Compact the document buffer and return a read-only pointer to the - /// characters in the document. - /// (Scintilla feature 2520) - /// - IntPtr GetCharacterPointer(); - - /// - /// Return a read-only pointer to a range of characters in the document. - /// May move the gap so that the range is contiguous, but will only move up - /// to lengthRange bytes. - /// (Scintilla feature 2643) - /// - IntPtr GetRangePointer(int start, int lengthRange); - - /// - /// Return a position which, to avoid performance costs, should not be within - /// the range of a call to GetRangePointer. - /// (Scintilla feature 2644) - /// - int GetGapPosition(); - - /// Set the alpha fill colour of the given indicator. (Scintilla feature 2523) - void IndicSetAlpha(int indicator, Alpha alpha); - - /// Get the alpha fill colour of the given indicator. (Scintilla feature 2524) - Alpha IndicGetAlpha(int indicator); - - /// Set the alpha outline colour of the given indicator. (Scintilla feature 2558) - void IndicSetOutlineAlpha(int indicator, Alpha alpha); - - /// Get the alpha outline colour of the given indicator. (Scintilla feature 2559) - Alpha IndicGetOutlineAlpha(int indicator); - - /// Set extra ascent for each line (Scintilla feature 2525) - void SetExtraAscent(int extraAscent); - - /// Get extra ascent for each line (Scintilla feature 2526) - int GetExtraAscent(); - - /// Set extra descent for each line (Scintilla feature 2527) - void SetExtraDescent(int extraDescent); - - /// Get extra descent for each line (Scintilla feature 2528) - int GetExtraDescent(); - - /// Which symbol was defined for markerNumber with MarkerDefine (Scintilla feature 2529) - int MarkerSymbolDefined(int markerNumber); - - /// Set the text in the text margin for a line (Scintilla feature 2530) - unsafe void MarginSetText(int line, string text); - - /// Get the text in the text margin for a line (Scintilla feature 2531) - unsafe string MarginGetText(int line); - - /// Set the style number for the text margin for a line (Scintilla feature 2532) - void MarginSetStyle(int line, int style); - - /// Get the style number for the text margin for a line (Scintilla feature 2533) - int MarginGetStyle(int line); - - /// Set the style in the text margin for a line (Scintilla feature 2534) - unsafe void MarginSetStyles(int line, string styles); - - /// Get the styles in the text margin for a line (Scintilla feature 2535) - unsafe string MarginGetStyles(int line); - - /// Clear the margin text on all lines (Scintilla feature 2536) - void MarginTextClearAll(); - - /// Get the start of the range of style numbers used for margin text (Scintilla feature 2537) - void MarginSetStyleOffset(int style); - - /// Get the start of the range of style numbers used for margin text (Scintilla feature 2538) - int MarginGetStyleOffset(); - - /// Set the margin options. (Scintilla feature 2539) - void SetMarginOptions(MarginOption marginOptions); - - /// Get the margin options. (Scintilla feature 2557) - MarginOption GetMarginOptions(); - - /// Set the annotation text for a line (Scintilla feature 2540) - unsafe void AnnotationSetText(int line, string text); - - /// Get the annotation text for a line (Scintilla feature 2541) - unsafe string AnnotationGetText(int line); - - /// Set the style number for the annotations for a line (Scintilla feature 2542) - void AnnotationSetStyle(int line, int style); - - /// Get the style number for the annotations for a line (Scintilla feature 2543) - int AnnotationGetStyle(int line); - - /// Set the annotation styles for a line (Scintilla feature 2544) - unsafe void AnnotationSetStyles(int line, string styles); - - /// Get the annotation styles for a line (Scintilla feature 2545) - unsafe string AnnotationGetStyles(int line); - - /// Get the number of annotation lines for a line (Scintilla feature 2546) - int AnnotationGetLines(int line); - - /// Clear the annotations from all lines (Scintilla feature 2547) - void AnnotationClearAll(); - - /// Set the visibility for the annotations for a view (Scintilla feature 2548) - void AnnotationSetVisible(AnnotationVisible visible); - - /// Get the visibility for the annotations for a view (Scintilla feature 2549) - AnnotationVisible AnnotationGetVisible(); - - /// Get the start of the range of style numbers used for annotations (Scintilla feature 2550) - void AnnotationSetStyleOffset(int style); - - /// Get the start of the range of style numbers used for annotations (Scintilla feature 2551) - int AnnotationGetStyleOffset(); - - /// Release all extended (>255) style numbers (Scintilla feature 2552) - void ReleaseAllExtendedStyles(); - - /// Allocate some extended (>255) style numbers and return the start of the range (Scintilla feature 2553) - int AllocateExtendedStyles(int numberStyles); - - /// Add a container action to the undo stack (Scintilla feature 2560) - void AddUndoAction(int token, UndoFlags flags); - - /// Find the position of a character from a point within the window. (Scintilla feature 2561) - int CharPositionFromPoint(int x, int y); - - /// - /// Find the position of a character from a point within the window. - /// Return INVALID_POSITION if not close to text. - /// (Scintilla feature 2562) - /// - int CharPositionFromPointClose(int x, int y); - - /// Set whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2668) - void SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch); - - /// Whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2669) - bool GetMouseSelectionRectangularSwitch(); - - /// Set whether multiple selections can be made (Scintilla feature 2563) - void SetMultipleSelection(bool multipleSelection); - - /// Whether multiple selections can be made (Scintilla feature 2564) - bool GetMultipleSelection(); - - /// Set whether typing can be performed into multiple selections (Scintilla feature 2565) - void SetAdditionalSelectionTyping(bool additionalSelectionTyping); - - /// Whether typing can be performed into multiple selections (Scintilla feature 2566) - bool GetAdditionalSelectionTyping(); - - /// Set whether additional carets will blink (Scintilla feature 2567) - void SetAdditionalCaretsBlink(bool additionalCaretsBlink); - - /// Whether additional carets will blink (Scintilla feature 2568) - bool GetAdditionalCaretsBlink(); - - /// Set whether additional carets are visible (Scintilla feature 2608) - void SetAdditionalCaretsVisible(bool additionalCaretsVisible); - - /// Whether additional carets are visible (Scintilla feature 2609) - bool GetAdditionalCaretsVisible(); - - /// How many selections are there? (Scintilla feature 2570) - int GetSelections(); - - /// Is every selected range empty? (Scintilla feature 2650) - bool GetSelectionEmpty(); - - /// Clear selections to a single empty stream selection (Scintilla feature 2571) - void ClearSelections(); - - /// Set a simple selection (Scintilla feature 2572) - void SetSelection(int caret, int anchor); - - /// Add a selection (Scintilla feature 2573) - void AddSelection(int caret, int anchor); - - /// Drop one selection (Scintilla feature 2671) - void DropSelectionN(int selection); - - /// Set the main selection (Scintilla feature 2574) - void SetMainSelection(int selection); - - /// Which selection is the main selection (Scintilla feature 2575) - int GetMainSelection(); - - /// Set the caret position of the nth selection. (Scintilla feature 2576) - void SetSelectionNCaret(int selection, int caret); - - /// Return the caret position of the nth selection. (Scintilla feature 2577) - int GetSelectionNCaret(int selection); - - /// Set the anchor position of the nth selection. (Scintilla feature 2578) - void SetSelectionNAnchor(int selection, int anchor); - - /// Return the anchor position of the nth selection. (Scintilla feature 2579) - int GetSelectionNAnchor(int selection); - - /// Set the virtual space of the caret of the nth selection. (Scintilla feature 2580) - void SetSelectionNCaretVirtualSpace(int selection, int space); - - /// Return the virtual space of the caret of the nth selection. (Scintilla feature 2581) - int GetSelectionNCaretVirtualSpace(int selection); - - /// Set the virtual space of the anchor of the nth selection. (Scintilla feature 2582) - void SetSelectionNAnchorVirtualSpace(int selection, int space); - - /// Return the virtual space of the anchor of the nth selection. (Scintilla feature 2583) - int GetSelectionNAnchorVirtualSpace(int selection); - - /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2584) - void SetSelectionNStart(int selection, int anchor); - - /// Returns the position at the start of the selection. (Scintilla feature 2585) - int GetSelectionNStart(int selection); - - /// Sets the position that ends the selection - this becomes the currentPosition. (Scintilla feature 2586) - void SetSelectionNEnd(int selection, int caret); - - /// Returns the position at the end of the selection. (Scintilla feature 2587) - int GetSelectionNEnd(int selection); - - /// Set the caret position of the rectangular selection. (Scintilla feature 2588) - void SetRectangularSelectionCaret(int caret); - - /// Return the caret position of the rectangular selection. (Scintilla feature 2589) - int GetRectangularSelectionCaret(); - - /// Set the anchor position of the rectangular selection. (Scintilla feature 2590) - void SetRectangularSelectionAnchor(int anchor); - - /// Return the anchor position of the rectangular selection. (Scintilla feature 2591) - int GetRectangularSelectionAnchor(); - - /// Set the virtual space of the caret of the rectangular selection. (Scintilla feature 2592) - void SetRectangularSelectionCaretVirtualSpace(int space); - - /// Return the virtual space of the caret of the rectangular selection. (Scintilla feature 2593) - int GetRectangularSelectionCaretVirtualSpace(); - - /// Set the virtual space of the anchor of the rectangular selection. (Scintilla feature 2594) - void SetRectangularSelectionAnchorVirtualSpace(int space); - - /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature 2595) - int GetRectangularSelectionAnchorVirtualSpace(); - - /// Set options for virtual space behaviour. (Scintilla feature 2596) - void SetVirtualSpaceOptions(VirtualSpace virtualSpaceOptions); - - /// Return options for virtual space behaviour. (Scintilla feature 2597) - VirtualSpace GetVirtualSpaceOptions(); - - /// - /// On GTK, allow selecting the modifier key to use for mouse-based - /// rectangular selection. Often the window manager requires Alt+Mouse Drag - /// for moving windows. - /// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. - /// (Scintilla feature 2598) - /// - void SetRectangularSelectionModifier(int modifier); - - /// Get the modifier key used for rectangular selection. (Scintilla feature 2599) - int GetRectangularSelectionModifier(); - - /// - /// Set the foreground colour of additional selections. - /// Must have previously called SetSelFore with non-zero first argument for this to have an effect. - /// (Scintilla feature 2600) - /// - void SetAdditionalSelFore(Colour fore); - - /// - /// Set the background colour of additional selections. - /// Must have previously called SetSelBack with non-zero first argument for this to have an effect. - /// (Scintilla feature 2601) - /// - void SetAdditionalSelBack(Colour back); - - /// Set the alpha of the selection. (Scintilla feature 2602) - void SetAdditionalSelAlpha(Alpha alpha); - - /// Get the alpha of the selection. (Scintilla feature 2603) - Alpha GetAdditionalSelAlpha(); - - /// Set the foreground colour of additional carets. (Scintilla feature 2604) - void SetAdditionalCaretFore(Colour fore); - - /// Get the foreground colour of additional carets. (Scintilla feature 2605) - Colour GetAdditionalCaretFore(); - - /// Set the main selection to the next selection. (Scintilla feature 2606) - void RotateSelection(); - - /// Swap that caret and anchor of the main selection. (Scintilla feature 2607) - void SwapMainAnchorCaret(); - - /// - /// Add the next occurrence of the main selection to the set of selections as main. - /// If the current selection is empty then select word around caret. - /// (Scintilla feature 2688) - /// - void MultipleSelectAddNext(); - - /// - /// Add each occurrence of the main selection in the target to the set of selections. - /// If the current selection is empty then select word around caret. - /// (Scintilla feature 2689) - /// - void MultipleSelectAddEach(); - - /// - /// Indicate that the internal state of a lexer has changed over a range and therefore - /// there may be a need to redraw. - /// (Scintilla feature 2617) - /// - int ChangeLexerState(int start, int end); - - /// - /// Find the next line at or after lineStart that is a contracted fold header line. - /// Return -1 when no more lines. - /// (Scintilla feature 2618) - /// - int ContractedFoldNext(int lineStart); - - /// Centre current line in window. (Scintilla feature 2619) - void VerticalCentreCaret(); - - /// Move the selected lines up one line, shifting the line above after the selection (Scintilla feature 2620) - void MoveSelectedLinesUp(); - - /// Move the selected lines down one line, shifting the line below before the selection (Scintilla feature 2621) - void MoveSelectedLinesDown(); - - /// Set the identifier reported as idFrom in notification messages. (Scintilla feature 2622) - void SetIdentifier(int identifier); - - /// Get the identifier. (Scintilla feature 2623) - int GetIdentifier(); - - /// Set the width for future RGBA image data. (Scintilla feature 2624) - void RGBAImageSetWidth(int width); - - /// Set the height for future RGBA image data. (Scintilla feature 2625) - void RGBAImageSetHeight(int height); - - /// Set the scale factor in percent for future RGBA image data. (Scintilla feature 2651) - void RGBAImageSetScale(int scalePercent); - - /// - /// Define a marker from RGBA data. - /// It has the width and height from RGBAImageSetWidth/Height - /// (Scintilla feature 2626) - /// - unsafe void MarkerDefineRGBAImage(int markerNumber, string pixels); - - /// - /// Register an RGBA image for use in autocompletion lists. - /// It has the width and height from RGBAImageSetWidth/Height - /// (Scintilla feature 2627) - /// - unsafe void RegisterRGBAImage(int type, string pixels); - - /// Scroll to start of document. (Scintilla feature 2628) - void ScrollToStart(); - - /// Scroll to end of document. (Scintilla feature 2629) - void ScrollToEnd(); - - /// Set the technology used. (Scintilla feature 2630) - void SetTechnology(Technology technology); - - /// Get the tech. (Scintilla feature 2631) - Technology GetTechnology(); - - /// Create an ILoader*. (Scintilla feature 2632) - IntPtr CreateLoader(int bytes, DocumentOption documentOptions); - - /// On OS X, show a find indicator. (Scintilla feature 2640) - void FindIndicatorShow(int start, int end); - - /// On OS X, flash a find indicator, then fade out. (Scintilla feature 2641) - void FindIndicatorFlash(int start, int end); - - /// On OS X, hide the find indicator. (Scintilla feature 2642) - void FindIndicatorHide(); - - /// - /// Move caret to before first visible character on display line. - /// If already there move to first character on display line. - /// (Scintilla feature 2652) - /// - void VCHomeDisplay(); - - /// Like VCHomeDisplay but extending selection to new caret position. (Scintilla feature 2653) - void VCHomeDisplayExtend(); - - /// Is the caret line always visible? (Scintilla feature 2654) - bool GetCaretLineVisibleAlways(); - - /// Sets the caret line to always visible. (Scintilla feature 2655) - void SetCaretLineVisibleAlways(bool alwaysVisible); - - /// Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. (Scintilla feature 2656) - void SetLineEndTypesAllowed(LineEndType lineEndBitSet); - - /// Get the line end types currently allowed. (Scintilla feature 2657) - LineEndType GetLineEndTypesAllowed(); - - /// Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. (Scintilla feature 2658) - LineEndType GetLineEndTypesActive(); - - /// Set the way a character is drawn. (Scintilla feature 2665) - unsafe void SetRepresentation(string encodedCharacter, string representation); - - /// - /// Set the way a character is drawn. - /// Result is NUL-terminated. - /// (Scintilla feature 2666) - /// - unsafe string GetRepresentation(string encodedCharacter); - - /// Remove a character representation. (Scintilla feature 2667) - unsafe void ClearRepresentation(string encodedCharacter); - - /// Start notifying the container of all key presses and commands. (Scintilla feature 3001) - void StartRecord(); - - /// Stop notifying the container of all key presses and commands. (Scintilla feature 3002) - void StopRecord(); - - /// Set the lexing language of the document. (Scintilla feature 4001) - void SetLexer(int lexer); - - /// Retrieve the lexing language of the document. (Scintilla feature 4002) - int GetLexer(); - - /// Colourise a segment of the document using the current lexing language. (Scintilla feature 4003) - void Colourise(int start, int end); - - /// Set up a value that may be used by a lexer for some optional feature. (Scintilla feature 4004) - unsafe void SetProperty(string key, string value); - - /// Set up the key words used by the lexer. (Scintilla feature 4005) - unsafe void SetKeyWords(int keyWordSet, string keyWords); - - /// Set the lexing language of the document based on string name. (Scintilla feature 4006) - unsafe void SetLexerLanguage(string language); - - /// Load a lexer library (dll / so). (Scintilla feature 4007) - unsafe void LoadLexerLibrary(string path); - - /// - /// Retrieve a "property" value previously set with SetProperty. - /// Result is NUL-terminated. - /// (Scintilla feature 4008) - /// - unsafe string GetProperty(string key); - - /// - /// Retrieve a "property" value previously set with SetProperty, - /// with "$()" variable replacement on returned buffer. - /// Result is NUL-terminated. - /// (Scintilla feature 4009) - /// - unsafe string GetPropertyExpanded(string key); - - /// - /// Retrieve a "property" value previously set with SetProperty, - /// interpreted as an int AFTER any "$()" variable replacement. - /// (Scintilla feature 4010) - /// - unsafe int GetPropertyInt(string key, int defaultValue); - - /// - /// Retrieve the name of the lexer. - /// Return the length of the text. - /// Result is NUL-terminated. - /// (Scintilla feature 4012) - /// - unsafe string GetLexerLanguage(); - - /// For private communication between an application and a known lexer. (Scintilla feature 4013) - IntPtr PrivateLexerCall(int operation, IntPtr pointer); - - /// - /// Retrieve a '\n' separated list of properties understood by the current lexer. - /// Result is NUL-terminated. - /// (Scintilla feature 4014) - /// - unsafe string PropertyNames(); - - /// Retrieve the type of a property. (Scintilla feature 4015) - unsafe TypeProperty PropertyType(string name); - - /// - /// Describe a property. - /// Result is NUL-terminated. - /// (Scintilla feature 4016) - /// - unsafe string DescribeProperty(string name); - - /// - /// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. - /// Result is NUL-terminated. - /// (Scintilla feature 4017) - /// - unsafe string DescribeKeyWordSets(); - - /// - /// Bit set of LineEndType enumertion for which line ends beyond the standard - /// LF, CR, and CRLF are supported by the lexer. - /// (Scintilla feature 4018) - /// - int GetLineEndTypesSupported(); - - /// Allocate a set of sub styles for a particular base style, returning start of range (Scintilla feature 4020) - int AllocateSubStyles(int styleBase, int numberStyles); - - /// The starting style number for the sub styles associated with a base style (Scintilla feature 4021) - int GetSubStylesStart(int styleBase); - - /// The number of sub styles associated with a base style (Scintilla feature 4022) - int GetSubStylesLength(int styleBase); - - /// For a sub style, return the base style, else return the argument. (Scintilla feature 4027) - int GetStyleFromSubStyle(int subStyle); - - /// For a secondary style, return the primary style, else return the argument. (Scintilla feature 4028) - int GetPrimaryStyleFromStyle(int style); - - /// Free allocated sub styles (Scintilla feature 4023) - void FreeSubStyles(); - - /// Set the identifiers that are shown in a particular style (Scintilla feature 4024) - unsafe void SetIdentifiers(int style, string identifiers); - - /// - /// Where styles are duplicated by a feature such as active/inactive code - /// return the distance between the two types. - /// (Scintilla feature 4025) - /// - int DistanceToSecondaryStyles(); - - /// - /// Get the set of base styles that can be extended with sub styles - /// Result is NUL-terminated. - /// (Scintilla feature 4026) - /// - unsafe string GetSubStyleBases(); - - /// Retrieve the number of named styles for the lexer. (Scintilla feature 4029) - int GetNamedStyles(); - - /// - /// Retrieve the name of a style. - /// Result is NUL-terminated. - /// (Scintilla feature 4030) - /// - unsafe string NameOfStyle(int style); - - /// - /// Retrieve a ' ' separated list of style tags like "literal quoted string". - /// Result is NUL-terminated. - /// (Scintilla feature 4031) - /// - unsafe string TagsOfStyle(int style); - - /// - /// Retrieve a description of a style. - /// Result is NUL-terminated. - /// (Scintilla feature 4032) - /// - unsafe string DescriptionOfStyle(int style); - - /// Retrieve bidirectional text display state. (Scintilla feature 2708) - Bidirectional GetBidirectional(); - - /// Set bidirectional text display state. (Scintilla feature 2709) - void SetBidirectional(Bidirectional bidirectional); - - /// Retrieve line character index state. (Scintilla feature 2710) - LineCharacterIndexType GetLineCharacterIndex(); - - /// Request line character index be created or its use count increased. (Scintilla feature 2711) - void AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex); - - /// Decrease use count of line character index and remove if 0. (Scintilla feature 2712) - void ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex); - - /// Retrieve the document line containing a position measured in index units. (Scintilla feature 2713) - int LineFromIndexPosition(int pos, LineCharacterIndexType lineCharacterIndex); - - /// Retrieve the position measured in index units at the start of a document line. (Scintilla feature 2714) - int IndexPositionFromLine(int line, LineCharacterIndexType lineCharacterIndex); - - /// - /// Divide each styling byte into lexical class bits (default: 5) and indicator - /// bits (default: 3). If a lexer requires more than 32 lexical states, then this - /// is used to expand the possible states. - /// (Scintilla feature 2090) - /// - void SetStyleBits(int bits); - - /// Retrieve number of bits in style bytes used to hold the lexical state. (Scintilla feature 2091) - int GetStyleBits(); - - /// Retrieve the number of bits the current lexer needs for styling. (Scintilla feature 4011) - int GetStyleBitsNeeded(); - - /// - /// Deprecated in 3.5.5 - /// Always interpret keyboard input as Unicode - /// (Scintilla feature 2521) - /// - void SetKeysUnicode(bool keysUnicode); - - /// Are keys always interpreted as Unicode? (Scintilla feature 2522) - bool GetKeysUnicode(); - - /// Is drawing done in two phases with backgrounds drawn before foregrounds? (Scintilla feature 2283) - bool GetTwoPhaseDraw(); - - /// - /// In twoPhaseDraw mode, drawing is performed in two phases, first the background - /// and then the foreground. This avoids chopping off characters that overlap the next run. - /// (Scintilla feature 2284) - /// - void SetTwoPhaseDraw(bool twoPhase); - - /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System; +using static Kbg.NppPluginNET.PluginInfrastructure.Win32; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + + /// + /// This it the plugin-writers primary interface to Notepad++/Scintilla. + /// It takes away all the complexity with command numbers and Int-pointer casting. + /// + /// See http://www.scintilla.org/ScintillaDoc.html for further details. + /// + public interface IScintillaGateway + { + int GetSelectionLength(); + void AppendTextAndMoveCursor(string text); + void InsertTextAndMoveCursor(string text); + void SelectCurrentLine(); + void ClearSelectionToCursor(); + + /// + /// Get the current line from the current position + /// + int GetCurrentLineNumber(); + + /// + /// Get the scroll information for the current Scintilla window. + /// + /// Arguments for the scroll information such as tracking + /// Which scroll bar information are you looking for + /// A ScrollInfo struct with information of the current scroll state + ScrollInfo GetScrollInfo(ScrollInfoMask mask = ScrollInfoMask.SIF_ALL, ScrollInfoBar scrollBar = ScrollInfoBar.SB_BOTH); + + /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ + /// Add text to the document at current position. (Scintilla feature 2001) + unsafe void AddText(int length, string text); + + /// Add array of cells to document. (Scintilla feature 2002) + unsafe void AddStyledText(int length, Cells c); + + /// Insert string at a position. (Scintilla feature 2003) + unsafe void InsertText(int pos, string text); + + /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK (Scintilla feature 2672) + unsafe void ChangeInsertion(int length, string text); + + /// Delete all text in the document. (Scintilla feature 2004) + void ClearAll(); + + /// Delete a range of text in the document. (Scintilla feature 2645) + void DeleteRange(int start, int lengthDelete); + + /// Set all style bytes to 0, remove all folding information. (Scintilla feature 2005) + void ClearDocumentStyle(); + + /// Returns the number of bytes in the document. (Scintilla feature 2006) + int GetLength(); + + /// Returns the character byte at the position. (Scintilla feature 2007) + int GetCharAt(int pos); + + /// Returns the position of the caret. (Scintilla feature 2008) + int GetCurrentPos(); + + /// Returns the position of the opposite end of the selection to the caret. (Scintilla feature 2009) + int GetAnchor(); + + /// Returns the style byte at the position. (Scintilla feature 2010) + int GetStyleAt(int pos); + + /// Redoes the next action on the undo history. (Scintilla feature 2011) + void Redo(); + + /// + /// Choose between collecting actions into the undo + /// history and discarding them. + /// (Scintilla feature 2012) + /// + void SetUndoCollection(bool collectUndo); + + /// Select all the text in the document. (Scintilla feature 2013) + void SelectAll(); + + /// + /// Remember the current position in the undo history as the position + /// at which the document was saved. + /// (Scintilla feature 2014) + /// + void SetSavePoint(); + + /// + /// Retrieve a buffer of cells. + /// Returns the number of bytes in the buffer not including terminating NULs. + /// (Scintilla feature 2015) + /// + int GetStyledText(TextRange tr); + + /// Are there any redoable actions in the undo history? (Scintilla feature 2016) + bool CanRedo(); + + /// Retrieve the line number at which a particular marker is located. (Scintilla feature 2017) + int MarkerLineFromHandle(int markerHandle); + + /// Delete a marker. (Scintilla feature 2018) + void MarkerDeleteHandle(int markerHandle); + + /// Is undo history being collected? (Scintilla feature 2019) + bool GetUndoCollection(); + + /// + /// Are white space characters currently visible? + /// Returns one of SCWS_* constants. + /// (Scintilla feature 2020) + /// + WhiteSpace GetViewWS(); + + /// Make white space characters invisible, always visible or visible outside indentation. (Scintilla feature 2021) + void SetViewWS(WhiteSpace viewWS); + + /// + /// Retrieve the current tab draw mode. + /// Returns one of SCTD_* constants. + /// (Scintilla feature 2698) + /// + TabDrawMode GetTabDrawMode(); + + /// Set how tabs are drawn when visible. (Scintilla feature 2699) + void SetTabDrawMode(TabDrawMode tabDrawMode); + + /// Find the position from a point within the window. (Scintilla feature 2022) + int PositionFromPoint(int x, int y); + + /// + /// Find the position from a point within the window but return + /// INVALID_POSITION if not close to text. + /// (Scintilla feature 2023) + /// + int PositionFromPointClose(int x, int y); + + /// Set caret to start of a line and ensure it is visible. (Scintilla feature 2024) + void GotoLine(int line); + + /// Set caret to a position and ensure it is visible. (Scintilla feature 2025) + void GotoPos(int caret); + + /// + /// Set the selection anchor to a position. The anchor is the opposite + /// end of the selection from the caret. + /// (Scintilla feature 2026) + /// + void SetAnchor(int anchor); + + /// + /// Retrieve the text of the line containing the caret. + /// Returns the index of the caret on the line. + /// Result is NUL-terminated. + /// (Scintilla feature 2027) + /// + unsafe string GetCurLine(int length); + + /// Retrieve the position of the last correctly styled character. (Scintilla feature 2028) + int GetEndStyled(); + + /// Convert all line endings in the document to one mode. (Scintilla feature 2029) + void ConvertEOLs(EndOfLine eolMode); + + /// Retrieve the current end of line mode - one of CRLF, CR, or LF. (Scintilla feature 2030) + EndOfLine GetEOLMode(); + + /// Set the current end of line mode. (Scintilla feature 2031) + void SetEOLMode(EndOfLine eolMode); + + /// + /// Set the current styling position to start. + /// The unused parameter is no longer used and should be set to 0. + /// (Scintilla feature 2032) + /// + void StartStyling(int start, int unused); + + /// + /// Change style from current styling position for length characters to a style + /// and move the current styling position to after this newly styled segment. + /// (Scintilla feature 2033) + /// + void SetStyling(int length, int style); + + /// Is drawing done first into a buffer or direct to the screen? (Scintilla feature 2034) + bool GetBufferedDraw(); + + /// + /// If drawing is buffered then each line of text is drawn into a bitmap buffer + /// before drawing it to the screen to avoid flicker. + /// (Scintilla feature 2035) + /// + void SetBufferedDraw(bool buffered); + + /// Change the visible size of a tab to be a multiple of the width of a space character. (Scintilla feature 2036) + void SetTabWidth(int tabWidth); + + /// Retrieve the visible size of a tab. (Scintilla feature 2121) + int GetTabWidth(); + + /// Clear explicit tabstops on a line. (Scintilla feature 2675) + void ClearTabStops(int line); + + /// Add an explicit tab stop for a line. (Scintilla feature 2676) + void AddTabStop(int line, int x); + + /// Find the next explicit tab stop position on a line after a position. (Scintilla feature 2677) + int GetNextTabStop(int line, int x); + + /// + /// Set the code page used to interpret the bytes of the document as characters. + /// The SC_CP_UTF8 value can be used to enter Unicode mode. + /// (Scintilla feature 2037) + /// + void SetCodePage(int codePage); + + /// Is the IME displayed in a window or inline? (Scintilla feature 2678) + IMEInteraction GetIMEInteraction(); + + /// Choose to display the the IME in a winow or inline. (Scintilla feature 2679) + void SetIMEInteraction(IMEInteraction imeInteraction); + + /// Set the symbol used for a particular marker number. (Scintilla feature 2040) + void MarkerDefine(int markerNumber, MarkerSymbol markerSymbol); + + /// Set the foreground colour used for a particular marker number. (Scintilla feature 2041) + void MarkerSetFore(int markerNumber, Colour fore); + + /// Set the background colour used for a particular marker number. (Scintilla feature 2042) + void MarkerSetBack(int markerNumber, Colour back); + + /// Set the background colour used for a particular marker number when its folding block is selected. (Scintilla feature 2292) + void MarkerSetBackSelected(int markerNumber, Colour back); + + /// Enable/disable highlight for current folding bloc (smallest one that contains the caret) (Scintilla feature 2293) + void MarkerEnableHighlight(bool enabled); + + /// Add a marker to a line, returning an ID which can be used to find or delete the marker. (Scintilla feature 2043) + int MarkerAdd(int line, int markerNumber); + + /// Delete a marker from a line. (Scintilla feature 2044) + void MarkerDelete(int line, int markerNumber); + + /// Delete all markers with a particular number from all lines. (Scintilla feature 2045) + void MarkerDeleteAll(int markerNumber); + + /// Get a bit mask of all the markers set on a line. (Scintilla feature 2046) + int MarkerGet(int line); + + /// + /// Find the next line at or after lineStart that includes a marker in mask. + /// Return -1 when no more lines. + /// (Scintilla feature 2047) + /// + int MarkerNext(int lineStart, int markerMask); + + /// Find the previous line before lineStart that includes a marker in mask. (Scintilla feature 2048) + int MarkerPrevious(int lineStart, int markerMask); + + /// Define a marker from a pixmap. (Scintilla feature 2049) + unsafe void MarkerDefinePixmap(int markerNumber, string pixmap); + + /// Add a set of markers to a line. (Scintilla feature 2466) + void MarkerAddSet(int line, int markerSet); + + /// Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature 2476) + void MarkerSetAlpha(int markerNumber, Alpha alpha); + + /// Set a margin to be either numeric or symbolic. (Scintilla feature 2240) + void SetMarginTypeN(int margin, MarginType marginType); + + /// Retrieve the type of a margin. (Scintilla feature 2241) + MarginType GetMarginTypeN(int margin); + + /// Set the width of a margin to a width expressed in pixels. (Scintilla feature 2242) + void SetMarginWidthN(int margin, int pixelWidth); + + /// Retrieve the width of a margin in pixels. (Scintilla feature 2243) + int GetMarginWidthN(int margin); + + /// Set a mask that determines which markers are displayed in a margin. (Scintilla feature 2244) + void SetMarginMaskN(int margin, int mask); + + /// Retrieve the marker mask of a margin. (Scintilla feature 2245) + int GetMarginMaskN(int margin); + + /// Make a margin sensitive or insensitive to mouse clicks. (Scintilla feature 2246) + void SetMarginSensitiveN(int margin, bool sensitive); + + /// Retrieve the mouse click sensitivity of a margin. (Scintilla feature 2247) + bool GetMarginSensitiveN(int margin); + + /// Set the cursor shown when the mouse is inside a margin. (Scintilla feature 2248) + void SetMarginCursorN(int margin, CursorShape cursor); + + /// Retrieve the cursor shown in a margin. (Scintilla feature 2249) + CursorShape GetMarginCursorN(int margin); + + /// Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. (Scintilla feature 2250) + void SetMarginBackN(int margin, Colour back); + + /// Retrieve the background colour of a margin (Scintilla feature 2251) + Colour GetMarginBackN(int margin); + + /// Allocate a non-standard number of margins. (Scintilla feature 2252) + void SetMargins(int margins); + + /// How many margins are there?. (Scintilla feature 2253) + int GetMargins(); + + /// Clear all the styles and make equivalent to the global default style. (Scintilla feature 2050) + void StyleClearAll(); + + /// Set the foreground colour of a style. (Scintilla feature 2051) + void StyleSetFore(int style, Colour fore); + + /// Set the background colour of a style. (Scintilla feature 2052) + void StyleSetBack(int style, Colour back); + + /// Set a style to be bold or not. (Scintilla feature 2053) + void StyleSetBold(int style, bool bold); + + /// Set a style to be italic or not. (Scintilla feature 2054) + void StyleSetItalic(int style, bool italic); + + /// Set the size of characters of a style. (Scintilla feature 2055) + void StyleSetSize(int style, int sizePoints); + + /// Set the font of a style. (Scintilla feature 2056) + unsafe void StyleSetFont(int style, string fontName); + + /// Set a style to have its end of line filled or not. (Scintilla feature 2057) + void StyleSetEOLFilled(int style, bool eolFilled); + + /// Reset the default style to its state at startup (Scintilla feature 2058) + void StyleResetDefault(); + + /// Set a style to be underlined or not. (Scintilla feature 2059) + void StyleSetUnderline(int style, bool underline); + + /// Get the foreground colour of a style. (Scintilla feature 2481) + Colour StyleGetFore(int style); + + /// Get the background colour of a style. (Scintilla feature 2482) + Colour StyleGetBack(int style); + + /// Get is a style bold or not. (Scintilla feature 2483) + bool StyleGetBold(int style); + + /// Get is a style italic or not. (Scintilla feature 2484) + bool StyleGetItalic(int style); + + /// Get the size of characters of a style. (Scintilla feature 2485) + int StyleGetSize(int style); + + /// + /// Get the font of a style. + /// Returns the length of the fontName + /// Result is NUL-terminated. + /// (Scintilla feature 2486) + /// + unsafe string StyleGetFont(int style); + + /// Get is a style to have its end of line filled or not. (Scintilla feature 2487) + bool StyleGetEOLFilled(int style); + + /// Get is a style underlined or not. (Scintilla feature 2488) + bool StyleGetUnderline(int style); + + /// Get is a style mixed case, or to force upper or lower case. (Scintilla feature 2489) + CaseVisible StyleGetCase(int style); + + /// Get the character get of the font in a style. (Scintilla feature 2490) + CharacterSet StyleGetCharacterSet(int style); + + /// Get is a style visible or not. (Scintilla feature 2491) + bool StyleGetVisible(int style); + + /// + /// Get is a style changeable or not (read only). + /// Experimental feature, currently buggy. + /// (Scintilla feature 2492) + /// + bool StyleGetChangeable(int style); + + /// Get is a style a hotspot or not. (Scintilla feature 2493) + bool StyleGetHotSpot(int style); + + /// Set a style to be mixed case, or to force upper or lower case. (Scintilla feature 2060) + void StyleSetCase(int style, CaseVisible caseVisible); + + /// Set the size of characters of a style. Size is in points multiplied by 100. (Scintilla feature 2061) + void StyleSetSizeFractional(int style, int sizeHundredthPoints); + + /// Get the size of characters of a style in points multiplied by 100 (Scintilla feature 2062) + int StyleGetSizeFractional(int style); + + /// Set the weight of characters of a style. (Scintilla feature 2063) + void StyleSetWeight(int style, FontWeight weight); + + /// Get the weight of characters of a style. (Scintilla feature 2064) + FontWeight StyleGetWeight(int style); + + /// Set the character set of the font in a style. (Scintilla feature 2066) + void StyleSetCharacterSet(int style, CharacterSet characterSet); + + /// Set a style to be a hotspot or not. (Scintilla feature 2409) + void StyleSetHotSpot(int style, bool hotspot); + + /// Set the foreground colour of the main and additional selections and whether to use this setting. (Scintilla feature 2067) + void SetSelFore(bool useSetting, Colour fore); + + /// Set the background colour of the main and additional selections and whether to use this setting. (Scintilla feature 2068) + void SetSelBack(bool useSetting, Colour back); + + /// Get the alpha of the selection. (Scintilla feature 2477) + Alpha GetSelAlpha(); + + /// Set the alpha of the selection. (Scintilla feature 2478) + void SetSelAlpha(Alpha alpha); + + /// Is the selection end of line filled? (Scintilla feature 2479) + bool GetSelEOLFilled(); + + /// Set the selection to have its end of line filled or not. (Scintilla feature 2480) + void SetSelEOLFilled(bool filled); + + /// Set the foreground colour of the caret. (Scintilla feature 2069) + void SetCaretFore(Colour fore); + + /// When key+modifier combination keyDefinition is pressed perform sciCommand. (Scintilla feature 2070) + void AssignCmdKey(KeyModifier keyDefinition, int sciCommand); + + /// When key+modifier combination keyDefinition is pressed do nothing. (Scintilla feature 2071) + void ClearCmdKey(KeyModifier keyDefinition); + + /// Drop all key mappings. (Scintilla feature 2072) + void ClearAllCmdKeys(); + + /// Set the styles for a segment of the document. (Scintilla feature 2073) + unsafe void SetStylingEx(int length, string styles); + + /// Set a style to be visible or not. (Scintilla feature 2074) + void StyleSetVisible(int style, bool visible); + + /// Get the time in milliseconds that the caret is on and off. (Scintilla feature 2075) + int GetCaretPeriod(); + + /// Get the time in milliseconds that the caret is on and off. 0 = steady on. (Scintilla feature 2076) + void SetCaretPeriod(int periodMilliseconds); + + /// + /// Set the set of characters making up words for when moving or selecting by word. + /// First sets defaults like SetCharsDefault. + /// (Scintilla feature 2077) + /// + unsafe void SetWordChars(string characters); + + /// + /// Get the set of characters making up words for when moving or selecting by word. + /// Returns the number of characters + /// (Scintilla feature 2646) + /// + unsafe string GetWordChars(); + + /// Set the number of characters to have directly indexed categories (Scintilla feature 2720) + void SetCharacterCategoryOptimization(int countCharacters); + + /// Get the number of characters to have directly indexed categories (Scintilla feature 2721) + int GetCharacterCategoryOptimization(); + + /// + /// Start a sequence of actions that is undone and redone as a unit. + /// May be nested. + /// (Scintilla feature 2078) + /// + void BeginUndoAction(); + + /// End a sequence of actions that is undone and redone as a unit. (Scintilla feature 2079) + void EndUndoAction(); + + /// Set an indicator to plain, squiggle or TT. (Scintilla feature 2080) + void IndicSetStyle(int indicator, IndicatorStyle indicatorStyle); + + /// Retrieve the style of an indicator. (Scintilla feature 2081) + IndicatorStyle IndicGetStyle(int indicator); + + /// Set the foreground colour of an indicator. (Scintilla feature 2082) + void IndicSetFore(int indicator, Colour fore); + + /// Retrieve the foreground colour of an indicator. (Scintilla feature 2083) + Colour IndicGetFore(int indicator); + + /// Set an indicator to draw under text or over(default). (Scintilla feature 2510) + void IndicSetUnder(int indicator, bool under); + + /// Retrieve whether indicator drawn under or over text. (Scintilla feature 2511) + bool IndicGetUnder(int indicator); + + /// Set a hover indicator to plain, squiggle or TT. (Scintilla feature 2680) + void IndicSetHoverStyle(int indicator, IndicatorStyle indicatorStyle); + + /// Retrieve the hover style of an indicator. (Scintilla feature 2681) + IndicatorStyle IndicGetHoverStyle(int indicator); + + /// Set the foreground hover colour of an indicator. (Scintilla feature 2682) + void IndicSetHoverFore(int indicator, Colour fore); + + /// Retrieve the foreground hover colour of an indicator. (Scintilla feature 2683) + Colour IndicGetHoverFore(int indicator); + + /// Set the attributes of an indicator. (Scintilla feature 2684) + void IndicSetFlags(int indicator, IndicFlag flags); + + /// Retrieve the attributes of an indicator. (Scintilla feature 2685) + IndicFlag IndicGetFlags(int indicator); + + /// Set the foreground colour of all whitespace and whether to use this setting. (Scintilla feature 2084) + void SetWhitespaceFore(bool useSetting, Colour fore); + + /// Set the background colour of all whitespace and whether to use this setting. (Scintilla feature 2085) + void SetWhitespaceBack(bool useSetting, Colour back); + + /// Set the size of the dots used to mark space characters. (Scintilla feature 2086) + void SetWhitespaceSize(int size); + + /// Get the size of the dots used to mark space characters. (Scintilla feature 2087) + int GetWhitespaceSize(); + + /// Used to hold extra styling information for each line. (Scintilla feature 2092) + void SetLineState(int line, int state); + + /// Retrieve the extra styling information for a line. (Scintilla feature 2093) + int GetLineState(int line); + + /// Retrieve the last line number that has line state. (Scintilla feature 2094) + int GetMaxLineState(); + + /// Is the background of the line containing the caret in a different colour? (Scintilla feature 2095) + bool GetCaretLineVisible(); + + /// Display the background of the line containing the caret in a different colour. (Scintilla feature 2096) + void SetCaretLineVisible(bool show); + + /// Get the colour of the background of the line containing the caret. (Scintilla feature 2097) + Colour GetCaretLineBack(); + + /// Set the colour of the background of the line containing the caret. (Scintilla feature 2098) + void SetCaretLineBack(Colour back); + + /// + /// Retrieve the caret line frame width. + /// Width = 0 means this option is disabled. + /// (Scintilla feature 2704) + /// + int GetCaretLineFrame(); + + /// + /// Display the caret line framed. + /// Set width != 0 to enable this option and width = 0 to disable it. + /// (Scintilla feature 2705) + /// + void SetCaretLineFrame(int width); + + /// + /// Set a style to be changeable or not (read only). + /// Experimental feature, currently buggy. + /// (Scintilla feature 2099) + /// + void StyleSetChangeable(int style, bool changeable); + + /// + /// Display a auto-completion list. + /// The lengthEntered parameter indicates how many characters before + /// the caret should be used to provide context. + /// (Scintilla feature 2100) + /// + unsafe void AutoCShow(int lengthEntered, string itemList); + + /// Remove the auto-completion list from the screen. (Scintilla feature 2101) + void AutoCCancel(); + + /// Is there an auto-completion list visible? (Scintilla feature 2102) + bool AutoCActive(); + + /// Retrieve the position of the caret when the auto-completion list was displayed. (Scintilla feature 2103) + int AutoCPosStart(); + + /// User has selected an item so remove the list and insert the selection. (Scintilla feature 2104) + void AutoCComplete(); + + /// Define a set of character that when typed cancel the auto-completion list. (Scintilla feature 2105) + unsafe void AutoCStops(string characterSet); + + /// + /// Change the separator character in the string setting up an auto-completion list. + /// Default is space but can be changed if items contain space. + /// (Scintilla feature 2106) + /// + void AutoCSetSeparator(int separatorCharacter); + + /// Retrieve the auto-completion list separator character. (Scintilla feature 2107) + int AutoCGetSeparator(); + + /// Select the item in the auto-completion list that starts with a string. (Scintilla feature 2108) + unsafe void AutoCSelect(string select); + + /// + /// Should the auto-completion list be cancelled if the user backspaces to a + /// position before where the box was created. + /// (Scintilla feature 2110) + /// + void AutoCSetCancelAtStart(bool cancel); + + /// Retrieve whether auto-completion cancelled by backspacing before start. (Scintilla feature 2111) + bool AutoCGetCancelAtStart(); + + /// + /// Define a set of characters that when typed will cause the autocompletion to + /// choose the selected item. + /// (Scintilla feature 2112) + /// + unsafe void AutoCSetFillUps(string characterSet); + + /// Should a single item auto-completion list automatically choose the item. (Scintilla feature 2113) + void AutoCSetChooseSingle(bool chooseSingle); + + /// Retrieve whether a single item auto-completion list automatically choose the item. (Scintilla feature 2114) + bool AutoCGetChooseSingle(); + + /// Set whether case is significant when performing auto-completion searches. (Scintilla feature 2115) + void AutoCSetIgnoreCase(bool ignoreCase); + + /// Retrieve state of ignore case flag. (Scintilla feature 2116) + bool AutoCGetIgnoreCase(); + + /// Display a list of strings and send notification when user chooses one. (Scintilla feature 2117) + unsafe void UserListShow(int listType, string itemList); + + /// Set whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2118) + void AutoCSetAutoHide(bool autoHide); + + /// Retrieve whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2119) + bool AutoCGetAutoHide(); + + /// + /// Set whether or not autocompletion deletes any word characters + /// after the inserted text upon completion. + /// (Scintilla feature 2270) + /// + void AutoCSetDropRestOfWord(bool dropRestOfWord); + + /// + /// Retrieve whether or not autocompletion deletes any word characters + /// after the inserted text upon completion. + /// (Scintilla feature 2271) + /// + bool AutoCGetDropRestOfWord(); + + /// Register an XPM image for use in autocompletion lists. (Scintilla feature 2405) + unsafe void RegisterImage(int type, string xpmData); + + /// Clear all the registered XPM images. (Scintilla feature 2408) + void ClearRegisteredImages(); + + /// Retrieve the auto-completion list type-separator character. (Scintilla feature 2285) + int AutoCGetTypeSeparator(); + + /// + /// Change the type-separator character in the string setting up an auto-completion list. + /// Default is '?' but can be changed if items contain '?'. + /// (Scintilla feature 2286) + /// + void AutoCSetTypeSeparator(int separatorCharacter); + + /// + /// Set the maximum width, in characters, of auto-completion and user lists. + /// Set to 0 to autosize to fit longest item, which is the default. + /// (Scintilla feature 2208) + /// + void AutoCSetMaxWidth(int characterCount); + + /// Get the maximum width, in characters, of auto-completion and user lists. (Scintilla feature 2209) + int AutoCGetMaxWidth(); + + /// + /// Set the maximum height, in rows, of auto-completion and user lists. + /// The default is 5 rows. + /// (Scintilla feature 2210) + /// + void AutoCSetMaxHeight(int rowCount); + + /// Set the maximum height, in rows, of auto-completion and user lists. (Scintilla feature 2211) + int AutoCGetMaxHeight(); + + /// Set the number of spaces used for one level of indentation. (Scintilla feature 2122) + void SetIndent(int indentSize); + + /// Retrieve indentation size. (Scintilla feature 2123) + int GetIndent(); + + /// + /// Indentation will only use space characters if useTabs is false, otherwise + /// it will use a combination of tabs and spaces. + /// (Scintilla feature 2124) + /// + void SetUseTabs(bool useTabs); + + /// Retrieve whether tabs will be used in indentation. (Scintilla feature 2125) + bool GetUseTabs(); + + /// Change the indentation of a line to a number of columns. (Scintilla feature 2126) + void SetLineIndentation(int line, int indentation); + + /// Retrieve the number of columns that a line is indented. (Scintilla feature 2127) + int GetLineIndentation(int line); + + /// Retrieve the position before the first non indentation character on a line. (Scintilla feature 2128) + int GetLineIndentPosition(int line); + + /// Retrieve the column number of a position, taking tab width into account. (Scintilla feature 2129) + int GetColumn(int pos); + + /// Count characters between two positions. (Scintilla feature 2633) + int CountCharacters(int start, int end); + + /// Count code units between two positions. (Scintilla feature 2715) + int CountCodeUnits(int start, int end); + + /// Show or hide the horizontal scroll bar. (Scintilla feature 2130) + void SetHScrollBar(bool visible); + + /// Is the horizontal scroll bar visible? (Scintilla feature 2131) + bool GetHScrollBar(); + + /// Show or hide indentation guides. (Scintilla feature 2132) + void SetIndentationGuides(IndentView indentView); + + /// Are the indentation guides visible? (Scintilla feature 2133) + IndentView GetIndentationGuides(); + + /// + /// Set the highlighted indentation guide column. + /// 0 = no highlighted guide. + /// (Scintilla feature 2134) + /// + void SetHighlightGuide(int column); + + /// Get the highlighted indentation guide column. (Scintilla feature 2135) + int GetHighlightGuide(); + + /// Get the position after the last visible characters on a line. (Scintilla feature 2136) + int GetLineEndPosition(int line); + + /// Get the code page used to interpret the bytes of the document as characters. (Scintilla feature 2137) + int GetCodePage(); + + /// Get the foreground colour of the caret. (Scintilla feature 2138) + Colour GetCaretFore(); + + /// In read-only mode? (Scintilla feature 2140) + bool GetReadOnly(); + + /// Sets the position of the caret. (Scintilla feature 2141) + void SetCurrentPos(int caret); + + /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2142) + void SetSelectionStart(int anchor); + + /// Returns the position at the start of the selection. (Scintilla feature 2143) + int GetSelectionStart(); + + /// Sets the position that ends the selection - this becomes the caret. (Scintilla feature 2144) + void SetSelectionEnd(int caret); + + /// Returns the position at the end of the selection. (Scintilla feature 2145) + int GetSelectionEnd(); + + /// Set caret to a position, while removing any existing selection. (Scintilla feature 2556) + void SetEmptySelection(int caret); + + /// Sets the print magnification added to the point size of each style for printing. (Scintilla feature 2146) + void SetPrintMagnification(int magnification); + + /// Returns the print magnification. (Scintilla feature 2147) + int GetPrintMagnification(); + + /// Modify colours when printing for clearer printed text. (Scintilla feature 2148) + void SetPrintColourMode(PrintOption mode); + + /// Returns the print colour mode. (Scintilla feature 2149) + PrintOption GetPrintColourMode(); + + /// Find some text in the document. (Scintilla feature 2150) + int FindText(FindOption searchFlags, TextToFind ft); + + /// Retrieve the display line at the top of the display. (Scintilla feature 2152) + int GetFirstVisibleLine(); + + /// + /// Retrieve the contents of a line. + /// Returns the length of the line. + /// (Scintilla feature 2153) + /// + unsafe string GetLine(int line); + + /// Returns the number of lines in the document. There is always at least one. (Scintilla feature 2154) + int GetLineCount(); + + /// Sets the size in pixels of the left margin. (Scintilla feature 2155) + void SetMarginLeft(int pixelWidth); + + /// Returns the size in pixels of the left margin. (Scintilla feature 2156) + int GetMarginLeft(); + + /// Sets the size in pixels of the right margin. (Scintilla feature 2157) + void SetMarginRight(int pixelWidth); + + /// Returns the size in pixels of the right margin. (Scintilla feature 2158) + int GetMarginRight(); + + /// Is the document different from when it was last saved? (Scintilla feature 2159) + bool GetModify(); + + /// Select a range of text. (Scintilla feature 2160) + void SetSel(int anchor, int caret); + + /// + /// Retrieve the selected text. + /// Return the length of the text. + /// Result is NUL-terminated. + /// (Scintilla feature 2161) + /// + unsafe string GetSelText(); + + /// + /// Retrieve a range of text. + /// Return the length of the text. + /// (Scintilla feature 2162) + /// + int GetTextRange(TextRange tr); + + /// Draw the selection either highlighted or in normal (non-highlighted) style. (Scintilla feature 2163) + void HideSelection(bool hide); + + /// Retrieve the x value of the point in the window where a position is displayed. (Scintilla feature 2164) + int PointXFromPosition(int pos); + + /// Retrieve the y value of the point in the window where a position is displayed. (Scintilla feature 2165) + int PointYFromPosition(int pos); + + /// Retrieve the line containing a position. (Scintilla feature 2166) + int LineFromPosition(int pos); + + /// Retrieve the position at the start of a line. (Scintilla feature 2167) + int PositionFromLine(int line); + + /// Scroll horizontally and vertically. (Scintilla feature 2168) + void LineScroll(int columns, int lines); + + /// Ensure the caret is visible. (Scintilla feature 2169) + void ScrollCaret(); + + /// + /// Scroll the argument positions and the range between them into view giving + /// priority to the primary position then the secondary position. + /// This may be used to make a search match visible. + /// (Scintilla feature 2569) + /// + void ScrollRange(int secondary, int primary); + + /// Replace the selected text with the argument text. (Scintilla feature 2170) + unsafe void ReplaceSel(string text); + + /// Set to read only or read write. (Scintilla feature 2171) + void SetReadOnly(bool readOnly); + + /// Null operation. (Scintilla feature 2172) + void Null(); + + /// Will a paste succeed? (Scintilla feature 2173) + bool CanPaste(); + + /// Are there any undoable actions in the undo history? (Scintilla feature 2174) + bool CanUndo(); + + /// Delete the undo history. (Scintilla feature 2175) + void EmptyUndoBuffer(); + + /// Undo one action in the undo history. (Scintilla feature 2176) + void Undo(); + + /// Cut the selection to the clipboard. (Scintilla feature 2177) + void Cut(); + + /// Copy the selection to the clipboard. (Scintilla feature 2178) + void Copy(); + + /// Paste the contents of the clipboard into the document replacing the selection. (Scintilla feature 2179) + void Paste(); + + /// Clear the selection. (Scintilla feature 2180) + void Clear(); + + /// Replace the contents of the document with the argument text. (Scintilla feature 2181) + unsafe void SetText(string text); + + /// + /// Retrieve all the text in the document. + /// Returns number of characters retrieved. + /// Result is NUL-terminated. + /// (Scintilla feature 2182) + /// + unsafe string GetText(int length); + + /// Retrieve the number of characters in the document. (Scintilla feature 2183) + int GetTextLength(); + + /// Retrieve a pointer to a function that processes messages for this Scintilla. (Scintilla feature 2184) + IntPtr GetDirectFunction(); + + /// + /// Retrieve a pointer value to use as the first argument when calling + /// the function returned by GetDirectFunction. + /// (Scintilla feature 2185) + /// + IntPtr GetDirectPointer(); + + /// Set to overtype (true) or insert mode. (Scintilla feature 2186) + void SetOvertype(bool overType); + + /// Returns true if overtype mode is active otherwise false is returned. (Scintilla feature 2187) + bool GetOvertype(); + + /// Set the width of the insert mode caret. (Scintilla feature 2188) + void SetCaretWidth(int pixelWidth); + + /// Returns the width of the insert mode caret. (Scintilla feature 2189) + int GetCaretWidth(); + + /// + /// Sets the position that starts the target which is used for updating the + /// document without affecting the scroll position. + /// (Scintilla feature 2190) + /// + void SetTargetStart(int start); + + /// Get the position that starts the target. (Scintilla feature 2191) + int GetTargetStart(); + + /// + /// Sets the position that ends the target which is used for updating the + /// document without affecting the scroll position. + /// (Scintilla feature 2192) + /// + void SetTargetEnd(int end); + + /// Get the position that ends the target. (Scintilla feature 2193) + int GetTargetEnd(); + + /// Sets both the start and end of the target in one call. (Scintilla feature 2686) + void SetTargetRange(int start, int end); + + /// Retrieve the text in the target. (Scintilla feature 2687) + unsafe string GetTargetText(); + + /// Make the target range start and end be the same as the selection range start and end. (Scintilla feature 2287) + void TargetFromSelection(); + + /// Sets the target to the whole document. (Scintilla feature 2690) + void TargetWholeDocument(); + + /// + /// Replace the target text with the argument text. + /// Text is counted so it can contain NULs. + /// Returns the length of the replacement text. + /// (Scintilla feature 2194) + /// + unsafe int ReplaceTarget(int length, string text); + + /// + /// Replace the target text with the argument text after \d processing. + /// Text is counted so it can contain NULs. + /// Looks for \d where d is between 1 and 9 and replaces these with the strings + /// matched in the last search operation which were surrounded by \( and \). + /// Returns the length of the replacement text including any change + /// caused by processing the \d patterns. + /// (Scintilla feature 2195) + /// + unsafe int ReplaceTargetRE(int length, string text); + + /// + /// Search for a counted string in the target and set the target to the found + /// range. Text is counted so it can contain NULs. + /// Returns start of found range or -1 for failure in which case target is not moved. + /// (Scintilla feature 2197) + /// + unsafe int SearchInTarget(int length, string text); + + /// Set the search flags used by SearchInTarget. (Scintilla feature 2198) + void SetSearchFlags(FindOption searchFlags); + + /// Get the search flags used by SearchInTarget. (Scintilla feature 2199) + FindOption GetSearchFlags(); + + /// Show a call tip containing a definition near position pos. (Scintilla feature 2200) + unsafe void CallTipShow(int pos, string definition); + + /// Remove the call tip from the screen. (Scintilla feature 2201) + void CallTipCancel(); + + /// Is there an active call tip? (Scintilla feature 2202) + bool CallTipActive(); + + /// Retrieve the position where the caret was before displaying the call tip. (Scintilla feature 2203) + int CallTipPosStart(); + + /// Set the start position in order to change when backspacing removes the calltip. (Scintilla feature 2214) + void CallTipSetPosStart(int posStart); + + /// Highlight a segment of the definition. (Scintilla feature 2204) + void CallTipSetHlt(int highlightStart, int highlightEnd); + + /// Set the background colour for the call tip. (Scintilla feature 2205) + void CallTipSetBack(Colour back); + + /// Set the foreground colour for the call tip. (Scintilla feature 2206) + void CallTipSetFore(Colour fore); + + /// Set the foreground colour for the highlighted part of the call tip. (Scintilla feature 2207) + void CallTipSetForeHlt(Colour fore); + + /// Enable use of STYLE_CALLTIP and set call tip tab size in pixels. (Scintilla feature 2212) + void CallTipUseStyle(int tabSize); + + /// Set position of calltip, above or below text. (Scintilla feature 2213) + void CallTipSetPosition(bool above); + + /// Find the display line of a document line taking hidden lines into account. (Scintilla feature 2220) + int VisibleFromDocLine(int docLine); + + /// Find the document line of a display line taking hidden lines into account. (Scintilla feature 2221) + int DocLineFromVisible(int displayLine); + + /// The number of display lines needed to wrap a document line (Scintilla feature 2235) + int WrapCount(int docLine); + + /// + /// Set the fold level of a line. + /// This encodes an integer level along with flags indicating whether the + /// line is a header and whether it is effectively white space. + /// (Scintilla feature 2222) + /// + void SetFoldLevel(int line, FoldLevel level); + + /// Retrieve the fold level of a line. (Scintilla feature 2223) + FoldLevel GetFoldLevel(int line); + + /// Find the last child line of a header line. (Scintilla feature 2224) + int GetLastChild(int line, FoldLevel level); + + /// Find the parent line of a child line. (Scintilla feature 2225) + int GetFoldParent(int line); + + /// Make a range of lines visible. (Scintilla feature 2226) + void ShowLines(int lineStart, int lineEnd); + + /// Make a range of lines invisible. (Scintilla feature 2227) + void HideLines(int lineStart, int lineEnd); + + /// Is a line visible? (Scintilla feature 2228) + bool GetLineVisible(int line); + + /// Are all lines visible? (Scintilla feature 2236) + bool GetAllLinesVisible(); + + /// Show the children of a header line. (Scintilla feature 2229) + void SetFoldExpanded(int line, bool expanded); + + /// Is a header line expanded? (Scintilla feature 2230) + bool GetFoldExpanded(int line); + + /// Switch a header line between expanded and contracted. (Scintilla feature 2231) + void ToggleFold(int line); + + /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature 2700) + unsafe void ToggleFoldShowText(int line, string text); + + /// Set the style of fold display text. (Scintilla feature 2701) + void FoldDisplayTextSetStyle(FoldDisplayTextStyle style); + + /// Get the style of fold display text. (Scintilla feature 2707) + FoldDisplayTextStyle FoldDisplayTextGetStyle(); + + /// Set the default fold display text. (Scintilla feature 2722) + unsafe void SetDefaultFoldDisplayText(string text); + + /// Get the default fold display text. (Scintilla feature 2723) + unsafe string GetDefaultFoldDisplayText(); + + /// Expand or contract a fold header. (Scintilla feature 2237) + void FoldLine(int line, FoldAction action); + + /// Expand or contract a fold header and its children. (Scintilla feature 2238) + void FoldChildren(int line, FoldAction action); + + /// Expand a fold header and all children. Use the level argument instead of the line's current level. (Scintilla feature 2239) + void ExpandChildren(int line, FoldLevel level); + + /// Expand or contract all fold headers. (Scintilla feature 2662) + void FoldAll(FoldAction action); + + /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature 2232) + void EnsureVisible(int line); + + /// Set automatic folding behaviours. (Scintilla feature 2663) + void SetAutomaticFold(AutomaticFold automaticFold); + + /// Get automatic folding behaviours. (Scintilla feature 2664) + AutomaticFold GetAutomaticFold(); + + /// Set some style options for folding. (Scintilla feature 2233) + void SetFoldFlags(FoldFlag flags); + + /// + /// Ensure a particular line is visible by expanding any header line hiding it. + /// Use the currently set visibility policy to determine which range to display. + /// (Scintilla feature 2234) + /// + void EnsureVisibleEnforcePolicy(int line); + + /// Sets whether a tab pressed when caret is within indentation indents. (Scintilla feature 2260) + void SetTabIndents(bool tabIndents); + + /// Does a tab pressed when caret is within indentation indent? (Scintilla feature 2261) + bool GetTabIndents(); + + /// Sets whether a backspace pressed when caret is within indentation unindents. (Scintilla feature 2262) + void SetBackSpaceUnIndents(bool bsUnIndents); + + /// Does a backspace pressed when caret is within indentation unindent? (Scintilla feature 2263) + bool GetBackSpaceUnIndents(); + + /// Sets the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2264) + void SetMouseDwellTime(int periodMilliseconds); + + /// Retrieve the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2265) + int GetMouseDwellTime(); + + /// Get position of start of word. (Scintilla feature 2266) + int WordStartPosition(int pos, bool onlyWordCharacters); + + /// Get position of end of word. (Scintilla feature 2267) + int WordEndPosition(int pos, bool onlyWordCharacters); + + /// Is the range start..end considered a word? (Scintilla feature 2691) + bool IsRangeWord(int start, int end); + + /// Sets limits to idle styling. (Scintilla feature 2692) + void SetIdleStyling(IdleStyling idleStyling); + + /// Retrieve the limits to idle styling. (Scintilla feature 2693) + IdleStyling GetIdleStyling(); + + /// Sets whether text is word wrapped. (Scintilla feature 2268) + void SetWrapMode(Wrap wrapMode); + + /// Retrieve whether text is word wrapped. (Scintilla feature 2269) + Wrap GetWrapMode(); + + /// Set the display mode of visual flags for wrapped lines. (Scintilla feature 2460) + void SetWrapVisualFlags(WrapVisualFlag wrapVisualFlags); + + /// Retrive the display mode of visual flags for wrapped lines. (Scintilla feature 2461) + WrapVisualFlag GetWrapVisualFlags(); + + /// Set the location of visual flags for wrapped lines. (Scintilla feature 2462) + void SetWrapVisualFlagsLocation(WrapVisualLocation wrapVisualFlagsLocation); + + /// Retrive the location of visual flags for wrapped lines. (Scintilla feature 2463) + WrapVisualLocation GetWrapVisualFlagsLocation(); + + /// Set the start indent for wrapped lines. (Scintilla feature 2464) + void SetWrapStartIndent(int indent); + + /// Retrive the start indent for wrapped lines. (Scintilla feature 2465) + int GetWrapStartIndent(); + + /// Sets how wrapped sublines are placed. Default is fixed. (Scintilla feature 2472) + void SetWrapIndentMode(WrapIndentMode wrapIndentMode); + + /// Retrieve how wrapped sublines are placed. Default is fixed. (Scintilla feature 2473) + WrapIndentMode GetWrapIndentMode(); + + /// Sets the degree of caching of layout information. (Scintilla feature 2272) + void SetLayoutCache(LineCache cacheMode); + + /// Retrieve the degree of caching of layout information. (Scintilla feature 2273) + LineCache GetLayoutCache(); + + /// Sets the document width assumed for scrolling. (Scintilla feature 2274) + void SetScrollWidth(int pixelWidth); + + /// Retrieve the document width assumed for scrolling. (Scintilla feature 2275) + int GetScrollWidth(); + + /// Sets whether the maximum width line displayed is used to set scroll width. (Scintilla feature 2516) + void SetScrollWidthTracking(bool tracking); + + /// Retrieve whether the scroll width tracks wide lines. (Scintilla feature 2517) + bool GetScrollWidthTracking(); + + /// + /// Measure the pixel width of some text in a particular style. + /// NUL terminated text argument. + /// Does not handle tab or control characters. + /// (Scintilla feature 2276) + /// + unsafe int TextWidth(int style, string text); + + /// + /// Sets the scroll range so that maximum scroll position has + /// the last line at the bottom of the view (default). + /// Setting this to false allows scrolling one page below the last line. + /// (Scintilla feature 2277) + /// + void SetEndAtLastLine(bool endAtLastLine); + + /// + /// Retrieve whether the maximum scroll position has the last + /// line at the bottom of the view. + /// (Scintilla feature 2278) + /// + bool GetEndAtLastLine(); + + /// Retrieve the height of a particular line of text in pixels. (Scintilla feature 2279) + int TextHeight(int line); + + /// Show or hide the vertical scroll bar. (Scintilla feature 2280) + void SetVScrollBar(bool visible); + + /// Is the vertical scroll bar visible? (Scintilla feature 2281) + bool GetVScrollBar(); + + /// Append a string to the end of the document without changing the selection. (Scintilla feature 2282) + unsafe void AppendText(int length, string text); + + /// How many phases is drawing done in? (Scintilla feature 2673) + PhasesDraw GetPhasesDraw(); + + /// + /// In one phase draw, text is drawn in a series of rectangular blocks with no overlap. + /// In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. + /// In multiple phase draw, each element is drawn over the whole drawing area, allowing text + /// to overlap from one line to the next. + /// (Scintilla feature 2674) + /// + void SetPhasesDraw(PhasesDraw phases); + + /// Choose the quality level for text from the FontQuality enumeration. (Scintilla feature 2611) + void SetFontQuality(FontQuality fontQuality); + + /// Retrieve the quality level for text. (Scintilla feature 2612) + FontQuality GetFontQuality(); + + /// Scroll so that a display line is at the top of the display. (Scintilla feature 2613) + void SetFirstVisibleLine(int displayLine); + + /// Change the effect of pasting when there are multiple selections. (Scintilla feature 2614) + void SetMultiPaste(MultiPaste multiPaste); + + /// Retrieve the effect of pasting when there are multiple selections. (Scintilla feature 2615) + MultiPaste GetMultiPaste(); + + /// + /// Retrieve the value of a tag from a regular expression search. + /// Result is NUL-terminated. + /// (Scintilla feature 2616) + /// + unsafe string GetTag(int tagNumber); + + /// Join the lines in the target. (Scintilla feature 2288) + void LinesJoin(); + + /// + /// Split the lines in the target into lines that are less wide than pixelWidth + /// where possible. + /// (Scintilla feature 2289) + /// + void LinesSplit(int pixelWidth); + + /// Set one of the colours used as a chequerboard pattern in the fold margin (Scintilla feature 2290) + void SetFoldMarginColour(bool useSetting, Colour back); + + /// Set the other colour used as a chequerboard pattern in the fold margin (Scintilla feature 2291) + void SetFoldMarginHiColour(bool useSetting, Colour fore); + + /// Enable or disable accessibility. (Scintilla feature 2702) + void SetAccessibility(Accessibility accessibility); + + /// Report accessibility status. (Scintilla feature 2703) + Accessibility GetAccessibility(); + + /// Move caret down one line. (Scintilla feature 2300) + void LineDown(); + + /// Move caret down one line extending selection to new caret position. (Scintilla feature 2301) + void LineDownExtend(); + + /// Move caret up one line. (Scintilla feature 2302) + void LineUp(); + + /// Move caret up one line extending selection to new caret position. (Scintilla feature 2303) + void LineUpExtend(); + + /// Move caret left one character. (Scintilla feature 2304) + void CharLeft(); + + /// Move caret left one character extending selection to new caret position. (Scintilla feature 2305) + void CharLeftExtend(); + + /// Move caret right one character. (Scintilla feature 2306) + void CharRight(); + + /// Move caret right one character extending selection to new caret position. (Scintilla feature 2307) + void CharRightExtend(); + + /// Move caret left one word. (Scintilla feature 2308) + void WordLeft(); + + /// Move caret left one word extending selection to new caret position. (Scintilla feature 2309) + void WordLeftExtend(); + + /// Move caret right one word. (Scintilla feature 2310) + void WordRight(); + + /// Move caret right one word extending selection to new caret position. (Scintilla feature 2311) + void WordRightExtend(); + + /// Move caret to first position on line. (Scintilla feature 2312) + void Home(); + + /// Move caret to first position on line extending selection to new caret position. (Scintilla feature 2313) + void HomeExtend(); + + /// Move caret to last position on line. (Scintilla feature 2314) + void LineEnd(); + + /// Move caret to last position on line extending selection to new caret position. (Scintilla feature 2315) + void LineEndExtend(); + + /// Move caret to first position in document. (Scintilla feature 2316) + void DocumentStart(); + + /// Move caret to first position in document extending selection to new caret position. (Scintilla feature 2317) + void DocumentStartExtend(); + + /// Move caret to last position in document. (Scintilla feature 2318) + void DocumentEnd(); + + /// Move caret to last position in document extending selection to new caret position. (Scintilla feature 2319) + void DocumentEndExtend(); + + /// Move caret one page up. (Scintilla feature 2320) + void PageUp(); + + /// Move caret one page up extending selection to new caret position. (Scintilla feature 2321) + void PageUpExtend(); + + /// Move caret one page down. (Scintilla feature 2322) + void PageDown(); + + /// Move caret one page down extending selection to new caret position. (Scintilla feature 2323) + void PageDownExtend(); + + /// Switch from insert to overtype mode or the reverse. (Scintilla feature 2324) + void EditToggleOvertype(); + + /// Cancel any modes such as call tip or auto-completion list display. (Scintilla feature 2325) + void Cancel(); + + /// Delete the selection or if no selection, the character before the caret. (Scintilla feature 2326) + void DeleteBack(); + + /// + /// If selection is empty or all on one line replace the selection with a tab character. + /// If more than one line selected, indent the lines. + /// (Scintilla feature 2327) + /// + void Tab(); + + /// Dedent the selected lines. (Scintilla feature 2328) + void BackTab(); + + /// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. (Scintilla feature 2329) + void NewLine(); + + /// Insert a Form Feed character. (Scintilla feature 2330) + void FormFeed(); + + /// + /// Move caret to before first visible character on line. + /// If already there move to first character on line. + /// (Scintilla feature 2331) + /// + void VCHome(); + + /// Like VCHome but extending selection to new caret position. (Scintilla feature 2332) + void VCHomeExtend(); + + /// Magnify the displayed text by increasing the sizes by 1 point. (Scintilla feature 2333) + void ZoomIn(); + + /// Make the displayed text smaller by decreasing the sizes by 1 point. (Scintilla feature 2334) + void ZoomOut(); + + /// Delete the word to the left of the caret. (Scintilla feature 2335) + void DelWordLeft(); + + /// Delete the word to the right of the caret. (Scintilla feature 2336) + void DelWordRight(); + + /// Delete the word to the right of the caret, but not the trailing non-word characters. (Scintilla feature 2518) + void DelWordRightEnd(); + + /// Cut the line containing the caret. (Scintilla feature 2337) + void LineCut(); + + /// Delete the line containing the caret. (Scintilla feature 2338) + void LineDelete(); + + /// Switch the current line with the previous. (Scintilla feature 2339) + void LineTranspose(); + + /// Reverse order of selected lines. (Scintilla feature 2354) + void LineReverse(); + + /// Duplicate the current line. (Scintilla feature 2404) + void LineDuplicate(); + + /// Transform the selection to lower case. (Scintilla feature 2340) + void LowerCase(); + + /// Transform the selection to upper case. (Scintilla feature 2341) + void UpperCase(); + + /// Scroll the document down, keeping the caret visible. (Scintilla feature 2342) + void LineScrollDown(); + + /// Scroll the document up, keeping the caret visible. (Scintilla feature 2343) + void LineScrollUp(); + + /// + /// Delete the selection or if no selection, the character before the caret. + /// Will not delete the character before at the start of a line. + /// (Scintilla feature 2344) + /// + void DeleteBackNotLine(); + + /// Move caret to first position on display line. (Scintilla feature 2345) + void HomeDisplay(); + + /// + /// Move caret to first position on display line extending selection to + /// new caret position. + /// (Scintilla feature 2346) + /// + void HomeDisplayExtend(); + + /// Move caret to last position on display line. (Scintilla feature 2347) + void LineEndDisplay(); + + /// + /// Move caret to last position on display line extending selection to new + /// caret position. + /// (Scintilla feature 2348) + /// + void LineEndDisplayExtend(); + + /// + /// Like Home but when word-wrap is enabled goes first to start of display line + /// HomeDisplay, then to start of document line Home. + /// (Scintilla feature 2349) + /// + void HomeWrap(); + + /// + /// Like HomeExtend but when word-wrap is enabled extends first to start of display line + /// HomeDisplayExtend, then to start of document line HomeExtend. + /// (Scintilla feature 2450) + /// + void HomeWrapExtend(); + + /// + /// Like LineEnd but when word-wrap is enabled goes first to end of display line + /// LineEndDisplay, then to start of document line LineEnd. + /// (Scintilla feature 2451) + /// + void LineEndWrap(); + + /// + /// Like LineEndExtend but when word-wrap is enabled extends first to end of display line + /// LineEndDisplayExtend, then to start of document line LineEndExtend. + /// (Scintilla feature 2452) + /// + void LineEndWrapExtend(); + + /// + /// Like VCHome but when word-wrap is enabled goes first to start of display line + /// VCHomeDisplay, then behaves like VCHome. + /// (Scintilla feature 2453) + /// + void VCHomeWrap(); + + /// + /// Like VCHomeExtend but when word-wrap is enabled extends first to start of display line + /// VCHomeDisplayExtend, then behaves like VCHomeExtend. + /// (Scintilla feature 2454) + /// + void VCHomeWrapExtend(); + + /// Copy the line containing the caret. (Scintilla feature 2455) + void LineCopy(); + + /// Move the caret inside current view if it's not there already. (Scintilla feature 2401) + void MoveCaretInsideView(); + + /// How many characters are on a line, including end of line characters? (Scintilla feature 2350) + int LineLength(int line); + + /// Highlight the characters at two positions. (Scintilla feature 2351) + void BraceHighlight(int posA, int posB); + + /// Use specified indicator to highlight matching braces instead of changing their style. (Scintilla feature 2498) + void BraceHighlightIndicator(bool useSetting, int indicator); + + /// Highlight the character at a position indicating there is no matching brace. (Scintilla feature 2352) + void BraceBadLight(int pos); + + /// Use specified indicator to highlight non matching brace instead of changing its style. (Scintilla feature 2499) + void BraceBadLightIndicator(bool useSetting, int indicator); + + /// + /// Find the position of a matching brace or INVALID_POSITION if no match. + /// The maxReStyle must be 0 for now. It may be defined in a future release. + /// (Scintilla feature 2353) + /// + int BraceMatch(int pos, int maxReStyle); + + /// Are the end of line characters visible? (Scintilla feature 2355) + bool GetViewEOL(); + + /// Make the end of line characters visible or invisible. (Scintilla feature 2356) + void SetViewEOL(bool visible); + + /// Retrieve a pointer to the document object. (Scintilla feature 2357) + IntPtr GetDocPointer(); + + /// Change the document object used. (Scintilla feature 2358) + void SetDocPointer(IntPtr doc); + + /// Set which document modification events are sent to the container. (Scintilla feature 2359) + void SetModEventMask(ModificationFlags eventMask); + + /// Retrieve the column number which text should be kept within. (Scintilla feature 2360) + int GetEdgeColumn(); + + /// + /// Set the column number of the edge. + /// If text goes past the edge then it is highlighted. + /// (Scintilla feature 2361) + /// + void SetEdgeColumn(int column); + + /// Retrieve the edge highlight mode. (Scintilla feature 2362) + EdgeVisualStyle GetEdgeMode(); + + /// + /// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that + /// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + /// (Scintilla feature 2363) + /// + void SetEdgeMode(EdgeVisualStyle edgeMode); + + /// Retrieve the colour used in edge indication. (Scintilla feature 2364) + Colour GetEdgeColour(); + + /// Change the colour used in edge indication. (Scintilla feature 2365) + void SetEdgeColour(Colour edgeColour); + + /// Add a new vertical edge to the view. (Scintilla feature 2694) + void MultiEdgeAddLine(int column, Colour edgeColour); + + /// Clear all vertical edges. (Scintilla feature 2695) + void MultiEdgeClearAll(); + + /// Sets the current caret position to be the search anchor. (Scintilla feature 2366) + void SearchAnchor(); + + /// + /// Find some text starting at the search anchor. + /// Does not ensure the selection is visible. + /// (Scintilla feature 2367) + /// + unsafe int SearchNext(FindOption searchFlags, string text); + + /// + /// Find some text starting at the search anchor and moving backwards. + /// Does not ensure the selection is visible. + /// (Scintilla feature 2368) + /// + unsafe int SearchPrev(FindOption searchFlags, string text); + + /// Retrieves the number of lines completely visible. (Scintilla feature 2370) + int LinesOnScreen(); + + /// + /// Set whether a pop up menu is displayed automatically when the user presses + /// the wrong mouse button on certain areas. + /// (Scintilla feature 2371) + /// + void UsePopUp(PopUp popUpMode); + + /// Is the selection rectangular? The alternative is the more common stream selection. (Scintilla feature 2372) + bool SelectionIsRectangle(); + + /// + /// Set the zoom level. This number of points is added to the size of all fonts. + /// It may be positive to magnify or negative to reduce. + /// (Scintilla feature 2373) + /// + void SetZoom(int zoomInPoints); + + /// Retrieve the zoom level. (Scintilla feature 2374) + int GetZoom(); + + /// + /// Create a new document object. + /// Starts with reference count of 1 and not selected into editor. + /// (Scintilla feature 2375) + /// + IntPtr CreateDocument(int bytes, DocumentOption documentOptions); + + /// Extend life of document. (Scintilla feature 2376) + void AddRefDocument(IntPtr doc); + + /// Release a reference to the document, deleting document if it fades to black. (Scintilla feature 2377) + void ReleaseDocument(IntPtr doc); + + /// Get which document options are set. (Scintilla feature 2379) + DocumentOption GetDocumentOptions(); + + /// Get which document modification events are sent to the container. (Scintilla feature 2378) + ModificationFlags GetModEventMask(); + + /// Set whether command events are sent to the container. (Scintilla feature 2717) + void SetCommandEvents(bool commandEvents); + + /// Get whether command events are sent to the container. (Scintilla feature 2718) + bool GetCommandEvents(); + + /// Change internal focus flag. (Scintilla feature 2380) + void SetFocus(bool focus); + + /// Get internal focus flag. (Scintilla feature 2381) + bool GetFocus(); + + /// Change error status - 0 = OK. (Scintilla feature 2382) + void SetStatus(Status status); + + /// Get error status. (Scintilla feature 2383) + Status GetStatus(); + + /// Set whether the mouse is captured when its button is pressed. (Scintilla feature 2384) + void SetMouseDownCaptures(bool captures); + + /// Get whether mouse gets captured. (Scintilla feature 2385) + bool GetMouseDownCaptures(); + + /// Set whether the mouse wheel can be active outside the window. (Scintilla feature 2696) + void SetMouseWheelCaptures(bool captures); + + /// Get whether mouse wheel can be active outside the window. (Scintilla feature 2697) + bool GetMouseWheelCaptures(); + + /// Sets the cursor to one of the SC_CURSOR* values. (Scintilla feature 2386) + void SetCursor(CursorShape cursorType); + + /// Get cursor type. (Scintilla feature 2387) + CursorShape GetCursor(); + + /// + /// Change the way control characters are displayed: + /// If symbol is < 32, keep the drawn way, else, use the given character. + /// (Scintilla feature 2388) + /// + void SetControlCharSymbol(int symbol); + + /// Get the way control characters are displayed. (Scintilla feature 2389) + int GetControlCharSymbol(); + + /// Move to the previous change in capitalisation. (Scintilla feature 2390) + void WordPartLeft(); + + /// + /// Move to the previous change in capitalisation extending selection + /// to new caret position. + /// (Scintilla feature 2391) + /// + void WordPartLeftExtend(); + + /// Move to the change next in capitalisation. (Scintilla feature 2392) + void WordPartRight(); + + /// + /// Move to the next change in capitalisation extending selection + /// to new caret position. + /// (Scintilla feature 2393) + /// + void WordPartRightExtend(); + + /// + /// Set the way the display area is determined when a particular line + /// is to be moved to by Find, FindNext, GotoLine, etc. + /// (Scintilla feature 2394) + /// + void SetVisiblePolicy(VisiblePolicy visiblePolicy, int visibleSlop); + + /// Delete back from the current position to the start of the line. (Scintilla feature 2395) + void DelLineLeft(); + + /// Delete forwards from the current position to the end of the line. (Scintilla feature 2396) + void DelLineRight(); + + /// Set the xOffset (ie, horizontal scroll position). (Scintilla feature 2397) + void SetXOffset(int xOffset); + + /// Get the xOffset (ie, horizontal scroll position). (Scintilla feature 2398) + int GetXOffset(); + + /// Set the last x chosen value to be the caret x position. (Scintilla feature 2399) + void ChooseCaretX(); + + /// Set the focus to this Scintilla widget. (Scintilla feature 2400) + void GrabFocus(); + + /// + /// Set the way the caret is kept visible when going sideways. + /// The exclusion zone is given in pixels. + /// (Scintilla feature 2402) + /// + void SetXCaretPolicy(CaretPolicy caretPolicy, int caretSlop); + + /// + /// Set the way the line the caret is on is kept visible. + /// The exclusion zone is given in lines. + /// (Scintilla feature 2403) + /// + void SetYCaretPolicy(CaretPolicy caretPolicy, int caretSlop); + + /// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). (Scintilla feature 2406) + void SetPrintWrapMode(Wrap wrapMode); + + /// Is printing line wrapped? (Scintilla feature 2407) + Wrap GetPrintWrapMode(); + + /// Set a fore colour for active hotspots. (Scintilla feature 2410) + void SetHotspotActiveFore(bool useSetting, Colour fore); + + /// Get the fore colour for active hotspots. (Scintilla feature 2494) + Colour GetHotspotActiveFore(); + + /// Set a back colour for active hotspots. (Scintilla feature 2411) + void SetHotspotActiveBack(bool useSetting, Colour back); + + /// Get the back colour for active hotspots. (Scintilla feature 2495) + Colour GetHotspotActiveBack(); + + /// Enable / Disable underlining active hotspots. (Scintilla feature 2412) + void SetHotspotActiveUnderline(bool underline); + + /// Get whether underlining for active hotspots. (Scintilla feature 2496) + bool GetHotspotActiveUnderline(); + + /// Limit hotspots to single line so hotspots on two lines don't merge. (Scintilla feature 2421) + void SetHotspotSingleLine(bool singleLine); + + /// Get the HotspotSingleLine property (Scintilla feature 2497) + bool GetHotspotSingleLine(); + + /// Move caret down one paragraph (delimited by empty lines). (Scintilla feature 2413) + void ParaDown(); + + /// Extend selection down one paragraph (delimited by empty lines). (Scintilla feature 2414) + void ParaDownExtend(); + + /// Move caret up one paragraph (delimited by empty lines). (Scintilla feature 2415) + void ParaUp(); + + /// Extend selection up one paragraph (delimited by empty lines). (Scintilla feature 2416) + void ParaUpExtend(); + + /// + /// Given a valid document position, return the previous position taking code + /// page into account. Returns 0 if passed 0. + /// (Scintilla feature 2417) + /// + int PositionBefore(int pos); + + /// + /// Given a valid document position, return the next position taking code + /// page into account. Maximum value returned is the last position in the document. + /// (Scintilla feature 2418) + /// + int PositionAfter(int pos); + + /// + /// Given a valid document position, return a position that differs in a number + /// of characters. Returned value is always between 0 and last position in document. + /// (Scintilla feature 2670) + /// + int PositionRelative(int pos, int relative); + + /// + /// Given a valid document position, return a position that differs in a number + /// of UTF-16 code units. Returned value is always between 0 and last position in document. + /// The result may point half way (2 bytes) inside a non-BMP character. + /// (Scintilla feature 2716) + /// + int PositionRelativeCodeUnits(int pos, int relative); + + /// Copy a range of text to the clipboard. Positions are clipped into the document. (Scintilla feature 2419) + void CopyRange(int start, int end); + + /// Copy argument text to the clipboard. (Scintilla feature 2420) + unsafe void CopyText(int length, string text); + + /// + /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or + /// by lines (SC_SEL_LINES). + /// (Scintilla feature 2422) + /// + void SetSelectionMode(SelectionMode selectionMode); + + /// Get the mode of the current selection. (Scintilla feature 2423) + SelectionMode GetSelectionMode(); + + /// Get whether or not regular caret moves will extend or reduce the selection. (Scintilla feature 2706) + bool GetMoveExtendsSelection(); + + /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2424) + int GetLineSelStartPosition(int line); + + /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2425) + int GetLineSelEndPosition(int line); + + /// Move caret down one line, extending rectangular selection to new caret position. (Scintilla feature 2426) + void LineDownRectExtend(); + + /// Move caret up one line, extending rectangular selection to new caret position. (Scintilla feature 2427) + void LineUpRectExtend(); + + /// Move caret left one character, extending rectangular selection to new caret position. (Scintilla feature 2428) + void CharLeftRectExtend(); + + /// Move caret right one character, extending rectangular selection to new caret position. (Scintilla feature 2429) + void CharRightRectExtend(); + + /// Move caret to first position on line, extending rectangular selection to new caret position. (Scintilla feature 2430) + void HomeRectExtend(); + + /// + /// Move caret to before first visible character on line. + /// If already there move to first character on line. + /// In either case, extend rectangular selection to new caret position. + /// (Scintilla feature 2431) + /// + void VCHomeRectExtend(); + + /// Move caret to last position on line, extending rectangular selection to new caret position. (Scintilla feature 2432) + void LineEndRectExtend(); + + /// Move caret one page up, extending rectangular selection to new caret position. (Scintilla feature 2433) + void PageUpRectExtend(); + + /// Move caret one page down, extending rectangular selection to new caret position. (Scintilla feature 2434) + void PageDownRectExtend(); + + /// Move caret to top of page, or one page up if already at top of page. (Scintilla feature 2435) + void StutteredPageUp(); + + /// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. (Scintilla feature 2436) + void StutteredPageUpExtend(); + + /// Move caret to bottom of page, or one page down if already at bottom of page. (Scintilla feature 2437) + void StutteredPageDown(); + + /// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. (Scintilla feature 2438) + void StutteredPageDownExtend(); + + /// Move caret left one word, position cursor at end of word. (Scintilla feature 2439) + void WordLeftEnd(); + + /// Move caret left one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2440) + void WordLeftEndExtend(); + + /// Move caret right one word, position cursor at end of word. (Scintilla feature 2441) + void WordRightEnd(); + + /// Move caret right one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2442) + void WordRightEndExtend(); + + /// + /// Set the set of characters making up whitespace for when moving or selecting by word. + /// Should be called after SetWordChars. + /// (Scintilla feature 2443) + /// + unsafe void SetWhitespaceChars(string characters); + + /// Get the set of characters making up whitespace for when moving or selecting by word. (Scintilla feature 2647) + unsafe string GetWhitespaceChars(); + + /// + /// Set the set of characters making up punctuation characters + /// Should be called after SetWordChars. + /// (Scintilla feature 2648) + /// + unsafe void SetPunctuationChars(string characters); + + /// Get the set of characters making up punctuation characters (Scintilla feature 2649) + unsafe string GetPunctuationChars(); + + /// Reset the set of characters for whitespace and word characters to the defaults. (Scintilla feature 2444) + void SetCharsDefault(); + + /// Get currently selected item position in the auto-completion list (Scintilla feature 2445) + int AutoCGetCurrent(); + + /// + /// Get currently selected item text in the auto-completion list + /// Returns the length of the item text + /// Result is NUL-terminated. + /// (Scintilla feature 2610) + /// + unsafe string AutoCGetCurrentText(); + + /// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. (Scintilla feature 2634) + void AutoCSetCaseInsensitiveBehaviour(CaseInsensitiveBehaviour behaviour); + + /// Get auto-completion case insensitive behaviour. (Scintilla feature 2635) + CaseInsensitiveBehaviour AutoCGetCaseInsensitiveBehaviour(); + + /// Change the effect of autocompleting when there are multiple selections. (Scintilla feature 2636) + void AutoCSetMulti(MultiAutoComplete multi); + + /// Retrieve the effect of autocompleting when there are multiple selections. (Scintilla feature 2637) + MultiAutoComplete AutoCGetMulti(); + + /// Set the way autocompletion lists are ordered. (Scintilla feature 2660) + void AutoCSetOrder(Ordering order); + + /// Get the way autocompletion lists are ordered. (Scintilla feature 2661) + Ordering AutoCGetOrder(); + + /// Enlarge the document to a particular size of text bytes. (Scintilla feature 2446) + void Allocate(int bytes); + + /// + /// Returns the target converted to UTF8. + /// Return the length in bytes. + /// (Scintilla feature 2447) + /// + unsafe string TargetAsUTF8(); + + /// + /// Set the length of the utf8 argument for calling EncodedFromUTF8. + /// Set to -1 and the string will be measured to the first nul. + /// (Scintilla feature 2448) + /// + void SetLengthForEncode(int bytes); + + /// + /// Translates a UTF8 string into the document encoding. + /// Return the length of the result in bytes. + /// On error return 0. + /// (Scintilla feature 2449) + /// + unsafe string EncodedFromUTF8(string utf8); + + /// + /// Find the position of a column on a line taking into account tabs and + /// multi-byte characters. If beyond end of line, return line end position. + /// (Scintilla feature 2456) + /// + int FindColumn(int line, int column); + + /// Can the caret preferred x position only be changed by explicit movement commands? (Scintilla feature 2457) + CaretSticky GetCaretSticky(); + + /// Stop the caret preferred x position changing when the user types. (Scintilla feature 2458) + void SetCaretSticky(CaretSticky useCaretStickyBehaviour); + + /// Switch between sticky and non-sticky: meant to be bound to a key. (Scintilla feature 2459) + void ToggleCaretSticky(); + + /// Enable/Disable convert-on-paste for line endings (Scintilla feature 2467) + void SetPasteConvertEndings(bool convert); + + /// Get convert-on-paste setting (Scintilla feature 2468) + bool GetPasteConvertEndings(); + + /// Duplicate the selection. If selection empty duplicate the line containing the caret. (Scintilla feature 2469) + void SelectionDuplicate(); + + /// Set background alpha of the caret line. (Scintilla feature 2470) + void SetCaretLineBackAlpha(Alpha alpha); + + /// Get the background alpha of the caret line. (Scintilla feature 2471) + Alpha GetCaretLineBackAlpha(); + + /// Set the style of the caret to be drawn. (Scintilla feature 2512) + void SetCaretStyle(CaretStyle caretStyle); + + /// Returns the current style of the caret. (Scintilla feature 2513) + CaretStyle GetCaretStyle(); + + /// Set the indicator used for IndicatorFillRange and IndicatorClearRange (Scintilla feature 2500) + void SetIndicatorCurrent(int indicator); + + /// Get the current indicator (Scintilla feature 2501) + int GetIndicatorCurrent(); + + /// Set the value used for IndicatorFillRange (Scintilla feature 2502) + void SetIndicatorValue(int value); + + /// Get the current indicator value (Scintilla feature 2503) + int GetIndicatorValue(); + + /// Turn a indicator on over a range. (Scintilla feature 2504) + void IndicatorFillRange(int start, int lengthFill); + + /// Turn a indicator off over a range. (Scintilla feature 2505) + void IndicatorClearRange(int start, int lengthClear); + + /// Are any indicators present at pos? (Scintilla feature 2506) + int IndicatorAllOnFor(int pos); + + /// What value does a particular indicator have at a position? (Scintilla feature 2507) + int IndicatorValueAt(int indicator, int pos); + + /// Where does a particular indicator start? (Scintilla feature 2508) + int IndicatorStart(int indicator, int pos); + + /// Where does a particular indicator end? (Scintilla feature 2509) + int IndicatorEnd(int indicator, int pos); + + /// Set number of entries in position cache (Scintilla feature 2514) + void SetPositionCache(int size); + + /// How many entries are allocated to the position cache? (Scintilla feature 2515) + int GetPositionCache(); + + /// Copy the selection, if selection empty copy the line with the caret (Scintilla feature 2519) + void CopyAllowLine(); + + /// + /// Compact the document buffer and return a read-only pointer to the + /// characters in the document. + /// (Scintilla feature 2520) + /// + IntPtr GetCharacterPointer(); + + /// + /// Return a read-only pointer to a range of characters in the document. + /// May move the gap so that the range is contiguous, but will only move up + /// to lengthRange bytes. + /// (Scintilla feature 2643) + /// + IntPtr GetRangePointer(int start, int lengthRange); + + /// + /// Return a position which, to avoid performance costs, should not be within + /// the range of a call to GetRangePointer. + /// (Scintilla feature 2644) + /// + int GetGapPosition(); + + /// Set the alpha fill colour of the given indicator. (Scintilla feature 2523) + void IndicSetAlpha(int indicator, Alpha alpha); + + /// Get the alpha fill colour of the given indicator. (Scintilla feature 2524) + Alpha IndicGetAlpha(int indicator); + + /// Set the alpha outline colour of the given indicator. (Scintilla feature 2558) + void IndicSetOutlineAlpha(int indicator, Alpha alpha); + + /// Get the alpha outline colour of the given indicator. (Scintilla feature 2559) + Alpha IndicGetOutlineAlpha(int indicator); + + /// Set extra ascent for each line (Scintilla feature 2525) + void SetExtraAscent(int extraAscent); + + /// Get extra ascent for each line (Scintilla feature 2526) + int GetExtraAscent(); + + /// Set extra descent for each line (Scintilla feature 2527) + void SetExtraDescent(int extraDescent); + + /// Get extra descent for each line (Scintilla feature 2528) + int GetExtraDescent(); + + /// Which symbol was defined for markerNumber with MarkerDefine (Scintilla feature 2529) + int MarkerSymbolDefined(int markerNumber); + + /// Set the text in the text margin for a line (Scintilla feature 2530) + unsafe void MarginSetText(int line, string text); + + /// Get the text in the text margin for a line (Scintilla feature 2531) + unsafe string MarginGetText(int line); + + /// Set the style number for the text margin for a line (Scintilla feature 2532) + void MarginSetStyle(int line, int style); + + /// Get the style number for the text margin for a line (Scintilla feature 2533) + int MarginGetStyle(int line); + + /// Set the style in the text margin for a line (Scintilla feature 2534) + unsafe void MarginSetStyles(int line, string styles); + + /// Get the styles in the text margin for a line (Scintilla feature 2535) + unsafe string MarginGetStyles(int line); + + /// Clear the margin text on all lines (Scintilla feature 2536) + void MarginTextClearAll(); + + /// Get the start of the range of style numbers used for margin text (Scintilla feature 2537) + void MarginSetStyleOffset(int style); + + /// Get the start of the range of style numbers used for margin text (Scintilla feature 2538) + int MarginGetStyleOffset(); + + /// Set the margin options. (Scintilla feature 2539) + void SetMarginOptions(MarginOption marginOptions); + + /// Get the margin options. (Scintilla feature 2557) + MarginOption GetMarginOptions(); + + /// Set the annotation text for a line (Scintilla feature 2540) + unsafe void AnnotationSetText(int line, string text); + + /// Get the annotation text for a line (Scintilla feature 2541) + unsafe string AnnotationGetText(int line); + + /// Set the style number for the annotations for a line (Scintilla feature 2542) + void AnnotationSetStyle(int line, int style); + + /// Get the style number for the annotations for a line (Scintilla feature 2543) + int AnnotationGetStyle(int line); + + /// Set the annotation styles for a line (Scintilla feature 2544) + unsafe void AnnotationSetStyles(int line, string styles); + + /// Get the annotation styles for a line (Scintilla feature 2545) + unsafe string AnnotationGetStyles(int line); + + /// Get the number of annotation lines for a line (Scintilla feature 2546) + int AnnotationGetLines(int line); + + /// Clear the annotations from all lines (Scintilla feature 2547) + void AnnotationClearAll(); + + /// Set the visibility for the annotations for a view (Scintilla feature 2548) + void AnnotationSetVisible(AnnotationVisible visible); + + /// Get the visibility for the annotations for a view (Scintilla feature 2549) + AnnotationVisible AnnotationGetVisible(); + + /// Get the start of the range of style numbers used for annotations (Scintilla feature 2550) + void AnnotationSetStyleOffset(int style); + + /// Get the start of the range of style numbers used for annotations (Scintilla feature 2551) + int AnnotationGetStyleOffset(); + + /// Release all extended (>255) style numbers (Scintilla feature 2552) + void ReleaseAllExtendedStyles(); + + /// Allocate some extended (>255) style numbers and return the start of the range (Scintilla feature 2553) + int AllocateExtendedStyles(int numberStyles); + + /// Add a container action to the undo stack (Scintilla feature 2560) + void AddUndoAction(int token, UndoFlags flags); + + /// Find the position of a character from a point within the window. (Scintilla feature 2561) + int CharPositionFromPoint(int x, int y); + + /// + /// Find the position of a character from a point within the window. + /// Return INVALID_POSITION if not close to text. + /// (Scintilla feature 2562) + /// + int CharPositionFromPointClose(int x, int y); + + /// Set whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2668) + void SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch); + + /// Whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2669) + bool GetMouseSelectionRectangularSwitch(); + + /// Set whether multiple selections can be made (Scintilla feature 2563) + void SetMultipleSelection(bool multipleSelection); + + /// Whether multiple selections can be made (Scintilla feature 2564) + bool GetMultipleSelection(); + + /// Set whether typing can be performed into multiple selections (Scintilla feature 2565) + void SetAdditionalSelectionTyping(bool additionalSelectionTyping); + + /// Whether typing can be performed into multiple selections (Scintilla feature 2566) + bool GetAdditionalSelectionTyping(); + + /// Set whether additional carets will blink (Scintilla feature 2567) + void SetAdditionalCaretsBlink(bool additionalCaretsBlink); + + /// Whether additional carets will blink (Scintilla feature 2568) + bool GetAdditionalCaretsBlink(); + + /// Set whether additional carets are visible (Scintilla feature 2608) + void SetAdditionalCaretsVisible(bool additionalCaretsVisible); + + /// Whether additional carets are visible (Scintilla feature 2609) + bool GetAdditionalCaretsVisible(); + + /// How many selections are there? (Scintilla feature 2570) + int GetSelections(); + + /// Is every selected range empty? (Scintilla feature 2650) + bool GetSelectionEmpty(); + + /// Clear selections to a single empty stream selection (Scintilla feature 2571) + void ClearSelections(); + + /// Set a simple selection (Scintilla feature 2572) + void SetSelection(int caret, int anchor); + + /// Add a selection (Scintilla feature 2573) + void AddSelection(int caret, int anchor); + + /// Drop one selection (Scintilla feature 2671) + void DropSelectionN(int selection); + + /// Set the main selection (Scintilla feature 2574) + void SetMainSelection(int selection); + + /// Which selection is the main selection (Scintilla feature 2575) + int GetMainSelection(); + + /// Set the caret position of the nth selection. (Scintilla feature 2576) + void SetSelectionNCaret(int selection, int caret); + + /// Return the caret position of the nth selection. (Scintilla feature 2577) + int GetSelectionNCaret(int selection); + + /// Set the anchor position of the nth selection. (Scintilla feature 2578) + void SetSelectionNAnchor(int selection, int anchor); + + /// Return the anchor position of the nth selection. (Scintilla feature 2579) + int GetSelectionNAnchor(int selection); + + /// Set the virtual space of the caret of the nth selection. (Scintilla feature 2580) + void SetSelectionNCaretVirtualSpace(int selection, int space); + + /// Return the virtual space of the caret of the nth selection. (Scintilla feature 2581) + int GetSelectionNCaretVirtualSpace(int selection); + + /// Set the virtual space of the anchor of the nth selection. (Scintilla feature 2582) + void SetSelectionNAnchorVirtualSpace(int selection, int space); + + /// Return the virtual space of the anchor of the nth selection. (Scintilla feature 2583) + int GetSelectionNAnchorVirtualSpace(int selection); + + /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2584) + void SetSelectionNStart(int selection, int anchor); + + /// Returns the position at the start of the selection. (Scintilla feature 2585) + int GetSelectionNStart(int selection); + + /// Sets the position that ends the selection - this becomes the currentPosition. (Scintilla feature 2586) + void SetSelectionNEnd(int selection, int caret); + + /// Returns the position at the end of the selection. (Scintilla feature 2587) + int GetSelectionNEnd(int selection); + + /// Set the caret position of the rectangular selection. (Scintilla feature 2588) + void SetRectangularSelectionCaret(int caret); + + /// Return the caret position of the rectangular selection. (Scintilla feature 2589) + int GetRectangularSelectionCaret(); + + /// Set the anchor position of the rectangular selection. (Scintilla feature 2590) + void SetRectangularSelectionAnchor(int anchor); + + /// Return the anchor position of the rectangular selection. (Scintilla feature 2591) + int GetRectangularSelectionAnchor(); + + /// Set the virtual space of the caret of the rectangular selection. (Scintilla feature 2592) + void SetRectangularSelectionCaretVirtualSpace(int space); + + /// Return the virtual space of the caret of the rectangular selection. (Scintilla feature 2593) + int GetRectangularSelectionCaretVirtualSpace(); + + /// Set the virtual space of the anchor of the rectangular selection. (Scintilla feature 2594) + void SetRectangularSelectionAnchorVirtualSpace(int space); + + /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature 2595) + int GetRectangularSelectionAnchorVirtualSpace(); + + /// Set options for virtual space behaviour. (Scintilla feature 2596) + void SetVirtualSpaceOptions(VirtualSpace virtualSpaceOptions); + + /// Return options for virtual space behaviour. (Scintilla feature 2597) + VirtualSpace GetVirtualSpaceOptions(); + + /// + /// On GTK, allow selecting the modifier key to use for mouse-based + /// rectangular selection. Often the window manager requires Alt+Mouse Drag + /// for moving windows. + /// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. + /// (Scintilla feature 2598) + /// + void SetRectangularSelectionModifier(int modifier); + + /// Get the modifier key used for rectangular selection. (Scintilla feature 2599) + int GetRectangularSelectionModifier(); + + /// + /// Set the foreground colour of additional selections. + /// Must have previously called SetSelFore with non-zero first argument for this to have an effect. + /// (Scintilla feature 2600) + /// + void SetAdditionalSelFore(Colour fore); + + /// + /// Set the background colour of additional selections. + /// Must have previously called SetSelBack with non-zero first argument for this to have an effect. + /// (Scintilla feature 2601) + /// + void SetAdditionalSelBack(Colour back); + + /// Set the alpha of the selection. (Scintilla feature 2602) + void SetAdditionalSelAlpha(Alpha alpha); + + /// Get the alpha of the selection. (Scintilla feature 2603) + Alpha GetAdditionalSelAlpha(); + + /// Set the foreground colour of additional carets. (Scintilla feature 2604) + void SetAdditionalCaretFore(Colour fore); + + /// Get the foreground colour of additional carets. (Scintilla feature 2605) + Colour GetAdditionalCaretFore(); + + /// Set the main selection to the next selection. (Scintilla feature 2606) + void RotateSelection(); + + /// Swap that caret and anchor of the main selection. (Scintilla feature 2607) + void SwapMainAnchorCaret(); + + /// + /// Add the next occurrence of the main selection to the set of selections as main. + /// If the current selection is empty then select word around caret. + /// (Scintilla feature 2688) + /// + void MultipleSelectAddNext(); + + /// + /// Add each occurrence of the main selection in the target to the set of selections. + /// If the current selection is empty then select word around caret. + /// (Scintilla feature 2689) + /// + void MultipleSelectAddEach(); + + /// + /// Indicate that the internal state of a lexer has changed over a range and therefore + /// there may be a need to redraw. + /// (Scintilla feature 2617) + /// + int ChangeLexerState(int start, int end); + + /// + /// Find the next line at or after lineStart that is a contracted fold header line. + /// Return -1 when no more lines. + /// (Scintilla feature 2618) + /// + int ContractedFoldNext(int lineStart); + + /// Centre current line in window. (Scintilla feature 2619) + void VerticalCentreCaret(); + + /// Move the selected lines up one line, shifting the line above after the selection (Scintilla feature 2620) + void MoveSelectedLinesUp(); + + /// Move the selected lines down one line, shifting the line below before the selection (Scintilla feature 2621) + void MoveSelectedLinesDown(); + + /// Set the identifier reported as idFrom in notification messages. (Scintilla feature 2622) + void SetIdentifier(int identifier); + + /// Get the identifier. (Scintilla feature 2623) + int GetIdentifier(); + + /// Set the width for future RGBA image data. (Scintilla feature 2624) + void RGBAImageSetWidth(int width); + + /// Set the height for future RGBA image data. (Scintilla feature 2625) + void RGBAImageSetHeight(int height); + + /// Set the scale factor in percent for future RGBA image data. (Scintilla feature 2651) + void RGBAImageSetScale(int scalePercent); + + /// + /// Define a marker from RGBA data. + /// It has the width and height from RGBAImageSetWidth/Height + /// (Scintilla feature 2626) + /// + unsafe void MarkerDefineRGBAImage(int markerNumber, string pixels); + + /// + /// Register an RGBA image for use in autocompletion lists. + /// It has the width and height from RGBAImageSetWidth/Height + /// (Scintilla feature 2627) + /// + unsafe void RegisterRGBAImage(int type, string pixels); + + /// Scroll to start of document. (Scintilla feature 2628) + void ScrollToStart(); + + /// Scroll to end of document. (Scintilla feature 2629) + void ScrollToEnd(); + + /// Set the technology used. (Scintilla feature 2630) + void SetTechnology(Technology technology); + + /// Get the tech. (Scintilla feature 2631) + Technology GetTechnology(); + + /// Create an ILoader*. (Scintilla feature 2632) + IntPtr CreateLoader(int bytes, DocumentOption documentOptions); + + /// On OS X, show a find indicator. (Scintilla feature 2640) + void FindIndicatorShow(int start, int end); + + /// On OS X, flash a find indicator, then fade out. (Scintilla feature 2641) + void FindIndicatorFlash(int start, int end); + + /// On OS X, hide the find indicator. (Scintilla feature 2642) + void FindIndicatorHide(); + + /// + /// Move caret to before first visible character on display line. + /// If already there move to first character on display line. + /// (Scintilla feature 2652) + /// + void VCHomeDisplay(); + + /// Like VCHomeDisplay but extending selection to new caret position. (Scintilla feature 2653) + void VCHomeDisplayExtend(); + + /// Is the caret line always visible? (Scintilla feature 2654) + bool GetCaretLineVisibleAlways(); + + /// Sets the caret line to always visible. (Scintilla feature 2655) + void SetCaretLineVisibleAlways(bool alwaysVisible); + + /// Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. (Scintilla feature 2656) + void SetLineEndTypesAllowed(LineEndType lineEndBitSet); + + /// Get the line end types currently allowed. (Scintilla feature 2657) + LineEndType GetLineEndTypesAllowed(); + + /// Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. (Scintilla feature 2658) + LineEndType GetLineEndTypesActive(); + + /// Set the way a character is drawn. (Scintilla feature 2665) + unsafe void SetRepresentation(string encodedCharacter, string representation); + + /// + /// Set the way a character is drawn. + /// Result is NUL-terminated. + /// (Scintilla feature 2666) + /// + unsafe string GetRepresentation(string encodedCharacter); + + /// Remove a character representation. (Scintilla feature 2667) + unsafe void ClearRepresentation(string encodedCharacter); + + /// Start notifying the container of all key presses and commands. (Scintilla feature 3001) + void StartRecord(); + + /// Stop notifying the container of all key presses and commands. (Scintilla feature 3002) + void StopRecord(); + + /// Set the lexing language of the document. (Scintilla feature 4001) + void SetLexer(int lexer); + + /// Retrieve the lexing language of the document. (Scintilla feature 4002) + int GetLexer(); + + /// Colourise a segment of the document using the current lexing language. (Scintilla feature 4003) + void Colourise(int start, int end); + + /// Set up a value that may be used by a lexer for some optional feature. (Scintilla feature 4004) + unsafe void SetProperty(string key, string value); + + /// Set up the key words used by the lexer. (Scintilla feature 4005) + unsafe void SetKeyWords(int keyWordSet, string keyWords); + + /// Set the lexing language of the document based on string name. (Scintilla feature 4006) + unsafe void SetLexerLanguage(string language); + + /// Load a lexer library (dll / so). (Scintilla feature 4007) + unsafe void LoadLexerLibrary(string path); + + /// + /// Retrieve a "property" value previously set with SetProperty. + /// Result is NUL-terminated. + /// (Scintilla feature 4008) + /// + unsafe string GetProperty(string key); + + /// + /// Retrieve a "property" value previously set with SetProperty, + /// with "$()" variable replacement on returned buffer. + /// Result is NUL-terminated. + /// (Scintilla feature 4009) + /// + unsafe string GetPropertyExpanded(string key); + + /// + /// Retrieve a "property" value previously set with SetProperty, + /// interpreted as an int AFTER any "$()" variable replacement. + /// (Scintilla feature 4010) + /// + unsafe int GetPropertyInt(string key, int defaultValue); + + /// + /// Retrieve the name of the lexer. + /// Return the length of the text. + /// Result is NUL-terminated. + /// (Scintilla feature 4012) + /// + unsafe string GetLexerLanguage(); + + /// For private communication between an application and a known lexer. (Scintilla feature 4013) + IntPtr PrivateLexerCall(int operation, IntPtr pointer); + + /// + /// Retrieve a '\n' separated list of properties understood by the current lexer. + /// Result is NUL-terminated. + /// (Scintilla feature 4014) + /// + unsafe string PropertyNames(); + + /// Retrieve the type of a property. (Scintilla feature 4015) + unsafe TypeProperty PropertyType(string name); + + /// + /// Describe a property. + /// Result is NUL-terminated. + /// (Scintilla feature 4016) + /// + unsafe string DescribeProperty(string name); + + /// + /// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. + /// Result is NUL-terminated. + /// (Scintilla feature 4017) + /// + unsafe string DescribeKeyWordSets(); + + /// + /// Bit set of LineEndType enumertion for which line ends beyond the standard + /// LF, CR, and CRLF are supported by the lexer. + /// (Scintilla feature 4018) + /// + int GetLineEndTypesSupported(); + + /// Allocate a set of sub styles for a particular base style, returning start of range (Scintilla feature 4020) + int AllocateSubStyles(int styleBase, int numberStyles); + + /// The starting style number for the sub styles associated with a base style (Scintilla feature 4021) + int GetSubStylesStart(int styleBase); + + /// The number of sub styles associated with a base style (Scintilla feature 4022) + int GetSubStylesLength(int styleBase); + + /// For a sub style, return the base style, else return the argument. (Scintilla feature 4027) + int GetStyleFromSubStyle(int subStyle); + + /// For a secondary style, return the primary style, else return the argument. (Scintilla feature 4028) + int GetPrimaryStyleFromStyle(int style); + + /// Free allocated sub styles (Scintilla feature 4023) + void FreeSubStyles(); + + /// Set the identifiers that are shown in a particular style (Scintilla feature 4024) + unsafe void SetIdentifiers(int style, string identifiers); + + /// + /// Where styles are duplicated by a feature such as active/inactive code + /// return the distance between the two types. + /// (Scintilla feature 4025) + /// + int DistanceToSecondaryStyles(); + + /// + /// Get the set of base styles that can be extended with sub styles + /// Result is NUL-terminated. + /// (Scintilla feature 4026) + /// + unsafe string GetSubStyleBases(); + + /// Retrieve the number of named styles for the lexer. (Scintilla feature 4029) + int GetNamedStyles(); + + /// + /// Retrieve the name of a style. + /// Result is NUL-terminated. + /// (Scintilla feature 4030) + /// + unsafe string NameOfStyle(int style); + + /// + /// Retrieve a ' ' separated list of style tags like "literal quoted string". + /// Result is NUL-terminated. + /// (Scintilla feature 4031) + /// + unsafe string TagsOfStyle(int style); + + /// + /// Retrieve a description of a style. + /// Result is NUL-terminated. + /// (Scintilla feature 4032) + /// + unsafe string DescriptionOfStyle(int style); + + /// Retrieve bidirectional text display state. (Scintilla feature 2708) + Bidirectional GetBidirectional(); + + /// Set bidirectional text display state. (Scintilla feature 2709) + void SetBidirectional(Bidirectional bidirectional); + + /// Retrieve line character index state. (Scintilla feature 2710) + LineCharacterIndexType GetLineCharacterIndex(); + + /// Request line character index be created or its use count increased. (Scintilla feature 2711) + void AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex); + + /// Decrease use count of line character index and remove if 0. (Scintilla feature 2712) + void ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex); + + /// Retrieve the document line containing a position measured in index units. (Scintilla feature 2713) + int LineFromIndexPosition(int pos, LineCharacterIndexType lineCharacterIndex); + + /// Retrieve the position measured in index units at the start of a document line. (Scintilla feature 2714) + int IndexPositionFromLine(int line, LineCharacterIndexType lineCharacterIndex); + + /// + /// Divide each styling byte into lexical class bits (default: 5) and indicator + /// bits (default: 3). If a lexer requires more than 32 lexical states, then this + /// is used to expand the possible states. + /// (Scintilla feature 2090) + /// + void SetStyleBits(int bits); + + /// Retrieve number of bits in style bytes used to hold the lexical state. (Scintilla feature 2091) + int GetStyleBits(); + + /// Retrieve the number of bits the current lexer needs for styling. (Scintilla feature 4011) + int GetStyleBitsNeeded(); + + /// + /// Deprecated in 3.5.5 + /// Always interpret keyboard input as Unicode + /// (Scintilla feature 2521) + /// + void SetKeysUnicode(bool keysUnicode); + + /// Are keys always interpreted as Unicode? (Scintilla feature 2522) + bool GetKeysUnicode(); + + /// Is drawing done in two phases with backgrounds drawn before foregrounds? (Scintilla feature 2283) + bool GetTwoPhaseDraw(); + + /// + /// In twoPhaseDraw mode, drawing is performed in two phases, first the background + /// and then the foreground. This avoids chopping off characters that overlap the next run. + /// (Scintilla feature 2284) + /// + void SetTwoPhaseDraw(bool twoPhase); + + /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ + } +} diff --git a/WakaTime/PluginInfrastructure/MenuCmdID_h.cs b/WakaTime/PluginInfrastructure/MenuCmdID_h.cs index b4e2a28..4d209a5 100644 --- a/WakaTime/PluginInfrastructure/MenuCmdID_h.cs +++ b/WakaTime/PluginInfrastructure/MenuCmdID_h.cs @@ -1,398 +1,398 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -// -// This file should stay in sync with the CPP project file -// "notepad-plus-plus/PowerEditor/src/menuCmdID.h" -// found at -// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/menuCmdID.h - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - public enum NppMenuCmd : uint - { - IDM = 40000, - - IDM_FILE = (IDM + 1000), - IDM_FILE_NEW = (IDM_FILE + 1), - IDM_FILE_OPEN = (IDM_FILE + 2), - IDM_FILE_CLOSE = (IDM_FILE + 3), - IDM_FILE_CLOSEALL = (IDM_FILE + 4), - IDM_FILE_CLOSEALL_BUT_CURRENT = (IDM_FILE + 5), - IDM_FILE_SAVE = (IDM_FILE + 6), - IDM_FILE_SAVEALL = (IDM_FILE + 7), - IDM_FILE_SAVEAS = (IDM_FILE + 8), - //IDM_FILE_ASIAN_LANG = (IDM_FILE + 9), - IDM_FILE_PRINT = (IDM_FILE + 10), - IDM_FILE_PRINTNOW = 1001, - IDM_FILE_EXIT = (IDM_FILE + 11), - IDM_FILE_LOADSESSION = (IDM_FILE + 12), - IDM_FILE_SAVESESSION = (IDM_FILE + 13), - IDM_FILE_RELOAD = (IDM_FILE + 14), - IDM_FILE_SAVECOPYAS = (IDM_FILE + 15), - IDM_FILE_DELETE = (IDM_FILE + 16), - IDM_FILE_RENAME = (IDM_FILE + 17), - - // A mettre � jour si on ajoute nouveau menu item dans le menu "File" - IDM_FILEMENU_LASTONE = IDM_FILE_RENAME, - - IDM_EDIT = (IDM + 2000), - IDM_EDIT_CUT = (IDM_EDIT + 1), - IDM_EDIT_COPY = (IDM_EDIT + 2), - IDM_EDIT_UNDO = (IDM_EDIT + 3), - IDM_EDIT_REDO = (IDM_EDIT + 4), - IDM_EDIT_PASTE = (IDM_EDIT + 5), - IDM_EDIT_DELETE = (IDM_EDIT + 6), - IDM_EDIT_SELECTALL = (IDM_EDIT + 7), - - IDM_EDIT_INS_TAB = (IDM_EDIT + 8), - IDM_EDIT_RMV_TAB = (IDM_EDIT + 9), - IDM_EDIT_DUP_LINE = (IDM_EDIT + 10), - IDM_EDIT_TRANSPOSE_LINE = (IDM_EDIT + 11), - IDM_EDIT_SPLIT_LINES = (IDM_EDIT + 12), - IDM_EDIT_JOIN_LINES = (IDM_EDIT + 13), - IDM_EDIT_LINE_UP = (IDM_EDIT + 14), - IDM_EDIT_LINE_DOWN = (IDM_EDIT + 15), - IDM_EDIT_UPPERCASE = (IDM_EDIT + 16), - IDM_EDIT_LOWERCASE = (IDM_EDIT + 17), - - // Menu macro - IDM_MACRO_STARTRECORDINGMACRO = (IDM_EDIT + 18), - IDM_MACRO_STOPRECORDINGMACRO = (IDM_EDIT + 19), - IDM_MACRO_PLAYBACKRECORDEDMACRO = (IDM_EDIT + 21), - //----------- - - IDM_EDIT_BLOCK_COMMENT = (IDM_EDIT + 22), - IDM_EDIT_STREAM_COMMENT = (IDM_EDIT + 23), - IDM_EDIT_TRIMTRAILING = (IDM_EDIT + 24), - IDM_EDIT_TRIMLINEHEAD = (IDM_EDIT + 42), - IDM_EDIT_TRIM_BOTH = (IDM_EDIT + 43), - IDM_EDIT_EOL2WS = (IDM_EDIT + 44), - IDM_EDIT_TRIMALL = (IDM_EDIT + 45), - IDM_EDIT_TAB2SW = (IDM_EDIT + 46), - IDM_EDIT_SW2TAB = (IDM_EDIT + 47), - - // Menu macro - IDM_MACRO_SAVECURRENTMACRO = (IDM_EDIT + 25), - //----------- - - IDM_EDIT_RTL = (IDM_EDIT + 26), - IDM_EDIT_LTR = (IDM_EDIT + 27), - IDM_EDIT_SETREADONLY = (IDM_EDIT + 28), - IDM_EDIT_FULLPATHTOCLIP = (IDM_EDIT + 29), - IDM_EDIT_FILENAMETOCLIP = (IDM_EDIT + 30), - IDM_EDIT_CURRENTDIRTOCLIP = (IDM_EDIT + 31), - - // Menu macro - IDM_MACRO_RUNMULTIMACRODLG = (IDM_EDIT + 32), - //----------- - - IDM_EDIT_CLEARREADONLY = (IDM_EDIT + 33), - IDM_EDIT_COLUMNMODE = (IDM_EDIT + 34), - IDM_EDIT_BLOCK_COMMENT_SET = (IDM_EDIT + 35), - IDM_EDIT_BLOCK_UNCOMMENT = (IDM_EDIT + 36), - - IDM_EDIT_AUTOCOMPLETE = (50000 + 0), - IDM_EDIT_AUTOCOMPLETE_CURRENTFILE = (50000 + 1), - IDM_EDIT_FUNCCALLTIP = (50000 + 2), - - //Belong to MENU FILE - IDM_OPEN_ALL_RECENT_FILE = (IDM_EDIT + 40), - IDM_CLEAN_RECENT_FILE_LIST = (IDM_EDIT + 41), - - IDM_SEARCH = (IDM + 3000), - - IDM_SEARCH_FIND = (IDM_SEARCH + 1), - IDM_SEARCH_FINDNEXT = (IDM_SEARCH + 2), - IDM_SEARCH_REPLACE = (IDM_SEARCH + 3), - IDM_SEARCH_GOTOLINE = (IDM_SEARCH + 4), - IDM_SEARCH_TOGGLE_BOOKMARK = (IDM_SEARCH + 5), - IDM_SEARCH_NEXT_BOOKMARK = (IDM_SEARCH + 6), - IDM_SEARCH_PREV_BOOKMARK = (IDM_SEARCH + 7), - IDM_SEARCH_CLEAR_BOOKMARKS = (IDM_SEARCH + 8), - IDM_SEARCH_GOTOMATCHINGBRACE = (IDM_SEARCH + 9), - IDM_SEARCH_FINDPREV = (IDM_SEARCH + 10), - IDM_SEARCH_FINDINCREMENT = (IDM_SEARCH + 11), - IDM_SEARCH_FINDINFILES = (IDM_SEARCH + 13), - IDM_SEARCH_VOLATILE_FINDNEXT = (IDM_SEARCH + 14), - IDM_SEARCH_VOLATILE_FINDPREV = (IDM_SEARCH + 15), - IDM_SEARCH_CUTMARKEDLINES = (IDM_SEARCH + 18), - IDM_SEARCH_COPYMARKEDLINES = (IDM_SEARCH + 19), - IDM_SEARCH_PASTEMARKEDLINES = (IDM_SEARCH + 20), - IDM_SEARCH_DELETEMARKEDLINES = (IDM_SEARCH + 21), - IDM_SEARCH_MARKALLEXT1 = (IDM_SEARCH + 22), - IDM_SEARCH_UNMARKALLEXT1 = (IDM_SEARCH + 23), - IDM_SEARCH_MARKALLEXT2 = (IDM_SEARCH + 24), - IDM_SEARCH_UNMARKALLEXT2 = (IDM_SEARCH + 25), - IDM_SEARCH_MARKALLEXT3 = (IDM_SEARCH + 26), - IDM_SEARCH_UNMARKALLEXT3 = (IDM_SEARCH + 27), - IDM_SEARCH_MARKALLEXT4 = (IDM_SEARCH + 28), - IDM_SEARCH_UNMARKALLEXT4 = (IDM_SEARCH + 29), - IDM_SEARCH_MARKALLEXT5 = (IDM_SEARCH + 30), - IDM_SEARCH_UNMARKALLEXT5 = (IDM_SEARCH + 31), - IDM_SEARCH_CLEARALLMARKS = (IDM_SEARCH + 32), - - IDM_SEARCH_GOPREVMARKER1 = (IDM_SEARCH + 33), - IDM_SEARCH_GOPREVMARKER2 = (IDM_SEARCH + 34), - IDM_SEARCH_GOPREVMARKER3 = (IDM_SEARCH + 35), - IDM_SEARCH_GOPREVMARKER4 = (IDM_SEARCH + 36), - IDM_SEARCH_GOPREVMARKER5 = (IDM_SEARCH + 37), - IDM_SEARCH_GOPREVMARKER_DEF = (IDM_SEARCH + 38), - - IDM_SEARCH_GONEXTMARKER1 = (IDM_SEARCH + 39), - IDM_SEARCH_GONEXTMARKER2 = (IDM_SEARCH + 40), - IDM_SEARCH_GONEXTMARKER3 = (IDM_SEARCH + 41), - IDM_SEARCH_GONEXTMARKER4 = (IDM_SEARCH + 42), - IDM_SEARCH_GONEXTMARKER5 = (IDM_SEARCH + 43), - IDM_SEARCH_GONEXTMARKER_DEF = (IDM_SEARCH + 44), - - IDM_FOCUS_ON_FOUND_RESULTS = (IDM_SEARCH + 45), - IDM_SEARCH_GOTONEXTFOUND = (IDM_SEARCH + 46), - IDM_SEARCH_GOTOPREVFOUND = (IDM_SEARCH + 47), - - IDM_SEARCH_SETANDFINDNEXT = (IDM_SEARCH + 48), - IDM_SEARCH_SETANDFINDPREV = (IDM_SEARCH + 49), - IDM_SEARCH_INVERSEMARKS = (IDM_SEARCH + 50), - - IDM_VIEW = (IDM + 4000), - //IDM_VIEW_TOOLBAR_HIDE = (IDM_VIEW + 1), - IDM_VIEW_TOOLBAR_REDUCE = (IDM_VIEW + 2), - IDM_VIEW_TOOLBAR_ENLARGE = (IDM_VIEW + 3), - IDM_VIEW_TOOLBAR_STANDARD = (IDM_VIEW + 4), - IDM_VIEW_REDUCETABBAR = (IDM_VIEW + 5), - IDM_VIEW_LOCKTABBAR = (IDM_VIEW + 6), - IDM_VIEW_DRAWTABBAR_TOPBAR = (IDM_VIEW + 7), - IDM_VIEW_DRAWTABBAR_INACIVETAB = (IDM_VIEW + 8), - IDM_VIEW_POSTIT = (IDM_VIEW + 9), - IDM_VIEW_TOGGLE_FOLDALL = (IDM_VIEW + 10), - IDM_VIEW_USER_DLG = (IDM_VIEW + 11), - IDM_VIEW_LINENUMBER = (IDM_VIEW + 12), - IDM_VIEW_SYMBOLMARGIN = (IDM_VIEW + 13), - IDM_VIEW_FOLDERMAGIN = (IDM_VIEW + 14), - IDM_VIEW_FOLDERMAGIN_SIMPLE = (IDM_VIEW + 15), - IDM_VIEW_FOLDERMAGIN_ARROW = (IDM_VIEW + 16), - IDM_VIEW_FOLDERMAGIN_CIRCLE = (IDM_VIEW + 17), - IDM_VIEW_FOLDERMAGIN_BOX = (IDM_VIEW + 18), - IDM_VIEW_ALL_CHARACTERS = (IDM_VIEW + 19), - IDM_VIEW_INDENT_GUIDE = (IDM_VIEW + 20), - IDM_VIEW_CURLINE_HILITING = (IDM_VIEW + 21), - IDM_VIEW_WRAP = (IDM_VIEW + 22), - IDM_VIEW_ZOOMIN = (IDM_VIEW + 23), - IDM_VIEW_ZOOMOUT = (IDM_VIEW + 24), - IDM_VIEW_TAB_SPACE = (IDM_VIEW + 25), - IDM_VIEW_EOL = (IDM_VIEW + 26), - IDM_VIEW_EDGELINE = (IDM_VIEW + 27), - IDM_VIEW_EDGEBACKGROUND = (IDM_VIEW + 28), - IDM_VIEW_TOGGLE_UNFOLDALL = (IDM_VIEW + 29), - IDM_VIEW_FOLD_CURRENT = (IDM_VIEW + 30), - IDM_VIEW_UNFOLD_CURRENT = (IDM_VIEW + 31), - IDM_VIEW_FULLSCREENTOGGLE = (IDM_VIEW + 32), - IDM_VIEW_ZOOMRESTORE = (IDM_VIEW + 33), - IDM_VIEW_ALWAYSONTOP = (IDM_VIEW + 34), - IDM_VIEW_SYNSCROLLV = (IDM_VIEW + 35), - IDM_VIEW_SYNSCROLLH = (IDM_VIEW + 36), - IDM_VIEW_EDGENONE = (IDM_VIEW + 37), - IDM_VIEW_DRAWTABBAR_CLOSEBOTTUN = (IDM_VIEW + 38), - IDM_VIEW_DRAWTABBAR_DBCLK2CLOSE = (IDM_VIEW + 39), - IDM_VIEW_REFRESHTABAR = (IDM_VIEW + 40), - IDM_VIEW_WRAP_SYMBOL = (IDM_VIEW + 41), - IDM_VIEW_HIDELINES = (IDM_VIEW + 42), - IDM_VIEW_DRAWTABBAR_VERTICAL = (IDM_VIEW + 43), - IDM_VIEW_DRAWTABBAR_MULTILINE = (IDM_VIEW + 44), - IDM_VIEW_DOCCHANGEMARGIN = (IDM_VIEW + 45), - IDM_VIEW_LWDEF = (IDM_VIEW + 46), - IDM_VIEW_LWALIGN = (IDM_VIEW + 47), - IDM_VIEW_LWINDENT = (IDM_VIEW + 48), - IDM_VIEW_SUMMARY = (IDM_VIEW + 49), - - IDM_VIEW_FOLD = (IDM_VIEW + 50), - IDM_VIEW_FOLD_1 = (IDM_VIEW_FOLD + 1), - IDM_VIEW_FOLD_2 = (IDM_VIEW_FOLD + 2), - IDM_VIEW_FOLD_3 = (IDM_VIEW_FOLD + 3), - IDM_VIEW_FOLD_4 = (IDM_VIEW_FOLD + 4), - IDM_VIEW_FOLD_5 = (IDM_VIEW_FOLD + 5), - IDM_VIEW_FOLD_6 = (IDM_VIEW_FOLD + 6), - IDM_VIEW_FOLD_7 = (IDM_VIEW_FOLD + 7), - IDM_VIEW_FOLD_8 = (IDM_VIEW_FOLD + 8), - - IDM_VIEW_UNFOLD = (IDM_VIEW + 60), - IDM_VIEW_UNFOLD_1 = (IDM_VIEW_UNFOLD + 1), - IDM_VIEW_UNFOLD_2 = (IDM_VIEW_UNFOLD + 2), - IDM_VIEW_UNFOLD_3 = (IDM_VIEW_UNFOLD + 3), - IDM_VIEW_UNFOLD_4 = (IDM_VIEW_UNFOLD + 4), - IDM_VIEW_UNFOLD_5 = (IDM_VIEW_UNFOLD + 5), - IDM_VIEW_UNFOLD_6 = (IDM_VIEW_UNFOLD + 6), - IDM_VIEW_UNFOLD_7 = (IDM_VIEW_UNFOLD + 7), - IDM_VIEW_UNFOLD_8 = (IDM_VIEW_UNFOLD + 8), - - IDM_VIEW_GOTO_ANOTHER_VIEW = 10001, - IDM_VIEW_CLONE_TO_ANOTHER_VIEW = 10002, - IDM_VIEW_GOTO_NEW_INSTANCE = 10003, - IDM_VIEW_LOAD_IN_NEW_INSTANCE = 10004, - - IDM_VIEW_SWITCHTO_OTHER_VIEW = (IDM_VIEW + 72), - - IDM_FORMAT = (IDM + 5000), - IDM_FORMAT_TODOS = (IDM_FORMAT + 1), - IDM_FORMAT_TOUNIX = (IDM_FORMAT + 2), - IDM_FORMAT_TOMAC = (IDM_FORMAT + 3), - IDM_FORMAT_ANSI = (IDM_FORMAT + 4), - IDM_FORMAT_UTF_8 = (IDM_FORMAT + 5), - IDM_FORMAT_UCS_2BE = (IDM_FORMAT + 6), - IDM_FORMAT_UCS_2LE = (IDM_FORMAT + 7), - IDM_FORMAT_AS_UTF_8 = (IDM_FORMAT + 8), - IDM_FORMAT_CONV2_ANSI = (IDM_FORMAT + 9), - IDM_FORMAT_CONV2_AS_UTF_8 = (IDM_FORMAT + 10), - IDM_FORMAT_CONV2_UTF_8 = (IDM_FORMAT + 11), - IDM_FORMAT_CONV2_UCS_2BE = (IDM_FORMAT + 12), - IDM_FORMAT_CONV2_UCS_2LE = (IDM_FORMAT + 13), - - IDM_FORMAT_ENCODE = (IDM_FORMAT + 20), - IDM_FORMAT_WIN_1250 = (IDM_FORMAT_ENCODE + 0), - IDM_FORMAT_WIN_1251 = (IDM_FORMAT_ENCODE + 1), - IDM_FORMAT_WIN_1252 = (IDM_FORMAT_ENCODE + 2), - IDM_FORMAT_WIN_1253 = (IDM_FORMAT_ENCODE + 3), - IDM_FORMAT_WIN_1254 = (IDM_FORMAT_ENCODE + 4), - IDM_FORMAT_WIN_1255 = (IDM_FORMAT_ENCODE + 5), - IDM_FORMAT_WIN_1256 = (IDM_FORMAT_ENCODE + 6), - IDM_FORMAT_WIN_1257 = (IDM_FORMAT_ENCODE + 7), - IDM_FORMAT_WIN_1258 = (IDM_FORMAT_ENCODE + 8), - IDM_FORMAT_ISO_8859_1 = (IDM_FORMAT_ENCODE + 9), - IDM_FORMAT_ISO_8859_2 = (IDM_FORMAT_ENCODE + 10), - IDM_FORMAT_ISO_8859_3 = (IDM_FORMAT_ENCODE + 11), - IDM_FORMAT_ISO_8859_4 = (IDM_FORMAT_ENCODE + 12), - IDM_FORMAT_ISO_8859_5 = (IDM_FORMAT_ENCODE + 13), - IDM_FORMAT_ISO_8859_6 = (IDM_FORMAT_ENCODE + 14), - IDM_FORMAT_ISO_8859_7 = (IDM_FORMAT_ENCODE + 15), - IDM_FORMAT_ISO_8859_8 = (IDM_FORMAT_ENCODE + 16), - IDM_FORMAT_ISO_8859_9 = (IDM_FORMAT_ENCODE + 17), - IDM_FORMAT_ISO_8859_10 = (IDM_FORMAT_ENCODE + 18), - IDM_FORMAT_ISO_8859_11 = (IDM_FORMAT_ENCODE + 19), - IDM_FORMAT_ISO_8859_13 = (IDM_FORMAT_ENCODE + 20), - IDM_FORMAT_ISO_8859_14 = (IDM_FORMAT_ENCODE + 21), - IDM_FORMAT_ISO_8859_15 = (IDM_FORMAT_ENCODE + 22), - IDM_FORMAT_ISO_8859_16 = (IDM_FORMAT_ENCODE + 23), - IDM_FORMAT_DOS_437 = (IDM_FORMAT_ENCODE + 24), - IDM_FORMAT_DOS_720 = (IDM_FORMAT_ENCODE + 25), - IDM_FORMAT_DOS_737 = (IDM_FORMAT_ENCODE + 26), - IDM_FORMAT_DOS_775 = (IDM_FORMAT_ENCODE + 27), - IDM_FORMAT_DOS_850 = (IDM_FORMAT_ENCODE + 28), - IDM_FORMAT_DOS_852 = (IDM_FORMAT_ENCODE + 29), - IDM_FORMAT_DOS_855 = (IDM_FORMAT_ENCODE + 30), - IDM_FORMAT_DOS_857 = (IDM_FORMAT_ENCODE + 31), - IDM_FORMAT_DOS_858 = (IDM_FORMAT_ENCODE + 32), - IDM_FORMAT_DOS_860 = (IDM_FORMAT_ENCODE + 33), - IDM_FORMAT_DOS_861 = (IDM_FORMAT_ENCODE + 34), - IDM_FORMAT_DOS_862 = (IDM_FORMAT_ENCODE + 35), - IDM_FORMAT_DOS_863 = (IDM_FORMAT_ENCODE + 36), - IDM_FORMAT_DOS_865 = (IDM_FORMAT_ENCODE + 37), - IDM_FORMAT_DOS_866 = (IDM_FORMAT_ENCODE + 38), - IDM_FORMAT_DOS_869 = (IDM_FORMAT_ENCODE + 39), - IDM_FORMAT_BIG5 = (IDM_FORMAT_ENCODE + 40), - IDM_FORMAT_GB2312 = (IDM_FORMAT_ENCODE + 41), - IDM_FORMAT_SHIFT_JIS = (IDM_FORMAT_ENCODE + 42), - IDM_FORMAT_KOREAN_WIN = (IDM_FORMAT_ENCODE + 43), - IDM_FORMAT_EUC_KR = (IDM_FORMAT_ENCODE + 44), - IDM_FORMAT_TIS_620 = (IDM_FORMAT_ENCODE + 45), - IDM_FORMAT_MAC_CYRILLIC = (IDM_FORMAT_ENCODE + 46), - IDM_FORMAT_KOI8U_CYRILLIC = (IDM_FORMAT_ENCODE + 47), - IDM_FORMAT_KOI8R_CYRILLIC = (IDM_FORMAT_ENCODE + 48), - IDM_FORMAT_ENCODE_END = IDM_FORMAT_KOI8R_CYRILLIC, - - //#define IDM_FORMAT_CONVERT 200 - - IDM_LANG = (IDM + 6000), - IDM_LANGSTYLE_CONFIG_DLG = (IDM_LANG + 1), - IDM_LANG_C = (IDM_LANG + 2), - IDM_LANG_CPP = (IDM_LANG + 3), - IDM_LANG_JAVA = (IDM_LANG + 4), - IDM_LANG_HTML = (IDM_LANG + 5), - IDM_LANG_XML = (IDM_LANG + 6), - IDM_LANG_JS = (IDM_LANG + 7), - IDM_LANG_PHP = (IDM_LANG + 8), - IDM_LANG_ASP = (IDM_LANG + 9), - IDM_LANG_CSS = (IDM_LANG + 10), - IDM_LANG_PASCAL = (IDM_LANG + 11), - IDM_LANG_PYTHON = (IDM_LANG + 12), - IDM_LANG_PERL = (IDM_LANG + 13), - IDM_LANG_OBJC = (IDM_LANG + 14), - IDM_LANG_ASCII = (IDM_LANG + 15), - IDM_LANG_TEXT = (IDM_LANG + 16), - IDM_LANG_RC = (IDM_LANG + 17), - IDM_LANG_MAKEFILE = (IDM_LANG + 18), - IDM_LANG_INI = (IDM_LANG + 19), - IDM_LANG_SQL = (IDM_LANG + 20), - IDM_LANG_VB = (IDM_LANG + 21), - IDM_LANG_BATCH = (IDM_LANG + 22), - IDM_LANG_CS = (IDM_LANG + 23), - IDM_LANG_LUA = (IDM_LANG + 24), - IDM_LANG_TEX = (IDM_LANG + 25), - IDM_LANG_FORTRAN = (IDM_LANG + 26), - IDM_LANG_BASH = (IDM_LANG + 27), - IDM_LANG_FLASH = (IDM_LANG + 28), - IDM_LANG_NSIS = (IDM_LANG + 29), - IDM_LANG_TCL = (IDM_LANG + 30), - IDM_LANG_LISP = (IDM_LANG + 31), - IDM_LANG_SCHEME = (IDM_LANG + 32), - IDM_LANG_ASM = (IDM_LANG + 33), - IDM_LANG_DIFF = (IDM_LANG + 34), - IDM_LANG_PROPS = (IDM_LANG + 35), - IDM_LANG_PS = (IDM_LANG + 36), - IDM_LANG_RUBY = (IDM_LANG + 37), - IDM_LANG_SMALLTALK = (IDM_LANG + 38), - IDM_LANG_VHDL = (IDM_LANG + 39), - IDM_LANG_CAML = (IDM_LANG + 40), - IDM_LANG_KIX = (IDM_LANG + 41), - IDM_LANG_ADA = (IDM_LANG + 42), - IDM_LANG_VERILOG = (IDM_LANG + 43), - IDM_LANG_AU3 = (IDM_LANG + 44), - IDM_LANG_MATLAB = (IDM_LANG + 45), - IDM_LANG_HASKELL = (IDM_LANG + 46), - IDM_LANG_INNO = (IDM_LANG + 47), - IDM_LANG_CMAKE = (IDM_LANG + 48), - IDM_LANG_YAML = (IDM_LANG + 49), - IDM_LANG_COBOL = (IDM_LANG + 50), - IDM_LANG_D = (IDM_LANG + 51), - IDM_LANG_GUI4CLI = (IDM_LANG + 52), - IDM_LANG_POWERSHELL = (IDM_LANG + 53), - IDM_LANG_R = (IDM_LANG + 54), - IDM_LANG_JSP = (IDM_LANG + 55), - IDM_LANG_EXTERNAL = (IDM_LANG + 65), - IDM_LANG_EXTERNAL_LIMIT = (IDM_LANG + 79), - IDM_LANG_USER = (IDM_LANG + 80), //46080 - IDM_LANG_USER_LIMIT = (IDM_LANG + 110), //46110 - - IDM_ABOUT = (IDM + 7000), - IDM_HOMESWEETHOME = (IDM_ABOUT + 1), - IDM_PROJECTPAGE = (IDM_ABOUT + 2), - IDM_ONLINEHELP = (IDM_ABOUT + 3), - IDM_FORUM = (IDM_ABOUT + 4), - IDM_PLUGINSHOME = (IDM_ABOUT + 5), - IDM_UPDATE_NPP = (IDM_ABOUT + 6), - IDM_WIKIFAQ = (IDM_ABOUT + 7), - IDM_HELP = (IDM_ABOUT + 8), - - IDM_SETTING = (IDM + 8000), - IDM_SETTING_TAB_SIZE = (IDM_SETTING + 1), - IDM_SETTING_TAB_REPLCESPACE = (IDM_SETTING + 2), - IDM_SETTING_HISTORY_SIZE = (IDM_SETTING + 3), - IDM_SETTING_EDGE_SIZE = (IDM_SETTING + 4), - IDM_SETTING_IMPORTPLUGIN = (IDM_SETTING + 5), - IDM_SETTING_IMPORTSTYLETHEMS = (IDM_SETTING + 6), - IDM_SETTING_TRAYICON = (IDM_SETTING + 8), - IDM_SETTING_SHORTCUT_MAPPER = (IDM_SETTING + 9), - IDM_SETTING_REMEMBER_LAST_SESSION = (IDM_SETTING + 10), - IDM_SETTING_PREFERECE = (IDM_SETTING + 11), - IDM_SETTING_AUTOCNBCHAR = (IDM_SETTING + 15), - IDM_SETTING_SHORTCUT_MAPPER_MACRO = (IDM_SETTING + 16), - IDM_SETTING_SHORTCUT_MAPPER_RUN = (IDM_SETTING + 17), - IDM_SETTING_EDITCONTEXTMENU = (IDM_SETTING + 18), - - IDM_EXECUTE = (IDM + 9000), - - IDM_SYSTRAYPOPUP = (IDM + 3100), - IDM_SYSTRAYPOPUP_ACTIVATE = (IDM_SYSTRAYPOPUP + 1), - IDM_SYSTRAYPOPUP_NEWDOC = (IDM_SYSTRAYPOPUP + 2), - IDM_SYSTRAYPOPUP_NEW_AND_PASTE = (IDM_SYSTRAYPOPUP + 3), - IDM_SYSTRAYPOPUP_OPENFILE = (IDM_SYSTRAYPOPUP + 4), - IDM_SYSTRAYPOPUP_CLOSE = (IDM_SYSTRAYPOPUP + 5) - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +// +// This file should stay in sync with the CPP project file +// "notepad-plus-plus/PowerEditor/src/menuCmdID.h" +// found at +// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/menuCmdID.h + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + public enum NppMenuCmd : uint + { + IDM = 40000, + + IDM_FILE = (IDM + 1000), + IDM_FILE_NEW = (IDM_FILE + 1), + IDM_FILE_OPEN = (IDM_FILE + 2), + IDM_FILE_CLOSE = (IDM_FILE + 3), + IDM_FILE_CLOSEALL = (IDM_FILE + 4), + IDM_FILE_CLOSEALL_BUT_CURRENT = (IDM_FILE + 5), + IDM_FILE_SAVE = (IDM_FILE + 6), + IDM_FILE_SAVEALL = (IDM_FILE + 7), + IDM_FILE_SAVEAS = (IDM_FILE + 8), + //IDM_FILE_ASIAN_LANG = (IDM_FILE + 9), + IDM_FILE_PRINT = (IDM_FILE + 10), + IDM_FILE_PRINTNOW = 1001, + IDM_FILE_EXIT = (IDM_FILE + 11), + IDM_FILE_LOADSESSION = (IDM_FILE + 12), + IDM_FILE_SAVESESSION = (IDM_FILE + 13), + IDM_FILE_RELOAD = (IDM_FILE + 14), + IDM_FILE_SAVECOPYAS = (IDM_FILE + 15), + IDM_FILE_DELETE = (IDM_FILE + 16), + IDM_FILE_RENAME = (IDM_FILE + 17), + + // A mettre � jour si on ajoute nouveau menu item dans le menu "File" + IDM_FILEMENU_LASTONE = IDM_FILE_RENAME, + + IDM_EDIT = (IDM + 2000), + IDM_EDIT_CUT = (IDM_EDIT + 1), + IDM_EDIT_COPY = (IDM_EDIT + 2), + IDM_EDIT_UNDO = (IDM_EDIT + 3), + IDM_EDIT_REDO = (IDM_EDIT + 4), + IDM_EDIT_PASTE = (IDM_EDIT + 5), + IDM_EDIT_DELETE = (IDM_EDIT + 6), + IDM_EDIT_SELECTALL = (IDM_EDIT + 7), + + IDM_EDIT_INS_TAB = (IDM_EDIT + 8), + IDM_EDIT_RMV_TAB = (IDM_EDIT + 9), + IDM_EDIT_DUP_LINE = (IDM_EDIT + 10), + IDM_EDIT_TRANSPOSE_LINE = (IDM_EDIT + 11), + IDM_EDIT_SPLIT_LINES = (IDM_EDIT + 12), + IDM_EDIT_JOIN_LINES = (IDM_EDIT + 13), + IDM_EDIT_LINE_UP = (IDM_EDIT + 14), + IDM_EDIT_LINE_DOWN = (IDM_EDIT + 15), + IDM_EDIT_UPPERCASE = (IDM_EDIT + 16), + IDM_EDIT_LOWERCASE = (IDM_EDIT + 17), + + // Menu macro + IDM_MACRO_STARTRECORDINGMACRO = (IDM_EDIT + 18), + IDM_MACRO_STOPRECORDINGMACRO = (IDM_EDIT + 19), + IDM_MACRO_PLAYBACKRECORDEDMACRO = (IDM_EDIT + 21), + //----------- + + IDM_EDIT_BLOCK_COMMENT = (IDM_EDIT + 22), + IDM_EDIT_STREAM_COMMENT = (IDM_EDIT + 23), + IDM_EDIT_TRIMTRAILING = (IDM_EDIT + 24), + IDM_EDIT_TRIMLINEHEAD = (IDM_EDIT + 42), + IDM_EDIT_TRIM_BOTH = (IDM_EDIT + 43), + IDM_EDIT_EOL2WS = (IDM_EDIT + 44), + IDM_EDIT_TRIMALL = (IDM_EDIT + 45), + IDM_EDIT_TAB2SW = (IDM_EDIT + 46), + IDM_EDIT_SW2TAB = (IDM_EDIT + 47), + + // Menu macro + IDM_MACRO_SAVECURRENTMACRO = (IDM_EDIT + 25), + //----------- + + IDM_EDIT_RTL = (IDM_EDIT + 26), + IDM_EDIT_LTR = (IDM_EDIT + 27), + IDM_EDIT_SETREADONLY = (IDM_EDIT + 28), + IDM_EDIT_FULLPATHTOCLIP = (IDM_EDIT + 29), + IDM_EDIT_FILENAMETOCLIP = (IDM_EDIT + 30), + IDM_EDIT_CURRENTDIRTOCLIP = (IDM_EDIT + 31), + + // Menu macro + IDM_MACRO_RUNMULTIMACRODLG = (IDM_EDIT + 32), + //----------- + + IDM_EDIT_CLEARREADONLY = (IDM_EDIT + 33), + IDM_EDIT_COLUMNMODE = (IDM_EDIT + 34), + IDM_EDIT_BLOCK_COMMENT_SET = (IDM_EDIT + 35), + IDM_EDIT_BLOCK_UNCOMMENT = (IDM_EDIT + 36), + + IDM_EDIT_AUTOCOMPLETE = (50000 + 0), + IDM_EDIT_AUTOCOMPLETE_CURRENTFILE = (50000 + 1), + IDM_EDIT_FUNCCALLTIP = (50000 + 2), + + //Belong to MENU FILE + IDM_OPEN_ALL_RECENT_FILE = (IDM_EDIT + 40), + IDM_CLEAN_RECENT_FILE_LIST = (IDM_EDIT + 41), + + IDM_SEARCH = (IDM + 3000), + + IDM_SEARCH_FIND = (IDM_SEARCH + 1), + IDM_SEARCH_FINDNEXT = (IDM_SEARCH + 2), + IDM_SEARCH_REPLACE = (IDM_SEARCH + 3), + IDM_SEARCH_GOTOLINE = (IDM_SEARCH + 4), + IDM_SEARCH_TOGGLE_BOOKMARK = (IDM_SEARCH + 5), + IDM_SEARCH_NEXT_BOOKMARK = (IDM_SEARCH + 6), + IDM_SEARCH_PREV_BOOKMARK = (IDM_SEARCH + 7), + IDM_SEARCH_CLEAR_BOOKMARKS = (IDM_SEARCH + 8), + IDM_SEARCH_GOTOMATCHINGBRACE = (IDM_SEARCH + 9), + IDM_SEARCH_FINDPREV = (IDM_SEARCH + 10), + IDM_SEARCH_FINDINCREMENT = (IDM_SEARCH + 11), + IDM_SEARCH_FINDINFILES = (IDM_SEARCH + 13), + IDM_SEARCH_VOLATILE_FINDNEXT = (IDM_SEARCH + 14), + IDM_SEARCH_VOLATILE_FINDPREV = (IDM_SEARCH + 15), + IDM_SEARCH_CUTMARKEDLINES = (IDM_SEARCH + 18), + IDM_SEARCH_COPYMARKEDLINES = (IDM_SEARCH + 19), + IDM_SEARCH_PASTEMARKEDLINES = (IDM_SEARCH + 20), + IDM_SEARCH_DELETEMARKEDLINES = (IDM_SEARCH + 21), + IDM_SEARCH_MARKALLEXT1 = (IDM_SEARCH + 22), + IDM_SEARCH_UNMARKALLEXT1 = (IDM_SEARCH + 23), + IDM_SEARCH_MARKALLEXT2 = (IDM_SEARCH + 24), + IDM_SEARCH_UNMARKALLEXT2 = (IDM_SEARCH + 25), + IDM_SEARCH_MARKALLEXT3 = (IDM_SEARCH + 26), + IDM_SEARCH_UNMARKALLEXT3 = (IDM_SEARCH + 27), + IDM_SEARCH_MARKALLEXT4 = (IDM_SEARCH + 28), + IDM_SEARCH_UNMARKALLEXT4 = (IDM_SEARCH + 29), + IDM_SEARCH_MARKALLEXT5 = (IDM_SEARCH + 30), + IDM_SEARCH_UNMARKALLEXT5 = (IDM_SEARCH + 31), + IDM_SEARCH_CLEARALLMARKS = (IDM_SEARCH + 32), + + IDM_SEARCH_GOPREVMARKER1 = (IDM_SEARCH + 33), + IDM_SEARCH_GOPREVMARKER2 = (IDM_SEARCH + 34), + IDM_SEARCH_GOPREVMARKER3 = (IDM_SEARCH + 35), + IDM_SEARCH_GOPREVMARKER4 = (IDM_SEARCH + 36), + IDM_SEARCH_GOPREVMARKER5 = (IDM_SEARCH + 37), + IDM_SEARCH_GOPREVMARKER_DEF = (IDM_SEARCH + 38), + + IDM_SEARCH_GONEXTMARKER1 = (IDM_SEARCH + 39), + IDM_SEARCH_GONEXTMARKER2 = (IDM_SEARCH + 40), + IDM_SEARCH_GONEXTMARKER3 = (IDM_SEARCH + 41), + IDM_SEARCH_GONEXTMARKER4 = (IDM_SEARCH + 42), + IDM_SEARCH_GONEXTMARKER5 = (IDM_SEARCH + 43), + IDM_SEARCH_GONEXTMARKER_DEF = (IDM_SEARCH + 44), + + IDM_FOCUS_ON_FOUND_RESULTS = (IDM_SEARCH + 45), + IDM_SEARCH_GOTONEXTFOUND = (IDM_SEARCH + 46), + IDM_SEARCH_GOTOPREVFOUND = (IDM_SEARCH + 47), + + IDM_SEARCH_SETANDFINDNEXT = (IDM_SEARCH + 48), + IDM_SEARCH_SETANDFINDPREV = (IDM_SEARCH + 49), + IDM_SEARCH_INVERSEMARKS = (IDM_SEARCH + 50), + + IDM_VIEW = (IDM + 4000), + //IDM_VIEW_TOOLBAR_HIDE = (IDM_VIEW + 1), + IDM_VIEW_TOOLBAR_REDUCE = (IDM_VIEW + 2), + IDM_VIEW_TOOLBAR_ENLARGE = (IDM_VIEW + 3), + IDM_VIEW_TOOLBAR_STANDARD = (IDM_VIEW + 4), + IDM_VIEW_REDUCETABBAR = (IDM_VIEW + 5), + IDM_VIEW_LOCKTABBAR = (IDM_VIEW + 6), + IDM_VIEW_DRAWTABBAR_TOPBAR = (IDM_VIEW + 7), + IDM_VIEW_DRAWTABBAR_INACIVETAB = (IDM_VIEW + 8), + IDM_VIEW_POSTIT = (IDM_VIEW + 9), + IDM_VIEW_TOGGLE_FOLDALL = (IDM_VIEW + 10), + IDM_VIEW_USER_DLG = (IDM_VIEW + 11), + IDM_VIEW_LINENUMBER = (IDM_VIEW + 12), + IDM_VIEW_SYMBOLMARGIN = (IDM_VIEW + 13), + IDM_VIEW_FOLDERMAGIN = (IDM_VIEW + 14), + IDM_VIEW_FOLDERMAGIN_SIMPLE = (IDM_VIEW + 15), + IDM_VIEW_FOLDERMAGIN_ARROW = (IDM_VIEW + 16), + IDM_VIEW_FOLDERMAGIN_CIRCLE = (IDM_VIEW + 17), + IDM_VIEW_FOLDERMAGIN_BOX = (IDM_VIEW + 18), + IDM_VIEW_ALL_CHARACTERS = (IDM_VIEW + 19), + IDM_VIEW_INDENT_GUIDE = (IDM_VIEW + 20), + IDM_VIEW_CURLINE_HILITING = (IDM_VIEW + 21), + IDM_VIEW_WRAP = (IDM_VIEW + 22), + IDM_VIEW_ZOOMIN = (IDM_VIEW + 23), + IDM_VIEW_ZOOMOUT = (IDM_VIEW + 24), + IDM_VIEW_TAB_SPACE = (IDM_VIEW + 25), + IDM_VIEW_EOL = (IDM_VIEW + 26), + IDM_VIEW_EDGELINE = (IDM_VIEW + 27), + IDM_VIEW_EDGEBACKGROUND = (IDM_VIEW + 28), + IDM_VIEW_TOGGLE_UNFOLDALL = (IDM_VIEW + 29), + IDM_VIEW_FOLD_CURRENT = (IDM_VIEW + 30), + IDM_VIEW_UNFOLD_CURRENT = (IDM_VIEW + 31), + IDM_VIEW_FULLSCREENTOGGLE = (IDM_VIEW + 32), + IDM_VIEW_ZOOMRESTORE = (IDM_VIEW + 33), + IDM_VIEW_ALWAYSONTOP = (IDM_VIEW + 34), + IDM_VIEW_SYNSCROLLV = (IDM_VIEW + 35), + IDM_VIEW_SYNSCROLLH = (IDM_VIEW + 36), + IDM_VIEW_EDGENONE = (IDM_VIEW + 37), + IDM_VIEW_DRAWTABBAR_CLOSEBOTTUN = (IDM_VIEW + 38), + IDM_VIEW_DRAWTABBAR_DBCLK2CLOSE = (IDM_VIEW + 39), + IDM_VIEW_REFRESHTABAR = (IDM_VIEW + 40), + IDM_VIEW_WRAP_SYMBOL = (IDM_VIEW + 41), + IDM_VIEW_HIDELINES = (IDM_VIEW + 42), + IDM_VIEW_DRAWTABBAR_VERTICAL = (IDM_VIEW + 43), + IDM_VIEW_DRAWTABBAR_MULTILINE = (IDM_VIEW + 44), + IDM_VIEW_DOCCHANGEMARGIN = (IDM_VIEW + 45), + IDM_VIEW_LWDEF = (IDM_VIEW + 46), + IDM_VIEW_LWALIGN = (IDM_VIEW + 47), + IDM_VIEW_LWINDENT = (IDM_VIEW + 48), + IDM_VIEW_SUMMARY = (IDM_VIEW + 49), + + IDM_VIEW_FOLD = (IDM_VIEW + 50), + IDM_VIEW_FOLD_1 = (IDM_VIEW_FOLD + 1), + IDM_VIEW_FOLD_2 = (IDM_VIEW_FOLD + 2), + IDM_VIEW_FOLD_3 = (IDM_VIEW_FOLD + 3), + IDM_VIEW_FOLD_4 = (IDM_VIEW_FOLD + 4), + IDM_VIEW_FOLD_5 = (IDM_VIEW_FOLD + 5), + IDM_VIEW_FOLD_6 = (IDM_VIEW_FOLD + 6), + IDM_VIEW_FOLD_7 = (IDM_VIEW_FOLD + 7), + IDM_VIEW_FOLD_8 = (IDM_VIEW_FOLD + 8), + + IDM_VIEW_UNFOLD = (IDM_VIEW + 60), + IDM_VIEW_UNFOLD_1 = (IDM_VIEW_UNFOLD + 1), + IDM_VIEW_UNFOLD_2 = (IDM_VIEW_UNFOLD + 2), + IDM_VIEW_UNFOLD_3 = (IDM_VIEW_UNFOLD + 3), + IDM_VIEW_UNFOLD_4 = (IDM_VIEW_UNFOLD + 4), + IDM_VIEW_UNFOLD_5 = (IDM_VIEW_UNFOLD + 5), + IDM_VIEW_UNFOLD_6 = (IDM_VIEW_UNFOLD + 6), + IDM_VIEW_UNFOLD_7 = (IDM_VIEW_UNFOLD + 7), + IDM_VIEW_UNFOLD_8 = (IDM_VIEW_UNFOLD + 8), + + IDM_VIEW_GOTO_ANOTHER_VIEW = 10001, + IDM_VIEW_CLONE_TO_ANOTHER_VIEW = 10002, + IDM_VIEW_GOTO_NEW_INSTANCE = 10003, + IDM_VIEW_LOAD_IN_NEW_INSTANCE = 10004, + + IDM_VIEW_SWITCHTO_OTHER_VIEW = (IDM_VIEW + 72), + + IDM_FORMAT = (IDM + 5000), + IDM_FORMAT_TODOS = (IDM_FORMAT + 1), + IDM_FORMAT_TOUNIX = (IDM_FORMAT + 2), + IDM_FORMAT_TOMAC = (IDM_FORMAT + 3), + IDM_FORMAT_ANSI = (IDM_FORMAT + 4), + IDM_FORMAT_UTF_8 = (IDM_FORMAT + 5), + IDM_FORMAT_UCS_2BE = (IDM_FORMAT + 6), + IDM_FORMAT_UCS_2LE = (IDM_FORMAT + 7), + IDM_FORMAT_AS_UTF_8 = (IDM_FORMAT + 8), + IDM_FORMAT_CONV2_ANSI = (IDM_FORMAT + 9), + IDM_FORMAT_CONV2_AS_UTF_8 = (IDM_FORMAT + 10), + IDM_FORMAT_CONV2_UTF_8 = (IDM_FORMAT + 11), + IDM_FORMAT_CONV2_UCS_2BE = (IDM_FORMAT + 12), + IDM_FORMAT_CONV2_UCS_2LE = (IDM_FORMAT + 13), + + IDM_FORMAT_ENCODE = (IDM_FORMAT + 20), + IDM_FORMAT_WIN_1250 = (IDM_FORMAT_ENCODE + 0), + IDM_FORMAT_WIN_1251 = (IDM_FORMAT_ENCODE + 1), + IDM_FORMAT_WIN_1252 = (IDM_FORMAT_ENCODE + 2), + IDM_FORMAT_WIN_1253 = (IDM_FORMAT_ENCODE + 3), + IDM_FORMAT_WIN_1254 = (IDM_FORMAT_ENCODE + 4), + IDM_FORMAT_WIN_1255 = (IDM_FORMAT_ENCODE + 5), + IDM_FORMAT_WIN_1256 = (IDM_FORMAT_ENCODE + 6), + IDM_FORMAT_WIN_1257 = (IDM_FORMAT_ENCODE + 7), + IDM_FORMAT_WIN_1258 = (IDM_FORMAT_ENCODE + 8), + IDM_FORMAT_ISO_8859_1 = (IDM_FORMAT_ENCODE + 9), + IDM_FORMAT_ISO_8859_2 = (IDM_FORMAT_ENCODE + 10), + IDM_FORMAT_ISO_8859_3 = (IDM_FORMAT_ENCODE + 11), + IDM_FORMAT_ISO_8859_4 = (IDM_FORMAT_ENCODE + 12), + IDM_FORMAT_ISO_8859_5 = (IDM_FORMAT_ENCODE + 13), + IDM_FORMAT_ISO_8859_6 = (IDM_FORMAT_ENCODE + 14), + IDM_FORMAT_ISO_8859_7 = (IDM_FORMAT_ENCODE + 15), + IDM_FORMAT_ISO_8859_8 = (IDM_FORMAT_ENCODE + 16), + IDM_FORMAT_ISO_8859_9 = (IDM_FORMAT_ENCODE + 17), + IDM_FORMAT_ISO_8859_10 = (IDM_FORMAT_ENCODE + 18), + IDM_FORMAT_ISO_8859_11 = (IDM_FORMAT_ENCODE + 19), + IDM_FORMAT_ISO_8859_13 = (IDM_FORMAT_ENCODE + 20), + IDM_FORMAT_ISO_8859_14 = (IDM_FORMAT_ENCODE + 21), + IDM_FORMAT_ISO_8859_15 = (IDM_FORMAT_ENCODE + 22), + IDM_FORMAT_ISO_8859_16 = (IDM_FORMAT_ENCODE + 23), + IDM_FORMAT_DOS_437 = (IDM_FORMAT_ENCODE + 24), + IDM_FORMAT_DOS_720 = (IDM_FORMAT_ENCODE + 25), + IDM_FORMAT_DOS_737 = (IDM_FORMAT_ENCODE + 26), + IDM_FORMAT_DOS_775 = (IDM_FORMAT_ENCODE + 27), + IDM_FORMAT_DOS_850 = (IDM_FORMAT_ENCODE + 28), + IDM_FORMAT_DOS_852 = (IDM_FORMAT_ENCODE + 29), + IDM_FORMAT_DOS_855 = (IDM_FORMAT_ENCODE + 30), + IDM_FORMAT_DOS_857 = (IDM_FORMAT_ENCODE + 31), + IDM_FORMAT_DOS_858 = (IDM_FORMAT_ENCODE + 32), + IDM_FORMAT_DOS_860 = (IDM_FORMAT_ENCODE + 33), + IDM_FORMAT_DOS_861 = (IDM_FORMAT_ENCODE + 34), + IDM_FORMAT_DOS_862 = (IDM_FORMAT_ENCODE + 35), + IDM_FORMAT_DOS_863 = (IDM_FORMAT_ENCODE + 36), + IDM_FORMAT_DOS_865 = (IDM_FORMAT_ENCODE + 37), + IDM_FORMAT_DOS_866 = (IDM_FORMAT_ENCODE + 38), + IDM_FORMAT_DOS_869 = (IDM_FORMAT_ENCODE + 39), + IDM_FORMAT_BIG5 = (IDM_FORMAT_ENCODE + 40), + IDM_FORMAT_GB2312 = (IDM_FORMAT_ENCODE + 41), + IDM_FORMAT_SHIFT_JIS = (IDM_FORMAT_ENCODE + 42), + IDM_FORMAT_KOREAN_WIN = (IDM_FORMAT_ENCODE + 43), + IDM_FORMAT_EUC_KR = (IDM_FORMAT_ENCODE + 44), + IDM_FORMAT_TIS_620 = (IDM_FORMAT_ENCODE + 45), + IDM_FORMAT_MAC_CYRILLIC = (IDM_FORMAT_ENCODE + 46), + IDM_FORMAT_KOI8U_CYRILLIC = (IDM_FORMAT_ENCODE + 47), + IDM_FORMAT_KOI8R_CYRILLIC = (IDM_FORMAT_ENCODE + 48), + IDM_FORMAT_ENCODE_END = IDM_FORMAT_KOI8R_CYRILLIC, + + //#define IDM_FORMAT_CONVERT 200 + + IDM_LANG = (IDM + 6000), + IDM_LANGSTYLE_CONFIG_DLG = (IDM_LANG + 1), + IDM_LANG_C = (IDM_LANG + 2), + IDM_LANG_CPP = (IDM_LANG + 3), + IDM_LANG_JAVA = (IDM_LANG + 4), + IDM_LANG_HTML = (IDM_LANG + 5), + IDM_LANG_XML = (IDM_LANG + 6), + IDM_LANG_JS = (IDM_LANG + 7), + IDM_LANG_PHP = (IDM_LANG + 8), + IDM_LANG_ASP = (IDM_LANG + 9), + IDM_LANG_CSS = (IDM_LANG + 10), + IDM_LANG_PASCAL = (IDM_LANG + 11), + IDM_LANG_PYTHON = (IDM_LANG + 12), + IDM_LANG_PERL = (IDM_LANG + 13), + IDM_LANG_OBJC = (IDM_LANG + 14), + IDM_LANG_ASCII = (IDM_LANG + 15), + IDM_LANG_TEXT = (IDM_LANG + 16), + IDM_LANG_RC = (IDM_LANG + 17), + IDM_LANG_MAKEFILE = (IDM_LANG + 18), + IDM_LANG_INI = (IDM_LANG + 19), + IDM_LANG_SQL = (IDM_LANG + 20), + IDM_LANG_VB = (IDM_LANG + 21), + IDM_LANG_BATCH = (IDM_LANG + 22), + IDM_LANG_CS = (IDM_LANG + 23), + IDM_LANG_LUA = (IDM_LANG + 24), + IDM_LANG_TEX = (IDM_LANG + 25), + IDM_LANG_FORTRAN = (IDM_LANG + 26), + IDM_LANG_BASH = (IDM_LANG + 27), + IDM_LANG_FLASH = (IDM_LANG + 28), + IDM_LANG_NSIS = (IDM_LANG + 29), + IDM_LANG_TCL = (IDM_LANG + 30), + IDM_LANG_LISP = (IDM_LANG + 31), + IDM_LANG_SCHEME = (IDM_LANG + 32), + IDM_LANG_ASM = (IDM_LANG + 33), + IDM_LANG_DIFF = (IDM_LANG + 34), + IDM_LANG_PROPS = (IDM_LANG + 35), + IDM_LANG_PS = (IDM_LANG + 36), + IDM_LANG_RUBY = (IDM_LANG + 37), + IDM_LANG_SMALLTALK = (IDM_LANG + 38), + IDM_LANG_VHDL = (IDM_LANG + 39), + IDM_LANG_CAML = (IDM_LANG + 40), + IDM_LANG_KIX = (IDM_LANG + 41), + IDM_LANG_ADA = (IDM_LANG + 42), + IDM_LANG_VERILOG = (IDM_LANG + 43), + IDM_LANG_AU3 = (IDM_LANG + 44), + IDM_LANG_MATLAB = (IDM_LANG + 45), + IDM_LANG_HASKELL = (IDM_LANG + 46), + IDM_LANG_INNO = (IDM_LANG + 47), + IDM_LANG_CMAKE = (IDM_LANG + 48), + IDM_LANG_YAML = (IDM_LANG + 49), + IDM_LANG_COBOL = (IDM_LANG + 50), + IDM_LANG_D = (IDM_LANG + 51), + IDM_LANG_GUI4CLI = (IDM_LANG + 52), + IDM_LANG_POWERSHELL = (IDM_LANG + 53), + IDM_LANG_R = (IDM_LANG + 54), + IDM_LANG_JSP = (IDM_LANG + 55), + IDM_LANG_EXTERNAL = (IDM_LANG + 65), + IDM_LANG_EXTERNAL_LIMIT = (IDM_LANG + 79), + IDM_LANG_USER = (IDM_LANG + 80), //46080 + IDM_LANG_USER_LIMIT = (IDM_LANG + 110), //46110 + + IDM_ABOUT = (IDM + 7000), + IDM_HOMESWEETHOME = (IDM_ABOUT + 1), + IDM_PROJECTPAGE = (IDM_ABOUT + 2), + IDM_ONLINEHELP = (IDM_ABOUT + 3), + IDM_FORUM = (IDM_ABOUT + 4), + IDM_PLUGINSHOME = (IDM_ABOUT + 5), + IDM_UPDATE_NPP = (IDM_ABOUT + 6), + IDM_WIKIFAQ = (IDM_ABOUT + 7), + IDM_HELP = (IDM_ABOUT + 8), + + IDM_SETTING = (IDM + 8000), + IDM_SETTING_TAB_SIZE = (IDM_SETTING + 1), + IDM_SETTING_TAB_REPLCESPACE = (IDM_SETTING + 2), + IDM_SETTING_HISTORY_SIZE = (IDM_SETTING + 3), + IDM_SETTING_EDGE_SIZE = (IDM_SETTING + 4), + IDM_SETTING_IMPORTPLUGIN = (IDM_SETTING + 5), + IDM_SETTING_IMPORTSTYLETHEMS = (IDM_SETTING + 6), + IDM_SETTING_TRAYICON = (IDM_SETTING + 8), + IDM_SETTING_SHORTCUT_MAPPER = (IDM_SETTING + 9), + IDM_SETTING_REMEMBER_LAST_SESSION = (IDM_SETTING + 10), + IDM_SETTING_PREFERECE = (IDM_SETTING + 11), + IDM_SETTING_AUTOCNBCHAR = (IDM_SETTING + 15), + IDM_SETTING_SHORTCUT_MAPPER_MACRO = (IDM_SETTING + 16), + IDM_SETTING_SHORTCUT_MAPPER_RUN = (IDM_SETTING + 17), + IDM_SETTING_EDITCONTEXTMENU = (IDM_SETTING + 18), + + IDM_EXECUTE = (IDM + 9000), + + IDM_SYSTRAYPOPUP = (IDM + 3100), + IDM_SYSTRAYPOPUP_ACTIVATE = (IDM_SYSTRAYPOPUP + 1), + IDM_SYSTRAYPOPUP_NEWDOC = (IDM_SYSTRAYPOPUP + 2), + IDM_SYSTRAYPOPUP_NEW_AND_PASTE = (IDM_SYSTRAYPOPUP + 3), + IDM_SYSTRAYPOPUP_OPENFILE = (IDM_SYSTRAYPOPUP + 4), + IDM_SYSTRAYPOPUP_CLOSE = (IDM_SYSTRAYPOPUP + 5) + } +} diff --git a/WakaTime/PluginInfrastructure/Msgs_h.cs b/WakaTime/PluginInfrastructure/Msgs_h.cs index a9efd7b..f6c1f5a 100644 --- a/WakaTime/PluginInfrastructure/Msgs_h.cs +++ b/WakaTime/PluginInfrastructure/Msgs_h.cs @@ -1,777 +1,777 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -// -// This file should stay in sync with the CPP project file -// "notepad-plus-plus/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h" -// found at -// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h - -using System; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - class Constants - { - public const int WM_USER = 0x400; - public const int NPPMSG = WM_USER + 1000; - } - - public enum LangType - { - L_TEXT, L_PHP, L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC, - L_HTML, L_XML, L_MAKEFILE, L_PASCAL, L_BATCH, L_INI, L_ASCII, L_USER, - L_ASP, L_SQL, L_VB, L_JS, L_CSS, L_PERL, L_PYTHON, L_LUA, - L_TEX, L_FORTRAN, L_BASH, L_FLASH, L_NSIS, L_TCL, L_LISP, L_SCHEME, - L_ASM, L_DIFF, L_PROPS, L_PS, L_RUBY, L_SMALLTALK, L_VHDL, L_KIX, L_AU3, - L_CAML, L_ADA, L_VERILOG, L_MATLAB, L_HASKELL, L_INNO, L_SEARCHRESULT, - L_CMAKE, L_YAML, L_COBOL, L_GUI4CLI, L_D, L_POWERSHELL, L_R, L_JSP, - L_COFFEESCRIPT, L_JSON, L_JAVASCRIPT, L_FORTRAN_77, - // Don't use L_JS, use L_JAVASCRIPT instead - // The end of enumated language type, so it should be always at the end - L_EXTERNAL - } - - [Flags] - public enum NppMsg : uint - { - /* ++Autogenerated -- start of section automatically generated from notepad-plus-plus\PowerEditor\src\MISC\PluginsManager\Notepad_plus_msgs.h */ - - NPPMSG = Constants.WM_USER + 1000, - - NPPM_GETCURRENTSCINTILLA = Constants.NPPMSG + 4, - NPPM_GETCURRENTLANGTYPE = Constants.NPPMSG + 5, - NPPM_SETCURRENTLANGTYPE = Constants.NPPMSG + 6, - - NPPM_GETNBOPENFILES = Constants.NPPMSG + 7, - ALL_OPEN_FILES = 0, - PRIMARY_VIEW = 1, - SECOND_VIEW = 2, - - NPPM_GETOPENFILENAMES = Constants.NPPMSG + 8, - - NPPM_MODELESSDIALOG = Constants.NPPMSG + 12, - MODELESSDIALOGADD = 0, - MODELESSDIALOGREMOVE = 1, - - NPPM_GETNBSESSIONFILES = Constants.NPPMSG + 13, - NPPM_GETSESSIONFILES = Constants.NPPMSG + 14, - NPPM_SAVESESSION = Constants.NPPMSG + 15, - NPPM_SAVECURRENTSESSION = Constants.NPPMSG + 16, - - NPPM_GETOPENFILENAMESPRIMARY = Constants.NPPMSG + 17, - NPPM_GETOPENFILENAMESSECOND = Constants.NPPMSG + 18, - - NPPM_CREATESCINTILLAHANDLE = Constants.NPPMSG + 20, - NPPM_DESTROYSCINTILLAHANDLE = Constants.NPPMSG + 21, - NPPM_GETNBUSERLANG = Constants.NPPMSG + 22, - - NPPM_GETCURRENTDOCINDEX = Constants.NPPMSG + 23, - MAIN_VIEW = 0, - SUB_VIEW = 1, - - NPPM_SETSTATUSBAR = Constants.NPPMSG + 24, - STATUSBAR_DOC_TYPE = 0, - STATUSBAR_DOC_SIZE = 1, - STATUSBAR_CUR_POS = 2, - STATUSBAR_EOF_FORMAT = 3, - STATUSBAR_UNICODE_TYPE = 4, - STATUSBAR_TYPING_MODE = 5, - - NPPM_GETMENUHANDLE = Constants.NPPMSG + 25, - NPPPLUGINMENU = 0, - /// - /// INT NPPM_GETMENUHANDLE(INT menuChoice, 0) - /// Return: menu handle (HMENU) of choice (plugin menu handle or Notepad++ main menu handle) - /// - NPPMAINMENU = 1, - - /// - ///ascii file to unicode - ///int NPPM_ENCODESCI(MAIN_VIEW/SUB_VIEW, 0) - ///return new unicodeMode - /// - NPPM_ENCODESCI = Constants.NPPMSG + 26, - - /// - ///unicode file to ascii - ///int NPPM_DECODESCI(MAIN_VIEW/SUB_VIEW, 0) - ///return old unicodeMode - /// - NPPM_DECODESCI = Constants.NPPMSG + 27, - - /// - ///void NPPM_ACTIVATEDOC(int view, int index2Activate) - /// - NPPM_ACTIVATEDOC = Constants.NPPMSG + 28, - - /// - ///void NPPM_LAUNCHFINDINFILESDLG(TCHAR * dir2Search, TCHAR * filtre) - /// - NPPM_LAUNCHFINDINFILESDLG = Constants.NPPMSG + 29, - - /// - ///void NPPM_DMMSHOW(0, tTbData->hClient) - /// - NPPM_DMMSHOW = Constants.NPPMSG + 30, - - /// - ///void NPPM_DMMHIDE(0, tTbData->hClient) - /// - NPPM_DMMHIDE = Constants.NPPMSG + 31, - - /// - ///void NPPM_DMMUPDATEDISPINFO(0, tTbData->hClient) - /// - NPPM_DMMUPDATEDISPINFO = Constants.NPPMSG + 32, - - /// - ///void NPPM_DMMREGASDCKDLG(0, &tTbData) - /// - NPPM_DMMREGASDCKDLG = Constants.NPPMSG + 33, - - /// - ///void NPPM_LOADSESSION(0, const TCHAR* file name) - /// - NPPM_LOADSESSION = Constants.NPPMSG + 34, - - /// - ///void WM_DMM_VIEWOTHERTAB(0, tTbData->pszName) - /// - NPPM_DMMVIEWOTHERTAB = Constants.NPPMSG + 35, - - /// - ///BOOL NPPM_RELOADFILE(BOOL withAlert, TCHAR *filePathName2Reload) - /// - NPPM_RELOADFILE = Constants.NPPMSG + 36, - - /// - ///BOOL NPPM_SWITCHTOFILE(0, TCHAR *filePathName2switch) - /// - NPPM_SWITCHTOFILE = Constants.NPPMSG + 37, - - /// - ///BOOL NPPM_SAVECURRENTFILE(0, 0) - /// - NPPM_SAVECURRENTFILE = Constants.NPPMSG + 38, - - /// - ///BOOL NPPM_SAVEALLFILES(0, 0) - /// - NPPM_SAVEALLFILES = Constants.NPPMSG + 39, - - /// - ///void WM_PIMENU_CHECK(UINT funcItem[X]._cmdID, TRUE/FALSE) - /// - NPPM_SETMENUITEMCHECK = Constants.NPPMSG + 40, - - /// - ///void WM_ADDTOOLBARICON(UINT funcItem[X]._cmdID, toolbarIcons icon) - /// - NPPM_ADDTOOLBARICON = Constants.NPPMSG + 41, - - /// - ///winVer NPPM_GETWINDOWSVERSION(0, 0) - /// - NPPM_GETWINDOWSVERSION = Constants.NPPMSG + 42, - - /// - ///HWND WM_DMM_GETPLUGINHWNDBYNAME(const TCHAR *windowName, const TCHAR *moduleName) - /// if moduleName is NULL, then return value is NULL - /// if windowName is NULL, then the first found window handle which matches with the moduleName will be returned - /// - NPPM_DMMGETPLUGINHWNDBYNAME = Constants.NPPMSG + 43, - - /// - ///BOOL NPPM_MAKECURRENTBUFFERDIRTY(0, 0) - /// - NPPM_MAKECURRENTBUFFERDIRTY = Constants.NPPMSG + 44, - - /// - ///BOOL NPPM_GETENABLETHEMETEXTUREFUNC(0, 0) - /// - NPPM_GETENABLETHEMETEXTUREFUNC = Constants.NPPMSG + 45, - - /// - ///INT NPPM_GETPLUGINSCONFIGDIR(int strLen, TCHAR *str) - /// Get user's plugin config directory path. It's useful if plugins want to save/load parameters for the current user - /// Returns the number of TCHAR copied/to copy. - /// Users should call it with "str" be NULL to get the required number of TCHAR (not including the terminating nul character), - /// allocate "str" buffer with the return value + 1, then call it again to get the path. - /// - NPPM_GETPLUGINSCONFIGDIR = Constants.NPPMSG + 46, - - /// - ///BOOL NPPM_MSGTOPLUGIN(TCHAR *destModuleName, CommunicationInfo *info) - /// return value is TRUE when the message arrive to the destination plugins. - /// if destModule or info is NULL, then return value is FALSE - /// - NPPM_MSGTOPLUGIN = Constants.NPPMSG + 47, - - /// - ///void NPPM_MENUCOMMAND(0, int cmdID) - /// uncomment //#include "menuCmdID.h" - /// in the beginning of this file then use the command symbols defined in "menuCmdID.h" file - /// to access all the Notepad++ menu command items - /// - NPPM_MENUCOMMAND = Constants.NPPMSG + 48, - - /// - ///void NPPM_TRIGGERTABBARCONTEXTMENU(int view, int index2Activate) - /// - NPPM_TRIGGERTABBARCONTEXTMENU = Constants.NPPMSG + 49, - - /// - /// int NPPM_GETNPPVERSION(0, 0) - /// return version - /// ex : v4.6 - /// HIWORD(version) == 4 - /// LOWORD(version) == 6 - /// - NPPM_GETNPPVERSION = Constants.NPPMSG + 50, - - /// - /// BOOL NPPM_HIDETABBAR(0, BOOL hideOrNot) - /// if hideOrNot is set as TRUE then tab bar will be hidden - /// otherwise it'll be shown. - /// return value : the old status value - /// - NPPM_HIDETABBAR = Constants.NPPMSG + 51, - - /// - /// BOOL NPPM_ISTABBARHIDDEN(0, 0) - /// returned value : TRUE if tab bar is hidden, otherwise FALSE - /// - NPPM_ISTABBARHIDDEN = Constants.NPPMSG + 52, - - /// - /// INT NPPM_GETPOSFROMBUFFERID(UINT_PTR bufferID, INT priorityView) - /// Return VIEW|INDEX from a buffer ID. -1 if the bufferID non existing - /// if priorityView set to SUB_VIEW, then SUB_VIEW will be search firstly - /// - /// VIEW takes 2 highest bits and INDEX (0 based) takes the rest (30 bits) - /// Here's the values for the view : - /// MAIN_VIEW 0 - /// SUB_VIEW 1 - /// - NPPM_GETPOSFROMBUFFERID = Constants.NPPMSG + 57, - - /// - /// INT NPPM_GETFULLPATHFROMBUFFERID(UINT_PTR bufferID, TCHAR *fullFilePath) - /// Get full path file name from a bufferID. - /// Return -1 if the bufferID non existing, otherwise the number of TCHAR copied/to copy - /// User should call it with fullFilePath be NULL to get the number of TCHAR (not including the nul character), - /// allocate fullFilePath with the return values + 1, then call it again to get full path file name - /// - NPPM_GETFULLPATHFROMBUFFERID = Constants.NPPMSG + 58, - - /// - /// LRESULT NPPM_GETBUFFERIDFROMPOS(INT index, INT iView) - /// wParam: Position of document - /// lParam: View to use, 0 = Main, 1 = Secondary - /// Returns 0 if invalid - /// - NPPM_GETBUFFERIDFROMPOS = Constants.NPPMSG + 59, - - /// - /// LRESULT NPPM_GETCURRENTBUFFERID(0, 0) - /// Returns active Buffer - /// - NPPM_GETCURRENTBUFFERID = Constants.NPPMSG + 60, - - /// - /// VOID NPPM_RELOADBUFFERID(UINT_PTR bufferID, BOOL alert) - /// Reloads Buffer - /// wParam: Buffer to reload - /// lParam: 0 if no alert, else alert - /// - NPPM_RELOADBUFFERID = Constants.NPPMSG + 61, - - /// - /// INT NPPM_GETBUFFERLANGTYPE(UINT_PTR bufferID, 0) - /// wParam: BufferID to get LangType from - /// lParam: 0 - /// Returns as int, see LangType. -1 on error - /// - NPPM_GETBUFFERLANGTYPE = Constants.NPPMSG + 64, - - /// - /// BOOL NPPM_SETBUFFERLANGTYPE(UINT_PTR bufferID, INT langType) - /// wParam: BufferID to set LangType of - /// lParam: LangType - /// Returns TRUE on success, FALSE otherwise - /// use int, see LangType for possible values - /// L_USER and L_EXTERNAL are not supported - /// - NPPM_SETBUFFERLANGTYPE = Constants.NPPMSG + 65, - - /// - /// INT NPPM_GETBUFFERENCODING(UINT_PTR bufferID, 0) - /// wParam: BufferID to get encoding from - /// lParam: 0 - /// returns as int, see UniMode. -1 on error - /// - NPPM_GETBUFFERENCODING = Constants.NPPMSG + 66, - - /// - /// BOOL NPPM_SETBUFFERENCODING(UINT_PTR bufferID, INT encoding) - /// wParam: BufferID to set encoding of - /// lParam: encoding - /// Returns TRUE on success, FALSE otherwise - /// use int, see UniMode - /// Can only be done on new, unedited files - /// - NPPM_SETBUFFERENCODING = Constants.NPPMSG + 67, - - /// - /// INT NPPM_GETBUFFERFORMAT(UINT_PTR bufferID, 0) - /// wParam: BufferID to get EolType format from - /// lParam: 0 - /// returns as int, see EolType format. -1 on error - /// - NPPM_GETBUFFERFORMAT = Constants.NPPMSG + 68, - - /// - /// BOOL NPPM_SETBUFFERFORMAT(UINT_PTR bufferID, INT format) - /// wParam: BufferID to set EolType format of - /// lParam: format - /// Returns TRUE on success, FALSE otherwise - /// use int, see EolType format - /// - NPPM_SETBUFFERFORMAT = Constants.NPPMSG + 69, - - /// - /// BOOL NPPM_HIDETOOLBAR(0, BOOL hideOrNot) - /// if hideOrNot is set as TRUE then tool bar will be hidden - /// otherwise it'll be shown. - /// return value : the old status value - /// - NPPM_HIDETOOLBAR = Constants.NPPMSG + 70, - - /// - /// BOOL NPPM_ISTOOLBARHIDDEN(0, 0) - /// returned value : TRUE if tool bar is hidden, otherwise FALSE - /// - NPPM_ISTOOLBARHIDDEN = Constants.NPPMSG + 71, - - /// - /// BOOL NPPM_HIDEMENU(0, BOOL hideOrNot) - /// if hideOrNot is set as TRUE then menu will be hidden - /// otherwise it'll be shown. - /// return value : the old status value - /// - NPPM_HIDEMENU = Constants.NPPMSG + 72, - - /// - /// BOOL NPPM_ISMENUHIDDEN(0, 0) - /// returned value : TRUE if menu is hidden, otherwise FALSE - /// - NPPM_ISMENUHIDDEN = Constants.NPPMSG + 73, - - /// - /// BOOL NPPM_HIDESTATUSBAR(0, BOOL hideOrNot) - /// if hideOrNot is set as TRUE then STATUSBAR will be hidden - /// otherwise it'll be shown. - /// return value : the old status value - /// - NPPM_HIDESTATUSBAR = Constants.NPPMSG + 74, - - /// - /// BOOL NPPM_ISSTATUSBARHIDDEN(0, 0) - /// returned value : TRUE if STATUSBAR is hidden, otherwise FALSE - /// - NPPM_ISSTATUSBARHIDDEN = Constants.NPPMSG + 75, - - /// - /// BOOL NPPM_GETSHORTCUTBYCMDID(int cmdID, ShortcutKey *sk) - /// get your plugin command current mapped shortcut into sk via cmdID - /// You may need it after getting NPPN_READY notification - /// returned value : TRUE if this function call is successful and shortcut is enable, otherwise FALSE - /// - NPPM_GETSHORTCUTBYCMDID = Constants.NPPMSG + 76, - - /// - /// BOOL NPPM_DOOPEN(0, const TCHAR *fullPathName2Open) - /// fullPathName2Open indicates the full file path name to be opened. - /// The return value is TRUE (1) if the operation is successful, otherwise FALSE (0). - /// - NPPM_DOOPEN = Constants.NPPMSG + 77, - - /// - /// BOOL NPPM_SAVECURRENTFILEAS (BOOL asCopy, const TCHAR* filename) - /// - NPPM_SAVECURRENTFILEAS = Constants.NPPMSG + 78, - - /// - /// INT NPPM_GETCURRENTNATIVELANGENCODING(0, 0) - /// returned value : the current native language encoding - /// - NPPM_GETCURRENTNATIVELANGENCODING = Constants.NPPMSG + 79, - - /// - /// returns TRUE if NPPM_ALLOCATECMDID is supported - /// Use to identify if subclassing is necessary - /// - NPPM_ALLOCATESUPPORTED = Constants.NPPMSG + 80, - - /// - /// BOOL NPPM_ALLOCATECMDID(int numberRequested, int* startNumber) - /// sets startNumber to the initial command ID if successful - /// Returns: TRUE if successful, FALSE otherwise. startNumber will also be set to 0 if unsuccessful - /// - NPPM_ALLOCATECMDID = Constants.NPPMSG + 81, - - /// - /// BOOL NPPM_ALLOCATEMARKER(int numberRequested, int* startNumber) - /// sets startNumber to the initial command ID if successful - /// Allocates a marker number to a plugin - /// Returns: TRUE if successful, FALSE otherwise. startNumber will also be set to 0 if unsuccessful - /// - NPPM_ALLOCATEMARKER = Constants.NPPMSG + 82, - - /// - /// INT NPPM_GETLANGUAGENAME(int langType, TCHAR *langName) - /// Get programming language name from the given language type (LangType) - /// Return value is the number of copied character / number of character to copy (\0 is not included) - /// You should call this function 2 times - the first time you pass langName as NULL to get the number of characters to copy. - /// You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGENAME function the 2nd time - /// by passing allocated buffer as argument langName - /// - NPPM_GETLANGUAGENAME = Constants.NPPMSG + 83, - - /// - /// INT NPPM_GETLANGUAGEDESC(int langType, TCHAR *langDesc) - /// Get programming language short description from the given language type (LangType) - /// Return value is the number of copied character / number of character to copy (\0 is not included) - /// You should call this function 2 times - the first time you pass langDesc as NULL to get the number of characters to copy. - /// You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGEDESC function the 2nd time - /// by passing allocated buffer as argument langDesc - /// - NPPM_GETLANGUAGEDESC = Constants.NPPMSG + 84, - - /// - /// VOID NPPM_SHOWDOCSWITCHER(0, BOOL toShowOrNot) - /// Send this message to show or hide doc switcher. - /// if toShowOrNot is TRUE then show doc switcher, otherwise hide it. - /// - NPPM_SHOWDOCSWITCHER = Constants.NPPMSG + 85, - - /// - /// BOOL NPPM_ISDOCSWITCHERSHOWN(0, 0) - /// Check to see if doc switcher is shown. - /// - NPPM_ISDOCSWITCHERSHOWN = Constants.NPPMSG + 86, - - /// - /// BOOL NPPM_GETAPPDATAPLUGINSALLOWED(0, 0) - /// Check to see if loading plugins from "%APPDATA%\..\Local\Notepad++\plugins" is allowed. - /// - NPPM_GETAPPDATAPLUGINSALLOWED = Constants.NPPMSG + 87, - - /// - /// INT NPPM_GETCURRENTVIEW(0, 0) - /// Return: current edit view of Notepad++. Only 2 possible values: 0 = Main, 1 = Secondary - /// - NPPM_GETCURRENTVIEW = Constants.NPPMSG + 88, - - /// - /// VOID NPPM_DOCSWITCHERDISABLECOLUMN(0, BOOL disableOrNot) - /// Disable or enable extension column of doc switcher - /// - NPPM_DOCSWITCHERDISABLECOLUMN = Constants.NPPMSG + 89, - - /// - /// INT NPPM_GETEDITORDEFAULTFOREGROUNDCOLOR(0, 0) - /// Return: current editor default foreground color. You should convert the returned value in COLORREF - /// - NPPM_GETEDITORDEFAULTFOREGROUNDCOLOR = Constants.NPPMSG + 90, - - /// - /// INT NPPM_GETEDITORDEFAULTBACKGROUNDCOLOR(0, 0) - /// Return: current editor default background color. You should convert the returned value in COLORREF - /// - NPPM_GETEDITORDEFAULTBACKGROUNDCOLOR = Constants.NPPMSG + 91, - - /// - /// VOID NPPM_SETSMOOTHFONT(0, BOOL setSmoothFontOrNot) - /// - NPPM_SETSMOOTHFONT = Constants.NPPMSG + 92, - - /// - /// VOID NPPM_SETEDITORBORDEREDGE(0, BOOL withEditorBorderEdgeOrNot) - /// - NPPM_SETEDITORBORDEREDGE = Constants.NPPMSG + 93, - - /// - /// VOID NPPM_SAVEFILE(0, const TCHAR *fileNameToSave) - /// - NPPM_SAVEFILE = Constants.NPPMSG + 94, - - /// - /// VOID NPPM_DISABLEAUTOUPDATE(0, 0) - /// - NPPM_DISABLEAUTOUPDATE = Constants.NPPMSG + 95, - - /// - /// BOOL NPPM_REMOVESHORTCUTASSIGNMENT(int cmdID) - /// removes the assigned shortcut mapped to cmdID - /// returned value : TRUE if function call is successful, otherwise FALSE - /// - NPPM_REMOVESHORTCUTBYCMDID = Constants.NPPMSG + 96, - - /// - /// INT NPPM_GETPLUGINHOMEPATH(size_t strLen, TCHAR *pluginRootPath) - /// Get plugin home root path. It's useful if plugins want to get its own path - /// by appending which is the name of plugin without extension part. - /// Returns the number of TCHAR copied/to copy. - /// Users should call it with pluginRootPath be NULL to get the required number of TCHAR (not including the terminating nul character), - /// allocate pluginRootPath buffer with the return value + 1, then call it again to get the path. - /// - NPPM_GETPLUGINHOMEPATH = Constants.NPPMSG + 97, - - RUNCOMMAND_USER = Constants.WM_USER + 3000, - NPPM_GETFULLCURRENTPATH = RUNCOMMAND_USER + FULL_CURRENT_PATH, - NPPM_GETCURRENTDIRECTORY = RUNCOMMAND_USER + CURRENT_DIRECTORY, - NPPM_GETFILENAME = RUNCOMMAND_USER + FILE_NAME, - NPPM_GETNAMEPART = RUNCOMMAND_USER + NAME_PART, - NPPM_GETEXTPART = RUNCOMMAND_USER + EXT_PART, - NPPM_GETCURRENTWORD = RUNCOMMAND_USER + CURRENT_WORD, - NPPM_GETNPPDIRECTORY = RUNCOMMAND_USER + NPP_DIRECTORY, - /// - /// BOOL NPPM_GETXXXXXXXXXXXXXXXX(size_t strLen, TCHAR *str) - /// where str is the allocated TCHAR array, - /// strLen is the allocated array size - /// The return value is TRUE when get generic_string operation success - /// Otherwise (allocated array size is too small) FALSE - /// - NPPM_GETFILENAMEATCURSOR = RUNCOMMAND_USER + GETFILENAMEATCURSOR, - - /// - /// INT NPPM_GETCURRENTLINE(0, 0) - /// return the caret current position line - /// - NPPM_GETCURRENTLINE = RUNCOMMAND_USER + CURRENT_LINE, - - /// - /// INT NPPM_GETCURRENTCOLUMN(0, 0) - /// return the caret current position column - /// - NPPM_GETCURRENTCOLUMN = RUNCOMMAND_USER + CURRENT_COLUMN, - - NPPM_GETNPPFULLFILEPATH = RUNCOMMAND_USER + NPP_FULL_FILE_PATH, - - VAR_NOT_RECOGNIZED = 0, - FULL_CURRENT_PATH = 1, - CURRENT_DIRECTORY = 2, - FILE_NAME = 3, - NAME_PART = 4, - EXT_PART = 5, - CURRENT_WORD = 6, - NPP_DIRECTORY = 7, - CURRENT_LINE = 8, - CURRENT_COLUMN = 9, - NPP_FULL_FILE_PATH = 10, - GETFILENAMEATCURSOR = 11, - - /// - /// To notify plugins that all the procedures of launchment of notepad++ are done. - ///scnNotification->nmhdr.code = NPPN_READY; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = 0; - /// - NPPN_FIRST = 1000, - /// - ///scnNotification->nmhdr.code = NPPN_READY; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = 0; - /// - NPPN_READY = NPPN_FIRST + 1, - - /// - ///scnNotification->nmhdr.code = NPPN_TB_MODIFICATION; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = 0; - /// - NPPN_TBMODIFICATION = NPPN_FIRST + 2, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEBEFORECLOSE; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILEBEFORECLOSE = NPPN_FIRST + 3, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEOPENED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILEOPENED = NPPN_FIRST + 4, - - /// - ///scnNotification->nmhdr.code = NPPN_FILECLOSED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILECLOSED = NPPN_FIRST + 5, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILEBEFOREOPEN = NPPN_FIRST + 6, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILEBEFORESAVE = NPPN_FIRST + 7, - - /// - ///scnNotification->nmhdr.code = NPPN_FILESAVED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILESAVED = NPPN_FIRST + 8, - - /// - ///scnNotification->nmhdr.code = NPPN_SHUTDOWN; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = 0; - /// - NPPN_SHUTDOWN = NPPN_FIRST + 9, - - /// - ///scnNotification->nmhdr.code = NPPN_BUFFERACTIVATED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = activatedBufferID; - /// - NPPN_BUFFERACTIVATED = NPPN_FIRST + 10, - - /// - ///scnNotification->nmhdr.code = NPPN_LANGCHANGED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = currentBufferID; - /// - NPPN_LANGCHANGED = NPPN_FIRST + 11, - - /// - ///scnNotification->nmhdr.code = NPPN_WORDSTYLESUPDATED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = currentBufferID; - /// - NPPN_WORDSTYLESUPDATED = NPPN_FIRST + 12, - - /// - ///scnNotification->nmhdr.code = NPPN_SHORTCUTSREMAPPED; - ///scnNotification->nmhdr.hwndFrom = ShortcutKeyStructurePointer; - ///scnNotification->nmhdr.idFrom = cmdID; - ///where ShortcutKeyStructurePointer is pointer of struct ShortcutKey: - ///struct ShortcutKey { - /// bool _isCtrl; - /// bool _isAlt; - /// bool _isShift; - /// UCHAR _key; - ///}; - /// - NPPN_SHORTCUTREMAPPED = NPPN_FIRST + 13, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = NULL; - /// - NPPN_FILEBEFORELOAD = NPPN_FIRST + 14, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEOPENFAILED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILELOADFAILED = NPPN_FIRST + 15, - - /// - ///scnNotification->nmhdr.code = NPPN_READONLYCHANGED; - ///scnNotification->nmhdr.hwndFrom = bufferID; - ///scnNotification->nmhdr.idFrom = docStatus; - /// where bufferID is BufferID - /// docStatus can be combined by DOCSTATUS_READONLY and DOCSTATUS_BUFFERDIRTY - /// - NPPN_READONLYCHANGED = NPPN_FIRST + 16, - - DOCSTATUS_READONLY = 1, - DOCSTATUS_BUFFERDIRTY = 2, - - /// - ///scnNotification->nmhdr.code = NPPN_DOCORDERCHANGED; - ///scnNotification->nmhdr.hwndFrom = newIndex; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_DOCORDERCHANGED = NPPN_FIRST + 17, - - /// - ///scnNotification->nmhdr.code = NPPN_SNAPSHOTDIRTYFILELOADED; - ///scnNotification->nmhdr.hwndFrom = NULL; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_SNAPSHOTDIRTYFILELOADED = NPPN_FIRST + 18, - - /// - ///scnNotification->nmhdr.code = NPPN_BEFORESHUTDOWN; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = 0; - /// - NPPN_BEFORESHUTDOWN = NPPN_FIRST + 19, - - /// - ///scnNotification->nmhdr.code = NPPN_CANCELSHUTDOWN; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = 0; - /// - NPPN_CANCELSHUTDOWN = NPPN_FIRST + 20, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEBEFORERENAME; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILEBEFORERENAME = NPPN_FIRST + 21, - - /// - ///scnNotification->nmhdr.code = NPPN_FILERENAMECANCEL; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILERENAMECANCEL = NPPN_FIRST + 22, - - /// - ///scnNotification->nmhdr.code = NPPN_FILERENAMED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILERENAMED = NPPN_FIRST + 23, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEBEFOREDELETE; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILEBEFOREDELETE = NPPN_FIRST + 24, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEDELETEFAILED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILEDELETEFAILED = NPPN_FIRST + 25, - - /// - ///scnNotification->nmhdr.code = NPPN_FILEDELETED; - ///scnNotification->nmhdr.hwndFrom = hwndNpp; - ///scnNotification->nmhdr.idFrom = BufferID; - /// - NPPN_FILEDELETED = NPPN_FIRST + 26, - - /* --Autogenerated -- end of section automatically generated from notepad-plus-plus\PowerEditor\src\MISC\PluginsManager\Notepad_plus_msgs.h * */ - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +// +// This file should stay in sync with the CPP project file +// "notepad-plus-plus/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h" +// found at +// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h + +using System; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + class Constants + { + public const int WM_USER = 0x400; + public const int NPPMSG = WM_USER + 1000; + } + + public enum LangType + { + L_TEXT, L_PHP, L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC, + L_HTML, L_XML, L_MAKEFILE, L_PASCAL, L_BATCH, L_INI, L_ASCII, L_USER, + L_ASP, L_SQL, L_VB, L_JS, L_CSS, L_PERL, L_PYTHON, L_LUA, + L_TEX, L_FORTRAN, L_BASH, L_FLASH, L_NSIS, L_TCL, L_LISP, L_SCHEME, + L_ASM, L_DIFF, L_PROPS, L_PS, L_RUBY, L_SMALLTALK, L_VHDL, L_KIX, L_AU3, + L_CAML, L_ADA, L_VERILOG, L_MATLAB, L_HASKELL, L_INNO, L_SEARCHRESULT, + L_CMAKE, L_YAML, L_COBOL, L_GUI4CLI, L_D, L_POWERSHELL, L_R, L_JSP, + L_COFFEESCRIPT, L_JSON, L_JAVASCRIPT, L_FORTRAN_77, + // Don't use L_JS, use L_JAVASCRIPT instead + // The end of enumated language type, so it should be always at the end + L_EXTERNAL + } + + [Flags] + public enum NppMsg : uint + { + /* ++Autogenerated -- start of section automatically generated from notepad-plus-plus\PowerEditor\src\MISC\PluginsManager\Notepad_plus_msgs.h */ + + NPPMSG = Constants.WM_USER + 1000, + + NPPM_GETCURRENTSCINTILLA = Constants.NPPMSG + 4, + NPPM_GETCURRENTLANGTYPE = Constants.NPPMSG + 5, + NPPM_SETCURRENTLANGTYPE = Constants.NPPMSG + 6, + + NPPM_GETNBOPENFILES = Constants.NPPMSG + 7, + ALL_OPEN_FILES = 0, + PRIMARY_VIEW = 1, + SECOND_VIEW = 2, + + NPPM_GETOPENFILENAMES = Constants.NPPMSG + 8, + + NPPM_MODELESSDIALOG = Constants.NPPMSG + 12, + MODELESSDIALOGADD = 0, + MODELESSDIALOGREMOVE = 1, + + NPPM_GETNBSESSIONFILES = Constants.NPPMSG + 13, + NPPM_GETSESSIONFILES = Constants.NPPMSG + 14, + NPPM_SAVESESSION = Constants.NPPMSG + 15, + NPPM_SAVECURRENTSESSION = Constants.NPPMSG + 16, + + NPPM_GETOPENFILENAMESPRIMARY = Constants.NPPMSG + 17, + NPPM_GETOPENFILENAMESSECOND = Constants.NPPMSG + 18, + + NPPM_CREATESCINTILLAHANDLE = Constants.NPPMSG + 20, + NPPM_DESTROYSCINTILLAHANDLE = Constants.NPPMSG + 21, + NPPM_GETNBUSERLANG = Constants.NPPMSG + 22, + + NPPM_GETCURRENTDOCINDEX = Constants.NPPMSG + 23, + MAIN_VIEW = 0, + SUB_VIEW = 1, + + NPPM_SETSTATUSBAR = Constants.NPPMSG + 24, + STATUSBAR_DOC_TYPE = 0, + STATUSBAR_DOC_SIZE = 1, + STATUSBAR_CUR_POS = 2, + STATUSBAR_EOF_FORMAT = 3, + STATUSBAR_UNICODE_TYPE = 4, + STATUSBAR_TYPING_MODE = 5, + + NPPM_GETMENUHANDLE = Constants.NPPMSG + 25, + NPPPLUGINMENU = 0, + /// + /// INT NPPM_GETMENUHANDLE(INT menuChoice, 0) + /// Return: menu handle (HMENU) of choice (plugin menu handle or Notepad++ main menu handle) + /// + NPPMAINMENU = 1, + + /// + ///ascii file to unicode + ///int NPPM_ENCODESCI(MAIN_VIEW/SUB_VIEW, 0) + ///return new unicodeMode + /// + NPPM_ENCODESCI = Constants.NPPMSG + 26, + + /// + ///unicode file to ascii + ///int NPPM_DECODESCI(MAIN_VIEW/SUB_VIEW, 0) + ///return old unicodeMode + /// + NPPM_DECODESCI = Constants.NPPMSG + 27, + + /// + ///void NPPM_ACTIVATEDOC(int view, int index2Activate) + /// + NPPM_ACTIVATEDOC = Constants.NPPMSG + 28, + + /// + ///void NPPM_LAUNCHFINDINFILESDLG(TCHAR * dir2Search, TCHAR * filtre) + /// + NPPM_LAUNCHFINDINFILESDLG = Constants.NPPMSG + 29, + + /// + ///void NPPM_DMMSHOW(0, tTbData->hClient) + /// + NPPM_DMMSHOW = Constants.NPPMSG + 30, + + /// + ///void NPPM_DMMHIDE(0, tTbData->hClient) + /// + NPPM_DMMHIDE = Constants.NPPMSG + 31, + + /// + ///void NPPM_DMMUPDATEDISPINFO(0, tTbData->hClient) + /// + NPPM_DMMUPDATEDISPINFO = Constants.NPPMSG + 32, + + /// + ///void NPPM_DMMREGASDCKDLG(0, &tTbData) + /// + NPPM_DMMREGASDCKDLG = Constants.NPPMSG + 33, + + /// + ///void NPPM_LOADSESSION(0, const TCHAR* file name) + /// + NPPM_LOADSESSION = Constants.NPPMSG + 34, + + /// + ///void WM_DMM_VIEWOTHERTAB(0, tTbData->pszName) + /// + NPPM_DMMVIEWOTHERTAB = Constants.NPPMSG + 35, + + /// + ///BOOL NPPM_RELOADFILE(BOOL withAlert, TCHAR *filePathName2Reload) + /// + NPPM_RELOADFILE = Constants.NPPMSG + 36, + + /// + ///BOOL NPPM_SWITCHTOFILE(0, TCHAR *filePathName2switch) + /// + NPPM_SWITCHTOFILE = Constants.NPPMSG + 37, + + /// + ///BOOL NPPM_SAVECURRENTFILE(0, 0) + /// + NPPM_SAVECURRENTFILE = Constants.NPPMSG + 38, + + /// + ///BOOL NPPM_SAVEALLFILES(0, 0) + /// + NPPM_SAVEALLFILES = Constants.NPPMSG + 39, + + /// + ///void WM_PIMENU_CHECK(UINT funcItem[X]._cmdID, TRUE/FALSE) + /// + NPPM_SETMENUITEMCHECK = Constants.NPPMSG + 40, + + /// + ///void WM_ADDTOOLBARICON(UINT funcItem[X]._cmdID, toolbarIcons icon) + /// + NPPM_ADDTOOLBARICON = Constants.NPPMSG + 41, + + /// + ///winVer NPPM_GETWINDOWSVERSION(0, 0) + /// + NPPM_GETWINDOWSVERSION = Constants.NPPMSG + 42, + + /// + ///HWND WM_DMM_GETPLUGINHWNDBYNAME(const TCHAR *windowName, const TCHAR *moduleName) + /// if moduleName is NULL, then return value is NULL + /// if windowName is NULL, then the first found window handle which matches with the moduleName will be returned + /// + NPPM_DMMGETPLUGINHWNDBYNAME = Constants.NPPMSG + 43, + + /// + ///BOOL NPPM_MAKECURRENTBUFFERDIRTY(0, 0) + /// + NPPM_MAKECURRENTBUFFERDIRTY = Constants.NPPMSG + 44, + + /// + ///BOOL NPPM_GETENABLETHEMETEXTUREFUNC(0, 0) + /// + NPPM_GETENABLETHEMETEXTUREFUNC = Constants.NPPMSG + 45, + + /// + ///INT NPPM_GETPLUGINSCONFIGDIR(int strLen, TCHAR *str) + /// Get user's plugin config directory path. It's useful if plugins want to save/load parameters for the current user + /// Returns the number of TCHAR copied/to copy. + /// Users should call it with "str" be NULL to get the required number of TCHAR (not including the terminating nul character), + /// allocate "str" buffer with the return value + 1, then call it again to get the path. + /// + NPPM_GETPLUGINSCONFIGDIR = Constants.NPPMSG + 46, + + /// + ///BOOL NPPM_MSGTOPLUGIN(TCHAR *destModuleName, CommunicationInfo *info) + /// return value is TRUE when the message arrive to the destination plugins. + /// if destModule or info is NULL, then return value is FALSE + /// + NPPM_MSGTOPLUGIN = Constants.NPPMSG + 47, + + /// + ///void NPPM_MENUCOMMAND(0, int cmdID) + /// uncomment //#include "menuCmdID.h" + /// in the beginning of this file then use the command symbols defined in "menuCmdID.h" file + /// to access all the Notepad++ menu command items + /// + NPPM_MENUCOMMAND = Constants.NPPMSG + 48, + + /// + ///void NPPM_TRIGGERTABBARCONTEXTMENU(int view, int index2Activate) + /// + NPPM_TRIGGERTABBARCONTEXTMENU = Constants.NPPMSG + 49, + + /// + /// int NPPM_GETNPPVERSION(0, 0) + /// return version + /// ex : v4.6 + /// HIWORD(version) == 4 + /// LOWORD(version) == 6 + /// + NPPM_GETNPPVERSION = Constants.NPPMSG + 50, + + /// + /// BOOL NPPM_HIDETABBAR(0, BOOL hideOrNot) + /// if hideOrNot is set as TRUE then tab bar will be hidden + /// otherwise it'll be shown. + /// return value : the old status value + /// + NPPM_HIDETABBAR = Constants.NPPMSG + 51, + + /// + /// BOOL NPPM_ISTABBARHIDDEN(0, 0) + /// returned value : TRUE if tab bar is hidden, otherwise FALSE + /// + NPPM_ISTABBARHIDDEN = Constants.NPPMSG + 52, + + /// + /// INT NPPM_GETPOSFROMBUFFERID(UINT_PTR bufferID, INT priorityView) + /// Return VIEW|INDEX from a buffer ID. -1 if the bufferID non existing + /// if priorityView set to SUB_VIEW, then SUB_VIEW will be search firstly + /// + /// VIEW takes 2 highest bits and INDEX (0 based) takes the rest (30 bits) + /// Here's the values for the view : + /// MAIN_VIEW 0 + /// SUB_VIEW 1 + /// + NPPM_GETPOSFROMBUFFERID = Constants.NPPMSG + 57, + + /// + /// INT NPPM_GETFULLPATHFROMBUFFERID(UINT_PTR bufferID, TCHAR *fullFilePath) + /// Get full path file name from a bufferID. + /// Return -1 if the bufferID non existing, otherwise the number of TCHAR copied/to copy + /// User should call it with fullFilePath be NULL to get the number of TCHAR (not including the nul character), + /// allocate fullFilePath with the return values + 1, then call it again to get full path file name + /// + NPPM_GETFULLPATHFROMBUFFERID = Constants.NPPMSG + 58, + + /// + /// LRESULT NPPM_GETBUFFERIDFROMPOS(INT index, INT iView) + /// wParam: Position of document + /// lParam: View to use, 0 = Main, 1 = Secondary + /// Returns 0 if invalid + /// + NPPM_GETBUFFERIDFROMPOS = Constants.NPPMSG + 59, + + /// + /// LRESULT NPPM_GETCURRENTBUFFERID(0, 0) + /// Returns active Buffer + /// + NPPM_GETCURRENTBUFFERID = Constants.NPPMSG + 60, + + /// + /// VOID NPPM_RELOADBUFFERID(UINT_PTR bufferID, BOOL alert) + /// Reloads Buffer + /// wParam: Buffer to reload + /// lParam: 0 if no alert, else alert + /// + NPPM_RELOADBUFFERID = Constants.NPPMSG + 61, + + /// + /// INT NPPM_GETBUFFERLANGTYPE(UINT_PTR bufferID, 0) + /// wParam: BufferID to get LangType from + /// lParam: 0 + /// Returns as int, see LangType. -1 on error + /// + NPPM_GETBUFFERLANGTYPE = Constants.NPPMSG + 64, + + /// + /// BOOL NPPM_SETBUFFERLANGTYPE(UINT_PTR bufferID, INT langType) + /// wParam: BufferID to set LangType of + /// lParam: LangType + /// Returns TRUE on success, FALSE otherwise + /// use int, see LangType for possible values + /// L_USER and L_EXTERNAL are not supported + /// + NPPM_SETBUFFERLANGTYPE = Constants.NPPMSG + 65, + + /// + /// INT NPPM_GETBUFFERENCODING(UINT_PTR bufferID, 0) + /// wParam: BufferID to get encoding from + /// lParam: 0 + /// returns as int, see UniMode. -1 on error + /// + NPPM_GETBUFFERENCODING = Constants.NPPMSG + 66, + + /// + /// BOOL NPPM_SETBUFFERENCODING(UINT_PTR bufferID, INT encoding) + /// wParam: BufferID to set encoding of + /// lParam: encoding + /// Returns TRUE on success, FALSE otherwise + /// use int, see UniMode + /// Can only be done on new, unedited files + /// + NPPM_SETBUFFERENCODING = Constants.NPPMSG + 67, + + /// + /// INT NPPM_GETBUFFERFORMAT(UINT_PTR bufferID, 0) + /// wParam: BufferID to get EolType format from + /// lParam: 0 + /// returns as int, see EolType format. -1 on error + /// + NPPM_GETBUFFERFORMAT = Constants.NPPMSG + 68, + + /// + /// BOOL NPPM_SETBUFFERFORMAT(UINT_PTR bufferID, INT format) + /// wParam: BufferID to set EolType format of + /// lParam: format + /// Returns TRUE on success, FALSE otherwise + /// use int, see EolType format + /// + NPPM_SETBUFFERFORMAT = Constants.NPPMSG + 69, + + /// + /// BOOL NPPM_HIDETOOLBAR(0, BOOL hideOrNot) + /// if hideOrNot is set as TRUE then tool bar will be hidden + /// otherwise it'll be shown. + /// return value : the old status value + /// + NPPM_HIDETOOLBAR = Constants.NPPMSG + 70, + + /// + /// BOOL NPPM_ISTOOLBARHIDDEN(0, 0) + /// returned value : TRUE if tool bar is hidden, otherwise FALSE + /// + NPPM_ISTOOLBARHIDDEN = Constants.NPPMSG + 71, + + /// + /// BOOL NPPM_HIDEMENU(0, BOOL hideOrNot) + /// if hideOrNot is set as TRUE then menu will be hidden + /// otherwise it'll be shown. + /// return value : the old status value + /// + NPPM_HIDEMENU = Constants.NPPMSG + 72, + + /// + /// BOOL NPPM_ISMENUHIDDEN(0, 0) + /// returned value : TRUE if menu is hidden, otherwise FALSE + /// + NPPM_ISMENUHIDDEN = Constants.NPPMSG + 73, + + /// + /// BOOL NPPM_HIDESTATUSBAR(0, BOOL hideOrNot) + /// if hideOrNot is set as TRUE then STATUSBAR will be hidden + /// otherwise it'll be shown. + /// return value : the old status value + /// + NPPM_HIDESTATUSBAR = Constants.NPPMSG + 74, + + /// + /// BOOL NPPM_ISSTATUSBARHIDDEN(0, 0) + /// returned value : TRUE if STATUSBAR is hidden, otherwise FALSE + /// + NPPM_ISSTATUSBARHIDDEN = Constants.NPPMSG + 75, + + /// + /// BOOL NPPM_GETSHORTCUTBYCMDID(int cmdID, ShortcutKey *sk) + /// get your plugin command current mapped shortcut into sk via cmdID + /// You may need it after getting NPPN_READY notification + /// returned value : TRUE if this function call is successful and shortcut is enable, otherwise FALSE + /// + NPPM_GETSHORTCUTBYCMDID = Constants.NPPMSG + 76, + + /// + /// BOOL NPPM_DOOPEN(0, const TCHAR *fullPathName2Open) + /// fullPathName2Open indicates the full file path name to be opened. + /// The return value is TRUE (1) if the operation is successful, otherwise FALSE (0). + /// + NPPM_DOOPEN = Constants.NPPMSG + 77, + + /// + /// BOOL NPPM_SAVECURRENTFILEAS (BOOL asCopy, const TCHAR* filename) + /// + NPPM_SAVECURRENTFILEAS = Constants.NPPMSG + 78, + + /// + /// INT NPPM_GETCURRENTNATIVELANGENCODING(0, 0) + /// returned value : the current native language encoding + /// + NPPM_GETCURRENTNATIVELANGENCODING = Constants.NPPMSG + 79, + + /// + /// returns TRUE if NPPM_ALLOCATECMDID is supported + /// Use to identify if subclassing is necessary + /// + NPPM_ALLOCATESUPPORTED = Constants.NPPMSG + 80, + + /// + /// BOOL NPPM_ALLOCATECMDID(int numberRequested, int* startNumber) + /// sets startNumber to the initial command ID if successful + /// Returns: TRUE if successful, FALSE otherwise. startNumber will also be set to 0 if unsuccessful + /// + NPPM_ALLOCATECMDID = Constants.NPPMSG + 81, + + /// + /// BOOL NPPM_ALLOCATEMARKER(int numberRequested, int* startNumber) + /// sets startNumber to the initial command ID if successful + /// Allocates a marker number to a plugin + /// Returns: TRUE if successful, FALSE otherwise. startNumber will also be set to 0 if unsuccessful + /// + NPPM_ALLOCATEMARKER = Constants.NPPMSG + 82, + + /// + /// INT NPPM_GETLANGUAGENAME(int langType, TCHAR *langName) + /// Get programming language name from the given language type (LangType) + /// Return value is the number of copied character / number of character to copy (\0 is not included) + /// You should call this function 2 times - the first time you pass langName as NULL to get the number of characters to copy. + /// You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGENAME function the 2nd time + /// by passing allocated buffer as argument langName + /// + NPPM_GETLANGUAGENAME = Constants.NPPMSG + 83, + + /// + /// INT NPPM_GETLANGUAGEDESC(int langType, TCHAR *langDesc) + /// Get programming language short description from the given language type (LangType) + /// Return value is the number of copied character / number of character to copy (\0 is not included) + /// You should call this function 2 times - the first time you pass langDesc as NULL to get the number of characters to copy. + /// You allocate a buffer of the length of (the number of characters + 1) then call NPPM_GETLANGUAGEDESC function the 2nd time + /// by passing allocated buffer as argument langDesc + /// + NPPM_GETLANGUAGEDESC = Constants.NPPMSG + 84, + + /// + /// VOID NPPM_SHOWDOCSWITCHER(0, BOOL toShowOrNot) + /// Send this message to show or hide doc switcher. + /// if toShowOrNot is TRUE then show doc switcher, otherwise hide it. + /// + NPPM_SHOWDOCSWITCHER = Constants.NPPMSG + 85, + + /// + /// BOOL NPPM_ISDOCSWITCHERSHOWN(0, 0) + /// Check to see if doc switcher is shown. + /// + NPPM_ISDOCSWITCHERSHOWN = Constants.NPPMSG + 86, + + /// + /// BOOL NPPM_GETAPPDATAPLUGINSALLOWED(0, 0) + /// Check to see if loading plugins from "%APPDATA%\..\Local\Notepad++\plugins" is allowed. + /// + NPPM_GETAPPDATAPLUGINSALLOWED = Constants.NPPMSG + 87, + + /// + /// INT NPPM_GETCURRENTVIEW(0, 0) + /// Return: current edit view of Notepad++. Only 2 possible values: 0 = Main, 1 = Secondary + /// + NPPM_GETCURRENTVIEW = Constants.NPPMSG + 88, + + /// + /// VOID NPPM_DOCSWITCHERDISABLECOLUMN(0, BOOL disableOrNot) + /// Disable or enable extension column of doc switcher + /// + NPPM_DOCSWITCHERDISABLECOLUMN = Constants.NPPMSG + 89, + + /// + /// INT NPPM_GETEDITORDEFAULTFOREGROUNDCOLOR(0, 0) + /// Return: current editor default foreground color. You should convert the returned value in COLORREF + /// + NPPM_GETEDITORDEFAULTFOREGROUNDCOLOR = Constants.NPPMSG + 90, + + /// + /// INT NPPM_GETEDITORDEFAULTBACKGROUNDCOLOR(0, 0) + /// Return: current editor default background color. You should convert the returned value in COLORREF + /// + NPPM_GETEDITORDEFAULTBACKGROUNDCOLOR = Constants.NPPMSG + 91, + + /// + /// VOID NPPM_SETSMOOTHFONT(0, BOOL setSmoothFontOrNot) + /// + NPPM_SETSMOOTHFONT = Constants.NPPMSG + 92, + + /// + /// VOID NPPM_SETEDITORBORDEREDGE(0, BOOL withEditorBorderEdgeOrNot) + /// + NPPM_SETEDITORBORDEREDGE = Constants.NPPMSG + 93, + + /// + /// VOID NPPM_SAVEFILE(0, const TCHAR *fileNameToSave) + /// + NPPM_SAVEFILE = Constants.NPPMSG + 94, + + /// + /// VOID NPPM_DISABLEAUTOUPDATE(0, 0) + /// + NPPM_DISABLEAUTOUPDATE = Constants.NPPMSG + 95, + + /// + /// BOOL NPPM_REMOVESHORTCUTASSIGNMENT(int cmdID) + /// removes the assigned shortcut mapped to cmdID + /// returned value : TRUE if function call is successful, otherwise FALSE + /// + NPPM_REMOVESHORTCUTBYCMDID = Constants.NPPMSG + 96, + + /// + /// INT NPPM_GETPLUGINHOMEPATH(size_t strLen, TCHAR *pluginRootPath) + /// Get plugin home root path. It's useful if plugins want to get its own path + /// by appending which is the name of plugin without extension part. + /// Returns the number of TCHAR copied/to copy. + /// Users should call it with pluginRootPath be NULL to get the required number of TCHAR (not including the terminating nul character), + /// allocate pluginRootPath buffer with the return value + 1, then call it again to get the path. + /// + NPPM_GETPLUGINHOMEPATH = Constants.NPPMSG + 97, + + RUNCOMMAND_USER = Constants.WM_USER + 3000, + NPPM_GETFULLCURRENTPATH = RUNCOMMAND_USER + FULL_CURRENT_PATH, + NPPM_GETCURRENTDIRECTORY = RUNCOMMAND_USER + CURRENT_DIRECTORY, + NPPM_GETFILENAME = RUNCOMMAND_USER + FILE_NAME, + NPPM_GETNAMEPART = RUNCOMMAND_USER + NAME_PART, + NPPM_GETEXTPART = RUNCOMMAND_USER + EXT_PART, + NPPM_GETCURRENTWORD = RUNCOMMAND_USER + CURRENT_WORD, + NPPM_GETNPPDIRECTORY = RUNCOMMAND_USER + NPP_DIRECTORY, + /// + /// BOOL NPPM_GETXXXXXXXXXXXXXXXX(size_t strLen, TCHAR *str) + /// where str is the allocated TCHAR array, + /// strLen is the allocated array size + /// The return value is TRUE when get generic_string operation success + /// Otherwise (allocated array size is too small) FALSE + /// + NPPM_GETFILENAMEATCURSOR = RUNCOMMAND_USER + GETFILENAMEATCURSOR, + + /// + /// INT NPPM_GETCURRENTLINE(0, 0) + /// return the caret current position line + /// + NPPM_GETCURRENTLINE = RUNCOMMAND_USER + CURRENT_LINE, + + /// + /// INT NPPM_GETCURRENTCOLUMN(0, 0) + /// return the caret current position column + /// + NPPM_GETCURRENTCOLUMN = RUNCOMMAND_USER + CURRENT_COLUMN, + + NPPM_GETNPPFULLFILEPATH = RUNCOMMAND_USER + NPP_FULL_FILE_PATH, + + VAR_NOT_RECOGNIZED = 0, + FULL_CURRENT_PATH = 1, + CURRENT_DIRECTORY = 2, + FILE_NAME = 3, + NAME_PART = 4, + EXT_PART = 5, + CURRENT_WORD = 6, + NPP_DIRECTORY = 7, + CURRENT_LINE = 8, + CURRENT_COLUMN = 9, + NPP_FULL_FILE_PATH = 10, + GETFILENAMEATCURSOR = 11, + + /// + /// To notify plugins that all the procedures of launchment of notepad++ are done. + ///scnNotification->nmhdr.code = NPPN_READY; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = 0; + /// + NPPN_FIRST = 1000, + /// + ///scnNotification->nmhdr.code = NPPN_READY; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = 0; + /// + NPPN_READY = NPPN_FIRST + 1, + + /// + ///scnNotification->nmhdr.code = NPPN_TB_MODIFICATION; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = 0; + /// + NPPN_TBMODIFICATION = NPPN_FIRST + 2, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEBEFORECLOSE; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILEBEFORECLOSE = NPPN_FIRST + 3, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEOPENED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILEOPENED = NPPN_FIRST + 4, + + /// + ///scnNotification->nmhdr.code = NPPN_FILECLOSED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILECLOSED = NPPN_FIRST + 5, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILEBEFOREOPEN = NPPN_FIRST + 6, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILEBEFORESAVE = NPPN_FIRST + 7, + + /// + ///scnNotification->nmhdr.code = NPPN_FILESAVED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILESAVED = NPPN_FIRST + 8, + + /// + ///scnNotification->nmhdr.code = NPPN_SHUTDOWN; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = 0; + /// + NPPN_SHUTDOWN = NPPN_FIRST + 9, + + /// + ///scnNotification->nmhdr.code = NPPN_BUFFERACTIVATED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = activatedBufferID; + /// + NPPN_BUFFERACTIVATED = NPPN_FIRST + 10, + + /// + ///scnNotification->nmhdr.code = NPPN_LANGCHANGED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = currentBufferID; + /// + NPPN_LANGCHANGED = NPPN_FIRST + 11, + + /// + ///scnNotification->nmhdr.code = NPPN_WORDSTYLESUPDATED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = currentBufferID; + /// + NPPN_WORDSTYLESUPDATED = NPPN_FIRST + 12, + + /// + ///scnNotification->nmhdr.code = NPPN_SHORTCUTSREMAPPED; + ///scnNotification->nmhdr.hwndFrom = ShortcutKeyStructurePointer; + ///scnNotification->nmhdr.idFrom = cmdID; + ///where ShortcutKeyStructurePointer is pointer of struct ShortcutKey: + ///struct ShortcutKey { + /// bool _isCtrl; + /// bool _isAlt; + /// bool _isShift; + /// UCHAR _key; + ///}; + /// + NPPN_SHORTCUTREMAPPED = NPPN_FIRST + 13, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEBEFOREOPEN; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = NULL; + /// + NPPN_FILEBEFORELOAD = NPPN_FIRST + 14, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEOPENFAILED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILELOADFAILED = NPPN_FIRST + 15, + + /// + ///scnNotification->nmhdr.code = NPPN_READONLYCHANGED; + ///scnNotification->nmhdr.hwndFrom = bufferID; + ///scnNotification->nmhdr.idFrom = docStatus; + /// where bufferID is BufferID + /// docStatus can be combined by DOCSTATUS_READONLY and DOCSTATUS_BUFFERDIRTY + /// + NPPN_READONLYCHANGED = NPPN_FIRST + 16, + + DOCSTATUS_READONLY = 1, + DOCSTATUS_BUFFERDIRTY = 2, + + /// + ///scnNotification->nmhdr.code = NPPN_DOCORDERCHANGED; + ///scnNotification->nmhdr.hwndFrom = newIndex; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_DOCORDERCHANGED = NPPN_FIRST + 17, + + /// + ///scnNotification->nmhdr.code = NPPN_SNAPSHOTDIRTYFILELOADED; + ///scnNotification->nmhdr.hwndFrom = NULL; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_SNAPSHOTDIRTYFILELOADED = NPPN_FIRST + 18, + + /// + ///scnNotification->nmhdr.code = NPPN_BEFORESHUTDOWN; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = 0; + /// + NPPN_BEFORESHUTDOWN = NPPN_FIRST + 19, + + /// + ///scnNotification->nmhdr.code = NPPN_CANCELSHUTDOWN; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = 0; + /// + NPPN_CANCELSHUTDOWN = NPPN_FIRST + 20, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEBEFORERENAME; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILEBEFORERENAME = NPPN_FIRST + 21, + + /// + ///scnNotification->nmhdr.code = NPPN_FILERENAMECANCEL; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILERENAMECANCEL = NPPN_FIRST + 22, + + /// + ///scnNotification->nmhdr.code = NPPN_FILERENAMED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILERENAMED = NPPN_FIRST + 23, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEBEFOREDELETE; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILEBEFOREDELETE = NPPN_FIRST + 24, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEDELETEFAILED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILEDELETEFAILED = NPPN_FIRST + 25, + + /// + ///scnNotification->nmhdr.code = NPPN_FILEDELETED; + ///scnNotification->nmhdr.hwndFrom = hwndNpp; + ///scnNotification->nmhdr.idFrom = BufferID; + /// + NPPN_FILEDELETED = NPPN_FIRST + 26, + + /* --Autogenerated -- end of section automatically generated from notepad-plus-plus\PowerEditor\src\MISC\PluginsManager\Notepad_plus_msgs.h * */ + } +} diff --git a/WakaTime/PluginInfrastructure/NotepadPPGateway.cs b/WakaTime/PluginInfrastructure/NotepadPPGateway.cs index e1668df..3884743 100644 --- a/WakaTime/PluginInfrastructure/NotepadPPGateway.cs +++ b/WakaTime/PluginInfrastructure/NotepadPPGateway.cs @@ -1,69 +1,68 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using System.Text; -using NppPluginNET.PluginInfrastructure; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - public interface INotepadPPGateway - { - void FileNew(); - - string GetCurrentFilePath(); - unsafe string GetFilePath(int bufferId); - void SetCurrentLanguage(LangType language); - } - - /// - /// This class holds helpers for sending messages defined in the Msgs_h.cs file. It is at the moment - /// incomplete. Please help fill in the blanks. - /// - public class NotepadPPGateway : INotepadPPGateway - { - private const int Unused = 0; - - public void FileNew() - { - Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) NppMsg.NPPM_MENUCOMMAND, Unused, NppMenuCmd.IDM_FILE_NEW); - } - - /// - /// Gets the path of the current document. - /// - public string GetCurrentFilePath() - { - var path = new StringBuilder(2000); - Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) NppMsg.NPPM_GETFULLCURRENTPATH, 0, path); - return path.ToString(); - } - - /// - /// Gets the path of the current document. - /// - public unsafe string GetFilePath(int bufferId) - { - var path = new StringBuilder(2000); - Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) NppMsg.NPPM_GETFULLPATHFROMBUFFERID, bufferId, path); - return path.ToString(); - } - - public void SetCurrentLanguage(LangType language) - { - Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) NppMsg.NPPM_SETCURRENTLANGTYPE, Unused, (int) language); - } - } - - /// - /// This class holds helpers for sending messages defined in the Resource_h.cs file. It is at the moment - /// incomplete. Please help fill in the blanks. - /// - class NppResource - { - private const int Unused = 0; - - public void ClearIndicator() - { - Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) Resource.NPPM_INTERNAL_CLEARINDICATOR, Unused, Unused); - } - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System.Text; +using NppPluginNET.PluginInfrastructure; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + public interface INotepadPPGateway + { + void FileNew(); + + string GetCurrentFilePath(); + unsafe string GetFilePath(int bufferId); + void SetCurrentLanguage(LangType language); + } + + /// + /// This class holds helpers for sending messages defined in the Msgs_h.cs file. It is at the moment + /// incomplete. Please help fill in the blanks. + /// + public class NotepadPPGateway : INotepadPPGateway + { + private const int Unused = 0; + + public void FileNew() + { + Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) NppMsg.NPPM_MENUCOMMAND, Unused, NppMenuCmd.IDM_FILE_NEW); + } + + /// + /// Gets the path of the current document. + /// + public string GetCurrentFilePath() + { + var path = new StringBuilder(2000); + Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) NppMsg.NPPM_GETFULLCURRENTPATH, 0, path); + return path.ToString(); + } + + /// + /// Gets the path of the current document. + /// + public unsafe string GetFilePath(int bufferId) + { + var path = new StringBuilder(2000); + Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) NppMsg.NPPM_GETFULLPATHFROMBUFFERID, bufferId, path); + return path.ToString(); + } + + public void SetCurrentLanguage(LangType language) + { + Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) NppMsg.NPPM_SETCURRENTLANGTYPE, Unused, (int) language); + } + } + + /// + /// This class holds helpers for sending messages defined in the Resource_h.cs file. It is at the moment + /// incomplete. Please help fill in the blanks. + /// + class NppResource + { + private const int Unused = 0; + + public void ClearIndicator() + { + Win32.SendMessage(PluginBase.nppData._nppHandle, (uint) Resource.NPPM_INTERNAL_CLEARINDICATOR, Unused, Unused); + } + } +} diff --git a/WakaTime/PluginInfrastructure/NppPluginNETBase.cs b/WakaTime/PluginInfrastructure/NppPluginNETBase.cs index 250a901..598cbba 100644 --- a/WakaTime/PluginInfrastructure/NppPluginNETBase.cs +++ b/WakaTime/PluginInfrastructure/NppPluginNETBase.cs @@ -1,54 +1,54 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - class PluginBase - { - internal static NppData nppData; - internal static FuncItems _funcItems = new FuncItems(); - - internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer) - { - SetCommand(index, commandName, functionPointer, new ShortcutKey(), false); - } - - internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, ShortcutKey shortcut) - { - SetCommand(index, commandName, functionPointer, shortcut, false); - } - - internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, bool checkOnInit) - { - SetCommand(index, commandName, functionPointer, new ShortcutKey(), checkOnInit); - } - - internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, ShortcutKey shortcut, bool checkOnInit) - { - FuncItem funcItem = new FuncItem(); - funcItem._cmdID = index; - funcItem._itemName = commandName; - if (functionPointer != null) - funcItem._pFunc = new NppFuncItemDelegate(functionPointer); - if (shortcut._key != 0) - funcItem._pShKey = shortcut; - funcItem._init2Check = checkOnInit; - _funcItems.Add(funcItem); - } - - internal static IntPtr GetCurrentScintilla() - { - int curScintilla; - Win32.SendMessage(nppData._nppHandle, (uint) NppMsg.NPPM_GETCURRENTSCINTILLA, 0, out curScintilla); - return (curScintilla == 0) ? nppData._scintillaMainHandle : nppData._scintillaSecondHandle; - } - - - static readonly Func gatewayFactory = () => new ScintillaGateway(GetCurrentScintilla()); - - public static Func GetGatewayFactory() - { - return gatewayFactory; - } - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + class PluginBase + { + internal static NppData nppData; + internal static FuncItems _funcItems = new FuncItems(); + + internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer) + { + SetCommand(index, commandName, functionPointer, new ShortcutKey(), false); + } + + internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, ShortcutKey shortcut) + { + SetCommand(index, commandName, functionPointer, shortcut, false); + } + + internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, bool checkOnInit) + { + SetCommand(index, commandName, functionPointer, new ShortcutKey(), checkOnInit); + } + + internal static void SetCommand(int index, string commandName, NppFuncItemDelegate functionPointer, ShortcutKey shortcut, bool checkOnInit) + { + FuncItem funcItem = new FuncItem(); + funcItem._cmdID = index; + funcItem._itemName = commandName; + if (functionPointer != null) + funcItem._pFunc = new NppFuncItemDelegate(functionPointer); + if (shortcut._key != 0) + funcItem._pShKey = shortcut; + funcItem._init2Check = checkOnInit; + _funcItems.Add(funcItem); + } + + internal static IntPtr GetCurrentScintilla() + { + int curScintilla; + Win32.SendMessage(nppData._nppHandle, (uint) NppMsg.NPPM_GETCURRENTSCINTILLA, 0, out curScintilla); + return (curScintilla == 0) ? nppData._scintillaMainHandle : nppData._scintillaSecondHandle; + } + + + static readonly Func gatewayFactory = () => new ScintillaGateway(GetCurrentScintilla()); + + public static Func GetGatewayFactory() + { + return gatewayFactory; + } + } +} diff --git a/WakaTime/PluginInfrastructure/NppPluginNETHelper.cs b/WakaTime/PluginInfrastructure/NppPluginNETHelper.cs index c337fea..49f1fd3 100644 --- a/WakaTime/PluginInfrastructure/NppPluginNETHelper.cs +++ b/WakaTime/PluginInfrastructure/NppPluginNETHelper.cs @@ -1,191 +1,191 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using System.Text; -using System.Windows.Forms; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - [StructLayout(LayoutKind.Sequential)] - public struct NppData - { - public IntPtr _nppHandle; - public IntPtr _scintillaMainHandle; - public IntPtr _scintillaSecondHandle; - } - - public delegate void NppFuncItemDelegate(); - - [StructLayout(LayoutKind.Sequential)] - public struct ShortcutKey - { - public ShortcutKey(bool isCtrl, bool isAlt, bool isShift, Keys key) - { - // the types 'bool' and 'char' have a size of 1 byte only! - _isCtrl = Convert.ToByte(isCtrl); - _isAlt = Convert.ToByte(isAlt); - _isShift = Convert.ToByte(isShift); - _key = Convert.ToByte(key); - } - public byte _isCtrl; - public byte _isAlt; - public byte _isShift; - public byte _key; - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public struct FuncItem - { - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] - public string _itemName; - public NppFuncItemDelegate _pFunc; - public int _cmdID; - public bool _init2Check; - public ShortcutKey _pShKey; - } - - public class FuncItems : IDisposable - { - List _funcItems; - int _sizeFuncItem; - List _shortCutKeys; - IntPtr _nativePointer; - bool _disposed = false; - - public FuncItems() - { - _funcItems = new List(); - _sizeFuncItem = Marshal.SizeOf(typeof(FuncItem)); - _shortCutKeys = new List(); - } - - [DllImport("kernel32")] - static extern void RtlMoveMemory(IntPtr Destination, IntPtr Source, int Length); - public void Add(FuncItem funcItem) - { - int oldSize = _funcItems.Count * _sizeFuncItem; - _funcItems.Add(funcItem); - int newSize = _funcItems.Count * _sizeFuncItem; - IntPtr newPointer = Marshal.AllocHGlobal(newSize); - - if (_nativePointer != IntPtr.Zero) - { - RtlMoveMemory(newPointer, _nativePointer, oldSize); - Marshal.FreeHGlobal(_nativePointer); - } - IntPtr ptrPosNewItem = (IntPtr)(newPointer.ToInt64() + oldSize); - byte[] aB = Encoding.Unicode.GetBytes(funcItem._itemName + "\0"); - Marshal.Copy(aB, 0, ptrPosNewItem, aB.Length); - ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 128); - IntPtr p = (funcItem._pFunc != null) ? Marshal.GetFunctionPointerForDelegate(funcItem._pFunc) : IntPtr.Zero; - Marshal.WriteIntPtr(ptrPosNewItem, p); - ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + IntPtr.Size); - Marshal.WriteInt32(ptrPosNewItem, funcItem._cmdID); - ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 4); - Marshal.WriteInt32(ptrPosNewItem, Convert.ToInt32(funcItem._init2Check)); - ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 4); - if (funcItem._pShKey._key != 0) - { - IntPtr newShortCutKey = Marshal.AllocHGlobal(4); - Marshal.StructureToPtr(funcItem._pShKey, newShortCutKey, false); - Marshal.WriteIntPtr(ptrPosNewItem, newShortCutKey); - } - else Marshal.WriteIntPtr(ptrPosNewItem, IntPtr.Zero); - - _nativePointer = newPointer; - } - - public void RefreshItems() - { - IntPtr ptrPosItem = _nativePointer; - for (int i = 0; i < _funcItems.Count; i++) - { - FuncItem updatedItem = new FuncItem(); - updatedItem._itemName = _funcItems[i]._itemName; - ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 128); - updatedItem._pFunc = _funcItems[i]._pFunc; - ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + IntPtr.Size); - updatedItem._cmdID = Marshal.ReadInt32(ptrPosItem); - ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 4); - updatedItem._init2Check = _funcItems[i]._init2Check; - ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 4); - updatedItem._pShKey = _funcItems[i]._pShKey; - ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + IntPtr.Size); - - _funcItems[i] = updatedItem; - } - } - - public IntPtr NativePointer { get { return _nativePointer; } } - public List Items { get { return _funcItems; } } - - public void Dispose() - { - if (!_disposed) - { - foreach (IntPtr ptr in _shortCutKeys) Marshal.FreeHGlobal(ptr); - if (_nativePointer != IntPtr.Zero) Marshal.FreeHGlobal(_nativePointer); - _disposed = true; - } - } - ~FuncItems() - { - Dispose(); - } - } - - - public enum winVer - { - WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, - WV_XP, WV_S2003, WV_XPX64, WV_VISTA, WV_WIN7, WV_WIN8, WV_WIN81, WV_WIN10 - } - - - [Flags] - public enum DockMgrMsg : uint - { - IDB_CLOSE_DOWN = 137, - IDB_CLOSE_UP = 138, - IDD_CONTAINER_DLG = 139, - - IDC_TAB_CONT = 1027, - IDC_CLIENT_TAB = 1028, - IDC_BTN_CAPTION = 1050, - - DMM_MSG = 0x5000, - DMM_CLOSE = (DMM_MSG + 1), - DMM_DOCK = (DMM_MSG + 2), - DMM_FLOAT = (DMM_MSG + 3), - DMM_DOCKALL = (DMM_MSG + 4), - DMM_FLOATALL = (DMM_MSG + 5), - DMM_MOVE = (DMM_MSG + 6), - DMM_UPDATEDISPINFO = (DMM_MSG + 7), - DMM_GETIMAGELIST = (DMM_MSG + 8), - DMM_GETICONPOS = (DMM_MSG + 9), - DMM_DROPDATA = (DMM_MSG + 10), - DMM_MOVE_SPLITTER = (DMM_MSG + 11), - DMM_CANCEL_MOVE = (DMM_MSG + 12), - DMM_LBUTTONUP = (DMM_MSG + 13), - - DMN_FIRST = 1050, - DMN_CLOSE = (DMN_FIRST + 1), - //nmhdr.Code = DWORD(DMN_CLOSE, 0)); - //nmhdr.hwndFrom = hwndNpp; - //nmhdr.IdFrom = ctrlIdNpp; - - DMN_DOCK = (DMN_FIRST + 2), - DMN_FLOAT = (DMN_FIRST + 3) - //nmhdr.Code = DWORD(DMN_XXX, int newContainer); - //nmhdr.hwndFrom = hwndNpp; - //nmhdr.IdFrom = ctrlIdNpp; - } - - [StructLayout(LayoutKind.Sequential)] - public struct toolbarIcons - { - public IntPtr hToolbarBmp; - public IntPtr hToolbarIcon; - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System; +using System.Text; +using System.Windows.Forms; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + [StructLayout(LayoutKind.Sequential)] + public struct NppData + { + public IntPtr _nppHandle; + public IntPtr _scintillaMainHandle; + public IntPtr _scintillaSecondHandle; + } + + public delegate void NppFuncItemDelegate(); + + [StructLayout(LayoutKind.Sequential)] + public struct ShortcutKey + { + public ShortcutKey(bool isCtrl, bool isAlt, bool isShift, Keys key) + { + // the types 'bool' and 'char' have a size of 1 byte only! + _isCtrl = Convert.ToByte(isCtrl); + _isAlt = Convert.ToByte(isAlt); + _isShift = Convert.ToByte(isShift); + _key = Convert.ToByte(key); + } + public byte _isCtrl; + public byte _isAlt; + public byte _isShift; + public byte _key; + } + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] + public struct FuncItem + { + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] + public string _itemName; + public NppFuncItemDelegate _pFunc; + public int _cmdID; + public bool _init2Check; + public ShortcutKey _pShKey; + } + + public class FuncItems : IDisposable + { + List _funcItems; + int _sizeFuncItem; + List _shortCutKeys; + IntPtr _nativePointer; + bool _disposed = false; + + public FuncItems() + { + _funcItems = new List(); + _sizeFuncItem = Marshal.SizeOf(typeof(FuncItem)); + _shortCutKeys = new List(); + } + + [DllImport("kernel32")] + static extern void RtlMoveMemory(IntPtr Destination, IntPtr Source, int Length); + public void Add(FuncItem funcItem) + { + int oldSize = _funcItems.Count * _sizeFuncItem; + _funcItems.Add(funcItem); + int newSize = _funcItems.Count * _sizeFuncItem; + IntPtr newPointer = Marshal.AllocHGlobal(newSize); + + if (_nativePointer != IntPtr.Zero) + { + RtlMoveMemory(newPointer, _nativePointer, oldSize); + Marshal.FreeHGlobal(_nativePointer); + } + IntPtr ptrPosNewItem = (IntPtr)(newPointer.ToInt64() + oldSize); + byte[] aB = Encoding.Unicode.GetBytes(funcItem._itemName + "\0"); + Marshal.Copy(aB, 0, ptrPosNewItem, aB.Length); + ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 128); + IntPtr p = (funcItem._pFunc != null) ? Marshal.GetFunctionPointerForDelegate(funcItem._pFunc) : IntPtr.Zero; + Marshal.WriteIntPtr(ptrPosNewItem, p); + ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + IntPtr.Size); + Marshal.WriteInt32(ptrPosNewItem, funcItem._cmdID); + ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 4); + Marshal.WriteInt32(ptrPosNewItem, Convert.ToInt32(funcItem._init2Check)); + ptrPosNewItem = (IntPtr)(ptrPosNewItem.ToInt64() + 4); + if (funcItem._pShKey._key != 0) + { + IntPtr newShortCutKey = Marshal.AllocHGlobal(4); + Marshal.StructureToPtr(funcItem._pShKey, newShortCutKey, false); + Marshal.WriteIntPtr(ptrPosNewItem, newShortCutKey); + } + else Marshal.WriteIntPtr(ptrPosNewItem, IntPtr.Zero); + + _nativePointer = newPointer; + } + + public void RefreshItems() + { + IntPtr ptrPosItem = _nativePointer; + for (int i = 0; i < _funcItems.Count; i++) + { + FuncItem updatedItem = new FuncItem(); + updatedItem._itemName = _funcItems[i]._itemName; + ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 128); + updatedItem._pFunc = _funcItems[i]._pFunc; + ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + IntPtr.Size); + updatedItem._cmdID = Marshal.ReadInt32(ptrPosItem); + ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 4); + updatedItem._init2Check = _funcItems[i]._init2Check; + ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + 4); + updatedItem._pShKey = _funcItems[i]._pShKey; + ptrPosItem = (IntPtr)(ptrPosItem.ToInt64() + IntPtr.Size); + + _funcItems[i] = updatedItem; + } + } + + public IntPtr NativePointer { get { return _nativePointer; } } + public List Items { get { return _funcItems; } } + + public void Dispose() + { + if (!_disposed) + { + foreach (IntPtr ptr in _shortCutKeys) Marshal.FreeHGlobal(ptr); + if (_nativePointer != IntPtr.Zero) Marshal.FreeHGlobal(_nativePointer); + _disposed = true; + } + } + ~FuncItems() + { + Dispose(); + } + } + + + public enum winVer + { + WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, + WV_XP, WV_S2003, WV_XPX64, WV_VISTA, WV_WIN7, WV_WIN8, WV_WIN81, WV_WIN10 + } + + + [Flags] + public enum DockMgrMsg : uint + { + IDB_CLOSE_DOWN = 137, + IDB_CLOSE_UP = 138, + IDD_CONTAINER_DLG = 139, + + IDC_TAB_CONT = 1027, + IDC_CLIENT_TAB = 1028, + IDC_BTN_CAPTION = 1050, + + DMM_MSG = 0x5000, + DMM_CLOSE = (DMM_MSG + 1), + DMM_DOCK = (DMM_MSG + 2), + DMM_FLOAT = (DMM_MSG + 3), + DMM_DOCKALL = (DMM_MSG + 4), + DMM_FLOATALL = (DMM_MSG + 5), + DMM_MOVE = (DMM_MSG + 6), + DMM_UPDATEDISPINFO = (DMM_MSG + 7), + DMM_GETIMAGELIST = (DMM_MSG + 8), + DMM_GETICONPOS = (DMM_MSG + 9), + DMM_DROPDATA = (DMM_MSG + 10), + DMM_MOVE_SPLITTER = (DMM_MSG + 11), + DMM_CANCEL_MOVE = (DMM_MSG + 12), + DMM_LBUTTONUP = (DMM_MSG + 13), + + DMN_FIRST = 1050, + DMN_CLOSE = (DMN_FIRST + 1), + //nmhdr.Code = DWORD(DMN_CLOSE, 0)); + //nmhdr.hwndFrom = hwndNpp; + //nmhdr.IdFrom = ctrlIdNpp; + + DMN_DOCK = (DMN_FIRST + 2), + DMN_FLOAT = (DMN_FIRST + 3) + //nmhdr.Code = DWORD(DMN_XXX, int newContainer); + //nmhdr.hwndFrom = hwndNpp; + //nmhdr.IdFrom = ctrlIdNpp; + } + + [StructLayout(LayoutKind.Sequential)] + public struct toolbarIcons + { + public IntPtr hToolbarBmp; + public IntPtr hToolbarIcon; + } +} diff --git a/WakaTime/PluginInfrastructure/Preference_h.cs b/WakaTime/PluginInfrastructure/Preference_h.cs index f1d1c2a..4796627 100644 --- a/WakaTime/PluginInfrastructure/Preference_h.cs +++ b/WakaTime/PluginInfrastructure/Preference_h.cs @@ -1,342 +1,342 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -// -// This file should stay in sync with the CPP project file -// "notepad-plus-plus/scintilla/include/Scintilla.iface" -// found at -// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.iface -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace NppPluginNET.PluginInfrastructure -{ - public enum Preference - { - /* ++Autogenerated -- start of section automatically generated from preference_rc.h */ - - IDD_PREFERENCE_BOX = 6000, - IDC_BUTTON_CLOSE = IDD_PREFERENCE_BOX + 1, - IDC_LIST_DLGTITLE = IDD_PREFERENCE_BOX + 2, - - IDD_PREFERENCE_BAR_BOX = 6100, - IDC_TOOLBAR_GB_STATIC = IDD_PREFERENCE_BAR_BOX + 1, - IDC_CHECK_HIDE = IDD_PREFERENCE_BAR_BOX + 2, - IDC_RADIO_SMALLICON = IDD_PREFERENCE_BAR_BOX + 3, - IDC_RADIO_BIGICON = IDD_PREFERENCE_BAR_BOX + 4, - IDC_RADIO_STANDARD = IDD_PREFERENCE_BAR_BOX + 5, - - IDC_TABBAR_GB_STATIC = IDD_PREFERENCE_BAR_BOX + 6, - IDC_CHECK_REDUCE = IDD_PREFERENCE_BAR_BOX + 7, - IDC_CHECK_LOCK = IDD_PREFERENCE_BAR_BOX + 8, - IDC_CHECK_DRAWINACTIVE = IDD_PREFERENCE_BAR_BOX + 9, - IDC_CHECK_ORANGE = IDD_PREFERENCE_BAR_BOX + 10, - IDC_CHECK_SHOWSTATUSBAR = IDD_PREFERENCE_BAR_BOX + 11, - IDC_CHECK_ENABLETABCLOSE = IDD_PREFERENCE_BAR_BOX + 12, - IDC_CHECK_DBCLICK2CLOSE = IDD_PREFERENCE_BAR_BOX + 13, - IDC_CHECK_ENABLEDOCSWITCHER = IDD_PREFERENCE_BAR_BOX + 14, - IDC_CHECK_MAINTAININDENT = IDD_PREFERENCE_BAR_BOX + 15, - IDC_CHECK_KEEPINSAMEDIR = IDD_PREFERENCE_BAR_BOX + 16, - IDC_CHECK_STYLEMRU = IDD_PREFERENCE_BAR_BOX + 17, - IDC_CHECK_TAB_HIDE = IDD_PREFERENCE_BAR_BOX + 18, - IDC_CHECK_TAB_MULTILINE = IDD_PREFERENCE_BAR_BOX + 19, - IDC_CHECK_TAB_VERTICAL = IDD_PREFERENCE_BAR_BOX + 20, - IDC_CHECK_TAB_LAST_EXIT = IDD_PREFERENCE_BAR_BOX + 21, - IDC_CHECK_HIDEMENUBAR = IDD_PREFERENCE_BAR_BOX + 22, - IDC_LOCALIZATION_GB_STATIC = IDD_PREFERENCE_BAR_BOX + 23, - IDC_COMBO_LOCALIZATION = IDD_PREFERENCE_BAR_BOX + 24, - IDC_DOCSWITCH_GB_STATIC = IDD_PREFERENCE_BAR_BOX + 25, - IDC_CHECK_DOCSWITCH = IDD_PREFERENCE_BAR_BOX + 26, - IDC_CHECK_DOCSWITCH_NOEXTCOLUMN = IDD_PREFERENCE_BAR_BOX + 27, - - IDD_PREFERENCE_MULTIINSTANCE_BOX = 6150, - IDC_MULTIINST_GB_STATIC = IDD_PREFERENCE_MULTIINSTANCE_BOX + 1, - IDC_SESSIONININST_RADIO = IDD_PREFERENCE_MULTIINSTANCE_BOX + 2, - IDC_MULTIINST_RADIO = IDD_PREFERENCE_MULTIINSTANCE_BOX + 3, - IDC_MONOINST_RADIO = IDD_PREFERENCE_MULTIINSTANCE_BOX + 4, - IDD_STATIC_RESTARTNOTE = IDD_PREFERENCE_MULTIINSTANCE_BOX + 5, - - IDD_PREFERENCE_WORDCHARLIST_BOX = 6160, - IDC_WORDCHARLIST_GB_STATIC = IDD_PREFERENCE_WORDCHARLIST_BOX + 1, - IDC_RADIO_WORDCHAR_DEFAULT = IDD_PREFERENCE_WORDCHARLIST_BOX + 2, - IDC_RADIO_WORDCHAR_CUSTOM = IDD_PREFERENCE_WORDCHARLIST_BOX + 3, - IDC_WORDCHAR_CUSTOM_EDIT = IDD_PREFERENCE_WORDCHARLIST_BOX + 4, - IDD_WORDCHAR_QUESTION_BUTTON = IDD_PREFERENCE_WORDCHARLIST_BOX + 5, - IDD_STATIC_WORDCHAR_WARNING = IDD_PREFERENCE_WORDCHARLIST_BOX + 6, - - IDD_PREFERENCE_MARGEIN_BOX = 6200, - IDC_FMS_GB_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 1, - IDC_RADIO_SIMPLE = IDD_PREFERENCE_MARGEIN_BOX + 2, - IDC_RADIO_ARROW = IDD_PREFERENCE_MARGEIN_BOX + 3, - IDC_RADIO_CIRCLE = IDD_PREFERENCE_MARGEIN_BOX + 4, - IDC_RADIO_BOX = IDD_PREFERENCE_MARGEIN_BOX + 5, - - IDC_CHECK_LINENUMBERMARGE = IDD_PREFERENCE_MARGEIN_BOX + 6, - IDC_CHECK_BOOKMARKMARGE = IDD_PREFERENCE_MARGEIN_BOX + 7, - - IDC_VES_GB_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 11, - - IDC_CHECK_EDGEBGMODE = IDD_PREFERENCE_MARGEIN_BOX + 13, - IDC_CHECK_CURRENTLINEHILITE = IDD_PREFERENCE_MARGEIN_BOX + 14, - IDC_CHECK_SMOOTHFONT = IDD_PREFERENCE_MARGEIN_BOX + 15, - - IDC_CARETSETTING_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 16, - IDC_WIDTH_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 17, - IDC_WIDTH_COMBO = IDD_PREFERENCE_MARGEIN_BOX + 18, - IDC_BLINKRATE_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 19, - IDC_CARETBLINKRATE_SLIDER = IDD_PREFERENCE_MARGEIN_BOX + 20, - IDC_CARETBLINKRATE_F_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 21, - IDC_CARETBLINKRATE_S_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 22, - IDC_CHECK_DOCCHANGESTATEMARGE = IDD_PREFERENCE_MARGEIN_BOX + 23, - IDC_MULTISELECTION_GB_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 24, - IDC_CHECK_MULTISELECTION = IDD_PREFERENCE_MARGEIN_BOX + 25, - - IDC_RADIO_FOLDMARGENONE = IDD_PREFERENCE_MARGEIN_BOX + 26, - - IDC_LW_GB_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 27, - IDC_RADIO_LWDEF = IDD_PREFERENCE_MARGEIN_BOX + 28, - IDC_RADIO_LWALIGN = IDD_PREFERENCE_MARGEIN_BOX + 29, - IDC_RADIO_LWINDENT = IDD_PREFERENCE_MARGEIN_BOX + 30, - - IDC_BORDERWIDTH_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 31, - IDC_BORDERWIDTHVAL_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 32, - IDC_BORDERWIDTH_SLIDER = IDD_PREFERENCE_MARGEIN_BOX + 33, - IDC_CHECK_DISABLEADVANCEDSCROLL = IDD_PREFERENCE_MARGEIN_BOX + 34, - IDC_CHECK_NOEDGE = IDD_PREFERENCE_MARGEIN_BOX + 35, - IDC_CHECK_SCROLLBEYONDLASTLINE = IDD_PREFERENCE_MARGEIN_BOX + 36, - - IDC_STATIC_MULTILNMODE_TIP = IDD_PREFERENCE_MARGEIN_BOX + 37, - IDC_COLUMNPOS_EDIT = IDD_PREFERENCE_MARGEIN_BOX + 38, - IDC_CHECK_RIGHTCLICKKEEPSSELECTION = IDD_PREFERENCE_MARGEIN_BOX + 39, - - IDD_PREFERENCE_DELIMITERSETTINGS_BOX = 6250, - IDC_DELIMITERSETTINGS_GB_STATIC = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 1, - IDD_STATIC_OPENDELIMITER = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 2, - IDC_EDIT_OPENDELIMITER = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 3, - IDC_EDIT_CLOSEDELIMITER = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 4, - IDD_STATIC_CLOSEDELIMITER = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 5, - IDD_SEVERALLINEMODEON_CHECK = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 6, - IDD_STATIC_BLABLA = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 7, - IDD_STATIC_BLABLA2NDLINE = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 8, - - IDD_PREFERENCE_SETTINGSONCLOUD_BOX = 6260, - IDC_SETTINGSONCLOUD_WARNING_STATIC = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 1, - IDC_SETTINGSONCLOUD_GB_STATIC = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 2, - IDC_NOCLOUD_RADIO = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 3, - - IDC_WITHCLOUD_RADIO = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 7, - IDC_CLOUDPATH_EDIT = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 8, - IDD_CLOUDPATH_BROWSE_BUTTON = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 9, - - IDD_PREFERENCE_SEARCHENGINE_BOX = 6270, - IDC_SEARCHENGINES_GB_STATIC = IDD_PREFERENCE_SEARCHENGINE_BOX + 1, - IDC_SEARCHENGINE_DUCKDUCKGO_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 2, - IDC_SEARCHENGINE_GOOGLE_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 3, - IDC_SEARCHENGINE_BING_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 4, - IDC_SEARCHENGINE_YAHOO_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 5, - IDC_SEARCHENGINE_CUSTOM_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 6, - IDC_SEARCHENGINE_EDIT = IDD_PREFERENCE_SEARCHENGINE_BOX + 7, - IDD_SEARCHENGINE_NOTE_STATIC = IDD_PREFERENCE_SEARCHENGINE_BOX + 8, - IDC_SEARCHENGINE_STACKOVERFLOW_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 9, - - IDD_PREFERENCE_SETTING_BOX = 6300, - IDC_TABSETTING_GB_STATIC = IDD_PREFERENCE_SETTING_BOX + 1, - IDC_CHECK_REPLACEBYSPACE = IDD_PREFERENCE_SETTING_BOX + 2, - IDC_TABSIZE_STATIC = IDD_PREFERENCE_SETTING_BOX + 3, - IDC_HISTORY_GB_STATIC = IDD_PREFERENCE_SETTING_BOX + 4, - IDC_CHECK_DONTCHECKHISTORY = IDD_PREFERENCE_SETTING_BOX + 5, - IDC_MAXNBFILE_STATIC = IDD_PREFERENCE_SETTING_BOX + 6, - IDC_CHECK_MIN2SYSTRAY = IDD_PREFERENCE_SETTING_BOX + 8, - IDC_CHECK_REMEMBERSESSION = IDD_PREFERENCE_SETTING_BOX + 9, - IDC_TABSIZEVAL_STATIC = IDD_PREFERENCE_SETTING_BOX + 10, - IDC_MAXNBFILEVAL_STATIC = IDD_PREFERENCE_SETTING_BOX + 11, - IDC_FILEAUTODETECTION_STATIC = IDD_PREFERENCE_SETTING_BOX + 12, - IDC_CHECK_UPDATESILENTLY = IDD_PREFERENCE_SETTING_BOX + 13, - IDC_RADIO_BKNONE = IDD_PREFERENCE_SETTING_BOX + 15, - IDC_RADIO_BKSIMPLE = IDD_PREFERENCE_SETTING_BOX + 16, - IDC_RADIO_BKVERBOSE = IDD_PREFERENCE_SETTING_BOX + 17, - IDC_CLICKABLELINK_STATIC = IDD_PREFERENCE_SETTING_BOX + 18, - IDC_CHECK_CLICKABLELINK_ENABLE = IDD_PREFERENCE_SETTING_BOX + 19, - IDC_CHECK_CLICKABLELINK_NOUNDERLINE = IDD_PREFERENCE_SETTING_BOX + 20, - IDC_EDIT_SESSIONFILEEXT = IDD_PREFERENCE_SETTING_BOX + 21, - IDC_SESSIONFILEEXT_STATIC = IDD_PREFERENCE_SETTING_BOX + 22, - IDC_CHECK_AUTOUPDATE = IDD_PREFERENCE_SETTING_BOX + 23, - IDC_DOCUMENTSWITCHER_STATIC = IDD_PREFERENCE_SETTING_BOX + 24, - IDC_CHECK_UPDATEGOTOEOF = IDD_PREFERENCE_SETTING_BOX + 25, - IDC_CHECK_ENABLSMARTHILITE = IDD_PREFERENCE_SETTING_BOX + 26, - IDC_CHECK_ENABLTAGSMATCHHILITE = IDD_PREFERENCE_SETTING_BOX + 27, - IDC_CHECK_ENABLTAGATTRHILITE = IDD_PREFERENCE_SETTING_BOX + 28, - IDC_TAGMATCHEDHILITE_STATIC = IDD_PREFERENCE_SETTING_BOX + 29, - IDC_CHECK_HIGHLITENONEHTMLZONE = IDD_PREFERENCE_SETTING_BOX + 30, - IDC_CHECK_SHORTTITLE = IDD_PREFERENCE_SETTING_BOX + 31, - IDC_CHECK_SMARTHILITECASESENSITIVE = IDD_PREFERENCE_SETTING_BOX + 32, - IDC_SMARTHILITING_STATIC = IDD_PREFERENCE_SETTING_BOX + 33, - IDC_CHECK_DETECTENCODING = IDD_PREFERENCE_SETTING_BOX + 34, - IDC_CHECK_BACKSLASHISESCAPECHARACTERFORSQL = IDD_PREFERENCE_SETTING_BOX + 35, - IDC_EDIT_WORKSPACEFILEEXT = IDD_PREFERENCE_SETTING_BOX + 36, - IDC_WORKSPACEFILEEXT_STATIC = IDD_PREFERENCE_SETTING_BOX + 37, - IDC_CHECK_SMARTHILITEWHOLEWORDONLY = IDD_PREFERENCE_SETTING_BOX + 38, - IDC_CHECK_SMARTHILITEUSEFINDSETTINGS = IDD_PREFERENCE_SETTING_BOX + 39, - IDC_CHECK_SMARTHILITEANOTHERRVIEW = IDD_PREFERENCE_SETTING_BOX + 40, - - IDC_CHECK_REMEMBEREDITVIEWPERFILE = IDD_PREFERENCE_SETTING_BOX + 41, - IDC_REMEMBEREDITVIEWPERFILE_STATIC = IDD_PREFERENCE_SETTING_BOX + 42, - IDC_EDIT_REMEMBEREDITVIEWPERFILE = IDD_PREFERENCE_SETTING_BOX + 43, - - IDC_DOCUMENTPEEK_STATIC = IDD_PREFERENCE_SETTING_BOX + 44, - IDC_CHECK_ENABLEDOCPEEKER = IDD_PREFERENCE_SETTING_BOX + 45, - IDC_CHECK_ENABLEDOCPEEKONMAP = IDD_PREFERENCE_SETTING_BOX + 46, - IDC_COMBO_FILEUPDATECHOICE = IDD_PREFERENCE_SETTING_BOX + 47, - IDC_CHECK_DIRECTWRITE_ENABLE = IDD_PREFERENCE_SETTING_BOX + 49, - - IDD_PREFERENCE_NEWDOCSETTING_BOX = 6400, - IDC_FORMAT_GB_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 1, - IDC_RADIO_F_WIN = IDD_PREFERENCE_NEWDOCSETTING_BOX + 2, - IDC_RADIO_F_UNIX = IDD_PREFERENCE_NEWDOCSETTING_BOX + 3, - IDC_RADIO_F_MAC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 4, - IDC_ENCODING_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 5, - IDC_RADIO_ANSI = IDD_PREFERENCE_NEWDOCSETTING_BOX + 6, - IDC_RADIO_UTF8SANSBOM = IDD_PREFERENCE_NEWDOCSETTING_BOX + 7, - IDC_RADIO_UTF8 = IDD_PREFERENCE_NEWDOCSETTING_BOX + 8, - IDC_RADIO_UCS2BIG = IDD_PREFERENCE_NEWDOCSETTING_BOX + 9, - IDC_RADIO_UCS2SMALL = IDD_PREFERENCE_NEWDOCSETTING_BOX + 10, - IDC_DEFAULTLANG_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 11, - IDC_COMBO_DEFAULTLANG = IDD_PREFERENCE_NEWDOCSETTING_BOX + 12, - IDC_OPENSAVEDIR_GR_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 13, - IDC_OPENSAVEDIR_FOLLOWCURRENT_RADIO = IDD_PREFERENCE_NEWDOCSETTING_BOX + 14, - IDC_OPENSAVEDIR_REMEMBERLAST_RADIO = IDD_PREFERENCE_NEWDOCSETTING_BOX + 15, - IDC_OPENSAVEDIR_ALWAYSON_RADIO = IDD_PREFERENCE_NEWDOCSETTING_BOX + 16, - IDC_OPENSAVEDIR_ALWAYSON_EDIT = IDD_PREFERENCE_NEWDOCSETTING_BOX + 17, - IDD_OPENSAVEDIR_ALWAYSON_BROWSE_BUTTON = IDD_PREFERENCE_NEWDOCSETTING_BOX + 18, - IDC_NEWDOCUMENT_GR_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 19, - IDC_CHECK_OPENANSIASUTF8 = IDD_PREFERENCE_NEWDOCSETTING_BOX + 20, - IDC_RADIO_OTHERCP = IDD_PREFERENCE_NEWDOCSETTING_BOX + 21, - IDC_COMBO_OTHERCP = IDD_PREFERENCE_NEWDOCSETTING_BOX + 22, - IDC_GP_STATIC_RECENTFILES = IDD_PREFERENCE_NEWDOCSETTING_BOX + 23, - IDC_CHECK_INSUBMENU = IDD_PREFERENCE_NEWDOCSETTING_BOX + 24, - IDC_RADIO_ONLYFILENAME = IDD_PREFERENCE_NEWDOCSETTING_BOX + 25, - IDC_RADIO_FULLFILENAMEPATH = IDD_PREFERENCE_NEWDOCSETTING_BOX + 26, - IDC_RADIO_CUSTOMIZELENTH = IDD_PREFERENCE_NEWDOCSETTING_BOX + 27, - IDC_CUSTOMIZELENGTHVAL_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 28, - IDC_DISPLAY_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 29, - IDC_OPENSAVEDIR_CHECK_USENEWSTYLESAVEDIALOG = IDD_PREFERENCE_NEWDOCSETTING_BOX + 30, - IDC_OPENSAVEDIR_CHECK_DRROPFOLDEROPENFILES = IDD_PREFERENCE_NEWDOCSETTING_BOX + 31, - - IDD_PREFERENCE_DEFAULTDIRECTORY_BOX = 6450, - IDD_PREFERENCE_RECENTFILESHISTORY_BOX = 6460, - - IDD_PREFERENCE_LANG_BOX = 6500, - IDC_LIST_ENABLEDLANG = IDD_PREFERENCE_LANG_BOX + 1, - IDC_LIST_DISABLEDLANG = IDD_PREFERENCE_LANG_BOX + 2, - IDC_BUTTON_REMOVE = IDD_PREFERENCE_LANG_BOX + 3, - IDC_BUTTON_RESTORE = IDD_PREFERENCE_LANG_BOX + 4, - IDC_ENABLEDITEMS_STATIC = IDD_PREFERENCE_LANG_BOX + 5, - IDC_DISABLEDITEMS_STATIC = IDD_PREFERENCE_LANG_BOX + 6, - IDC_CHECK_LANGMENUCOMPACT = IDD_PREFERENCE_LANG_BOX + 7, - IDC_CHECK_LANGMENU_GR_STATIC = IDD_PREFERENCE_LANG_BOX + 8, - IDC_LIST_TABSETTNG = IDD_PREFERENCE_LANG_BOX + 9, - IDC_CHECK_DEFAULTTABVALUE = IDD_PREFERENCE_LANG_BOX + 10, - IDC_GR_TABVALUE_STATIC = IDD_PREFERENCE_LANG_BOX + 11, - IDC_TABSIZEVAL_DISABLE_STATIC = IDD_PREFERENCE_LANG_BOX + 12, - IDD_PREFERENCE_HILITE_BOX = 6550, - - IDD_PREFERENCE_PRINT_BOX = 6600, - IDC_CHECK_PRINTLINENUM = IDD_PREFERENCE_PRINT_BOX + 1, - IDC_COLOUROPT_STATIC = IDD_PREFERENCE_PRINT_BOX + 2, - IDC_RADIO_WYSIWYG = IDD_PREFERENCE_PRINT_BOX + 3, - IDC_RADIO_INVERT = IDD_PREFERENCE_PRINT_BOX + 4, - IDC_RADIO_BW = IDD_PREFERENCE_PRINT_BOX + 5, - IDC_RADIO_NOBG = IDD_PREFERENCE_PRINT_BOX + 6, - IDC_MARGESETTINGS_STATIC = IDD_PREFERENCE_PRINT_BOX + 7, - IDC_EDIT_ML = IDD_PREFERENCE_PRINT_BOX + 8, - IDC_EDIT_MT = IDD_PREFERENCE_PRINT_BOX + 9, - IDC_EDIT_MR = IDD_PREFERENCE_PRINT_BOX + 10, - IDC_EDIT_MB = IDD_PREFERENCE_PRINT_BOX + 11, - IDC_ML_STATIC = IDD_PREFERENCE_PRINT_BOX + 12, - IDC_MT_STATIC = IDD_PREFERENCE_PRINT_BOX + 13, - IDC_MR_STATIC = IDD_PREFERENCE_PRINT_BOX + 14, - IDC_MB_STATIC = IDD_PREFERENCE_PRINT_BOX + 15, - - IDD_PREFERENCE_PRINT2_BOX = 6700, - IDC_EDIT_HLEFT = IDD_PREFERENCE_PRINT2_BOX + 1, - IDC_EDIT_HMIDDLE = IDD_PREFERENCE_PRINT2_BOX + 2, - IDC_EDIT_HRIGHT = IDD_PREFERENCE_PRINT2_BOX + 3, - IDC_COMBO_HFONTNAME = IDD_PREFERENCE_PRINT2_BOX + 4, - IDC_COMBO_HFONTSIZE = IDD_PREFERENCE_PRINT2_BOX + 5, - IDC_CHECK_HBOLD = IDD_PREFERENCE_PRINT2_BOX + 6, - IDC_CHECK_HITALIC = IDD_PREFERENCE_PRINT2_BOX + 7, - IDC_HGB_STATIC = IDD_PREFERENCE_PRINT2_BOX + 8, - IDC_HL_STATIC = IDD_PREFERENCE_PRINT2_BOX + 9, - IDC_HM_STATIC = IDD_PREFERENCE_PRINT2_BOX + 10, - IDC_HR_STATIC = IDD_PREFERENCE_PRINT2_BOX + 11, - IDC_EDIT_FLEFT = IDD_PREFERENCE_PRINT2_BOX + 12, - IDC_EDIT_FMIDDLE = IDD_PREFERENCE_PRINT2_BOX + 13, - IDC_EDIT_FRIGHT = IDD_PREFERENCE_PRINT2_BOX + 14, - IDC_COMBO_FFONTNAME = IDD_PREFERENCE_PRINT2_BOX + 15, - IDC_COMBO_FFONTSIZE = IDD_PREFERENCE_PRINT2_BOX + 16, - IDC_CHECK_FBOLD = IDD_PREFERENCE_PRINT2_BOX + 17, - IDC_CHECK_FITALIC = IDD_PREFERENCE_PRINT2_BOX + 18, - IDC_FGB_STATIC = IDD_PREFERENCE_PRINT2_BOX + 19, - IDC_FL_STATIC = IDD_PREFERENCE_PRINT2_BOX + 20, - IDC_FM_STATIC = IDD_PREFERENCE_PRINT2_BOX + 21, - IDC_FR_STATIC = IDD_PREFERENCE_PRINT2_BOX + 22, - IDC_BUTTON_ADDVAR = IDD_PREFERENCE_PRINT2_BOX + 23, - IDC_COMBO_VARLIST = IDD_PREFERENCE_PRINT2_BOX + 24, - IDC_VAR_STATIC = IDD_PREFERENCE_PRINT2_BOX + 25, - IDC_VIEWPANEL_STATIC = IDD_PREFERENCE_PRINT2_BOX + 26, - IDC_WHICHPART_STATIC = IDD_PREFERENCE_PRINT2_BOX + 27, - IDC_HEADERFPPTER_GR_STATIC = IDD_PREFERENCE_PRINT2_BOX + 28, - - IDD_PREFERENCE_BACKUP_BOX = 6800, - IDC_BACKUPDIR_GRP_STATIC = IDD_PREFERENCE_BACKUP_BOX + 1, - IDC_BACKUPDIR_CHECK = IDD_PREFERENCE_BACKUP_BOX + 2, - IDD_BACKUPDIR_STATIC = IDD_PREFERENCE_BACKUP_BOX + 3, - IDC_BACKUPDIR_USERCUSTOMDIR_GRPSTATIC = IDD_PREFERENCE_BACKUP_BOX + 4, - IDC_BACKUPDIR_EDIT = IDD_PREFERENCE_BACKUP_BOX + 5, - IDD_BACKUPDIR_BROWSE_BUTTON = IDD_PREFERENCE_BACKUP_BOX + 6, - IDD_AUTOC_GRPSTATIC = IDD_PREFERENCE_BACKUP_BOX + 7, - IDD_AUTOC_ENABLECHECK = IDD_PREFERENCE_BACKUP_BOX + 8, - IDD_AUTOC_FUNCRADIO = IDD_PREFERENCE_BACKUP_BOX + 9, - IDD_AUTOC_WORDRADIO = IDD_PREFERENCE_BACKUP_BOX + 10, - IDD_AUTOC_STATIC_FROM = IDD_PREFERENCE_BACKUP_BOX + 11, - IDD_AUTOC_STATIC_N = IDD_PREFERENCE_BACKUP_BOX + 12, - IDD_AUTOC_STATIC_CHAR = IDD_PREFERENCE_BACKUP_BOX + 13, - IDD_AUTOC_STATIC_NOTE = IDD_PREFERENCE_BACKUP_BOX + 14, - IDD_FUNC_CHECK = IDD_PREFERENCE_BACKUP_BOX + 15, - IDD_AUTOC_BOTHRADIO = IDD_PREFERENCE_BACKUP_BOX + 16, - IDC_BACKUPDIR_RESTORESESSION_GRP_STATIC = IDD_PREFERENCE_BACKUP_BOX + 17, - IDC_BACKUPDIR_RESTORESESSION_CHECK = IDD_PREFERENCE_BACKUP_BOX + 18, - IDD_BACKUPDIR_RESTORESESSION_STATIC1 = IDD_PREFERENCE_BACKUP_BOX + 19, - IDC_BACKUPDIR_RESTORESESSION_EDIT = IDD_PREFERENCE_BACKUP_BOX + 20, - IDD_BACKUPDIR_RESTORESESSION_STATIC2 = IDD_PREFERENCE_BACKUP_BOX + 21, - IDD_BACKUPDIR_RESTORESESSION_PATHLABEL_STATIC = IDD_PREFERENCE_BACKUP_BOX + 22, - IDD_BACKUPDIR_RESTORESESSION_PATH_EDIT = IDD_PREFERENCE_BACKUP_BOX + 23, - IDD_AUTOC_IGNORENUMBERS = IDD_PREFERENCE_BACKUP_BOX + 24, - - IDD_PREFERENCE_AUTOCOMPLETION_BOX = 6850, - IDD_AUTOCINSERT_GRPSTATIC = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 1, - IDD_AUTOCPARENTHESES_CHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 2, - IDD_AUTOCBRACKET_CHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 3, - IDD_AUTOCCURLYBRACKET_CHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 4, - IDD_AUTOC_DOUBLEQUOTESCHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 5, - IDD_AUTOC_QUOTESCHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 6, - IDD_AUTOCTAG_CHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 7, - IDC_MACHEDPAIROPEN_STATIC = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 8, - IDC_MACHEDPAIRCLOSE_STATIC = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 9, - IDC_MACHEDPAIR_STATIC1 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 10, - IDC_MACHEDPAIROPEN_EDIT1 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 11, - IDC_MACHEDPAIRCLOSE_EDIT1 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 12, - IDC_MACHEDPAIR_STATIC2 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 13, - IDC_MACHEDPAIROPEN_EDIT2 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 14, - IDC_MACHEDPAIRCLOSE_EDIT2 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 15, - IDC_MACHEDPAIR_STATIC3 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 16, - IDC_MACHEDPAIROPEN_EDIT3 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 17, - IDC_MACHEDPAIRCLOSE_EDIT3 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 18, - - IDD_PREFERENCE_SEARCHINGSETTINGS_BOX = 6900, - IDC_CHECK_STOPFILLINGFINDFIELD = IDD_PREFERENCE_SEARCHINGSETTINGS_BOX + 1, - IDC_CHECK_MONOSPACEDFONT_FINDDLG = IDD_PREFERENCE_SEARCHINGSETTINGS_BOX + 2, - - /* --Autogenerated -- end of section automatically generated from preference_rc.h */ - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +// +// This file should stay in sync with the CPP project file +// "notepad-plus-plus/scintilla/include/Scintilla.iface" +// found at +// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.iface +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NppPluginNET.PluginInfrastructure +{ + public enum Preference + { + /* ++Autogenerated -- start of section automatically generated from preference_rc.h */ + + IDD_PREFERENCE_BOX = 6000, + IDC_BUTTON_CLOSE = IDD_PREFERENCE_BOX + 1, + IDC_LIST_DLGTITLE = IDD_PREFERENCE_BOX + 2, + + IDD_PREFERENCE_BAR_BOX = 6100, + IDC_TOOLBAR_GB_STATIC = IDD_PREFERENCE_BAR_BOX + 1, + IDC_CHECK_HIDE = IDD_PREFERENCE_BAR_BOX + 2, + IDC_RADIO_SMALLICON = IDD_PREFERENCE_BAR_BOX + 3, + IDC_RADIO_BIGICON = IDD_PREFERENCE_BAR_BOX + 4, + IDC_RADIO_STANDARD = IDD_PREFERENCE_BAR_BOX + 5, + + IDC_TABBAR_GB_STATIC = IDD_PREFERENCE_BAR_BOX + 6, + IDC_CHECK_REDUCE = IDD_PREFERENCE_BAR_BOX + 7, + IDC_CHECK_LOCK = IDD_PREFERENCE_BAR_BOX + 8, + IDC_CHECK_DRAWINACTIVE = IDD_PREFERENCE_BAR_BOX + 9, + IDC_CHECK_ORANGE = IDD_PREFERENCE_BAR_BOX + 10, + IDC_CHECK_SHOWSTATUSBAR = IDD_PREFERENCE_BAR_BOX + 11, + IDC_CHECK_ENABLETABCLOSE = IDD_PREFERENCE_BAR_BOX + 12, + IDC_CHECK_DBCLICK2CLOSE = IDD_PREFERENCE_BAR_BOX + 13, + IDC_CHECK_ENABLEDOCSWITCHER = IDD_PREFERENCE_BAR_BOX + 14, + IDC_CHECK_MAINTAININDENT = IDD_PREFERENCE_BAR_BOX + 15, + IDC_CHECK_KEEPINSAMEDIR = IDD_PREFERENCE_BAR_BOX + 16, + IDC_CHECK_STYLEMRU = IDD_PREFERENCE_BAR_BOX + 17, + IDC_CHECK_TAB_HIDE = IDD_PREFERENCE_BAR_BOX + 18, + IDC_CHECK_TAB_MULTILINE = IDD_PREFERENCE_BAR_BOX + 19, + IDC_CHECK_TAB_VERTICAL = IDD_PREFERENCE_BAR_BOX + 20, + IDC_CHECK_TAB_LAST_EXIT = IDD_PREFERENCE_BAR_BOX + 21, + IDC_CHECK_HIDEMENUBAR = IDD_PREFERENCE_BAR_BOX + 22, + IDC_LOCALIZATION_GB_STATIC = IDD_PREFERENCE_BAR_BOX + 23, + IDC_COMBO_LOCALIZATION = IDD_PREFERENCE_BAR_BOX + 24, + IDC_DOCSWITCH_GB_STATIC = IDD_PREFERENCE_BAR_BOX + 25, + IDC_CHECK_DOCSWITCH = IDD_PREFERENCE_BAR_BOX + 26, + IDC_CHECK_DOCSWITCH_NOEXTCOLUMN = IDD_PREFERENCE_BAR_BOX + 27, + + IDD_PREFERENCE_MULTIINSTANCE_BOX = 6150, + IDC_MULTIINST_GB_STATIC = IDD_PREFERENCE_MULTIINSTANCE_BOX + 1, + IDC_SESSIONININST_RADIO = IDD_PREFERENCE_MULTIINSTANCE_BOX + 2, + IDC_MULTIINST_RADIO = IDD_PREFERENCE_MULTIINSTANCE_BOX + 3, + IDC_MONOINST_RADIO = IDD_PREFERENCE_MULTIINSTANCE_BOX + 4, + IDD_STATIC_RESTARTNOTE = IDD_PREFERENCE_MULTIINSTANCE_BOX + 5, + + IDD_PREFERENCE_WORDCHARLIST_BOX = 6160, + IDC_WORDCHARLIST_GB_STATIC = IDD_PREFERENCE_WORDCHARLIST_BOX + 1, + IDC_RADIO_WORDCHAR_DEFAULT = IDD_PREFERENCE_WORDCHARLIST_BOX + 2, + IDC_RADIO_WORDCHAR_CUSTOM = IDD_PREFERENCE_WORDCHARLIST_BOX + 3, + IDC_WORDCHAR_CUSTOM_EDIT = IDD_PREFERENCE_WORDCHARLIST_BOX + 4, + IDD_WORDCHAR_QUESTION_BUTTON = IDD_PREFERENCE_WORDCHARLIST_BOX + 5, + IDD_STATIC_WORDCHAR_WARNING = IDD_PREFERENCE_WORDCHARLIST_BOX + 6, + + IDD_PREFERENCE_MARGEIN_BOX = 6200, + IDC_FMS_GB_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 1, + IDC_RADIO_SIMPLE = IDD_PREFERENCE_MARGEIN_BOX + 2, + IDC_RADIO_ARROW = IDD_PREFERENCE_MARGEIN_BOX + 3, + IDC_RADIO_CIRCLE = IDD_PREFERENCE_MARGEIN_BOX + 4, + IDC_RADIO_BOX = IDD_PREFERENCE_MARGEIN_BOX + 5, + + IDC_CHECK_LINENUMBERMARGE = IDD_PREFERENCE_MARGEIN_BOX + 6, + IDC_CHECK_BOOKMARKMARGE = IDD_PREFERENCE_MARGEIN_BOX + 7, + + IDC_VES_GB_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 11, + + IDC_CHECK_EDGEBGMODE = IDD_PREFERENCE_MARGEIN_BOX + 13, + IDC_CHECK_CURRENTLINEHILITE = IDD_PREFERENCE_MARGEIN_BOX + 14, + IDC_CHECK_SMOOTHFONT = IDD_PREFERENCE_MARGEIN_BOX + 15, + + IDC_CARETSETTING_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 16, + IDC_WIDTH_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 17, + IDC_WIDTH_COMBO = IDD_PREFERENCE_MARGEIN_BOX + 18, + IDC_BLINKRATE_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 19, + IDC_CARETBLINKRATE_SLIDER = IDD_PREFERENCE_MARGEIN_BOX + 20, + IDC_CARETBLINKRATE_F_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 21, + IDC_CARETBLINKRATE_S_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 22, + IDC_CHECK_DOCCHANGESTATEMARGE = IDD_PREFERENCE_MARGEIN_BOX + 23, + IDC_MULTISELECTION_GB_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 24, + IDC_CHECK_MULTISELECTION = IDD_PREFERENCE_MARGEIN_BOX + 25, + + IDC_RADIO_FOLDMARGENONE = IDD_PREFERENCE_MARGEIN_BOX + 26, + + IDC_LW_GB_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 27, + IDC_RADIO_LWDEF = IDD_PREFERENCE_MARGEIN_BOX + 28, + IDC_RADIO_LWALIGN = IDD_PREFERENCE_MARGEIN_BOX + 29, + IDC_RADIO_LWINDENT = IDD_PREFERENCE_MARGEIN_BOX + 30, + + IDC_BORDERWIDTH_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 31, + IDC_BORDERWIDTHVAL_STATIC = IDD_PREFERENCE_MARGEIN_BOX + 32, + IDC_BORDERWIDTH_SLIDER = IDD_PREFERENCE_MARGEIN_BOX + 33, + IDC_CHECK_DISABLEADVANCEDSCROLL = IDD_PREFERENCE_MARGEIN_BOX + 34, + IDC_CHECK_NOEDGE = IDD_PREFERENCE_MARGEIN_BOX + 35, + IDC_CHECK_SCROLLBEYONDLASTLINE = IDD_PREFERENCE_MARGEIN_BOX + 36, + + IDC_STATIC_MULTILNMODE_TIP = IDD_PREFERENCE_MARGEIN_BOX + 37, + IDC_COLUMNPOS_EDIT = IDD_PREFERENCE_MARGEIN_BOX + 38, + IDC_CHECK_RIGHTCLICKKEEPSSELECTION = IDD_PREFERENCE_MARGEIN_BOX + 39, + + IDD_PREFERENCE_DELIMITERSETTINGS_BOX = 6250, + IDC_DELIMITERSETTINGS_GB_STATIC = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 1, + IDD_STATIC_OPENDELIMITER = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 2, + IDC_EDIT_OPENDELIMITER = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 3, + IDC_EDIT_CLOSEDELIMITER = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 4, + IDD_STATIC_CLOSEDELIMITER = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 5, + IDD_SEVERALLINEMODEON_CHECK = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 6, + IDD_STATIC_BLABLA = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 7, + IDD_STATIC_BLABLA2NDLINE = IDD_PREFERENCE_DELIMITERSETTINGS_BOX + 8, + + IDD_PREFERENCE_SETTINGSONCLOUD_BOX = 6260, + IDC_SETTINGSONCLOUD_WARNING_STATIC = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 1, + IDC_SETTINGSONCLOUD_GB_STATIC = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 2, + IDC_NOCLOUD_RADIO = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 3, + + IDC_WITHCLOUD_RADIO = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 7, + IDC_CLOUDPATH_EDIT = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 8, + IDD_CLOUDPATH_BROWSE_BUTTON = IDD_PREFERENCE_SETTINGSONCLOUD_BOX + 9, + + IDD_PREFERENCE_SEARCHENGINE_BOX = 6270, + IDC_SEARCHENGINES_GB_STATIC = IDD_PREFERENCE_SEARCHENGINE_BOX + 1, + IDC_SEARCHENGINE_DUCKDUCKGO_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 2, + IDC_SEARCHENGINE_GOOGLE_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 3, + IDC_SEARCHENGINE_BING_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 4, + IDC_SEARCHENGINE_YAHOO_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 5, + IDC_SEARCHENGINE_CUSTOM_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 6, + IDC_SEARCHENGINE_EDIT = IDD_PREFERENCE_SEARCHENGINE_BOX + 7, + IDD_SEARCHENGINE_NOTE_STATIC = IDD_PREFERENCE_SEARCHENGINE_BOX + 8, + IDC_SEARCHENGINE_STACKOVERFLOW_RADIO = IDD_PREFERENCE_SEARCHENGINE_BOX + 9, + + IDD_PREFERENCE_SETTING_BOX = 6300, + IDC_TABSETTING_GB_STATIC = IDD_PREFERENCE_SETTING_BOX + 1, + IDC_CHECK_REPLACEBYSPACE = IDD_PREFERENCE_SETTING_BOX + 2, + IDC_TABSIZE_STATIC = IDD_PREFERENCE_SETTING_BOX + 3, + IDC_HISTORY_GB_STATIC = IDD_PREFERENCE_SETTING_BOX + 4, + IDC_CHECK_DONTCHECKHISTORY = IDD_PREFERENCE_SETTING_BOX + 5, + IDC_MAXNBFILE_STATIC = IDD_PREFERENCE_SETTING_BOX + 6, + IDC_CHECK_MIN2SYSTRAY = IDD_PREFERENCE_SETTING_BOX + 8, + IDC_CHECK_REMEMBERSESSION = IDD_PREFERENCE_SETTING_BOX + 9, + IDC_TABSIZEVAL_STATIC = IDD_PREFERENCE_SETTING_BOX + 10, + IDC_MAXNBFILEVAL_STATIC = IDD_PREFERENCE_SETTING_BOX + 11, + IDC_FILEAUTODETECTION_STATIC = IDD_PREFERENCE_SETTING_BOX + 12, + IDC_CHECK_UPDATESILENTLY = IDD_PREFERENCE_SETTING_BOX + 13, + IDC_RADIO_BKNONE = IDD_PREFERENCE_SETTING_BOX + 15, + IDC_RADIO_BKSIMPLE = IDD_PREFERENCE_SETTING_BOX + 16, + IDC_RADIO_BKVERBOSE = IDD_PREFERENCE_SETTING_BOX + 17, + IDC_CLICKABLELINK_STATIC = IDD_PREFERENCE_SETTING_BOX + 18, + IDC_CHECK_CLICKABLELINK_ENABLE = IDD_PREFERENCE_SETTING_BOX + 19, + IDC_CHECK_CLICKABLELINK_NOUNDERLINE = IDD_PREFERENCE_SETTING_BOX + 20, + IDC_EDIT_SESSIONFILEEXT = IDD_PREFERENCE_SETTING_BOX + 21, + IDC_SESSIONFILEEXT_STATIC = IDD_PREFERENCE_SETTING_BOX + 22, + IDC_CHECK_AUTOUPDATE = IDD_PREFERENCE_SETTING_BOX + 23, + IDC_DOCUMENTSWITCHER_STATIC = IDD_PREFERENCE_SETTING_BOX + 24, + IDC_CHECK_UPDATEGOTOEOF = IDD_PREFERENCE_SETTING_BOX + 25, + IDC_CHECK_ENABLSMARTHILITE = IDD_PREFERENCE_SETTING_BOX + 26, + IDC_CHECK_ENABLTAGSMATCHHILITE = IDD_PREFERENCE_SETTING_BOX + 27, + IDC_CHECK_ENABLTAGATTRHILITE = IDD_PREFERENCE_SETTING_BOX + 28, + IDC_TAGMATCHEDHILITE_STATIC = IDD_PREFERENCE_SETTING_BOX + 29, + IDC_CHECK_HIGHLITENONEHTMLZONE = IDD_PREFERENCE_SETTING_BOX + 30, + IDC_CHECK_SHORTTITLE = IDD_PREFERENCE_SETTING_BOX + 31, + IDC_CHECK_SMARTHILITECASESENSITIVE = IDD_PREFERENCE_SETTING_BOX + 32, + IDC_SMARTHILITING_STATIC = IDD_PREFERENCE_SETTING_BOX + 33, + IDC_CHECK_DETECTENCODING = IDD_PREFERENCE_SETTING_BOX + 34, + IDC_CHECK_BACKSLASHISESCAPECHARACTERFORSQL = IDD_PREFERENCE_SETTING_BOX + 35, + IDC_EDIT_WORKSPACEFILEEXT = IDD_PREFERENCE_SETTING_BOX + 36, + IDC_WORKSPACEFILEEXT_STATIC = IDD_PREFERENCE_SETTING_BOX + 37, + IDC_CHECK_SMARTHILITEWHOLEWORDONLY = IDD_PREFERENCE_SETTING_BOX + 38, + IDC_CHECK_SMARTHILITEUSEFINDSETTINGS = IDD_PREFERENCE_SETTING_BOX + 39, + IDC_CHECK_SMARTHILITEANOTHERRVIEW = IDD_PREFERENCE_SETTING_BOX + 40, + + IDC_CHECK_REMEMBEREDITVIEWPERFILE = IDD_PREFERENCE_SETTING_BOX + 41, + IDC_REMEMBEREDITVIEWPERFILE_STATIC = IDD_PREFERENCE_SETTING_BOX + 42, + IDC_EDIT_REMEMBEREDITVIEWPERFILE = IDD_PREFERENCE_SETTING_BOX + 43, + + IDC_DOCUMENTPEEK_STATIC = IDD_PREFERENCE_SETTING_BOX + 44, + IDC_CHECK_ENABLEDOCPEEKER = IDD_PREFERENCE_SETTING_BOX + 45, + IDC_CHECK_ENABLEDOCPEEKONMAP = IDD_PREFERENCE_SETTING_BOX + 46, + IDC_COMBO_FILEUPDATECHOICE = IDD_PREFERENCE_SETTING_BOX + 47, + IDC_CHECK_DIRECTWRITE_ENABLE = IDD_PREFERENCE_SETTING_BOX + 49, + + IDD_PREFERENCE_NEWDOCSETTING_BOX = 6400, + IDC_FORMAT_GB_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 1, + IDC_RADIO_F_WIN = IDD_PREFERENCE_NEWDOCSETTING_BOX + 2, + IDC_RADIO_F_UNIX = IDD_PREFERENCE_NEWDOCSETTING_BOX + 3, + IDC_RADIO_F_MAC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 4, + IDC_ENCODING_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 5, + IDC_RADIO_ANSI = IDD_PREFERENCE_NEWDOCSETTING_BOX + 6, + IDC_RADIO_UTF8SANSBOM = IDD_PREFERENCE_NEWDOCSETTING_BOX + 7, + IDC_RADIO_UTF8 = IDD_PREFERENCE_NEWDOCSETTING_BOX + 8, + IDC_RADIO_UCS2BIG = IDD_PREFERENCE_NEWDOCSETTING_BOX + 9, + IDC_RADIO_UCS2SMALL = IDD_PREFERENCE_NEWDOCSETTING_BOX + 10, + IDC_DEFAULTLANG_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 11, + IDC_COMBO_DEFAULTLANG = IDD_PREFERENCE_NEWDOCSETTING_BOX + 12, + IDC_OPENSAVEDIR_GR_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 13, + IDC_OPENSAVEDIR_FOLLOWCURRENT_RADIO = IDD_PREFERENCE_NEWDOCSETTING_BOX + 14, + IDC_OPENSAVEDIR_REMEMBERLAST_RADIO = IDD_PREFERENCE_NEWDOCSETTING_BOX + 15, + IDC_OPENSAVEDIR_ALWAYSON_RADIO = IDD_PREFERENCE_NEWDOCSETTING_BOX + 16, + IDC_OPENSAVEDIR_ALWAYSON_EDIT = IDD_PREFERENCE_NEWDOCSETTING_BOX + 17, + IDD_OPENSAVEDIR_ALWAYSON_BROWSE_BUTTON = IDD_PREFERENCE_NEWDOCSETTING_BOX + 18, + IDC_NEWDOCUMENT_GR_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 19, + IDC_CHECK_OPENANSIASUTF8 = IDD_PREFERENCE_NEWDOCSETTING_BOX + 20, + IDC_RADIO_OTHERCP = IDD_PREFERENCE_NEWDOCSETTING_BOX + 21, + IDC_COMBO_OTHERCP = IDD_PREFERENCE_NEWDOCSETTING_BOX + 22, + IDC_GP_STATIC_RECENTFILES = IDD_PREFERENCE_NEWDOCSETTING_BOX + 23, + IDC_CHECK_INSUBMENU = IDD_PREFERENCE_NEWDOCSETTING_BOX + 24, + IDC_RADIO_ONLYFILENAME = IDD_PREFERENCE_NEWDOCSETTING_BOX + 25, + IDC_RADIO_FULLFILENAMEPATH = IDD_PREFERENCE_NEWDOCSETTING_BOX + 26, + IDC_RADIO_CUSTOMIZELENTH = IDD_PREFERENCE_NEWDOCSETTING_BOX + 27, + IDC_CUSTOMIZELENGTHVAL_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 28, + IDC_DISPLAY_STATIC = IDD_PREFERENCE_NEWDOCSETTING_BOX + 29, + IDC_OPENSAVEDIR_CHECK_USENEWSTYLESAVEDIALOG = IDD_PREFERENCE_NEWDOCSETTING_BOX + 30, + IDC_OPENSAVEDIR_CHECK_DRROPFOLDEROPENFILES = IDD_PREFERENCE_NEWDOCSETTING_BOX + 31, + + IDD_PREFERENCE_DEFAULTDIRECTORY_BOX = 6450, + IDD_PREFERENCE_RECENTFILESHISTORY_BOX = 6460, + + IDD_PREFERENCE_LANG_BOX = 6500, + IDC_LIST_ENABLEDLANG = IDD_PREFERENCE_LANG_BOX + 1, + IDC_LIST_DISABLEDLANG = IDD_PREFERENCE_LANG_BOX + 2, + IDC_BUTTON_REMOVE = IDD_PREFERENCE_LANG_BOX + 3, + IDC_BUTTON_RESTORE = IDD_PREFERENCE_LANG_BOX + 4, + IDC_ENABLEDITEMS_STATIC = IDD_PREFERENCE_LANG_BOX + 5, + IDC_DISABLEDITEMS_STATIC = IDD_PREFERENCE_LANG_BOX + 6, + IDC_CHECK_LANGMENUCOMPACT = IDD_PREFERENCE_LANG_BOX + 7, + IDC_CHECK_LANGMENU_GR_STATIC = IDD_PREFERENCE_LANG_BOX + 8, + IDC_LIST_TABSETTNG = IDD_PREFERENCE_LANG_BOX + 9, + IDC_CHECK_DEFAULTTABVALUE = IDD_PREFERENCE_LANG_BOX + 10, + IDC_GR_TABVALUE_STATIC = IDD_PREFERENCE_LANG_BOX + 11, + IDC_TABSIZEVAL_DISABLE_STATIC = IDD_PREFERENCE_LANG_BOX + 12, + IDD_PREFERENCE_HILITE_BOX = 6550, + + IDD_PREFERENCE_PRINT_BOX = 6600, + IDC_CHECK_PRINTLINENUM = IDD_PREFERENCE_PRINT_BOX + 1, + IDC_COLOUROPT_STATIC = IDD_PREFERENCE_PRINT_BOX + 2, + IDC_RADIO_WYSIWYG = IDD_PREFERENCE_PRINT_BOX + 3, + IDC_RADIO_INVERT = IDD_PREFERENCE_PRINT_BOX + 4, + IDC_RADIO_BW = IDD_PREFERENCE_PRINT_BOX + 5, + IDC_RADIO_NOBG = IDD_PREFERENCE_PRINT_BOX + 6, + IDC_MARGESETTINGS_STATIC = IDD_PREFERENCE_PRINT_BOX + 7, + IDC_EDIT_ML = IDD_PREFERENCE_PRINT_BOX + 8, + IDC_EDIT_MT = IDD_PREFERENCE_PRINT_BOX + 9, + IDC_EDIT_MR = IDD_PREFERENCE_PRINT_BOX + 10, + IDC_EDIT_MB = IDD_PREFERENCE_PRINT_BOX + 11, + IDC_ML_STATIC = IDD_PREFERENCE_PRINT_BOX + 12, + IDC_MT_STATIC = IDD_PREFERENCE_PRINT_BOX + 13, + IDC_MR_STATIC = IDD_PREFERENCE_PRINT_BOX + 14, + IDC_MB_STATIC = IDD_PREFERENCE_PRINT_BOX + 15, + + IDD_PREFERENCE_PRINT2_BOX = 6700, + IDC_EDIT_HLEFT = IDD_PREFERENCE_PRINT2_BOX + 1, + IDC_EDIT_HMIDDLE = IDD_PREFERENCE_PRINT2_BOX + 2, + IDC_EDIT_HRIGHT = IDD_PREFERENCE_PRINT2_BOX + 3, + IDC_COMBO_HFONTNAME = IDD_PREFERENCE_PRINT2_BOX + 4, + IDC_COMBO_HFONTSIZE = IDD_PREFERENCE_PRINT2_BOX + 5, + IDC_CHECK_HBOLD = IDD_PREFERENCE_PRINT2_BOX + 6, + IDC_CHECK_HITALIC = IDD_PREFERENCE_PRINT2_BOX + 7, + IDC_HGB_STATIC = IDD_PREFERENCE_PRINT2_BOX + 8, + IDC_HL_STATIC = IDD_PREFERENCE_PRINT2_BOX + 9, + IDC_HM_STATIC = IDD_PREFERENCE_PRINT2_BOX + 10, + IDC_HR_STATIC = IDD_PREFERENCE_PRINT2_BOX + 11, + IDC_EDIT_FLEFT = IDD_PREFERENCE_PRINT2_BOX + 12, + IDC_EDIT_FMIDDLE = IDD_PREFERENCE_PRINT2_BOX + 13, + IDC_EDIT_FRIGHT = IDD_PREFERENCE_PRINT2_BOX + 14, + IDC_COMBO_FFONTNAME = IDD_PREFERENCE_PRINT2_BOX + 15, + IDC_COMBO_FFONTSIZE = IDD_PREFERENCE_PRINT2_BOX + 16, + IDC_CHECK_FBOLD = IDD_PREFERENCE_PRINT2_BOX + 17, + IDC_CHECK_FITALIC = IDD_PREFERENCE_PRINT2_BOX + 18, + IDC_FGB_STATIC = IDD_PREFERENCE_PRINT2_BOX + 19, + IDC_FL_STATIC = IDD_PREFERENCE_PRINT2_BOX + 20, + IDC_FM_STATIC = IDD_PREFERENCE_PRINT2_BOX + 21, + IDC_FR_STATIC = IDD_PREFERENCE_PRINT2_BOX + 22, + IDC_BUTTON_ADDVAR = IDD_PREFERENCE_PRINT2_BOX + 23, + IDC_COMBO_VARLIST = IDD_PREFERENCE_PRINT2_BOX + 24, + IDC_VAR_STATIC = IDD_PREFERENCE_PRINT2_BOX + 25, + IDC_VIEWPANEL_STATIC = IDD_PREFERENCE_PRINT2_BOX + 26, + IDC_WHICHPART_STATIC = IDD_PREFERENCE_PRINT2_BOX + 27, + IDC_HEADERFPPTER_GR_STATIC = IDD_PREFERENCE_PRINT2_BOX + 28, + + IDD_PREFERENCE_BACKUP_BOX = 6800, + IDC_BACKUPDIR_GRP_STATIC = IDD_PREFERENCE_BACKUP_BOX + 1, + IDC_BACKUPDIR_CHECK = IDD_PREFERENCE_BACKUP_BOX + 2, + IDD_BACKUPDIR_STATIC = IDD_PREFERENCE_BACKUP_BOX + 3, + IDC_BACKUPDIR_USERCUSTOMDIR_GRPSTATIC = IDD_PREFERENCE_BACKUP_BOX + 4, + IDC_BACKUPDIR_EDIT = IDD_PREFERENCE_BACKUP_BOX + 5, + IDD_BACKUPDIR_BROWSE_BUTTON = IDD_PREFERENCE_BACKUP_BOX + 6, + IDD_AUTOC_GRPSTATIC = IDD_PREFERENCE_BACKUP_BOX + 7, + IDD_AUTOC_ENABLECHECK = IDD_PREFERENCE_BACKUP_BOX + 8, + IDD_AUTOC_FUNCRADIO = IDD_PREFERENCE_BACKUP_BOX + 9, + IDD_AUTOC_WORDRADIO = IDD_PREFERENCE_BACKUP_BOX + 10, + IDD_AUTOC_STATIC_FROM = IDD_PREFERENCE_BACKUP_BOX + 11, + IDD_AUTOC_STATIC_N = IDD_PREFERENCE_BACKUP_BOX + 12, + IDD_AUTOC_STATIC_CHAR = IDD_PREFERENCE_BACKUP_BOX + 13, + IDD_AUTOC_STATIC_NOTE = IDD_PREFERENCE_BACKUP_BOX + 14, + IDD_FUNC_CHECK = IDD_PREFERENCE_BACKUP_BOX + 15, + IDD_AUTOC_BOTHRADIO = IDD_PREFERENCE_BACKUP_BOX + 16, + IDC_BACKUPDIR_RESTORESESSION_GRP_STATIC = IDD_PREFERENCE_BACKUP_BOX + 17, + IDC_BACKUPDIR_RESTORESESSION_CHECK = IDD_PREFERENCE_BACKUP_BOX + 18, + IDD_BACKUPDIR_RESTORESESSION_STATIC1 = IDD_PREFERENCE_BACKUP_BOX + 19, + IDC_BACKUPDIR_RESTORESESSION_EDIT = IDD_PREFERENCE_BACKUP_BOX + 20, + IDD_BACKUPDIR_RESTORESESSION_STATIC2 = IDD_PREFERENCE_BACKUP_BOX + 21, + IDD_BACKUPDIR_RESTORESESSION_PATHLABEL_STATIC = IDD_PREFERENCE_BACKUP_BOX + 22, + IDD_BACKUPDIR_RESTORESESSION_PATH_EDIT = IDD_PREFERENCE_BACKUP_BOX + 23, + IDD_AUTOC_IGNORENUMBERS = IDD_PREFERENCE_BACKUP_BOX + 24, + + IDD_PREFERENCE_AUTOCOMPLETION_BOX = 6850, + IDD_AUTOCINSERT_GRPSTATIC = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 1, + IDD_AUTOCPARENTHESES_CHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 2, + IDD_AUTOCBRACKET_CHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 3, + IDD_AUTOCCURLYBRACKET_CHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 4, + IDD_AUTOC_DOUBLEQUOTESCHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 5, + IDD_AUTOC_QUOTESCHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 6, + IDD_AUTOCTAG_CHECK = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 7, + IDC_MACHEDPAIROPEN_STATIC = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 8, + IDC_MACHEDPAIRCLOSE_STATIC = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 9, + IDC_MACHEDPAIR_STATIC1 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 10, + IDC_MACHEDPAIROPEN_EDIT1 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 11, + IDC_MACHEDPAIRCLOSE_EDIT1 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 12, + IDC_MACHEDPAIR_STATIC2 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 13, + IDC_MACHEDPAIROPEN_EDIT2 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 14, + IDC_MACHEDPAIRCLOSE_EDIT2 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 15, + IDC_MACHEDPAIR_STATIC3 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 16, + IDC_MACHEDPAIROPEN_EDIT3 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 17, + IDC_MACHEDPAIRCLOSE_EDIT3 = IDD_PREFERENCE_AUTOCOMPLETION_BOX + 18, + + IDD_PREFERENCE_SEARCHINGSETTINGS_BOX = 6900, + IDC_CHECK_STOPFILLINGFINDFIELD = IDD_PREFERENCE_SEARCHINGSETTINGS_BOX + 1, + IDC_CHECK_MONOSPACEDFONT_FINDDLG = IDD_PREFERENCE_SEARCHINGSETTINGS_BOX + 2, + + /* --Autogenerated -- end of section automatically generated from preference_rc.h */ + } +} diff --git a/WakaTime/PluginInfrastructure/Resource_h.cs b/WakaTime/PluginInfrastructure/Resource_h.cs index 45933bd..7e0814f 100644 --- a/WakaTime/PluginInfrastructure/Resource_h.cs +++ b/WakaTime/PluginInfrastructure/Resource_h.cs @@ -1,376 +1,376 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -// -// This file should stay in sync with the CPP project file -// "notepad-plus-plus/scintilla/include/Scintilla.iface" -// found at -// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.iface -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Kbg.NppPluginNET.PluginInfrastructure; - -namespace NppPluginNET.PluginInfrastructure -{ - public enum Resource - { - /* ++Autogenerated -- start of section automatically generated from resource.h */ - - IDC_STATIC = -1, - - IDI_M30ICON = 100, - IDI_CHAMELEON = 101, - - IDR_RT_MANIFEST = 103, - - IDI_NEW_OFF_ICON = 201, - IDI_OPEN_OFF_ICON = 202, - IDI_CLOSE_OFF_ICON = 203, - IDI_CLOSEALL_OFF_ICON = 204, - IDI_SAVE_OFF_ICON = 205, - IDI_SAVEALL_OFF_ICON = 206, - IDI_CUT_OFF_ICON = 207, - IDI_COPY_OFF_ICON = 208, - IDI_PASTE_OFF_ICON = 209, - IDI_UNDO_OFF_ICON = 210, - IDI_REDO_OFF_ICON = 211, - IDI_FIND_OFF_ICON = 212, - IDI_REPLACE_OFF_ICON = 213, - IDI_ZOOMIN_OFF_ICON = 214, - IDI_ZOOMOUT_OFF_ICON = 215, - IDI_VIEW_UD_DLG_OFF_ICON = 216, - IDI_PRINT_OFF_ICON = 217, - IDI_VIEW_ALL_CHAR_ON_ICON = 218, - IDI_VIEW_INDENT_ON_ICON = 219, - IDI_VIEW_WRAP_ON_ICON = 220, - - IDI_STARTRECORD_OFF_ICON = 221, - IDI_STARTRECORD_ON_ICON = 222, - IDI_STARTRECORD_DISABLE_ICON = 223, - IDI_STOPRECORD_OFF_ICON = 224, - IDI_STOPRECORD_ON_ICON = 225, - IDI_STOPRECORD_DISABLE_ICON = 226, - IDI_PLAYRECORD_OFF_ICON = 227, - IDI_PLAYRECORD_ON_ICON = 228, - IDI_PLAYRECORD_DISABLE_ICON = 229, - IDI_SAVERECORD_OFF_ICON = 230, - IDI_SAVERECORD_ON_ICON = 231, - IDI_SAVERECORD_DISABLE_ICON = 232, - - IDI_MMPLAY_DIS_ICON = 233, - IDI_MMPLAY_OFF_ICON = 234, - IDI_MMPLAY_ON_ICON = 235, - - IDI_NEW_ON_ICON = 301, - IDI_OPEN_ON_ICON = 302, - IDI_CLOSE_ON_ICON = 303, - IDI_CLOSEALL_ON_ICON = 304, - IDI_SAVE_ON_ICON = 305, - IDI_SAVEALL_ON_ICON = 306, - IDI_CUT_ON_ICON = 307, - IDI_COPY_ON_ICON = 308, - IDI_PASTE_ON_ICON = 309, - IDI_UNDO_ON_ICON = 310, - IDI_REDO_ON_ICON = 311, - IDI_FIND_ON_ICON = 312, - IDI_REPLACE_ON_ICON = 313, - IDI_ZOOMIN_ON_ICON = 314, - IDI_ZOOMOUT_ON_ICON = 315, - IDI_VIEW_UD_DLG_ON_ICON = 316, - IDI_PRINT_ON_ICON = 317, - IDI_VIEW_ALL_CHAR_OFF_ICON = 318, - IDI_VIEW_INDENT_OFF_ICON = 319, - IDI_VIEW_WRAP_OFF_ICON = 320, - - IDI_SAVE_DISABLE_ICON = 403, - IDI_SAVEALL_DISABLE_ICON = 404, - - IDI_CUT_DISABLE_ICON = 407, - IDI_COPY_DISABLE_ICON = 408, - IDI_PASTE_DISABLE_ICON = 409, - IDI_UNDO_DISABLE_ICON = 410, - IDI_REDO_DISABLE_ICON = 411, - IDI_DELETE_ICON = 412, - - IDI_SYNCV_OFF_ICON = 413, - IDI_SYNCV_ON_ICON = 414, - IDI_SYNCV_DISABLE_ICON = 415, - - IDI_SYNCH_OFF_ICON = 416, - IDI_SYNCH_ON_ICON = 417, - IDI_SYNCH_DISABLE_ICON = 418, - - IDI_SAVED_ICON = 501, - IDI_UNSAVED_ICON = 502, - IDI_READONLY_ICON = 503, - IDI_FIND_RESULT_ICON = 504, - IDI_MONITORING_ICON = 505, - - IDI_PROJECT_WORKSPACE = 601, - IDI_PROJECT_WORKSPACEDIRTY = 602, - IDI_PROJECT_PROJECT = 603, - IDI_PROJECT_FOLDEROPEN = 604, - IDI_PROJECT_FOLDERCLOSE = 605, - IDI_PROJECT_FILE = 606, - IDI_PROJECT_FILEINVALID = 607, - IDI_FB_ROOTOPEN = 608, - IDI_FB_ROOTCLOSE = 609, - IDI_FB_SELECTCURRENTFILE = 610, - IDI_FB_FOLDALL = 611, - IDI_FB_EXPANDALL = 612, - - IDI_FUNCLIST_ROOT = 620, - IDI_FUNCLIST_NODE = 621, - IDI_FUNCLIST_LEAF = 622, - - IDI_FUNCLIST_SORTBUTTON = 631, - IDI_FUNCLIST_RELOADBUTTON = 632, - - IDI_VIEW_DOC_MAP_ON_ICON = 633, - IDI_VIEW_DOC_MAP_OFF_ICON = 634, - IDI_VIEW_FILEBROWSER_ON_ICON = 635, - IDI_VIEW_FILEBROWSER_OFF_ICON = 636, - IDI_VIEW_FUNCLIST_ON_ICON = 637, - IDI_VIEW_FUNCLIST_OFF_ICON = 638, - IDI_VIEW_MONITORING_ON_ICON = 639, - IDI_VIEW_MONITORING_OFF_ICON = 640, - - IDC_MY_CUR = 1402, - IDC_UP_ARROW = 1403, - IDC_DRAG_TAB = 1404, - IDC_DRAG_INTERDIT_TAB = 1405, - IDC_DRAG_PLUS_TAB = 1406, - IDC_DRAG_OUT_TAB = 1407, - - IDC_MACRO_RECORDING = 1408, - - IDR_SAVEALL = 1500, - IDR_CLOSEFILE = 1501, - IDR_CLOSEALL = 1502, - IDR_FIND = 1503, - IDR_REPLACE = 1504, - IDR_ZOOMIN = 1505, - IDR_ZOOMOUT = 1506, - IDR_WRAP = 1507, - IDR_INVISIBLECHAR = 1508, - IDR_INDENTGUIDE = 1509, - IDR_SHOWPANNEL = 1510, - IDR_STARTRECORD = 1511, - IDR_STOPRECORD = 1512, - IDR_PLAYRECORD = 1513, - IDR_SAVERECORD = 1514, - IDR_SYNCV = 1515, - IDR_SYNCH = 1516, - IDR_FILENEW = 1517, - IDR_FILEOPEN = 1518, - IDR_FILESAVE = 1519, - IDR_PRINT = 1520, - IDR_CUT = 1521, - IDR_COPY = 1522, - IDR_PASTE = 1523, - IDR_UNDO = 1524, - IDR_REDO = 1525, - IDR_M_PLAYRECORD = 1526, - IDR_DOCMAP = 1527, - IDR_FUNC_LIST = 1528, - IDR_FILEBROWSER = 1529, - IDR_CLOSETAB = 1530, - IDR_CLOSETAB_INACT = 1531, - IDR_CLOSETAB_HOVER = 1532, - IDR_CLOSETAB_PUSH = 1533, - IDR_FUNC_LIST_ICO = 1534, - IDR_DOCMAP_ICO = 1535, - IDR_PROJECTPANEL_ICO = 1536, - IDR_CLIPBOARDPANEL_ICO = 1537, - IDR_ASCIIPANEL_ICO = 1538, - IDR_DOCSWITCHER_ICO = 1539, - IDR_FILEBROWSER_ICO = 1540, - IDR_FILEMONITORING = 1541, - - ID_MACRO = 20000, - ID_MACRO_LIMIT = 20200, - - ID_USER_CMD = 21000, - ID_USER_CMD_LIMIT = 21200, - - ID_PLUGINS_CMD = 22000, - ID_PLUGINS_CMD_LIMIT = 22500, - - ID_PLUGINS_CMD_DYNAMIC = 23000, - ID_PLUGINS_CMD_DYNAMIC_LIMIT = 24999, - - MARKER_PLUGINS = 3, - MARKER_PLUGINS_LIMIT = 19, - - ID_PLUGINS_REMOVING = 22501, - ID_PLUGINS_REMOVING_END = 22600, - - IDCMD = 50000, - - IDC_PREV_DOC = IDCMD+3, - IDC_NEXT_DOC = IDCMD+4, - IDC_EDIT_TOGGLEMACRORECORDING = IDCMD+5, - - IDCMD_LIMIT = IDCMD+20, - - IDSCINTILLA = 60000, - IDSCINTILLA_KEY_HOME = IDSCINTILLA+0, - IDSCINTILLA_KEY_HOME_WRAP = IDSCINTILLA+1, - IDSCINTILLA_KEY_END = IDSCINTILLA+2, - IDSCINTILLA_KEY_END_WRAP = IDSCINTILLA+3, - IDSCINTILLA_KEY_LINE_DUP = IDSCINTILLA+4, - IDSCINTILLA_KEY_LINE_CUT = IDSCINTILLA+5, - IDSCINTILLA_KEY_LINE_DEL = IDSCINTILLA+6, - IDSCINTILLA_KEY_LINE_TRANS = IDSCINTILLA+7, - IDSCINTILLA_KEY_LINE_COPY = IDSCINTILLA+8, - IDSCINTILLA_KEY_CUT = IDSCINTILLA+9, - IDSCINTILLA_KEY_COPY = IDSCINTILLA+10, - IDSCINTILLA_KEY_PASTE = IDSCINTILLA+11, - IDSCINTILLA_KEY_DEL = IDSCINTILLA+12, - IDSCINTILLA_KEY_SELECTALL = IDSCINTILLA+13, - IDSCINTILLA_KEY_OUTDENT = IDSCINTILLA+14, - IDSCINTILLA_KEY_UNDO = IDSCINTILLA+15, - IDSCINTILLA_KEY_REDO = IDSCINTILLA+16, - IDSCINTILLA_LIMIT = IDSCINTILLA+30, - - IDD_FILEVIEW_DIALOG = 1000, - - IDC_MINIMIZED_TRAY = 67001, - - IDD_CREATE_DIRECTORY = 1100, - IDC_STATIC_CURRENT_FOLDER = 1101, - IDC_EDIT_NEW_FOLDER = 1102, - - IDD_INSERT_INPUT_TEXT = 1200, - IDC_EDIT_INPUT_VALUE = 1201, - IDC_STATIC_INPUT_TITLE = 1202, - IDC_ICON_INPUT_ICON = 1203, - - IDR_M30_MENU = 1500, - - IDR_SYSTRAYPOPUP_MENU = 1501, - - IDD_ABOUTBOX = 1700, - IDC_LICENCE_EDIT = 1701, - IDC_HOME_ADDR = 1702, - IDC_EMAIL_ADDR = 1703, - IDC_ONLINEHELP_ADDR = 1704, - IDC_AUTHOR_NAME = 1705, - IDC_BUILD_DATETIME = 1706, - IDC_VERSION_BIT = 1707, - - IDD_DEBUGINFOBOX = 1750, - IDC_DEBUGINFO_EDIT = 1751, - IDC_DEBUGINFO_COPYLINK = 1752, - - IDD_DOSAVEORNOTBOX = 1760, - IDC_DOSAVEORNOTTEX = 1761, - - IDD_GOLINE = 2000, - ID_GOLINE_EDIT = IDD_GOLINE + 1, - ID_CURRLINE = IDD_GOLINE + 2, - ID_LASTLINE = IDD_GOLINE + 3, - ID_URHERE_STATIC = IDD_GOLINE + 4, - ID_UGO_STATIC = IDD_GOLINE + 5, - ID_NOMORETHAN_STATIC = IDD_GOLINE + 6, - IDC_RADIO_GOTOLINE = IDD_GOLINE + 7, - IDC_RADIO_GOTOOFFSET = IDD_GOLINE + 8, - - IDD_VALUE_DLG = 2400, - IDC_VALUE_STATIC = 2401, - IDC_VALUE_EDIT = 2402, - - IDD_BUTTON_DLG = 2410, - IDC_RESTORE_BUTTON = 2411, - - IDD_SETTING_DLG = 2500, - - NOTEPADPLUS_USER_INTERNAL = Constants.WM_USER + 0000, - NPPM_INTERNAL_USERCMDLIST_MODIFIED = NOTEPADPLUS_USER_INTERNAL + 1, - NPPM_INTERNAL_CMDLIST_MODIFIED = NOTEPADPLUS_USER_INTERNAL + 2, - NPPM_INTERNAL_MACROLIST_MODIFIED = NOTEPADPLUS_USER_INTERNAL + 3, - NPPM_INTERNAL_PLUGINCMDLIST_MODIFIED = NOTEPADPLUS_USER_INTERNAL + 4, - NPPM_INTERNAL_CLEARSCINTILLAKEY = NOTEPADPLUS_USER_INTERNAL + 5, - NPPM_INTERNAL_BINDSCINTILLAKEY = NOTEPADPLUS_USER_INTERNAL + 6, - NPPM_INTERNAL_SCINTILLAKEYMODIFIED = NOTEPADPLUS_USER_INTERNAL + 7, - NPPM_INTERNAL_SCINTILLAFINFERCOLLAPSE = NOTEPADPLUS_USER_INTERNAL + 8, - NPPM_INTERNAL_SCINTILLAFINFERUNCOLLAPSE = NOTEPADPLUS_USER_INTERNAL + 9, - NPPM_INTERNAL_DISABLEAUTOUPDATE = NOTEPADPLUS_USER_INTERNAL + 10, - NPPM_INTERNAL_SETTING_HISTORY_SIZE = NOTEPADPLUS_USER_INTERNAL + 11, - NPPM_INTERNAL_ISTABBARREDUCED = NOTEPADPLUS_USER_INTERNAL + 12, - NPPM_INTERNAL_ISFOCUSEDTAB = NOTEPADPLUS_USER_INTERNAL + 13, - NPPM_INTERNAL_GETMENU = NOTEPADPLUS_USER_INTERNAL + 14, - NPPM_INTERNAL_CLEARINDICATOR = NOTEPADPLUS_USER_INTERNAL + 15, - NPPM_INTERNAL_SCINTILLAFINFERCOPY = NOTEPADPLUS_USER_INTERNAL + 16, - NPPM_INTERNAL_SCINTILLAFINFERSELECTALL = NOTEPADPLUS_USER_INTERNAL + 17, - NPPM_INTERNAL_SETCARETWIDTH = NOTEPADPLUS_USER_INTERNAL + 18, - NPPM_INTERNAL_SETCARETBLINKRATE = NOTEPADPLUS_USER_INTERNAL + 19, - NPPM_INTERNAL_CLEARINDICATORTAGMATCH = NOTEPADPLUS_USER_INTERNAL + 20, - NPPM_INTERNAL_CLEARINDICATORTAGATTR = NOTEPADPLUS_USER_INTERNAL + 21, - NPPM_INTERNAL_SWITCHVIEWFROMHWND = NOTEPADPLUS_USER_INTERNAL + 22, - NPPM_INTERNAL_UPDATETITLEBAR = NOTEPADPLUS_USER_INTERNAL + 23, - NPPM_INTERNAL_CANCEL_FIND_IN_FILES = NOTEPADPLUS_USER_INTERNAL + 24, - NPPM_INTERNAL_RELOADNATIVELANG = NOTEPADPLUS_USER_INTERNAL + 25, - NPPM_INTERNAL_PLUGINSHORTCUTMOTIFIED = NOTEPADPLUS_USER_INTERNAL + 26, - NPPM_INTERNAL_SCINTILLAFINFERCLEARALL = NOTEPADPLUS_USER_INTERNAL + 27, - - NPPM_INTERNAL_SETTING_TAB_REPLCESPACE = NOTEPADPLUS_USER_INTERNAL + 29, - NPPM_INTERNAL_SETTING_TAB_SIZE = NOTEPADPLUS_USER_INTERNAL + 30, - NPPM_INTERNAL_RELOADSTYLERS = NOTEPADPLUS_USER_INTERNAL + 31, - NPPM_INTERNAL_DOCORDERCHANGED = NOTEPADPLUS_USER_INTERNAL + 32, - NPPM_INTERNAL_SETMULTISELCTION = NOTEPADPLUS_USER_INTERNAL + 33, - NPPM_INTERNAL_SCINTILLAFINFEROPENALL = NOTEPADPLUS_USER_INTERNAL + 34, - NPPM_INTERNAL_RECENTFILELIST_UPDATE = NOTEPADPLUS_USER_INTERNAL + 35, - NPPM_INTERNAL_RECENTFILELIST_SWITCH = NOTEPADPLUS_USER_INTERNAL + 36, - NPPM_INTERNAL_GETSCINTEDTVIEW = NOTEPADPLUS_USER_INTERNAL + 37, - NPPM_INTERNAL_ENABLESNAPSHOT = NOTEPADPLUS_USER_INTERNAL + 38, - NPPM_INTERNAL_SAVECURRENTSESSION = NOTEPADPLUS_USER_INTERNAL + 39, - NPPM_INTERNAL_FINDINFINDERDLG = NOTEPADPLUS_USER_INTERNAL + 40, - NPPM_INTERNAL_REMOVEFINDER = NOTEPADPLUS_USER_INTERNAL + 41, - NPPM_INTERNAL_RELOADSCROLLTOEND = NOTEPADPLUS_USER_INTERNAL + 42, - NPPM_INTERNAL_FINDKEYCONFLICTS = NOTEPADPLUS_USER_INTERNAL + 43, - NPPM_INTERNAL_SCROLLBEYONDLASTLINE = NOTEPADPLUS_USER_INTERNAL + 44, - NPPM_INTERNAL_SETWORDCHARS = NOTEPADPLUS_USER_INTERNAL + 45, - NPPM_INTERNAL_EXPORTFUNCLISTANDQUIT = NOTEPADPLUS_USER_INTERNAL + 46, - NPPM_INTERNAL_PRNTANDQUIT = NOTEPADPLUS_USER_INTERNAL + 47, - NPPM_INTERNAL_SAVEBACKUP = NOTEPADPLUS_USER_INTERNAL + 48, - NPPM_INTERNAL_STOPMONITORING = NOTEPADPLUS_USER_INTERNAL + 49, - NPPM_INTERNAL_EDGEBACKGROUND = NOTEPADPLUS_USER_INTERNAL + 50, - NPPM_INTERNAL_EDGEMULTISETSIZE = NOTEPADPLUS_USER_INTERNAL + 51, - NPPM_INTERNAL_UPDATECLICKABLELINKS = NOTEPADPLUS_USER_INTERNAL + 52, - - NPPM_INTERNAL_CHECKDOCSTATUS = Constants.NPPMSG + 53, - - NPPM_INTERNAL_ENABLECHECKDOCOPT = Constants.NPPMSG + 54, - - CHECKDOCOPT_NONE = 0, - CHECKDOCOPT_UPDATESILENTLY = 1, - CHECKDOCOPT_UPDATEGO2END = 2, - - NPPM_INTERNAL_SETFILENAME = Constants.NPPMSG + 63, - - SCINTILLA_USER = Constants.WM_USER + 2000, - - MACRO_USER = Constants.WM_USER + 4000, - WM_GETCURRENTMACROSTATUS = MACRO_USER + 01, - WM_MACRODLGRUNMACRO = MACRO_USER + 02, - - SPLITTER_USER = Constants.WM_USER + 4000, - WORDSTYLE_USER = Constants.WM_USER + 5000, - COLOURPOPUP_USER = Constants.WM_USER + 6000, - BABYGRID_USER = Constants.WM_USER + 7000, - - MENUINDEX_FILE = 0, - MENUINDEX_EDIT = 1, - MENUINDEX_SEARCH = 2, - MENUINDEX_VIEW = 3, - MENUINDEX_FORMAT = 4, - MENUINDEX_LANGUAGE = 5, - MENUINDEX_SETTINGS = 6, - MENUINDEX_TOOLS = 7, - MENUINDEX_MACRO = 8, - MENUINDEX_RUN = 9, - MENUINDEX_PLUGINS = 10, - /* --Autogenerated -- end of section automatically generated from resource.h */ - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +// +// This file should stay in sync with the CPP project file +// "notepad-plus-plus/scintilla/include/Scintilla.iface" +// found at +// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.iface +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Kbg.NppPluginNET.PluginInfrastructure; + +namespace NppPluginNET.PluginInfrastructure +{ + public enum Resource + { + /* ++Autogenerated -- start of section automatically generated from resource.h */ + + IDC_STATIC = -1, + + IDI_M30ICON = 100, + IDI_CHAMELEON = 101, + + IDR_RT_MANIFEST = 103, + + IDI_NEW_OFF_ICON = 201, + IDI_OPEN_OFF_ICON = 202, + IDI_CLOSE_OFF_ICON = 203, + IDI_CLOSEALL_OFF_ICON = 204, + IDI_SAVE_OFF_ICON = 205, + IDI_SAVEALL_OFF_ICON = 206, + IDI_CUT_OFF_ICON = 207, + IDI_COPY_OFF_ICON = 208, + IDI_PASTE_OFF_ICON = 209, + IDI_UNDO_OFF_ICON = 210, + IDI_REDO_OFF_ICON = 211, + IDI_FIND_OFF_ICON = 212, + IDI_REPLACE_OFF_ICON = 213, + IDI_ZOOMIN_OFF_ICON = 214, + IDI_ZOOMOUT_OFF_ICON = 215, + IDI_VIEW_UD_DLG_OFF_ICON = 216, + IDI_PRINT_OFF_ICON = 217, + IDI_VIEW_ALL_CHAR_ON_ICON = 218, + IDI_VIEW_INDENT_ON_ICON = 219, + IDI_VIEW_WRAP_ON_ICON = 220, + + IDI_STARTRECORD_OFF_ICON = 221, + IDI_STARTRECORD_ON_ICON = 222, + IDI_STARTRECORD_DISABLE_ICON = 223, + IDI_STOPRECORD_OFF_ICON = 224, + IDI_STOPRECORD_ON_ICON = 225, + IDI_STOPRECORD_DISABLE_ICON = 226, + IDI_PLAYRECORD_OFF_ICON = 227, + IDI_PLAYRECORD_ON_ICON = 228, + IDI_PLAYRECORD_DISABLE_ICON = 229, + IDI_SAVERECORD_OFF_ICON = 230, + IDI_SAVERECORD_ON_ICON = 231, + IDI_SAVERECORD_DISABLE_ICON = 232, + + IDI_MMPLAY_DIS_ICON = 233, + IDI_MMPLAY_OFF_ICON = 234, + IDI_MMPLAY_ON_ICON = 235, + + IDI_NEW_ON_ICON = 301, + IDI_OPEN_ON_ICON = 302, + IDI_CLOSE_ON_ICON = 303, + IDI_CLOSEALL_ON_ICON = 304, + IDI_SAVE_ON_ICON = 305, + IDI_SAVEALL_ON_ICON = 306, + IDI_CUT_ON_ICON = 307, + IDI_COPY_ON_ICON = 308, + IDI_PASTE_ON_ICON = 309, + IDI_UNDO_ON_ICON = 310, + IDI_REDO_ON_ICON = 311, + IDI_FIND_ON_ICON = 312, + IDI_REPLACE_ON_ICON = 313, + IDI_ZOOMIN_ON_ICON = 314, + IDI_ZOOMOUT_ON_ICON = 315, + IDI_VIEW_UD_DLG_ON_ICON = 316, + IDI_PRINT_ON_ICON = 317, + IDI_VIEW_ALL_CHAR_OFF_ICON = 318, + IDI_VIEW_INDENT_OFF_ICON = 319, + IDI_VIEW_WRAP_OFF_ICON = 320, + + IDI_SAVE_DISABLE_ICON = 403, + IDI_SAVEALL_DISABLE_ICON = 404, + + IDI_CUT_DISABLE_ICON = 407, + IDI_COPY_DISABLE_ICON = 408, + IDI_PASTE_DISABLE_ICON = 409, + IDI_UNDO_DISABLE_ICON = 410, + IDI_REDO_DISABLE_ICON = 411, + IDI_DELETE_ICON = 412, + + IDI_SYNCV_OFF_ICON = 413, + IDI_SYNCV_ON_ICON = 414, + IDI_SYNCV_DISABLE_ICON = 415, + + IDI_SYNCH_OFF_ICON = 416, + IDI_SYNCH_ON_ICON = 417, + IDI_SYNCH_DISABLE_ICON = 418, + + IDI_SAVED_ICON = 501, + IDI_UNSAVED_ICON = 502, + IDI_READONLY_ICON = 503, + IDI_FIND_RESULT_ICON = 504, + IDI_MONITORING_ICON = 505, + + IDI_PROJECT_WORKSPACE = 601, + IDI_PROJECT_WORKSPACEDIRTY = 602, + IDI_PROJECT_PROJECT = 603, + IDI_PROJECT_FOLDEROPEN = 604, + IDI_PROJECT_FOLDERCLOSE = 605, + IDI_PROJECT_FILE = 606, + IDI_PROJECT_FILEINVALID = 607, + IDI_FB_ROOTOPEN = 608, + IDI_FB_ROOTCLOSE = 609, + IDI_FB_SELECTCURRENTFILE = 610, + IDI_FB_FOLDALL = 611, + IDI_FB_EXPANDALL = 612, + + IDI_FUNCLIST_ROOT = 620, + IDI_FUNCLIST_NODE = 621, + IDI_FUNCLIST_LEAF = 622, + + IDI_FUNCLIST_SORTBUTTON = 631, + IDI_FUNCLIST_RELOADBUTTON = 632, + + IDI_VIEW_DOC_MAP_ON_ICON = 633, + IDI_VIEW_DOC_MAP_OFF_ICON = 634, + IDI_VIEW_FILEBROWSER_ON_ICON = 635, + IDI_VIEW_FILEBROWSER_OFF_ICON = 636, + IDI_VIEW_FUNCLIST_ON_ICON = 637, + IDI_VIEW_FUNCLIST_OFF_ICON = 638, + IDI_VIEW_MONITORING_ON_ICON = 639, + IDI_VIEW_MONITORING_OFF_ICON = 640, + + IDC_MY_CUR = 1402, + IDC_UP_ARROW = 1403, + IDC_DRAG_TAB = 1404, + IDC_DRAG_INTERDIT_TAB = 1405, + IDC_DRAG_PLUS_TAB = 1406, + IDC_DRAG_OUT_TAB = 1407, + + IDC_MACRO_RECORDING = 1408, + + IDR_SAVEALL = 1500, + IDR_CLOSEFILE = 1501, + IDR_CLOSEALL = 1502, + IDR_FIND = 1503, + IDR_REPLACE = 1504, + IDR_ZOOMIN = 1505, + IDR_ZOOMOUT = 1506, + IDR_WRAP = 1507, + IDR_INVISIBLECHAR = 1508, + IDR_INDENTGUIDE = 1509, + IDR_SHOWPANNEL = 1510, + IDR_STARTRECORD = 1511, + IDR_STOPRECORD = 1512, + IDR_PLAYRECORD = 1513, + IDR_SAVERECORD = 1514, + IDR_SYNCV = 1515, + IDR_SYNCH = 1516, + IDR_FILENEW = 1517, + IDR_FILEOPEN = 1518, + IDR_FILESAVE = 1519, + IDR_PRINT = 1520, + IDR_CUT = 1521, + IDR_COPY = 1522, + IDR_PASTE = 1523, + IDR_UNDO = 1524, + IDR_REDO = 1525, + IDR_M_PLAYRECORD = 1526, + IDR_DOCMAP = 1527, + IDR_FUNC_LIST = 1528, + IDR_FILEBROWSER = 1529, + IDR_CLOSETAB = 1530, + IDR_CLOSETAB_INACT = 1531, + IDR_CLOSETAB_HOVER = 1532, + IDR_CLOSETAB_PUSH = 1533, + IDR_FUNC_LIST_ICO = 1534, + IDR_DOCMAP_ICO = 1535, + IDR_PROJECTPANEL_ICO = 1536, + IDR_CLIPBOARDPANEL_ICO = 1537, + IDR_ASCIIPANEL_ICO = 1538, + IDR_DOCSWITCHER_ICO = 1539, + IDR_FILEBROWSER_ICO = 1540, + IDR_FILEMONITORING = 1541, + + ID_MACRO = 20000, + ID_MACRO_LIMIT = 20200, + + ID_USER_CMD = 21000, + ID_USER_CMD_LIMIT = 21200, + + ID_PLUGINS_CMD = 22000, + ID_PLUGINS_CMD_LIMIT = 22500, + + ID_PLUGINS_CMD_DYNAMIC = 23000, + ID_PLUGINS_CMD_DYNAMIC_LIMIT = 24999, + + MARKER_PLUGINS = 3, + MARKER_PLUGINS_LIMIT = 19, + + ID_PLUGINS_REMOVING = 22501, + ID_PLUGINS_REMOVING_END = 22600, + + IDCMD = 50000, + + IDC_PREV_DOC = IDCMD+3, + IDC_NEXT_DOC = IDCMD+4, + IDC_EDIT_TOGGLEMACRORECORDING = IDCMD+5, + + IDCMD_LIMIT = IDCMD+20, + + IDSCINTILLA = 60000, + IDSCINTILLA_KEY_HOME = IDSCINTILLA+0, + IDSCINTILLA_KEY_HOME_WRAP = IDSCINTILLA+1, + IDSCINTILLA_KEY_END = IDSCINTILLA+2, + IDSCINTILLA_KEY_END_WRAP = IDSCINTILLA+3, + IDSCINTILLA_KEY_LINE_DUP = IDSCINTILLA+4, + IDSCINTILLA_KEY_LINE_CUT = IDSCINTILLA+5, + IDSCINTILLA_KEY_LINE_DEL = IDSCINTILLA+6, + IDSCINTILLA_KEY_LINE_TRANS = IDSCINTILLA+7, + IDSCINTILLA_KEY_LINE_COPY = IDSCINTILLA+8, + IDSCINTILLA_KEY_CUT = IDSCINTILLA+9, + IDSCINTILLA_KEY_COPY = IDSCINTILLA+10, + IDSCINTILLA_KEY_PASTE = IDSCINTILLA+11, + IDSCINTILLA_KEY_DEL = IDSCINTILLA+12, + IDSCINTILLA_KEY_SELECTALL = IDSCINTILLA+13, + IDSCINTILLA_KEY_OUTDENT = IDSCINTILLA+14, + IDSCINTILLA_KEY_UNDO = IDSCINTILLA+15, + IDSCINTILLA_KEY_REDO = IDSCINTILLA+16, + IDSCINTILLA_LIMIT = IDSCINTILLA+30, + + IDD_FILEVIEW_DIALOG = 1000, + + IDC_MINIMIZED_TRAY = 67001, + + IDD_CREATE_DIRECTORY = 1100, + IDC_STATIC_CURRENT_FOLDER = 1101, + IDC_EDIT_NEW_FOLDER = 1102, + + IDD_INSERT_INPUT_TEXT = 1200, + IDC_EDIT_INPUT_VALUE = 1201, + IDC_STATIC_INPUT_TITLE = 1202, + IDC_ICON_INPUT_ICON = 1203, + + IDR_M30_MENU = 1500, + + IDR_SYSTRAYPOPUP_MENU = 1501, + + IDD_ABOUTBOX = 1700, + IDC_LICENCE_EDIT = 1701, + IDC_HOME_ADDR = 1702, + IDC_EMAIL_ADDR = 1703, + IDC_ONLINEHELP_ADDR = 1704, + IDC_AUTHOR_NAME = 1705, + IDC_BUILD_DATETIME = 1706, + IDC_VERSION_BIT = 1707, + + IDD_DEBUGINFOBOX = 1750, + IDC_DEBUGINFO_EDIT = 1751, + IDC_DEBUGINFO_COPYLINK = 1752, + + IDD_DOSAVEORNOTBOX = 1760, + IDC_DOSAVEORNOTTEX = 1761, + + IDD_GOLINE = 2000, + ID_GOLINE_EDIT = IDD_GOLINE + 1, + ID_CURRLINE = IDD_GOLINE + 2, + ID_LASTLINE = IDD_GOLINE + 3, + ID_URHERE_STATIC = IDD_GOLINE + 4, + ID_UGO_STATIC = IDD_GOLINE + 5, + ID_NOMORETHAN_STATIC = IDD_GOLINE + 6, + IDC_RADIO_GOTOLINE = IDD_GOLINE + 7, + IDC_RADIO_GOTOOFFSET = IDD_GOLINE + 8, + + IDD_VALUE_DLG = 2400, + IDC_VALUE_STATIC = 2401, + IDC_VALUE_EDIT = 2402, + + IDD_BUTTON_DLG = 2410, + IDC_RESTORE_BUTTON = 2411, + + IDD_SETTING_DLG = 2500, + + NOTEPADPLUS_USER_INTERNAL = Constants.WM_USER + 0000, + NPPM_INTERNAL_USERCMDLIST_MODIFIED = NOTEPADPLUS_USER_INTERNAL + 1, + NPPM_INTERNAL_CMDLIST_MODIFIED = NOTEPADPLUS_USER_INTERNAL + 2, + NPPM_INTERNAL_MACROLIST_MODIFIED = NOTEPADPLUS_USER_INTERNAL + 3, + NPPM_INTERNAL_PLUGINCMDLIST_MODIFIED = NOTEPADPLUS_USER_INTERNAL + 4, + NPPM_INTERNAL_CLEARSCINTILLAKEY = NOTEPADPLUS_USER_INTERNAL + 5, + NPPM_INTERNAL_BINDSCINTILLAKEY = NOTEPADPLUS_USER_INTERNAL + 6, + NPPM_INTERNAL_SCINTILLAKEYMODIFIED = NOTEPADPLUS_USER_INTERNAL + 7, + NPPM_INTERNAL_SCINTILLAFINFERCOLLAPSE = NOTEPADPLUS_USER_INTERNAL + 8, + NPPM_INTERNAL_SCINTILLAFINFERUNCOLLAPSE = NOTEPADPLUS_USER_INTERNAL + 9, + NPPM_INTERNAL_DISABLEAUTOUPDATE = NOTEPADPLUS_USER_INTERNAL + 10, + NPPM_INTERNAL_SETTING_HISTORY_SIZE = NOTEPADPLUS_USER_INTERNAL + 11, + NPPM_INTERNAL_ISTABBARREDUCED = NOTEPADPLUS_USER_INTERNAL + 12, + NPPM_INTERNAL_ISFOCUSEDTAB = NOTEPADPLUS_USER_INTERNAL + 13, + NPPM_INTERNAL_GETMENU = NOTEPADPLUS_USER_INTERNAL + 14, + NPPM_INTERNAL_CLEARINDICATOR = NOTEPADPLUS_USER_INTERNAL + 15, + NPPM_INTERNAL_SCINTILLAFINFERCOPY = NOTEPADPLUS_USER_INTERNAL + 16, + NPPM_INTERNAL_SCINTILLAFINFERSELECTALL = NOTEPADPLUS_USER_INTERNAL + 17, + NPPM_INTERNAL_SETCARETWIDTH = NOTEPADPLUS_USER_INTERNAL + 18, + NPPM_INTERNAL_SETCARETBLINKRATE = NOTEPADPLUS_USER_INTERNAL + 19, + NPPM_INTERNAL_CLEARINDICATORTAGMATCH = NOTEPADPLUS_USER_INTERNAL + 20, + NPPM_INTERNAL_CLEARINDICATORTAGATTR = NOTEPADPLUS_USER_INTERNAL + 21, + NPPM_INTERNAL_SWITCHVIEWFROMHWND = NOTEPADPLUS_USER_INTERNAL + 22, + NPPM_INTERNAL_UPDATETITLEBAR = NOTEPADPLUS_USER_INTERNAL + 23, + NPPM_INTERNAL_CANCEL_FIND_IN_FILES = NOTEPADPLUS_USER_INTERNAL + 24, + NPPM_INTERNAL_RELOADNATIVELANG = NOTEPADPLUS_USER_INTERNAL + 25, + NPPM_INTERNAL_PLUGINSHORTCUTMOTIFIED = NOTEPADPLUS_USER_INTERNAL + 26, + NPPM_INTERNAL_SCINTILLAFINFERCLEARALL = NOTEPADPLUS_USER_INTERNAL + 27, + + NPPM_INTERNAL_SETTING_TAB_REPLCESPACE = NOTEPADPLUS_USER_INTERNAL + 29, + NPPM_INTERNAL_SETTING_TAB_SIZE = NOTEPADPLUS_USER_INTERNAL + 30, + NPPM_INTERNAL_RELOADSTYLERS = NOTEPADPLUS_USER_INTERNAL + 31, + NPPM_INTERNAL_DOCORDERCHANGED = NOTEPADPLUS_USER_INTERNAL + 32, + NPPM_INTERNAL_SETMULTISELCTION = NOTEPADPLUS_USER_INTERNAL + 33, + NPPM_INTERNAL_SCINTILLAFINFEROPENALL = NOTEPADPLUS_USER_INTERNAL + 34, + NPPM_INTERNAL_RECENTFILELIST_UPDATE = NOTEPADPLUS_USER_INTERNAL + 35, + NPPM_INTERNAL_RECENTFILELIST_SWITCH = NOTEPADPLUS_USER_INTERNAL + 36, + NPPM_INTERNAL_GETSCINTEDTVIEW = NOTEPADPLUS_USER_INTERNAL + 37, + NPPM_INTERNAL_ENABLESNAPSHOT = NOTEPADPLUS_USER_INTERNAL + 38, + NPPM_INTERNAL_SAVECURRENTSESSION = NOTEPADPLUS_USER_INTERNAL + 39, + NPPM_INTERNAL_FINDINFINDERDLG = NOTEPADPLUS_USER_INTERNAL + 40, + NPPM_INTERNAL_REMOVEFINDER = NOTEPADPLUS_USER_INTERNAL + 41, + NPPM_INTERNAL_RELOADSCROLLTOEND = NOTEPADPLUS_USER_INTERNAL + 42, + NPPM_INTERNAL_FINDKEYCONFLICTS = NOTEPADPLUS_USER_INTERNAL + 43, + NPPM_INTERNAL_SCROLLBEYONDLASTLINE = NOTEPADPLUS_USER_INTERNAL + 44, + NPPM_INTERNAL_SETWORDCHARS = NOTEPADPLUS_USER_INTERNAL + 45, + NPPM_INTERNAL_EXPORTFUNCLISTANDQUIT = NOTEPADPLUS_USER_INTERNAL + 46, + NPPM_INTERNAL_PRNTANDQUIT = NOTEPADPLUS_USER_INTERNAL + 47, + NPPM_INTERNAL_SAVEBACKUP = NOTEPADPLUS_USER_INTERNAL + 48, + NPPM_INTERNAL_STOPMONITORING = NOTEPADPLUS_USER_INTERNAL + 49, + NPPM_INTERNAL_EDGEBACKGROUND = NOTEPADPLUS_USER_INTERNAL + 50, + NPPM_INTERNAL_EDGEMULTISETSIZE = NOTEPADPLUS_USER_INTERNAL + 51, + NPPM_INTERNAL_UPDATECLICKABLELINKS = NOTEPADPLUS_USER_INTERNAL + 52, + + NPPM_INTERNAL_CHECKDOCSTATUS = Constants.NPPMSG + 53, + + NPPM_INTERNAL_ENABLECHECKDOCOPT = Constants.NPPMSG + 54, + + CHECKDOCOPT_NONE = 0, + CHECKDOCOPT_UPDATESILENTLY = 1, + CHECKDOCOPT_UPDATEGO2END = 2, + + NPPM_INTERNAL_SETFILENAME = Constants.NPPMSG + 63, + + SCINTILLA_USER = Constants.WM_USER + 2000, + + MACRO_USER = Constants.WM_USER + 4000, + WM_GETCURRENTMACROSTATUS = MACRO_USER + 01, + WM_MACRODLGRUNMACRO = MACRO_USER + 02, + + SPLITTER_USER = Constants.WM_USER + 4000, + WORDSTYLE_USER = Constants.WM_USER + 5000, + COLOURPOPUP_USER = Constants.WM_USER + 6000, + BABYGRID_USER = Constants.WM_USER + 7000, + + MENUINDEX_FILE = 0, + MENUINDEX_EDIT = 1, + MENUINDEX_SEARCH = 2, + MENUINDEX_VIEW = 3, + MENUINDEX_FORMAT = 4, + MENUINDEX_LANGUAGE = 5, + MENUINDEX_SETTINGS = 6, + MENUINDEX_TOOLS = 7, + MENUINDEX_MACRO = 8, + MENUINDEX_RUN = 9, + MENUINDEX_PLUGINS = 10, + /* --Autogenerated -- end of section automatically generated from resource.h */ + } +} diff --git a/WakaTime/PluginInfrastructure/ScintillaGateway.cs b/WakaTime/PluginInfrastructure/ScintillaGateway.cs index 4483904..168c646 100644 --- a/WakaTime/PluginInfrastructure/ScintillaGateway.cs +++ b/WakaTime/PluginInfrastructure/ScintillaGateway.cs @@ -1,5214 +1,5214 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using System.Runtime.InteropServices; -using System.Text; -using static Kbg.NppPluginNET.PluginInfrastructure.Win32; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - /// - /// This it the plugin-writers primary interface to Notepad++/Scintilla. - /// It takes away all the complexity with command numbers and Int-pointer casting. - /// - /// See http://www.scintilla.org/ScintillaDoc.html for further details. - /// - public class ScintillaGateway : IScintillaGateway - { - private const int Unused = 0; - - private readonly IntPtr scintilla; - - public static readonly int LengthZeroTerminator = "\0".Length; - - - public ScintillaGateway(IntPtr scintilla) - { - this.scintilla = scintilla; - } - - public int GetSelectionLength() - { - var selectionLength = (int) Win32.SendMessage(scintilla, SciMsg.SCI_GETSELTEXT, Unused, Unused) - LengthZeroTerminator; - return selectionLength; - } - - public void AppendTextAndMoveCursor(string text) - { - AppendText(text.Length, text); - GotoPos(GetCurrentPos() + text.Length); - } - - public void InsertTextAndMoveCursor(string text) - { - var currentPos = GetCurrentPos(); - InsertText(currentPos, text); - GotoPos(currentPos + text.Length); - } - - public void SelectCurrentLine() - { - int line = GetCurrentLineNumber(); - SetSelection(PositionFromLine(line), PositionFromLine(line + 1)); - } - - /// - /// clears the selection without changing the position of the cursor - /// - public void ClearSelectionToCursor() - { - var pos = GetCurrentPos(); - SetSelection(pos, pos); - } - - /// - /// Get the current line from the current position - /// - public int GetCurrentLineNumber() - { - return LineFromPosition(GetCurrentPos()); - } - - /// - /// Get the scroll information for the current Scintilla window. - /// - /// Arguments for the scroll information such as tracking - /// Which scroll bar information are you looking for - /// A ScrollInfo struct with information of the current scroll state - public ScrollInfo GetScrollInfo(ScrollInfoMask mask = ScrollInfoMask.SIF_ALL, ScrollInfoBar scrollBar = ScrollInfoBar.SB_BOTH) - { - ScrollInfo scrollInfo = new ScrollInfo(); - scrollInfo.cbSize = (uint)Marshal.SizeOf(scrollInfo); - scrollInfo.fMask = (uint)mask; - Win32.GetScrollInfo(scintilla, (int)scrollBar, ref scrollInfo); - return scrollInfo; - } - - /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ - /// Add text to the document at current position. (Scintilla feature 2001) - public unsafe void AddText(int length, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ADDTEXT, (IntPtr) length, (IntPtr) textPtr); - } - } - - /// Add array of cells to document. (Scintilla feature 2002) - public unsafe void AddStyledText(int length, Cells c) - { - fixed (char* cPtr = c.Value) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ADDSTYLEDTEXT, (IntPtr) length, (IntPtr) cPtr); - } - } - - /// Insert string at a position. (Scintilla feature 2003) - public unsafe void InsertText(int pos, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INSERTTEXT, (IntPtr) pos, (IntPtr) textPtr); - } - } - - /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK (Scintilla feature 2672) - public unsafe void ChangeInsertion(int length, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CHANGEINSERTION, (IntPtr) length, (IntPtr) textPtr); - } - } - - /// Delete all text in the document. (Scintilla feature 2004) - public void ClearAll() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEARALL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Delete a range of text in the document. (Scintilla feature 2645) - public void DeleteRange(int start, int lengthDelete) - { - Win32.SendMessage(scintilla, SciMsg.SCI_DELETERANGE, (IntPtr) start, (IntPtr) lengthDelete); - } - - /// Set all style bytes to 0, remove all folding information. (Scintilla feature 2005) - public void ClearDocumentStyle() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEARDOCUMENTSTYLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Returns the number of bytes in the document. (Scintilla feature 2006) - public int GetLength() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLENGTH, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Returns the character byte at the position. (Scintilla feature 2007) - public int GetCharAt(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCHARAT, (IntPtr) pos, (IntPtr) Unused); - } - - /// Returns the position of the caret. (Scintilla feature 2008) - public int GetCurrentPos() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCURRENTPOS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Returns the position of the opposite end of the selection to the caret. (Scintilla feature 2009) - public int GetAnchor() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETANCHOR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Returns the style byte at the position. (Scintilla feature 2010) - public int GetStyleAt(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEAT, (IntPtr) pos, (IntPtr) Unused); - } - - /// Redoes the next action on the undo history. (Scintilla feature 2011) - public void Redo() - { - Win32.SendMessage(scintilla, SciMsg.SCI_REDO, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Choose between collecting actions into the undo - /// history and discarding them. - /// (Scintilla feature 2012) - /// - public void SetUndoCollection(bool collectUndo) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETUNDOCOLLECTION, new IntPtr(collectUndo ? 1 : 0), (IntPtr) Unused); - } - - /// Select all the text in the document. (Scintilla feature 2013) - public void SelectAll() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SELECTALL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Remember the current position in the undo history as the position - /// at which the document was saved. - /// (Scintilla feature 2014) - /// - public void SetSavePoint() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSAVEPOINT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Retrieve a buffer of cells. - /// Returns the number of bytes in the buffer not including terminating NULs. - /// (Scintilla feature 2015) - /// - public int GetStyledText(TextRange tr) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEDTEXT, (IntPtr) Unused, tr.NativePointer); - } - - /// Are there any redoable actions in the undo history? (Scintilla feature 2016) - public bool CanRedo() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_CANREDO, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Retrieve the line number at which a particular marker is located. (Scintilla feature 2017) - public int MarkerLineFromHandle(int markerHandle) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERLINEFROMHANDLE, (IntPtr) markerHandle, (IntPtr) Unused); - } - - /// Delete a marker. (Scintilla feature 2018) - public void MarkerDeleteHandle(int markerHandle) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDELETEHANDLE, (IntPtr) markerHandle, (IntPtr) Unused); - } - - /// Is undo history being collected? (Scintilla feature 2019) - public bool GetUndoCollection() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETUNDOCOLLECTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Are white space characters currently visible? - /// Returns one of SCWS_* constants. - /// (Scintilla feature 2020) - /// - public WhiteSpace GetViewWS() - { - return (WhiteSpace)Win32.SendMessage(scintilla, SciMsg.SCI_GETVIEWWS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Make white space characters invisible, always visible or visible outside indentation. (Scintilla feature 2021) - public void SetViewWS(WhiteSpace viewWS) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETVIEWWS, (IntPtr) viewWS, (IntPtr) Unused); - } - - /// - /// Retrieve the current tab draw mode. - /// Returns one of SCTD_* constants. - /// (Scintilla feature 2698) - /// - public TabDrawMode GetTabDrawMode() - { - return (TabDrawMode)Win32.SendMessage(scintilla, SciMsg.SCI_GETTABDRAWMODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set how tabs are drawn when visible. (Scintilla feature 2699) - public void SetTabDrawMode(TabDrawMode tabDrawMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTABDRAWMODE, (IntPtr) tabDrawMode, (IntPtr) Unused); - } - - /// Find the position from a point within the window. (Scintilla feature 2022) - public int PositionFromPoint(int x, int y) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMPOINT, (IntPtr) x, (IntPtr) y); - } - - /// - /// Find the position from a point within the window but return - /// INVALID_POSITION if not close to text. - /// (Scintilla feature 2023) - /// - public int PositionFromPointClose(int x, int y) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMPOINTCLOSE, (IntPtr) x, (IntPtr) y); - } - - /// Set caret to start of a line and ensure it is visible. (Scintilla feature 2024) - public void GotoLine(int line) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GOTOLINE, (IntPtr) line, (IntPtr) Unused); - } - - /// Set caret to a position and ensure it is visible. (Scintilla feature 2025) - public void GotoPos(int caret) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GOTOPOS, (IntPtr) caret, (IntPtr) Unused); - } - - /// - /// Set the selection anchor to a position. The anchor is the opposite - /// end of the selection from the caret. - /// (Scintilla feature 2026) - /// - public void SetAnchor(int anchor) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETANCHOR, (IntPtr) anchor, (IntPtr) Unused); - } - - /// - /// Retrieve the text of the line containing the caret. - /// Returns the index of the caret on the line. - /// Result is NUL-terminated. - /// (Scintilla feature 2027) - /// - public unsafe string GetCurLine(int length) - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETCURLINE, (IntPtr) length, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// Retrieve the position of the last correctly styled character. (Scintilla feature 2028) - public int GetEndStyled() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETENDSTYLED, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Convert all line endings in the document to one mode. (Scintilla feature 2029) - public void ConvertEOLs(EndOfLine eolMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CONVERTEOLS, (IntPtr) eolMode, (IntPtr) Unused); - } - - /// Retrieve the current end of line mode - one of CRLF, CR, or LF. (Scintilla feature 2030) - public EndOfLine GetEOLMode() - { - return (EndOfLine)Win32.SendMessage(scintilla, SciMsg.SCI_GETEOLMODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the current end of line mode. (Scintilla feature 2031) - public void SetEOLMode(EndOfLine eolMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETEOLMODE, (IntPtr) eolMode, (IntPtr) Unused); - } - - /// - /// Set the current styling position to start. - /// The unused parameter is no longer used and should be set to 0. - /// (Scintilla feature 2032) - /// - public void StartStyling(int start, int unused) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STARTSTYLING, (IntPtr) start, (IntPtr) unused); - } - - /// - /// Change style from current styling position for length characters to a style - /// and move the current styling position to after this newly styled segment. - /// (Scintilla feature 2033) - /// - public void SetStyling(int length, int style) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSTYLING, (IntPtr) length, (IntPtr) style); - } - - /// Is drawing done first into a buffer or direct to the screen? (Scintilla feature 2034) - public bool GetBufferedDraw() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETBUFFEREDDRAW, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// If drawing is buffered then each line of text is drawn into a bitmap buffer - /// before drawing it to the screen to avoid flicker. - /// (Scintilla feature 2035) - /// - public void SetBufferedDraw(bool buffered) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETBUFFEREDDRAW, new IntPtr(buffered ? 1 : 0), (IntPtr) Unused); - } - - /// Change the visible size of a tab to be a multiple of the width of a space character. (Scintilla feature 2036) - public void SetTabWidth(int tabWidth) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTABWIDTH, (IntPtr) tabWidth, (IntPtr) Unused); - } - - /// Retrieve the visible size of a tab. (Scintilla feature 2121) - public int GetTabWidth() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTABWIDTH, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Clear explicit tabstops on a line. (Scintilla feature 2675) - public void ClearTabStops(int line) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEARTABSTOPS, (IntPtr) line, (IntPtr) Unused); - } - - /// Add an explicit tab stop for a line. (Scintilla feature 2676) - public void AddTabStop(int line, int x) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ADDTABSTOP, (IntPtr) line, (IntPtr) x); - } - - /// Find the next explicit tab stop position on a line after a position. (Scintilla feature 2677) - public int GetNextTabStop(int line, int x) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETNEXTTABSTOP, (IntPtr) line, (IntPtr) x); - } - - /// - /// Set the code page used to interpret the bytes of the document as characters. - /// The SC_CP_UTF8 value can be used to enter Unicode mode. - /// (Scintilla feature 2037) - /// - public void SetCodePage(int codePage) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCODEPAGE, (IntPtr) codePage, (IntPtr) Unused); - } - - /// Is the IME displayed in a window or inline? (Scintilla feature 2678) - public IMEInteraction GetIMEInteraction() - { - return (IMEInteraction)Win32.SendMessage(scintilla, SciMsg.SCI_GETIMEINTERACTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Choose to display the the IME in a winow or inline. (Scintilla feature 2679) - public void SetIMEInteraction(IMEInteraction imeInteraction) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETIMEINTERACTION, (IntPtr) imeInteraction, (IntPtr) Unused); - } - - /// Set the symbol used for a particular marker number. (Scintilla feature 2040) - public void MarkerDefine(int markerNumber, MarkerSymbol markerSymbol) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDEFINE, (IntPtr) markerNumber, (IntPtr) markerSymbol); - } - - /// Set the foreground colour used for a particular marker number. (Scintilla feature 2041) - public void MarkerSetFore(int markerNumber, Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSETFORE, (IntPtr) markerNumber, fore.Value); - } - - /// Set the background colour used for a particular marker number. (Scintilla feature 2042) - public void MarkerSetBack(int markerNumber, Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSETBACK, (IntPtr) markerNumber, back.Value); - } - - /// Set the background colour used for a particular marker number when its folding block is selected. (Scintilla feature 2292) - public void MarkerSetBackSelected(int markerNumber, Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSETBACKSELECTED, (IntPtr) markerNumber, back.Value); - } - - /// Enable/disable highlight for current folding bloc (smallest one that contains the caret) (Scintilla feature 2293) - public void MarkerEnableHighlight(bool enabled) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERENABLEHIGHLIGHT, new IntPtr(enabled ? 1 : 0), (IntPtr) Unused); - } - - /// Add a marker to a line, returning an ID which can be used to find or delete the marker. (Scintilla feature 2043) - public int MarkerAdd(int line, int markerNumber) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERADD, (IntPtr) line, (IntPtr) markerNumber); - } - - /// Delete a marker from a line. (Scintilla feature 2044) - public void MarkerDelete(int line, int markerNumber) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDELETE, (IntPtr) line, (IntPtr) markerNumber); - } - - /// Delete all markers with a particular number from all lines. (Scintilla feature 2045) - public void MarkerDeleteAll(int markerNumber) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDELETEALL, (IntPtr) markerNumber, (IntPtr) Unused); - } - - /// Get a bit mask of all the markers set on a line. (Scintilla feature 2046) - public int MarkerGet(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERGET, (IntPtr) line, (IntPtr) Unused); - } - - /// - /// Find the next line at or after lineStart that includes a marker in mask. - /// Return -1 when no more lines. - /// (Scintilla feature 2047) - /// - public int MarkerNext(int lineStart, int markerMask) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERNEXT, (IntPtr) lineStart, (IntPtr) markerMask); - } - - /// Find the previous line before lineStart that includes a marker in mask. (Scintilla feature 2048) - public int MarkerPrevious(int lineStart, int markerMask) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERPREVIOUS, (IntPtr) lineStart, (IntPtr) markerMask); - } - - /// Define a marker from a pixmap. (Scintilla feature 2049) - public unsafe void MarkerDefinePixmap(int markerNumber, string pixmap) - { - fixed (byte* pixmapPtr = Encoding.UTF8.GetBytes(pixmap)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDEFINEPIXMAP, (IntPtr) markerNumber, (IntPtr) pixmapPtr); - } - } - - /// Add a set of markers to a line. (Scintilla feature 2466) - public void MarkerAddSet(int line, int markerSet) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERADDSET, (IntPtr) line, (IntPtr) markerSet); - } - - /// Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature 2476) - public void MarkerSetAlpha(int markerNumber, Alpha alpha) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSETALPHA, (IntPtr) markerNumber, (IntPtr) alpha); - } - - /// Set a margin to be either numeric or symbolic. (Scintilla feature 2240) - public void SetMarginTypeN(int margin, MarginType marginType) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINTYPEN, (IntPtr) margin, (IntPtr) marginType); - } - - /// Retrieve the type of a margin. (Scintilla feature 2241) - public MarginType GetMarginTypeN(int margin) - { - return (MarginType)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINTYPEN, (IntPtr) margin, (IntPtr) Unused); - } - - /// Set the width of a margin to a width expressed in pixels. (Scintilla feature 2242) - public void SetMarginWidthN(int margin, int pixelWidth) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINWIDTHN, (IntPtr) margin, (IntPtr) pixelWidth); - } - - /// Retrieve the width of a margin in pixels. (Scintilla feature 2243) - public int GetMarginWidthN(int margin) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINWIDTHN, (IntPtr) margin, (IntPtr) Unused); - } - - /// Set a mask that determines which markers are displayed in a margin. (Scintilla feature 2244) - public void SetMarginMaskN(int margin, int mask) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINMASKN, (IntPtr) margin, (IntPtr) mask); - } - - /// Retrieve the marker mask of a margin. (Scintilla feature 2245) - public int GetMarginMaskN(int margin) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINMASKN, (IntPtr) margin, (IntPtr) Unused); - } - - /// Make a margin sensitive or insensitive to mouse clicks. (Scintilla feature 2246) - public void SetMarginSensitiveN(int margin, bool sensitive) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINSENSITIVEN, (IntPtr) margin, new IntPtr(sensitive ? 1 : 0)); - } - - /// Retrieve the mouse click sensitivity of a margin. (Scintilla feature 2247) - public bool GetMarginSensitiveN(int margin) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINSENSITIVEN, (IntPtr) margin, (IntPtr) Unused); - } - - /// Set the cursor shown when the mouse is inside a margin. (Scintilla feature 2248) - public void SetMarginCursorN(int margin, CursorShape cursor) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINCURSORN, (IntPtr) margin, (IntPtr) cursor); - } - - /// Retrieve the cursor shown in a margin. (Scintilla feature 2249) - public CursorShape GetMarginCursorN(int margin) - { - return (CursorShape)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINCURSORN, (IntPtr) margin, (IntPtr) Unused); - } - - /// Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. (Scintilla feature 2250) - public void SetMarginBackN(int margin, Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINBACKN, (IntPtr) margin, back.Value); - } - - /// Retrieve the background colour of a margin (Scintilla feature 2251) - public Colour GetMarginBackN(int margin) - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINBACKN, (IntPtr) margin, (IntPtr) Unused)); - } - - /// Allocate a non-standard number of margins. (Scintilla feature 2252) - public void SetMargins(int margins) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINS, (IntPtr) margins, (IntPtr) Unused); - } - - /// How many margins are there?. (Scintilla feature 2253) - public int GetMargins() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Clear all the styles and make equivalent to the global default style. (Scintilla feature 2050) - public void StyleClearAll() - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLECLEARALL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the foreground colour of a style. (Scintilla feature 2051) - public void StyleSetFore(int style, Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETFORE, (IntPtr) style, fore.Value); - } - - /// Set the background colour of a style. (Scintilla feature 2052) - public void StyleSetBack(int style, Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETBACK, (IntPtr) style, back.Value); - } - - /// Set a style to be bold or not. (Scintilla feature 2053) - public void StyleSetBold(int style, bool bold) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETBOLD, (IntPtr) style, new IntPtr(bold ? 1 : 0)); - } - - /// Set a style to be italic or not. (Scintilla feature 2054) - public void StyleSetItalic(int style, bool italic) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETITALIC, (IntPtr) style, new IntPtr(italic ? 1 : 0)); - } - - /// Set the size of characters of a style. (Scintilla feature 2055) - public void StyleSetSize(int style, int sizePoints) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETSIZE, (IntPtr) style, (IntPtr) sizePoints); - } - - /// Set the font of a style. (Scintilla feature 2056) - public unsafe void StyleSetFont(int style, string fontName) - { - fixed (byte* fontNamePtr = Encoding.UTF8.GetBytes(fontName)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETFONT, (IntPtr) style, (IntPtr) fontNamePtr); - } - } - - /// Set a style to have its end of line filled or not. (Scintilla feature 2057) - public void StyleSetEOLFilled(int style, bool eolFilled) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETEOLFILLED, (IntPtr) style, new IntPtr(eolFilled ? 1 : 0)); - } - - /// Reset the default style to its state at startup (Scintilla feature 2058) - public void StyleResetDefault() - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLERESETDEFAULT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set a style to be underlined or not. (Scintilla feature 2059) - public void StyleSetUnderline(int style, bool underline) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETUNDERLINE, (IntPtr) style, new IntPtr(underline ? 1 : 0)); - } - - /// Get the foreground colour of a style. (Scintilla feature 2481) - public Colour StyleGetFore(int style) - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETFORE, (IntPtr) style, (IntPtr) Unused)); - } - - /// Get the background colour of a style. (Scintilla feature 2482) - public Colour StyleGetBack(int style) - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETBACK, (IntPtr) style, (IntPtr) Unused)); - } - - /// Get is a style bold or not. (Scintilla feature 2483) - public bool StyleGetBold(int style) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETBOLD, (IntPtr) style, (IntPtr) Unused); - } - - /// Get is a style italic or not. (Scintilla feature 2484) - public bool StyleGetItalic(int style) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETITALIC, (IntPtr) style, (IntPtr) Unused); - } - - /// Get the size of characters of a style. (Scintilla feature 2485) - public int StyleGetSize(int style) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETSIZE, (IntPtr) style, (IntPtr) Unused); - } - - /// - /// Get the font of a style. - /// Returns the length of the fontName - /// Result is NUL-terminated. - /// (Scintilla feature 2486) - /// - public unsafe string StyleGetFont(int style) - { - byte[] fontNameBuffer = new byte[10000]; - fixed (byte* fontNamePtr = fontNameBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETFONT, (IntPtr) style, (IntPtr) fontNamePtr); - return Encoding.UTF8.GetString(fontNameBuffer).TrimEnd('\0'); - } - } - - /// Get is a style to have its end of line filled or not. (Scintilla feature 2487) - public bool StyleGetEOLFilled(int style) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETEOLFILLED, (IntPtr) style, (IntPtr) Unused); - } - - /// Get is a style underlined or not. (Scintilla feature 2488) - public bool StyleGetUnderline(int style) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETUNDERLINE, (IntPtr) style, (IntPtr) Unused); - } - - /// Get is a style mixed case, or to force upper or lower case. (Scintilla feature 2489) - public CaseVisible StyleGetCase(int style) - { - return (CaseVisible)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETCASE, (IntPtr) style, (IntPtr) Unused); - } - - /// Get the character get of the font in a style. (Scintilla feature 2490) - public CharacterSet StyleGetCharacterSet(int style) - { - return (CharacterSet)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETCHARACTERSET, (IntPtr) style, (IntPtr) Unused); - } - - /// Get is a style visible or not. (Scintilla feature 2491) - public bool StyleGetVisible(int style) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETVISIBLE, (IntPtr) style, (IntPtr) Unused); - } - - /// - /// Get is a style changeable or not (read only). - /// Experimental feature, currently buggy. - /// (Scintilla feature 2492) - /// - public bool StyleGetChangeable(int style) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETCHANGEABLE, (IntPtr) style, (IntPtr) Unused); - } - - /// Get is a style a hotspot or not. (Scintilla feature 2493) - public bool StyleGetHotSpot(int style) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETHOTSPOT, (IntPtr) style, (IntPtr) Unused); - } - - /// Set a style to be mixed case, or to force upper or lower case. (Scintilla feature 2060) - public void StyleSetCase(int style, CaseVisible caseVisible) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETCASE, (IntPtr) style, (IntPtr) caseVisible); - } - - /// Set the size of characters of a style. Size is in points multiplied by 100. (Scintilla feature 2061) - public void StyleSetSizeFractional(int style, int sizeHundredthPoints) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETSIZEFRACTIONAL, (IntPtr) style, (IntPtr) sizeHundredthPoints); - } - - /// Get the size of characters of a style in points multiplied by 100 (Scintilla feature 2062) - public int StyleGetSizeFractional(int style) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETSIZEFRACTIONAL, (IntPtr) style, (IntPtr) Unused); - } - - /// Set the weight of characters of a style. (Scintilla feature 2063) - public void StyleSetWeight(int style, FontWeight weight) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETWEIGHT, (IntPtr) style, (IntPtr) weight); - } - - /// Get the weight of characters of a style. (Scintilla feature 2064) - public FontWeight StyleGetWeight(int style) - { - return (FontWeight)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETWEIGHT, (IntPtr) style, (IntPtr) Unused); - } - - /// Set the character set of the font in a style. (Scintilla feature 2066) - public void StyleSetCharacterSet(int style, CharacterSet characterSet) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETCHARACTERSET, (IntPtr) style, (IntPtr) characterSet); - } - - /// Set a style to be a hotspot or not. (Scintilla feature 2409) - public void StyleSetHotSpot(int style, bool hotspot) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETHOTSPOT, (IntPtr) style, new IntPtr(hotspot ? 1 : 0)); - } - - /// Set the foreground colour of the main and additional selections and whether to use this setting. (Scintilla feature 2067) - public void SetSelFore(bool useSetting, Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELFORE, new IntPtr(useSetting ? 1 : 0), fore.Value); - } - - /// Set the background colour of the main and additional selections and whether to use this setting. (Scintilla feature 2068) - public void SetSelBack(bool useSetting, Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELBACK, new IntPtr(useSetting ? 1 : 0), back.Value); - } - - /// Get the alpha of the selection. (Scintilla feature 2477) - public Alpha GetSelAlpha() - { - return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELALPHA, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the alpha of the selection. (Scintilla feature 2478) - public void SetSelAlpha(Alpha alpha) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELALPHA, (IntPtr) alpha, (IntPtr) Unused); - } - - /// Is the selection end of line filled? (Scintilla feature 2479) - public bool GetSelEOLFilled() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELEOLFILLED, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the selection to have its end of line filled or not. (Scintilla feature 2480) - public void SetSelEOLFilled(bool filled) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELEOLFILLED, new IntPtr(filled ? 1 : 0), (IntPtr) Unused); - } - - /// Set the foreground colour of the caret. (Scintilla feature 2069) - public void SetCaretFore(Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETFORE, fore.Value, (IntPtr) Unused); - } - - /// When key+modifier combination keyDefinition is pressed perform sciCommand. (Scintilla feature 2070) - public void AssignCmdKey(KeyModifier keyDefinition, int sciCommand) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ASSIGNCMDKEY, keyDefinition.Value, (IntPtr) sciCommand); - } - - /// When key+modifier combination keyDefinition is pressed do nothing. (Scintilla feature 2071) - public void ClearCmdKey(KeyModifier keyDefinition) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEARCMDKEY, keyDefinition.Value, (IntPtr) Unused); - } - - /// Drop all key mappings. (Scintilla feature 2072) - public void ClearAllCmdKeys() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEARALLCMDKEYS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the styles for a segment of the document. (Scintilla feature 2073) - public unsafe void SetStylingEx(int length, string styles) - { - fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSTYLINGEX, (IntPtr) length, (IntPtr) stylesPtr); - } - } - - /// Set a style to be visible or not. (Scintilla feature 2074) - public void StyleSetVisible(int style, bool visible) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETVISIBLE, (IntPtr) style, new IntPtr(visible ? 1 : 0)); - } - - /// Get the time in milliseconds that the caret is on and off. (Scintilla feature 2075) - public int GetCaretPeriod() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETPERIOD, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get the time in milliseconds that the caret is on and off. 0 = steady on. (Scintilla feature 2076) - public void SetCaretPeriod(int periodMilliseconds) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETPERIOD, (IntPtr) periodMilliseconds, (IntPtr) Unused); - } - - /// - /// Set the set of characters making up words for when moving or selecting by word. - /// First sets defaults like SetCharsDefault. - /// (Scintilla feature 2077) - /// - public unsafe void SetWordChars(string characters) - { - fixed (byte* charactersPtr = Encoding.UTF8.GetBytes(characters)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWORDCHARS, (IntPtr) Unused, (IntPtr) charactersPtr); - } - } - - /// - /// Get the set of characters making up words for when moving or selecting by word. - /// Returns the number of characters - /// (Scintilla feature 2646) - /// - public unsafe string GetWordChars() - { - byte[] charactersBuffer = new byte[10000]; - fixed (byte* charactersPtr = charactersBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETWORDCHARS, (IntPtr) Unused, (IntPtr) charactersPtr); - return Encoding.UTF8.GetString(charactersBuffer).TrimEnd('\0'); - } - } - - /// Set the number of characters to have directly indexed categories (Scintilla feature 2720) - public void SetCharacterCategoryOptimization(int countCharacters) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCHARACTERCATEGORYOPTIMIZATION, (IntPtr) countCharacters, (IntPtr) Unused); - } - - /// Get the number of characters to have directly indexed categories (Scintilla feature 2721) - public int GetCharacterCategoryOptimization() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCHARACTERCATEGORYOPTIMIZATION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Start a sequence of actions that is undone and redone as a unit. - /// May be nested. - /// (Scintilla feature 2078) - /// - public void BeginUndoAction() - { - Win32.SendMessage(scintilla, SciMsg.SCI_BEGINUNDOACTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// End a sequence of actions that is undone and redone as a unit. (Scintilla feature 2079) - public void EndUndoAction() - { - Win32.SendMessage(scintilla, SciMsg.SCI_ENDUNDOACTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set an indicator to plain, squiggle or TT. (Scintilla feature 2080) - public void IndicSetStyle(int indicator, IndicatorStyle indicatorStyle) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETSTYLE, (IntPtr) indicator, (IntPtr) indicatorStyle); - } - - /// Retrieve the style of an indicator. (Scintilla feature 2081) - public IndicatorStyle IndicGetStyle(int indicator) - { - return (IndicatorStyle)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETSTYLE, (IntPtr) indicator, (IntPtr) Unused); - } - - /// Set the foreground colour of an indicator. (Scintilla feature 2082) - public void IndicSetFore(int indicator, Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETFORE, (IntPtr) indicator, fore.Value); - } - - /// Retrieve the foreground colour of an indicator. (Scintilla feature 2083) - public Colour IndicGetFore(int indicator) - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETFORE, (IntPtr) indicator, (IntPtr) Unused)); - } - - /// Set an indicator to draw under text or over(default). (Scintilla feature 2510) - public void IndicSetUnder(int indicator, bool under) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETUNDER, (IntPtr) indicator, new IntPtr(under ? 1 : 0)); - } - - /// Retrieve whether indicator drawn under or over text. (Scintilla feature 2511) - public bool IndicGetUnder(int indicator) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETUNDER, (IntPtr) indicator, (IntPtr) Unused); - } - - /// Set a hover indicator to plain, squiggle or TT. (Scintilla feature 2680) - public void IndicSetHoverStyle(int indicator, IndicatorStyle indicatorStyle) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETHOVERSTYLE, (IntPtr) indicator, (IntPtr) indicatorStyle); - } - - /// Retrieve the hover style of an indicator. (Scintilla feature 2681) - public IndicatorStyle IndicGetHoverStyle(int indicator) - { - return (IndicatorStyle)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETHOVERSTYLE, (IntPtr) indicator, (IntPtr) Unused); - } - - /// Set the foreground hover colour of an indicator. (Scintilla feature 2682) - public void IndicSetHoverFore(int indicator, Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETHOVERFORE, (IntPtr) indicator, fore.Value); - } - - /// Retrieve the foreground hover colour of an indicator. (Scintilla feature 2683) - public Colour IndicGetHoverFore(int indicator) - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETHOVERFORE, (IntPtr) indicator, (IntPtr) Unused)); - } - - /// Set the attributes of an indicator. (Scintilla feature 2684) - public void IndicSetFlags(int indicator, IndicFlag flags) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETFLAGS, (IntPtr) indicator, (IntPtr) flags); - } - - /// Retrieve the attributes of an indicator. (Scintilla feature 2685) - public IndicFlag IndicGetFlags(int indicator) - { - return (IndicFlag)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETFLAGS, (IntPtr) indicator, (IntPtr) Unused); - } - - /// Set the foreground colour of all whitespace and whether to use this setting. (Scintilla feature 2084) - public void SetWhitespaceFore(bool useSetting, Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWHITESPACEFORE, new IntPtr(useSetting ? 1 : 0), fore.Value); - } - - /// Set the background colour of all whitespace and whether to use this setting. (Scintilla feature 2085) - public void SetWhitespaceBack(bool useSetting, Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWHITESPACEBACK, new IntPtr(useSetting ? 1 : 0), back.Value); - } - - /// Set the size of the dots used to mark space characters. (Scintilla feature 2086) - public void SetWhitespaceSize(int size) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWHITESPACESIZE, (IntPtr) size, (IntPtr) Unused); - } - - /// Get the size of the dots used to mark space characters. (Scintilla feature 2087) - public int GetWhitespaceSize() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETWHITESPACESIZE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Used to hold extra styling information for each line. (Scintilla feature 2092) - public void SetLineState(int line, int state) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETLINESTATE, (IntPtr) line, (IntPtr) state); - } - - /// Retrieve the extra styling information for a line. (Scintilla feature 2093) - public int GetLineState(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESTATE, (IntPtr) line, (IntPtr) Unused); - } - - /// Retrieve the last line number that has line state. (Scintilla feature 2094) - public int GetMaxLineState() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMAXLINESTATE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Is the background of the line containing the caret in a different colour? (Scintilla feature 2095) - public bool GetCaretLineVisible() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEVISIBLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Display the background of the line containing the caret in a different colour. (Scintilla feature 2096) - public void SetCaretLineVisible(bool show) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEVISIBLE, new IntPtr(show ? 1 : 0), (IntPtr) Unused); - } - - /// Get the colour of the background of the line containing the caret. (Scintilla feature 2097) - public Colour GetCaretLineBack() - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEBACK, (IntPtr) Unused, (IntPtr) Unused)); - } - - /// Set the colour of the background of the line containing the caret. (Scintilla feature 2098) - public void SetCaretLineBack(Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEBACK, back.Value, (IntPtr) Unused); - } - - /// - /// Retrieve the caret line frame width. - /// Width = 0 means this option is disabled. - /// (Scintilla feature 2704) - /// - public int GetCaretLineFrame() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEFRAME, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Display the caret line framed. - /// Set width != 0 to enable this option and width = 0 to disable it. - /// (Scintilla feature 2705) - /// - public void SetCaretLineFrame(int width) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEFRAME, (IntPtr) width, (IntPtr) Unused); - } - - /// - /// Set a style to be changeable or not (read only). - /// Experimental feature, currently buggy. - /// (Scintilla feature 2099) - /// - public void StyleSetChangeable(int style, bool changeable) - { - Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETCHANGEABLE, (IntPtr) style, new IntPtr(changeable ? 1 : 0)); - } - - /// - /// Display a auto-completion list. - /// The lengthEntered parameter indicates how many characters before - /// the caret should be used to provide context. - /// (Scintilla feature 2100) - /// - public unsafe void AutoCShow(int lengthEntered, string itemList) - { - fixed (byte* itemListPtr = Encoding.UTF8.GetBytes(itemList)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSHOW, (IntPtr) lengthEntered, (IntPtr) itemListPtr); - } - } - - /// Remove the auto-completion list from the screen. (Scintilla feature 2101) - public void AutoCCancel() - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCCANCEL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Is there an auto-completion list visible? (Scintilla feature 2102) - public bool AutoCActive() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCACTIVE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Retrieve the position of the caret when the auto-completion list was displayed. (Scintilla feature 2103) - public int AutoCPosStart() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCPOSSTART, (IntPtr) Unused, (IntPtr) Unused); - } - - /// User has selected an item so remove the list and insert the selection. (Scintilla feature 2104) - public void AutoCComplete() - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCCOMPLETE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Define a set of character that when typed cancel the auto-completion list. (Scintilla feature 2105) - public unsafe void AutoCStops(string characterSet) - { - fixed (byte* characterSetPtr = Encoding.UTF8.GetBytes(characterSet)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSTOPS, (IntPtr) Unused, (IntPtr) characterSetPtr); - } - } - - /// - /// Change the separator character in the string setting up an auto-completion list. - /// Default is space but can be changed if items contain space. - /// (Scintilla feature 2106) - /// - public void AutoCSetSeparator(int separatorCharacter) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETSEPARATOR, (IntPtr) separatorCharacter, (IntPtr) Unused); - } - - /// Retrieve the auto-completion list separator character. (Scintilla feature 2107) - public int AutoCGetSeparator() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETSEPARATOR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Select the item in the auto-completion list that starts with a string. (Scintilla feature 2108) - public unsafe void AutoCSelect(string select) - { - fixed (byte* selectPtr = Encoding.UTF8.GetBytes(select)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSELECT, (IntPtr) Unused, (IntPtr) selectPtr); - } - } - - /// - /// Should the auto-completion list be cancelled if the user backspaces to a - /// position before where the box was created. - /// (Scintilla feature 2110) - /// - public void AutoCSetCancelAtStart(bool cancel) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETCANCELATSTART, new IntPtr(cancel ? 1 : 0), (IntPtr) Unused); - } - - /// Retrieve whether auto-completion cancelled by backspacing before start. (Scintilla feature 2111) - public bool AutoCGetCancelAtStart() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCANCELATSTART, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Define a set of characters that when typed will cause the autocompletion to - /// choose the selected item. - /// (Scintilla feature 2112) - /// - public unsafe void AutoCSetFillUps(string characterSet) - { - fixed (byte* characterSetPtr = Encoding.UTF8.GetBytes(characterSet)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETFILLUPS, (IntPtr) Unused, (IntPtr) characterSetPtr); - } - } - - /// Should a single item auto-completion list automatically choose the item. (Scintilla feature 2113) - public void AutoCSetChooseSingle(bool chooseSingle) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETCHOOSESINGLE, new IntPtr(chooseSingle ? 1 : 0), (IntPtr) Unused); - } - - /// Retrieve whether a single item auto-completion list automatically choose the item. (Scintilla feature 2114) - public bool AutoCGetChooseSingle() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCHOOSESINGLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set whether case is significant when performing auto-completion searches. (Scintilla feature 2115) - public void AutoCSetIgnoreCase(bool ignoreCase) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETIGNORECASE, new IntPtr(ignoreCase ? 1 : 0), (IntPtr) Unused); - } - - /// Retrieve state of ignore case flag. (Scintilla feature 2116) - public bool AutoCGetIgnoreCase() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETIGNORECASE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Display a list of strings and send notification when user chooses one. (Scintilla feature 2117) - public unsafe void UserListShow(int listType, string itemList) - { - fixed (byte* itemListPtr = Encoding.UTF8.GetBytes(itemList)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_USERLISTSHOW, (IntPtr) listType, (IntPtr) itemListPtr); - } - } - - /// Set whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2118) - public void AutoCSetAutoHide(bool autoHide) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETAUTOHIDE, new IntPtr(autoHide ? 1 : 0), (IntPtr) Unused); - } - - /// Retrieve whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2119) - public bool AutoCGetAutoHide() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETAUTOHIDE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set whether or not autocompletion deletes any word characters - /// after the inserted text upon completion. - /// (Scintilla feature 2270) - /// - public void AutoCSetDropRestOfWord(bool dropRestOfWord) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETDROPRESTOFWORD, new IntPtr(dropRestOfWord ? 1 : 0), (IntPtr) Unused); - } - - /// - /// Retrieve whether or not autocompletion deletes any word characters - /// after the inserted text upon completion. - /// (Scintilla feature 2271) - /// - public bool AutoCGetDropRestOfWord() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETDROPRESTOFWORD, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Register an XPM image for use in autocompletion lists. (Scintilla feature 2405) - public unsafe void RegisterImage(int type, string xpmData) - { - fixed (byte* xpmDataPtr = Encoding.UTF8.GetBytes(xpmData)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_REGISTERIMAGE, (IntPtr) type, (IntPtr) xpmDataPtr); - } - } - - /// Clear all the registered XPM images. (Scintilla feature 2408) - public void ClearRegisteredImages() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEARREGISTEREDIMAGES, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Retrieve the auto-completion list type-separator character. (Scintilla feature 2285) - public int AutoCGetTypeSeparator() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETTYPESEPARATOR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Change the type-separator character in the string setting up an auto-completion list. - /// Default is '?' but can be changed if items contain '?'. - /// (Scintilla feature 2286) - /// - public void AutoCSetTypeSeparator(int separatorCharacter) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETTYPESEPARATOR, (IntPtr) separatorCharacter, (IntPtr) Unused); - } - - /// - /// Set the maximum width, in characters, of auto-completion and user lists. - /// Set to 0 to autosize to fit longest item, which is the default. - /// (Scintilla feature 2208) - /// - public void AutoCSetMaxWidth(int characterCount) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETMAXWIDTH, (IntPtr) characterCount, (IntPtr) Unused); - } - - /// Get the maximum width, in characters, of auto-completion and user lists. (Scintilla feature 2209) - public int AutoCGetMaxWidth() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETMAXWIDTH, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set the maximum height, in rows, of auto-completion and user lists. - /// The default is 5 rows. - /// (Scintilla feature 2210) - /// - public void AutoCSetMaxHeight(int rowCount) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETMAXHEIGHT, (IntPtr) rowCount, (IntPtr) Unused); - } - - /// Set the maximum height, in rows, of auto-completion and user lists. (Scintilla feature 2211) - public int AutoCGetMaxHeight() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETMAXHEIGHT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the number of spaces used for one level of indentation. (Scintilla feature 2122) - public void SetIndent(int indentSize) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETINDENT, (IntPtr) indentSize, (IntPtr) Unused); - } - - /// Retrieve indentation size. (Scintilla feature 2123) - public int GetIndent() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETINDENT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Indentation will only use space characters if useTabs is false, otherwise - /// it will use a combination of tabs and spaces. - /// (Scintilla feature 2124) - /// - public void SetUseTabs(bool useTabs) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETUSETABS, new IntPtr(useTabs ? 1 : 0), (IntPtr) Unused); - } - - /// Retrieve whether tabs will be used in indentation. (Scintilla feature 2125) - public bool GetUseTabs() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETUSETABS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Change the indentation of a line to a number of columns. (Scintilla feature 2126) - public void SetLineIndentation(int line, int indentation) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETLINEINDENTATION, (IntPtr) line, (IntPtr) indentation); - } - - /// Retrieve the number of columns that a line is indented. (Scintilla feature 2127) - public int GetLineIndentation(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEINDENTATION, (IntPtr) line, (IntPtr) Unused); - } - - /// Retrieve the position before the first non indentation character on a line. (Scintilla feature 2128) - public int GetLineIndentPosition(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEINDENTPOSITION, (IntPtr) line, (IntPtr) Unused); - } - - /// Retrieve the column number of a position, taking tab width into account. (Scintilla feature 2129) - public int GetColumn(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCOLUMN, (IntPtr) pos, (IntPtr) Unused); - } - - /// Count characters between two positions. (Scintilla feature 2633) - public int CountCharacters(int start, int end) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_COUNTCHARACTERS, (IntPtr) start, (IntPtr) end); - } - - /// Count code units between two positions. (Scintilla feature 2715) - public int CountCodeUnits(int start, int end) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_COUNTCODEUNITS, (IntPtr) start, (IntPtr) end); - } - - /// Show or hide the horizontal scroll bar. (Scintilla feature 2130) - public void SetHScrollBar(bool visible) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETHSCROLLBAR, new IntPtr(visible ? 1 : 0), (IntPtr) Unused); - } - - /// Is the horizontal scroll bar visible? (Scintilla feature 2131) - public bool GetHScrollBar() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHSCROLLBAR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Show or hide indentation guides. (Scintilla feature 2132) - public void SetIndentationGuides(IndentView indentView) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETINDENTATIONGUIDES, (IntPtr) indentView, (IntPtr) Unused); - } - - /// Are the indentation guides visible? (Scintilla feature 2133) - public IndentView GetIndentationGuides() - { - return (IndentView)Win32.SendMessage(scintilla, SciMsg.SCI_GETINDENTATIONGUIDES, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set the highlighted indentation guide column. - /// 0 = no highlighted guide. - /// (Scintilla feature 2134) - /// - public void SetHighlightGuide(int column) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETHIGHLIGHTGUIDE, (IntPtr) column, (IntPtr) Unused); - } - - /// Get the highlighted indentation guide column. (Scintilla feature 2135) - public int GetHighlightGuide() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHIGHLIGHTGUIDE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get the position after the last visible characters on a line. (Scintilla feature 2136) - public int GetLineEndPosition(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDPOSITION, (IntPtr) line, (IntPtr) Unused); - } - - /// Get the code page used to interpret the bytes of the document as characters. (Scintilla feature 2137) - public int GetCodePage() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCODEPAGE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get the foreground colour of the caret. (Scintilla feature 2138) - public Colour GetCaretFore() - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETFORE, (IntPtr) Unused, (IntPtr) Unused)); - } - - /// In read-only mode? (Scintilla feature 2140) - public bool GetReadOnly() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETREADONLY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the position of the caret. (Scintilla feature 2141) - public void SetCurrentPos(int caret) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCURRENTPOS, (IntPtr) caret, (IntPtr) Unused); - } - - /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2142) - public void SetSelectionStart(int anchor) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONSTART, (IntPtr) anchor, (IntPtr) Unused); - } - - /// Returns the position at the start of the selection. (Scintilla feature 2143) - public int GetSelectionStart() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONSTART, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the position that ends the selection - this becomes the caret. (Scintilla feature 2144) - public void SetSelectionEnd(int caret) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONEND, (IntPtr) caret, (IntPtr) Unused); - } - - /// Returns the position at the end of the selection. (Scintilla feature 2145) - public int GetSelectionEnd() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set caret to a position, while removing any existing selection. (Scintilla feature 2556) - public void SetEmptySelection(int caret) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETEMPTYSELECTION, (IntPtr) caret, (IntPtr) Unused); - } - - /// Sets the print magnification added to the point size of each style for printing. (Scintilla feature 2146) - public void SetPrintMagnification(int magnification) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETPRINTMAGNIFICATION, (IntPtr) magnification, (IntPtr) Unused); - } - - /// Returns the print magnification. (Scintilla feature 2147) - public int GetPrintMagnification() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPRINTMAGNIFICATION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Modify colours when printing for clearer printed text. (Scintilla feature 2148) - public void SetPrintColourMode(PrintOption mode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETPRINTCOLOURMODE, (IntPtr) mode, (IntPtr) Unused); - } - - /// Returns the print colour mode. (Scintilla feature 2149) - public PrintOption GetPrintColourMode() - { - return (PrintOption)Win32.SendMessage(scintilla, SciMsg.SCI_GETPRINTCOLOURMODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Find some text in the document. (Scintilla feature 2150) - public int FindText(FindOption searchFlags, TextToFind ft) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_FINDTEXT, (IntPtr) searchFlags, ft.NativePointer); - } - - /// Retrieve the display line at the top of the display. (Scintilla feature 2152) - public int GetFirstVisibleLine() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFIRSTVISIBLELINE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Retrieve the contents of a line. - /// Returns the length of the line. - /// (Scintilla feature 2153) - /// - public unsafe string GetLine(int line) - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETLINE, (IntPtr) line, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// Returns the number of lines in the document. There is always at least one. (Scintilla feature 2154) - public int GetLineCount() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINECOUNT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the size in pixels of the left margin. (Scintilla feature 2155) - public void SetMarginLeft(int pixelWidth) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINLEFT, (IntPtr) Unused, (IntPtr) pixelWidth); - } - - /// Returns the size in pixels of the left margin. (Scintilla feature 2156) - public int GetMarginLeft() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINLEFT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the size in pixels of the right margin. (Scintilla feature 2157) - public void SetMarginRight(int pixelWidth) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINRIGHT, (IntPtr) Unused, (IntPtr) pixelWidth); - } - - /// Returns the size in pixels of the right margin. (Scintilla feature 2158) - public int GetMarginRight() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINRIGHT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Is the document different from when it was last saved? (Scintilla feature 2159) - public bool GetModify() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMODIFY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Select a range of text. (Scintilla feature 2160) - public void SetSel(int anchor, int caret) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSEL, (IntPtr) anchor, (IntPtr) caret); - } - - /// - /// Retrieve the selected text. - /// Return the length of the text. - /// Result is NUL-terminated. - /// (Scintilla feature 2161) - /// - public unsafe string GetSelText() - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETSELTEXT, (IntPtr) Unused, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// - /// Retrieve a range of text. - /// Return the length of the text. - /// (Scintilla feature 2162) - /// - public int GetTextRange(TextRange tr) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXTRANGE, (IntPtr) Unused, tr.NativePointer); - } - - /// Draw the selection either highlighted or in normal (non-highlighted) style. (Scintilla feature 2163) - public void HideSelection(bool hide) - { - Win32.SendMessage(scintilla, SciMsg.SCI_HIDESELECTION, new IntPtr(hide ? 1 : 0), (IntPtr) Unused); - } - - /// Retrieve the x value of the point in the window where a position is displayed. (Scintilla feature 2164) - public int PointXFromPosition(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POINTXFROMPOSITION, (IntPtr) Unused, (IntPtr) pos); - } - - /// Retrieve the y value of the point in the window where a position is displayed. (Scintilla feature 2165) - public int PointYFromPosition(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POINTYFROMPOSITION, (IntPtr) Unused, (IntPtr) pos); - } - - /// Retrieve the line containing a position. (Scintilla feature 2166) - public int LineFromPosition(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINEFROMPOSITION, (IntPtr) pos, (IntPtr) Unused); - } - - /// Retrieve the position at the start of a line. (Scintilla feature 2167) - public int PositionFromLine(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMLINE, (IntPtr) line, (IntPtr) Unused); - } - - /// Scroll horizontally and vertically. (Scintilla feature 2168) - public void LineScroll(int columns, int lines) - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINESCROLL, (IntPtr) columns, (IntPtr) lines); - } - - /// Ensure the caret is visible. (Scintilla feature 2169) - public void ScrollCaret() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLCARET, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Scroll the argument positions and the range between them into view giving - /// priority to the primary position then the secondary position. - /// This may be used to make a search match visible. - /// (Scintilla feature 2569) - /// - public void ScrollRange(int secondary, int primary) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLRANGE, (IntPtr) secondary, (IntPtr) primary); - } - - /// Replace the selected text with the argument text. (Scintilla feature 2170) - public unsafe void ReplaceSel(string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_REPLACESEL, (IntPtr) Unused, (IntPtr) textPtr); - } - } - - /// Set to read only or read write. (Scintilla feature 2171) - public void SetReadOnly(bool readOnly) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETREADONLY, new IntPtr(readOnly ? 1 : 0), (IntPtr) Unused); - } - - /// Null operation. (Scintilla feature 2172) - public void Null() - { - Win32.SendMessage(scintilla, SciMsg.SCI_NULL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Will a paste succeed? (Scintilla feature 2173) - public bool CanPaste() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_CANPASTE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Are there any undoable actions in the undo history? (Scintilla feature 2174) - public bool CanUndo() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_CANUNDO, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Delete the undo history. (Scintilla feature 2175) - public void EmptyUndoBuffer() - { - Win32.SendMessage(scintilla, SciMsg.SCI_EMPTYUNDOBUFFER, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Undo one action in the undo history. (Scintilla feature 2176) - public void Undo() - { - Win32.SendMessage(scintilla, SciMsg.SCI_UNDO, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Cut the selection to the clipboard. (Scintilla feature 2177) - public void Cut() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CUT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Copy the selection to the clipboard. (Scintilla feature 2178) - public void Copy() - { - Win32.SendMessage(scintilla, SciMsg.SCI_COPY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Paste the contents of the clipboard into the document replacing the selection. (Scintilla feature 2179) - public void Paste() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PASTE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Clear the selection. (Scintilla feature 2180) - public void Clear() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEAR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Replace the contents of the document with the argument text. (Scintilla feature 2181) - public unsafe void SetText(string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTEXT, (IntPtr) Unused, (IntPtr) textPtr); - } - } - - /// - /// Retrieve all the text in the document. - /// Returns number of characters retrieved. - /// Result is NUL-terminated. - /// (Scintilla feature 2182) - /// - public unsafe string GetText(int length) - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXT, (IntPtr) length, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// Retrieve the number of characters in the document. (Scintilla feature 2183) - public int GetTextLength() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXTLENGTH, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Retrieve a pointer to a function that processes messages for this Scintilla. (Scintilla feature 2184) - public IntPtr GetDirectFunction() - { - return Win32.SendMessage(scintilla, SciMsg.SCI_GETDIRECTFUNCTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Retrieve a pointer value to use as the first argument when calling - /// the function returned by GetDirectFunction. - /// (Scintilla feature 2185) - /// - public IntPtr GetDirectPointer() - { - return Win32.SendMessage(scintilla, SciMsg.SCI_GETDIRECTPOINTER, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set to overtype (true) or insert mode. (Scintilla feature 2186) - public void SetOvertype(bool overType) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETOVERTYPE, new IntPtr(overType ? 1 : 0), (IntPtr) Unused); - } - - /// Returns true if overtype mode is active otherwise false is returned. (Scintilla feature 2187) - public bool GetOvertype() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETOVERTYPE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the width of the insert mode caret. (Scintilla feature 2188) - public void SetCaretWidth(int pixelWidth) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETWIDTH, (IntPtr) pixelWidth, (IntPtr) Unused); - } - - /// Returns the width of the insert mode caret. (Scintilla feature 2189) - public int GetCaretWidth() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETWIDTH, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Sets the position that starts the target which is used for updating the - /// document without affecting the scroll position. - /// (Scintilla feature 2190) - /// - public void SetTargetStart(int start) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETSTART, (IntPtr) start, (IntPtr) Unused); - } - - /// Get the position that starts the target. (Scintilla feature 2191) - public int GetTargetStart() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETSTART, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Sets the position that ends the target which is used for updating the - /// document without affecting the scroll position. - /// (Scintilla feature 2192) - /// - public void SetTargetEnd(int end) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETEND, (IntPtr) end, (IntPtr) Unused); - } - - /// Get the position that ends the target. (Scintilla feature 2193) - public int GetTargetEnd() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets both the start and end of the target in one call. (Scintilla feature 2686) - public void SetTargetRange(int start, int end) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETRANGE, (IntPtr) start, (IntPtr) end); - } - - /// Retrieve the text in the target. (Scintilla feature 2687) - public unsafe string GetTargetText() - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETTEXT, (IntPtr) Unused, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// Make the target range start and end be the same as the selection range start and end. (Scintilla feature 2287) - public void TargetFromSelection() - { - Win32.SendMessage(scintilla, SciMsg.SCI_TARGETFROMSELECTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the target to the whole document. (Scintilla feature 2690) - public void TargetWholeDocument() - { - Win32.SendMessage(scintilla, SciMsg.SCI_TARGETWHOLEDOCUMENT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Replace the target text with the argument text. - /// Text is counted so it can contain NULs. - /// Returns the length of the replacement text. - /// (Scintilla feature 2194) - /// - public unsafe int ReplaceTarget(int length, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_REPLACETARGET, (IntPtr) length, (IntPtr) textPtr); - } - } - - /// - /// Replace the target text with the argument text after \d processing. - /// Text is counted so it can contain NULs. - /// Looks for \d where d is between 1 and 9 and replaces these with the strings - /// matched in the last search operation which were surrounded by \( and \). - /// Returns the length of the replacement text including any change - /// caused by processing the \d patterns. - /// (Scintilla feature 2195) - /// - public unsafe int ReplaceTargetRE(int length, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_REPLACETARGETRE, (IntPtr) length, (IntPtr) textPtr); - } - } - - /// - /// Search for a counted string in the target and set the target to the found - /// range. Text is counted so it can contain NULs. - /// Returns start of found range or -1 for failure in which case target is not moved. - /// (Scintilla feature 2197) - /// - public unsafe int SearchInTarget(int length, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHINTARGET, (IntPtr) length, (IntPtr) textPtr); - } - } - - /// Set the search flags used by SearchInTarget. (Scintilla feature 2198) - public void SetSearchFlags(FindOption searchFlags) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSEARCHFLAGS, (IntPtr) searchFlags, (IntPtr) Unused); - } - - /// Get the search flags used by SearchInTarget. (Scintilla feature 2199) - public FindOption GetSearchFlags() - { - return (FindOption)Win32.SendMessage(scintilla, SciMsg.SCI_GETSEARCHFLAGS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Show a call tip containing a definition near position pos. (Scintilla feature 2200) - public unsafe void CallTipShow(int pos, string definition) - { - fixed (byte* definitionPtr = Encoding.UTF8.GetBytes(definition)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSHOW, (IntPtr) pos, (IntPtr) definitionPtr); - } - } - - /// Remove the call tip from the screen. (Scintilla feature 2201) - public void CallTipCancel() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPCANCEL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Is there an active call tip? (Scintilla feature 2202) - public bool CallTipActive() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPACTIVE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Retrieve the position where the caret was before displaying the call tip. (Scintilla feature 2203) - public int CallTipPosStart() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPPOSSTART, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the start position in order to change when backspacing removes the calltip. (Scintilla feature 2214) - public void CallTipSetPosStart(int posStart) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETPOSSTART, (IntPtr) posStart, (IntPtr) Unused); - } - - /// Highlight a segment of the definition. (Scintilla feature 2204) - public void CallTipSetHlt(int highlightStart, int highlightEnd) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETHLT, (IntPtr) highlightStart, (IntPtr) highlightEnd); - } - - /// Set the background colour for the call tip. (Scintilla feature 2205) - public void CallTipSetBack(Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETBACK, back.Value, (IntPtr) Unused); - } - - /// Set the foreground colour for the call tip. (Scintilla feature 2206) - public void CallTipSetFore(Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETFORE, fore.Value, (IntPtr) Unused); - } - - /// Set the foreground colour for the highlighted part of the call tip. (Scintilla feature 2207) - public void CallTipSetForeHlt(Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETFOREHLT, fore.Value, (IntPtr) Unused); - } - - /// Enable use of STYLE_CALLTIP and set call tip tab size in pixels. (Scintilla feature 2212) - public void CallTipUseStyle(int tabSize) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPUSESTYLE, (IntPtr) tabSize, (IntPtr) Unused); - } - - /// Set position of calltip, above or below text. (Scintilla feature 2213) - public void CallTipSetPosition(bool above) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETPOSITION, new IntPtr(above ? 1 : 0), (IntPtr) Unused); - } - - /// Find the display line of a document line taking hidden lines into account. (Scintilla feature 2220) - public int VisibleFromDocLine(int docLine) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_VISIBLEFROMDOCLINE, (IntPtr) docLine, (IntPtr) Unused); - } - - /// Find the document line of a display line taking hidden lines into account. (Scintilla feature 2221) - public int DocLineFromVisible(int displayLine) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_DOCLINEFROMVISIBLE, (IntPtr) displayLine, (IntPtr) Unused); - } - - /// The number of display lines needed to wrap a document line (Scintilla feature 2235) - public int WrapCount(int docLine) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WRAPCOUNT, (IntPtr) docLine, (IntPtr) Unused); - } - - /// - /// Set the fold level of a line. - /// This encodes an integer level along with flags indicating whether the - /// line is a header and whether it is effectively white space. - /// (Scintilla feature 2222) - /// - public void SetFoldLevel(int line, FoldLevel level) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDLEVEL, (IntPtr) line, (IntPtr) level); - } - - /// Retrieve the fold level of a line. (Scintilla feature 2223) - public FoldLevel GetFoldLevel(int line) - { - return (FoldLevel)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDLEVEL, (IntPtr) line, (IntPtr) Unused); - } - - /// Find the last child line of a header line. (Scintilla feature 2224) - public int GetLastChild(int line, FoldLevel level) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLASTCHILD, (IntPtr) line, (IntPtr) level); - } - - /// Find the parent line of a child line. (Scintilla feature 2225) - public int GetFoldParent(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDPARENT, (IntPtr) line, (IntPtr) Unused); - } - - /// Make a range of lines visible. (Scintilla feature 2226) - public void ShowLines(int lineStart, int lineEnd) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SHOWLINES, (IntPtr) lineStart, (IntPtr) lineEnd); - } - - /// Make a range of lines invisible. (Scintilla feature 2227) - public void HideLines(int lineStart, int lineEnd) - { - Win32.SendMessage(scintilla, SciMsg.SCI_HIDELINES, (IntPtr) lineStart, (IntPtr) lineEnd); - } - - /// Is a line visible? (Scintilla feature 2228) - public bool GetLineVisible(int line) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEVISIBLE, (IntPtr) line, (IntPtr) Unused); - } - - /// Are all lines visible? (Scintilla feature 2236) - public bool GetAllLinesVisible() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETALLLINESVISIBLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Show the children of a header line. (Scintilla feature 2229) - public void SetFoldExpanded(int line, bool expanded) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDEXPANDED, (IntPtr) line, new IntPtr(expanded ? 1 : 0)); - } - - /// Is a header line expanded? (Scintilla feature 2230) - public bool GetFoldExpanded(int line) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDEXPANDED, (IntPtr) line, (IntPtr) Unused); - } - - /// Switch a header line between expanded and contracted. (Scintilla feature 2231) - public void ToggleFold(int line) - { - Win32.SendMessage(scintilla, SciMsg.SCI_TOGGLEFOLD, (IntPtr) line, (IntPtr) Unused); - } - - /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature 2700) - public unsafe void ToggleFoldShowText(int line, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_TOGGLEFOLDSHOWTEXT, (IntPtr) line, (IntPtr) textPtr); - } - } - - /// Set the style of fold display text. (Scintilla feature 2701) - public void FoldDisplayTextSetStyle(FoldDisplayTextStyle style) - { - Win32.SendMessage(scintilla, SciMsg.SCI_FOLDDISPLAYTEXTSETSTYLE, (IntPtr) style, (IntPtr) Unused); - } - - /// Get the style of fold display text. (Scintilla feature 2707) - public FoldDisplayTextStyle FoldDisplayTextGetStyle() - { - return (FoldDisplayTextStyle)Win32.SendMessage(scintilla, SciMsg.SCI_FOLDDISPLAYTEXTGETSTYLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the default fold display text. (Scintilla feature 2722) - public unsafe void SetDefaultFoldDisplayText(string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETDEFAULTFOLDDISPLAYTEXT, (IntPtr) Unused, (IntPtr) textPtr); - } - } - - /// Get the default fold display text. (Scintilla feature 2723) - public unsafe string GetDefaultFoldDisplayText() - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETDEFAULTFOLDDISPLAYTEXT, (IntPtr) Unused, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// Expand or contract a fold header. (Scintilla feature 2237) - public void FoldLine(int line, FoldAction action) - { - Win32.SendMessage(scintilla, SciMsg.SCI_FOLDLINE, (IntPtr) line, (IntPtr) action); - } - - /// Expand or contract a fold header and its children. (Scintilla feature 2238) - public void FoldChildren(int line, FoldAction action) - { - Win32.SendMessage(scintilla, SciMsg.SCI_FOLDCHILDREN, (IntPtr) line, (IntPtr) action); - } - - /// Expand a fold header and all children. Use the level argument instead of the line's current level. (Scintilla feature 2239) - public void ExpandChildren(int line, FoldLevel level) - { - Win32.SendMessage(scintilla, SciMsg.SCI_EXPANDCHILDREN, (IntPtr) line, (IntPtr) level); - } - - /// Expand or contract all fold headers. (Scintilla feature 2662) - public void FoldAll(FoldAction action) - { - Win32.SendMessage(scintilla, SciMsg.SCI_FOLDALL, (IntPtr) action, (IntPtr) Unused); - } - - /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature 2232) - public void EnsureVisible(int line) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ENSUREVISIBLE, (IntPtr) line, (IntPtr) Unused); - } - - /// Set automatic folding behaviours. (Scintilla feature 2663) - public void SetAutomaticFold(AutomaticFold automaticFold) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETAUTOMATICFOLD, (IntPtr) automaticFold, (IntPtr) Unused); - } - - /// Get automatic folding behaviours. (Scintilla feature 2664) - public AutomaticFold GetAutomaticFold() - { - return (AutomaticFold)Win32.SendMessage(scintilla, SciMsg.SCI_GETAUTOMATICFOLD, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set some style options for folding. (Scintilla feature 2233) - public void SetFoldFlags(FoldFlag flags) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDFLAGS, (IntPtr) flags, (IntPtr) Unused); - } - - /// - /// Ensure a particular line is visible by expanding any header line hiding it. - /// Use the currently set visibility policy to determine which range to display. - /// (Scintilla feature 2234) - /// - public void EnsureVisibleEnforcePolicy(int line) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ENSUREVISIBLEENFORCEPOLICY, (IntPtr) line, (IntPtr) Unused); - } - - /// Sets whether a tab pressed when caret is within indentation indents. (Scintilla feature 2260) - public void SetTabIndents(bool tabIndents) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTABINDENTS, new IntPtr(tabIndents ? 1 : 0), (IntPtr) Unused); - } - - /// Does a tab pressed when caret is within indentation indent? (Scintilla feature 2261) - public bool GetTabIndents() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTABINDENTS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets whether a backspace pressed when caret is within indentation unindents. (Scintilla feature 2262) - public void SetBackSpaceUnIndents(bool bsUnIndents) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETBACKSPACEUNINDENTS, new IntPtr(bsUnIndents ? 1 : 0), (IntPtr) Unused); - } - - /// Does a backspace pressed when caret is within indentation unindent? (Scintilla feature 2263) - public bool GetBackSpaceUnIndents() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETBACKSPACEUNINDENTS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2264) - public void SetMouseDwellTime(int periodMilliseconds) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMOUSEDWELLTIME, (IntPtr) periodMilliseconds, (IntPtr) Unused); - } - - /// Retrieve the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2265) - public int GetMouseDwellTime() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOUSEDWELLTIME, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get position of start of word. (Scintilla feature 2266) - public int WordStartPosition(int pos, bool onlyWordCharacters) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WORDSTARTPOSITION, (IntPtr) pos, new IntPtr(onlyWordCharacters ? 1 : 0)); - } - - /// Get position of end of word. (Scintilla feature 2267) - public int WordEndPosition(int pos, bool onlyWordCharacters) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WORDENDPOSITION, (IntPtr) pos, new IntPtr(onlyWordCharacters ? 1 : 0)); - } - - /// Is the range start..end considered a word? (Scintilla feature 2691) - public bool IsRangeWord(int start, int end) - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_ISRANGEWORD, (IntPtr) start, (IntPtr) end); - } - - /// Sets limits to idle styling. (Scintilla feature 2692) - public void SetIdleStyling(IdleStyling idleStyling) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETIDLESTYLING, (IntPtr) idleStyling, (IntPtr) Unused); - } - - /// Retrieve the limits to idle styling. (Scintilla feature 2693) - public IdleStyling GetIdleStyling() - { - return (IdleStyling)Win32.SendMessage(scintilla, SciMsg.SCI_GETIDLESTYLING, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets whether text is word wrapped. (Scintilla feature 2268) - public void SetWrapMode(Wrap wrapMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPMODE, (IntPtr) wrapMode, (IntPtr) Unused); - } - - /// Retrieve whether text is word wrapped. (Scintilla feature 2269) - public Wrap GetWrapMode() - { - return (Wrap)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPMODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the display mode of visual flags for wrapped lines. (Scintilla feature 2460) - public void SetWrapVisualFlags(WrapVisualFlag wrapVisualFlags) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPVISUALFLAGS, (IntPtr) wrapVisualFlags, (IntPtr) Unused); - } - - /// Retrive the display mode of visual flags for wrapped lines. (Scintilla feature 2461) - public WrapVisualFlag GetWrapVisualFlags() - { - return (WrapVisualFlag)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPVISUALFLAGS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the location of visual flags for wrapped lines. (Scintilla feature 2462) - public void SetWrapVisualFlagsLocation(WrapVisualLocation wrapVisualFlagsLocation) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPVISUALFLAGSLOCATION, (IntPtr) wrapVisualFlagsLocation, (IntPtr) Unused); - } - - /// Retrive the location of visual flags for wrapped lines. (Scintilla feature 2463) - public WrapVisualLocation GetWrapVisualFlagsLocation() - { - return (WrapVisualLocation)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPVISUALFLAGSLOCATION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the start indent for wrapped lines. (Scintilla feature 2464) - public void SetWrapStartIndent(int indent) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPSTARTINDENT, (IntPtr) indent, (IntPtr) Unused); - } - - /// Retrive the start indent for wrapped lines. (Scintilla feature 2465) - public int GetWrapStartIndent() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPSTARTINDENT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets how wrapped sublines are placed. Default is fixed. (Scintilla feature 2472) - public void SetWrapIndentMode(WrapIndentMode wrapIndentMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPINDENTMODE, (IntPtr) wrapIndentMode, (IntPtr) Unused); - } - - /// Retrieve how wrapped sublines are placed. Default is fixed. (Scintilla feature 2473) - public WrapIndentMode GetWrapIndentMode() - { - return (WrapIndentMode)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPINDENTMODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the degree of caching of layout information. (Scintilla feature 2272) - public void SetLayoutCache(LineCache cacheMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETLAYOUTCACHE, (IntPtr) cacheMode, (IntPtr) Unused); - } - - /// Retrieve the degree of caching of layout information. (Scintilla feature 2273) - public LineCache GetLayoutCache() - { - return (LineCache)Win32.SendMessage(scintilla, SciMsg.SCI_GETLAYOUTCACHE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the document width assumed for scrolling. (Scintilla feature 2274) - public void SetScrollWidth(int pixelWidth) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSCROLLWIDTH, (IntPtr) pixelWidth, (IntPtr) Unused); - } - - /// Retrieve the document width assumed for scrolling. (Scintilla feature 2275) - public int GetScrollWidth() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSCROLLWIDTH, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets whether the maximum width line displayed is used to set scroll width. (Scintilla feature 2516) - public void SetScrollWidthTracking(bool tracking) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSCROLLWIDTHTRACKING, new IntPtr(tracking ? 1 : 0), (IntPtr) Unused); - } - - /// Retrieve whether the scroll width tracks wide lines. (Scintilla feature 2517) - public bool GetScrollWidthTracking() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSCROLLWIDTHTRACKING, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Measure the pixel width of some text in a particular style. - /// NUL terminated text argument. - /// Does not handle tab or control characters. - /// (Scintilla feature 2276) - /// - public unsafe int TextWidth(int style, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_TEXTWIDTH, (IntPtr) style, (IntPtr) textPtr); - } - } - - /// - /// Sets the scroll range so that maximum scroll position has - /// the last line at the bottom of the view (default). - /// Setting this to false allows scrolling one page below the last line. - /// (Scintilla feature 2277) - /// - public void SetEndAtLastLine(bool endAtLastLine) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETENDATLASTLINE, new IntPtr(endAtLastLine ? 1 : 0), (IntPtr) Unused); - } - - /// - /// Retrieve whether the maximum scroll position has the last - /// line at the bottom of the view. - /// (Scintilla feature 2278) - /// - public bool GetEndAtLastLine() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETENDATLASTLINE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Retrieve the height of a particular line of text in pixels. (Scintilla feature 2279) - public int TextHeight(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_TEXTHEIGHT, (IntPtr) line, (IntPtr) Unused); - } - - /// Show or hide the vertical scroll bar. (Scintilla feature 2280) - public void SetVScrollBar(bool visible) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETVSCROLLBAR, new IntPtr(visible ? 1 : 0), (IntPtr) Unused); - } - - /// Is the vertical scroll bar visible? (Scintilla feature 2281) - public bool GetVScrollBar() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETVSCROLLBAR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Append a string to the end of the document without changing the selection. (Scintilla feature 2282) - public unsafe void AppendText(int length, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_APPENDTEXT, (IntPtr) length, (IntPtr) textPtr); - } - } - - /// How many phases is drawing done in? (Scintilla feature 2673) - public PhasesDraw GetPhasesDraw() - { - return (PhasesDraw)Win32.SendMessage(scintilla, SciMsg.SCI_GETPHASESDRAW, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// In one phase draw, text is drawn in a series of rectangular blocks with no overlap. - /// In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. - /// In multiple phase draw, each element is drawn over the whole drawing area, allowing text - /// to overlap from one line to the next. - /// (Scintilla feature 2674) - /// - public void SetPhasesDraw(PhasesDraw phases) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETPHASESDRAW, (IntPtr) phases, (IntPtr) Unused); - } - - /// Choose the quality level for text from the FontQuality enumeration. (Scintilla feature 2611) - public void SetFontQuality(FontQuality fontQuality) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETFONTQUALITY, (IntPtr) fontQuality, (IntPtr) Unused); - } - - /// Retrieve the quality level for text. (Scintilla feature 2612) - public FontQuality GetFontQuality() - { - return (FontQuality)Win32.SendMessage(scintilla, SciMsg.SCI_GETFONTQUALITY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Scroll so that a display line is at the top of the display. (Scintilla feature 2613) - public void SetFirstVisibleLine(int displayLine) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETFIRSTVISIBLELINE, (IntPtr) displayLine, (IntPtr) Unused); - } - - /// Change the effect of pasting when there are multiple selections. (Scintilla feature 2614) - public void SetMultiPaste(MultiPaste multiPaste) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMULTIPASTE, (IntPtr) multiPaste, (IntPtr) Unused); - } - - /// Retrieve the effect of pasting when there are multiple selections. (Scintilla feature 2615) - public MultiPaste GetMultiPaste() - { - return (MultiPaste)Win32.SendMessage(scintilla, SciMsg.SCI_GETMULTIPASTE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Retrieve the value of a tag from a regular expression search. - /// Result is NUL-terminated. - /// (Scintilla feature 2616) - /// - public unsafe string GetTag(int tagNumber) - { - byte[] tagValueBuffer = new byte[10000]; - fixed (byte* tagValuePtr = tagValueBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETTAG, (IntPtr) tagNumber, (IntPtr) tagValuePtr); - return Encoding.UTF8.GetString(tagValueBuffer).TrimEnd('\0'); - } - } - - /// Join the lines in the target. (Scintilla feature 2288) - public void LinesJoin() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINESJOIN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Split the lines in the target into lines that are less wide than pixelWidth - /// where possible. - /// (Scintilla feature 2289) - /// - public void LinesSplit(int pixelWidth) - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINESSPLIT, (IntPtr) pixelWidth, (IntPtr) Unused); - } - - /// Set one of the colours used as a chequerboard pattern in the fold margin (Scintilla feature 2290) - public void SetFoldMarginColour(bool useSetting, Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDMARGINCOLOUR, new IntPtr(useSetting ? 1 : 0), back.Value); - } - - /// Set the other colour used as a chequerboard pattern in the fold margin (Scintilla feature 2291) - public void SetFoldMarginHiColour(bool useSetting, Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDMARGINHICOLOUR, new IntPtr(useSetting ? 1 : 0), fore.Value); - } - - /// Enable or disable accessibility. (Scintilla feature 2702) - public void SetAccessibility(Accessibility accessibility) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETACCESSIBILITY, (IntPtr) accessibility, (IntPtr) Unused); - } - - /// Report accessibility status. (Scintilla feature 2703) - public Accessibility GetAccessibility() - { - return (Accessibility)Win32.SendMessage(scintilla, SciMsg.SCI_GETACCESSIBILITY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret down one line. (Scintilla feature 2300) - public void LineDown() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEDOWN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret down one line extending selection to new caret position. (Scintilla feature 2301) - public void LineDownExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEDOWNEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret up one line. (Scintilla feature 2302) - public void LineUp() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEUP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret up one line extending selection to new caret position. (Scintilla feature 2303) - public void LineUpExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEUPEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret left one character. (Scintilla feature 2304) - public void CharLeft() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CHARLEFT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret left one character extending selection to new caret position. (Scintilla feature 2305) - public void CharLeftExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CHARLEFTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret right one character. (Scintilla feature 2306) - public void CharRight() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CHARRIGHT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret right one character extending selection to new caret position. (Scintilla feature 2307) - public void CharRightExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CHARRIGHTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret left one word. (Scintilla feature 2308) - public void WordLeft() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDLEFT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret left one word extending selection to new caret position. (Scintilla feature 2309) - public void WordLeftExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDLEFTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret right one word. (Scintilla feature 2310) - public void WordRight() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDRIGHT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret right one word extending selection to new caret position. (Scintilla feature 2311) - public void WordRightExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDRIGHTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to first position on line. (Scintilla feature 2312) - public void Home() - { - Win32.SendMessage(scintilla, SciMsg.SCI_HOME, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to first position on line extending selection to new caret position. (Scintilla feature 2313) - public void HomeExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_HOMEEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to last position on line. (Scintilla feature 2314) - public void LineEnd() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to last position on line extending selection to new caret position. (Scintilla feature 2315) - public void LineEndExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to first position in document. (Scintilla feature 2316) - public void DocumentStart() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DOCUMENTSTART, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to first position in document extending selection to new caret position. (Scintilla feature 2317) - public void DocumentStartExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DOCUMENTSTARTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to last position in document. (Scintilla feature 2318) - public void DocumentEnd() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DOCUMENTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to last position in document extending selection to new caret position. (Scintilla feature 2319) - public void DocumentEndExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DOCUMENTENDEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret one page up. (Scintilla feature 2320) - public void PageUp() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PAGEUP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret one page up extending selection to new caret position. (Scintilla feature 2321) - public void PageUpExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PAGEUPEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret one page down. (Scintilla feature 2322) - public void PageDown() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PAGEDOWN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret one page down extending selection to new caret position. (Scintilla feature 2323) - public void PageDownExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PAGEDOWNEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Switch from insert to overtype mode or the reverse. (Scintilla feature 2324) - public void EditToggleOvertype() - { - Win32.SendMessage(scintilla, SciMsg.SCI_EDITTOGGLEOVERTYPE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Cancel any modes such as call tip or auto-completion list display. (Scintilla feature 2325) - public void Cancel() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CANCEL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Delete the selection or if no selection, the character before the caret. (Scintilla feature 2326) - public void DeleteBack() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DELETEBACK, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// If selection is empty or all on one line replace the selection with a tab character. - /// If more than one line selected, indent the lines. - /// (Scintilla feature 2327) - /// - public void Tab() - { - Win32.SendMessage(scintilla, SciMsg.SCI_TAB, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Dedent the selected lines. (Scintilla feature 2328) - public void BackTab() - { - Win32.SendMessage(scintilla, SciMsg.SCI_BACKTAB, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. (Scintilla feature 2329) - public void NewLine() - { - Win32.SendMessage(scintilla, SciMsg.SCI_NEWLINE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Insert a Form Feed character. (Scintilla feature 2330) - public void FormFeed() - { - Win32.SendMessage(scintilla, SciMsg.SCI_FORMFEED, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Move caret to before first visible character on line. - /// If already there move to first character on line. - /// (Scintilla feature 2331) - /// - public void VCHome() - { - Win32.SendMessage(scintilla, SciMsg.SCI_VCHOME, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Like VCHome but extending selection to new caret position. (Scintilla feature 2332) - public void VCHomeExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Magnify the displayed text by increasing the sizes by 1 point. (Scintilla feature 2333) - public void ZoomIn() - { - Win32.SendMessage(scintilla, SciMsg.SCI_ZOOMIN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Make the displayed text smaller by decreasing the sizes by 1 point. (Scintilla feature 2334) - public void ZoomOut() - { - Win32.SendMessage(scintilla, SciMsg.SCI_ZOOMOUT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Delete the word to the left of the caret. (Scintilla feature 2335) - public void DelWordLeft() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DELWORDLEFT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Delete the word to the right of the caret. (Scintilla feature 2336) - public void DelWordRight() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DELWORDRIGHT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Delete the word to the right of the caret, but not the trailing non-word characters. (Scintilla feature 2518) - public void DelWordRightEnd() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DELWORDRIGHTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Cut the line containing the caret. (Scintilla feature 2337) - public void LineCut() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINECUT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Delete the line containing the caret. (Scintilla feature 2338) - public void LineDelete() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEDELETE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Switch the current line with the previous. (Scintilla feature 2339) - public void LineTranspose() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINETRANSPOSE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Reverse order of selected lines. (Scintilla feature 2354) - public void LineReverse() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEREVERSE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Duplicate the current line. (Scintilla feature 2404) - public void LineDuplicate() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEDUPLICATE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Transform the selection to lower case. (Scintilla feature 2340) - public void LowerCase() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LOWERCASE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Transform the selection to upper case. (Scintilla feature 2341) - public void UpperCase() - { - Win32.SendMessage(scintilla, SciMsg.SCI_UPPERCASE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Scroll the document down, keeping the caret visible. (Scintilla feature 2342) - public void LineScrollDown() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINESCROLLDOWN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Scroll the document up, keeping the caret visible. (Scintilla feature 2343) - public void LineScrollUp() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINESCROLLUP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Delete the selection or if no selection, the character before the caret. - /// Will not delete the character before at the start of a line. - /// (Scintilla feature 2344) - /// - public void DeleteBackNotLine() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DELETEBACKNOTLINE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to first position on display line. (Scintilla feature 2345) - public void HomeDisplay() - { - Win32.SendMessage(scintilla, SciMsg.SCI_HOMEDISPLAY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Move caret to first position on display line extending selection to - /// new caret position. - /// (Scintilla feature 2346) - /// - public void HomeDisplayExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_HOMEDISPLAYEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to last position on display line. (Scintilla feature 2347) - public void LineEndDisplay() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDDISPLAY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Move caret to last position on display line extending selection to new - /// caret position. - /// (Scintilla feature 2348) - /// - public void LineEndDisplayExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDDISPLAYEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Like Home but when word-wrap is enabled goes first to start of display line - /// HomeDisplay, then to start of document line Home. - /// (Scintilla feature 2349) - /// - public void HomeWrap() - { - Win32.SendMessage(scintilla, SciMsg.SCI_HOMEWRAP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Like HomeExtend but when word-wrap is enabled extends first to start of display line - /// HomeDisplayExtend, then to start of document line HomeExtend. - /// (Scintilla feature 2450) - /// - public void HomeWrapExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_HOMEWRAPEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Like LineEnd but when word-wrap is enabled goes first to end of display line - /// LineEndDisplay, then to start of document line LineEnd. - /// (Scintilla feature 2451) - /// - public void LineEndWrap() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDWRAP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Like LineEndExtend but when word-wrap is enabled extends first to end of display line - /// LineEndDisplayExtend, then to start of document line LineEndExtend. - /// (Scintilla feature 2452) - /// - public void LineEndWrapExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDWRAPEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Like VCHome but when word-wrap is enabled goes first to start of display line - /// VCHomeDisplay, then behaves like VCHome. - /// (Scintilla feature 2453) - /// - public void VCHomeWrap() - { - Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEWRAP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Like VCHomeExtend but when word-wrap is enabled extends first to start of display line - /// VCHomeDisplayExtend, then behaves like VCHomeExtend. - /// (Scintilla feature 2454) - /// - public void VCHomeWrapExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEWRAPEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Copy the line containing the caret. (Scintilla feature 2455) - public void LineCopy() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINECOPY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move the caret inside current view if it's not there already. (Scintilla feature 2401) - public void MoveCaretInsideView() - { - Win32.SendMessage(scintilla, SciMsg.SCI_MOVECARETINSIDEVIEW, (IntPtr) Unused, (IntPtr) Unused); - } - - /// How many characters are on a line, including end of line characters? (Scintilla feature 2350) - public int LineLength(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINELENGTH, (IntPtr) line, (IntPtr) Unused); - } - - /// Highlight the characters at two positions. (Scintilla feature 2351) - public void BraceHighlight(int posA, int posB) - { - Win32.SendMessage(scintilla, SciMsg.SCI_BRACEHIGHLIGHT, (IntPtr) posA, (IntPtr) posB); - } - - /// Use specified indicator to highlight matching braces instead of changing their style. (Scintilla feature 2498) - public void BraceHighlightIndicator(bool useSetting, int indicator) - { - Win32.SendMessage(scintilla, SciMsg.SCI_BRACEHIGHLIGHTINDICATOR, new IntPtr(useSetting ? 1 : 0), (IntPtr) indicator); - } - - /// Highlight the character at a position indicating there is no matching brace. (Scintilla feature 2352) - public void BraceBadLight(int pos) - { - Win32.SendMessage(scintilla, SciMsg.SCI_BRACEBADLIGHT, (IntPtr) pos, (IntPtr) Unused); - } - - /// Use specified indicator to highlight non matching brace instead of changing its style. (Scintilla feature 2499) - public void BraceBadLightIndicator(bool useSetting, int indicator) - { - Win32.SendMessage(scintilla, SciMsg.SCI_BRACEBADLIGHTINDICATOR, new IntPtr(useSetting ? 1 : 0), (IntPtr) indicator); - } - - /// - /// Find the position of a matching brace or INVALID_POSITION if no match. - /// The maxReStyle must be 0 for now. It may be defined in a future release. - /// (Scintilla feature 2353) - /// - public int BraceMatch(int pos, int maxReStyle) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_BRACEMATCH, (IntPtr) pos, (IntPtr) maxReStyle); - } - - /// Are the end of line characters visible? (Scintilla feature 2355) - public bool GetViewEOL() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETVIEWEOL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Make the end of line characters visible or invisible. (Scintilla feature 2356) - public void SetViewEOL(bool visible) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETVIEWEOL, new IntPtr(visible ? 1 : 0), (IntPtr) Unused); - } - - /// Retrieve a pointer to the document object. (Scintilla feature 2357) - public IntPtr GetDocPointer() - { - return Win32.SendMessage(scintilla, SciMsg.SCI_GETDOCPOINTER, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Change the document object used. (Scintilla feature 2358) - public void SetDocPointer(IntPtr doc) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETDOCPOINTER, (IntPtr) Unused, (IntPtr) doc); - } - - /// Set which document modification events are sent to the container. (Scintilla feature 2359) - public void SetModEventMask(ModificationFlags eventMask) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMODEVENTMASK, (IntPtr) eventMask, (IntPtr) Unused); - } - - /// Retrieve the column number which text should be kept within. (Scintilla feature 2360) - public int GetEdgeColumn() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETEDGECOLUMN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set the column number of the edge. - /// If text goes past the edge then it is highlighted. - /// (Scintilla feature 2361) - /// - public void SetEdgeColumn(int column) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETEDGECOLUMN, (IntPtr) column, (IntPtr) Unused); - } - - /// Retrieve the edge highlight mode. (Scintilla feature 2362) - public EdgeVisualStyle GetEdgeMode() - { - return (EdgeVisualStyle)Win32.SendMessage(scintilla, SciMsg.SCI_GETEDGEMODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that - /// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). - /// (Scintilla feature 2363) - /// - public void SetEdgeMode(EdgeVisualStyle edgeMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETEDGEMODE, (IntPtr) edgeMode, (IntPtr) Unused); - } - - /// Retrieve the colour used in edge indication. (Scintilla feature 2364) - public Colour GetEdgeColour() - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETEDGECOLOUR, (IntPtr) Unused, (IntPtr) Unused)); - } - - /// Change the colour used in edge indication. (Scintilla feature 2365) - public void SetEdgeColour(Colour edgeColour) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETEDGECOLOUR, edgeColour.Value, (IntPtr) Unused); - } - - /// Add a new vertical edge to the view. (Scintilla feature 2694) - public void MultiEdgeAddLine(int column, Colour edgeColour) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MULTIEDGEADDLINE, (IntPtr) column, edgeColour.Value); - } - - /// Clear all vertical edges. (Scintilla feature 2695) - public void MultiEdgeClearAll() - { - Win32.SendMessage(scintilla, SciMsg.SCI_MULTIEDGECLEARALL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the current caret position to be the search anchor. (Scintilla feature 2366) - public void SearchAnchor() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHANCHOR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Find some text starting at the search anchor. - /// Does not ensure the selection is visible. - /// (Scintilla feature 2367) - /// - public unsafe int SearchNext(FindOption searchFlags, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHNEXT, (IntPtr) searchFlags, (IntPtr) textPtr); - } - } - - /// - /// Find some text starting at the search anchor and moving backwards. - /// Does not ensure the selection is visible. - /// (Scintilla feature 2368) - /// - public unsafe int SearchPrev(FindOption searchFlags, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHPREV, (IntPtr) searchFlags, (IntPtr) textPtr); - } - } - - /// Retrieves the number of lines completely visible. (Scintilla feature 2370) - public int LinesOnScreen() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINESONSCREEN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set whether a pop up menu is displayed automatically when the user presses - /// the wrong mouse button on certain areas. - /// (Scintilla feature 2371) - /// - public void UsePopUp(PopUp popUpMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_USEPOPUP, (IntPtr) popUpMode, (IntPtr) Unused); - } - - /// Is the selection rectangular? The alternative is the more common stream selection. (Scintilla feature 2372) - public bool SelectionIsRectangle() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_SELECTIONISRECTANGLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set the zoom level. This number of points is added to the size of all fonts. - /// It may be positive to magnify or negative to reduce. - /// (Scintilla feature 2373) - /// - public void SetZoom(int zoomInPoints) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETZOOM, (IntPtr) zoomInPoints, (IntPtr) Unused); - } - - /// Retrieve the zoom level. (Scintilla feature 2374) - public int GetZoom() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETZOOM, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Create a new document object. - /// Starts with reference count of 1 and not selected into editor. - /// (Scintilla feature 2375) - /// - public IntPtr CreateDocument(int bytes, DocumentOption documentOptions) - { - return Win32.SendMessage(scintilla, SciMsg.SCI_CREATEDOCUMENT, (IntPtr) bytes, (IntPtr) documentOptions); - } - - /// Extend life of document. (Scintilla feature 2376) - public void AddRefDocument(IntPtr doc) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ADDREFDOCUMENT, (IntPtr) Unused, (IntPtr) doc); - } - - /// Release a reference to the document, deleting document if it fades to black. (Scintilla feature 2377) - public void ReleaseDocument(IntPtr doc) - { - Win32.SendMessage(scintilla, SciMsg.SCI_RELEASEDOCUMENT, (IntPtr) Unused, (IntPtr) doc); - } - - /// Get which document options are set. (Scintilla feature 2379) - public DocumentOption GetDocumentOptions() - { - return (DocumentOption)Win32.SendMessage(scintilla, SciMsg.SCI_GETDOCUMENTOPTIONS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get which document modification events are sent to the container. (Scintilla feature 2378) - public ModificationFlags GetModEventMask() - { - return (ModificationFlags)Win32.SendMessage(scintilla, SciMsg.SCI_GETMODEVENTMASK, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set whether command events are sent to the container. (Scintilla feature 2717) - public void SetCommandEvents(bool commandEvents) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCOMMANDEVENTS, new IntPtr(commandEvents ? 1 : 0), (IntPtr) Unused); - } - - /// Get whether command events are sent to the container. (Scintilla feature 2718) - public bool GetCommandEvents() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCOMMANDEVENTS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Change internal focus flag. (Scintilla feature 2380) - public void SetFocus(bool focus) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETFOCUS, new IntPtr(focus ? 1 : 0), (IntPtr) Unused); - } - - /// Get internal focus flag. (Scintilla feature 2381) - public bool GetFocus() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOCUS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Change error status - 0 = OK. (Scintilla feature 2382) - public void SetStatus(Status status) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSTATUS, (IntPtr) status, (IntPtr) Unused); - } - - /// Get error status. (Scintilla feature 2383) - public Status GetStatus() - { - return (Status)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTATUS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set whether the mouse is captured when its button is pressed. (Scintilla feature 2384) - public void SetMouseDownCaptures(bool captures) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMOUSEDOWNCAPTURES, new IntPtr(captures ? 1 : 0), (IntPtr) Unused); - } - - /// Get whether mouse gets captured. (Scintilla feature 2385) - public bool GetMouseDownCaptures() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOUSEDOWNCAPTURES, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set whether the mouse wheel can be active outside the window. (Scintilla feature 2696) - public void SetMouseWheelCaptures(bool captures) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMOUSEWHEELCAPTURES, new IntPtr(captures ? 1 : 0), (IntPtr) Unused); - } - - /// Get whether mouse wheel can be active outside the window. (Scintilla feature 2697) - public bool GetMouseWheelCaptures() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOUSEWHEELCAPTURES, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the cursor to one of the SC_CURSOR* values. (Scintilla feature 2386) - public void SetCursor(CursorShape cursorType) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCURSOR, (IntPtr) cursorType, (IntPtr) Unused); - } - - /// Get cursor type. (Scintilla feature 2387) - public CursorShape GetCursor() - { - return (CursorShape)Win32.SendMessage(scintilla, SciMsg.SCI_GETCURSOR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Change the way control characters are displayed: - /// If symbol is < 32, keep the drawn way, else, use the given character. - /// (Scintilla feature 2388) - /// - public void SetControlCharSymbol(int symbol) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCONTROLCHARSYMBOL, (IntPtr) symbol, (IntPtr) Unused); - } - - /// Get the way control characters are displayed. (Scintilla feature 2389) - public int GetControlCharSymbol() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCONTROLCHARSYMBOL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move to the previous change in capitalisation. (Scintilla feature 2390) - public void WordPartLeft() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDPARTLEFT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Move to the previous change in capitalisation extending selection - /// to new caret position. - /// (Scintilla feature 2391) - /// - public void WordPartLeftExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDPARTLEFTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move to the change next in capitalisation. (Scintilla feature 2392) - public void WordPartRight() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDPARTRIGHT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Move to the next change in capitalisation extending selection - /// to new caret position. - /// (Scintilla feature 2393) - /// - public void WordPartRightExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDPARTRIGHTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set the way the display area is determined when a particular line - /// is to be moved to by Find, FindNext, GotoLine, etc. - /// (Scintilla feature 2394) - /// - public void SetVisiblePolicy(VisiblePolicy visiblePolicy, int visibleSlop) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETVISIBLEPOLICY, (IntPtr) visiblePolicy, (IntPtr) visibleSlop); - } - - /// Delete back from the current position to the start of the line. (Scintilla feature 2395) - public void DelLineLeft() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DELLINELEFT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Delete forwards from the current position to the end of the line. (Scintilla feature 2396) - public void DelLineRight() - { - Win32.SendMessage(scintilla, SciMsg.SCI_DELLINERIGHT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the xOffset (ie, horizontal scroll position). (Scintilla feature 2397) - public void SetXOffset(int xOffset) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETXOFFSET, (IntPtr) xOffset, (IntPtr) Unused); - } - - /// Get the xOffset (ie, horizontal scroll position). (Scintilla feature 2398) - public int GetXOffset() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETXOFFSET, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the last x chosen value to be the caret x position. (Scintilla feature 2399) - public void ChooseCaretX() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CHOOSECARETX, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the focus to this Scintilla widget. (Scintilla feature 2400) - public void GrabFocus() - { - Win32.SendMessage(scintilla, SciMsg.SCI_GRABFOCUS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set the way the caret is kept visible when going sideways. - /// The exclusion zone is given in pixels. - /// (Scintilla feature 2402) - /// - public void SetXCaretPolicy(CaretPolicy caretPolicy, int caretSlop) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETXCARETPOLICY, (IntPtr) caretPolicy, (IntPtr) caretSlop); - } - - /// - /// Set the way the line the caret is on is kept visible. - /// The exclusion zone is given in lines. - /// (Scintilla feature 2403) - /// - public void SetYCaretPolicy(CaretPolicy caretPolicy, int caretSlop) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETYCARETPOLICY, (IntPtr) caretPolicy, (IntPtr) caretSlop); - } - - /// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). (Scintilla feature 2406) - public void SetPrintWrapMode(Wrap wrapMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETPRINTWRAPMODE, (IntPtr) wrapMode, (IntPtr) Unused); - } - - /// Is printing line wrapped? (Scintilla feature 2407) - public Wrap GetPrintWrapMode() - { - return (Wrap)Win32.SendMessage(scintilla, SciMsg.SCI_GETPRINTWRAPMODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set a fore colour for active hotspots. (Scintilla feature 2410) - public void SetHotspotActiveFore(bool useSetting, Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETHOTSPOTACTIVEFORE, new IntPtr(useSetting ? 1 : 0), fore.Value); - } - - /// Get the fore colour for active hotspots. (Scintilla feature 2494) - public Colour GetHotspotActiveFore() - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETHOTSPOTACTIVEFORE, (IntPtr) Unused, (IntPtr) Unused)); - } - - /// Set a back colour for active hotspots. (Scintilla feature 2411) - public void SetHotspotActiveBack(bool useSetting, Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETHOTSPOTACTIVEBACK, new IntPtr(useSetting ? 1 : 0), back.Value); - } - - /// Get the back colour for active hotspots. (Scintilla feature 2495) - public Colour GetHotspotActiveBack() - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETHOTSPOTACTIVEBACK, (IntPtr) Unused, (IntPtr) Unused)); - } - - /// Enable / Disable underlining active hotspots. (Scintilla feature 2412) - public void SetHotspotActiveUnderline(bool underline) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETHOTSPOTACTIVEUNDERLINE, new IntPtr(underline ? 1 : 0), (IntPtr) Unused); - } - - /// Get whether underlining for active hotspots. (Scintilla feature 2496) - public bool GetHotspotActiveUnderline() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHOTSPOTACTIVEUNDERLINE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Limit hotspots to single line so hotspots on two lines don't merge. (Scintilla feature 2421) - public void SetHotspotSingleLine(bool singleLine) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETHOTSPOTSINGLELINE, new IntPtr(singleLine ? 1 : 0), (IntPtr) Unused); - } - - /// Get the HotspotSingleLine property (Scintilla feature 2497) - public bool GetHotspotSingleLine() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHOTSPOTSINGLELINE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret down one paragraph (delimited by empty lines). (Scintilla feature 2413) - public void ParaDown() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PARADOWN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Extend selection down one paragraph (delimited by empty lines). (Scintilla feature 2414) - public void ParaDownExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PARADOWNEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret up one paragraph (delimited by empty lines). (Scintilla feature 2415) - public void ParaUp() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PARAUP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Extend selection up one paragraph (delimited by empty lines). (Scintilla feature 2416) - public void ParaUpExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PARAUPEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Given a valid document position, return the previous position taking code - /// page into account. Returns 0 if passed 0. - /// (Scintilla feature 2417) - /// - public int PositionBefore(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONBEFORE, (IntPtr) pos, (IntPtr) Unused); - } - - /// - /// Given a valid document position, return the next position taking code - /// page into account. Maximum value returned is the last position in the document. - /// (Scintilla feature 2418) - /// - public int PositionAfter(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONAFTER, (IntPtr) pos, (IntPtr) Unused); - } - - /// - /// Given a valid document position, return a position that differs in a number - /// of characters. Returned value is always between 0 and last position in document. - /// (Scintilla feature 2670) - /// - public int PositionRelative(int pos, int relative) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONRELATIVE, (IntPtr) pos, (IntPtr) relative); - } - - /// - /// Given a valid document position, return a position that differs in a number - /// of UTF-16 code units. Returned value is always between 0 and last position in document. - /// The result may point half way (2 bytes) inside a non-BMP character. - /// (Scintilla feature 2716) - /// - public int PositionRelativeCodeUnits(int pos, int relative) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONRELATIVECODEUNITS, (IntPtr) pos, (IntPtr) relative); - } - - /// Copy a range of text to the clipboard. Positions are clipped into the document. (Scintilla feature 2419) - public void CopyRange(int start, int end) - { - Win32.SendMessage(scintilla, SciMsg.SCI_COPYRANGE, (IntPtr) start, (IntPtr) end); - } - - /// Copy argument text to the clipboard. (Scintilla feature 2420) - public unsafe void CopyText(int length, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_COPYTEXT, (IntPtr) length, (IntPtr) textPtr); - } - } - - /// - /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or - /// by lines (SC_SEL_LINES). - /// (Scintilla feature 2422) - /// - public void SetSelectionMode(SelectionMode selectionMode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONMODE, (IntPtr) selectionMode, (IntPtr) Unused); - } - - /// Get the mode of the current selection. (Scintilla feature 2423) - public SelectionMode GetSelectionMode() - { - return (SelectionMode)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONMODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get whether or not regular caret moves will extend or reduce the selection. (Scintilla feature 2706) - public bool GetMoveExtendsSelection() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOVEEXTENDSSELECTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2424) - public int GetLineSelStartPosition(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESELSTARTPOSITION, (IntPtr) line, (IntPtr) Unused); - } - - /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2425) - public int GetLineSelEndPosition(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESELENDPOSITION, (IntPtr) line, (IntPtr) Unused); - } - - /// Move caret down one line, extending rectangular selection to new caret position. (Scintilla feature 2426) - public void LineDownRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEDOWNRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret up one line, extending rectangular selection to new caret position. (Scintilla feature 2427) - public void LineUpRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEUPRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret left one character, extending rectangular selection to new caret position. (Scintilla feature 2428) - public void CharLeftRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CHARLEFTRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret right one character, extending rectangular selection to new caret position. (Scintilla feature 2429) - public void CharRightRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CHARRIGHTRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to first position on line, extending rectangular selection to new caret position. (Scintilla feature 2430) - public void HomeRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_HOMERECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Move caret to before first visible character on line. - /// If already there move to first character on line. - /// In either case, extend rectangular selection to new caret position. - /// (Scintilla feature 2431) - /// - public void VCHomeRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMERECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to last position on line, extending rectangular selection to new caret position. (Scintilla feature 2432) - public void LineEndRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret one page up, extending rectangular selection to new caret position. (Scintilla feature 2433) - public void PageUpRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PAGEUPRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret one page down, extending rectangular selection to new caret position. (Scintilla feature 2434) - public void PageDownRectExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_PAGEDOWNRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to top of page, or one page up if already at top of page. (Scintilla feature 2435) - public void StutteredPageUp() - { - Win32.SendMessage(scintilla, SciMsg.SCI_STUTTEREDPAGEUP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. (Scintilla feature 2436) - public void StutteredPageUpExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_STUTTEREDPAGEUPEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to bottom of page, or one page down if already at bottom of page. (Scintilla feature 2437) - public void StutteredPageDown() - { - Win32.SendMessage(scintilla, SciMsg.SCI_STUTTEREDPAGEDOWN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. (Scintilla feature 2438) - public void StutteredPageDownExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_STUTTEREDPAGEDOWNEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret left one word, position cursor at end of word. (Scintilla feature 2439) - public void WordLeftEnd() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDLEFTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret left one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2440) - public void WordLeftEndExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDLEFTENDEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret right one word, position cursor at end of word. (Scintilla feature 2441) - public void WordRightEnd() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDRIGHTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move caret right one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2442) - public void WordRightEndExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_WORDRIGHTENDEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set the set of characters making up whitespace for when moving or selecting by word. - /// Should be called after SetWordChars. - /// (Scintilla feature 2443) - /// - public unsafe void SetWhitespaceChars(string characters) - { - fixed (byte* charactersPtr = Encoding.UTF8.GetBytes(characters)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETWHITESPACECHARS, (IntPtr) Unused, (IntPtr) charactersPtr); - } - } - - /// Get the set of characters making up whitespace for when moving or selecting by word. (Scintilla feature 2647) - public unsafe string GetWhitespaceChars() - { - byte[] charactersBuffer = new byte[10000]; - fixed (byte* charactersPtr = charactersBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETWHITESPACECHARS, (IntPtr) Unused, (IntPtr) charactersPtr); - return Encoding.UTF8.GetString(charactersBuffer).TrimEnd('\0'); - } - } - - /// - /// Set the set of characters making up punctuation characters - /// Should be called after SetWordChars. - /// (Scintilla feature 2648) - /// - public unsafe void SetPunctuationChars(string characters) - { - fixed (byte* charactersPtr = Encoding.UTF8.GetBytes(characters)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETPUNCTUATIONCHARS, (IntPtr) Unused, (IntPtr) charactersPtr); - } - } - - /// Get the set of characters making up punctuation characters (Scintilla feature 2649) - public unsafe string GetPunctuationChars() - { - byte[] charactersBuffer = new byte[10000]; - fixed (byte* charactersPtr = charactersBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETPUNCTUATIONCHARS, (IntPtr) Unused, (IntPtr) charactersPtr); - return Encoding.UTF8.GetString(charactersBuffer).TrimEnd('\0'); - } - } - - /// Reset the set of characters for whitespace and word characters to the defaults. (Scintilla feature 2444) - public void SetCharsDefault() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCHARSDEFAULT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get currently selected item position in the auto-completion list (Scintilla feature 2445) - public int AutoCGetCurrent() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCURRENT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Get currently selected item text in the auto-completion list - /// Returns the length of the item text - /// Result is NUL-terminated. - /// (Scintilla feature 2610) - /// - public unsafe string AutoCGetCurrentText() - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCURRENTTEXT, (IntPtr) Unused, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. (Scintilla feature 2634) - public void AutoCSetCaseInsensitiveBehaviour(CaseInsensitiveBehaviour behaviour) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, (IntPtr) behaviour, (IntPtr) Unused); - } - - /// Get auto-completion case insensitive behaviour. (Scintilla feature 2635) - public CaseInsensitiveBehaviour AutoCGetCaseInsensitiveBehaviour() - { - return (CaseInsensitiveBehaviour)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Change the effect of autocompleting when there are multiple selections. (Scintilla feature 2636) - public void AutoCSetMulti(MultiAutoComplete multi) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETMULTI, (IntPtr) multi, (IntPtr) Unused); - } - - /// Retrieve the effect of autocompleting when there are multiple selections. (Scintilla feature 2637) - public MultiAutoComplete AutoCGetMulti() - { - return (MultiAutoComplete)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETMULTI, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the way autocompletion lists are ordered. (Scintilla feature 2660) - public void AutoCSetOrder(Ordering order) - { - Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETORDER, (IntPtr) order, (IntPtr) Unused); - } - - /// Get the way autocompletion lists are ordered. (Scintilla feature 2661) - public Ordering AutoCGetOrder() - { - return (Ordering)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETORDER, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Enlarge the document to a particular size of text bytes. (Scintilla feature 2446) - public void Allocate(int bytes) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATE, (IntPtr) bytes, (IntPtr) Unused); - } - - /// - /// Returns the target converted to UTF8. - /// Return the length in bytes. - /// (Scintilla feature 2447) - /// - public unsafe string TargetAsUTF8() - { - byte[] sBuffer = new byte[10000]; - fixed (byte* sPtr = sBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_TARGETASUTF8, (IntPtr) Unused, (IntPtr) sPtr); - return Encoding.UTF8.GetString(sBuffer).TrimEnd('\0'); - } - } - - /// - /// Set the length of the utf8 argument for calling EncodedFromUTF8. - /// Set to -1 and the string will be measured to the first nul. - /// (Scintilla feature 2448) - /// - public void SetLengthForEncode(int bytes) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETLENGTHFORENCODE, (IntPtr) bytes, (IntPtr) Unused); - } - - /// - /// Translates a UTF8 string into the document encoding. - /// Return the length of the result in bytes. - /// On error return 0. - /// (Scintilla feature 2449) - /// - public unsafe string EncodedFromUTF8(string utf8) - { - fixed (byte* utf8Ptr = Encoding.UTF8.GetBytes(utf8)) - { - byte[] encodedBuffer = new byte[10000]; - fixed (byte* encodedPtr = encodedBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ENCODEDFROMUTF8, (IntPtr) utf8Ptr, (IntPtr) encodedPtr); - return Encoding.UTF8.GetString(encodedBuffer).TrimEnd('\0'); - } - } - } - - /// - /// Find the position of a column on a line taking into account tabs and - /// multi-byte characters. If beyond end of line, return line end position. - /// (Scintilla feature 2456) - /// - public int FindColumn(int line, int column) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_FINDCOLUMN, (IntPtr) line, (IntPtr) column); - } - - /// Can the caret preferred x position only be changed by explicit movement commands? (Scintilla feature 2457) - public CaretSticky GetCaretSticky() - { - return (CaretSticky)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETSTICKY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Stop the caret preferred x position changing when the user types. (Scintilla feature 2458) - public void SetCaretSticky(CaretSticky useCaretStickyBehaviour) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETSTICKY, (IntPtr) useCaretStickyBehaviour, (IntPtr) Unused); - } - - /// Switch between sticky and non-sticky: meant to be bound to a key. (Scintilla feature 2459) - public void ToggleCaretSticky() - { - Win32.SendMessage(scintilla, SciMsg.SCI_TOGGLECARETSTICKY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Enable/Disable convert-on-paste for line endings (Scintilla feature 2467) - public void SetPasteConvertEndings(bool convert) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETPASTECONVERTENDINGS, new IntPtr(convert ? 1 : 0), (IntPtr) Unused); - } - - /// Get convert-on-paste setting (Scintilla feature 2468) - public bool GetPasteConvertEndings() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPASTECONVERTENDINGS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Duplicate the selection. If selection empty duplicate the line containing the caret. (Scintilla feature 2469) - public void SelectionDuplicate() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SELECTIONDUPLICATE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set background alpha of the caret line. (Scintilla feature 2470) - public void SetCaretLineBackAlpha(Alpha alpha) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEBACKALPHA, (IntPtr) alpha, (IntPtr) Unused); - } - - /// Get the background alpha of the caret line. (Scintilla feature 2471) - public Alpha GetCaretLineBackAlpha() - { - return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEBACKALPHA, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the style of the caret to be drawn. (Scintilla feature 2512) - public void SetCaretStyle(CaretStyle caretStyle) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETSTYLE, (IntPtr) caretStyle, (IntPtr) Unused); - } - - /// Returns the current style of the caret. (Scintilla feature 2513) - public CaretStyle GetCaretStyle() - { - return (CaretStyle)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETSTYLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the indicator used for IndicatorFillRange and IndicatorClearRange (Scintilla feature 2500) - public void SetIndicatorCurrent(int indicator) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETINDICATORCURRENT, (IntPtr) indicator, (IntPtr) Unused); - } - - /// Get the current indicator (Scintilla feature 2501) - public int GetIndicatorCurrent() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETINDICATORCURRENT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the value used for IndicatorFillRange (Scintilla feature 2502) - public void SetIndicatorValue(int value) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETINDICATORVALUE, (IntPtr) value, (IntPtr) Unused); - } - - /// Get the current indicator value (Scintilla feature 2503) - public int GetIndicatorValue() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETINDICATORVALUE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Turn a indicator on over a range. (Scintilla feature 2504) - public void IndicatorFillRange(int start, int lengthFill) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORFILLRANGE, (IntPtr) start, (IntPtr) lengthFill); - } - - /// Turn a indicator off over a range. (Scintilla feature 2505) - public void IndicatorClearRange(int start, int lengthClear) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORCLEARRANGE, (IntPtr) start, (IntPtr) lengthClear); - } - - /// Are any indicators present at pos? (Scintilla feature 2506) - public int IndicatorAllOnFor(int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORALLONFOR, (IntPtr) pos, (IntPtr) Unused); - } - - /// What value does a particular indicator have at a position? (Scintilla feature 2507) - public int IndicatorValueAt(int indicator, int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORVALUEAT, (IntPtr) indicator, (IntPtr) pos); - } - - /// Where does a particular indicator start? (Scintilla feature 2508) - public int IndicatorStart(int indicator, int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORSTART, (IntPtr) indicator, (IntPtr) pos); - } - - /// Where does a particular indicator end? (Scintilla feature 2509) - public int IndicatorEnd(int indicator, int pos) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATOREND, (IntPtr) indicator, (IntPtr) pos); - } - - /// Set number of entries in position cache (Scintilla feature 2514) - public void SetPositionCache(int size) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETPOSITIONCACHE, (IntPtr) size, (IntPtr) Unused); - } - - /// How many entries are allocated to the position cache? (Scintilla feature 2515) - public int GetPositionCache() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPOSITIONCACHE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Copy the selection, if selection empty copy the line with the caret (Scintilla feature 2519) - public void CopyAllowLine() - { - Win32.SendMessage(scintilla, SciMsg.SCI_COPYALLOWLINE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Compact the document buffer and return a read-only pointer to the - /// characters in the document. - /// (Scintilla feature 2520) - /// - public IntPtr GetCharacterPointer() - { - return Win32.SendMessage(scintilla, SciMsg.SCI_GETCHARACTERPOINTER, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Return a read-only pointer to a range of characters in the document. - /// May move the gap so that the range is contiguous, but will only move up - /// to lengthRange bytes. - /// (Scintilla feature 2643) - /// - public IntPtr GetRangePointer(int start, int lengthRange) - { - return Win32.SendMessage(scintilla, SciMsg.SCI_GETRANGEPOINTER, (IntPtr) start, (IntPtr) lengthRange); - } - - /// - /// Return a position which, to avoid performance costs, should not be within - /// the range of a call to GetRangePointer. - /// (Scintilla feature 2644) - /// - public int GetGapPosition() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETGAPPOSITION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the alpha fill colour of the given indicator. (Scintilla feature 2523) - public void IndicSetAlpha(int indicator, Alpha alpha) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETALPHA, (IntPtr) indicator, (IntPtr) alpha); - } - - /// Get the alpha fill colour of the given indicator. (Scintilla feature 2524) - public Alpha IndicGetAlpha(int indicator) - { - return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETALPHA, (IntPtr) indicator, (IntPtr) Unused); - } - - /// Set the alpha outline colour of the given indicator. (Scintilla feature 2558) - public void IndicSetOutlineAlpha(int indicator, Alpha alpha) - { - Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETOUTLINEALPHA, (IntPtr) indicator, (IntPtr) alpha); - } - - /// Get the alpha outline colour of the given indicator. (Scintilla feature 2559) - public Alpha IndicGetOutlineAlpha(int indicator) - { - return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETOUTLINEALPHA, (IntPtr) indicator, (IntPtr) Unused); - } - - /// Set extra ascent for each line (Scintilla feature 2525) - public void SetExtraAscent(int extraAscent) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETEXTRAASCENT, (IntPtr) extraAscent, (IntPtr) Unused); - } - - /// Get extra ascent for each line (Scintilla feature 2526) - public int GetExtraAscent() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETEXTRAASCENT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set extra descent for each line (Scintilla feature 2527) - public void SetExtraDescent(int extraDescent) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETEXTRADESCENT, (IntPtr) extraDescent, (IntPtr) Unused); - } - - /// Get extra descent for each line (Scintilla feature 2528) - public int GetExtraDescent() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETEXTRADESCENT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Which symbol was defined for markerNumber with MarkerDefine (Scintilla feature 2529) - public int MarkerSymbolDefined(int markerNumber) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSYMBOLDEFINED, (IntPtr) markerNumber, (IntPtr) Unused); - } - - /// Set the text in the text margin for a line (Scintilla feature 2530) - public unsafe void MarginSetText(int line, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETTEXT, (IntPtr) line, (IntPtr) textPtr); - } - } - - /// Get the text in the text margin for a line (Scintilla feature 2531) - public unsafe string MarginGetText(int line) - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETTEXT, (IntPtr) line, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// Set the style number for the text margin for a line (Scintilla feature 2532) - public void MarginSetStyle(int line, int style) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETSTYLE, (IntPtr) line, (IntPtr) style); - } - - /// Get the style number for the text margin for a line (Scintilla feature 2533) - public int MarginGetStyle(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETSTYLE, (IntPtr) line, (IntPtr) Unused); - } - - /// Set the style in the text margin for a line (Scintilla feature 2534) - public unsafe void MarginSetStyles(int line, string styles) - { - fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETSTYLES, (IntPtr) line, (IntPtr) stylesPtr); - } - } - - /// Get the styles in the text margin for a line (Scintilla feature 2535) - public unsafe string MarginGetStyles(int line) - { - byte[] stylesBuffer = new byte[10000]; - fixed (byte* stylesPtr = stylesBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETSTYLES, (IntPtr) line, (IntPtr) stylesPtr); - return Encoding.UTF8.GetString(stylesBuffer).TrimEnd('\0'); - } - } - - /// Clear the margin text on all lines (Scintilla feature 2536) - public void MarginTextClearAll() - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARGINTEXTCLEARALL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get the start of the range of style numbers used for margin text (Scintilla feature 2537) - public void MarginSetStyleOffset(int style) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETSTYLEOFFSET, (IntPtr) style, (IntPtr) Unused); - } - - /// Get the start of the range of style numbers used for margin text (Scintilla feature 2538) - public int MarginGetStyleOffset() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETSTYLEOFFSET, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the margin options. (Scintilla feature 2539) - public void SetMarginOptions(MarginOption marginOptions) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINOPTIONS, (IntPtr) marginOptions, (IntPtr) Unused); - } - - /// Get the margin options. (Scintilla feature 2557) - public MarginOption GetMarginOptions() - { - return (MarginOption)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINOPTIONS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the annotation text for a line (Scintilla feature 2540) - public unsafe void AnnotationSetText(int line, string text) - { - fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETTEXT, (IntPtr) line, (IntPtr) textPtr); - } - } - - /// Get the annotation text for a line (Scintilla feature 2541) - public unsafe string AnnotationGetText(int line) - { - byte[] textBuffer = new byte[10000]; - fixed (byte* textPtr = textBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETTEXT, (IntPtr) line, (IntPtr) textPtr); - return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); - } - } - - /// Set the style number for the annotations for a line (Scintilla feature 2542) - public void AnnotationSetStyle(int line, int style) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETSTYLE, (IntPtr) line, (IntPtr) style); - } - - /// Get the style number for the annotations for a line (Scintilla feature 2543) - public int AnnotationGetStyle(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETSTYLE, (IntPtr) line, (IntPtr) Unused); - } - - /// Set the annotation styles for a line (Scintilla feature 2544) - public unsafe void AnnotationSetStyles(int line, string styles) - { - fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETSTYLES, (IntPtr) line, (IntPtr) stylesPtr); - } - } - - /// Get the annotation styles for a line (Scintilla feature 2545) - public unsafe string AnnotationGetStyles(int line) - { - byte[] stylesBuffer = new byte[10000]; - fixed (byte* stylesPtr = stylesBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETSTYLES, (IntPtr) line, (IntPtr) stylesPtr); - return Encoding.UTF8.GetString(stylesBuffer).TrimEnd('\0'); - } - } - - /// Get the number of annotation lines for a line (Scintilla feature 2546) - public int AnnotationGetLines(int line) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETLINES, (IntPtr) line, (IntPtr) Unused); - } - - /// Clear the annotations from all lines (Scintilla feature 2547) - public void AnnotationClearAll() - { - Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONCLEARALL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the visibility for the annotations for a view (Scintilla feature 2548) - public void AnnotationSetVisible(AnnotationVisible visible) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETVISIBLE, (IntPtr) visible, (IntPtr) Unused); - } - - /// Get the visibility for the annotations for a view (Scintilla feature 2549) - public AnnotationVisible AnnotationGetVisible() - { - return (AnnotationVisible)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETVISIBLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get the start of the range of style numbers used for annotations (Scintilla feature 2550) - public void AnnotationSetStyleOffset(int style) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETSTYLEOFFSET, (IntPtr) style, (IntPtr) Unused); - } - - /// Get the start of the range of style numbers used for annotations (Scintilla feature 2551) - public int AnnotationGetStyleOffset() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETSTYLEOFFSET, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Release all extended (>255) style numbers (Scintilla feature 2552) - public void ReleaseAllExtendedStyles() - { - Win32.SendMessage(scintilla, SciMsg.SCI_RELEASEALLEXTENDEDSTYLES, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Allocate some extended (>255) style numbers and return the start of the range (Scintilla feature 2553) - public int AllocateExtendedStyles(int numberStyles) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATEEXTENDEDSTYLES, (IntPtr) numberStyles, (IntPtr) Unused); - } - - /// Add a container action to the undo stack (Scintilla feature 2560) - public void AddUndoAction(int token, UndoFlags flags) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ADDUNDOACTION, (IntPtr) token, (IntPtr) flags); - } - - /// Find the position of a character from a point within the window. (Scintilla feature 2561) - public int CharPositionFromPoint(int x, int y) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHARPOSITIONFROMPOINT, (IntPtr) x, (IntPtr) y); - } - - /// - /// Find the position of a character from a point within the window. - /// Return INVALID_POSITION if not close to text. - /// (Scintilla feature 2562) - /// - public int CharPositionFromPointClose(int x, int y) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHARPOSITIONFROMPOINTCLOSE, (IntPtr) x, (IntPtr) y); - } - - /// Set whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2668) - public void SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMOUSESELECTIONRECTANGULARSWITCH, new IntPtr(mouseSelectionRectangularSwitch ? 1 : 0), (IntPtr) Unused); - } - - /// Whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2669) - public bool GetMouseSelectionRectangularSwitch() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOUSESELECTIONRECTANGULARSWITCH, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set whether multiple selections can be made (Scintilla feature 2563) - public void SetMultipleSelection(bool multipleSelection) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMULTIPLESELECTION, new IntPtr(multipleSelection ? 1 : 0), (IntPtr) Unused); - } - - /// Whether multiple selections can be made (Scintilla feature 2564) - public bool GetMultipleSelection() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMULTIPLESELECTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set whether typing can be performed into multiple selections (Scintilla feature 2565) - public void SetAdditionalSelectionTyping(bool additionalSelectionTyping) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALSELECTIONTYPING, new IntPtr(additionalSelectionTyping ? 1 : 0), (IntPtr) Unused); - } - - /// Whether typing can be performed into multiple selections (Scintilla feature 2566) - public bool GetAdditionalSelectionTyping() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALSELECTIONTYPING, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set whether additional carets will blink (Scintilla feature 2567) - public void SetAdditionalCaretsBlink(bool additionalCaretsBlink) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALCARETSBLINK, new IntPtr(additionalCaretsBlink ? 1 : 0), (IntPtr) Unused); - } - - /// Whether additional carets will blink (Scintilla feature 2568) - public bool GetAdditionalCaretsBlink() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALCARETSBLINK, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set whether additional carets are visible (Scintilla feature 2608) - public void SetAdditionalCaretsVisible(bool additionalCaretsVisible) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALCARETSVISIBLE, new IntPtr(additionalCaretsVisible ? 1 : 0), (IntPtr) Unused); - } - - /// Whether additional carets are visible (Scintilla feature 2609) - public bool GetAdditionalCaretsVisible() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALCARETSVISIBLE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// How many selections are there? (Scintilla feature 2570) - public int GetSelections() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Is every selected range empty? (Scintilla feature 2650) - public bool GetSelectionEmpty() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONEMPTY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Clear selections to a single empty stream selection (Scintilla feature 2571) - public void ClearSelections() - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEARSELECTIONS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set a simple selection (Scintilla feature 2572) - public void SetSelection(int caret, int anchor) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTION, (IntPtr) caret, (IntPtr) anchor); - } - - /// Add a selection (Scintilla feature 2573) - public void AddSelection(int caret, int anchor) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ADDSELECTION, (IntPtr) caret, (IntPtr) anchor); - } - - /// Drop one selection (Scintilla feature 2671) - public void DropSelectionN(int selection) - { - Win32.SendMessage(scintilla, SciMsg.SCI_DROPSELECTIONN, (IntPtr) selection, (IntPtr) Unused); - } - - /// Set the main selection (Scintilla feature 2574) - public void SetMainSelection(int selection) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETMAINSELECTION, (IntPtr) selection, (IntPtr) Unused); - } - - /// Which selection is the main selection (Scintilla feature 2575) - public int GetMainSelection() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMAINSELECTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the caret position of the nth selection. (Scintilla feature 2576) - public void SetSelectionNCaret(int selection, int caret) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNCARET, (IntPtr) selection, (IntPtr) caret); - } - - /// Return the caret position of the nth selection. (Scintilla feature 2577) - public int GetSelectionNCaret(int selection) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNCARET, (IntPtr) selection, (IntPtr) Unused); - } - - /// Set the anchor position of the nth selection. (Scintilla feature 2578) - public void SetSelectionNAnchor(int selection, int anchor) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNANCHOR, (IntPtr) selection, (IntPtr) anchor); - } - - /// Return the anchor position of the nth selection. (Scintilla feature 2579) - public int GetSelectionNAnchor(int selection) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNANCHOR, (IntPtr) selection, (IntPtr) Unused); - } - - /// Set the virtual space of the caret of the nth selection. (Scintilla feature 2580) - public void SetSelectionNCaretVirtualSpace(int selection, int space) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNCARETVIRTUALSPACE, (IntPtr) selection, (IntPtr) space); - } - - /// Return the virtual space of the caret of the nth selection. (Scintilla feature 2581) - public int GetSelectionNCaretVirtualSpace(int selection) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNCARETVIRTUALSPACE, (IntPtr) selection, (IntPtr) Unused); - } - - /// Set the virtual space of the anchor of the nth selection. (Scintilla feature 2582) - public void SetSelectionNAnchorVirtualSpace(int selection, int space) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNANCHORVIRTUALSPACE, (IntPtr) selection, (IntPtr) space); - } - - /// Return the virtual space of the anchor of the nth selection. (Scintilla feature 2583) - public int GetSelectionNAnchorVirtualSpace(int selection) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNANCHORVIRTUALSPACE, (IntPtr) selection, (IntPtr) Unused); - } - - /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2584) - public void SetSelectionNStart(int selection, int anchor) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNSTART, (IntPtr) selection, (IntPtr) anchor); - } - - /// Returns the position at the start of the selection. (Scintilla feature 2585) - public int GetSelectionNStart(int selection) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNSTART, (IntPtr) selection, (IntPtr) Unused); - } - - /// Sets the position that ends the selection - this becomes the currentPosition. (Scintilla feature 2586) - public void SetSelectionNEnd(int selection, int caret) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNEND, (IntPtr) selection, (IntPtr) caret); - } - - /// Returns the position at the end of the selection. (Scintilla feature 2587) - public int GetSelectionNEnd(int selection) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNEND, (IntPtr) selection, (IntPtr) Unused); - } - - /// Set the caret position of the rectangular selection. (Scintilla feature 2588) - public void SetRectangularSelectionCaret(int caret) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONCARET, (IntPtr) caret, (IntPtr) Unused); - } - - /// Return the caret position of the rectangular selection. (Scintilla feature 2589) - public int GetRectangularSelectionCaret() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONCARET, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the anchor position of the rectangular selection. (Scintilla feature 2590) - public void SetRectangularSelectionAnchor(int anchor) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONANCHOR, (IntPtr) anchor, (IntPtr) Unused); - } - - /// Return the anchor position of the rectangular selection. (Scintilla feature 2591) - public int GetRectangularSelectionAnchor() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONANCHOR, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the virtual space of the caret of the rectangular selection. (Scintilla feature 2592) - public void SetRectangularSelectionCaretVirtualSpace(int space) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE, (IntPtr) space, (IntPtr) Unused); - } - - /// Return the virtual space of the caret of the rectangular selection. (Scintilla feature 2593) - public int GetRectangularSelectionCaretVirtualSpace() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the virtual space of the anchor of the rectangular selection. (Scintilla feature 2594) - public void SetRectangularSelectionAnchorVirtualSpace(int space) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE, (IntPtr) space, (IntPtr) Unused); - } - - /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature 2595) - public int GetRectangularSelectionAnchorVirtualSpace() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set options for virtual space behaviour. (Scintilla feature 2596) - public void SetVirtualSpaceOptions(VirtualSpace virtualSpaceOptions) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETVIRTUALSPACEOPTIONS, (IntPtr) virtualSpaceOptions, (IntPtr) Unused); - } - - /// Return options for virtual space behaviour. (Scintilla feature 2597) - public VirtualSpace GetVirtualSpaceOptions() - { - return (VirtualSpace)Win32.SendMessage(scintilla, SciMsg.SCI_GETVIRTUALSPACEOPTIONS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// On GTK, allow selecting the modifier key to use for mouse-based - /// rectangular selection. Often the window manager requires Alt+Mouse Drag - /// for moving windows. - /// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. - /// (Scintilla feature 2598) - /// - public void SetRectangularSelectionModifier(int modifier) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONMODIFIER, (IntPtr) modifier, (IntPtr) Unused); - } - - /// Get the modifier key used for rectangular selection. (Scintilla feature 2599) - public int GetRectangularSelectionModifier() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONMODIFIER, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Set the foreground colour of additional selections. - /// Must have previously called SetSelFore with non-zero first argument for this to have an effect. - /// (Scintilla feature 2600) - /// - public void SetAdditionalSelFore(Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALSELFORE, fore.Value, (IntPtr) Unused); - } - - /// - /// Set the background colour of additional selections. - /// Must have previously called SetSelBack with non-zero first argument for this to have an effect. - /// (Scintilla feature 2601) - /// - public void SetAdditionalSelBack(Colour back) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALSELBACK, back.Value, (IntPtr) Unused); - } - - /// Set the alpha of the selection. (Scintilla feature 2602) - public void SetAdditionalSelAlpha(Alpha alpha) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALSELALPHA, (IntPtr) alpha, (IntPtr) Unused); - } - - /// Get the alpha of the selection. (Scintilla feature 2603) - public Alpha GetAdditionalSelAlpha() - { - return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALSELALPHA, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the foreground colour of additional carets. (Scintilla feature 2604) - public void SetAdditionalCaretFore(Colour fore) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALCARETFORE, fore.Value, (IntPtr) Unused); - } - - /// Get the foreground colour of additional carets. (Scintilla feature 2605) - public Colour GetAdditionalCaretFore() - { - return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALCARETFORE, (IntPtr) Unused, (IntPtr) Unused)); - } - - /// Set the main selection to the next selection. (Scintilla feature 2606) - public void RotateSelection() - { - Win32.SendMessage(scintilla, SciMsg.SCI_ROTATESELECTION, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Swap that caret and anchor of the main selection. (Scintilla feature 2607) - public void SwapMainAnchorCaret() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SWAPMAINANCHORCARET, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Add the next occurrence of the main selection to the set of selections as main. - /// If the current selection is empty then select word around caret. - /// (Scintilla feature 2688) - /// - public void MultipleSelectAddNext() - { - Win32.SendMessage(scintilla, SciMsg.SCI_MULTIPLESELECTADDNEXT, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Add each occurrence of the main selection in the target to the set of selections. - /// If the current selection is empty then select word around caret. - /// (Scintilla feature 2689) - /// - public void MultipleSelectAddEach() - { - Win32.SendMessage(scintilla, SciMsg.SCI_MULTIPLESELECTADDEACH, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Indicate that the internal state of a lexer has changed over a range and therefore - /// there may be a need to redraw. - /// (Scintilla feature 2617) - /// - public int ChangeLexerState(int start, int end) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHANGELEXERSTATE, (IntPtr) start, (IntPtr) end); - } - - /// - /// Find the next line at or after lineStart that is a contracted fold header line. - /// Return -1 when no more lines. - /// (Scintilla feature 2618) - /// - public int ContractedFoldNext(int lineStart) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CONTRACTEDFOLDNEXT, (IntPtr) lineStart, (IntPtr) Unused); - } - - /// Centre current line in window. (Scintilla feature 2619) - public void VerticalCentreCaret() - { - Win32.SendMessage(scintilla, SciMsg.SCI_VERTICALCENTRECARET, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move the selected lines up one line, shifting the line above after the selection (Scintilla feature 2620) - public void MoveSelectedLinesUp() - { - Win32.SendMessage(scintilla, SciMsg.SCI_MOVESELECTEDLINESUP, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Move the selected lines down one line, shifting the line below before the selection (Scintilla feature 2621) - public void MoveSelectedLinesDown() - { - Win32.SendMessage(scintilla, SciMsg.SCI_MOVESELECTEDLINESDOWN, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the identifier reported as idFrom in notification messages. (Scintilla feature 2622) - public void SetIdentifier(int identifier) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETIDENTIFIER, (IntPtr) identifier, (IntPtr) Unused); - } - - /// Get the identifier. (Scintilla feature 2623) - public int GetIdentifier() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETIDENTIFIER, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the width for future RGBA image data. (Scintilla feature 2624) - public void RGBAImageSetWidth(int width) - { - Win32.SendMessage(scintilla, SciMsg.SCI_RGBAIMAGESETWIDTH, (IntPtr) width, (IntPtr) Unused); - } - - /// Set the height for future RGBA image data. (Scintilla feature 2625) - public void RGBAImageSetHeight(int height) - { - Win32.SendMessage(scintilla, SciMsg.SCI_RGBAIMAGESETHEIGHT, (IntPtr) height, (IntPtr) Unused); - } - - /// Set the scale factor in percent for future RGBA image data. (Scintilla feature 2651) - public void RGBAImageSetScale(int scalePercent) - { - Win32.SendMessage(scintilla, SciMsg.SCI_RGBAIMAGESETSCALE, (IntPtr) scalePercent, (IntPtr) Unused); - } - - /// - /// Define a marker from RGBA data. - /// It has the width and height from RGBAImageSetWidth/Height - /// (Scintilla feature 2626) - /// - public unsafe void MarkerDefineRGBAImage(int markerNumber, string pixels) - { - fixed (byte* pixelsPtr = Encoding.UTF8.GetBytes(pixels)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDEFINERGBAIMAGE, (IntPtr) markerNumber, (IntPtr) pixelsPtr); - } - } - - /// - /// Register an RGBA image for use in autocompletion lists. - /// It has the width and height from RGBAImageSetWidth/Height - /// (Scintilla feature 2627) - /// - public unsafe void RegisterRGBAImage(int type, string pixels) - { - fixed (byte* pixelsPtr = Encoding.UTF8.GetBytes(pixels)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_REGISTERRGBAIMAGE, (IntPtr) type, (IntPtr) pixelsPtr); - } - } - - /// Scroll to start of document. (Scintilla feature 2628) - public void ScrollToStart() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLTOSTART, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Scroll to end of document. (Scintilla feature 2629) - public void ScrollToEnd() - { - Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLTOEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the technology used. (Scintilla feature 2630) - public void SetTechnology(Technology technology) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTECHNOLOGY, (IntPtr) technology, (IntPtr) Unused); - } - - /// Get the tech. (Scintilla feature 2631) - public Technology GetTechnology() - { - return (Technology)Win32.SendMessage(scintilla, SciMsg.SCI_GETTECHNOLOGY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Create an ILoader*. (Scintilla feature 2632) - public IntPtr CreateLoader(int bytes, DocumentOption documentOptions) - { - return Win32.SendMessage(scintilla, SciMsg.SCI_CREATELOADER, (IntPtr) bytes, (IntPtr) documentOptions); - } - - /// On OS X, show a find indicator. (Scintilla feature 2640) - public void FindIndicatorShow(int start, int end) - { - Win32.SendMessage(scintilla, SciMsg.SCI_FINDINDICATORSHOW, (IntPtr) start, (IntPtr) end); - } - - /// On OS X, flash a find indicator, then fade out. (Scintilla feature 2641) - public void FindIndicatorFlash(int start, int end) - { - Win32.SendMessage(scintilla, SciMsg.SCI_FINDINDICATORFLASH, (IntPtr) start, (IntPtr) end); - } - - /// On OS X, hide the find indicator. (Scintilla feature 2642) - public void FindIndicatorHide() - { - Win32.SendMessage(scintilla, SciMsg.SCI_FINDINDICATORHIDE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Move caret to before first visible character on display line. - /// If already there move to first character on display line. - /// (Scintilla feature 2652) - /// - public void VCHomeDisplay() - { - Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEDISPLAY, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Like VCHomeDisplay but extending selection to new caret position. (Scintilla feature 2653) - public void VCHomeDisplayExtend() - { - Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEDISPLAYEXTEND, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Is the caret line always visible? (Scintilla feature 2654) - public bool GetCaretLineVisibleAlways() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEVISIBLEALWAYS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Sets the caret line to always visible. (Scintilla feature 2655) - public void SetCaretLineVisibleAlways(bool alwaysVisible) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEVISIBLEALWAYS, new IntPtr(alwaysVisible ? 1 : 0), (IntPtr) Unused); - } - - /// Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. (Scintilla feature 2656) - public void SetLineEndTypesAllowed(LineEndType lineEndBitSet) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETLINEENDTYPESALLOWED, (IntPtr) lineEndBitSet, (IntPtr) Unused); - } - - /// Get the line end types currently allowed. (Scintilla feature 2657) - public LineEndType GetLineEndTypesAllowed() - { - return (LineEndType)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDTYPESALLOWED, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. (Scintilla feature 2658) - public LineEndType GetLineEndTypesActive() - { - return (LineEndType)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDTYPESACTIVE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the way a character is drawn. (Scintilla feature 2665) - public unsafe void SetRepresentation(string encodedCharacter, string representation) - { - fixed (byte* encodedCharacterPtr = Encoding.UTF8.GetBytes(encodedCharacter)) - { - fixed (byte* representationPtr = Encoding.UTF8.GetBytes(representation)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETREPRESENTATION, (IntPtr) encodedCharacterPtr, (IntPtr) representationPtr); - } - } - } - - /// - /// Set the way a character is drawn. - /// Result is NUL-terminated. - /// (Scintilla feature 2666) - /// - public unsafe string GetRepresentation(string encodedCharacter) - { - fixed (byte* encodedCharacterPtr = Encoding.UTF8.GetBytes(encodedCharacter)) - { - byte[] representationBuffer = new byte[10000]; - fixed (byte* representationPtr = representationBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETREPRESENTATION, (IntPtr) encodedCharacterPtr, (IntPtr) representationPtr); - return Encoding.UTF8.GetString(representationBuffer).TrimEnd('\0'); - } - } - } - - /// Remove a character representation. (Scintilla feature 2667) - public unsafe void ClearRepresentation(string encodedCharacter) - { - fixed (byte* encodedCharacterPtr = Encoding.UTF8.GetBytes(encodedCharacter)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_CLEARREPRESENTATION, (IntPtr) encodedCharacterPtr, (IntPtr) Unused); - } - } - - /// Start notifying the container of all key presses and commands. (Scintilla feature 3001) - public void StartRecord() - { - Win32.SendMessage(scintilla, SciMsg.SCI_STARTRECORD, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Stop notifying the container of all key presses and commands. (Scintilla feature 3002) - public void StopRecord() - { - Win32.SendMessage(scintilla, SciMsg.SCI_STOPRECORD, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the lexing language of the document. (Scintilla feature 4001) - public void SetLexer(int lexer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETLEXER, (IntPtr) lexer, (IntPtr) Unused); - } - - /// Retrieve the lexing language of the document. (Scintilla feature 4002) - public int GetLexer() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLEXER, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Colourise a segment of the document using the current lexing language. (Scintilla feature 4003) - public void Colourise(int start, int end) - { - Win32.SendMessage(scintilla, SciMsg.SCI_COLOURISE, (IntPtr) start, (IntPtr) end); - } - - /// Set up a value that may be used by a lexer for some optional feature. (Scintilla feature 4004) - public unsafe void SetProperty(string key, string value) - { - fixed (byte* keyPtr = Encoding.UTF8.GetBytes(key)) - { - fixed (byte* valuePtr = Encoding.UTF8.GetBytes(value)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETPROPERTY, (IntPtr) keyPtr, (IntPtr) valuePtr); - } - } - } - - /// Set up the key words used by the lexer. (Scintilla feature 4005) - public unsafe void SetKeyWords(int keyWordSet, string keyWords) - { - fixed (byte* keyWordsPtr = Encoding.UTF8.GetBytes(keyWords)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETKEYWORDS, (IntPtr) keyWordSet, (IntPtr) keyWordsPtr); - } - } - - /// Set the lexing language of the document based on string name. (Scintilla feature 4006) - public unsafe void SetLexerLanguage(string language) - { - fixed (byte* languagePtr = Encoding.UTF8.GetBytes(language)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETLEXERLANGUAGE, (IntPtr) Unused, (IntPtr) languagePtr); - } - } - - /// Load a lexer library (dll / so). (Scintilla feature 4007) - public unsafe void LoadLexerLibrary(string path) - { - fixed (byte* pathPtr = Encoding.UTF8.GetBytes(path)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_LOADLEXERLIBRARY, (IntPtr) Unused, (IntPtr) pathPtr); - } - } - - /// - /// Retrieve a "property" value previously set with SetProperty. - /// Result is NUL-terminated. - /// (Scintilla feature 4008) - /// - public unsafe string GetProperty(string key) - { - fixed (byte* keyPtr = Encoding.UTF8.GetBytes(key)) - { - byte[] valueBuffer = new byte[10000]; - fixed (byte* valuePtr = valueBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETPROPERTY, (IntPtr) keyPtr, (IntPtr) valuePtr); - return Encoding.UTF8.GetString(valueBuffer).TrimEnd('\0'); - } - } - } - - /// - /// Retrieve a "property" value previously set with SetProperty, - /// with "$()" variable replacement on returned buffer. - /// Result is NUL-terminated. - /// (Scintilla feature 4009) - /// - public unsafe string GetPropertyExpanded(string key) - { - fixed (byte* keyPtr = Encoding.UTF8.GetBytes(key)) - { - byte[] valueBuffer = new byte[10000]; - fixed (byte* valuePtr = valueBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETPROPERTYEXPANDED, (IntPtr) keyPtr, (IntPtr) valuePtr); - return Encoding.UTF8.GetString(valueBuffer).TrimEnd('\0'); - } - } - } - - /// - /// Retrieve a "property" value previously set with SetProperty, - /// interpreted as an int AFTER any "$()" variable replacement. - /// (Scintilla feature 4010) - /// - public unsafe int GetPropertyInt(string key, int defaultValue) - { - fixed (byte* keyPtr = Encoding.UTF8.GetBytes(key)) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPROPERTYINT, (IntPtr) keyPtr, (IntPtr) defaultValue); - } - } - - /// - /// Retrieve the name of the lexer. - /// Return the length of the text. - /// Result is NUL-terminated. - /// (Scintilla feature 4012) - /// - public unsafe string GetLexerLanguage() - { - byte[] languageBuffer = new byte[10000]; - fixed (byte* languagePtr = languageBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETLEXERLANGUAGE, (IntPtr) Unused, (IntPtr) languagePtr); - return Encoding.UTF8.GetString(languageBuffer).TrimEnd('\0'); - } - } - - /// For private communication between an application and a known lexer. (Scintilla feature 4013) - public IntPtr PrivateLexerCall(int operation, IntPtr pointer) - { - return Win32.SendMessage(scintilla, SciMsg.SCI_PRIVATELEXERCALL, (IntPtr) operation, (IntPtr) pointer); - } - - /// - /// Retrieve a '\n' separated list of properties understood by the current lexer. - /// Result is NUL-terminated. - /// (Scintilla feature 4014) - /// - public unsafe string PropertyNames() - { - byte[] namesBuffer = new byte[10000]; - fixed (byte* namesPtr = namesBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_PROPERTYNAMES, (IntPtr) Unused, (IntPtr) namesPtr); - return Encoding.UTF8.GetString(namesBuffer).TrimEnd('\0'); - } - } - - /// Retrieve the type of a property. (Scintilla feature 4015) - public unsafe TypeProperty PropertyType(string name) - { - fixed (byte* namePtr = Encoding.UTF8.GetBytes(name)) - { - return (TypeProperty)Win32.SendMessage(scintilla, SciMsg.SCI_PROPERTYTYPE, (IntPtr) namePtr, (IntPtr) Unused); - } - } - - /// - /// Describe a property. - /// Result is NUL-terminated. - /// (Scintilla feature 4016) - /// - public unsafe string DescribeProperty(string name) - { - fixed (byte* namePtr = Encoding.UTF8.GetBytes(name)) - { - byte[] descriptionBuffer = new byte[10000]; - fixed (byte* descriptionPtr = descriptionBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_DESCRIBEPROPERTY, (IntPtr) namePtr, (IntPtr) descriptionPtr); - return Encoding.UTF8.GetString(descriptionBuffer).TrimEnd('\0'); - } - } - } - - /// - /// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. - /// Result is NUL-terminated. - /// (Scintilla feature 4017) - /// - public unsafe string DescribeKeyWordSets() - { - byte[] descriptionsBuffer = new byte[10000]; - fixed (byte* descriptionsPtr = descriptionsBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_DESCRIBEKEYWORDSETS, (IntPtr) Unused, (IntPtr) descriptionsPtr); - return Encoding.UTF8.GetString(descriptionsBuffer).TrimEnd('\0'); - } - } - - /// - /// Bit set of LineEndType enumertion for which line ends beyond the standard - /// LF, CR, and CRLF are supported by the lexer. - /// (Scintilla feature 4018) - /// - public int GetLineEndTypesSupported() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDTYPESSUPPORTED, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Allocate a set of sub styles for a particular base style, returning start of range (Scintilla feature 4020) - public int AllocateSubStyles(int styleBase, int numberStyles) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATESUBSTYLES, (IntPtr) styleBase, (IntPtr) numberStyles); - } - - /// The starting style number for the sub styles associated with a base style (Scintilla feature 4021) - public int GetSubStylesStart(int styleBase) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSUBSTYLESSTART, (IntPtr) styleBase, (IntPtr) Unused); - } - - /// The number of sub styles associated with a base style (Scintilla feature 4022) - public int GetSubStylesLength(int styleBase) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSUBSTYLESLENGTH, (IntPtr) styleBase, (IntPtr) Unused); - } - - /// For a sub style, return the base style, else return the argument. (Scintilla feature 4027) - public int GetStyleFromSubStyle(int subStyle) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEFROMSUBSTYLE, (IntPtr) subStyle, (IntPtr) Unused); - } - - /// For a secondary style, return the primary style, else return the argument. (Scintilla feature 4028) - public int GetPrimaryStyleFromStyle(int style) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPRIMARYSTYLEFROMSTYLE, (IntPtr) style, (IntPtr) Unused); - } - - /// Free allocated sub styles (Scintilla feature 4023) - public void FreeSubStyles() - { - Win32.SendMessage(scintilla, SciMsg.SCI_FREESUBSTYLES, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set the identifiers that are shown in a particular style (Scintilla feature 4024) - public unsafe void SetIdentifiers(int style, string identifiers) - { - fixed (byte* identifiersPtr = Encoding.UTF8.GetBytes(identifiers)) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETIDENTIFIERS, (IntPtr) style, (IntPtr) identifiersPtr); - } - } - - /// - /// Where styles are duplicated by a feature such as active/inactive code - /// return the distance between the two types. - /// (Scintilla feature 4025) - /// - public int DistanceToSecondaryStyles() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_DISTANCETOSECONDARYSTYLES, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Get the set of base styles that can be extended with sub styles - /// Result is NUL-terminated. - /// (Scintilla feature 4026) - /// - public unsafe string GetSubStyleBases() - { - byte[] stylesBuffer = new byte[10000]; - fixed (byte* stylesPtr = stylesBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_GETSUBSTYLEBASES, (IntPtr) Unused, (IntPtr) stylesPtr); - return Encoding.UTF8.GetString(stylesBuffer).TrimEnd('\0'); - } - } - - /// Retrieve the number of named styles for the lexer. (Scintilla feature 4029) - public int GetNamedStyles() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETNAMEDSTYLES, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Retrieve the name of a style. - /// Result is NUL-terminated. - /// (Scintilla feature 4030) - /// - public unsafe string NameOfStyle(int style) - { - byte[] nameBuffer = new byte[10000]; - fixed (byte* namePtr = nameBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_NAMEOFSTYLE, (IntPtr) style, (IntPtr) namePtr); - return Encoding.UTF8.GetString(nameBuffer).TrimEnd('\0'); - } - } - - /// - /// Retrieve a ' ' separated list of style tags like "literal quoted string". - /// Result is NUL-terminated. - /// (Scintilla feature 4031) - /// - public unsafe string TagsOfStyle(int style) - { - byte[] tagsBuffer = new byte[10000]; - fixed (byte* tagsPtr = tagsBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_TAGSOFSTYLE, (IntPtr) style, (IntPtr) tagsPtr); - return Encoding.UTF8.GetString(tagsBuffer).TrimEnd('\0'); - } - } - - /// - /// Retrieve a description of a style. - /// Result is NUL-terminated. - /// (Scintilla feature 4032) - /// - public unsafe string DescriptionOfStyle(int style) - { - byte[] descriptionBuffer = new byte[10000]; - fixed (byte* descriptionPtr = descriptionBuffer) - { - Win32.SendMessage(scintilla, SciMsg.SCI_DESCRIPTIONOFSTYLE, (IntPtr) style, (IntPtr) descriptionPtr); - return Encoding.UTF8.GetString(descriptionBuffer).TrimEnd('\0'); - } - } - - /// Retrieve bidirectional text display state. (Scintilla feature 2708) - public Bidirectional GetBidirectional() - { - return (Bidirectional)Win32.SendMessage(scintilla, SciMsg.SCI_GETBIDIRECTIONAL, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Set bidirectional text display state. (Scintilla feature 2709) - public void SetBidirectional(Bidirectional bidirectional) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETBIDIRECTIONAL, (IntPtr) bidirectional, (IntPtr) Unused); - } - - /// Retrieve line character index state. (Scintilla feature 2710) - public LineCharacterIndexType GetLineCharacterIndex() - { - return (LineCharacterIndexType)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINECHARACTERINDEX, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Request line character index be created or its use count increased. (Scintilla feature 2711) - public void AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) - { - Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATELINECHARACTERINDEX, (IntPtr) lineCharacterIndex, (IntPtr) Unused); - } - - /// Decrease use count of line character index and remove if 0. (Scintilla feature 2712) - public void ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) - { - Win32.SendMessage(scintilla, SciMsg.SCI_RELEASELINECHARACTERINDEX, (IntPtr) lineCharacterIndex, (IntPtr) Unused); - } - - /// Retrieve the document line containing a position measured in index units. (Scintilla feature 2713) - public int LineFromIndexPosition(int pos, LineCharacterIndexType lineCharacterIndex) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINEFROMINDEXPOSITION, (IntPtr) pos, (IntPtr) lineCharacterIndex); - } - - /// Retrieve the position measured in index units at the start of a document line. (Scintilla feature 2714) - public int IndexPositionFromLine(int line, LineCharacterIndexType lineCharacterIndex) - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDEXPOSITIONFROMLINE, (IntPtr) line, (IntPtr) lineCharacterIndex); - } - - /// - /// Divide each styling byte into lexical class bits (default: 5) and indicator - /// bits (default: 3). If a lexer requires more than 32 lexical states, then this - /// is used to expand the possible states. - /// (Scintilla feature 2090) - /// - public void SetStyleBits(int bits) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETSTYLEBITS, (IntPtr) bits, (IntPtr) Unused); - } - - /// Retrieve number of bits in style bytes used to hold the lexical state. (Scintilla feature 2091) - public int GetStyleBits() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEBITS, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Retrieve the number of bits the current lexer needs for styling. (Scintilla feature 4011) - public int GetStyleBitsNeeded() - { - return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEBITSNEEDED, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// Deprecated in 3.5.5 - /// Always interpret keyboard input as Unicode - /// (Scintilla feature 2521) - /// - public void SetKeysUnicode(bool keysUnicode) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETKEYSUNICODE, new IntPtr(keysUnicode ? 1 : 0), (IntPtr) Unused); - } - - /// Are keys always interpreted as Unicode? (Scintilla feature 2522) - public bool GetKeysUnicode() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETKEYSUNICODE, (IntPtr) Unused, (IntPtr) Unused); - } - - /// Is drawing done in two phases with backgrounds drawn before foregrounds? (Scintilla feature 2283) - public bool GetTwoPhaseDraw() - { - return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTWOPHASEDRAW, (IntPtr) Unused, (IntPtr) Unused); - } - - /// - /// In twoPhaseDraw mode, drawing is performed in two phases, first the background - /// and then the foreground. This avoids chopping off characters that overlap the next run. - /// (Scintilla feature 2284) - /// - public void SetTwoPhaseDraw(bool twoPhase) - { - Win32.SendMessage(scintilla, SciMsg.SCI_SETTWOPHASEDRAW, new IntPtr(twoPhase ? 1 : 0), (IntPtr) Unused); - } - - /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System; +using System.Runtime.InteropServices; +using System.Text; +using static Kbg.NppPluginNET.PluginInfrastructure.Win32; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + /// + /// This it the plugin-writers primary interface to Notepad++/Scintilla. + /// It takes away all the complexity with command numbers and Int-pointer casting. + /// + /// See http://www.scintilla.org/ScintillaDoc.html for further details. + /// + public class ScintillaGateway : IScintillaGateway + { + private const int Unused = 0; + + private readonly IntPtr scintilla; + + public static readonly int LengthZeroTerminator = "\0".Length; + + + public ScintillaGateway(IntPtr scintilla) + { + this.scintilla = scintilla; + } + + public int GetSelectionLength() + { + var selectionLength = (int) Win32.SendMessage(scintilla, SciMsg.SCI_GETSELTEXT, Unused, Unused) - LengthZeroTerminator; + return selectionLength; + } + + public void AppendTextAndMoveCursor(string text) + { + AppendText(text.Length, text); + GotoPos(GetCurrentPos() + text.Length); + } + + public void InsertTextAndMoveCursor(string text) + { + var currentPos = GetCurrentPos(); + InsertText(currentPos, text); + GotoPos(currentPos + text.Length); + } + + public void SelectCurrentLine() + { + int line = GetCurrentLineNumber(); + SetSelection(PositionFromLine(line), PositionFromLine(line + 1)); + } + + /// + /// clears the selection without changing the position of the cursor + /// + public void ClearSelectionToCursor() + { + var pos = GetCurrentPos(); + SetSelection(pos, pos); + } + + /// + /// Get the current line from the current position + /// + public int GetCurrentLineNumber() + { + return LineFromPosition(GetCurrentPos()); + } + + /// + /// Get the scroll information for the current Scintilla window. + /// + /// Arguments for the scroll information such as tracking + /// Which scroll bar information are you looking for + /// A ScrollInfo struct with information of the current scroll state + public ScrollInfo GetScrollInfo(ScrollInfoMask mask = ScrollInfoMask.SIF_ALL, ScrollInfoBar scrollBar = ScrollInfoBar.SB_BOTH) + { + ScrollInfo scrollInfo = new ScrollInfo(); + scrollInfo.cbSize = (uint)Marshal.SizeOf(scrollInfo); + scrollInfo.fMask = (uint)mask; + Win32.GetScrollInfo(scintilla, (int)scrollBar, ref scrollInfo); + return scrollInfo; + } + + /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ + /// Add text to the document at current position. (Scintilla feature 2001) + public unsafe void AddText(int length, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ADDTEXT, (IntPtr) length, (IntPtr) textPtr); + } + } + + /// Add array of cells to document. (Scintilla feature 2002) + public unsafe void AddStyledText(int length, Cells c) + { + fixed (char* cPtr = c.Value) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ADDSTYLEDTEXT, (IntPtr) length, (IntPtr) cPtr); + } + } + + /// Insert string at a position. (Scintilla feature 2003) + public unsafe void InsertText(int pos, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INSERTTEXT, (IntPtr) pos, (IntPtr) textPtr); + } + } + + /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK (Scintilla feature 2672) + public unsafe void ChangeInsertion(int length, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CHANGEINSERTION, (IntPtr) length, (IntPtr) textPtr); + } + } + + /// Delete all text in the document. (Scintilla feature 2004) + public void ClearAll() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEARALL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Delete a range of text in the document. (Scintilla feature 2645) + public void DeleteRange(int start, int lengthDelete) + { + Win32.SendMessage(scintilla, SciMsg.SCI_DELETERANGE, (IntPtr) start, (IntPtr) lengthDelete); + } + + /// Set all style bytes to 0, remove all folding information. (Scintilla feature 2005) + public void ClearDocumentStyle() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEARDOCUMENTSTYLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Returns the number of bytes in the document. (Scintilla feature 2006) + public int GetLength() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLENGTH, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Returns the character byte at the position. (Scintilla feature 2007) + public int GetCharAt(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCHARAT, (IntPtr) pos, (IntPtr) Unused); + } + + /// Returns the position of the caret. (Scintilla feature 2008) + public int GetCurrentPos() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCURRENTPOS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Returns the position of the opposite end of the selection to the caret. (Scintilla feature 2009) + public int GetAnchor() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETANCHOR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Returns the style byte at the position. (Scintilla feature 2010) + public int GetStyleAt(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEAT, (IntPtr) pos, (IntPtr) Unused); + } + + /// Redoes the next action on the undo history. (Scintilla feature 2011) + public void Redo() + { + Win32.SendMessage(scintilla, SciMsg.SCI_REDO, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Choose between collecting actions into the undo + /// history and discarding them. + /// (Scintilla feature 2012) + /// + public void SetUndoCollection(bool collectUndo) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETUNDOCOLLECTION, new IntPtr(collectUndo ? 1 : 0), (IntPtr) Unused); + } + + /// Select all the text in the document. (Scintilla feature 2013) + public void SelectAll() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SELECTALL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Remember the current position in the undo history as the position + /// at which the document was saved. + /// (Scintilla feature 2014) + /// + public void SetSavePoint() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSAVEPOINT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Retrieve a buffer of cells. + /// Returns the number of bytes in the buffer not including terminating NULs. + /// (Scintilla feature 2015) + /// + public int GetStyledText(TextRange tr) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEDTEXT, (IntPtr) Unused, tr.NativePointer); + } + + /// Are there any redoable actions in the undo history? (Scintilla feature 2016) + public bool CanRedo() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_CANREDO, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Retrieve the line number at which a particular marker is located. (Scintilla feature 2017) + public int MarkerLineFromHandle(int markerHandle) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERLINEFROMHANDLE, (IntPtr) markerHandle, (IntPtr) Unused); + } + + /// Delete a marker. (Scintilla feature 2018) + public void MarkerDeleteHandle(int markerHandle) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDELETEHANDLE, (IntPtr) markerHandle, (IntPtr) Unused); + } + + /// Is undo history being collected? (Scintilla feature 2019) + public bool GetUndoCollection() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETUNDOCOLLECTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Are white space characters currently visible? + /// Returns one of SCWS_* constants. + /// (Scintilla feature 2020) + /// + public WhiteSpace GetViewWS() + { + return (WhiteSpace)Win32.SendMessage(scintilla, SciMsg.SCI_GETVIEWWS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Make white space characters invisible, always visible or visible outside indentation. (Scintilla feature 2021) + public void SetViewWS(WhiteSpace viewWS) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETVIEWWS, (IntPtr) viewWS, (IntPtr) Unused); + } + + /// + /// Retrieve the current tab draw mode. + /// Returns one of SCTD_* constants. + /// (Scintilla feature 2698) + /// + public TabDrawMode GetTabDrawMode() + { + return (TabDrawMode)Win32.SendMessage(scintilla, SciMsg.SCI_GETTABDRAWMODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set how tabs are drawn when visible. (Scintilla feature 2699) + public void SetTabDrawMode(TabDrawMode tabDrawMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTABDRAWMODE, (IntPtr) tabDrawMode, (IntPtr) Unused); + } + + /// Find the position from a point within the window. (Scintilla feature 2022) + public int PositionFromPoint(int x, int y) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMPOINT, (IntPtr) x, (IntPtr) y); + } + + /// + /// Find the position from a point within the window but return + /// INVALID_POSITION if not close to text. + /// (Scintilla feature 2023) + /// + public int PositionFromPointClose(int x, int y) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMPOINTCLOSE, (IntPtr) x, (IntPtr) y); + } + + /// Set caret to start of a line and ensure it is visible. (Scintilla feature 2024) + public void GotoLine(int line) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GOTOLINE, (IntPtr) line, (IntPtr) Unused); + } + + /// Set caret to a position and ensure it is visible. (Scintilla feature 2025) + public void GotoPos(int caret) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GOTOPOS, (IntPtr) caret, (IntPtr) Unused); + } + + /// + /// Set the selection anchor to a position. The anchor is the opposite + /// end of the selection from the caret. + /// (Scintilla feature 2026) + /// + public void SetAnchor(int anchor) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETANCHOR, (IntPtr) anchor, (IntPtr) Unused); + } + + /// + /// Retrieve the text of the line containing the caret. + /// Returns the index of the caret on the line. + /// Result is NUL-terminated. + /// (Scintilla feature 2027) + /// + public unsafe string GetCurLine(int length) + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETCURLINE, (IntPtr) length, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// Retrieve the position of the last correctly styled character. (Scintilla feature 2028) + public int GetEndStyled() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETENDSTYLED, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Convert all line endings in the document to one mode. (Scintilla feature 2029) + public void ConvertEOLs(EndOfLine eolMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CONVERTEOLS, (IntPtr) eolMode, (IntPtr) Unused); + } + + /// Retrieve the current end of line mode - one of CRLF, CR, or LF. (Scintilla feature 2030) + public EndOfLine GetEOLMode() + { + return (EndOfLine)Win32.SendMessage(scintilla, SciMsg.SCI_GETEOLMODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the current end of line mode. (Scintilla feature 2031) + public void SetEOLMode(EndOfLine eolMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETEOLMODE, (IntPtr) eolMode, (IntPtr) Unused); + } + + /// + /// Set the current styling position to start. + /// The unused parameter is no longer used and should be set to 0. + /// (Scintilla feature 2032) + /// + public void StartStyling(int start, int unused) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STARTSTYLING, (IntPtr) start, (IntPtr) unused); + } + + /// + /// Change style from current styling position for length characters to a style + /// and move the current styling position to after this newly styled segment. + /// (Scintilla feature 2033) + /// + public void SetStyling(int length, int style) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSTYLING, (IntPtr) length, (IntPtr) style); + } + + /// Is drawing done first into a buffer or direct to the screen? (Scintilla feature 2034) + public bool GetBufferedDraw() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETBUFFEREDDRAW, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// If drawing is buffered then each line of text is drawn into a bitmap buffer + /// before drawing it to the screen to avoid flicker. + /// (Scintilla feature 2035) + /// + public void SetBufferedDraw(bool buffered) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETBUFFEREDDRAW, new IntPtr(buffered ? 1 : 0), (IntPtr) Unused); + } + + /// Change the visible size of a tab to be a multiple of the width of a space character. (Scintilla feature 2036) + public void SetTabWidth(int tabWidth) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTABWIDTH, (IntPtr) tabWidth, (IntPtr) Unused); + } + + /// Retrieve the visible size of a tab. (Scintilla feature 2121) + public int GetTabWidth() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTABWIDTH, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Clear explicit tabstops on a line. (Scintilla feature 2675) + public void ClearTabStops(int line) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEARTABSTOPS, (IntPtr) line, (IntPtr) Unused); + } + + /// Add an explicit tab stop for a line. (Scintilla feature 2676) + public void AddTabStop(int line, int x) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ADDTABSTOP, (IntPtr) line, (IntPtr) x); + } + + /// Find the next explicit tab stop position on a line after a position. (Scintilla feature 2677) + public int GetNextTabStop(int line, int x) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETNEXTTABSTOP, (IntPtr) line, (IntPtr) x); + } + + /// + /// Set the code page used to interpret the bytes of the document as characters. + /// The SC_CP_UTF8 value can be used to enter Unicode mode. + /// (Scintilla feature 2037) + /// + public void SetCodePage(int codePage) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCODEPAGE, (IntPtr) codePage, (IntPtr) Unused); + } + + /// Is the IME displayed in a window or inline? (Scintilla feature 2678) + public IMEInteraction GetIMEInteraction() + { + return (IMEInteraction)Win32.SendMessage(scintilla, SciMsg.SCI_GETIMEINTERACTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Choose to display the the IME in a winow or inline. (Scintilla feature 2679) + public void SetIMEInteraction(IMEInteraction imeInteraction) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETIMEINTERACTION, (IntPtr) imeInteraction, (IntPtr) Unused); + } + + /// Set the symbol used for a particular marker number. (Scintilla feature 2040) + public void MarkerDefine(int markerNumber, MarkerSymbol markerSymbol) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDEFINE, (IntPtr) markerNumber, (IntPtr) markerSymbol); + } + + /// Set the foreground colour used for a particular marker number. (Scintilla feature 2041) + public void MarkerSetFore(int markerNumber, Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSETFORE, (IntPtr) markerNumber, fore.Value); + } + + /// Set the background colour used for a particular marker number. (Scintilla feature 2042) + public void MarkerSetBack(int markerNumber, Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSETBACK, (IntPtr) markerNumber, back.Value); + } + + /// Set the background colour used for a particular marker number when its folding block is selected. (Scintilla feature 2292) + public void MarkerSetBackSelected(int markerNumber, Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSETBACKSELECTED, (IntPtr) markerNumber, back.Value); + } + + /// Enable/disable highlight for current folding bloc (smallest one that contains the caret) (Scintilla feature 2293) + public void MarkerEnableHighlight(bool enabled) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERENABLEHIGHLIGHT, new IntPtr(enabled ? 1 : 0), (IntPtr) Unused); + } + + /// Add a marker to a line, returning an ID which can be used to find or delete the marker. (Scintilla feature 2043) + public int MarkerAdd(int line, int markerNumber) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERADD, (IntPtr) line, (IntPtr) markerNumber); + } + + /// Delete a marker from a line. (Scintilla feature 2044) + public void MarkerDelete(int line, int markerNumber) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDELETE, (IntPtr) line, (IntPtr) markerNumber); + } + + /// Delete all markers with a particular number from all lines. (Scintilla feature 2045) + public void MarkerDeleteAll(int markerNumber) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDELETEALL, (IntPtr) markerNumber, (IntPtr) Unused); + } + + /// Get a bit mask of all the markers set on a line. (Scintilla feature 2046) + public int MarkerGet(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERGET, (IntPtr) line, (IntPtr) Unused); + } + + /// + /// Find the next line at or after lineStart that includes a marker in mask. + /// Return -1 when no more lines. + /// (Scintilla feature 2047) + /// + public int MarkerNext(int lineStart, int markerMask) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERNEXT, (IntPtr) lineStart, (IntPtr) markerMask); + } + + /// Find the previous line before lineStart that includes a marker in mask. (Scintilla feature 2048) + public int MarkerPrevious(int lineStart, int markerMask) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERPREVIOUS, (IntPtr) lineStart, (IntPtr) markerMask); + } + + /// Define a marker from a pixmap. (Scintilla feature 2049) + public unsafe void MarkerDefinePixmap(int markerNumber, string pixmap) + { + fixed (byte* pixmapPtr = Encoding.UTF8.GetBytes(pixmap)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDEFINEPIXMAP, (IntPtr) markerNumber, (IntPtr) pixmapPtr); + } + } + + /// Add a set of markers to a line. (Scintilla feature 2466) + public void MarkerAddSet(int line, int markerSet) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERADDSET, (IntPtr) line, (IntPtr) markerSet); + } + + /// Set the alpha used for a marker that is drawn in the text area, not the margin. (Scintilla feature 2476) + public void MarkerSetAlpha(int markerNumber, Alpha alpha) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSETALPHA, (IntPtr) markerNumber, (IntPtr) alpha); + } + + /// Set a margin to be either numeric or symbolic. (Scintilla feature 2240) + public void SetMarginTypeN(int margin, MarginType marginType) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINTYPEN, (IntPtr) margin, (IntPtr) marginType); + } + + /// Retrieve the type of a margin. (Scintilla feature 2241) + public MarginType GetMarginTypeN(int margin) + { + return (MarginType)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINTYPEN, (IntPtr) margin, (IntPtr) Unused); + } + + /// Set the width of a margin to a width expressed in pixels. (Scintilla feature 2242) + public void SetMarginWidthN(int margin, int pixelWidth) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINWIDTHN, (IntPtr) margin, (IntPtr) pixelWidth); + } + + /// Retrieve the width of a margin in pixels. (Scintilla feature 2243) + public int GetMarginWidthN(int margin) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINWIDTHN, (IntPtr) margin, (IntPtr) Unused); + } + + /// Set a mask that determines which markers are displayed in a margin. (Scintilla feature 2244) + public void SetMarginMaskN(int margin, int mask) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINMASKN, (IntPtr) margin, (IntPtr) mask); + } + + /// Retrieve the marker mask of a margin. (Scintilla feature 2245) + public int GetMarginMaskN(int margin) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINMASKN, (IntPtr) margin, (IntPtr) Unused); + } + + /// Make a margin sensitive or insensitive to mouse clicks. (Scintilla feature 2246) + public void SetMarginSensitiveN(int margin, bool sensitive) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINSENSITIVEN, (IntPtr) margin, new IntPtr(sensitive ? 1 : 0)); + } + + /// Retrieve the mouse click sensitivity of a margin. (Scintilla feature 2247) + public bool GetMarginSensitiveN(int margin) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINSENSITIVEN, (IntPtr) margin, (IntPtr) Unused); + } + + /// Set the cursor shown when the mouse is inside a margin. (Scintilla feature 2248) + public void SetMarginCursorN(int margin, CursorShape cursor) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINCURSORN, (IntPtr) margin, (IntPtr) cursor); + } + + /// Retrieve the cursor shown in a margin. (Scintilla feature 2249) + public CursorShape GetMarginCursorN(int margin) + { + return (CursorShape)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINCURSORN, (IntPtr) margin, (IntPtr) Unused); + } + + /// Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. (Scintilla feature 2250) + public void SetMarginBackN(int margin, Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINBACKN, (IntPtr) margin, back.Value); + } + + /// Retrieve the background colour of a margin (Scintilla feature 2251) + public Colour GetMarginBackN(int margin) + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINBACKN, (IntPtr) margin, (IntPtr) Unused)); + } + + /// Allocate a non-standard number of margins. (Scintilla feature 2252) + public void SetMargins(int margins) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINS, (IntPtr) margins, (IntPtr) Unused); + } + + /// How many margins are there?. (Scintilla feature 2253) + public int GetMargins() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Clear all the styles and make equivalent to the global default style. (Scintilla feature 2050) + public void StyleClearAll() + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLECLEARALL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the foreground colour of a style. (Scintilla feature 2051) + public void StyleSetFore(int style, Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETFORE, (IntPtr) style, fore.Value); + } + + /// Set the background colour of a style. (Scintilla feature 2052) + public void StyleSetBack(int style, Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETBACK, (IntPtr) style, back.Value); + } + + /// Set a style to be bold or not. (Scintilla feature 2053) + public void StyleSetBold(int style, bool bold) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETBOLD, (IntPtr) style, new IntPtr(bold ? 1 : 0)); + } + + /// Set a style to be italic or not. (Scintilla feature 2054) + public void StyleSetItalic(int style, bool italic) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETITALIC, (IntPtr) style, new IntPtr(italic ? 1 : 0)); + } + + /// Set the size of characters of a style. (Scintilla feature 2055) + public void StyleSetSize(int style, int sizePoints) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETSIZE, (IntPtr) style, (IntPtr) sizePoints); + } + + /// Set the font of a style. (Scintilla feature 2056) + public unsafe void StyleSetFont(int style, string fontName) + { + fixed (byte* fontNamePtr = Encoding.UTF8.GetBytes(fontName)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETFONT, (IntPtr) style, (IntPtr) fontNamePtr); + } + } + + /// Set a style to have its end of line filled or not. (Scintilla feature 2057) + public void StyleSetEOLFilled(int style, bool eolFilled) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETEOLFILLED, (IntPtr) style, new IntPtr(eolFilled ? 1 : 0)); + } + + /// Reset the default style to its state at startup (Scintilla feature 2058) + public void StyleResetDefault() + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLERESETDEFAULT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set a style to be underlined or not. (Scintilla feature 2059) + public void StyleSetUnderline(int style, bool underline) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETUNDERLINE, (IntPtr) style, new IntPtr(underline ? 1 : 0)); + } + + /// Get the foreground colour of a style. (Scintilla feature 2481) + public Colour StyleGetFore(int style) + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETFORE, (IntPtr) style, (IntPtr) Unused)); + } + + /// Get the background colour of a style. (Scintilla feature 2482) + public Colour StyleGetBack(int style) + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETBACK, (IntPtr) style, (IntPtr) Unused)); + } + + /// Get is a style bold or not. (Scintilla feature 2483) + public bool StyleGetBold(int style) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETBOLD, (IntPtr) style, (IntPtr) Unused); + } + + /// Get is a style italic or not. (Scintilla feature 2484) + public bool StyleGetItalic(int style) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETITALIC, (IntPtr) style, (IntPtr) Unused); + } + + /// Get the size of characters of a style. (Scintilla feature 2485) + public int StyleGetSize(int style) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETSIZE, (IntPtr) style, (IntPtr) Unused); + } + + /// + /// Get the font of a style. + /// Returns the length of the fontName + /// Result is NUL-terminated. + /// (Scintilla feature 2486) + /// + public unsafe string StyleGetFont(int style) + { + byte[] fontNameBuffer = new byte[10000]; + fixed (byte* fontNamePtr = fontNameBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETFONT, (IntPtr) style, (IntPtr) fontNamePtr); + return Encoding.UTF8.GetString(fontNameBuffer).TrimEnd('\0'); + } + } + + /// Get is a style to have its end of line filled or not. (Scintilla feature 2487) + public bool StyleGetEOLFilled(int style) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETEOLFILLED, (IntPtr) style, (IntPtr) Unused); + } + + /// Get is a style underlined or not. (Scintilla feature 2488) + public bool StyleGetUnderline(int style) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETUNDERLINE, (IntPtr) style, (IntPtr) Unused); + } + + /// Get is a style mixed case, or to force upper or lower case. (Scintilla feature 2489) + public CaseVisible StyleGetCase(int style) + { + return (CaseVisible)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETCASE, (IntPtr) style, (IntPtr) Unused); + } + + /// Get the character get of the font in a style. (Scintilla feature 2490) + public CharacterSet StyleGetCharacterSet(int style) + { + return (CharacterSet)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETCHARACTERSET, (IntPtr) style, (IntPtr) Unused); + } + + /// Get is a style visible or not. (Scintilla feature 2491) + public bool StyleGetVisible(int style) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETVISIBLE, (IntPtr) style, (IntPtr) Unused); + } + + /// + /// Get is a style changeable or not (read only). + /// Experimental feature, currently buggy. + /// (Scintilla feature 2492) + /// + public bool StyleGetChangeable(int style) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETCHANGEABLE, (IntPtr) style, (IntPtr) Unused); + } + + /// Get is a style a hotspot or not. (Scintilla feature 2493) + public bool StyleGetHotSpot(int style) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETHOTSPOT, (IntPtr) style, (IntPtr) Unused); + } + + /// Set a style to be mixed case, or to force upper or lower case. (Scintilla feature 2060) + public void StyleSetCase(int style, CaseVisible caseVisible) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETCASE, (IntPtr) style, (IntPtr) caseVisible); + } + + /// Set the size of characters of a style. Size is in points multiplied by 100. (Scintilla feature 2061) + public void StyleSetSizeFractional(int style, int sizeHundredthPoints) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETSIZEFRACTIONAL, (IntPtr) style, (IntPtr) sizeHundredthPoints); + } + + /// Get the size of characters of a style in points multiplied by 100 (Scintilla feature 2062) + public int StyleGetSizeFractional(int style) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETSIZEFRACTIONAL, (IntPtr) style, (IntPtr) Unused); + } + + /// Set the weight of characters of a style. (Scintilla feature 2063) + public void StyleSetWeight(int style, FontWeight weight) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETWEIGHT, (IntPtr) style, (IntPtr) weight); + } + + /// Get the weight of characters of a style. (Scintilla feature 2064) + public FontWeight StyleGetWeight(int style) + { + return (FontWeight)Win32.SendMessage(scintilla, SciMsg.SCI_STYLEGETWEIGHT, (IntPtr) style, (IntPtr) Unused); + } + + /// Set the character set of the font in a style. (Scintilla feature 2066) + public void StyleSetCharacterSet(int style, CharacterSet characterSet) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETCHARACTERSET, (IntPtr) style, (IntPtr) characterSet); + } + + /// Set a style to be a hotspot or not. (Scintilla feature 2409) + public void StyleSetHotSpot(int style, bool hotspot) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETHOTSPOT, (IntPtr) style, new IntPtr(hotspot ? 1 : 0)); + } + + /// Set the foreground colour of the main and additional selections and whether to use this setting. (Scintilla feature 2067) + public void SetSelFore(bool useSetting, Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELFORE, new IntPtr(useSetting ? 1 : 0), fore.Value); + } + + /// Set the background colour of the main and additional selections and whether to use this setting. (Scintilla feature 2068) + public void SetSelBack(bool useSetting, Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELBACK, new IntPtr(useSetting ? 1 : 0), back.Value); + } + + /// Get the alpha of the selection. (Scintilla feature 2477) + public Alpha GetSelAlpha() + { + return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELALPHA, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the alpha of the selection. (Scintilla feature 2478) + public void SetSelAlpha(Alpha alpha) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELALPHA, (IntPtr) alpha, (IntPtr) Unused); + } + + /// Is the selection end of line filled? (Scintilla feature 2479) + public bool GetSelEOLFilled() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELEOLFILLED, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the selection to have its end of line filled or not. (Scintilla feature 2480) + public void SetSelEOLFilled(bool filled) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELEOLFILLED, new IntPtr(filled ? 1 : 0), (IntPtr) Unused); + } + + /// Set the foreground colour of the caret. (Scintilla feature 2069) + public void SetCaretFore(Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETFORE, fore.Value, (IntPtr) Unused); + } + + /// When key+modifier combination keyDefinition is pressed perform sciCommand. (Scintilla feature 2070) + public void AssignCmdKey(KeyModifier keyDefinition, int sciCommand) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ASSIGNCMDKEY, keyDefinition.Value, (IntPtr) sciCommand); + } + + /// When key+modifier combination keyDefinition is pressed do nothing. (Scintilla feature 2071) + public void ClearCmdKey(KeyModifier keyDefinition) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEARCMDKEY, keyDefinition.Value, (IntPtr) Unused); + } + + /// Drop all key mappings. (Scintilla feature 2072) + public void ClearAllCmdKeys() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEARALLCMDKEYS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the styles for a segment of the document. (Scintilla feature 2073) + public unsafe void SetStylingEx(int length, string styles) + { + fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSTYLINGEX, (IntPtr) length, (IntPtr) stylesPtr); + } + } + + /// Set a style to be visible or not. (Scintilla feature 2074) + public void StyleSetVisible(int style, bool visible) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETVISIBLE, (IntPtr) style, new IntPtr(visible ? 1 : 0)); + } + + /// Get the time in milliseconds that the caret is on and off. (Scintilla feature 2075) + public int GetCaretPeriod() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETPERIOD, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get the time in milliseconds that the caret is on and off. 0 = steady on. (Scintilla feature 2076) + public void SetCaretPeriod(int periodMilliseconds) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETPERIOD, (IntPtr) periodMilliseconds, (IntPtr) Unused); + } + + /// + /// Set the set of characters making up words for when moving or selecting by word. + /// First sets defaults like SetCharsDefault. + /// (Scintilla feature 2077) + /// + public unsafe void SetWordChars(string characters) + { + fixed (byte* charactersPtr = Encoding.UTF8.GetBytes(characters)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWORDCHARS, (IntPtr) Unused, (IntPtr) charactersPtr); + } + } + + /// + /// Get the set of characters making up words for when moving or selecting by word. + /// Returns the number of characters + /// (Scintilla feature 2646) + /// + public unsafe string GetWordChars() + { + byte[] charactersBuffer = new byte[10000]; + fixed (byte* charactersPtr = charactersBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETWORDCHARS, (IntPtr) Unused, (IntPtr) charactersPtr); + return Encoding.UTF8.GetString(charactersBuffer).TrimEnd('\0'); + } + } + + /// Set the number of characters to have directly indexed categories (Scintilla feature 2720) + public void SetCharacterCategoryOptimization(int countCharacters) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCHARACTERCATEGORYOPTIMIZATION, (IntPtr) countCharacters, (IntPtr) Unused); + } + + /// Get the number of characters to have directly indexed categories (Scintilla feature 2721) + public int GetCharacterCategoryOptimization() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCHARACTERCATEGORYOPTIMIZATION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Start a sequence of actions that is undone and redone as a unit. + /// May be nested. + /// (Scintilla feature 2078) + /// + public void BeginUndoAction() + { + Win32.SendMessage(scintilla, SciMsg.SCI_BEGINUNDOACTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// End a sequence of actions that is undone and redone as a unit. (Scintilla feature 2079) + public void EndUndoAction() + { + Win32.SendMessage(scintilla, SciMsg.SCI_ENDUNDOACTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set an indicator to plain, squiggle or TT. (Scintilla feature 2080) + public void IndicSetStyle(int indicator, IndicatorStyle indicatorStyle) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETSTYLE, (IntPtr) indicator, (IntPtr) indicatorStyle); + } + + /// Retrieve the style of an indicator. (Scintilla feature 2081) + public IndicatorStyle IndicGetStyle(int indicator) + { + return (IndicatorStyle)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETSTYLE, (IntPtr) indicator, (IntPtr) Unused); + } + + /// Set the foreground colour of an indicator. (Scintilla feature 2082) + public void IndicSetFore(int indicator, Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETFORE, (IntPtr) indicator, fore.Value); + } + + /// Retrieve the foreground colour of an indicator. (Scintilla feature 2083) + public Colour IndicGetFore(int indicator) + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETFORE, (IntPtr) indicator, (IntPtr) Unused)); + } + + /// Set an indicator to draw under text or over(default). (Scintilla feature 2510) + public void IndicSetUnder(int indicator, bool under) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETUNDER, (IntPtr) indicator, new IntPtr(under ? 1 : 0)); + } + + /// Retrieve whether indicator drawn under or over text. (Scintilla feature 2511) + public bool IndicGetUnder(int indicator) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETUNDER, (IntPtr) indicator, (IntPtr) Unused); + } + + /// Set a hover indicator to plain, squiggle or TT. (Scintilla feature 2680) + public void IndicSetHoverStyle(int indicator, IndicatorStyle indicatorStyle) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETHOVERSTYLE, (IntPtr) indicator, (IntPtr) indicatorStyle); + } + + /// Retrieve the hover style of an indicator. (Scintilla feature 2681) + public IndicatorStyle IndicGetHoverStyle(int indicator) + { + return (IndicatorStyle)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETHOVERSTYLE, (IntPtr) indicator, (IntPtr) Unused); + } + + /// Set the foreground hover colour of an indicator. (Scintilla feature 2682) + public void IndicSetHoverFore(int indicator, Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETHOVERFORE, (IntPtr) indicator, fore.Value); + } + + /// Retrieve the foreground hover colour of an indicator. (Scintilla feature 2683) + public Colour IndicGetHoverFore(int indicator) + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETHOVERFORE, (IntPtr) indicator, (IntPtr) Unused)); + } + + /// Set the attributes of an indicator. (Scintilla feature 2684) + public void IndicSetFlags(int indicator, IndicFlag flags) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETFLAGS, (IntPtr) indicator, (IntPtr) flags); + } + + /// Retrieve the attributes of an indicator. (Scintilla feature 2685) + public IndicFlag IndicGetFlags(int indicator) + { + return (IndicFlag)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETFLAGS, (IntPtr) indicator, (IntPtr) Unused); + } + + /// Set the foreground colour of all whitespace and whether to use this setting. (Scintilla feature 2084) + public void SetWhitespaceFore(bool useSetting, Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWHITESPACEFORE, new IntPtr(useSetting ? 1 : 0), fore.Value); + } + + /// Set the background colour of all whitespace and whether to use this setting. (Scintilla feature 2085) + public void SetWhitespaceBack(bool useSetting, Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWHITESPACEBACK, new IntPtr(useSetting ? 1 : 0), back.Value); + } + + /// Set the size of the dots used to mark space characters. (Scintilla feature 2086) + public void SetWhitespaceSize(int size) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWHITESPACESIZE, (IntPtr) size, (IntPtr) Unused); + } + + /// Get the size of the dots used to mark space characters. (Scintilla feature 2087) + public int GetWhitespaceSize() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETWHITESPACESIZE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Used to hold extra styling information for each line. (Scintilla feature 2092) + public void SetLineState(int line, int state) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETLINESTATE, (IntPtr) line, (IntPtr) state); + } + + /// Retrieve the extra styling information for a line. (Scintilla feature 2093) + public int GetLineState(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESTATE, (IntPtr) line, (IntPtr) Unused); + } + + /// Retrieve the last line number that has line state. (Scintilla feature 2094) + public int GetMaxLineState() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMAXLINESTATE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Is the background of the line containing the caret in a different colour? (Scintilla feature 2095) + public bool GetCaretLineVisible() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEVISIBLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Display the background of the line containing the caret in a different colour. (Scintilla feature 2096) + public void SetCaretLineVisible(bool show) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEVISIBLE, new IntPtr(show ? 1 : 0), (IntPtr) Unused); + } + + /// Get the colour of the background of the line containing the caret. (Scintilla feature 2097) + public Colour GetCaretLineBack() + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEBACK, (IntPtr) Unused, (IntPtr) Unused)); + } + + /// Set the colour of the background of the line containing the caret. (Scintilla feature 2098) + public void SetCaretLineBack(Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEBACK, back.Value, (IntPtr) Unused); + } + + /// + /// Retrieve the caret line frame width. + /// Width = 0 means this option is disabled. + /// (Scintilla feature 2704) + /// + public int GetCaretLineFrame() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEFRAME, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Display the caret line framed. + /// Set width != 0 to enable this option and width = 0 to disable it. + /// (Scintilla feature 2705) + /// + public void SetCaretLineFrame(int width) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEFRAME, (IntPtr) width, (IntPtr) Unused); + } + + /// + /// Set a style to be changeable or not (read only). + /// Experimental feature, currently buggy. + /// (Scintilla feature 2099) + /// + public void StyleSetChangeable(int style, bool changeable) + { + Win32.SendMessage(scintilla, SciMsg.SCI_STYLESETCHANGEABLE, (IntPtr) style, new IntPtr(changeable ? 1 : 0)); + } + + /// + /// Display a auto-completion list. + /// The lengthEntered parameter indicates how many characters before + /// the caret should be used to provide context. + /// (Scintilla feature 2100) + /// + public unsafe void AutoCShow(int lengthEntered, string itemList) + { + fixed (byte* itemListPtr = Encoding.UTF8.GetBytes(itemList)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSHOW, (IntPtr) lengthEntered, (IntPtr) itemListPtr); + } + } + + /// Remove the auto-completion list from the screen. (Scintilla feature 2101) + public void AutoCCancel() + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCCANCEL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Is there an auto-completion list visible? (Scintilla feature 2102) + public bool AutoCActive() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCACTIVE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Retrieve the position of the caret when the auto-completion list was displayed. (Scintilla feature 2103) + public int AutoCPosStart() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCPOSSTART, (IntPtr) Unused, (IntPtr) Unused); + } + + /// User has selected an item so remove the list and insert the selection. (Scintilla feature 2104) + public void AutoCComplete() + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCCOMPLETE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Define a set of character that when typed cancel the auto-completion list. (Scintilla feature 2105) + public unsafe void AutoCStops(string characterSet) + { + fixed (byte* characterSetPtr = Encoding.UTF8.GetBytes(characterSet)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSTOPS, (IntPtr) Unused, (IntPtr) characterSetPtr); + } + } + + /// + /// Change the separator character in the string setting up an auto-completion list. + /// Default is space but can be changed if items contain space. + /// (Scintilla feature 2106) + /// + public void AutoCSetSeparator(int separatorCharacter) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETSEPARATOR, (IntPtr) separatorCharacter, (IntPtr) Unused); + } + + /// Retrieve the auto-completion list separator character. (Scintilla feature 2107) + public int AutoCGetSeparator() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETSEPARATOR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Select the item in the auto-completion list that starts with a string. (Scintilla feature 2108) + public unsafe void AutoCSelect(string select) + { + fixed (byte* selectPtr = Encoding.UTF8.GetBytes(select)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSELECT, (IntPtr) Unused, (IntPtr) selectPtr); + } + } + + /// + /// Should the auto-completion list be cancelled if the user backspaces to a + /// position before where the box was created. + /// (Scintilla feature 2110) + /// + public void AutoCSetCancelAtStart(bool cancel) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETCANCELATSTART, new IntPtr(cancel ? 1 : 0), (IntPtr) Unused); + } + + /// Retrieve whether auto-completion cancelled by backspacing before start. (Scintilla feature 2111) + public bool AutoCGetCancelAtStart() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCANCELATSTART, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Define a set of characters that when typed will cause the autocompletion to + /// choose the selected item. + /// (Scintilla feature 2112) + /// + public unsafe void AutoCSetFillUps(string characterSet) + { + fixed (byte* characterSetPtr = Encoding.UTF8.GetBytes(characterSet)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETFILLUPS, (IntPtr) Unused, (IntPtr) characterSetPtr); + } + } + + /// Should a single item auto-completion list automatically choose the item. (Scintilla feature 2113) + public void AutoCSetChooseSingle(bool chooseSingle) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETCHOOSESINGLE, new IntPtr(chooseSingle ? 1 : 0), (IntPtr) Unused); + } + + /// Retrieve whether a single item auto-completion list automatically choose the item. (Scintilla feature 2114) + public bool AutoCGetChooseSingle() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCHOOSESINGLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set whether case is significant when performing auto-completion searches. (Scintilla feature 2115) + public void AutoCSetIgnoreCase(bool ignoreCase) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETIGNORECASE, new IntPtr(ignoreCase ? 1 : 0), (IntPtr) Unused); + } + + /// Retrieve state of ignore case flag. (Scintilla feature 2116) + public bool AutoCGetIgnoreCase() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETIGNORECASE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Display a list of strings and send notification when user chooses one. (Scintilla feature 2117) + public unsafe void UserListShow(int listType, string itemList) + { + fixed (byte* itemListPtr = Encoding.UTF8.GetBytes(itemList)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_USERLISTSHOW, (IntPtr) listType, (IntPtr) itemListPtr); + } + } + + /// Set whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2118) + public void AutoCSetAutoHide(bool autoHide) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETAUTOHIDE, new IntPtr(autoHide ? 1 : 0), (IntPtr) Unused); + } + + /// Retrieve whether or not autocompletion is hidden automatically when nothing matches. (Scintilla feature 2119) + public bool AutoCGetAutoHide() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETAUTOHIDE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set whether or not autocompletion deletes any word characters + /// after the inserted text upon completion. + /// (Scintilla feature 2270) + /// + public void AutoCSetDropRestOfWord(bool dropRestOfWord) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETDROPRESTOFWORD, new IntPtr(dropRestOfWord ? 1 : 0), (IntPtr) Unused); + } + + /// + /// Retrieve whether or not autocompletion deletes any word characters + /// after the inserted text upon completion. + /// (Scintilla feature 2271) + /// + public bool AutoCGetDropRestOfWord() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETDROPRESTOFWORD, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Register an XPM image for use in autocompletion lists. (Scintilla feature 2405) + public unsafe void RegisterImage(int type, string xpmData) + { + fixed (byte* xpmDataPtr = Encoding.UTF8.GetBytes(xpmData)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_REGISTERIMAGE, (IntPtr) type, (IntPtr) xpmDataPtr); + } + } + + /// Clear all the registered XPM images. (Scintilla feature 2408) + public void ClearRegisteredImages() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEARREGISTEREDIMAGES, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Retrieve the auto-completion list type-separator character. (Scintilla feature 2285) + public int AutoCGetTypeSeparator() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETTYPESEPARATOR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Change the type-separator character in the string setting up an auto-completion list. + /// Default is '?' but can be changed if items contain '?'. + /// (Scintilla feature 2286) + /// + public void AutoCSetTypeSeparator(int separatorCharacter) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETTYPESEPARATOR, (IntPtr) separatorCharacter, (IntPtr) Unused); + } + + /// + /// Set the maximum width, in characters, of auto-completion and user lists. + /// Set to 0 to autosize to fit longest item, which is the default. + /// (Scintilla feature 2208) + /// + public void AutoCSetMaxWidth(int characterCount) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETMAXWIDTH, (IntPtr) characterCount, (IntPtr) Unused); + } + + /// Get the maximum width, in characters, of auto-completion and user lists. (Scintilla feature 2209) + public int AutoCGetMaxWidth() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETMAXWIDTH, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set the maximum height, in rows, of auto-completion and user lists. + /// The default is 5 rows. + /// (Scintilla feature 2210) + /// + public void AutoCSetMaxHeight(int rowCount) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETMAXHEIGHT, (IntPtr) rowCount, (IntPtr) Unused); + } + + /// Set the maximum height, in rows, of auto-completion and user lists. (Scintilla feature 2211) + public int AutoCGetMaxHeight() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETMAXHEIGHT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the number of spaces used for one level of indentation. (Scintilla feature 2122) + public void SetIndent(int indentSize) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETINDENT, (IntPtr) indentSize, (IntPtr) Unused); + } + + /// Retrieve indentation size. (Scintilla feature 2123) + public int GetIndent() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETINDENT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Indentation will only use space characters if useTabs is false, otherwise + /// it will use a combination of tabs and spaces. + /// (Scintilla feature 2124) + /// + public void SetUseTabs(bool useTabs) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETUSETABS, new IntPtr(useTabs ? 1 : 0), (IntPtr) Unused); + } + + /// Retrieve whether tabs will be used in indentation. (Scintilla feature 2125) + public bool GetUseTabs() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETUSETABS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Change the indentation of a line to a number of columns. (Scintilla feature 2126) + public void SetLineIndentation(int line, int indentation) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETLINEINDENTATION, (IntPtr) line, (IntPtr) indentation); + } + + /// Retrieve the number of columns that a line is indented. (Scintilla feature 2127) + public int GetLineIndentation(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEINDENTATION, (IntPtr) line, (IntPtr) Unused); + } + + /// Retrieve the position before the first non indentation character on a line. (Scintilla feature 2128) + public int GetLineIndentPosition(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEINDENTPOSITION, (IntPtr) line, (IntPtr) Unused); + } + + /// Retrieve the column number of a position, taking tab width into account. (Scintilla feature 2129) + public int GetColumn(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCOLUMN, (IntPtr) pos, (IntPtr) Unused); + } + + /// Count characters between two positions. (Scintilla feature 2633) + public int CountCharacters(int start, int end) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_COUNTCHARACTERS, (IntPtr) start, (IntPtr) end); + } + + /// Count code units between two positions. (Scintilla feature 2715) + public int CountCodeUnits(int start, int end) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_COUNTCODEUNITS, (IntPtr) start, (IntPtr) end); + } + + /// Show or hide the horizontal scroll bar. (Scintilla feature 2130) + public void SetHScrollBar(bool visible) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETHSCROLLBAR, new IntPtr(visible ? 1 : 0), (IntPtr) Unused); + } + + /// Is the horizontal scroll bar visible? (Scintilla feature 2131) + public bool GetHScrollBar() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHSCROLLBAR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Show or hide indentation guides. (Scintilla feature 2132) + public void SetIndentationGuides(IndentView indentView) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETINDENTATIONGUIDES, (IntPtr) indentView, (IntPtr) Unused); + } + + /// Are the indentation guides visible? (Scintilla feature 2133) + public IndentView GetIndentationGuides() + { + return (IndentView)Win32.SendMessage(scintilla, SciMsg.SCI_GETINDENTATIONGUIDES, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set the highlighted indentation guide column. + /// 0 = no highlighted guide. + /// (Scintilla feature 2134) + /// + public void SetHighlightGuide(int column) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETHIGHLIGHTGUIDE, (IntPtr) column, (IntPtr) Unused); + } + + /// Get the highlighted indentation guide column. (Scintilla feature 2135) + public int GetHighlightGuide() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHIGHLIGHTGUIDE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get the position after the last visible characters on a line. (Scintilla feature 2136) + public int GetLineEndPosition(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDPOSITION, (IntPtr) line, (IntPtr) Unused); + } + + /// Get the code page used to interpret the bytes of the document as characters. (Scintilla feature 2137) + public int GetCodePage() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCODEPAGE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get the foreground colour of the caret. (Scintilla feature 2138) + public Colour GetCaretFore() + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETFORE, (IntPtr) Unused, (IntPtr) Unused)); + } + + /// In read-only mode? (Scintilla feature 2140) + public bool GetReadOnly() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETREADONLY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the position of the caret. (Scintilla feature 2141) + public void SetCurrentPos(int caret) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCURRENTPOS, (IntPtr) caret, (IntPtr) Unused); + } + + /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2142) + public void SetSelectionStart(int anchor) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONSTART, (IntPtr) anchor, (IntPtr) Unused); + } + + /// Returns the position at the start of the selection. (Scintilla feature 2143) + public int GetSelectionStart() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONSTART, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the position that ends the selection - this becomes the caret. (Scintilla feature 2144) + public void SetSelectionEnd(int caret) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONEND, (IntPtr) caret, (IntPtr) Unused); + } + + /// Returns the position at the end of the selection. (Scintilla feature 2145) + public int GetSelectionEnd() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set caret to a position, while removing any existing selection. (Scintilla feature 2556) + public void SetEmptySelection(int caret) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETEMPTYSELECTION, (IntPtr) caret, (IntPtr) Unused); + } + + /// Sets the print magnification added to the point size of each style for printing. (Scintilla feature 2146) + public void SetPrintMagnification(int magnification) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETPRINTMAGNIFICATION, (IntPtr) magnification, (IntPtr) Unused); + } + + /// Returns the print magnification. (Scintilla feature 2147) + public int GetPrintMagnification() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPRINTMAGNIFICATION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Modify colours when printing for clearer printed text. (Scintilla feature 2148) + public void SetPrintColourMode(PrintOption mode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETPRINTCOLOURMODE, (IntPtr) mode, (IntPtr) Unused); + } + + /// Returns the print colour mode. (Scintilla feature 2149) + public PrintOption GetPrintColourMode() + { + return (PrintOption)Win32.SendMessage(scintilla, SciMsg.SCI_GETPRINTCOLOURMODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Find some text in the document. (Scintilla feature 2150) + public int FindText(FindOption searchFlags, TextToFind ft) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_FINDTEXT, (IntPtr) searchFlags, ft.NativePointer); + } + + /// Retrieve the display line at the top of the display. (Scintilla feature 2152) + public int GetFirstVisibleLine() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFIRSTVISIBLELINE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Retrieve the contents of a line. + /// Returns the length of the line. + /// (Scintilla feature 2153) + /// + public unsafe string GetLine(int line) + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETLINE, (IntPtr) line, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// Returns the number of lines in the document. There is always at least one. (Scintilla feature 2154) + public int GetLineCount() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINECOUNT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the size in pixels of the left margin. (Scintilla feature 2155) + public void SetMarginLeft(int pixelWidth) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINLEFT, (IntPtr) Unused, (IntPtr) pixelWidth); + } + + /// Returns the size in pixels of the left margin. (Scintilla feature 2156) + public int GetMarginLeft() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINLEFT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the size in pixels of the right margin. (Scintilla feature 2157) + public void SetMarginRight(int pixelWidth) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINRIGHT, (IntPtr) Unused, (IntPtr) pixelWidth); + } + + /// Returns the size in pixels of the right margin. (Scintilla feature 2158) + public int GetMarginRight() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINRIGHT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Is the document different from when it was last saved? (Scintilla feature 2159) + public bool GetModify() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMODIFY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Select a range of text. (Scintilla feature 2160) + public void SetSel(int anchor, int caret) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSEL, (IntPtr) anchor, (IntPtr) caret); + } + + /// + /// Retrieve the selected text. + /// Return the length of the text. + /// Result is NUL-terminated. + /// (Scintilla feature 2161) + /// + public unsafe string GetSelText() + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETSELTEXT, (IntPtr) Unused, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// + /// Retrieve a range of text. + /// Return the length of the text. + /// (Scintilla feature 2162) + /// + public int GetTextRange(TextRange tr) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXTRANGE, (IntPtr) Unused, tr.NativePointer); + } + + /// Draw the selection either highlighted or in normal (non-highlighted) style. (Scintilla feature 2163) + public void HideSelection(bool hide) + { + Win32.SendMessage(scintilla, SciMsg.SCI_HIDESELECTION, new IntPtr(hide ? 1 : 0), (IntPtr) Unused); + } + + /// Retrieve the x value of the point in the window where a position is displayed. (Scintilla feature 2164) + public int PointXFromPosition(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POINTXFROMPOSITION, (IntPtr) Unused, (IntPtr) pos); + } + + /// Retrieve the y value of the point in the window where a position is displayed. (Scintilla feature 2165) + public int PointYFromPosition(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POINTYFROMPOSITION, (IntPtr) Unused, (IntPtr) pos); + } + + /// Retrieve the line containing a position. (Scintilla feature 2166) + public int LineFromPosition(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINEFROMPOSITION, (IntPtr) pos, (IntPtr) Unused); + } + + /// Retrieve the position at the start of a line. (Scintilla feature 2167) + public int PositionFromLine(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONFROMLINE, (IntPtr) line, (IntPtr) Unused); + } + + /// Scroll horizontally and vertically. (Scintilla feature 2168) + public void LineScroll(int columns, int lines) + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINESCROLL, (IntPtr) columns, (IntPtr) lines); + } + + /// Ensure the caret is visible. (Scintilla feature 2169) + public void ScrollCaret() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLCARET, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Scroll the argument positions and the range between them into view giving + /// priority to the primary position then the secondary position. + /// This may be used to make a search match visible. + /// (Scintilla feature 2569) + /// + public void ScrollRange(int secondary, int primary) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLRANGE, (IntPtr) secondary, (IntPtr) primary); + } + + /// Replace the selected text with the argument text. (Scintilla feature 2170) + public unsafe void ReplaceSel(string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_REPLACESEL, (IntPtr) Unused, (IntPtr) textPtr); + } + } + + /// Set to read only or read write. (Scintilla feature 2171) + public void SetReadOnly(bool readOnly) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETREADONLY, new IntPtr(readOnly ? 1 : 0), (IntPtr) Unused); + } + + /// Null operation. (Scintilla feature 2172) + public void Null() + { + Win32.SendMessage(scintilla, SciMsg.SCI_NULL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Will a paste succeed? (Scintilla feature 2173) + public bool CanPaste() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_CANPASTE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Are there any undoable actions in the undo history? (Scintilla feature 2174) + public bool CanUndo() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_CANUNDO, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Delete the undo history. (Scintilla feature 2175) + public void EmptyUndoBuffer() + { + Win32.SendMessage(scintilla, SciMsg.SCI_EMPTYUNDOBUFFER, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Undo one action in the undo history. (Scintilla feature 2176) + public void Undo() + { + Win32.SendMessage(scintilla, SciMsg.SCI_UNDO, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Cut the selection to the clipboard. (Scintilla feature 2177) + public void Cut() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CUT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Copy the selection to the clipboard. (Scintilla feature 2178) + public void Copy() + { + Win32.SendMessage(scintilla, SciMsg.SCI_COPY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Paste the contents of the clipboard into the document replacing the selection. (Scintilla feature 2179) + public void Paste() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PASTE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Clear the selection. (Scintilla feature 2180) + public void Clear() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEAR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Replace the contents of the document with the argument text. (Scintilla feature 2181) + public unsafe void SetText(string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTEXT, (IntPtr) Unused, (IntPtr) textPtr); + } + } + + /// + /// Retrieve all the text in the document. + /// Returns number of characters retrieved. + /// Result is NUL-terminated. + /// (Scintilla feature 2182) + /// + public unsafe string GetText(int length) + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXT, (IntPtr) length, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// Retrieve the number of characters in the document. (Scintilla feature 2183) + public int GetTextLength() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTEXTLENGTH, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Retrieve a pointer to a function that processes messages for this Scintilla. (Scintilla feature 2184) + public IntPtr GetDirectFunction() + { + return Win32.SendMessage(scintilla, SciMsg.SCI_GETDIRECTFUNCTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Retrieve a pointer value to use as the first argument when calling + /// the function returned by GetDirectFunction. + /// (Scintilla feature 2185) + /// + public IntPtr GetDirectPointer() + { + return Win32.SendMessage(scintilla, SciMsg.SCI_GETDIRECTPOINTER, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set to overtype (true) or insert mode. (Scintilla feature 2186) + public void SetOvertype(bool overType) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETOVERTYPE, new IntPtr(overType ? 1 : 0), (IntPtr) Unused); + } + + /// Returns true if overtype mode is active otherwise false is returned. (Scintilla feature 2187) + public bool GetOvertype() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETOVERTYPE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the width of the insert mode caret. (Scintilla feature 2188) + public void SetCaretWidth(int pixelWidth) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETWIDTH, (IntPtr) pixelWidth, (IntPtr) Unused); + } + + /// Returns the width of the insert mode caret. (Scintilla feature 2189) + public int GetCaretWidth() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETWIDTH, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Sets the position that starts the target which is used for updating the + /// document without affecting the scroll position. + /// (Scintilla feature 2190) + /// + public void SetTargetStart(int start) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETSTART, (IntPtr) start, (IntPtr) Unused); + } + + /// Get the position that starts the target. (Scintilla feature 2191) + public int GetTargetStart() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETSTART, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Sets the position that ends the target which is used for updating the + /// document without affecting the scroll position. + /// (Scintilla feature 2192) + /// + public void SetTargetEnd(int end) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETEND, (IntPtr) end, (IntPtr) Unused); + } + + /// Get the position that ends the target. (Scintilla feature 2193) + public int GetTargetEnd() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets both the start and end of the target in one call. (Scintilla feature 2686) + public void SetTargetRange(int start, int end) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTARGETRANGE, (IntPtr) start, (IntPtr) end); + } + + /// Retrieve the text in the target. (Scintilla feature 2687) + public unsafe string GetTargetText() + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETTARGETTEXT, (IntPtr) Unused, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// Make the target range start and end be the same as the selection range start and end. (Scintilla feature 2287) + public void TargetFromSelection() + { + Win32.SendMessage(scintilla, SciMsg.SCI_TARGETFROMSELECTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the target to the whole document. (Scintilla feature 2690) + public void TargetWholeDocument() + { + Win32.SendMessage(scintilla, SciMsg.SCI_TARGETWHOLEDOCUMENT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Replace the target text with the argument text. + /// Text is counted so it can contain NULs. + /// Returns the length of the replacement text. + /// (Scintilla feature 2194) + /// + public unsafe int ReplaceTarget(int length, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_REPLACETARGET, (IntPtr) length, (IntPtr) textPtr); + } + } + + /// + /// Replace the target text with the argument text after \d processing. + /// Text is counted so it can contain NULs. + /// Looks for \d where d is between 1 and 9 and replaces these with the strings + /// matched in the last search operation which were surrounded by \( and \). + /// Returns the length of the replacement text including any change + /// caused by processing the \d patterns. + /// (Scintilla feature 2195) + /// + public unsafe int ReplaceTargetRE(int length, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_REPLACETARGETRE, (IntPtr) length, (IntPtr) textPtr); + } + } + + /// + /// Search for a counted string in the target and set the target to the found + /// range. Text is counted so it can contain NULs. + /// Returns start of found range or -1 for failure in which case target is not moved. + /// (Scintilla feature 2197) + /// + public unsafe int SearchInTarget(int length, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHINTARGET, (IntPtr) length, (IntPtr) textPtr); + } + } + + /// Set the search flags used by SearchInTarget. (Scintilla feature 2198) + public void SetSearchFlags(FindOption searchFlags) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSEARCHFLAGS, (IntPtr) searchFlags, (IntPtr) Unused); + } + + /// Get the search flags used by SearchInTarget. (Scintilla feature 2199) + public FindOption GetSearchFlags() + { + return (FindOption)Win32.SendMessage(scintilla, SciMsg.SCI_GETSEARCHFLAGS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Show a call tip containing a definition near position pos. (Scintilla feature 2200) + public unsafe void CallTipShow(int pos, string definition) + { + fixed (byte* definitionPtr = Encoding.UTF8.GetBytes(definition)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSHOW, (IntPtr) pos, (IntPtr) definitionPtr); + } + } + + /// Remove the call tip from the screen. (Scintilla feature 2201) + public void CallTipCancel() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPCANCEL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Is there an active call tip? (Scintilla feature 2202) + public bool CallTipActive() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPACTIVE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Retrieve the position where the caret was before displaying the call tip. (Scintilla feature 2203) + public int CallTipPosStart() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPPOSSTART, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the start position in order to change when backspacing removes the calltip. (Scintilla feature 2214) + public void CallTipSetPosStart(int posStart) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETPOSSTART, (IntPtr) posStart, (IntPtr) Unused); + } + + /// Highlight a segment of the definition. (Scintilla feature 2204) + public void CallTipSetHlt(int highlightStart, int highlightEnd) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETHLT, (IntPtr) highlightStart, (IntPtr) highlightEnd); + } + + /// Set the background colour for the call tip. (Scintilla feature 2205) + public void CallTipSetBack(Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETBACK, back.Value, (IntPtr) Unused); + } + + /// Set the foreground colour for the call tip. (Scintilla feature 2206) + public void CallTipSetFore(Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETFORE, fore.Value, (IntPtr) Unused); + } + + /// Set the foreground colour for the highlighted part of the call tip. (Scintilla feature 2207) + public void CallTipSetForeHlt(Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETFOREHLT, fore.Value, (IntPtr) Unused); + } + + /// Enable use of STYLE_CALLTIP and set call tip tab size in pixels. (Scintilla feature 2212) + public void CallTipUseStyle(int tabSize) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPUSESTYLE, (IntPtr) tabSize, (IntPtr) Unused); + } + + /// Set position of calltip, above or below text. (Scintilla feature 2213) + public void CallTipSetPosition(bool above) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CALLTIPSETPOSITION, new IntPtr(above ? 1 : 0), (IntPtr) Unused); + } + + /// Find the display line of a document line taking hidden lines into account. (Scintilla feature 2220) + public int VisibleFromDocLine(int docLine) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_VISIBLEFROMDOCLINE, (IntPtr) docLine, (IntPtr) Unused); + } + + /// Find the document line of a display line taking hidden lines into account. (Scintilla feature 2221) + public int DocLineFromVisible(int displayLine) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_DOCLINEFROMVISIBLE, (IntPtr) displayLine, (IntPtr) Unused); + } + + /// The number of display lines needed to wrap a document line (Scintilla feature 2235) + public int WrapCount(int docLine) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WRAPCOUNT, (IntPtr) docLine, (IntPtr) Unused); + } + + /// + /// Set the fold level of a line. + /// This encodes an integer level along with flags indicating whether the + /// line is a header and whether it is effectively white space. + /// (Scintilla feature 2222) + /// + public void SetFoldLevel(int line, FoldLevel level) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDLEVEL, (IntPtr) line, (IntPtr) level); + } + + /// Retrieve the fold level of a line. (Scintilla feature 2223) + public FoldLevel GetFoldLevel(int line) + { + return (FoldLevel)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDLEVEL, (IntPtr) line, (IntPtr) Unused); + } + + /// Find the last child line of a header line. (Scintilla feature 2224) + public int GetLastChild(int line, FoldLevel level) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLASTCHILD, (IntPtr) line, (IntPtr) level); + } + + /// Find the parent line of a child line. (Scintilla feature 2225) + public int GetFoldParent(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDPARENT, (IntPtr) line, (IntPtr) Unused); + } + + /// Make a range of lines visible. (Scintilla feature 2226) + public void ShowLines(int lineStart, int lineEnd) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SHOWLINES, (IntPtr) lineStart, (IntPtr) lineEnd); + } + + /// Make a range of lines invisible. (Scintilla feature 2227) + public void HideLines(int lineStart, int lineEnd) + { + Win32.SendMessage(scintilla, SciMsg.SCI_HIDELINES, (IntPtr) lineStart, (IntPtr) lineEnd); + } + + /// Is a line visible? (Scintilla feature 2228) + public bool GetLineVisible(int line) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEVISIBLE, (IntPtr) line, (IntPtr) Unused); + } + + /// Are all lines visible? (Scintilla feature 2236) + public bool GetAllLinesVisible() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETALLLINESVISIBLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Show the children of a header line. (Scintilla feature 2229) + public void SetFoldExpanded(int line, bool expanded) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDEXPANDED, (IntPtr) line, new IntPtr(expanded ? 1 : 0)); + } + + /// Is a header line expanded? (Scintilla feature 2230) + public bool GetFoldExpanded(int line) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOLDEXPANDED, (IntPtr) line, (IntPtr) Unused); + } + + /// Switch a header line between expanded and contracted. (Scintilla feature 2231) + public void ToggleFold(int line) + { + Win32.SendMessage(scintilla, SciMsg.SCI_TOGGLEFOLD, (IntPtr) line, (IntPtr) Unused); + } + + /// Switch a header line between expanded and contracted and show some text after the line. (Scintilla feature 2700) + public unsafe void ToggleFoldShowText(int line, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_TOGGLEFOLDSHOWTEXT, (IntPtr) line, (IntPtr) textPtr); + } + } + + /// Set the style of fold display text. (Scintilla feature 2701) + public void FoldDisplayTextSetStyle(FoldDisplayTextStyle style) + { + Win32.SendMessage(scintilla, SciMsg.SCI_FOLDDISPLAYTEXTSETSTYLE, (IntPtr) style, (IntPtr) Unused); + } + + /// Get the style of fold display text. (Scintilla feature 2707) + public FoldDisplayTextStyle FoldDisplayTextGetStyle() + { + return (FoldDisplayTextStyle)Win32.SendMessage(scintilla, SciMsg.SCI_FOLDDISPLAYTEXTGETSTYLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the default fold display text. (Scintilla feature 2722) + public unsafe void SetDefaultFoldDisplayText(string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETDEFAULTFOLDDISPLAYTEXT, (IntPtr) Unused, (IntPtr) textPtr); + } + } + + /// Get the default fold display text. (Scintilla feature 2723) + public unsafe string GetDefaultFoldDisplayText() + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETDEFAULTFOLDDISPLAYTEXT, (IntPtr) Unused, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// Expand or contract a fold header. (Scintilla feature 2237) + public void FoldLine(int line, FoldAction action) + { + Win32.SendMessage(scintilla, SciMsg.SCI_FOLDLINE, (IntPtr) line, (IntPtr) action); + } + + /// Expand or contract a fold header and its children. (Scintilla feature 2238) + public void FoldChildren(int line, FoldAction action) + { + Win32.SendMessage(scintilla, SciMsg.SCI_FOLDCHILDREN, (IntPtr) line, (IntPtr) action); + } + + /// Expand a fold header and all children. Use the level argument instead of the line's current level. (Scintilla feature 2239) + public void ExpandChildren(int line, FoldLevel level) + { + Win32.SendMessage(scintilla, SciMsg.SCI_EXPANDCHILDREN, (IntPtr) line, (IntPtr) level); + } + + /// Expand or contract all fold headers. (Scintilla feature 2662) + public void FoldAll(FoldAction action) + { + Win32.SendMessage(scintilla, SciMsg.SCI_FOLDALL, (IntPtr) action, (IntPtr) Unused); + } + + /// Ensure a particular line is visible by expanding any header line hiding it. (Scintilla feature 2232) + public void EnsureVisible(int line) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ENSUREVISIBLE, (IntPtr) line, (IntPtr) Unused); + } + + /// Set automatic folding behaviours. (Scintilla feature 2663) + public void SetAutomaticFold(AutomaticFold automaticFold) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETAUTOMATICFOLD, (IntPtr) automaticFold, (IntPtr) Unused); + } + + /// Get automatic folding behaviours. (Scintilla feature 2664) + public AutomaticFold GetAutomaticFold() + { + return (AutomaticFold)Win32.SendMessage(scintilla, SciMsg.SCI_GETAUTOMATICFOLD, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set some style options for folding. (Scintilla feature 2233) + public void SetFoldFlags(FoldFlag flags) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDFLAGS, (IntPtr) flags, (IntPtr) Unused); + } + + /// + /// Ensure a particular line is visible by expanding any header line hiding it. + /// Use the currently set visibility policy to determine which range to display. + /// (Scintilla feature 2234) + /// + public void EnsureVisibleEnforcePolicy(int line) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ENSUREVISIBLEENFORCEPOLICY, (IntPtr) line, (IntPtr) Unused); + } + + /// Sets whether a tab pressed when caret is within indentation indents. (Scintilla feature 2260) + public void SetTabIndents(bool tabIndents) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTABINDENTS, new IntPtr(tabIndents ? 1 : 0), (IntPtr) Unused); + } + + /// Does a tab pressed when caret is within indentation indent? (Scintilla feature 2261) + public bool GetTabIndents() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTABINDENTS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets whether a backspace pressed when caret is within indentation unindents. (Scintilla feature 2262) + public void SetBackSpaceUnIndents(bool bsUnIndents) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETBACKSPACEUNINDENTS, new IntPtr(bsUnIndents ? 1 : 0), (IntPtr) Unused); + } + + /// Does a backspace pressed when caret is within indentation unindent? (Scintilla feature 2263) + public bool GetBackSpaceUnIndents() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETBACKSPACEUNINDENTS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2264) + public void SetMouseDwellTime(int periodMilliseconds) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMOUSEDWELLTIME, (IntPtr) periodMilliseconds, (IntPtr) Unused); + } + + /// Retrieve the time the mouse must sit still to generate a mouse dwell event. (Scintilla feature 2265) + public int GetMouseDwellTime() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOUSEDWELLTIME, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get position of start of word. (Scintilla feature 2266) + public int WordStartPosition(int pos, bool onlyWordCharacters) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WORDSTARTPOSITION, (IntPtr) pos, new IntPtr(onlyWordCharacters ? 1 : 0)); + } + + /// Get position of end of word. (Scintilla feature 2267) + public int WordEndPosition(int pos, bool onlyWordCharacters) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_WORDENDPOSITION, (IntPtr) pos, new IntPtr(onlyWordCharacters ? 1 : 0)); + } + + /// Is the range start..end considered a word? (Scintilla feature 2691) + public bool IsRangeWord(int start, int end) + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_ISRANGEWORD, (IntPtr) start, (IntPtr) end); + } + + /// Sets limits to idle styling. (Scintilla feature 2692) + public void SetIdleStyling(IdleStyling idleStyling) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETIDLESTYLING, (IntPtr) idleStyling, (IntPtr) Unused); + } + + /// Retrieve the limits to idle styling. (Scintilla feature 2693) + public IdleStyling GetIdleStyling() + { + return (IdleStyling)Win32.SendMessage(scintilla, SciMsg.SCI_GETIDLESTYLING, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets whether text is word wrapped. (Scintilla feature 2268) + public void SetWrapMode(Wrap wrapMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPMODE, (IntPtr) wrapMode, (IntPtr) Unused); + } + + /// Retrieve whether text is word wrapped. (Scintilla feature 2269) + public Wrap GetWrapMode() + { + return (Wrap)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPMODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the display mode of visual flags for wrapped lines. (Scintilla feature 2460) + public void SetWrapVisualFlags(WrapVisualFlag wrapVisualFlags) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPVISUALFLAGS, (IntPtr) wrapVisualFlags, (IntPtr) Unused); + } + + /// Retrive the display mode of visual flags for wrapped lines. (Scintilla feature 2461) + public WrapVisualFlag GetWrapVisualFlags() + { + return (WrapVisualFlag)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPVISUALFLAGS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the location of visual flags for wrapped lines. (Scintilla feature 2462) + public void SetWrapVisualFlagsLocation(WrapVisualLocation wrapVisualFlagsLocation) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPVISUALFLAGSLOCATION, (IntPtr) wrapVisualFlagsLocation, (IntPtr) Unused); + } + + /// Retrive the location of visual flags for wrapped lines. (Scintilla feature 2463) + public WrapVisualLocation GetWrapVisualFlagsLocation() + { + return (WrapVisualLocation)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPVISUALFLAGSLOCATION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the start indent for wrapped lines. (Scintilla feature 2464) + public void SetWrapStartIndent(int indent) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPSTARTINDENT, (IntPtr) indent, (IntPtr) Unused); + } + + /// Retrive the start indent for wrapped lines. (Scintilla feature 2465) + public int GetWrapStartIndent() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPSTARTINDENT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets how wrapped sublines are placed. Default is fixed. (Scintilla feature 2472) + public void SetWrapIndentMode(WrapIndentMode wrapIndentMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWRAPINDENTMODE, (IntPtr) wrapIndentMode, (IntPtr) Unused); + } + + /// Retrieve how wrapped sublines are placed. Default is fixed. (Scintilla feature 2473) + public WrapIndentMode GetWrapIndentMode() + { + return (WrapIndentMode)Win32.SendMessage(scintilla, SciMsg.SCI_GETWRAPINDENTMODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the degree of caching of layout information. (Scintilla feature 2272) + public void SetLayoutCache(LineCache cacheMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETLAYOUTCACHE, (IntPtr) cacheMode, (IntPtr) Unused); + } + + /// Retrieve the degree of caching of layout information. (Scintilla feature 2273) + public LineCache GetLayoutCache() + { + return (LineCache)Win32.SendMessage(scintilla, SciMsg.SCI_GETLAYOUTCACHE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the document width assumed for scrolling. (Scintilla feature 2274) + public void SetScrollWidth(int pixelWidth) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSCROLLWIDTH, (IntPtr) pixelWidth, (IntPtr) Unused); + } + + /// Retrieve the document width assumed for scrolling. (Scintilla feature 2275) + public int GetScrollWidth() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSCROLLWIDTH, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets whether the maximum width line displayed is used to set scroll width. (Scintilla feature 2516) + public void SetScrollWidthTracking(bool tracking) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSCROLLWIDTHTRACKING, new IntPtr(tracking ? 1 : 0), (IntPtr) Unused); + } + + /// Retrieve whether the scroll width tracks wide lines. (Scintilla feature 2517) + public bool GetScrollWidthTracking() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSCROLLWIDTHTRACKING, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Measure the pixel width of some text in a particular style. + /// NUL terminated text argument. + /// Does not handle tab or control characters. + /// (Scintilla feature 2276) + /// + public unsafe int TextWidth(int style, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_TEXTWIDTH, (IntPtr) style, (IntPtr) textPtr); + } + } + + /// + /// Sets the scroll range so that maximum scroll position has + /// the last line at the bottom of the view (default). + /// Setting this to false allows scrolling one page below the last line. + /// (Scintilla feature 2277) + /// + public void SetEndAtLastLine(bool endAtLastLine) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETENDATLASTLINE, new IntPtr(endAtLastLine ? 1 : 0), (IntPtr) Unused); + } + + /// + /// Retrieve whether the maximum scroll position has the last + /// line at the bottom of the view. + /// (Scintilla feature 2278) + /// + public bool GetEndAtLastLine() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETENDATLASTLINE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Retrieve the height of a particular line of text in pixels. (Scintilla feature 2279) + public int TextHeight(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_TEXTHEIGHT, (IntPtr) line, (IntPtr) Unused); + } + + /// Show or hide the vertical scroll bar. (Scintilla feature 2280) + public void SetVScrollBar(bool visible) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETVSCROLLBAR, new IntPtr(visible ? 1 : 0), (IntPtr) Unused); + } + + /// Is the vertical scroll bar visible? (Scintilla feature 2281) + public bool GetVScrollBar() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETVSCROLLBAR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Append a string to the end of the document without changing the selection. (Scintilla feature 2282) + public unsafe void AppendText(int length, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_APPENDTEXT, (IntPtr) length, (IntPtr) textPtr); + } + } + + /// How many phases is drawing done in? (Scintilla feature 2673) + public PhasesDraw GetPhasesDraw() + { + return (PhasesDraw)Win32.SendMessage(scintilla, SciMsg.SCI_GETPHASESDRAW, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// In one phase draw, text is drawn in a series of rectangular blocks with no overlap. + /// In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. + /// In multiple phase draw, each element is drawn over the whole drawing area, allowing text + /// to overlap from one line to the next. + /// (Scintilla feature 2674) + /// + public void SetPhasesDraw(PhasesDraw phases) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETPHASESDRAW, (IntPtr) phases, (IntPtr) Unused); + } + + /// Choose the quality level for text from the FontQuality enumeration. (Scintilla feature 2611) + public void SetFontQuality(FontQuality fontQuality) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETFONTQUALITY, (IntPtr) fontQuality, (IntPtr) Unused); + } + + /// Retrieve the quality level for text. (Scintilla feature 2612) + public FontQuality GetFontQuality() + { + return (FontQuality)Win32.SendMessage(scintilla, SciMsg.SCI_GETFONTQUALITY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Scroll so that a display line is at the top of the display. (Scintilla feature 2613) + public void SetFirstVisibleLine(int displayLine) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETFIRSTVISIBLELINE, (IntPtr) displayLine, (IntPtr) Unused); + } + + /// Change the effect of pasting when there are multiple selections. (Scintilla feature 2614) + public void SetMultiPaste(MultiPaste multiPaste) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMULTIPASTE, (IntPtr) multiPaste, (IntPtr) Unused); + } + + /// Retrieve the effect of pasting when there are multiple selections. (Scintilla feature 2615) + public MultiPaste GetMultiPaste() + { + return (MultiPaste)Win32.SendMessage(scintilla, SciMsg.SCI_GETMULTIPASTE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Retrieve the value of a tag from a regular expression search. + /// Result is NUL-terminated. + /// (Scintilla feature 2616) + /// + public unsafe string GetTag(int tagNumber) + { + byte[] tagValueBuffer = new byte[10000]; + fixed (byte* tagValuePtr = tagValueBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETTAG, (IntPtr) tagNumber, (IntPtr) tagValuePtr); + return Encoding.UTF8.GetString(tagValueBuffer).TrimEnd('\0'); + } + } + + /// Join the lines in the target. (Scintilla feature 2288) + public void LinesJoin() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINESJOIN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Split the lines in the target into lines that are less wide than pixelWidth + /// where possible. + /// (Scintilla feature 2289) + /// + public void LinesSplit(int pixelWidth) + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINESSPLIT, (IntPtr) pixelWidth, (IntPtr) Unused); + } + + /// Set one of the colours used as a chequerboard pattern in the fold margin (Scintilla feature 2290) + public void SetFoldMarginColour(bool useSetting, Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDMARGINCOLOUR, new IntPtr(useSetting ? 1 : 0), back.Value); + } + + /// Set the other colour used as a chequerboard pattern in the fold margin (Scintilla feature 2291) + public void SetFoldMarginHiColour(bool useSetting, Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETFOLDMARGINHICOLOUR, new IntPtr(useSetting ? 1 : 0), fore.Value); + } + + /// Enable or disable accessibility. (Scintilla feature 2702) + public void SetAccessibility(Accessibility accessibility) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETACCESSIBILITY, (IntPtr) accessibility, (IntPtr) Unused); + } + + /// Report accessibility status. (Scintilla feature 2703) + public Accessibility GetAccessibility() + { + return (Accessibility)Win32.SendMessage(scintilla, SciMsg.SCI_GETACCESSIBILITY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret down one line. (Scintilla feature 2300) + public void LineDown() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEDOWN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret down one line extending selection to new caret position. (Scintilla feature 2301) + public void LineDownExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEDOWNEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret up one line. (Scintilla feature 2302) + public void LineUp() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEUP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret up one line extending selection to new caret position. (Scintilla feature 2303) + public void LineUpExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEUPEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret left one character. (Scintilla feature 2304) + public void CharLeft() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CHARLEFT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret left one character extending selection to new caret position. (Scintilla feature 2305) + public void CharLeftExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CHARLEFTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret right one character. (Scintilla feature 2306) + public void CharRight() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CHARRIGHT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret right one character extending selection to new caret position. (Scintilla feature 2307) + public void CharRightExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CHARRIGHTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret left one word. (Scintilla feature 2308) + public void WordLeft() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDLEFT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret left one word extending selection to new caret position. (Scintilla feature 2309) + public void WordLeftExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDLEFTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret right one word. (Scintilla feature 2310) + public void WordRight() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDRIGHT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret right one word extending selection to new caret position. (Scintilla feature 2311) + public void WordRightExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDRIGHTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to first position on line. (Scintilla feature 2312) + public void Home() + { + Win32.SendMessage(scintilla, SciMsg.SCI_HOME, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to first position on line extending selection to new caret position. (Scintilla feature 2313) + public void HomeExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_HOMEEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to last position on line. (Scintilla feature 2314) + public void LineEnd() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to last position on line extending selection to new caret position. (Scintilla feature 2315) + public void LineEndExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to first position in document. (Scintilla feature 2316) + public void DocumentStart() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DOCUMENTSTART, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to first position in document extending selection to new caret position. (Scintilla feature 2317) + public void DocumentStartExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DOCUMENTSTARTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to last position in document. (Scintilla feature 2318) + public void DocumentEnd() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DOCUMENTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to last position in document extending selection to new caret position. (Scintilla feature 2319) + public void DocumentEndExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DOCUMENTENDEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret one page up. (Scintilla feature 2320) + public void PageUp() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PAGEUP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret one page up extending selection to new caret position. (Scintilla feature 2321) + public void PageUpExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PAGEUPEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret one page down. (Scintilla feature 2322) + public void PageDown() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PAGEDOWN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret one page down extending selection to new caret position. (Scintilla feature 2323) + public void PageDownExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PAGEDOWNEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Switch from insert to overtype mode or the reverse. (Scintilla feature 2324) + public void EditToggleOvertype() + { + Win32.SendMessage(scintilla, SciMsg.SCI_EDITTOGGLEOVERTYPE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Cancel any modes such as call tip or auto-completion list display. (Scintilla feature 2325) + public void Cancel() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CANCEL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Delete the selection or if no selection, the character before the caret. (Scintilla feature 2326) + public void DeleteBack() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DELETEBACK, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// If selection is empty or all on one line replace the selection with a tab character. + /// If more than one line selected, indent the lines. + /// (Scintilla feature 2327) + /// + public void Tab() + { + Win32.SendMessage(scintilla, SciMsg.SCI_TAB, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Dedent the selected lines. (Scintilla feature 2328) + public void BackTab() + { + Win32.SendMessage(scintilla, SciMsg.SCI_BACKTAB, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. (Scintilla feature 2329) + public void NewLine() + { + Win32.SendMessage(scintilla, SciMsg.SCI_NEWLINE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Insert a Form Feed character. (Scintilla feature 2330) + public void FormFeed() + { + Win32.SendMessage(scintilla, SciMsg.SCI_FORMFEED, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Move caret to before first visible character on line. + /// If already there move to first character on line. + /// (Scintilla feature 2331) + /// + public void VCHome() + { + Win32.SendMessage(scintilla, SciMsg.SCI_VCHOME, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Like VCHome but extending selection to new caret position. (Scintilla feature 2332) + public void VCHomeExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Magnify the displayed text by increasing the sizes by 1 point. (Scintilla feature 2333) + public void ZoomIn() + { + Win32.SendMessage(scintilla, SciMsg.SCI_ZOOMIN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Make the displayed text smaller by decreasing the sizes by 1 point. (Scintilla feature 2334) + public void ZoomOut() + { + Win32.SendMessage(scintilla, SciMsg.SCI_ZOOMOUT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Delete the word to the left of the caret. (Scintilla feature 2335) + public void DelWordLeft() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DELWORDLEFT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Delete the word to the right of the caret. (Scintilla feature 2336) + public void DelWordRight() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DELWORDRIGHT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Delete the word to the right of the caret, but not the trailing non-word characters. (Scintilla feature 2518) + public void DelWordRightEnd() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DELWORDRIGHTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Cut the line containing the caret. (Scintilla feature 2337) + public void LineCut() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINECUT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Delete the line containing the caret. (Scintilla feature 2338) + public void LineDelete() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEDELETE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Switch the current line with the previous. (Scintilla feature 2339) + public void LineTranspose() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINETRANSPOSE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Reverse order of selected lines. (Scintilla feature 2354) + public void LineReverse() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEREVERSE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Duplicate the current line. (Scintilla feature 2404) + public void LineDuplicate() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEDUPLICATE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Transform the selection to lower case. (Scintilla feature 2340) + public void LowerCase() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LOWERCASE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Transform the selection to upper case. (Scintilla feature 2341) + public void UpperCase() + { + Win32.SendMessage(scintilla, SciMsg.SCI_UPPERCASE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Scroll the document down, keeping the caret visible. (Scintilla feature 2342) + public void LineScrollDown() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINESCROLLDOWN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Scroll the document up, keeping the caret visible. (Scintilla feature 2343) + public void LineScrollUp() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINESCROLLUP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Delete the selection or if no selection, the character before the caret. + /// Will not delete the character before at the start of a line. + /// (Scintilla feature 2344) + /// + public void DeleteBackNotLine() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DELETEBACKNOTLINE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to first position on display line. (Scintilla feature 2345) + public void HomeDisplay() + { + Win32.SendMessage(scintilla, SciMsg.SCI_HOMEDISPLAY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Move caret to first position on display line extending selection to + /// new caret position. + /// (Scintilla feature 2346) + /// + public void HomeDisplayExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_HOMEDISPLAYEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to last position on display line. (Scintilla feature 2347) + public void LineEndDisplay() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDDISPLAY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Move caret to last position on display line extending selection to new + /// caret position. + /// (Scintilla feature 2348) + /// + public void LineEndDisplayExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDDISPLAYEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Like Home but when word-wrap is enabled goes first to start of display line + /// HomeDisplay, then to start of document line Home. + /// (Scintilla feature 2349) + /// + public void HomeWrap() + { + Win32.SendMessage(scintilla, SciMsg.SCI_HOMEWRAP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Like HomeExtend but when word-wrap is enabled extends first to start of display line + /// HomeDisplayExtend, then to start of document line HomeExtend. + /// (Scintilla feature 2450) + /// + public void HomeWrapExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_HOMEWRAPEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Like LineEnd but when word-wrap is enabled goes first to end of display line + /// LineEndDisplay, then to start of document line LineEnd. + /// (Scintilla feature 2451) + /// + public void LineEndWrap() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDWRAP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Like LineEndExtend but when word-wrap is enabled extends first to end of display line + /// LineEndDisplayExtend, then to start of document line LineEndExtend. + /// (Scintilla feature 2452) + /// + public void LineEndWrapExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDWRAPEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Like VCHome but when word-wrap is enabled goes first to start of display line + /// VCHomeDisplay, then behaves like VCHome. + /// (Scintilla feature 2453) + /// + public void VCHomeWrap() + { + Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEWRAP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Like VCHomeExtend but when word-wrap is enabled extends first to start of display line + /// VCHomeDisplayExtend, then behaves like VCHomeExtend. + /// (Scintilla feature 2454) + /// + public void VCHomeWrapExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEWRAPEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Copy the line containing the caret. (Scintilla feature 2455) + public void LineCopy() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINECOPY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move the caret inside current view if it's not there already. (Scintilla feature 2401) + public void MoveCaretInsideView() + { + Win32.SendMessage(scintilla, SciMsg.SCI_MOVECARETINSIDEVIEW, (IntPtr) Unused, (IntPtr) Unused); + } + + /// How many characters are on a line, including end of line characters? (Scintilla feature 2350) + public int LineLength(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINELENGTH, (IntPtr) line, (IntPtr) Unused); + } + + /// Highlight the characters at two positions. (Scintilla feature 2351) + public void BraceHighlight(int posA, int posB) + { + Win32.SendMessage(scintilla, SciMsg.SCI_BRACEHIGHLIGHT, (IntPtr) posA, (IntPtr) posB); + } + + /// Use specified indicator to highlight matching braces instead of changing their style. (Scintilla feature 2498) + public void BraceHighlightIndicator(bool useSetting, int indicator) + { + Win32.SendMessage(scintilla, SciMsg.SCI_BRACEHIGHLIGHTINDICATOR, new IntPtr(useSetting ? 1 : 0), (IntPtr) indicator); + } + + /// Highlight the character at a position indicating there is no matching brace. (Scintilla feature 2352) + public void BraceBadLight(int pos) + { + Win32.SendMessage(scintilla, SciMsg.SCI_BRACEBADLIGHT, (IntPtr) pos, (IntPtr) Unused); + } + + /// Use specified indicator to highlight non matching brace instead of changing its style. (Scintilla feature 2499) + public void BraceBadLightIndicator(bool useSetting, int indicator) + { + Win32.SendMessage(scintilla, SciMsg.SCI_BRACEBADLIGHTINDICATOR, new IntPtr(useSetting ? 1 : 0), (IntPtr) indicator); + } + + /// + /// Find the position of a matching brace or INVALID_POSITION if no match. + /// The maxReStyle must be 0 for now. It may be defined in a future release. + /// (Scintilla feature 2353) + /// + public int BraceMatch(int pos, int maxReStyle) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_BRACEMATCH, (IntPtr) pos, (IntPtr) maxReStyle); + } + + /// Are the end of line characters visible? (Scintilla feature 2355) + public bool GetViewEOL() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETVIEWEOL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Make the end of line characters visible or invisible. (Scintilla feature 2356) + public void SetViewEOL(bool visible) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETVIEWEOL, new IntPtr(visible ? 1 : 0), (IntPtr) Unused); + } + + /// Retrieve a pointer to the document object. (Scintilla feature 2357) + public IntPtr GetDocPointer() + { + return Win32.SendMessage(scintilla, SciMsg.SCI_GETDOCPOINTER, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Change the document object used. (Scintilla feature 2358) + public void SetDocPointer(IntPtr doc) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETDOCPOINTER, (IntPtr) Unused, (IntPtr) doc); + } + + /// Set which document modification events are sent to the container. (Scintilla feature 2359) + public void SetModEventMask(ModificationFlags eventMask) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMODEVENTMASK, (IntPtr) eventMask, (IntPtr) Unused); + } + + /// Retrieve the column number which text should be kept within. (Scintilla feature 2360) + public int GetEdgeColumn() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETEDGECOLUMN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set the column number of the edge. + /// If text goes past the edge then it is highlighted. + /// (Scintilla feature 2361) + /// + public void SetEdgeColumn(int column) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETEDGECOLUMN, (IntPtr) column, (IntPtr) Unused); + } + + /// Retrieve the edge highlight mode. (Scintilla feature 2362) + public EdgeVisualStyle GetEdgeMode() + { + return (EdgeVisualStyle)Win32.SendMessage(scintilla, SciMsg.SCI_GETEDGEMODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that + /// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + /// (Scintilla feature 2363) + /// + public void SetEdgeMode(EdgeVisualStyle edgeMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETEDGEMODE, (IntPtr) edgeMode, (IntPtr) Unused); + } + + /// Retrieve the colour used in edge indication. (Scintilla feature 2364) + public Colour GetEdgeColour() + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETEDGECOLOUR, (IntPtr) Unused, (IntPtr) Unused)); + } + + /// Change the colour used in edge indication. (Scintilla feature 2365) + public void SetEdgeColour(Colour edgeColour) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETEDGECOLOUR, edgeColour.Value, (IntPtr) Unused); + } + + /// Add a new vertical edge to the view. (Scintilla feature 2694) + public void MultiEdgeAddLine(int column, Colour edgeColour) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MULTIEDGEADDLINE, (IntPtr) column, edgeColour.Value); + } + + /// Clear all vertical edges. (Scintilla feature 2695) + public void MultiEdgeClearAll() + { + Win32.SendMessage(scintilla, SciMsg.SCI_MULTIEDGECLEARALL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the current caret position to be the search anchor. (Scintilla feature 2366) + public void SearchAnchor() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHANCHOR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Find some text starting at the search anchor. + /// Does not ensure the selection is visible. + /// (Scintilla feature 2367) + /// + public unsafe int SearchNext(FindOption searchFlags, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHNEXT, (IntPtr) searchFlags, (IntPtr) textPtr); + } + } + + /// + /// Find some text starting at the search anchor and moving backwards. + /// Does not ensure the selection is visible. + /// (Scintilla feature 2368) + /// + public unsafe int SearchPrev(FindOption searchFlags, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_SEARCHPREV, (IntPtr) searchFlags, (IntPtr) textPtr); + } + } + + /// Retrieves the number of lines completely visible. (Scintilla feature 2370) + public int LinesOnScreen() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINESONSCREEN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set whether a pop up menu is displayed automatically when the user presses + /// the wrong mouse button on certain areas. + /// (Scintilla feature 2371) + /// + public void UsePopUp(PopUp popUpMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_USEPOPUP, (IntPtr) popUpMode, (IntPtr) Unused); + } + + /// Is the selection rectangular? The alternative is the more common stream selection. (Scintilla feature 2372) + public bool SelectionIsRectangle() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_SELECTIONISRECTANGLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set the zoom level. This number of points is added to the size of all fonts. + /// It may be positive to magnify or negative to reduce. + /// (Scintilla feature 2373) + /// + public void SetZoom(int zoomInPoints) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETZOOM, (IntPtr) zoomInPoints, (IntPtr) Unused); + } + + /// Retrieve the zoom level. (Scintilla feature 2374) + public int GetZoom() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETZOOM, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Create a new document object. + /// Starts with reference count of 1 and not selected into editor. + /// (Scintilla feature 2375) + /// + public IntPtr CreateDocument(int bytes, DocumentOption documentOptions) + { + return Win32.SendMessage(scintilla, SciMsg.SCI_CREATEDOCUMENT, (IntPtr) bytes, (IntPtr) documentOptions); + } + + /// Extend life of document. (Scintilla feature 2376) + public void AddRefDocument(IntPtr doc) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ADDREFDOCUMENT, (IntPtr) Unused, (IntPtr) doc); + } + + /// Release a reference to the document, deleting document if it fades to black. (Scintilla feature 2377) + public void ReleaseDocument(IntPtr doc) + { + Win32.SendMessage(scintilla, SciMsg.SCI_RELEASEDOCUMENT, (IntPtr) Unused, (IntPtr) doc); + } + + /// Get which document options are set. (Scintilla feature 2379) + public DocumentOption GetDocumentOptions() + { + return (DocumentOption)Win32.SendMessage(scintilla, SciMsg.SCI_GETDOCUMENTOPTIONS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get which document modification events are sent to the container. (Scintilla feature 2378) + public ModificationFlags GetModEventMask() + { + return (ModificationFlags)Win32.SendMessage(scintilla, SciMsg.SCI_GETMODEVENTMASK, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set whether command events are sent to the container. (Scintilla feature 2717) + public void SetCommandEvents(bool commandEvents) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCOMMANDEVENTS, new IntPtr(commandEvents ? 1 : 0), (IntPtr) Unused); + } + + /// Get whether command events are sent to the container. (Scintilla feature 2718) + public bool GetCommandEvents() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCOMMANDEVENTS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Change internal focus flag. (Scintilla feature 2380) + public void SetFocus(bool focus) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETFOCUS, new IntPtr(focus ? 1 : 0), (IntPtr) Unused); + } + + /// Get internal focus flag. (Scintilla feature 2381) + public bool GetFocus() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETFOCUS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Change error status - 0 = OK. (Scintilla feature 2382) + public void SetStatus(Status status) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSTATUS, (IntPtr) status, (IntPtr) Unused); + } + + /// Get error status. (Scintilla feature 2383) + public Status GetStatus() + { + return (Status)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTATUS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set whether the mouse is captured when its button is pressed. (Scintilla feature 2384) + public void SetMouseDownCaptures(bool captures) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMOUSEDOWNCAPTURES, new IntPtr(captures ? 1 : 0), (IntPtr) Unused); + } + + /// Get whether mouse gets captured. (Scintilla feature 2385) + public bool GetMouseDownCaptures() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOUSEDOWNCAPTURES, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set whether the mouse wheel can be active outside the window. (Scintilla feature 2696) + public void SetMouseWheelCaptures(bool captures) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMOUSEWHEELCAPTURES, new IntPtr(captures ? 1 : 0), (IntPtr) Unused); + } + + /// Get whether mouse wheel can be active outside the window. (Scintilla feature 2697) + public bool GetMouseWheelCaptures() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOUSEWHEELCAPTURES, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the cursor to one of the SC_CURSOR* values. (Scintilla feature 2386) + public void SetCursor(CursorShape cursorType) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCURSOR, (IntPtr) cursorType, (IntPtr) Unused); + } + + /// Get cursor type. (Scintilla feature 2387) + public CursorShape GetCursor() + { + return (CursorShape)Win32.SendMessage(scintilla, SciMsg.SCI_GETCURSOR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Change the way control characters are displayed: + /// If symbol is < 32, keep the drawn way, else, use the given character. + /// (Scintilla feature 2388) + /// + public void SetControlCharSymbol(int symbol) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCONTROLCHARSYMBOL, (IntPtr) symbol, (IntPtr) Unused); + } + + /// Get the way control characters are displayed. (Scintilla feature 2389) + public int GetControlCharSymbol() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCONTROLCHARSYMBOL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move to the previous change in capitalisation. (Scintilla feature 2390) + public void WordPartLeft() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDPARTLEFT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Move to the previous change in capitalisation extending selection + /// to new caret position. + /// (Scintilla feature 2391) + /// + public void WordPartLeftExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDPARTLEFTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move to the change next in capitalisation. (Scintilla feature 2392) + public void WordPartRight() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDPARTRIGHT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Move to the next change in capitalisation extending selection + /// to new caret position. + /// (Scintilla feature 2393) + /// + public void WordPartRightExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDPARTRIGHTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set the way the display area is determined when a particular line + /// is to be moved to by Find, FindNext, GotoLine, etc. + /// (Scintilla feature 2394) + /// + public void SetVisiblePolicy(VisiblePolicy visiblePolicy, int visibleSlop) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETVISIBLEPOLICY, (IntPtr) visiblePolicy, (IntPtr) visibleSlop); + } + + /// Delete back from the current position to the start of the line. (Scintilla feature 2395) + public void DelLineLeft() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DELLINELEFT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Delete forwards from the current position to the end of the line. (Scintilla feature 2396) + public void DelLineRight() + { + Win32.SendMessage(scintilla, SciMsg.SCI_DELLINERIGHT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the xOffset (ie, horizontal scroll position). (Scintilla feature 2397) + public void SetXOffset(int xOffset) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETXOFFSET, (IntPtr) xOffset, (IntPtr) Unused); + } + + /// Get the xOffset (ie, horizontal scroll position). (Scintilla feature 2398) + public int GetXOffset() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETXOFFSET, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the last x chosen value to be the caret x position. (Scintilla feature 2399) + public void ChooseCaretX() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CHOOSECARETX, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the focus to this Scintilla widget. (Scintilla feature 2400) + public void GrabFocus() + { + Win32.SendMessage(scintilla, SciMsg.SCI_GRABFOCUS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set the way the caret is kept visible when going sideways. + /// The exclusion zone is given in pixels. + /// (Scintilla feature 2402) + /// + public void SetXCaretPolicy(CaretPolicy caretPolicy, int caretSlop) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETXCARETPOLICY, (IntPtr) caretPolicy, (IntPtr) caretSlop); + } + + /// + /// Set the way the line the caret is on is kept visible. + /// The exclusion zone is given in lines. + /// (Scintilla feature 2403) + /// + public void SetYCaretPolicy(CaretPolicy caretPolicy, int caretSlop) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETYCARETPOLICY, (IntPtr) caretPolicy, (IntPtr) caretSlop); + } + + /// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). (Scintilla feature 2406) + public void SetPrintWrapMode(Wrap wrapMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETPRINTWRAPMODE, (IntPtr) wrapMode, (IntPtr) Unused); + } + + /// Is printing line wrapped? (Scintilla feature 2407) + public Wrap GetPrintWrapMode() + { + return (Wrap)Win32.SendMessage(scintilla, SciMsg.SCI_GETPRINTWRAPMODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set a fore colour for active hotspots. (Scintilla feature 2410) + public void SetHotspotActiveFore(bool useSetting, Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETHOTSPOTACTIVEFORE, new IntPtr(useSetting ? 1 : 0), fore.Value); + } + + /// Get the fore colour for active hotspots. (Scintilla feature 2494) + public Colour GetHotspotActiveFore() + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETHOTSPOTACTIVEFORE, (IntPtr) Unused, (IntPtr) Unused)); + } + + /// Set a back colour for active hotspots. (Scintilla feature 2411) + public void SetHotspotActiveBack(bool useSetting, Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETHOTSPOTACTIVEBACK, new IntPtr(useSetting ? 1 : 0), back.Value); + } + + /// Get the back colour for active hotspots. (Scintilla feature 2495) + public Colour GetHotspotActiveBack() + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETHOTSPOTACTIVEBACK, (IntPtr) Unused, (IntPtr) Unused)); + } + + /// Enable / Disable underlining active hotspots. (Scintilla feature 2412) + public void SetHotspotActiveUnderline(bool underline) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETHOTSPOTACTIVEUNDERLINE, new IntPtr(underline ? 1 : 0), (IntPtr) Unused); + } + + /// Get whether underlining for active hotspots. (Scintilla feature 2496) + public bool GetHotspotActiveUnderline() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHOTSPOTACTIVEUNDERLINE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Limit hotspots to single line so hotspots on two lines don't merge. (Scintilla feature 2421) + public void SetHotspotSingleLine(bool singleLine) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETHOTSPOTSINGLELINE, new IntPtr(singleLine ? 1 : 0), (IntPtr) Unused); + } + + /// Get the HotspotSingleLine property (Scintilla feature 2497) + public bool GetHotspotSingleLine() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETHOTSPOTSINGLELINE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret down one paragraph (delimited by empty lines). (Scintilla feature 2413) + public void ParaDown() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PARADOWN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Extend selection down one paragraph (delimited by empty lines). (Scintilla feature 2414) + public void ParaDownExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PARADOWNEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret up one paragraph (delimited by empty lines). (Scintilla feature 2415) + public void ParaUp() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PARAUP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Extend selection up one paragraph (delimited by empty lines). (Scintilla feature 2416) + public void ParaUpExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PARAUPEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Given a valid document position, return the previous position taking code + /// page into account. Returns 0 if passed 0. + /// (Scintilla feature 2417) + /// + public int PositionBefore(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONBEFORE, (IntPtr) pos, (IntPtr) Unused); + } + + /// + /// Given a valid document position, return the next position taking code + /// page into account. Maximum value returned is the last position in the document. + /// (Scintilla feature 2418) + /// + public int PositionAfter(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONAFTER, (IntPtr) pos, (IntPtr) Unused); + } + + /// + /// Given a valid document position, return a position that differs in a number + /// of characters. Returned value is always between 0 and last position in document. + /// (Scintilla feature 2670) + /// + public int PositionRelative(int pos, int relative) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONRELATIVE, (IntPtr) pos, (IntPtr) relative); + } + + /// + /// Given a valid document position, return a position that differs in a number + /// of UTF-16 code units. Returned value is always between 0 and last position in document. + /// The result may point half way (2 bytes) inside a non-BMP character. + /// (Scintilla feature 2716) + /// + public int PositionRelativeCodeUnits(int pos, int relative) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_POSITIONRELATIVECODEUNITS, (IntPtr) pos, (IntPtr) relative); + } + + /// Copy a range of text to the clipboard. Positions are clipped into the document. (Scintilla feature 2419) + public void CopyRange(int start, int end) + { + Win32.SendMessage(scintilla, SciMsg.SCI_COPYRANGE, (IntPtr) start, (IntPtr) end); + } + + /// Copy argument text to the clipboard. (Scintilla feature 2420) + public unsafe void CopyText(int length, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_COPYTEXT, (IntPtr) length, (IntPtr) textPtr); + } + } + + /// + /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or + /// by lines (SC_SEL_LINES). + /// (Scintilla feature 2422) + /// + public void SetSelectionMode(SelectionMode selectionMode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONMODE, (IntPtr) selectionMode, (IntPtr) Unused); + } + + /// Get the mode of the current selection. (Scintilla feature 2423) + public SelectionMode GetSelectionMode() + { + return (SelectionMode)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONMODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get whether or not regular caret moves will extend or reduce the selection. (Scintilla feature 2706) + public bool GetMoveExtendsSelection() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOVEEXTENDSSELECTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2424) + public int GetLineSelStartPosition(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESELSTARTPOSITION, (IntPtr) line, (IntPtr) Unused); + } + + /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). (Scintilla feature 2425) + public int GetLineSelEndPosition(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINESELENDPOSITION, (IntPtr) line, (IntPtr) Unused); + } + + /// Move caret down one line, extending rectangular selection to new caret position. (Scintilla feature 2426) + public void LineDownRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEDOWNRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret up one line, extending rectangular selection to new caret position. (Scintilla feature 2427) + public void LineUpRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEUPRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret left one character, extending rectangular selection to new caret position. (Scintilla feature 2428) + public void CharLeftRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CHARLEFTRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret right one character, extending rectangular selection to new caret position. (Scintilla feature 2429) + public void CharRightRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CHARRIGHTRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to first position on line, extending rectangular selection to new caret position. (Scintilla feature 2430) + public void HomeRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_HOMERECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Move caret to before first visible character on line. + /// If already there move to first character on line. + /// In either case, extend rectangular selection to new caret position. + /// (Scintilla feature 2431) + /// + public void VCHomeRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMERECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to last position on line, extending rectangular selection to new caret position. (Scintilla feature 2432) + public void LineEndRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_LINEENDRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret one page up, extending rectangular selection to new caret position. (Scintilla feature 2433) + public void PageUpRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PAGEUPRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret one page down, extending rectangular selection to new caret position. (Scintilla feature 2434) + public void PageDownRectExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_PAGEDOWNRECTEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to top of page, or one page up if already at top of page. (Scintilla feature 2435) + public void StutteredPageUp() + { + Win32.SendMessage(scintilla, SciMsg.SCI_STUTTEREDPAGEUP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. (Scintilla feature 2436) + public void StutteredPageUpExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_STUTTEREDPAGEUPEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to bottom of page, or one page down if already at bottom of page. (Scintilla feature 2437) + public void StutteredPageDown() + { + Win32.SendMessage(scintilla, SciMsg.SCI_STUTTEREDPAGEDOWN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. (Scintilla feature 2438) + public void StutteredPageDownExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_STUTTEREDPAGEDOWNEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret left one word, position cursor at end of word. (Scintilla feature 2439) + public void WordLeftEnd() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDLEFTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret left one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2440) + public void WordLeftEndExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDLEFTENDEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret right one word, position cursor at end of word. (Scintilla feature 2441) + public void WordRightEnd() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDRIGHTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move caret right one word, position cursor at end of word, extending selection to new caret position. (Scintilla feature 2442) + public void WordRightEndExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_WORDRIGHTENDEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set the set of characters making up whitespace for when moving or selecting by word. + /// Should be called after SetWordChars. + /// (Scintilla feature 2443) + /// + public unsafe void SetWhitespaceChars(string characters) + { + fixed (byte* charactersPtr = Encoding.UTF8.GetBytes(characters)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETWHITESPACECHARS, (IntPtr) Unused, (IntPtr) charactersPtr); + } + } + + /// Get the set of characters making up whitespace for when moving or selecting by word. (Scintilla feature 2647) + public unsafe string GetWhitespaceChars() + { + byte[] charactersBuffer = new byte[10000]; + fixed (byte* charactersPtr = charactersBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETWHITESPACECHARS, (IntPtr) Unused, (IntPtr) charactersPtr); + return Encoding.UTF8.GetString(charactersBuffer).TrimEnd('\0'); + } + } + + /// + /// Set the set of characters making up punctuation characters + /// Should be called after SetWordChars. + /// (Scintilla feature 2648) + /// + public unsafe void SetPunctuationChars(string characters) + { + fixed (byte* charactersPtr = Encoding.UTF8.GetBytes(characters)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETPUNCTUATIONCHARS, (IntPtr) Unused, (IntPtr) charactersPtr); + } + } + + /// Get the set of characters making up punctuation characters (Scintilla feature 2649) + public unsafe string GetPunctuationChars() + { + byte[] charactersBuffer = new byte[10000]; + fixed (byte* charactersPtr = charactersBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETPUNCTUATIONCHARS, (IntPtr) Unused, (IntPtr) charactersPtr); + return Encoding.UTF8.GetString(charactersBuffer).TrimEnd('\0'); + } + } + + /// Reset the set of characters for whitespace and word characters to the defaults. (Scintilla feature 2444) + public void SetCharsDefault() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCHARSDEFAULT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get currently selected item position in the auto-completion list (Scintilla feature 2445) + public int AutoCGetCurrent() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCURRENT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Get currently selected item text in the auto-completion list + /// Returns the length of the item text + /// Result is NUL-terminated. + /// (Scintilla feature 2610) + /// + public unsafe string AutoCGetCurrentText() + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCURRENTTEXT, (IntPtr) Unused, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. (Scintilla feature 2634) + public void AutoCSetCaseInsensitiveBehaviour(CaseInsensitiveBehaviour behaviour) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR, (IntPtr) behaviour, (IntPtr) Unused); + } + + /// Get auto-completion case insensitive behaviour. (Scintilla feature 2635) + public CaseInsensitiveBehaviour AutoCGetCaseInsensitiveBehaviour() + { + return (CaseInsensitiveBehaviour)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Change the effect of autocompleting when there are multiple selections. (Scintilla feature 2636) + public void AutoCSetMulti(MultiAutoComplete multi) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETMULTI, (IntPtr) multi, (IntPtr) Unused); + } + + /// Retrieve the effect of autocompleting when there are multiple selections. (Scintilla feature 2637) + public MultiAutoComplete AutoCGetMulti() + { + return (MultiAutoComplete)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETMULTI, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the way autocompletion lists are ordered. (Scintilla feature 2660) + public void AutoCSetOrder(Ordering order) + { + Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCSETORDER, (IntPtr) order, (IntPtr) Unused); + } + + /// Get the way autocompletion lists are ordered. (Scintilla feature 2661) + public Ordering AutoCGetOrder() + { + return (Ordering)Win32.SendMessage(scintilla, SciMsg.SCI_AUTOCGETORDER, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Enlarge the document to a particular size of text bytes. (Scintilla feature 2446) + public void Allocate(int bytes) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATE, (IntPtr) bytes, (IntPtr) Unused); + } + + /// + /// Returns the target converted to UTF8. + /// Return the length in bytes. + /// (Scintilla feature 2447) + /// + public unsafe string TargetAsUTF8() + { + byte[] sBuffer = new byte[10000]; + fixed (byte* sPtr = sBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_TARGETASUTF8, (IntPtr) Unused, (IntPtr) sPtr); + return Encoding.UTF8.GetString(sBuffer).TrimEnd('\0'); + } + } + + /// + /// Set the length of the utf8 argument for calling EncodedFromUTF8. + /// Set to -1 and the string will be measured to the first nul. + /// (Scintilla feature 2448) + /// + public void SetLengthForEncode(int bytes) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETLENGTHFORENCODE, (IntPtr) bytes, (IntPtr) Unused); + } + + /// + /// Translates a UTF8 string into the document encoding. + /// Return the length of the result in bytes. + /// On error return 0. + /// (Scintilla feature 2449) + /// + public unsafe string EncodedFromUTF8(string utf8) + { + fixed (byte* utf8Ptr = Encoding.UTF8.GetBytes(utf8)) + { + byte[] encodedBuffer = new byte[10000]; + fixed (byte* encodedPtr = encodedBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ENCODEDFROMUTF8, (IntPtr) utf8Ptr, (IntPtr) encodedPtr); + return Encoding.UTF8.GetString(encodedBuffer).TrimEnd('\0'); + } + } + } + + /// + /// Find the position of a column on a line taking into account tabs and + /// multi-byte characters. If beyond end of line, return line end position. + /// (Scintilla feature 2456) + /// + public int FindColumn(int line, int column) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_FINDCOLUMN, (IntPtr) line, (IntPtr) column); + } + + /// Can the caret preferred x position only be changed by explicit movement commands? (Scintilla feature 2457) + public CaretSticky GetCaretSticky() + { + return (CaretSticky)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETSTICKY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Stop the caret preferred x position changing when the user types. (Scintilla feature 2458) + public void SetCaretSticky(CaretSticky useCaretStickyBehaviour) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETSTICKY, (IntPtr) useCaretStickyBehaviour, (IntPtr) Unused); + } + + /// Switch between sticky and non-sticky: meant to be bound to a key. (Scintilla feature 2459) + public void ToggleCaretSticky() + { + Win32.SendMessage(scintilla, SciMsg.SCI_TOGGLECARETSTICKY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Enable/Disable convert-on-paste for line endings (Scintilla feature 2467) + public void SetPasteConvertEndings(bool convert) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETPASTECONVERTENDINGS, new IntPtr(convert ? 1 : 0), (IntPtr) Unused); + } + + /// Get convert-on-paste setting (Scintilla feature 2468) + public bool GetPasteConvertEndings() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPASTECONVERTENDINGS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Duplicate the selection. If selection empty duplicate the line containing the caret. (Scintilla feature 2469) + public void SelectionDuplicate() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SELECTIONDUPLICATE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set background alpha of the caret line. (Scintilla feature 2470) + public void SetCaretLineBackAlpha(Alpha alpha) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEBACKALPHA, (IntPtr) alpha, (IntPtr) Unused); + } + + /// Get the background alpha of the caret line. (Scintilla feature 2471) + public Alpha GetCaretLineBackAlpha() + { + return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEBACKALPHA, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the style of the caret to be drawn. (Scintilla feature 2512) + public void SetCaretStyle(CaretStyle caretStyle) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETSTYLE, (IntPtr) caretStyle, (IntPtr) Unused); + } + + /// Returns the current style of the caret. (Scintilla feature 2513) + public CaretStyle GetCaretStyle() + { + return (CaretStyle)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETSTYLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the indicator used for IndicatorFillRange and IndicatorClearRange (Scintilla feature 2500) + public void SetIndicatorCurrent(int indicator) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETINDICATORCURRENT, (IntPtr) indicator, (IntPtr) Unused); + } + + /// Get the current indicator (Scintilla feature 2501) + public int GetIndicatorCurrent() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETINDICATORCURRENT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the value used for IndicatorFillRange (Scintilla feature 2502) + public void SetIndicatorValue(int value) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETINDICATORVALUE, (IntPtr) value, (IntPtr) Unused); + } + + /// Get the current indicator value (Scintilla feature 2503) + public int GetIndicatorValue() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETINDICATORVALUE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Turn a indicator on over a range. (Scintilla feature 2504) + public void IndicatorFillRange(int start, int lengthFill) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORFILLRANGE, (IntPtr) start, (IntPtr) lengthFill); + } + + /// Turn a indicator off over a range. (Scintilla feature 2505) + public void IndicatorClearRange(int start, int lengthClear) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORCLEARRANGE, (IntPtr) start, (IntPtr) lengthClear); + } + + /// Are any indicators present at pos? (Scintilla feature 2506) + public int IndicatorAllOnFor(int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORALLONFOR, (IntPtr) pos, (IntPtr) Unused); + } + + /// What value does a particular indicator have at a position? (Scintilla feature 2507) + public int IndicatorValueAt(int indicator, int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORVALUEAT, (IntPtr) indicator, (IntPtr) pos); + } + + /// Where does a particular indicator start? (Scintilla feature 2508) + public int IndicatorStart(int indicator, int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATORSTART, (IntPtr) indicator, (IntPtr) pos); + } + + /// Where does a particular indicator end? (Scintilla feature 2509) + public int IndicatorEnd(int indicator, int pos) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDICATOREND, (IntPtr) indicator, (IntPtr) pos); + } + + /// Set number of entries in position cache (Scintilla feature 2514) + public void SetPositionCache(int size) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETPOSITIONCACHE, (IntPtr) size, (IntPtr) Unused); + } + + /// How many entries are allocated to the position cache? (Scintilla feature 2515) + public int GetPositionCache() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPOSITIONCACHE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Copy the selection, if selection empty copy the line with the caret (Scintilla feature 2519) + public void CopyAllowLine() + { + Win32.SendMessage(scintilla, SciMsg.SCI_COPYALLOWLINE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Compact the document buffer and return a read-only pointer to the + /// characters in the document. + /// (Scintilla feature 2520) + /// + public IntPtr GetCharacterPointer() + { + return Win32.SendMessage(scintilla, SciMsg.SCI_GETCHARACTERPOINTER, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Return a read-only pointer to a range of characters in the document. + /// May move the gap so that the range is contiguous, but will only move up + /// to lengthRange bytes. + /// (Scintilla feature 2643) + /// + public IntPtr GetRangePointer(int start, int lengthRange) + { + return Win32.SendMessage(scintilla, SciMsg.SCI_GETRANGEPOINTER, (IntPtr) start, (IntPtr) lengthRange); + } + + /// + /// Return a position which, to avoid performance costs, should not be within + /// the range of a call to GetRangePointer. + /// (Scintilla feature 2644) + /// + public int GetGapPosition() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETGAPPOSITION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the alpha fill colour of the given indicator. (Scintilla feature 2523) + public void IndicSetAlpha(int indicator, Alpha alpha) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETALPHA, (IntPtr) indicator, (IntPtr) alpha); + } + + /// Get the alpha fill colour of the given indicator. (Scintilla feature 2524) + public Alpha IndicGetAlpha(int indicator) + { + return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETALPHA, (IntPtr) indicator, (IntPtr) Unused); + } + + /// Set the alpha outline colour of the given indicator. (Scintilla feature 2558) + public void IndicSetOutlineAlpha(int indicator, Alpha alpha) + { + Win32.SendMessage(scintilla, SciMsg.SCI_INDICSETOUTLINEALPHA, (IntPtr) indicator, (IntPtr) alpha); + } + + /// Get the alpha outline colour of the given indicator. (Scintilla feature 2559) + public Alpha IndicGetOutlineAlpha(int indicator) + { + return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_INDICGETOUTLINEALPHA, (IntPtr) indicator, (IntPtr) Unused); + } + + /// Set extra ascent for each line (Scintilla feature 2525) + public void SetExtraAscent(int extraAscent) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETEXTRAASCENT, (IntPtr) extraAscent, (IntPtr) Unused); + } + + /// Get extra ascent for each line (Scintilla feature 2526) + public int GetExtraAscent() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETEXTRAASCENT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set extra descent for each line (Scintilla feature 2527) + public void SetExtraDescent(int extraDescent) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETEXTRADESCENT, (IntPtr) extraDescent, (IntPtr) Unused); + } + + /// Get extra descent for each line (Scintilla feature 2528) + public int GetExtraDescent() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETEXTRADESCENT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Which symbol was defined for markerNumber with MarkerDefine (Scintilla feature 2529) + public int MarkerSymbolDefined(int markerNumber) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARKERSYMBOLDEFINED, (IntPtr) markerNumber, (IntPtr) Unused); + } + + /// Set the text in the text margin for a line (Scintilla feature 2530) + public unsafe void MarginSetText(int line, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETTEXT, (IntPtr) line, (IntPtr) textPtr); + } + } + + /// Get the text in the text margin for a line (Scintilla feature 2531) + public unsafe string MarginGetText(int line) + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETTEXT, (IntPtr) line, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// Set the style number for the text margin for a line (Scintilla feature 2532) + public void MarginSetStyle(int line, int style) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETSTYLE, (IntPtr) line, (IntPtr) style); + } + + /// Get the style number for the text margin for a line (Scintilla feature 2533) + public int MarginGetStyle(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETSTYLE, (IntPtr) line, (IntPtr) Unused); + } + + /// Set the style in the text margin for a line (Scintilla feature 2534) + public unsafe void MarginSetStyles(int line, string styles) + { + fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETSTYLES, (IntPtr) line, (IntPtr) stylesPtr); + } + } + + /// Get the styles in the text margin for a line (Scintilla feature 2535) + public unsafe string MarginGetStyles(int line) + { + byte[] stylesBuffer = new byte[10000]; + fixed (byte* stylesPtr = stylesBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETSTYLES, (IntPtr) line, (IntPtr) stylesPtr); + return Encoding.UTF8.GetString(stylesBuffer).TrimEnd('\0'); + } + } + + /// Clear the margin text on all lines (Scintilla feature 2536) + public void MarginTextClearAll() + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARGINTEXTCLEARALL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get the start of the range of style numbers used for margin text (Scintilla feature 2537) + public void MarginSetStyleOffset(int style) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARGINSETSTYLEOFFSET, (IntPtr) style, (IntPtr) Unused); + } + + /// Get the start of the range of style numbers used for margin text (Scintilla feature 2538) + public int MarginGetStyleOffset() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_MARGINGETSTYLEOFFSET, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the margin options. (Scintilla feature 2539) + public void SetMarginOptions(MarginOption marginOptions) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMARGINOPTIONS, (IntPtr) marginOptions, (IntPtr) Unused); + } + + /// Get the margin options. (Scintilla feature 2557) + public MarginOption GetMarginOptions() + { + return (MarginOption)Win32.SendMessage(scintilla, SciMsg.SCI_GETMARGINOPTIONS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the annotation text for a line (Scintilla feature 2540) + public unsafe void AnnotationSetText(int line, string text) + { + fixed (byte* textPtr = Encoding.UTF8.GetBytes(text)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETTEXT, (IntPtr) line, (IntPtr) textPtr); + } + } + + /// Get the annotation text for a line (Scintilla feature 2541) + public unsafe string AnnotationGetText(int line) + { + byte[] textBuffer = new byte[10000]; + fixed (byte* textPtr = textBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETTEXT, (IntPtr) line, (IntPtr) textPtr); + return Encoding.UTF8.GetString(textBuffer).TrimEnd('\0'); + } + } + + /// Set the style number for the annotations for a line (Scintilla feature 2542) + public void AnnotationSetStyle(int line, int style) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETSTYLE, (IntPtr) line, (IntPtr) style); + } + + /// Get the style number for the annotations for a line (Scintilla feature 2543) + public int AnnotationGetStyle(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETSTYLE, (IntPtr) line, (IntPtr) Unused); + } + + /// Set the annotation styles for a line (Scintilla feature 2544) + public unsafe void AnnotationSetStyles(int line, string styles) + { + fixed (byte* stylesPtr = Encoding.UTF8.GetBytes(styles)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETSTYLES, (IntPtr) line, (IntPtr) stylesPtr); + } + } + + /// Get the annotation styles for a line (Scintilla feature 2545) + public unsafe string AnnotationGetStyles(int line) + { + byte[] stylesBuffer = new byte[10000]; + fixed (byte* stylesPtr = stylesBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETSTYLES, (IntPtr) line, (IntPtr) stylesPtr); + return Encoding.UTF8.GetString(stylesBuffer).TrimEnd('\0'); + } + } + + /// Get the number of annotation lines for a line (Scintilla feature 2546) + public int AnnotationGetLines(int line) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETLINES, (IntPtr) line, (IntPtr) Unused); + } + + /// Clear the annotations from all lines (Scintilla feature 2547) + public void AnnotationClearAll() + { + Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONCLEARALL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the visibility for the annotations for a view (Scintilla feature 2548) + public void AnnotationSetVisible(AnnotationVisible visible) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETVISIBLE, (IntPtr) visible, (IntPtr) Unused); + } + + /// Get the visibility for the annotations for a view (Scintilla feature 2549) + public AnnotationVisible AnnotationGetVisible() + { + return (AnnotationVisible)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETVISIBLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get the start of the range of style numbers used for annotations (Scintilla feature 2550) + public void AnnotationSetStyleOffset(int style) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONSETSTYLEOFFSET, (IntPtr) style, (IntPtr) Unused); + } + + /// Get the start of the range of style numbers used for annotations (Scintilla feature 2551) + public int AnnotationGetStyleOffset() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ANNOTATIONGETSTYLEOFFSET, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Release all extended (>255) style numbers (Scintilla feature 2552) + public void ReleaseAllExtendedStyles() + { + Win32.SendMessage(scintilla, SciMsg.SCI_RELEASEALLEXTENDEDSTYLES, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Allocate some extended (>255) style numbers and return the start of the range (Scintilla feature 2553) + public int AllocateExtendedStyles(int numberStyles) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATEEXTENDEDSTYLES, (IntPtr) numberStyles, (IntPtr) Unused); + } + + /// Add a container action to the undo stack (Scintilla feature 2560) + public void AddUndoAction(int token, UndoFlags flags) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ADDUNDOACTION, (IntPtr) token, (IntPtr) flags); + } + + /// Find the position of a character from a point within the window. (Scintilla feature 2561) + public int CharPositionFromPoint(int x, int y) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHARPOSITIONFROMPOINT, (IntPtr) x, (IntPtr) y); + } + + /// + /// Find the position of a character from a point within the window. + /// Return INVALID_POSITION if not close to text. + /// (Scintilla feature 2562) + /// + public int CharPositionFromPointClose(int x, int y) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHARPOSITIONFROMPOINTCLOSE, (IntPtr) x, (IntPtr) y); + } + + /// Set whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2668) + public void SetMouseSelectionRectangularSwitch(bool mouseSelectionRectangularSwitch) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMOUSESELECTIONRECTANGULARSWITCH, new IntPtr(mouseSelectionRectangularSwitch ? 1 : 0), (IntPtr) Unused); + } + + /// Whether switching to rectangular mode while selecting with the mouse is allowed. (Scintilla feature 2669) + public bool GetMouseSelectionRectangularSwitch() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMOUSESELECTIONRECTANGULARSWITCH, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set whether multiple selections can be made (Scintilla feature 2563) + public void SetMultipleSelection(bool multipleSelection) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMULTIPLESELECTION, new IntPtr(multipleSelection ? 1 : 0), (IntPtr) Unused); + } + + /// Whether multiple selections can be made (Scintilla feature 2564) + public bool GetMultipleSelection() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMULTIPLESELECTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set whether typing can be performed into multiple selections (Scintilla feature 2565) + public void SetAdditionalSelectionTyping(bool additionalSelectionTyping) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALSELECTIONTYPING, new IntPtr(additionalSelectionTyping ? 1 : 0), (IntPtr) Unused); + } + + /// Whether typing can be performed into multiple selections (Scintilla feature 2566) + public bool GetAdditionalSelectionTyping() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALSELECTIONTYPING, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set whether additional carets will blink (Scintilla feature 2567) + public void SetAdditionalCaretsBlink(bool additionalCaretsBlink) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALCARETSBLINK, new IntPtr(additionalCaretsBlink ? 1 : 0), (IntPtr) Unused); + } + + /// Whether additional carets will blink (Scintilla feature 2568) + public bool GetAdditionalCaretsBlink() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALCARETSBLINK, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set whether additional carets are visible (Scintilla feature 2608) + public void SetAdditionalCaretsVisible(bool additionalCaretsVisible) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALCARETSVISIBLE, new IntPtr(additionalCaretsVisible ? 1 : 0), (IntPtr) Unused); + } + + /// Whether additional carets are visible (Scintilla feature 2609) + public bool GetAdditionalCaretsVisible() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALCARETSVISIBLE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// How many selections are there? (Scintilla feature 2570) + public int GetSelections() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Is every selected range empty? (Scintilla feature 2650) + public bool GetSelectionEmpty() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONEMPTY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Clear selections to a single empty stream selection (Scintilla feature 2571) + public void ClearSelections() + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEARSELECTIONS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set a simple selection (Scintilla feature 2572) + public void SetSelection(int caret, int anchor) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTION, (IntPtr) caret, (IntPtr) anchor); + } + + /// Add a selection (Scintilla feature 2573) + public void AddSelection(int caret, int anchor) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ADDSELECTION, (IntPtr) caret, (IntPtr) anchor); + } + + /// Drop one selection (Scintilla feature 2671) + public void DropSelectionN(int selection) + { + Win32.SendMessage(scintilla, SciMsg.SCI_DROPSELECTIONN, (IntPtr) selection, (IntPtr) Unused); + } + + /// Set the main selection (Scintilla feature 2574) + public void SetMainSelection(int selection) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETMAINSELECTION, (IntPtr) selection, (IntPtr) Unused); + } + + /// Which selection is the main selection (Scintilla feature 2575) + public int GetMainSelection() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETMAINSELECTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the caret position of the nth selection. (Scintilla feature 2576) + public void SetSelectionNCaret(int selection, int caret) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNCARET, (IntPtr) selection, (IntPtr) caret); + } + + /// Return the caret position of the nth selection. (Scintilla feature 2577) + public int GetSelectionNCaret(int selection) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNCARET, (IntPtr) selection, (IntPtr) Unused); + } + + /// Set the anchor position of the nth selection. (Scintilla feature 2578) + public void SetSelectionNAnchor(int selection, int anchor) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNANCHOR, (IntPtr) selection, (IntPtr) anchor); + } + + /// Return the anchor position of the nth selection. (Scintilla feature 2579) + public int GetSelectionNAnchor(int selection) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNANCHOR, (IntPtr) selection, (IntPtr) Unused); + } + + /// Set the virtual space of the caret of the nth selection. (Scintilla feature 2580) + public void SetSelectionNCaretVirtualSpace(int selection, int space) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNCARETVIRTUALSPACE, (IntPtr) selection, (IntPtr) space); + } + + /// Return the virtual space of the caret of the nth selection. (Scintilla feature 2581) + public int GetSelectionNCaretVirtualSpace(int selection) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNCARETVIRTUALSPACE, (IntPtr) selection, (IntPtr) Unused); + } + + /// Set the virtual space of the anchor of the nth selection. (Scintilla feature 2582) + public void SetSelectionNAnchorVirtualSpace(int selection, int space) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNANCHORVIRTUALSPACE, (IntPtr) selection, (IntPtr) space); + } + + /// Return the virtual space of the anchor of the nth selection. (Scintilla feature 2583) + public int GetSelectionNAnchorVirtualSpace(int selection) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNANCHORVIRTUALSPACE, (IntPtr) selection, (IntPtr) Unused); + } + + /// Sets the position that starts the selection - this becomes the anchor. (Scintilla feature 2584) + public void SetSelectionNStart(int selection, int anchor) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNSTART, (IntPtr) selection, (IntPtr) anchor); + } + + /// Returns the position at the start of the selection. (Scintilla feature 2585) + public int GetSelectionNStart(int selection) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNSTART, (IntPtr) selection, (IntPtr) Unused); + } + + /// Sets the position that ends the selection - this becomes the currentPosition. (Scintilla feature 2586) + public void SetSelectionNEnd(int selection, int caret) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSELECTIONNEND, (IntPtr) selection, (IntPtr) caret); + } + + /// Returns the position at the end of the selection. (Scintilla feature 2587) + public int GetSelectionNEnd(int selection) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSELECTIONNEND, (IntPtr) selection, (IntPtr) Unused); + } + + /// Set the caret position of the rectangular selection. (Scintilla feature 2588) + public void SetRectangularSelectionCaret(int caret) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONCARET, (IntPtr) caret, (IntPtr) Unused); + } + + /// Return the caret position of the rectangular selection. (Scintilla feature 2589) + public int GetRectangularSelectionCaret() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONCARET, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the anchor position of the rectangular selection. (Scintilla feature 2590) + public void SetRectangularSelectionAnchor(int anchor) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONANCHOR, (IntPtr) anchor, (IntPtr) Unused); + } + + /// Return the anchor position of the rectangular selection. (Scintilla feature 2591) + public int GetRectangularSelectionAnchor() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONANCHOR, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the virtual space of the caret of the rectangular selection. (Scintilla feature 2592) + public void SetRectangularSelectionCaretVirtualSpace(int space) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE, (IntPtr) space, (IntPtr) Unused); + } + + /// Return the virtual space of the caret of the rectangular selection. (Scintilla feature 2593) + public int GetRectangularSelectionCaretVirtualSpace() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the virtual space of the anchor of the rectangular selection. (Scintilla feature 2594) + public void SetRectangularSelectionAnchorVirtualSpace(int space) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE, (IntPtr) space, (IntPtr) Unused); + } + + /// Return the virtual space of the anchor of the rectangular selection. (Scintilla feature 2595) + public int GetRectangularSelectionAnchorVirtualSpace() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set options for virtual space behaviour. (Scintilla feature 2596) + public void SetVirtualSpaceOptions(VirtualSpace virtualSpaceOptions) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETVIRTUALSPACEOPTIONS, (IntPtr) virtualSpaceOptions, (IntPtr) Unused); + } + + /// Return options for virtual space behaviour. (Scintilla feature 2597) + public VirtualSpace GetVirtualSpaceOptions() + { + return (VirtualSpace)Win32.SendMessage(scintilla, SciMsg.SCI_GETVIRTUALSPACEOPTIONS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// On GTK, allow selecting the modifier key to use for mouse-based + /// rectangular selection. Often the window manager requires Alt+Mouse Drag + /// for moving windows. + /// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. + /// (Scintilla feature 2598) + /// + public void SetRectangularSelectionModifier(int modifier) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETRECTANGULARSELECTIONMODIFIER, (IntPtr) modifier, (IntPtr) Unused); + } + + /// Get the modifier key used for rectangular selection. (Scintilla feature 2599) + public int GetRectangularSelectionModifier() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETRECTANGULARSELECTIONMODIFIER, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Set the foreground colour of additional selections. + /// Must have previously called SetSelFore with non-zero first argument for this to have an effect. + /// (Scintilla feature 2600) + /// + public void SetAdditionalSelFore(Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALSELFORE, fore.Value, (IntPtr) Unused); + } + + /// + /// Set the background colour of additional selections. + /// Must have previously called SetSelBack with non-zero first argument for this to have an effect. + /// (Scintilla feature 2601) + /// + public void SetAdditionalSelBack(Colour back) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALSELBACK, back.Value, (IntPtr) Unused); + } + + /// Set the alpha of the selection. (Scintilla feature 2602) + public void SetAdditionalSelAlpha(Alpha alpha) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALSELALPHA, (IntPtr) alpha, (IntPtr) Unused); + } + + /// Get the alpha of the selection. (Scintilla feature 2603) + public Alpha GetAdditionalSelAlpha() + { + return (Alpha)Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALSELALPHA, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the foreground colour of additional carets. (Scintilla feature 2604) + public void SetAdditionalCaretFore(Colour fore) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETADDITIONALCARETFORE, fore.Value, (IntPtr) Unused); + } + + /// Get the foreground colour of additional carets. (Scintilla feature 2605) + public Colour GetAdditionalCaretFore() + { + return new Colour((int) Win32.SendMessage(scintilla, SciMsg.SCI_GETADDITIONALCARETFORE, (IntPtr) Unused, (IntPtr) Unused)); + } + + /// Set the main selection to the next selection. (Scintilla feature 2606) + public void RotateSelection() + { + Win32.SendMessage(scintilla, SciMsg.SCI_ROTATESELECTION, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Swap that caret and anchor of the main selection. (Scintilla feature 2607) + public void SwapMainAnchorCaret() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SWAPMAINANCHORCARET, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Add the next occurrence of the main selection to the set of selections as main. + /// If the current selection is empty then select word around caret. + /// (Scintilla feature 2688) + /// + public void MultipleSelectAddNext() + { + Win32.SendMessage(scintilla, SciMsg.SCI_MULTIPLESELECTADDNEXT, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Add each occurrence of the main selection in the target to the set of selections. + /// If the current selection is empty then select word around caret. + /// (Scintilla feature 2689) + /// + public void MultipleSelectAddEach() + { + Win32.SendMessage(scintilla, SciMsg.SCI_MULTIPLESELECTADDEACH, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Indicate that the internal state of a lexer has changed over a range and therefore + /// there may be a need to redraw. + /// (Scintilla feature 2617) + /// + public int ChangeLexerState(int start, int end) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CHANGELEXERSTATE, (IntPtr) start, (IntPtr) end); + } + + /// + /// Find the next line at or after lineStart that is a contracted fold header line. + /// Return -1 when no more lines. + /// (Scintilla feature 2618) + /// + public int ContractedFoldNext(int lineStart) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_CONTRACTEDFOLDNEXT, (IntPtr) lineStart, (IntPtr) Unused); + } + + /// Centre current line in window. (Scintilla feature 2619) + public void VerticalCentreCaret() + { + Win32.SendMessage(scintilla, SciMsg.SCI_VERTICALCENTRECARET, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move the selected lines up one line, shifting the line above after the selection (Scintilla feature 2620) + public void MoveSelectedLinesUp() + { + Win32.SendMessage(scintilla, SciMsg.SCI_MOVESELECTEDLINESUP, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Move the selected lines down one line, shifting the line below before the selection (Scintilla feature 2621) + public void MoveSelectedLinesDown() + { + Win32.SendMessage(scintilla, SciMsg.SCI_MOVESELECTEDLINESDOWN, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the identifier reported as idFrom in notification messages. (Scintilla feature 2622) + public void SetIdentifier(int identifier) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETIDENTIFIER, (IntPtr) identifier, (IntPtr) Unused); + } + + /// Get the identifier. (Scintilla feature 2623) + public int GetIdentifier() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETIDENTIFIER, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the width for future RGBA image data. (Scintilla feature 2624) + public void RGBAImageSetWidth(int width) + { + Win32.SendMessage(scintilla, SciMsg.SCI_RGBAIMAGESETWIDTH, (IntPtr) width, (IntPtr) Unused); + } + + /// Set the height for future RGBA image data. (Scintilla feature 2625) + public void RGBAImageSetHeight(int height) + { + Win32.SendMessage(scintilla, SciMsg.SCI_RGBAIMAGESETHEIGHT, (IntPtr) height, (IntPtr) Unused); + } + + /// Set the scale factor in percent for future RGBA image data. (Scintilla feature 2651) + public void RGBAImageSetScale(int scalePercent) + { + Win32.SendMessage(scintilla, SciMsg.SCI_RGBAIMAGESETSCALE, (IntPtr) scalePercent, (IntPtr) Unused); + } + + /// + /// Define a marker from RGBA data. + /// It has the width and height from RGBAImageSetWidth/Height + /// (Scintilla feature 2626) + /// + public unsafe void MarkerDefineRGBAImage(int markerNumber, string pixels) + { + fixed (byte* pixelsPtr = Encoding.UTF8.GetBytes(pixels)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_MARKERDEFINERGBAIMAGE, (IntPtr) markerNumber, (IntPtr) pixelsPtr); + } + } + + /// + /// Register an RGBA image for use in autocompletion lists. + /// It has the width and height from RGBAImageSetWidth/Height + /// (Scintilla feature 2627) + /// + public unsafe void RegisterRGBAImage(int type, string pixels) + { + fixed (byte* pixelsPtr = Encoding.UTF8.GetBytes(pixels)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_REGISTERRGBAIMAGE, (IntPtr) type, (IntPtr) pixelsPtr); + } + } + + /// Scroll to start of document. (Scintilla feature 2628) + public void ScrollToStart() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLTOSTART, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Scroll to end of document. (Scintilla feature 2629) + public void ScrollToEnd() + { + Win32.SendMessage(scintilla, SciMsg.SCI_SCROLLTOEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the technology used. (Scintilla feature 2630) + public void SetTechnology(Technology technology) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTECHNOLOGY, (IntPtr) technology, (IntPtr) Unused); + } + + /// Get the tech. (Scintilla feature 2631) + public Technology GetTechnology() + { + return (Technology)Win32.SendMessage(scintilla, SciMsg.SCI_GETTECHNOLOGY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Create an ILoader*. (Scintilla feature 2632) + public IntPtr CreateLoader(int bytes, DocumentOption documentOptions) + { + return Win32.SendMessage(scintilla, SciMsg.SCI_CREATELOADER, (IntPtr) bytes, (IntPtr) documentOptions); + } + + /// On OS X, show a find indicator. (Scintilla feature 2640) + public void FindIndicatorShow(int start, int end) + { + Win32.SendMessage(scintilla, SciMsg.SCI_FINDINDICATORSHOW, (IntPtr) start, (IntPtr) end); + } + + /// On OS X, flash a find indicator, then fade out. (Scintilla feature 2641) + public void FindIndicatorFlash(int start, int end) + { + Win32.SendMessage(scintilla, SciMsg.SCI_FINDINDICATORFLASH, (IntPtr) start, (IntPtr) end); + } + + /// On OS X, hide the find indicator. (Scintilla feature 2642) + public void FindIndicatorHide() + { + Win32.SendMessage(scintilla, SciMsg.SCI_FINDINDICATORHIDE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Move caret to before first visible character on display line. + /// If already there move to first character on display line. + /// (Scintilla feature 2652) + /// + public void VCHomeDisplay() + { + Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEDISPLAY, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Like VCHomeDisplay but extending selection to new caret position. (Scintilla feature 2653) + public void VCHomeDisplayExtend() + { + Win32.SendMessage(scintilla, SciMsg.SCI_VCHOMEDISPLAYEXTEND, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Is the caret line always visible? (Scintilla feature 2654) + public bool GetCaretLineVisibleAlways() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETCARETLINEVISIBLEALWAYS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Sets the caret line to always visible. (Scintilla feature 2655) + public void SetCaretLineVisibleAlways(bool alwaysVisible) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETCARETLINEVISIBLEALWAYS, new IntPtr(alwaysVisible ? 1 : 0), (IntPtr) Unused); + } + + /// Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. (Scintilla feature 2656) + public void SetLineEndTypesAllowed(LineEndType lineEndBitSet) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETLINEENDTYPESALLOWED, (IntPtr) lineEndBitSet, (IntPtr) Unused); + } + + /// Get the line end types currently allowed. (Scintilla feature 2657) + public LineEndType GetLineEndTypesAllowed() + { + return (LineEndType)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDTYPESALLOWED, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. (Scintilla feature 2658) + public LineEndType GetLineEndTypesActive() + { + return (LineEndType)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDTYPESACTIVE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the way a character is drawn. (Scintilla feature 2665) + public unsafe void SetRepresentation(string encodedCharacter, string representation) + { + fixed (byte* encodedCharacterPtr = Encoding.UTF8.GetBytes(encodedCharacter)) + { + fixed (byte* representationPtr = Encoding.UTF8.GetBytes(representation)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETREPRESENTATION, (IntPtr) encodedCharacterPtr, (IntPtr) representationPtr); + } + } + } + + /// + /// Set the way a character is drawn. + /// Result is NUL-terminated. + /// (Scintilla feature 2666) + /// + public unsafe string GetRepresentation(string encodedCharacter) + { + fixed (byte* encodedCharacterPtr = Encoding.UTF8.GetBytes(encodedCharacter)) + { + byte[] representationBuffer = new byte[10000]; + fixed (byte* representationPtr = representationBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETREPRESENTATION, (IntPtr) encodedCharacterPtr, (IntPtr) representationPtr); + return Encoding.UTF8.GetString(representationBuffer).TrimEnd('\0'); + } + } + } + + /// Remove a character representation. (Scintilla feature 2667) + public unsafe void ClearRepresentation(string encodedCharacter) + { + fixed (byte* encodedCharacterPtr = Encoding.UTF8.GetBytes(encodedCharacter)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_CLEARREPRESENTATION, (IntPtr) encodedCharacterPtr, (IntPtr) Unused); + } + } + + /// Start notifying the container of all key presses and commands. (Scintilla feature 3001) + public void StartRecord() + { + Win32.SendMessage(scintilla, SciMsg.SCI_STARTRECORD, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Stop notifying the container of all key presses and commands. (Scintilla feature 3002) + public void StopRecord() + { + Win32.SendMessage(scintilla, SciMsg.SCI_STOPRECORD, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the lexing language of the document. (Scintilla feature 4001) + public void SetLexer(int lexer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETLEXER, (IntPtr) lexer, (IntPtr) Unused); + } + + /// Retrieve the lexing language of the document. (Scintilla feature 4002) + public int GetLexer() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLEXER, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Colourise a segment of the document using the current lexing language. (Scintilla feature 4003) + public void Colourise(int start, int end) + { + Win32.SendMessage(scintilla, SciMsg.SCI_COLOURISE, (IntPtr) start, (IntPtr) end); + } + + /// Set up a value that may be used by a lexer for some optional feature. (Scintilla feature 4004) + public unsafe void SetProperty(string key, string value) + { + fixed (byte* keyPtr = Encoding.UTF8.GetBytes(key)) + { + fixed (byte* valuePtr = Encoding.UTF8.GetBytes(value)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETPROPERTY, (IntPtr) keyPtr, (IntPtr) valuePtr); + } + } + } + + /// Set up the key words used by the lexer. (Scintilla feature 4005) + public unsafe void SetKeyWords(int keyWordSet, string keyWords) + { + fixed (byte* keyWordsPtr = Encoding.UTF8.GetBytes(keyWords)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETKEYWORDS, (IntPtr) keyWordSet, (IntPtr) keyWordsPtr); + } + } + + /// Set the lexing language of the document based on string name. (Scintilla feature 4006) + public unsafe void SetLexerLanguage(string language) + { + fixed (byte* languagePtr = Encoding.UTF8.GetBytes(language)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETLEXERLANGUAGE, (IntPtr) Unused, (IntPtr) languagePtr); + } + } + + /// Load a lexer library (dll / so). (Scintilla feature 4007) + public unsafe void LoadLexerLibrary(string path) + { + fixed (byte* pathPtr = Encoding.UTF8.GetBytes(path)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_LOADLEXERLIBRARY, (IntPtr) Unused, (IntPtr) pathPtr); + } + } + + /// + /// Retrieve a "property" value previously set with SetProperty. + /// Result is NUL-terminated. + /// (Scintilla feature 4008) + /// + public unsafe string GetProperty(string key) + { + fixed (byte* keyPtr = Encoding.UTF8.GetBytes(key)) + { + byte[] valueBuffer = new byte[10000]; + fixed (byte* valuePtr = valueBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETPROPERTY, (IntPtr) keyPtr, (IntPtr) valuePtr); + return Encoding.UTF8.GetString(valueBuffer).TrimEnd('\0'); + } + } + } + + /// + /// Retrieve a "property" value previously set with SetProperty, + /// with "$()" variable replacement on returned buffer. + /// Result is NUL-terminated. + /// (Scintilla feature 4009) + /// + public unsafe string GetPropertyExpanded(string key) + { + fixed (byte* keyPtr = Encoding.UTF8.GetBytes(key)) + { + byte[] valueBuffer = new byte[10000]; + fixed (byte* valuePtr = valueBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETPROPERTYEXPANDED, (IntPtr) keyPtr, (IntPtr) valuePtr); + return Encoding.UTF8.GetString(valueBuffer).TrimEnd('\0'); + } + } + } + + /// + /// Retrieve a "property" value previously set with SetProperty, + /// interpreted as an int AFTER any "$()" variable replacement. + /// (Scintilla feature 4010) + /// + public unsafe int GetPropertyInt(string key, int defaultValue) + { + fixed (byte* keyPtr = Encoding.UTF8.GetBytes(key)) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPROPERTYINT, (IntPtr) keyPtr, (IntPtr) defaultValue); + } + } + + /// + /// Retrieve the name of the lexer. + /// Return the length of the text. + /// Result is NUL-terminated. + /// (Scintilla feature 4012) + /// + public unsafe string GetLexerLanguage() + { + byte[] languageBuffer = new byte[10000]; + fixed (byte* languagePtr = languageBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETLEXERLANGUAGE, (IntPtr) Unused, (IntPtr) languagePtr); + return Encoding.UTF8.GetString(languageBuffer).TrimEnd('\0'); + } + } + + /// For private communication between an application and a known lexer. (Scintilla feature 4013) + public IntPtr PrivateLexerCall(int operation, IntPtr pointer) + { + return Win32.SendMessage(scintilla, SciMsg.SCI_PRIVATELEXERCALL, (IntPtr) operation, (IntPtr) pointer); + } + + /// + /// Retrieve a '\n' separated list of properties understood by the current lexer. + /// Result is NUL-terminated. + /// (Scintilla feature 4014) + /// + public unsafe string PropertyNames() + { + byte[] namesBuffer = new byte[10000]; + fixed (byte* namesPtr = namesBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_PROPERTYNAMES, (IntPtr) Unused, (IntPtr) namesPtr); + return Encoding.UTF8.GetString(namesBuffer).TrimEnd('\0'); + } + } + + /// Retrieve the type of a property. (Scintilla feature 4015) + public unsafe TypeProperty PropertyType(string name) + { + fixed (byte* namePtr = Encoding.UTF8.GetBytes(name)) + { + return (TypeProperty)Win32.SendMessage(scintilla, SciMsg.SCI_PROPERTYTYPE, (IntPtr) namePtr, (IntPtr) Unused); + } + } + + /// + /// Describe a property. + /// Result is NUL-terminated. + /// (Scintilla feature 4016) + /// + public unsafe string DescribeProperty(string name) + { + fixed (byte* namePtr = Encoding.UTF8.GetBytes(name)) + { + byte[] descriptionBuffer = new byte[10000]; + fixed (byte* descriptionPtr = descriptionBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_DESCRIBEPROPERTY, (IntPtr) namePtr, (IntPtr) descriptionPtr); + return Encoding.UTF8.GetString(descriptionBuffer).TrimEnd('\0'); + } + } + } + + /// + /// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. + /// Result is NUL-terminated. + /// (Scintilla feature 4017) + /// + public unsafe string DescribeKeyWordSets() + { + byte[] descriptionsBuffer = new byte[10000]; + fixed (byte* descriptionsPtr = descriptionsBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_DESCRIBEKEYWORDSETS, (IntPtr) Unused, (IntPtr) descriptionsPtr); + return Encoding.UTF8.GetString(descriptionsBuffer).TrimEnd('\0'); + } + } + + /// + /// Bit set of LineEndType enumertion for which line ends beyond the standard + /// LF, CR, and CRLF are supported by the lexer. + /// (Scintilla feature 4018) + /// + public int GetLineEndTypesSupported() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINEENDTYPESSUPPORTED, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Allocate a set of sub styles for a particular base style, returning start of range (Scintilla feature 4020) + public int AllocateSubStyles(int styleBase, int numberStyles) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATESUBSTYLES, (IntPtr) styleBase, (IntPtr) numberStyles); + } + + /// The starting style number for the sub styles associated with a base style (Scintilla feature 4021) + public int GetSubStylesStart(int styleBase) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSUBSTYLESSTART, (IntPtr) styleBase, (IntPtr) Unused); + } + + /// The number of sub styles associated with a base style (Scintilla feature 4022) + public int GetSubStylesLength(int styleBase) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSUBSTYLESLENGTH, (IntPtr) styleBase, (IntPtr) Unused); + } + + /// For a sub style, return the base style, else return the argument. (Scintilla feature 4027) + public int GetStyleFromSubStyle(int subStyle) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEFROMSUBSTYLE, (IntPtr) subStyle, (IntPtr) Unused); + } + + /// For a secondary style, return the primary style, else return the argument. (Scintilla feature 4028) + public int GetPrimaryStyleFromStyle(int style) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETPRIMARYSTYLEFROMSTYLE, (IntPtr) style, (IntPtr) Unused); + } + + /// Free allocated sub styles (Scintilla feature 4023) + public void FreeSubStyles() + { + Win32.SendMessage(scintilla, SciMsg.SCI_FREESUBSTYLES, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set the identifiers that are shown in a particular style (Scintilla feature 4024) + public unsafe void SetIdentifiers(int style, string identifiers) + { + fixed (byte* identifiersPtr = Encoding.UTF8.GetBytes(identifiers)) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETIDENTIFIERS, (IntPtr) style, (IntPtr) identifiersPtr); + } + } + + /// + /// Where styles are duplicated by a feature such as active/inactive code + /// return the distance between the two types. + /// (Scintilla feature 4025) + /// + public int DistanceToSecondaryStyles() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_DISTANCETOSECONDARYSTYLES, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Get the set of base styles that can be extended with sub styles + /// Result is NUL-terminated. + /// (Scintilla feature 4026) + /// + public unsafe string GetSubStyleBases() + { + byte[] stylesBuffer = new byte[10000]; + fixed (byte* stylesPtr = stylesBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_GETSUBSTYLEBASES, (IntPtr) Unused, (IntPtr) stylesPtr); + return Encoding.UTF8.GetString(stylesBuffer).TrimEnd('\0'); + } + } + + /// Retrieve the number of named styles for the lexer. (Scintilla feature 4029) + public int GetNamedStyles() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETNAMEDSTYLES, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Retrieve the name of a style. + /// Result is NUL-terminated. + /// (Scintilla feature 4030) + /// + public unsafe string NameOfStyle(int style) + { + byte[] nameBuffer = new byte[10000]; + fixed (byte* namePtr = nameBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_NAMEOFSTYLE, (IntPtr) style, (IntPtr) namePtr); + return Encoding.UTF8.GetString(nameBuffer).TrimEnd('\0'); + } + } + + /// + /// Retrieve a ' ' separated list of style tags like "literal quoted string". + /// Result is NUL-terminated. + /// (Scintilla feature 4031) + /// + public unsafe string TagsOfStyle(int style) + { + byte[] tagsBuffer = new byte[10000]; + fixed (byte* tagsPtr = tagsBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_TAGSOFSTYLE, (IntPtr) style, (IntPtr) tagsPtr); + return Encoding.UTF8.GetString(tagsBuffer).TrimEnd('\0'); + } + } + + /// + /// Retrieve a description of a style. + /// Result is NUL-terminated. + /// (Scintilla feature 4032) + /// + public unsafe string DescriptionOfStyle(int style) + { + byte[] descriptionBuffer = new byte[10000]; + fixed (byte* descriptionPtr = descriptionBuffer) + { + Win32.SendMessage(scintilla, SciMsg.SCI_DESCRIPTIONOFSTYLE, (IntPtr) style, (IntPtr) descriptionPtr); + return Encoding.UTF8.GetString(descriptionBuffer).TrimEnd('\0'); + } + } + + /// Retrieve bidirectional text display state. (Scintilla feature 2708) + public Bidirectional GetBidirectional() + { + return (Bidirectional)Win32.SendMessage(scintilla, SciMsg.SCI_GETBIDIRECTIONAL, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Set bidirectional text display state. (Scintilla feature 2709) + public void SetBidirectional(Bidirectional bidirectional) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETBIDIRECTIONAL, (IntPtr) bidirectional, (IntPtr) Unused); + } + + /// Retrieve line character index state. (Scintilla feature 2710) + public LineCharacterIndexType GetLineCharacterIndex() + { + return (LineCharacterIndexType)Win32.SendMessage(scintilla, SciMsg.SCI_GETLINECHARACTERINDEX, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Request line character index be created or its use count increased. (Scintilla feature 2711) + public void AllocateLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) + { + Win32.SendMessage(scintilla, SciMsg.SCI_ALLOCATELINECHARACTERINDEX, (IntPtr) lineCharacterIndex, (IntPtr) Unused); + } + + /// Decrease use count of line character index and remove if 0. (Scintilla feature 2712) + public void ReleaseLineCharacterIndex(LineCharacterIndexType lineCharacterIndex) + { + Win32.SendMessage(scintilla, SciMsg.SCI_RELEASELINECHARACTERINDEX, (IntPtr) lineCharacterIndex, (IntPtr) Unused); + } + + /// Retrieve the document line containing a position measured in index units. (Scintilla feature 2713) + public int LineFromIndexPosition(int pos, LineCharacterIndexType lineCharacterIndex) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_LINEFROMINDEXPOSITION, (IntPtr) pos, (IntPtr) lineCharacterIndex); + } + + /// Retrieve the position measured in index units at the start of a document line. (Scintilla feature 2714) + public int IndexPositionFromLine(int line, LineCharacterIndexType lineCharacterIndex) + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_INDEXPOSITIONFROMLINE, (IntPtr) line, (IntPtr) lineCharacterIndex); + } + + /// + /// Divide each styling byte into lexical class bits (default: 5) and indicator + /// bits (default: 3). If a lexer requires more than 32 lexical states, then this + /// is used to expand the possible states. + /// (Scintilla feature 2090) + /// + public void SetStyleBits(int bits) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETSTYLEBITS, (IntPtr) bits, (IntPtr) Unused); + } + + /// Retrieve number of bits in style bytes used to hold the lexical state. (Scintilla feature 2091) + public int GetStyleBits() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEBITS, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Retrieve the number of bits the current lexer needs for styling. (Scintilla feature 4011) + public int GetStyleBitsNeeded() + { + return (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETSTYLEBITSNEEDED, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// Deprecated in 3.5.5 + /// Always interpret keyboard input as Unicode + /// (Scintilla feature 2521) + /// + public void SetKeysUnicode(bool keysUnicode) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETKEYSUNICODE, new IntPtr(keysUnicode ? 1 : 0), (IntPtr) Unused); + } + + /// Are keys always interpreted as Unicode? (Scintilla feature 2522) + public bool GetKeysUnicode() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETKEYSUNICODE, (IntPtr) Unused, (IntPtr) Unused); + } + + /// Is drawing done in two phases with backgrounds drawn before foregrounds? (Scintilla feature 2283) + public bool GetTwoPhaseDraw() + { + return 1 == (int)Win32.SendMessage(scintilla, SciMsg.SCI_GETTWOPHASEDRAW, (IntPtr) Unused, (IntPtr) Unused); + } + + /// + /// In twoPhaseDraw mode, drawing is performed in two phases, first the background + /// and then the foreground. This avoids chopping off characters that overlap the next run. + /// (Scintilla feature 2284) + /// + public void SetTwoPhaseDraw(bool twoPhase) + { + Win32.SendMessage(scintilla, SciMsg.SCI_SETTWOPHASEDRAW, new IntPtr(twoPhase ? 1 : 0), (IntPtr) Unused); + } + + /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ + } +} diff --git a/WakaTime/PluginInfrastructure/Scintilla_iface.cs b/WakaTime/PluginInfrastructure/Scintilla_iface.cs index 945c0cf..607c7c3 100644 --- a/WakaTime/PluginInfrastructure/Scintilla_iface.cs +++ b/WakaTime/PluginInfrastructure/Scintilla_iface.cs @@ -1,3286 +1,3286 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -// -// This file should stay in sync with the CPP project file -// "notepad-plus-plus/scintilla/include/Scintilla.iface" -// found at -// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.iface - -using System; -using System.Runtime.InteropServices; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - /// - /// Compatible with Windows NMHDR. - /// hwndFrom is really an environment specific window handle or pointer - /// but most clients of Scintilla.h do not have this type visible. - /// - [StructLayout(LayoutKind.Sequential)] - public struct ScNotificationHeader - { - /// - /// environment specific window handle/pointer - /// - public IntPtr hwndFrom; - - /// - /// CtrlID of the window issuing the notification - /// - public IntPtr IdFrom; - - /// - /// The SCN_* notification Code - /// - public uint Code; - } - - [StructLayout(LayoutKind.Sequential)] - public struct ScNotification - { - public ScNotificationHeader Header; - private int position; /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */ - public int character; /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, SCN_USERLISTSELECTION */ - public int Mmodifiers; /* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE */ - public int ModificationType; /* SCN_MODIFIED - modification types are name "SC_MOD_*" */ - public IntPtr TextPointer; /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */ - public int Length; /* SCN_MODIFIED */ - public int LinesAdded; /* SCN_MODIFIED */ - public int Message; /* SCN_MACRORECORD */ - public IntPtr wParam; /* SCN_MACRORECORD */ - public IntPtr lParam; /* SCN_MACRORECORD */ - - /// - /// 0-based index - /// - public int LineNumber; /* SCN_MODIFIED */ - public int FoldLevelNow; /* SCN_MODIFIED */ - public int FoldLevelPrev; /* SCN_MODIFIED */ - public int Margin; /* SCN_MARGINCLICK */ - public int ListType; /* SCN_USERLISTSELECTION */ - public int X; /* SCN_DWELLSTART, SCN_DWELLEND */ - public int Y; /* SCN_DWELLSTART, SCN_DWELLEND */ - public int Token; /* SCN_MODIFIED with SC_MOD_CONTAINER */ - public int AnnotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */ - public int Updated; /* SCN_UPDATEUI */ - public int ListCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */ - - /// - /// SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION - /// - public Position Position { get { return new Position(position); } } - - /// - /// Character of the notification - eg keydown - /// SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, SCN_USERLISTSELECTION - /// - public char Character { get { return (char) character; } } - } - - [Flags] - public enum SciMsg : uint - { - /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ - INVALID_POSITION = 0xFFFFFFFF, - - SCI_START = 2000, - - SCI_OPTIONAL_START = 3000, - - SCI_LEXER_START = 4000, - - /// Add text to the document at current position. - SCI_ADDTEXT = 2001, - - /// Add array of cells to document. - SCI_ADDSTYLEDTEXT = 2002, - - /// Insert string at a position. - SCI_INSERTTEXT = 2003, - - /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK - SCI_CHANGEINSERTION = 2672, - - /// Delete all text in the document. - SCI_CLEARALL = 2004, - - /// Delete a range of text in the document. - SCI_DELETERANGE = 2645, - - /// Set all style bytes to 0, remove all folding information. - SCI_CLEARDOCUMENTSTYLE = 2005, - - /// Returns the number of bytes in the document. - SCI_GETLENGTH = 2006, - - /// Returns the character byte at the position. - SCI_GETCHARAT = 2007, - - /// Returns the position of the caret. - SCI_GETCURRENTPOS = 2008, - - /// Returns the position of the opposite end of the selection to the caret. - SCI_GETANCHOR = 2009, - - /// Returns the style byte at the position. - SCI_GETSTYLEAT = 2010, - - /// Redoes the next action on the undo history. - SCI_REDO = 2011, - - /// Choose between collecting actions into the undo - /// history and discarding them. - SCI_SETUNDOCOLLECTION = 2012, - - /// Select all the text in the document. - SCI_SELECTALL = 2013, - - /// Remember the current position in the undo history as the position - /// at which the document was saved. - SCI_SETSAVEPOINT = 2014, - - /// Retrieve a buffer of cells. - /// Returns the number of bytes in the buffer not including terminating NULs. - SCI_GETSTYLEDTEXT = 2015, - - /// Are there any redoable actions in the undo history? - SCI_CANREDO = 2016, - - /// Retrieve the line number at which a particular marker is located. - SCI_MARKERLINEFROMHANDLE = 2017, - - /// Delete a marker. - SCI_MARKERDELETEHANDLE = 2018, - - /// Is undo history being collected? - SCI_GETUNDOCOLLECTION = 2019, - - SCWS_INVISIBLE = 0, - - SCWS_VISIBLEALWAYS = 1, - - SCWS_VISIBLEAFTERINDENT = 2, - - SCWS_VISIBLEONLYININDENT = 3, - - /// Are white space characters currently visible? - /// Returns one of SCWS_* constants. - SCI_GETVIEWWS = 2020, - - /// Make white space characters invisible, always visible or visible outside indentation. - SCI_SETVIEWWS = 2021, - - SCTD_LONGARROW = 0, - - SCTD_STRIKEOUT = 1, - - /// Retrieve the current tab draw mode. - /// Returns one of SCTD_* constants. - SCI_GETTABDRAWMODE = 2698, - - /// Set how tabs are drawn when visible. - SCI_SETTABDRAWMODE = 2699, - - /// Find the position from a point within the window. - SCI_POSITIONFROMPOINT = 2022, - - /// Find the position from a point within the window but return - /// INVALID_POSITION if not close to text. - SCI_POSITIONFROMPOINTCLOSE = 2023, - - /// Set caret to start of a line and ensure it is visible. - SCI_GOTOLINE = 2024, - - /// Set caret to a position and ensure it is visible. - SCI_GOTOPOS = 2025, - - /// Set the selection anchor to a position. The anchor is the opposite - /// end of the selection from the caret. - SCI_SETANCHOR = 2026, - - /// Retrieve the text of the line containing the caret. - /// Returns the index of the caret on the line. - /// Result is NUL-terminated. - SCI_GETCURLINE = 2027, - - /// Retrieve the position of the last correctly styled character. - SCI_GETENDSTYLED = 2028, - - SC_EOL_CRLF = 0, - - SC_EOL_CR = 1, - - SC_EOL_LF = 2, - - /// Convert all line endings in the document to one mode. - SCI_CONVERTEOLS = 2029, - - /// Retrieve the current end of line mode - one of CRLF, CR, or LF. - SCI_GETEOLMODE = 2030, - - /// Set the current end of line mode. - SCI_SETEOLMODE = 2031, - - /// Set the current styling position to start. - /// The unused parameter is no longer used and should be set to 0. - SCI_STARTSTYLING = 2032, - - /// Change style from current styling position for length characters to a style - /// and move the current styling position to after this newly styled segment. - SCI_SETSTYLING = 2033, - - /// Is drawing done first into a buffer or direct to the screen? - SCI_GETBUFFEREDDRAW = 2034, - - /// If drawing is buffered then each line of text is drawn into a bitmap buffer - /// before drawing it to the screen to avoid flicker. - SCI_SETBUFFEREDDRAW = 2035, - - /// Change the visible size of a tab to be a multiple of the width of a space character. - SCI_SETTABWIDTH = 2036, - - /// Retrieve the visible size of a tab. - SCI_GETTABWIDTH = 2121, - - /// Clear explicit tabstops on a line. - SCI_CLEARTABSTOPS = 2675, - - /// Add an explicit tab stop for a line. - SCI_ADDTABSTOP = 2676, - - /// Find the next explicit tab stop position on a line after a position. - SCI_GETNEXTTABSTOP = 2677, - - SC_CP_UTF8 = 65001, - - /// Set the code page used to interpret the bytes of the document as characters. - /// The SC_CP_UTF8 value can be used to enter Unicode mode. - SCI_SETCODEPAGE = 2037, - - SC_IME_WINDOWED = 0, - - SC_IME_INLINE = 1, - - /// Is the IME displayed in a window or inline? - SCI_GETIMEINTERACTION = 2678, - - /// Choose to display the the IME in a winow or inline. - SCI_SETIMEINTERACTION = 2679, - - MARKER_MAX = 31, - - SC_MARK_CIRCLE = 0, - - SC_MARK_ROUNDRECT = 1, - - SC_MARK_ARROW = 2, - - SC_MARK_SMALLRECT = 3, - - SC_MARK_SHORTARROW = 4, - - SC_MARK_EMPTY = 5, - - SC_MARK_ARROWDOWN = 6, - - SC_MARK_MINUS = 7, - - SC_MARK_PLUS = 8, - - SC_MARK_VLINE = 9, - - SC_MARK_LCORNER = 10, - - SC_MARK_TCORNER = 11, - - SC_MARK_BOXPLUS = 12, - - SC_MARK_BOXPLUSCONNECTED = 13, - - SC_MARK_BOXMINUS = 14, - - SC_MARK_BOXMINUSCONNECTED = 15, - - SC_MARK_LCORNERCURVE = 16, - - SC_MARK_TCORNERCURVE = 17, - - SC_MARK_CIRCLEPLUS = 18, - - SC_MARK_CIRCLEPLUSCONNECTED = 19, - - SC_MARK_CIRCLEMINUS = 20, - - SC_MARK_CIRCLEMINUSCONNECTED = 21, - - SC_MARK_BACKGROUND = 22, - - SC_MARK_DOTDOTDOT = 23, - - SC_MARK_ARROWS = 24, - - SC_MARK_PIXMAP = 25, - - SC_MARK_FULLRECT = 26, - - SC_MARK_LEFTRECT = 27, - - SC_MARK_AVAILABLE = 28, - - SC_MARK_UNDERLINE = 29, - - SC_MARK_RGBAIMAGE = 30, - - SC_MARK_BOOKMARK = 31, - - SC_MARK_VERTICALBOOKMARK = 32, - - SC_MARK_CHARACTER = 10000, - - SC_MARKNUM_FOLDEREND = 25, - - SC_MARKNUM_FOLDEROPENMID = 26, - - SC_MARKNUM_FOLDERMIDTAIL = 27, - - SC_MARKNUM_FOLDERTAIL = 28, - - SC_MARKNUM_FOLDERSUB = 29, - - SC_MARKNUM_FOLDER = 30, - - SC_MARKNUM_FOLDEROPEN = 31, - - SC_MASK_FOLDERS = 0xFE000000, - - /// Set the symbol used for a particular marker number. - SCI_MARKERDEFINE = 2040, - - /// Set the foreground colour used for a particular marker number. - SCI_MARKERSETFORE = 2041, - - /// Set the background colour used for a particular marker number. - SCI_MARKERSETBACK = 2042, - - /// Set the background colour used for a particular marker number when its folding block is selected. - SCI_MARKERSETBACKSELECTED = 2292, - - /// Enable/disable highlight for current folding bloc (smallest one that contains the caret) - SCI_MARKERENABLEHIGHLIGHT = 2293, - - /// Add a marker to a line, returning an ID which can be used to find or delete the marker. - SCI_MARKERADD = 2043, - - /// Delete a marker from a line. - SCI_MARKERDELETE = 2044, - - /// Delete all markers with a particular number from all lines. - SCI_MARKERDELETEALL = 2045, - - /// Get a bit mask of all the markers set on a line. - SCI_MARKERGET = 2046, - - /// Find the next line at or after lineStart that includes a marker in mask. - /// Return -1 when no more lines. - SCI_MARKERNEXT = 2047, - - /// Find the previous line before lineStart that includes a marker in mask. - SCI_MARKERPREVIOUS = 2048, - - /// Define a marker from a pixmap. - SCI_MARKERDEFINEPIXMAP = 2049, - - /// Add a set of markers to a line. - SCI_MARKERADDSET = 2466, - - /// Set the alpha used for a marker that is drawn in the text area, not the margin. - SCI_MARKERSETALPHA = 2476, - - SC_MAX_MARGIN = 4, - - SC_MARGIN_SYMBOL = 0, - - SC_MARGIN_NUMBER = 1, - - SC_MARGIN_BACK = 2, - - SC_MARGIN_FORE = 3, - - SC_MARGIN_TEXT = 4, - - SC_MARGIN_RTEXT = 5, - - SC_MARGIN_COLOUR = 6, - - /// Set a margin to be either numeric or symbolic. - SCI_SETMARGINTYPEN = 2240, - - /// Retrieve the type of a margin. - SCI_GETMARGINTYPEN = 2241, - - /// Set the width of a margin to a width expressed in pixels. - SCI_SETMARGINWIDTHN = 2242, - - /// Retrieve the width of a margin in pixels. - SCI_GETMARGINWIDTHN = 2243, - - /// Set a mask that determines which markers are displayed in a margin. - SCI_SETMARGINMASKN = 2244, - - /// Retrieve the marker mask of a margin. - SCI_GETMARGINMASKN = 2245, - - /// Make a margin sensitive or insensitive to mouse clicks. - SCI_SETMARGINSENSITIVEN = 2246, - - /// Retrieve the mouse click sensitivity of a margin. - SCI_GETMARGINSENSITIVEN = 2247, - - /// Set the cursor shown when the mouse is inside a margin. - SCI_SETMARGINCURSORN = 2248, - - /// Retrieve the cursor shown in a margin. - SCI_GETMARGINCURSORN = 2249, - - /// Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. - SCI_SETMARGINBACKN = 2250, - - /// Retrieve the background colour of a margin - SCI_GETMARGINBACKN = 2251, - - /// Allocate a non-standard number of margins. - SCI_SETMARGINS = 2252, - - /// How many margins are there?. - SCI_GETMARGINS = 2253, - - STYLE_DEFAULT = 32, - - STYLE_LINENUMBER = 33, - - STYLE_BRACELIGHT = 34, - - STYLE_BRACEBAD = 35, - - STYLE_CONTROLCHAR = 36, - - STYLE_INDENTGUIDE = 37, - - STYLE_CALLTIP = 38, - - STYLE_FOLDDISPLAYTEXT = 39, - - STYLE_LASTPREDEFINED = 39, - - STYLE_MAX = 255, - - SC_CHARSET_ANSI = 0, - - SC_CHARSET_DEFAULT = 1, - - SC_CHARSET_BALTIC = 186, - - SC_CHARSET_CHINESEBIG5 = 136, - - SC_CHARSET_EASTEUROPE = 238, - - SC_CHARSET_GB2312 = 134, - - SC_CHARSET_GREEK = 161, - - SC_CHARSET_HANGUL = 129, - - SC_CHARSET_MAC = 77, - - SC_CHARSET_OEM = 255, - - SC_CHARSET_RUSSIAN = 204, - - SC_CHARSET_OEM866 = 866, - - SC_CHARSET_CYRILLIC = 1251, - - SC_CHARSET_SHIFTJIS = 128, - - SC_CHARSET_SYMBOL = 2, - - SC_CHARSET_TURKISH = 162, - - SC_CHARSET_JOHAB = 130, - - SC_CHARSET_HEBREW = 177, - - SC_CHARSET_ARABIC = 178, - - SC_CHARSET_VIETNAMESE = 163, - - SC_CHARSET_THAI = 222, - - SC_CHARSET_8859_15 = 1000, - - /// Clear all the styles and make equivalent to the global default style. - SCI_STYLECLEARALL = 2050, - - /// Set the foreground colour of a style. - SCI_STYLESETFORE = 2051, - - /// Set the background colour of a style. - SCI_STYLESETBACK = 2052, - - /// Set a style to be bold or not. - SCI_STYLESETBOLD = 2053, - - /// Set a style to be italic or not. - SCI_STYLESETITALIC = 2054, - - /// Set the size of characters of a style. - SCI_STYLESETSIZE = 2055, - - /// Set the font of a style. - SCI_STYLESETFONT = 2056, - - /// Set a style to have its end of line filled or not. - SCI_STYLESETEOLFILLED = 2057, - - /// Reset the default style to its state at startup - SCI_STYLERESETDEFAULT = 2058, - - /// Set a style to be underlined or not. - SCI_STYLESETUNDERLINE = 2059, - - SC_CASE_MIXED = 0, - - SC_CASE_UPPER = 1, - - SC_CASE_LOWER = 2, - - SC_CASE_CAMEL = 3, - - /// Get the foreground colour of a style. - SCI_STYLEGETFORE = 2481, - - /// Get the background colour of a style. - SCI_STYLEGETBACK = 2482, - - /// Get is a style bold or not. - SCI_STYLEGETBOLD = 2483, - - /// Get is a style italic or not. - SCI_STYLEGETITALIC = 2484, - - /// Get the size of characters of a style. - SCI_STYLEGETSIZE = 2485, - - /// Get the font of a style. - /// Returns the length of the fontName - /// Result is NUL-terminated. - SCI_STYLEGETFONT = 2486, - - /// Get is a style to have its end of line filled or not. - SCI_STYLEGETEOLFILLED = 2487, - - /// Get is a style underlined or not. - SCI_STYLEGETUNDERLINE = 2488, - - /// Get is a style mixed case, or to force upper or lower case. - SCI_STYLEGETCASE = 2489, - - /// Get the character get of the font in a style. - SCI_STYLEGETCHARACTERSET = 2490, - - /// Get is a style visible or not. - SCI_STYLEGETVISIBLE = 2491, - - /// Get is a style changeable or not (read only). - /// Experimental feature, currently buggy. - SCI_STYLEGETCHANGEABLE = 2492, - - /// Get is a style a hotspot or not. - SCI_STYLEGETHOTSPOT = 2493, - - /// Set a style to be mixed case, or to force upper or lower case. - SCI_STYLESETCASE = 2060, - - SC_FONT_SIZE_MULTIPLIER = 100, - - /// Set the size of characters of a style. Size is in points multiplied by 100. - SCI_STYLESETSIZEFRACTIONAL = 2061, - - /// Get the size of characters of a style in points multiplied by 100 - SCI_STYLEGETSIZEFRACTIONAL = 2062, - - SC_WEIGHT_NORMAL = 400, - - SC_WEIGHT_SEMIBOLD = 600, - - SC_WEIGHT_BOLD = 700, - - /// Set the weight of characters of a style. - SCI_STYLESETWEIGHT = 2063, - - /// Get the weight of characters of a style. - SCI_STYLEGETWEIGHT = 2064, - - /// Set the character set of the font in a style. - SCI_STYLESETCHARACTERSET = 2066, - - /// Set a style to be a hotspot or not. - SCI_STYLESETHOTSPOT = 2409, - - /// Set the foreground colour of the main and additional selections and whether to use this setting. - SCI_SETSELFORE = 2067, - - /// Set the background colour of the main and additional selections and whether to use this setting. - SCI_SETSELBACK = 2068, - - /// Get the alpha of the selection. - SCI_GETSELALPHA = 2477, - - /// Set the alpha of the selection. - SCI_SETSELALPHA = 2478, - - /// Is the selection end of line filled? - SCI_GETSELEOLFILLED = 2479, - - /// Set the selection to have its end of line filled or not. - SCI_SETSELEOLFILLED = 2480, - - /// Set the foreground colour of the caret. - SCI_SETCARETFORE = 2069, - - /// When key+modifier combination keyDefinition is pressed perform sciCommand. - SCI_ASSIGNCMDKEY = 2070, - - /// When key+modifier combination keyDefinition is pressed do nothing. - SCI_CLEARCMDKEY = 2071, - - /// Drop all key mappings. - SCI_CLEARALLCMDKEYS = 2072, - - /// Set the styles for a segment of the document. - SCI_SETSTYLINGEX = 2073, - - /// Set a style to be visible or not. - SCI_STYLESETVISIBLE = 2074, - - /// Get the time in milliseconds that the caret is on and off. - SCI_GETCARETPERIOD = 2075, - - /// Get the time in milliseconds that the caret is on and off. 0 = steady on. - SCI_SETCARETPERIOD = 2076, - - /// Set the set of characters making up words for when moving or selecting by word. - /// First sets defaults like SetCharsDefault. - SCI_SETWORDCHARS = 2077, - - /// Get the set of characters making up words for when moving or selecting by word. - /// Returns the number of characters - SCI_GETWORDCHARS = 2646, - - /// Set the number of characters to have directly indexed categories - SCI_SETCHARACTERCATEGORYOPTIMIZATION = 2720, - - /// Get the number of characters to have directly indexed categories - SCI_GETCHARACTERCATEGORYOPTIMIZATION = 2721, - - /// Start a sequence of actions that is undone and redone as a unit. - /// May be nested. - SCI_BEGINUNDOACTION = 2078, - - /// End a sequence of actions that is undone and redone as a unit. - SCI_ENDUNDOACTION = 2079, - - INDIC_PLAIN = 0, - - INDIC_SQUIGGLE = 1, - - INDIC_TT = 2, - - INDIC_DIAGONAL = 3, - - INDIC_STRIKE = 4, - - INDIC_HIDDEN = 5, - - INDIC_BOX = 6, - - INDIC_ROUNDBOX = 7, - - INDIC_STRAIGHTBOX = 8, - - INDIC_DASH = 9, - - INDIC_DOTS = 10, - - INDIC_SQUIGGLELOW = 11, - - INDIC_DOTBOX = 12, - - INDIC_SQUIGGLEPIXMAP = 13, - - INDIC_COMPOSITIONTHICK = 14, - - INDIC_COMPOSITIONTHIN = 15, - - INDIC_FULLBOX = 16, - - INDIC_TEXTFORE = 17, - - INDIC_POINT = 18, - - INDIC_POINTCHARACTER = 19, - - INDIC_GRADIENT = 20, - - INDIC_GRADIENTCENTRE = 21, - - INDIC_CONTAINER = 8, - - INDIC_IME = 32, - - INDIC_IME_MAX = 35, - - INDIC_MAX = 35, - - INDICATOR_CONTAINER = 8, - - INDICATOR_IME = 32, - - INDICATOR_IME_MAX = 35, - - INDICATOR_MAX = 35, - - /// Set an indicator to plain, squiggle or TT. - SCI_INDICSETSTYLE = 2080, - - /// Retrieve the style of an indicator. - SCI_INDICGETSTYLE = 2081, - - /// Set the foreground colour of an indicator. - SCI_INDICSETFORE = 2082, - - /// Retrieve the foreground colour of an indicator. - SCI_INDICGETFORE = 2083, - - /// Set an indicator to draw under text or over(default). - SCI_INDICSETUNDER = 2510, - - /// Retrieve whether indicator drawn under or over text. - SCI_INDICGETUNDER = 2511, - - /// Set a hover indicator to plain, squiggle or TT. - SCI_INDICSETHOVERSTYLE = 2680, - - /// Retrieve the hover style of an indicator. - SCI_INDICGETHOVERSTYLE = 2681, - - /// Set the foreground hover colour of an indicator. - SCI_INDICSETHOVERFORE = 2682, - - /// Retrieve the foreground hover colour of an indicator. - SCI_INDICGETHOVERFORE = 2683, - - SC_INDICVALUEBIT = 0x1000000, - - SC_INDICVALUEMASK = 0xFFFFFF, - - SC_INDICFLAG_VALUEFORE = 1, - - /// Set the attributes of an indicator. - SCI_INDICSETFLAGS = 2684, - - /// Retrieve the attributes of an indicator. - SCI_INDICGETFLAGS = 2685, - - /// Set the foreground colour of all whitespace and whether to use this setting. - SCI_SETWHITESPACEFORE = 2084, - - /// Set the background colour of all whitespace and whether to use this setting. - SCI_SETWHITESPACEBACK = 2085, - - /// Set the size of the dots used to mark space characters. - SCI_SETWHITESPACESIZE = 2086, - - /// Get the size of the dots used to mark space characters. - SCI_GETWHITESPACESIZE = 2087, - - /// Used to hold extra styling information for each line. - SCI_SETLINESTATE = 2092, - - /// Retrieve the extra styling information for a line. - SCI_GETLINESTATE = 2093, - - /// Retrieve the last line number that has line state. - SCI_GETMAXLINESTATE = 2094, - - /// Is the background of the line containing the caret in a different colour? - SCI_GETCARETLINEVISIBLE = 2095, - - /// Display the background of the line containing the caret in a different colour. - SCI_SETCARETLINEVISIBLE = 2096, - - /// Get the colour of the background of the line containing the caret. - SCI_GETCARETLINEBACK = 2097, - - /// Set the colour of the background of the line containing the caret. - SCI_SETCARETLINEBACK = 2098, - - /// Retrieve the caret line frame width. - /// Width = 0 means this option is disabled. - SCI_GETCARETLINEFRAME = 2704, - - /// Display the caret line framed. - /// Set width != 0 to enable this option and width = 0 to disable it. - SCI_SETCARETLINEFRAME = 2705, - - /// Set a style to be changeable or not (read only). - /// Experimental feature, currently buggy. - SCI_STYLESETCHANGEABLE = 2099, - - /// Display a auto-completion list. - /// The lengthEntered parameter indicates how many characters before - /// the caret should be used to provide context. - SCI_AUTOCSHOW = 2100, - - /// Remove the auto-completion list from the screen. - SCI_AUTOCCANCEL = 2101, - - /// Is there an auto-completion list visible? - SCI_AUTOCACTIVE = 2102, - - /// Retrieve the position of the caret when the auto-completion list was displayed. - SCI_AUTOCPOSSTART = 2103, - - /// User has selected an item so remove the list and insert the selection. - SCI_AUTOCCOMPLETE = 2104, - - /// Define a set of character that when typed cancel the auto-completion list. - SCI_AUTOCSTOPS = 2105, - - /// Change the separator character in the string setting up an auto-completion list. - /// Default is space but can be changed if items contain space. - SCI_AUTOCSETSEPARATOR = 2106, - - /// Retrieve the auto-completion list separator character. - SCI_AUTOCGETSEPARATOR = 2107, - - /// Select the item in the auto-completion list that starts with a string. - SCI_AUTOCSELECT = 2108, - - /// Should the auto-completion list be cancelled if the user backspaces to a - /// position before where the box was created. - SCI_AUTOCSETCANCELATSTART = 2110, - - /// Retrieve whether auto-completion cancelled by backspacing before start. - SCI_AUTOCGETCANCELATSTART = 2111, - - /// Define a set of characters that when typed will cause the autocompletion to - /// choose the selected item. - SCI_AUTOCSETFILLUPS = 2112, - - /// Should a single item auto-completion list automatically choose the item. - SCI_AUTOCSETCHOOSESINGLE = 2113, - - /// Retrieve whether a single item auto-completion list automatically choose the item. - SCI_AUTOCGETCHOOSESINGLE = 2114, - - /// Set whether case is significant when performing auto-completion searches. - SCI_AUTOCSETIGNORECASE = 2115, - - /// Retrieve state of ignore case flag. - SCI_AUTOCGETIGNORECASE = 2116, - - /// Display a list of strings and send notification when user chooses one. - SCI_USERLISTSHOW = 2117, - - /// Set whether or not autocompletion is hidden automatically when nothing matches. - SCI_AUTOCSETAUTOHIDE = 2118, - - /// Retrieve whether or not autocompletion is hidden automatically when nothing matches. - SCI_AUTOCGETAUTOHIDE = 2119, - - /// Set whether or not autocompletion deletes any word characters - /// after the inserted text upon completion. - SCI_AUTOCSETDROPRESTOFWORD = 2270, - - /// Retrieve whether or not autocompletion deletes any word characters - /// after the inserted text upon completion. - SCI_AUTOCGETDROPRESTOFWORD = 2271, - - /// Register an XPM image for use in autocompletion lists. - SCI_REGISTERIMAGE = 2405, - - /// Clear all the registered XPM images. - SCI_CLEARREGISTEREDIMAGES = 2408, - - /// Retrieve the auto-completion list type-separator character. - SCI_AUTOCGETTYPESEPARATOR = 2285, - - /// Change the type-separator character in the string setting up an auto-completion list. - /// Default is '?' but can be changed if items contain '?'. - SCI_AUTOCSETTYPESEPARATOR = 2286, - - /// Set the maximum width, in characters, of auto-completion and user lists. - /// Set to 0 to autosize to fit longest item, which is the default. - SCI_AUTOCSETMAXWIDTH = 2208, - - /// Get the maximum width, in characters, of auto-completion and user lists. - SCI_AUTOCGETMAXWIDTH = 2209, - - /// Set the maximum height, in rows, of auto-completion and user lists. - /// The default is 5 rows. - SCI_AUTOCSETMAXHEIGHT = 2210, - - /// Set the maximum height, in rows, of auto-completion and user lists. - SCI_AUTOCGETMAXHEIGHT = 2211, - - /// Set the number of spaces used for one level of indentation. - SCI_SETINDENT = 2122, - - /// Retrieve indentation size. - SCI_GETINDENT = 2123, - - /// Indentation will only use space characters if useTabs is false, otherwise - /// it will use a combination of tabs and spaces. - SCI_SETUSETABS = 2124, - - /// Retrieve whether tabs will be used in indentation. - SCI_GETUSETABS = 2125, - - /// Change the indentation of a line to a number of columns. - SCI_SETLINEINDENTATION = 2126, - - /// Retrieve the number of columns that a line is indented. - SCI_GETLINEINDENTATION = 2127, - - /// Retrieve the position before the first non indentation character on a line. - SCI_GETLINEINDENTPOSITION = 2128, - - /// Retrieve the column number of a position, taking tab width into account. - SCI_GETCOLUMN = 2129, - - /// Count characters between two positions. - SCI_COUNTCHARACTERS = 2633, - - /// Count code units between two positions. - SCI_COUNTCODEUNITS = 2715, - - /// Show or hide the horizontal scroll bar. - SCI_SETHSCROLLBAR = 2130, - - /// Is the horizontal scroll bar visible? - SCI_GETHSCROLLBAR = 2131, - - SC_IV_NONE = 0, - - SC_IV_REAL = 1, - - SC_IV_LOOKFORWARD = 2, - - SC_IV_LOOKBOTH = 3, - - /// Show or hide indentation guides. - SCI_SETINDENTATIONGUIDES = 2132, - - /// Are the indentation guides visible? - SCI_GETINDENTATIONGUIDES = 2133, - - /// Set the highlighted indentation guide column. - /// 0 = no highlighted guide. - SCI_SETHIGHLIGHTGUIDE = 2134, - - /// Get the highlighted indentation guide column. - SCI_GETHIGHLIGHTGUIDE = 2135, - - /// Get the position after the last visible characters on a line. - SCI_GETLINEENDPOSITION = 2136, - - /// Get the code page used to interpret the bytes of the document as characters. - SCI_GETCODEPAGE = 2137, - - /// Get the foreground colour of the caret. - SCI_GETCARETFORE = 2138, - - /// In read-only mode? - SCI_GETREADONLY = 2140, - - /// Sets the position of the caret. - SCI_SETCURRENTPOS = 2141, - - /// Sets the position that starts the selection - this becomes the anchor. - SCI_SETSELECTIONSTART = 2142, - - /// Returns the position at the start of the selection. - SCI_GETSELECTIONSTART = 2143, - - /// Sets the position that ends the selection - this becomes the caret. - SCI_SETSELECTIONEND = 2144, - - /// Returns the position at the end of the selection. - SCI_GETSELECTIONEND = 2145, - - /// Set caret to a position, while removing any existing selection. - SCI_SETEMPTYSELECTION = 2556, - - /// Sets the print magnification added to the point size of each style for printing. - SCI_SETPRINTMAGNIFICATION = 2146, - - /// Returns the print magnification. - SCI_GETPRINTMAGNIFICATION = 2147, - - SC_PRINT_NORMAL = 0, - - SC_PRINT_INVERTLIGHT = 1, - - SC_PRINT_BLACKONWHITE = 2, - - SC_PRINT_COLOURONWHITE = 3, - - SC_PRINT_COLOURONWHITEDEFAULTBG = 4, - - SC_PRINT_SCREENCOLOURS = 5, - - /// Modify colours when printing for clearer printed text. - SCI_SETPRINTCOLOURMODE = 2148, - - /// Returns the print colour mode. - SCI_GETPRINTCOLOURMODE = 2149, - - SCFIND_NONE = 0x0, - - SCFIND_WHOLEWORD = 0x2, - - SCFIND_MATCHCASE = 0x4, - - SCFIND_WORDSTART = 0x00100000, - - SCFIND_REGEXP = 0x00200000, - - SCFIND_POSIX = 0x00400000, - - SCFIND_CXX11REGEX = 0x00800000, - - /// Find some text in the document. - SCI_FINDTEXT = 2150, - - /// On Windows, will draw the document into a display context such as a printer. - SCI_FORMATRANGE = 2151, - - /// Retrieve the display line at the top of the display. - SCI_GETFIRSTVISIBLELINE = 2152, - - /// Retrieve the contents of a line. - /// Returns the length of the line. - SCI_GETLINE = 2153, - - /// Returns the number of lines in the document. There is always at least one. - SCI_GETLINECOUNT = 2154, - - /// Sets the size in pixels of the left margin. - SCI_SETMARGINLEFT = 2155, - - /// Returns the size in pixels of the left margin. - SCI_GETMARGINLEFT = 2156, - - /// Sets the size in pixels of the right margin. - SCI_SETMARGINRIGHT = 2157, - - /// Returns the size in pixels of the right margin. - SCI_GETMARGINRIGHT = 2158, - - /// Is the document different from when it was last saved? - SCI_GETMODIFY = 2159, - - /// Select a range of text. - SCI_SETSEL = 2160, - - /// Retrieve the selected text. - /// Return the length of the text. - /// Result is NUL-terminated. - SCI_GETSELTEXT = 2161, - - /// Retrieve a range of text. - /// Return the length of the text. - SCI_GETTEXTRANGE = 2162, - - /// Draw the selection either highlighted or in normal (non-highlighted) style. - SCI_HIDESELECTION = 2163, - - /// Retrieve the x value of the point in the window where a position is displayed. - SCI_POINTXFROMPOSITION = 2164, - - /// Retrieve the y value of the point in the window where a position is displayed. - SCI_POINTYFROMPOSITION = 2165, - - /// Retrieve the line containing a position. - SCI_LINEFROMPOSITION = 2166, - - /// Retrieve the position at the start of a line. - SCI_POSITIONFROMLINE = 2167, - - /// Scroll horizontally and vertically. - SCI_LINESCROLL = 2168, - - /// Ensure the caret is visible. - SCI_SCROLLCARET = 2169, - - /// Scroll the argument positions and the range between them into view giving - /// priority to the primary position then the secondary position. - /// This may be used to make a search match visible. - SCI_SCROLLRANGE = 2569, - - /// Replace the selected text with the argument text. - SCI_REPLACESEL = 2170, - - /// Set to read only or read write. - SCI_SETREADONLY = 2171, - - /// Null operation. - SCI_NULL = 2172, - - /// Will a paste succeed? - SCI_CANPASTE = 2173, - - /// Are there any undoable actions in the undo history? - SCI_CANUNDO = 2174, - - /// Delete the undo history. - SCI_EMPTYUNDOBUFFER = 2175, - - /// Undo one action in the undo history. - SCI_UNDO = 2176, - - /// Cut the selection to the clipboard. - SCI_CUT = 2177, - - /// Copy the selection to the clipboard. - SCI_COPY = 2178, - - /// Paste the contents of the clipboard into the document replacing the selection. - SCI_PASTE = 2179, - - /// Clear the selection. - SCI_CLEAR = 2180, - - /// Replace the contents of the document with the argument text. - SCI_SETTEXT = 2181, - - /// Retrieve all the text in the document. - /// Returns number of characters retrieved. - /// Result is NUL-terminated. - SCI_GETTEXT = 2182, - - /// Retrieve the number of characters in the document. - SCI_GETTEXTLENGTH = 2183, - - /// Retrieve a pointer to a function that processes messages for this Scintilla. - SCI_GETDIRECTFUNCTION = 2184, - - /// Retrieve a pointer value to use as the first argument when calling - /// the function returned by GetDirectFunction. - SCI_GETDIRECTPOINTER = 2185, - - /// Set to overtype (true) or insert mode. - SCI_SETOVERTYPE = 2186, - - /// Returns true if overtype mode is active otherwise false is returned. - SCI_GETOVERTYPE = 2187, - - /// Set the width of the insert mode caret. - SCI_SETCARETWIDTH = 2188, - - /// Returns the width of the insert mode caret. - SCI_GETCARETWIDTH = 2189, - - /// Sets the position that starts the target which is used for updating the - /// document without affecting the scroll position. - SCI_SETTARGETSTART = 2190, - - /// Get the position that starts the target. - SCI_GETTARGETSTART = 2191, - - /// Sets the position that ends the target which is used for updating the - /// document without affecting the scroll position. - SCI_SETTARGETEND = 2192, - - /// Get the position that ends the target. - SCI_GETTARGETEND = 2193, - - /// Sets both the start and end of the target in one call. - SCI_SETTARGETRANGE = 2686, - - /// Retrieve the text in the target. - SCI_GETTARGETTEXT = 2687, - - /// Make the target range start and end be the same as the selection range start and end. - SCI_TARGETFROMSELECTION = 2287, - - /// Sets the target to the whole document. - SCI_TARGETWHOLEDOCUMENT = 2690, - - /// Replace the target text with the argument text. - /// Text is counted so it can contain NULs. - /// Returns the length of the replacement text. - SCI_REPLACETARGET = 2194, - - /// Replace the target text with the argument text after \d processing. - /// Text is counted so it can contain NULs. - /// Looks for \d where d is between 1 and 9 and replaces these with the strings - /// matched in the last search operation which were surrounded by \( and \). - /// Returns the length of the replacement text including any change - /// caused by processing the \d patterns. - SCI_REPLACETARGETRE = 2195, - - /// Search for a counted string in the target and set the target to the found - /// range. Text is counted so it can contain NULs. - /// Returns start of found range or -1 for failure in which case target is not moved. - SCI_SEARCHINTARGET = 2197, - - /// Set the search flags used by SearchInTarget. - SCI_SETSEARCHFLAGS = 2198, - - /// Get the search flags used by SearchInTarget. - SCI_GETSEARCHFLAGS = 2199, - - /// Show a call tip containing a definition near position pos. - SCI_CALLTIPSHOW = 2200, - - /// Remove the call tip from the screen. - SCI_CALLTIPCANCEL = 2201, - - /// Is there an active call tip? - SCI_CALLTIPACTIVE = 2202, - - /// Retrieve the position where the caret was before displaying the call tip. - SCI_CALLTIPPOSSTART = 2203, - - /// Set the start position in order to change when backspacing removes the calltip. - SCI_CALLTIPSETPOSSTART = 2214, - - /// Highlight a segment of the definition. - SCI_CALLTIPSETHLT = 2204, - - /// Set the background colour for the call tip. - SCI_CALLTIPSETBACK = 2205, - - /// Set the foreground colour for the call tip. - SCI_CALLTIPSETFORE = 2206, - - /// Set the foreground colour for the highlighted part of the call tip. - SCI_CALLTIPSETFOREHLT = 2207, - - /// Enable use of STYLE_CALLTIP and set call tip tab size in pixels. - SCI_CALLTIPUSESTYLE = 2212, - - /// Set position of calltip, above or below text. - SCI_CALLTIPSETPOSITION = 2213, - - /// Find the display line of a document line taking hidden lines into account. - SCI_VISIBLEFROMDOCLINE = 2220, - - /// Find the document line of a display line taking hidden lines into account. - SCI_DOCLINEFROMVISIBLE = 2221, - - /// The number of display lines needed to wrap a document line - SCI_WRAPCOUNT = 2235, - - SC_FOLDLEVELBASE = 0x400, - - SC_FOLDLEVELWHITEFLAG = 0x1000, - - SC_FOLDLEVELHEADERFLAG = 0x2000, - - SC_FOLDLEVELNUMBERMASK = 0x0FFF, - - /// Set the fold level of a line. - /// This encodes an integer level along with flags indicating whether the - /// line is a header and whether it is effectively white space. - SCI_SETFOLDLEVEL = 2222, - - /// Retrieve the fold level of a line. - SCI_GETFOLDLEVEL = 2223, - - /// Find the last child line of a header line. - SCI_GETLASTCHILD = 2224, - - /// Find the parent line of a child line. - SCI_GETFOLDPARENT = 2225, - - /// Make a range of lines visible. - SCI_SHOWLINES = 2226, - - /// Make a range of lines invisible. - SCI_HIDELINES = 2227, - - /// Is a line visible? - SCI_GETLINEVISIBLE = 2228, - - /// Are all lines visible? - SCI_GETALLLINESVISIBLE = 2236, - - /// Show the children of a header line. - SCI_SETFOLDEXPANDED = 2229, - - /// Is a header line expanded? - SCI_GETFOLDEXPANDED = 2230, - - /// Switch a header line between expanded and contracted. - SCI_TOGGLEFOLD = 2231, - - /// Switch a header line between expanded and contracted and show some text after the line. - SCI_TOGGLEFOLDSHOWTEXT = 2700, - - SC_FOLDDISPLAYTEXT_HIDDEN = 0, - - SC_FOLDDISPLAYTEXT_STANDARD = 1, - - SC_FOLDDISPLAYTEXT_BOXED = 2, - - /// Set the style of fold display text. - SCI_FOLDDISPLAYTEXTSETSTYLE = 2701, - - /// Get the style of fold display text. - SCI_FOLDDISPLAYTEXTGETSTYLE = 2707, - - /// Set the default fold display text. - SCI_SETDEFAULTFOLDDISPLAYTEXT = 2722, - - /// Get the default fold display text. - SCI_GETDEFAULTFOLDDISPLAYTEXT = 2723, - - SC_FOLDACTION_CONTRACT = 0, - - SC_FOLDACTION_EXPAND = 1, - - SC_FOLDACTION_TOGGLE = 2, - - /// Expand or contract a fold header. - SCI_FOLDLINE = 2237, - - /// Expand or contract a fold header and its children. - SCI_FOLDCHILDREN = 2238, - - /// Expand a fold header and all children. Use the level argument instead of the line's current level. - SCI_EXPANDCHILDREN = 2239, - - /// Expand or contract all fold headers. - SCI_FOLDALL = 2662, - - /// Ensure a particular line is visible by expanding any header line hiding it. - SCI_ENSUREVISIBLE = 2232, - - SC_AUTOMATICFOLD_SHOW = 0x0001, - - SC_AUTOMATICFOLD_CLICK = 0x0002, - - SC_AUTOMATICFOLD_CHANGE = 0x0004, - - /// Set automatic folding behaviours. - SCI_SETAUTOMATICFOLD = 2663, - - /// Get automatic folding behaviours. - SCI_GETAUTOMATICFOLD = 2664, - - SC_FOLDFLAG_LINEBEFORE_EXPANDED = 0x0002, - - SC_FOLDFLAG_LINEBEFORE_CONTRACTED = 0x0004, - - SC_FOLDFLAG_LINEAFTER_EXPANDED = 0x0008, - - SC_FOLDFLAG_LINEAFTER_CONTRACTED = 0x0010, - - SC_FOLDFLAG_LEVELNUMBERS = 0x0040, - - SC_FOLDFLAG_LINESTATE = 0x0080, - - /// Set some style options for folding. - SCI_SETFOLDFLAGS = 2233, - - /// Ensure a particular line is visible by expanding any header line hiding it. - /// Use the currently set visibility policy to determine which range to display. - SCI_ENSUREVISIBLEENFORCEPOLICY = 2234, - - /// Sets whether a tab pressed when caret is within indentation indents. - SCI_SETTABINDENTS = 2260, - - /// Does a tab pressed when caret is within indentation indent? - SCI_GETTABINDENTS = 2261, - - /// Sets whether a backspace pressed when caret is within indentation unindents. - SCI_SETBACKSPACEUNINDENTS = 2262, - - /// Does a backspace pressed when caret is within indentation unindent? - SCI_GETBACKSPACEUNINDENTS = 2263, - - SC_TIME_FOREVER = 10000000, - - /// Sets the time the mouse must sit still to generate a mouse dwell event. - SCI_SETMOUSEDWELLTIME = 2264, - - /// Retrieve the time the mouse must sit still to generate a mouse dwell event. - SCI_GETMOUSEDWELLTIME = 2265, - - /// Get position of start of word. - SCI_WORDSTARTPOSITION = 2266, - - /// Get position of end of word. - SCI_WORDENDPOSITION = 2267, - - /// Is the range start..end considered a word? - SCI_ISRANGEWORD = 2691, - - SC_IDLESTYLING_NONE = 0, - - SC_IDLESTYLING_TOVISIBLE = 1, - - SC_IDLESTYLING_AFTERVISIBLE = 2, - - SC_IDLESTYLING_ALL = 3, - - /// Sets limits to idle styling. - SCI_SETIDLESTYLING = 2692, - - /// Retrieve the limits to idle styling. - SCI_GETIDLESTYLING = 2693, - - SC_WRAP_NONE = 0, - - SC_WRAP_WORD = 1, - - SC_WRAP_CHAR = 2, - - SC_WRAP_WHITESPACE = 3, - - /// Sets whether text is word wrapped. - SCI_SETWRAPMODE = 2268, - - /// Retrieve whether text is word wrapped. - SCI_GETWRAPMODE = 2269, - - SC_WRAPVISUALFLAG_NONE = 0x0000, - - SC_WRAPVISUALFLAG_END = 0x0001, - - SC_WRAPVISUALFLAG_START = 0x0002, - - SC_WRAPVISUALFLAG_MARGIN = 0x0004, - - /// Set the display mode of visual flags for wrapped lines. - SCI_SETWRAPVISUALFLAGS = 2460, - - /// Retrive the display mode of visual flags for wrapped lines. - SCI_GETWRAPVISUALFLAGS = 2461, - - SC_WRAPVISUALFLAGLOC_DEFAULT = 0x0000, - - SC_WRAPVISUALFLAGLOC_END_BY_TEXT = 0x0001, - - SC_WRAPVISUALFLAGLOC_START_BY_TEXT = 0x0002, - - /// Set the location of visual flags for wrapped lines. - SCI_SETWRAPVISUALFLAGSLOCATION = 2462, - - /// Retrive the location of visual flags for wrapped lines. - SCI_GETWRAPVISUALFLAGSLOCATION = 2463, - - /// Set the start indent for wrapped lines. - SCI_SETWRAPSTARTINDENT = 2464, - - /// Retrive the start indent for wrapped lines. - SCI_GETWRAPSTARTINDENT = 2465, - - SC_WRAPINDENT_FIXED = 0, - - SC_WRAPINDENT_SAME = 1, - - SC_WRAPINDENT_INDENT = 2, - - SC_WRAPINDENT_DEEPINDENT = 3, - - /// Sets how wrapped sublines are placed. Default is fixed. - SCI_SETWRAPINDENTMODE = 2472, - - /// Retrieve how wrapped sublines are placed. Default is fixed. - SCI_GETWRAPINDENTMODE = 2473, - - SC_CACHE_NONE = 0, - - SC_CACHE_CARET = 1, - - SC_CACHE_PAGE = 2, - - SC_CACHE_DOCUMENT = 3, - - /// Sets the degree of caching of layout information. - SCI_SETLAYOUTCACHE = 2272, - - /// Retrieve the degree of caching of layout information. - SCI_GETLAYOUTCACHE = 2273, - - /// Sets the document width assumed for scrolling. - SCI_SETSCROLLWIDTH = 2274, - - /// Retrieve the document width assumed for scrolling. - SCI_GETSCROLLWIDTH = 2275, - - /// Sets whether the maximum width line displayed is used to set scroll width. - SCI_SETSCROLLWIDTHTRACKING = 2516, - - /// Retrieve whether the scroll width tracks wide lines. - SCI_GETSCROLLWIDTHTRACKING = 2517, - - /// Measure the pixel width of some text in a particular style. - /// NUL terminated text argument. - /// Does not handle tab or control characters. - SCI_TEXTWIDTH = 2276, - - /// Sets the scroll range so that maximum scroll position has - /// the last line at the bottom of the view (default). - /// Setting this to false allows scrolling one page below the last line. - SCI_SETENDATLASTLINE = 2277, - - /// Retrieve whether the maximum scroll position has the last - /// line at the bottom of the view. - SCI_GETENDATLASTLINE = 2278, - - /// Retrieve the height of a particular line of text in pixels. - SCI_TEXTHEIGHT = 2279, - - /// Show or hide the vertical scroll bar. - SCI_SETVSCROLLBAR = 2280, - - /// Is the vertical scroll bar visible? - SCI_GETVSCROLLBAR = 2281, - - /// Append a string to the end of the document without changing the selection. - SCI_APPENDTEXT = 2282, - - SC_PHASES_ONE = 0, - - SC_PHASES_TWO = 1, - - SC_PHASES_MULTIPLE = 2, - - /// How many phases is drawing done in? - SCI_GETPHASESDRAW = 2673, - - /// In one phase draw, text is drawn in a series of rectangular blocks with no overlap. - /// In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. - /// In multiple phase draw, each element is drawn over the whole drawing area, allowing text - /// to overlap from one line to the next. - SCI_SETPHASESDRAW = 2674, - - SC_EFF_QUALITY_MASK = 0xF, - - SC_EFF_QUALITY_DEFAULT = 0, - - SC_EFF_QUALITY_NON_ANTIALIASED = 1, - - SC_EFF_QUALITY_ANTIALIASED = 2, - - SC_EFF_QUALITY_LCD_OPTIMIZED = 3, - - /// Choose the quality level for text from the FontQuality enumeration. - SCI_SETFONTQUALITY = 2611, - - /// Retrieve the quality level for text. - SCI_GETFONTQUALITY = 2612, - - /// Scroll so that a display line is at the top of the display. - SCI_SETFIRSTVISIBLELINE = 2613, - - SC_MULTIPASTE_ONCE = 0, - - SC_MULTIPASTE_EACH = 1, - - /// Change the effect of pasting when there are multiple selections. - SCI_SETMULTIPASTE = 2614, - - /// Retrieve the effect of pasting when there are multiple selections. - SCI_GETMULTIPASTE = 2615, - - /// Retrieve the value of a tag from a regular expression search. - /// Result is NUL-terminated. - SCI_GETTAG = 2616, - - /// Join the lines in the target. - SCI_LINESJOIN = 2288, - - /// Split the lines in the target into lines that are less wide than pixelWidth - /// where possible. - SCI_LINESSPLIT = 2289, - - /// Set one of the colours used as a chequerboard pattern in the fold margin - SCI_SETFOLDMARGINCOLOUR = 2290, - - /// Set the other colour used as a chequerboard pattern in the fold margin - SCI_SETFOLDMARGINHICOLOUR = 2291, - - SC_ACCESSIBILITY_DISABLED = 0, - - SC_ACCESSIBILITY_ENABLED = 1, - - /// Enable or disable accessibility. - SCI_SETACCESSIBILITY = 2702, - - /// Report accessibility status. - SCI_GETACCESSIBILITY = 2703, - - /// Move caret down one line. - SCI_LINEDOWN = 2300, - - /// Move caret down one line extending selection to new caret position. - SCI_LINEDOWNEXTEND = 2301, - - /// Move caret up one line. - SCI_LINEUP = 2302, - - /// Move caret up one line extending selection to new caret position. - SCI_LINEUPEXTEND = 2303, - - /// Move caret left one character. - SCI_CHARLEFT = 2304, - - /// Move caret left one character extending selection to new caret position. - SCI_CHARLEFTEXTEND = 2305, - - /// Move caret right one character. - SCI_CHARRIGHT = 2306, - - /// Move caret right one character extending selection to new caret position. - SCI_CHARRIGHTEXTEND = 2307, - - /// Move caret left one word. - SCI_WORDLEFT = 2308, - - /// Move caret left one word extending selection to new caret position. - SCI_WORDLEFTEXTEND = 2309, - - /// Move caret right one word. - SCI_WORDRIGHT = 2310, - - /// Move caret right one word extending selection to new caret position. - SCI_WORDRIGHTEXTEND = 2311, - - /// Move caret to first position on line. - SCI_HOME = 2312, - - /// Move caret to first position on line extending selection to new caret position. - SCI_HOMEEXTEND = 2313, - - /// Move caret to last position on line. - SCI_LINEEND = 2314, - - /// Move caret to last position on line extending selection to new caret position. - SCI_LINEENDEXTEND = 2315, - - /// Move caret to first position in document. - SCI_DOCUMENTSTART = 2316, - - /// Move caret to first position in document extending selection to new caret position. - SCI_DOCUMENTSTARTEXTEND = 2317, - - /// Move caret to last position in document. - SCI_DOCUMENTEND = 2318, - - /// Move caret to last position in document extending selection to new caret position. - SCI_DOCUMENTENDEXTEND = 2319, - - /// Move caret one page up. - SCI_PAGEUP = 2320, - - /// Move caret one page up extending selection to new caret position. - SCI_PAGEUPEXTEND = 2321, - - /// Move caret one page down. - SCI_PAGEDOWN = 2322, - - /// Move caret one page down extending selection to new caret position. - SCI_PAGEDOWNEXTEND = 2323, - - /// Switch from insert to overtype mode or the reverse. - SCI_EDITTOGGLEOVERTYPE = 2324, - - /// Cancel any modes such as call tip or auto-completion list display. - SCI_CANCEL = 2325, - - /// Delete the selection or if no selection, the character before the caret. - SCI_DELETEBACK = 2326, - - /// If selection is empty or all on one line replace the selection with a tab character. - /// If more than one line selected, indent the lines. - SCI_TAB = 2327, - - /// Dedent the selected lines. - SCI_BACKTAB = 2328, - - /// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. - SCI_NEWLINE = 2329, - - /// Insert a Form Feed character. - SCI_FORMFEED = 2330, - - /// Move caret to before first visible character on line. - /// If already there move to first character on line. - SCI_VCHOME = 2331, - - /// Like VCHome but extending selection to new caret position. - SCI_VCHOMEEXTEND = 2332, - - /// Magnify the displayed text by increasing the sizes by 1 point. - SCI_ZOOMIN = 2333, - - /// Make the displayed text smaller by decreasing the sizes by 1 point. - SCI_ZOOMOUT = 2334, - - /// Delete the word to the left of the caret. - SCI_DELWORDLEFT = 2335, - - /// Delete the word to the right of the caret. - SCI_DELWORDRIGHT = 2336, - - /// Delete the word to the right of the caret, but not the trailing non-word characters. - SCI_DELWORDRIGHTEND = 2518, - - /// Cut the line containing the caret. - SCI_LINECUT = 2337, - - /// Delete the line containing the caret. - SCI_LINEDELETE = 2338, - - /// Switch the current line with the previous. - SCI_LINETRANSPOSE = 2339, - - /// Reverse order of selected lines. - SCI_LINEREVERSE = 2354, - - /// Duplicate the current line. - SCI_LINEDUPLICATE = 2404, - - /// Transform the selection to lower case. - SCI_LOWERCASE = 2340, - - /// Transform the selection to upper case. - SCI_UPPERCASE = 2341, - - /// Scroll the document down, keeping the caret visible. - SCI_LINESCROLLDOWN = 2342, - - /// Scroll the document up, keeping the caret visible. - SCI_LINESCROLLUP = 2343, - - /// Delete the selection or if no selection, the character before the caret. - /// Will not delete the character before at the start of a line. - SCI_DELETEBACKNOTLINE = 2344, - - /// Move caret to first position on display line. - SCI_HOMEDISPLAY = 2345, - - /// Move caret to first position on display line extending selection to - /// new caret position. - SCI_HOMEDISPLAYEXTEND = 2346, - - /// Move caret to last position on display line. - SCI_LINEENDDISPLAY = 2347, - - /// Move caret to last position on display line extending selection to new - /// caret position. - SCI_LINEENDDISPLAYEXTEND = 2348, - - /// Like Home but when word-wrap is enabled goes first to start of display line - /// HomeDisplay, then to start of document line Home. - SCI_HOMEWRAP = 2349, - - /// Like HomeExtend but when word-wrap is enabled extends first to start of display line - /// HomeDisplayExtend, then to start of document line HomeExtend. - SCI_HOMEWRAPEXTEND = 2450, - - /// Like LineEnd but when word-wrap is enabled goes first to end of display line - /// LineEndDisplay, then to start of document line LineEnd. - SCI_LINEENDWRAP = 2451, - - /// Like LineEndExtend but when word-wrap is enabled extends first to end of display line - /// LineEndDisplayExtend, then to start of document line LineEndExtend. - SCI_LINEENDWRAPEXTEND = 2452, - - /// Like VCHome but when word-wrap is enabled goes first to start of display line - /// VCHomeDisplay, then behaves like VCHome. - SCI_VCHOMEWRAP = 2453, - - /// Like VCHomeExtend but when word-wrap is enabled extends first to start of display line - /// VCHomeDisplayExtend, then behaves like VCHomeExtend. - SCI_VCHOMEWRAPEXTEND = 2454, - - /// Copy the line containing the caret. - SCI_LINECOPY = 2455, - - /// Move the caret inside current view if it's not there already. - SCI_MOVECARETINSIDEVIEW = 2401, - - /// How many characters are on a line, including end of line characters? - SCI_LINELENGTH = 2350, - - /// Highlight the characters at two positions. - SCI_BRACEHIGHLIGHT = 2351, - - /// Use specified indicator to highlight matching braces instead of changing their style. - SCI_BRACEHIGHLIGHTINDICATOR = 2498, - - /// Highlight the character at a position indicating there is no matching brace. - SCI_BRACEBADLIGHT = 2352, - - /// Use specified indicator to highlight non matching brace instead of changing its style. - SCI_BRACEBADLIGHTINDICATOR = 2499, - - /// Find the position of a matching brace or INVALID_POSITION if no match. - /// The maxReStyle must be 0 for now. It may be defined in a future release. - SCI_BRACEMATCH = 2353, - - /// Are the end of line characters visible? - SCI_GETVIEWEOL = 2355, - - /// Make the end of line characters visible or invisible. - SCI_SETVIEWEOL = 2356, - - /// Retrieve a pointer to the document object. - SCI_GETDOCPOINTER = 2357, - - /// Change the document object used. - SCI_SETDOCPOINTER = 2358, - - /// Set which document modification events are sent to the container. - SCI_SETMODEVENTMASK = 2359, - - EDGE_NONE = 0, - - EDGE_LINE = 1, - - EDGE_BACKGROUND = 2, - - EDGE_MULTILINE = 3, - - /// Retrieve the column number which text should be kept within. - SCI_GETEDGECOLUMN = 2360, - - /// Set the column number of the edge. - /// If text goes past the edge then it is highlighted. - SCI_SETEDGECOLUMN = 2361, - - /// Retrieve the edge highlight mode. - SCI_GETEDGEMODE = 2362, - - /// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that - /// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). - SCI_SETEDGEMODE = 2363, - - /// Retrieve the colour used in edge indication. - SCI_GETEDGECOLOUR = 2364, - - /// Change the colour used in edge indication. - SCI_SETEDGECOLOUR = 2365, - - /// Add a new vertical edge to the view. - SCI_MULTIEDGEADDLINE = 2694, - - /// Clear all vertical edges. - SCI_MULTIEDGECLEARALL = 2695, - - /// Sets the current caret position to be the search anchor. - SCI_SEARCHANCHOR = 2366, - - /// Find some text starting at the search anchor. - /// Does not ensure the selection is visible. - SCI_SEARCHNEXT = 2367, - - /// Find some text starting at the search anchor and moving backwards. - /// Does not ensure the selection is visible. - SCI_SEARCHPREV = 2368, - - /// Retrieves the number of lines completely visible. - SCI_LINESONSCREEN = 2370, - - SC_POPUP_NEVER = 0, - - SC_POPUP_ALL = 1, - - SC_POPUP_TEXT = 2, - - /// Set whether a pop up menu is displayed automatically when the user presses - /// the wrong mouse button on certain areas. - SCI_USEPOPUP = 2371, - - /// Is the selection rectangular? The alternative is the more common stream selection. - SCI_SELECTIONISRECTANGLE = 2372, - - /// Set the zoom level. This number of points is added to the size of all fonts. - /// It may be positive to magnify or negative to reduce. - SCI_SETZOOM = 2373, - - /// Retrieve the zoom level. - SCI_GETZOOM = 2374, - - SC_DOCUMENTOPTION_DEFAULT = 0, - - SC_DOCUMENTOPTION_STYLES_NONE = 0x1, - - SC_DOCUMENTOPTION_TEXT_LARGE = 0x100, - - /// Create a new document object. - /// Starts with reference count of 1 and not selected into editor. - SCI_CREATEDOCUMENT = 2375, - - /// Extend life of document. - SCI_ADDREFDOCUMENT = 2376, - - /// Release a reference to the document, deleting document if it fades to black. - SCI_RELEASEDOCUMENT = 2377, - - /// Get which document options are set. - SCI_GETDOCUMENTOPTIONS = 2379, - - /// Get which document modification events are sent to the container. - SCI_GETMODEVENTMASK = 2378, - - /// Set whether command events are sent to the container. - SCI_SETCOMMANDEVENTS = 2717, - - /// Get whether command events are sent to the container. - SCI_GETCOMMANDEVENTS = 2718, - - /// Change internal focus flag. - SCI_SETFOCUS = 2380, - - /// Get internal focus flag. - SCI_GETFOCUS = 2381, - - SC_STATUS_OK = 0, - - SC_STATUS_FAILURE = 1, - - SC_STATUS_BADALLOC = 2, - - SC_STATUS_WARN_START = 1000, - - SC_STATUS_WARN_REGEX = 1001, - - /// Change error status - 0 = OK. - SCI_SETSTATUS = 2382, - - /// Get error status. - SCI_GETSTATUS = 2383, - - /// Set whether the mouse is captured when its button is pressed. - SCI_SETMOUSEDOWNCAPTURES = 2384, - - /// Get whether mouse gets captured. - SCI_GETMOUSEDOWNCAPTURES = 2385, - - /// Set whether the mouse wheel can be active outside the window. - SCI_SETMOUSEWHEELCAPTURES = 2696, - - /// Get whether mouse wheel can be active outside the window. - SCI_GETMOUSEWHEELCAPTURES = 2697, - - SC_CURSORNORMAL = 0xFFFFFFFF, - - SC_CURSORARROW = 2, - - SC_CURSORWAIT = 4, - - SC_CURSORREVERSEARROW = 7, - - /// Sets the cursor to one of the SC_CURSOR* values. - SCI_SETCURSOR = 2386, - - /// Get cursor type. - SCI_GETCURSOR = 2387, - - /// Change the way control characters are displayed: - /// If symbol is < 32, keep the drawn way, else, use the given character. - SCI_SETCONTROLCHARSYMBOL = 2388, - - /// Get the way control characters are displayed. - SCI_GETCONTROLCHARSYMBOL = 2389, - - /// Move to the previous change in capitalisation. - SCI_WORDPARTLEFT = 2390, - - /// Move to the previous change in capitalisation extending selection - /// to new caret position. - SCI_WORDPARTLEFTEXTEND = 2391, - - /// Move to the change next in capitalisation. - SCI_WORDPARTRIGHT = 2392, - - /// Move to the next change in capitalisation extending selection - /// to new caret position. - SCI_WORDPARTRIGHTEXTEND = 2393, - - VISIBLE_SLOP = 0x01, - - VISIBLE_STRICT = 0x04, - - /// Set the way the display area is determined when a particular line - /// is to be moved to by Find, FindNext, GotoLine, etc. - SCI_SETVISIBLEPOLICY = 2394, - - /// Delete back from the current position to the start of the line. - SCI_DELLINELEFT = 2395, - - /// Delete forwards from the current position to the end of the line. - SCI_DELLINERIGHT = 2396, - - /// Set the xOffset (ie, horizontal scroll position). - SCI_SETXOFFSET = 2397, - - /// Get the xOffset (ie, horizontal scroll position). - SCI_GETXOFFSET = 2398, - - /// Set the last x chosen value to be the caret x position. - SCI_CHOOSECARETX = 2399, - - /// Set the focus to this Scintilla widget. - SCI_GRABFOCUS = 2400, - - CARET_SLOP = 0x01, - - CARET_STRICT = 0x04, - - CARET_JUMPS = 0x10, - - CARET_EVEN = 0x08, - - /// Set the way the caret is kept visible when going sideways. - /// The exclusion zone is given in pixels. - SCI_SETXCARETPOLICY = 2402, - - /// Set the way the line the caret is on is kept visible. - /// The exclusion zone is given in lines. - SCI_SETYCARETPOLICY = 2403, - - /// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). - SCI_SETPRINTWRAPMODE = 2406, - - /// Is printing line wrapped? - SCI_GETPRINTWRAPMODE = 2407, - - /// Set a fore colour for active hotspots. - SCI_SETHOTSPOTACTIVEFORE = 2410, - - /// Get the fore colour for active hotspots. - SCI_GETHOTSPOTACTIVEFORE = 2494, - - /// Set a back colour for active hotspots. - SCI_SETHOTSPOTACTIVEBACK = 2411, - - /// Get the back colour for active hotspots. - SCI_GETHOTSPOTACTIVEBACK = 2495, - - /// Enable / Disable underlining active hotspots. - SCI_SETHOTSPOTACTIVEUNDERLINE = 2412, - - /// Get whether underlining for active hotspots. - SCI_GETHOTSPOTACTIVEUNDERLINE = 2496, - - /// Limit hotspots to single line so hotspots on two lines don't merge. - SCI_SETHOTSPOTSINGLELINE = 2421, - - /// Get the HotspotSingleLine property - SCI_GETHOTSPOTSINGLELINE = 2497, - - /// Move caret down one paragraph (delimited by empty lines). - SCI_PARADOWN = 2413, - - /// Extend selection down one paragraph (delimited by empty lines). - SCI_PARADOWNEXTEND = 2414, - - /// Move caret up one paragraph (delimited by empty lines). - SCI_PARAUP = 2415, - - /// Extend selection up one paragraph (delimited by empty lines). - SCI_PARAUPEXTEND = 2416, - - /// Given a valid document position, return the previous position taking code - /// page into account. Returns 0 if passed 0. - SCI_POSITIONBEFORE = 2417, - - /// Given a valid document position, return the next position taking code - /// page into account. Maximum value returned is the last position in the document. - SCI_POSITIONAFTER = 2418, - - /// Given a valid document position, return a position that differs in a number - /// of characters. Returned value is always between 0 and last position in document. - SCI_POSITIONRELATIVE = 2670, - - /// Given a valid document position, return a position that differs in a number - /// of UTF-16 code units. Returned value is always between 0 and last position in document. - /// The result may point half way (2 bytes) inside a non-BMP character. - SCI_POSITIONRELATIVECODEUNITS = 2716, - - /// Copy a range of text to the clipboard. Positions are clipped into the document. - SCI_COPYRANGE = 2419, - - /// Copy argument text to the clipboard. - SCI_COPYTEXT = 2420, - - SC_SEL_STREAM = 0, - - SC_SEL_RECTANGLE = 1, - - SC_SEL_LINES = 2, - - SC_SEL_THIN = 3, - - /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or - /// by lines (SC_SEL_LINES). - SCI_SETSELECTIONMODE = 2422, - - /// Get the mode of the current selection. - SCI_GETSELECTIONMODE = 2423, - - /// Get whether or not regular caret moves will extend or reduce the selection. - SCI_GETMOVEEXTENDSSELECTION = 2706, - - /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). - SCI_GETLINESELSTARTPOSITION = 2424, - - /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). - SCI_GETLINESELENDPOSITION = 2425, - - /// Move caret down one line, extending rectangular selection to new caret position. - SCI_LINEDOWNRECTEXTEND = 2426, - - /// Move caret up one line, extending rectangular selection to new caret position. - SCI_LINEUPRECTEXTEND = 2427, - - /// Move caret left one character, extending rectangular selection to new caret position. - SCI_CHARLEFTRECTEXTEND = 2428, - - /// Move caret right one character, extending rectangular selection to new caret position. - SCI_CHARRIGHTRECTEXTEND = 2429, - - /// Move caret to first position on line, extending rectangular selection to new caret position. - SCI_HOMERECTEXTEND = 2430, - - /// Move caret to before first visible character on line. - /// If already there move to first character on line. - /// In either case, extend rectangular selection to new caret position. - SCI_VCHOMERECTEXTEND = 2431, - - /// Move caret to last position on line, extending rectangular selection to new caret position. - SCI_LINEENDRECTEXTEND = 2432, - - /// Move caret one page up, extending rectangular selection to new caret position. - SCI_PAGEUPRECTEXTEND = 2433, - - /// Move caret one page down, extending rectangular selection to new caret position. - SCI_PAGEDOWNRECTEXTEND = 2434, - - /// Move caret to top of page, or one page up if already at top of page. - SCI_STUTTEREDPAGEUP = 2435, - - /// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. - SCI_STUTTEREDPAGEUPEXTEND = 2436, - - /// Move caret to bottom of page, or one page down if already at bottom of page. - SCI_STUTTEREDPAGEDOWN = 2437, - - /// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. - SCI_STUTTEREDPAGEDOWNEXTEND = 2438, - - /// Move caret left one word, position cursor at end of word. - SCI_WORDLEFTEND = 2439, - - /// Move caret left one word, position cursor at end of word, extending selection to new caret position. - SCI_WORDLEFTENDEXTEND = 2440, - - /// Move caret right one word, position cursor at end of word. - SCI_WORDRIGHTEND = 2441, - - /// Move caret right one word, position cursor at end of word, extending selection to new caret position. - SCI_WORDRIGHTENDEXTEND = 2442, - - /// Set the set of characters making up whitespace for when moving or selecting by word. - /// Should be called after SetWordChars. - SCI_SETWHITESPACECHARS = 2443, - - /// Get the set of characters making up whitespace for when moving or selecting by word. - SCI_GETWHITESPACECHARS = 2647, - - /// Set the set of characters making up punctuation characters - /// Should be called after SetWordChars. - SCI_SETPUNCTUATIONCHARS = 2648, - - /// Get the set of characters making up punctuation characters - SCI_GETPUNCTUATIONCHARS = 2649, - - /// Reset the set of characters for whitespace and word characters to the defaults. - SCI_SETCHARSDEFAULT = 2444, - - /// Get currently selected item position in the auto-completion list - SCI_AUTOCGETCURRENT = 2445, - - /// Get currently selected item text in the auto-completion list - /// Returns the length of the item text - /// Result is NUL-terminated. - SCI_AUTOCGETCURRENTTEXT = 2610, - - SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE = 0, - - SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE = 1, - - /// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. - SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR = 2634, - - /// Get auto-completion case insensitive behaviour. - SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR = 2635, - - SC_MULTIAUTOC_ONCE = 0, - - SC_MULTIAUTOC_EACH = 1, - - /// Change the effect of autocompleting when there are multiple selections. - SCI_AUTOCSETMULTI = 2636, - - /// Retrieve the effect of autocompleting when there are multiple selections. - SCI_AUTOCGETMULTI = 2637, - - SC_ORDER_PRESORTED = 0, - - SC_ORDER_PERFORMSORT = 1, - - SC_ORDER_CUSTOM = 2, - - /// Set the way autocompletion lists are ordered. - SCI_AUTOCSETORDER = 2660, - - /// Get the way autocompletion lists are ordered. - SCI_AUTOCGETORDER = 2661, - - /// Enlarge the document to a particular size of text bytes. - SCI_ALLOCATE = 2446, - - /// Returns the target converted to UTF8. - /// Return the length in bytes. - SCI_TARGETASUTF8 = 2447, - - /// Set the length of the utf8 argument for calling EncodedFromUTF8. - /// Set to -1 and the string will be measured to the first nul. - SCI_SETLENGTHFORENCODE = 2448, - - /// Translates a UTF8 string into the document encoding. - /// Return the length of the result in bytes. - /// On error return 0. - SCI_ENCODEDFROMUTF8 = 2449, - - /// Find the position of a column on a line taking into account tabs and - /// multi-byte characters. If beyond end of line, return line end position. - SCI_FINDCOLUMN = 2456, - - /// Can the caret preferred x position only be changed by explicit movement commands? - SCI_GETCARETSTICKY = 2457, - - /// Stop the caret preferred x position changing when the user types. - SCI_SETCARETSTICKY = 2458, - - SC_CARETSTICKY_OFF = 0, - - SC_CARETSTICKY_ON = 1, - - SC_CARETSTICKY_WHITESPACE = 2, - - /// Switch between sticky and non-sticky: meant to be bound to a key. - SCI_TOGGLECARETSTICKY = 2459, - - /// Enable/Disable convert-on-paste for line endings - SCI_SETPASTECONVERTENDINGS = 2467, - - /// Get convert-on-paste setting - SCI_GETPASTECONVERTENDINGS = 2468, - - /// Duplicate the selection. If selection empty duplicate the line containing the caret. - SCI_SELECTIONDUPLICATE = 2469, - - SC_ALPHA_TRANSPARENT = 0, - - SC_ALPHA_OPAQUE = 255, - - SC_ALPHA_NOALPHA = 256, - - /// Set background alpha of the caret line. - SCI_SETCARETLINEBACKALPHA = 2470, - - /// Get the background alpha of the caret line. - SCI_GETCARETLINEBACKALPHA = 2471, - - CARETSTYLE_INVISIBLE = 0, - - CARETSTYLE_LINE = 1, - - CARETSTYLE_BLOCK = 2, - - CARETSTYLE_OVERSTRIKE_BAR = 0, - - CARETSTYLE_OVERSTRIKE_BLOCK = 0x10, - - CARETSTYLE_INS_MASK = 0xF, - - CARETSTYLE_BLOCK_AFTER = 0x100, - - /// Set the style of the caret to be drawn. - SCI_SETCARETSTYLE = 2512, - - /// Returns the current style of the caret. - SCI_GETCARETSTYLE = 2513, - - /// Set the indicator used for IndicatorFillRange and IndicatorClearRange - SCI_SETINDICATORCURRENT = 2500, - - /// Get the current indicator - SCI_GETINDICATORCURRENT = 2501, - - /// Set the value used for IndicatorFillRange - SCI_SETINDICATORVALUE = 2502, - - /// Get the current indicator value - SCI_GETINDICATORVALUE = 2503, - - /// Turn a indicator on over a range. - SCI_INDICATORFILLRANGE = 2504, - - /// Turn a indicator off over a range. - SCI_INDICATORCLEARRANGE = 2505, - - /// Are any indicators present at pos? - SCI_INDICATORALLONFOR = 2506, - - /// What value does a particular indicator have at a position? - SCI_INDICATORVALUEAT = 2507, - - /// Where does a particular indicator start? - SCI_INDICATORSTART = 2508, - - /// Where does a particular indicator end? - SCI_INDICATOREND = 2509, - - /// Set number of entries in position cache - SCI_SETPOSITIONCACHE = 2514, - - /// How many entries are allocated to the position cache? - SCI_GETPOSITIONCACHE = 2515, - - /// Copy the selection, if selection empty copy the line with the caret - SCI_COPYALLOWLINE = 2519, - - /// Compact the document buffer and return a read-only pointer to the - /// characters in the document. - SCI_GETCHARACTERPOINTER = 2520, - - /// Return a read-only pointer to a range of characters in the document. - /// May move the gap so that the range is contiguous, but will only move up - /// to lengthRange bytes. - SCI_GETRANGEPOINTER = 2643, - - /// Return a position which, to avoid performance costs, should not be within - /// the range of a call to GetRangePointer. - SCI_GETGAPPOSITION = 2644, - - /// Set the alpha fill colour of the given indicator. - SCI_INDICSETALPHA = 2523, - - /// Get the alpha fill colour of the given indicator. - SCI_INDICGETALPHA = 2524, - - /// Set the alpha outline colour of the given indicator. - SCI_INDICSETOUTLINEALPHA = 2558, - - /// Get the alpha outline colour of the given indicator. - SCI_INDICGETOUTLINEALPHA = 2559, - - /// Set extra ascent for each line - SCI_SETEXTRAASCENT = 2525, - - /// Get extra ascent for each line - SCI_GETEXTRAASCENT = 2526, - - /// Set extra descent for each line - SCI_SETEXTRADESCENT = 2527, - - /// Get extra descent for each line - SCI_GETEXTRADESCENT = 2528, - - /// Which symbol was defined for markerNumber with MarkerDefine - SCI_MARKERSYMBOLDEFINED = 2529, - - /// Set the text in the text margin for a line - SCI_MARGINSETTEXT = 2530, - - /// Get the text in the text margin for a line - SCI_MARGINGETTEXT = 2531, - - /// Set the style number for the text margin for a line - SCI_MARGINSETSTYLE = 2532, - - /// Get the style number for the text margin for a line - SCI_MARGINGETSTYLE = 2533, - - /// Set the style in the text margin for a line - SCI_MARGINSETSTYLES = 2534, - - /// Get the styles in the text margin for a line - SCI_MARGINGETSTYLES = 2535, - - /// Clear the margin text on all lines - SCI_MARGINTEXTCLEARALL = 2536, - - /// Get the start of the range of style numbers used for margin text - SCI_MARGINSETSTYLEOFFSET = 2537, - - /// Get the start of the range of style numbers used for margin text - SCI_MARGINGETSTYLEOFFSET = 2538, - - SC_MARGINOPTION_NONE = 0, - - SC_MARGINOPTION_SUBLINESELECT = 1, - - /// Set the margin options. - SCI_SETMARGINOPTIONS = 2539, - - /// Get the margin options. - SCI_GETMARGINOPTIONS = 2557, - - /// Set the annotation text for a line - SCI_ANNOTATIONSETTEXT = 2540, - - /// Get the annotation text for a line - SCI_ANNOTATIONGETTEXT = 2541, - - /// Set the style number for the annotations for a line - SCI_ANNOTATIONSETSTYLE = 2542, - - /// Get the style number for the annotations for a line - SCI_ANNOTATIONGETSTYLE = 2543, - - /// Set the annotation styles for a line - SCI_ANNOTATIONSETSTYLES = 2544, - - /// Get the annotation styles for a line - SCI_ANNOTATIONGETSTYLES = 2545, - - /// Get the number of annotation lines for a line - SCI_ANNOTATIONGETLINES = 2546, - - /// Clear the annotations from all lines - SCI_ANNOTATIONCLEARALL = 2547, - - ANNOTATION_HIDDEN = 0, - - ANNOTATION_STANDARD = 1, - - ANNOTATION_BOXED = 2, - - ANNOTATION_INDENTED = 3, - - /// Set the visibility for the annotations for a view - SCI_ANNOTATIONSETVISIBLE = 2548, - - /// Get the visibility for the annotations for a view - SCI_ANNOTATIONGETVISIBLE = 2549, - - /// Get the start of the range of style numbers used for annotations - SCI_ANNOTATIONSETSTYLEOFFSET = 2550, - - /// Get the start of the range of style numbers used for annotations - SCI_ANNOTATIONGETSTYLEOFFSET = 2551, - - /// Release all extended (>255) style numbers - SCI_RELEASEALLEXTENDEDSTYLES = 2552, - - /// Allocate some extended (>255) style numbers and return the start of the range - SCI_ALLOCATEEXTENDEDSTYLES = 2553, - - UNDO_NONE = 0, - - UNDO_MAY_COALESCE = 1, - - /// Add a container action to the undo stack - SCI_ADDUNDOACTION = 2560, - - /// Find the position of a character from a point within the window. - SCI_CHARPOSITIONFROMPOINT = 2561, - - /// Find the position of a character from a point within the window. - /// Return INVALID_POSITION if not close to text. - SCI_CHARPOSITIONFROMPOINTCLOSE = 2562, - - /// Set whether switching to rectangular mode while selecting with the mouse is allowed. - SCI_SETMOUSESELECTIONRECTANGULARSWITCH = 2668, - - /// Whether switching to rectangular mode while selecting with the mouse is allowed. - SCI_GETMOUSESELECTIONRECTANGULARSWITCH = 2669, - - /// Set whether multiple selections can be made - SCI_SETMULTIPLESELECTION = 2563, - - /// Whether multiple selections can be made - SCI_GETMULTIPLESELECTION = 2564, - - /// Set whether typing can be performed into multiple selections - SCI_SETADDITIONALSELECTIONTYPING = 2565, - - /// Whether typing can be performed into multiple selections - SCI_GETADDITIONALSELECTIONTYPING = 2566, - - /// Set whether additional carets will blink - SCI_SETADDITIONALCARETSBLINK = 2567, - - /// Whether additional carets will blink - SCI_GETADDITIONALCARETSBLINK = 2568, - - /// Set whether additional carets are visible - SCI_SETADDITIONALCARETSVISIBLE = 2608, - - /// Whether additional carets are visible - SCI_GETADDITIONALCARETSVISIBLE = 2609, - - /// How many selections are there? - SCI_GETSELECTIONS = 2570, - - /// Is every selected range empty? - SCI_GETSELECTIONEMPTY = 2650, - - /// Clear selections to a single empty stream selection - SCI_CLEARSELECTIONS = 2571, - - /// Set a simple selection - SCI_SETSELECTION = 2572, - - /// Add a selection - SCI_ADDSELECTION = 2573, - - /// Drop one selection - SCI_DROPSELECTIONN = 2671, - - /// Set the main selection - SCI_SETMAINSELECTION = 2574, - - /// Which selection is the main selection - SCI_GETMAINSELECTION = 2575, - - /// Set the caret position of the nth selection. - SCI_SETSELECTIONNCARET = 2576, - - /// Return the caret position of the nth selection. - SCI_GETSELECTIONNCARET = 2577, - - /// Set the anchor position of the nth selection. - SCI_SETSELECTIONNANCHOR = 2578, - - /// Return the anchor position of the nth selection. - SCI_GETSELECTIONNANCHOR = 2579, - - /// Set the virtual space of the caret of the nth selection. - SCI_SETSELECTIONNCARETVIRTUALSPACE = 2580, - - /// Return the virtual space of the caret of the nth selection. - SCI_GETSELECTIONNCARETVIRTUALSPACE = 2581, - - /// Set the virtual space of the anchor of the nth selection. - SCI_SETSELECTIONNANCHORVIRTUALSPACE = 2582, - - /// Return the virtual space of the anchor of the nth selection. - SCI_GETSELECTIONNANCHORVIRTUALSPACE = 2583, - - /// Sets the position that starts the selection - this becomes the anchor. - SCI_SETSELECTIONNSTART = 2584, - - /// Returns the position at the start of the selection. - SCI_GETSELECTIONNSTART = 2585, - - /// Sets the position that ends the selection - this becomes the currentPosition. - SCI_SETSELECTIONNEND = 2586, - - /// Returns the position at the end of the selection. - SCI_GETSELECTIONNEND = 2587, - - /// Set the caret position of the rectangular selection. - SCI_SETRECTANGULARSELECTIONCARET = 2588, - - /// Return the caret position of the rectangular selection. - SCI_GETRECTANGULARSELECTIONCARET = 2589, - - /// Set the anchor position of the rectangular selection. - SCI_SETRECTANGULARSELECTIONANCHOR = 2590, - - /// Return the anchor position of the rectangular selection. - SCI_GETRECTANGULARSELECTIONANCHOR = 2591, - - /// Set the virtual space of the caret of the rectangular selection. - SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2592, - - /// Return the virtual space of the caret of the rectangular selection. - SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2593, - - /// Set the virtual space of the anchor of the rectangular selection. - SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2594, - - /// Return the virtual space of the anchor of the rectangular selection. - SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2595, - - SCVS_NONE = 0, - - SCVS_RECTANGULARSELECTION = 1, - - SCVS_USERACCESSIBLE = 2, - - SCVS_NOWRAPLINESTART = 4, - - /// Set options for virtual space behaviour. - SCI_SETVIRTUALSPACEOPTIONS = 2596, - - /// Return options for virtual space behaviour. - SCI_GETVIRTUALSPACEOPTIONS = 2597, - - /// On GTK, allow selecting the modifier key to use for mouse-based - /// rectangular selection. Often the window manager requires Alt+Mouse Drag - /// for moving windows. - /// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. - SCI_SETRECTANGULARSELECTIONMODIFIER = 2598, - - /// Get the modifier key used for rectangular selection. - SCI_GETRECTANGULARSELECTIONMODIFIER = 2599, - - /// Set the foreground colour of additional selections. - /// Must have previously called SetSelFore with non-zero first argument for this to have an effect. - SCI_SETADDITIONALSELFORE = 2600, - - /// Set the background colour of additional selections. - /// Must have previously called SetSelBack with non-zero first argument for this to have an effect. - SCI_SETADDITIONALSELBACK = 2601, - - /// Set the alpha of the selection. - SCI_SETADDITIONALSELALPHA = 2602, - - /// Get the alpha of the selection. - SCI_GETADDITIONALSELALPHA = 2603, - - /// Set the foreground colour of additional carets. - SCI_SETADDITIONALCARETFORE = 2604, - - /// Get the foreground colour of additional carets. - SCI_GETADDITIONALCARETFORE = 2605, - - /// Set the main selection to the next selection. - SCI_ROTATESELECTION = 2606, - - /// Swap that caret and anchor of the main selection. - SCI_SWAPMAINANCHORCARET = 2607, - - /// Add the next occurrence of the main selection to the set of selections as main. - /// If the current selection is empty then select word around caret. - SCI_MULTIPLESELECTADDNEXT = 2688, - - /// Add each occurrence of the main selection in the target to the set of selections. - /// If the current selection is empty then select word around caret. - SCI_MULTIPLESELECTADDEACH = 2689, - - /// Indicate that the internal state of a lexer has changed over a range and therefore - /// there may be a need to redraw. - SCI_CHANGELEXERSTATE = 2617, - - /// Find the next line at or after lineStart that is a contracted fold header line. - /// Return -1 when no more lines. - SCI_CONTRACTEDFOLDNEXT = 2618, - - /// Centre current line in window. - SCI_VERTICALCENTRECARET = 2619, - - /// Move the selected lines up one line, shifting the line above after the selection - SCI_MOVESELECTEDLINESUP = 2620, - - /// Move the selected lines down one line, shifting the line below before the selection - SCI_MOVESELECTEDLINESDOWN = 2621, - - /// Set the identifier reported as idFrom in notification messages. - SCI_SETIDENTIFIER = 2622, - - /// Get the identifier. - SCI_GETIDENTIFIER = 2623, - - /// Set the width for future RGBA image data. - SCI_RGBAIMAGESETWIDTH = 2624, - - /// Set the height for future RGBA image data. - SCI_RGBAIMAGESETHEIGHT = 2625, - - /// Set the scale factor in percent for future RGBA image data. - SCI_RGBAIMAGESETSCALE = 2651, - - /// Define a marker from RGBA data. - /// It has the width and height from RGBAImageSetWidth/Height - SCI_MARKERDEFINERGBAIMAGE = 2626, - - /// Register an RGBA image for use in autocompletion lists. - /// It has the width and height from RGBAImageSetWidth/Height - SCI_REGISTERRGBAIMAGE = 2627, - - /// Scroll to start of document. - SCI_SCROLLTOSTART = 2628, - - /// Scroll to end of document. - SCI_SCROLLTOEND = 2629, - - SC_TECHNOLOGY_DEFAULT = 0, - - SC_TECHNOLOGY_DIRECTWRITE = 1, - - SC_TECHNOLOGY_DIRECTWRITERETAIN = 2, - - SC_TECHNOLOGY_DIRECTWRITEDC = 3, - - /// Set the technology used. - SCI_SETTECHNOLOGY = 2630, - - /// Get the tech. - SCI_GETTECHNOLOGY = 2631, - - /// Create an ILoader*. - SCI_CREATELOADER = 2632, - - /// On OS X, show a find indicator. - SCI_FINDINDICATORSHOW = 2640, - - /// On OS X, flash a find indicator, then fade out. - SCI_FINDINDICATORFLASH = 2641, - - /// On OS X, hide the find indicator. - SCI_FINDINDICATORHIDE = 2642, - - /// Move caret to before first visible character on display line. - /// If already there move to first character on display line. - SCI_VCHOMEDISPLAY = 2652, - - /// Like VCHomeDisplay but extending selection to new caret position. - SCI_VCHOMEDISPLAYEXTEND = 2653, - - /// Is the caret line always visible? - SCI_GETCARETLINEVISIBLEALWAYS = 2654, - - /// Sets the caret line to always visible. - SCI_SETCARETLINEVISIBLEALWAYS = 2655, - - SC_LINE_END_TYPE_DEFAULT = 0, - - SC_LINE_END_TYPE_UNICODE = 1, - - /// Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. - SCI_SETLINEENDTYPESALLOWED = 2656, - - /// Get the line end types currently allowed. - SCI_GETLINEENDTYPESALLOWED = 2657, - - /// Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. - SCI_GETLINEENDTYPESACTIVE = 2658, - - /// Set the way a character is drawn. - SCI_SETREPRESENTATION = 2665, - - /// Set the way a character is drawn. - /// Result is NUL-terminated. - SCI_GETREPRESENTATION = 2666, - - /// Remove a character representation. - SCI_CLEARREPRESENTATION = 2667, - - /// Start notifying the container of all key presses and commands. - SCI_STARTRECORD = 3001, - - /// Stop notifying the container of all key presses and commands. - SCI_STOPRECORD = 3002, - - /// Set the lexing language of the document. - SCI_SETLEXER = 4001, - - /// Retrieve the lexing language of the document. - SCI_GETLEXER = 4002, - - /// Colourise a segment of the document using the current lexing language. - SCI_COLOURISE = 4003, - - /// Set up a value that may be used by a lexer for some optional feature. - SCI_SETPROPERTY = 4004, - - KEYWORDSET_MAX = 8, - - /// Set up the key words used by the lexer. - SCI_SETKEYWORDS = 4005, - - /// Set the lexing language of the document based on string name. - SCI_SETLEXERLANGUAGE = 4006, - - /// Load a lexer library (dll / so). - SCI_LOADLEXERLIBRARY = 4007, - - /// Retrieve a "property" value previously set with SetProperty. - /// Result is NUL-terminated. - SCI_GETPROPERTY = 4008, - - /// Retrieve a "property" value previously set with SetProperty, - /// with "$()" variable replacement on returned buffer. - /// Result is NUL-terminated. - SCI_GETPROPERTYEXPANDED = 4009, - - /// Retrieve a "property" value previously set with SetProperty, - /// interpreted as an int AFTER any "$()" variable replacement. - SCI_GETPROPERTYINT = 4010, - - /// Retrieve the name of the lexer. - /// Return the length of the text. - /// Result is NUL-terminated. - SCI_GETLEXERLANGUAGE = 4012, - - /// For private communication between an application and a known lexer. - SCI_PRIVATELEXERCALL = 4013, - - /// Retrieve a '\n' separated list of properties understood by the current lexer. - /// Result is NUL-terminated. - SCI_PROPERTYNAMES = 4014, - - SC_TYPE_BOOLEAN = 0, - - SC_TYPE_INTEGER = 1, - - SC_TYPE_STRING = 2, - - /// Retrieve the type of a property. - SCI_PROPERTYTYPE = 4015, - - /// Describe a property. - /// Result is NUL-terminated. - SCI_DESCRIBEPROPERTY = 4016, - - /// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. - /// Result is NUL-terminated. - SCI_DESCRIBEKEYWORDSETS = 4017, - - /// Bit set of LineEndType enumertion for which line ends beyond the standard - /// LF, CR, and CRLF are supported by the lexer. - SCI_GETLINEENDTYPESSUPPORTED = 4018, - - /// Allocate a set of sub styles for a particular base style, returning start of range - SCI_ALLOCATESUBSTYLES = 4020, - - /// The starting style number for the sub styles associated with a base style - SCI_GETSUBSTYLESSTART = 4021, - - /// The number of sub styles associated with a base style - SCI_GETSUBSTYLESLENGTH = 4022, - - /// For a sub style, return the base style, else return the argument. - SCI_GETSTYLEFROMSUBSTYLE = 4027, - - /// For a secondary style, return the primary style, else return the argument. - SCI_GETPRIMARYSTYLEFROMSTYLE = 4028, - - /// Free allocated sub styles - SCI_FREESUBSTYLES = 4023, - - /// Set the identifiers that are shown in a particular style - SCI_SETIDENTIFIERS = 4024, - - /// Where styles are duplicated by a feature such as active/inactive code - /// return the distance between the two types. - SCI_DISTANCETOSECONDARYSTYLES = 4025, - - /// Get the set of base styles that can be extended with sub styles - /// Result is NUL-terminated. - SCI_GETSUBSTYLEBASES = 4026, - - /// Retrieve the number of named styles for the lexer. - SCI_GETNAMEDSTYLES = 4029, - - /// Retrieve the name of a style. - /// Result is NUL-terminated. - SCI_NAMEOFSTYLE = 4030, - - /// Retrieve a ' ' separated list of style tags like "literal quoted string". - /// Result is NUL-terminated. - SCI_TAGSOFSTYLE = 4031, - - /// Retrieve a description of a style. - /// Result is NUL-terminated. - SCI_DESCRIPTIONOFSTYLE = 4032, - - SC_MOD_NONE = 0x0, - - SC_MOD_INSERTTEXT = 0x1, - - SC_MOD_DELETETEXT = 0x2, - - SC_MOD_CHANGESTYLE = 0x4, - - SC_MOD_CHANGEFOLD = 0x8, - - SC_PERFORMED_USER = 0x10, - - SC_PERFORMED_UNDO = 0x20, - - SC_PERFORMED_REDO = 0x40, - - SC_MULTISTEPUNDOREDO = 0x80, - - SC_LASTSTEPINUNDOREDO = 0x100, - - SC_MOD_CHANGEMARKER = 0x200, - - SC_MOD_BEFOREINSERT = 0x400, - - SC_MOD_BEFOREDELETE = 0x800, - - SC_MULTILINEUNDOREDO = 0x1000, - - SC_STARTACTION = 0x2000, - - SC_MOD_CHANGEINDICATOR = 0x4000, - - SC_MOD_CHANGELINESTATE = 0x8000, - - SC_MOD_CHANGEMARGIN = 0x10000, - - SC_MOD_CHANGEANNOTATION = 0x20000, - - SC_MOD_CONTAINER = 0x40000, - - SC_MOD_LEXERSTATE = 0x80000, - - SC_MOD_INSERTCHECK = 0x100000, - - SC_MOD_CHANGETABSTOPS = 0x200000, - - SC_MODEVENTMASKALL = 0x3FFFFF, - - SC_UPDATE_CONTENT = 0x1, - - SC_UPDATE_SELECTION = 0x2, - - SC_UPDATE_V_SCROLL = 0x4, - - SC_UPDATE_H_SCROLL = 0x8, - - SCEN_CHANGE = 768, - - SCEN_SETFOCUS = 512, - - SCEN_KILLFOCUS = 256, - - SCK_DOWN = 300, - - SCK_UP = 301, - - SCK_LEFT = 302, - - SCK_RIGHT = 303, - - SCK_HOME = 304, - - SCK_END = 305, - - SCK_PRIOR = 306, - - SCK_NEXT = 307, - - SCK_DELETE = 308, - - SCK_INSERT = 309, - - SCK_ESCAPE = 7, - - SCK_BACK = 8, - - SCK_TAB = 9, - - SCK_RETURN = 13, - - SCK_ADD = 310, - - SCK_SUBTRACT = 311, - - SCK_DIVIDE = 312, - - SCK_WIN = 313, - - SCK_RWIN = 314, - - SCK_MENU = 315, - - SCMOD_NORM = 0, - - SCMOD_SHIFT = 1, - - SCMOD_CTRL = 2, - - SCMOD_ALT = 4, - - SCMOD_SUPER = 8, - - SCMOD_META = 16, - - SC_AC_FILLUP = 1, - - SC_AC_DOUBLECLICK = 2, - - SC_AC_TAB = 3, - - SC_AC_NEWLINE = 4, - - SC_AC_COMMAND = 5, - - SC_CHARACTERSOURCE_DIRECT_INPUT = 0, - - SC_CHARACTERSOURCE_TENTATIVE_INPUT = 1, - - SC_CHARACTERSOURCE_IME_RESULT = 2, - - /// Events - SCN_STYLENEEDED = 2000, - - /// Events - SCN_CHARADDED = 2001, - - /// Events - SCN_SAVEPOINTREACHED = 2002, - - /// Events - SCN_SAVEPOINTLEFT = 2003, - - /// Events - SCN_MODIFYATTEMPTRO = 2004, - - /// GTK Specific to work around focus and accelerator problems: - SCN_KEY = 2005, - - /// GTK Specific to work around focus and accelerator problems: - SCN_DOUBLECLICK = 2006, - - /// GTK Specific to work around focus and accelerator problems: - SCN_UPDATEUI = 2007, - - /// GTK Specific to work around focus and accelerator problems: - SCN_MODIFIED = 2008, - - /// GTK Specific to work around focus and accelerator problems: - SCN_MACRORECORD = 2009, - - /// GTK Specific to work around focus and accelerator problems: - SCN_MARGINCLICK = 2010, - - /// GTK Specific to work around focus and accelerator problems: - SCN_NEEDSHOWN = 2011, - - /// GTK Specific to work around focus and accelerator problems: - SCN_PAINTED = 2013, - - /// GTK Specific to work around focus and accelerator problems: - SCN_USERLISTSELECTION = 2014, - - /// GTK Specific to work around focus and accelerator problems: - SCN_URIDROPPED = 2015, - - /// GTK Specific to work around focus and accelerator problems: - SCN_DWELLSTART = 2016, - - /// GTK Specific to work around focus and accelerator problems: - SCN_DWELLEND = 2017, - - /// GTK Specific to work around focus and accelerator problems: - SCN_ZOOM = 2018, - - /// GTK Specific to work around focus and accelerator problems: - SCN_HOTSPOTCLICK = 2019, - - /// GTK Specific to work around focus and accelerator problems: - SCN_HOTSPOTDOUBLECLICK = 2020, - - /// GTK Specific to work around focus and accelerator problems: - SCN_CALLTIPCLICK = 2021, - - /// GTK Specific to work around focus and accelerator problems: - SCN_AUTOCSELECTION = 2022, - - /// GTK Specific to work around focus and accelerator problems: - SCN_INDICATORCLICK = 2023, - - /// GTK Specific to work around focus and accelerator problems: - SCN_INDICATORRELEASE = 2024, - - /// GTK Specific to work around focus and accelerator problems: - SCN_AUTOCCANCELLED = 2025, - - /// GTK Specific to work around focus and accelerator problems: - SCN_AUTOCCHARDELETED = 2026, - - /// GTK Specific to work around focus and accelerator problems: - SCN_HOTSPOTRELEASECLICK = 2027, - - /// GTK Specific to work around focus and accelerator problems: - SCN_FOCUSIN = 2028, - - /// GTK Specific to work around focus and accelerator problems: - SCN_FOCUSOUT = 2029, - - /// GTK Specific to work around focus and accelerator problems: - SCN_AUTOCCOMPLETED = 2030, - - /// GTK Specific to work around focus and accelerator problems: - SCN_MARGINRIGHTCLICK = 2031, - - /// GTK Specific to work around focus and accelerator problems: - SCN_AUTOCSELECTIONCHANGE = 2032, - - SC_BIDIRECTIONAL_DISABLED = 0, - - SC_BIDIRECTIONAL_L2R = 1, - - SC_BIDIRECTIONAL_R2L = 2, - - /// Retrieve bidirectional text display state. - SCI_GETBIDIRECTIONAL = 2708, - - /// Set bidirectional text display state. - SCI_SETBIDIRECTIONAL = 2709, - - SC_LINECHARACTERINDEX_NONE = 0, - - SC_LINECHARACTERINDEX_UTF32 = 1, - - SC_LINECHARACTERINDEX_UTF16 = 2, - - /// Retrieve line character index state. - SCI_GETLINECHARACTERINDEX = 2710, - - /// Request line character index be created or its use count increased. - SCI_ALLOCATELINECHARACTERINDEX = 2711, - - /// Decrease use count of line character index and remove if 0. - SCI_RELEASELINECHARACTERINDEX = 2712, - - /// Retrieve the document line containing a position measured in index units. - SCI_LINEFROMINDEXPOSITION = 2713, - - /// Retrieve the position measured in index units at the start of a document line. - SCI_INDEXPOSITIONFROMLINE = 2714, - - /// Divide each styling byte into lexical class bits (default: 5) and indicator - /// bits (default: 3). If a lexer requires more than 32 lexical states, then this - /// is used to expand the possible states. - SCI_SETSTYLEBITS = 2090, - - /// Retrieve number of bits in style bytes used to hold the lexical state. - SCI_GETSTYLEBITS = 2091, - - /// Retrieve the number of bits the current lexer needs for styling. - SCI_GETSTYLEBITSNEEDED = 4011, - - /// Deprecated in 3.5.5 - /// Always interpret keyboard input as Unicode - SCI_SETKEYSUNICODE = 2521, - - /// Are keys always interpreted as Unicode? - SCI_GETKEYSUNICODE = 2522, - - /// Is drawing done in two phases with backgrounds drawn before foregrounds? - SCI_GETTWOPHASEDRAW = 2283, - - /// In twoPhaseDraw mode, drawing is performed in two phases, first the background - /// and then the foreground. This avoids chopping off characters that overlap the next run. - SCI_SETTWOPHASEDRAW = 2284, - - INDIC0_MASK = 0x20, - - INDIC1_MASK = 0x40, - - INDIC2_MASK = 0x80, - - INDICS_MASK = 0xE0, - - /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ - - SC_SEARCHRESULT_LINEBUFFERMAXLENGTH = 1024 - } - - public class TextToFind : IDisposable - { - Sci_TextToFind _sciTextToFind; - IntPtr _ptrSciTextToFind; - bool _disposed = false; - - /// - /// text to find - /// - /// range to search - /// the search pattern - public TextToFind(CharacterRange chrRange, string searchText) - { - _sciTextToFind.chrg = chrRange; - _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(searchText); - } - - /// - /// text to find - /// - /// range to search - /// range to search - /// the search pattern - public TextToFind(int cpmin, int cpmax, string searchText) - { - _sciTextToFind.chrg.cpMin = cpmin; - _sciTextToFind.chrg.cpMax = cpmax; - _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(searchText); - } - - [StructLayout(LayoutKind.Sequential)] - struct Sci_TextToFind - { - public CharacterRange chrg; - public IntPtr lpstrText; - public CharacterRange chrgText; - } - - public IntPtr NativePointer { get { _initNativeStruct(); return _ptrSciTextToFind; } } - public string lpstrText { set { _freeNativeString(); _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(value); } } - public CharacterRange chrg { get { _readNativeStruct(); return _sciTextToFind.chrg; } set { _sciTextToFind.chrg = value; _initNativeStruct(); } } - public CharacterRange chrgText { get { _readNativeStruct(); return _sciTextToFind.chrgText; } } - - void _initNativeStruct() - { - if (_ptrSciTextToFind == IntPtr.Zero) - _ptrSciTextToFind = Marshal.AllocHGlobal(Marshal.SizeOf(_sciTextToFind)); - Marshal.StructureToPtr(_sciTextToFind, _ptrSciTextToFind, false); - } - - void _readNativeStruct() - { - if (_ptrSciTextToFind != IntPtr.Zero) - _sciTextToFind = (Sci_TextToFind)Marshal.PtrToStructure(_ptrSciTextToFind, typeof(Sci_TextToFind)); - } - - void _freeNativeString() - { - if (_sciTextToFind.lpstrText != IntPtr.Zero) Marshal.FreeHGlobal(_sciTextToFind.lpstrText); - } - - public void Dispose() - { - if (!_disposed) - { - _freeNativeString(); - if (_ptrSciTextToFind != IntPtr.Zero) Marshal.FreeHGlobal(_ptrSciTextToFind); - _disposed = true; - } - } - - ~TextToFind() - { - Dispose(); - } - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +// +// This file should stay in sync with the CPP project file +// "notepad-plus-plus/scintilla/include/Scintilla.iface" +// found at +// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/include/Scintilla.iface + +using System; +using System.Runtime.InteropServices; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + /// + /// Compatible with Windows NMHDR. + /// hwndFrom is really an environment specific window handle or pointer + /// but most clients of Scintilla.h do not have this type visible. + /// + [StructLayout(LayoutKind.Sequential)] + public struct ScNotificationHeader + { + /// + /// environment specific window handle/pointer + /// + public IntPtr hwndFrom; + + /// + /// CtrlID of the window issuing the notification + /// + public IntPtr IdFrom; + + /// + /// The SCN_* notification Code + /// + public uint Code; + } + + [StructLayout(LayoutKind.Sequential)] + public struct ScNotification + { + public ScNotificationHeader Header; + private int position; /* SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION */ + public int character; /* SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, SCN_USERLISTSELECTION */ + public int Mmodifiers; /* SCN_KEY, SCN_DOUBLECLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE */ + public int ModificationType; /* SCN_MODIFIED - modification types are name "SC_MOD_*" */ + public IntPtr TextPointer; /* SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION, SCN_URIDROPPED */ + public int Length; /* SCN_MODIFIED */ + public int LinesAdded; /* SCN_MODIFIED */ + public int Message; /* SCN_MACRORECORD */ + public IntPtr wParam; /* SCN_MACRORECORD */ + public IntPtr lParam; /* SCN_MACRORECORD */ + + /// + /// 0-based index + /// + public int LineNumber; /* SCN_MODIFIED */ + public int FoldLevelNow; /* SCN_MODIFIED */ + public int FoldLevelPrev; /* SCN_MODIFIED */ + public int Margin; /* SCN_MARGINCLICK */ + public int ListType; /* SCN_USERLISTSELECTION */ + public int X; /* SCN_DWELLSTART, SCN_DWELLEND */ + public int Y; /* SCN_DWELLSTART, SCN_DWELLEND */ + public int Token; /* SCN_MODIFIED with SC_MOD_CONTAINER */ + public int AnnotationLinesAdded; /* SC_MOD_CHANGEANNOTATION */ + public int Updated; /* SCN_UPDATEUI */ + public int ListCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */ + + /// + /// SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_MARGINCLICK, SCN_NEEDSHOWN, SCN_DWELLSTART, SCN_DWELLEND, SCN_CALLTIPCLICK, SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK, SCN_HOTSPOTRELEASECLICK, SCN_INDICATORCLICK, SCN_INDICATORRELEASE, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION + /// + public Position Position { get { return new Position(position); } } + + /// + /// Character of the notification - eg keydown + /// SCN_CHARADDED, SCN_KEY, SCN_AUTOCCOMPLETE, SCN_AUTOCSELECTION, SCN_USERLISTSELECTION + /// + public char Character { get { return (char) character; } } + } + + [Flags] + public enum SciMsg : uint + { + /* ++Autogenerated -- start of section automatically generated from Scintilla.iface */ + INVALID_POSITION = 0xFFFFFFFF, + + SCI_START = 2000, + + SCI_OPTIONAL_START = 3000, + + SCI_LEXER_START = 4000, + + /// Add text to the document at current position. + SCI_ADDTEXT = 2001, + + /// Add array of cells to document. + SCI_ADDSTYLEDTEXT = 2002, + + /// Insert string at a position. + SCI_INSERTTEXT = 2003, + + /// Change the text that is being inserted in response to SC_MOD_INSERTCHECK + SCI_CHANGEINSERTION = 2672, + + /// Delete all text in the document. + SCI_CLEARALL = 2004, + + /// Delete a range of text in the document. + SCI_DELETERANGE = 2645, + + /// Set all style bytes to 0, remove all folding information. + SCI_CLEARDOCUMENTSTYLE = 2005, + + /// Returns the number of bytes in the document. + SCI_GETLENGTH = 2006, + + /// Returns the character byte at the position. + SCI_GETCHARAT = 2007, + + /// Returns the position of the caret. + SCI_GETCURRENTPOS = 2008, + + /// Returns the position of the opposite end of the selection to the caret. + SCI_GETANCHOR = 2009, + + /// Returns the style byte at the position. + SCI_GETSTYLEAT = 2010, + + /// Redoes the next action on the undo history. + SCI_REDO = 2011, + + /// Choose between collecting actions into the undo + /// history and discarding them. + SCI_SETUNDOCOLLECTION = 2012, + + /// Select all the text in the document. + SCI_SELECTALL = 2013, + + /// Remember the current position in the undo history as the position + /// at which the document was saved. + SCI_SETSAVEPOINT = 2014, + + /// Retrieve a buffer of cells. + /// Returns the number of bytes in the buffer not including terminating NULs. + SCI_GETSTYLEDTEXT = 2015, + + /// Are there any redoable actions in the undo history? + SCI_CANREDO = 2016, + + /// Retrieve the line number at which a particular marker is located. + SCI_MARKERLINEFROMHANDLE = 2017, + + /// Delete a marker. + SCI_MARKERDELETEHANDLE = 2018, + + /// Is undo history being collected? + SCI_GETUNDOCOLLECTION = 2019, + + SCWS_INVISIBLE = 0, + + SCWS_VISIBLEALWAYS = 1, + + SCWS_VISIBLEAFTERINDENT = 2, + + SCWS_VISIBLEONLYININDENT = 3, + + /// Are white space characters currently visible? + /// Returns one of SCWS_* constants. + SCI_GETVIEWWS = 2020, + + /// Make white space characters invisible, always visible or visible outside indentation. + SCI_SETVIEWWS = 2021, + + SCTD_LONGARROW = 0, + + SCTD_STRIKEOUT = 1, + + /// Retrieve the current tab draw mode. + /// Returns one of SCTD_* constants. + SCI_GETTABDRAWMODE = 2698, + + /// Set how tabs are drawn when visible. + SCI_SETTABDRAWMODE = 2699, + + /// Find the position from a point within the window. + SCI_POSITIONFROMPOINT = 2022, + + /// Find the position from a point within the window but return + /// INVALID_POSITION if not close to text. + SCI_POSITIONFROMPOINTCLOSE = 2023, + + /// Set caret to start of a line and ensure it is visible. + SCI_GOTOLINE = 2024, + + /// Set caret to a position and ensure it is visible. + SCI_GOTOPOS = 2025, + + /// Set the selection anchor to a position. The anchor is the opposite + /// end of the selection from the caret. + SCI_SETANCHOR = 2026, + + /// Retrieve the text of the line containing the caret. + /// Returns the index of the caret on the line. + /// Result is NUL-terminated. + SCI_GETCURLINE = 2027, + + /// Retrieve the position of the last correctly styled character. + SCI_GETENDSTYLED = 2028, + + SC_EOL_CRLF = 0, + + SC_EOL_CR = 1, + + SC_EOL_LF = 2, + + /// Convert all line endings in the document to one mode. + SCI_CONVERTEOLS = 2029, + + /// Retrieve the current end of line mode - one of CRLF, CR, or LF. + SCI_GETEOLMODE = 2030, + + /// Set the current end of line mode. + SCI_SETEOLMODE = 2031, + + /// Set the current styling position to start. + /// The unused parameter is no longer used and should be set to 0. + SCI_STARTSTYLING = 2032, + + /// Change style from current styling position for length characters to a style + /// and move the current styling position to after this newly styled segment. + SCI_SETSTYLING = 2033, + + /// Is drawing done first into a buffer or direct to the screen? + SCI_GETBUFFEREDDRAW = 2034, + + /// If drawing is buffered then each line of text is drawn into a bitmap buffer + /// before drawing it to the screen to avoid flicker. + SCI_SETBUFFEREDDRAW = 2035, + + /// Change the visible size of a tab to be a multiple of the width of a space character. + SCI_SETTABWIDTH = 2036, + + /// Retrieve the visible size of a tab. + SCI_GETTABWIDTH = 2121, + + /// Clear explicit tabstops on a line. + SCI_CLEARTABSTOPS = 2675, + + /// Add an explicit tab stop for a line. + SCI_ADDTABSTOP = 2676, + + /// Find the next explicit tab stop position on a line after a position. + SCI_GETNEXTTABSTOP = 2677, + + SC_CP_UTF8 = 65001, + + /// Set the code page used to interpret the bytes of the document as characters. + /// The SC_CP_UTF8 value can be used to enter Unicode mode. + SCI_SETCODEPAGE = 2037, + + SC_IME_WINDOWED = 0, + + SC_IME_INLINE = 1, + + /// Is the IME displayed in a window or inline? + SCI_GETIMEINTERACTION = 2678, + + /// Choose to display the the IME in a winow or inline. + SCI_SETIMEINTERACTION = 2679, + + MARKER_MAX = 31, + + SC_MARK_CIRCLE = 0, + + SC_MARK_ROUNDRECT = 1, + + SC_MARK_ARROW = 2, + + SC_MARK_SMALLRECT = 3, + + SC_MARK_SHORTARROW = 4, + + SC_MARK_EMPTY = 5, + + SC_MARK_ARROWDOWN = 6, + + SC_MARK_MINUS = 7, + + SC_MARK_PLUS = 8, + + SC_MARK_VLINE = 9, + + SC_MARK_LCORNER = 10, + + SC_MARK_TCORNER = 11, + + SC_MARK_BOXPLUS = 12, + + SC_MARK_BOXPLUSCONNECTED = 13, + + SC_MARK_BOXMINUS = 14, + + SC_MARK_BOXMINUSCONNECTED = 15, + + SC_MARK_LCORNERCURVE = 16, + + SC_MARK_TCORNERCURVE = 17, + + SC_MARK_CIRCLEPLUS = 18, + + SC_MARK_CIRCLEPLUSCONNECTED = 19, + + SC_MARK_CIRCLEMINUS = 20, + + SC_MARK_CIRCLEMINUSCONNECTED = 21, + + SC_MARK_BACKGROUND = 22, + + SC_MARK_DOTDOTDOT = 23, + + SC_MARK_ARROWS = 24, + + SC_MARK_PIXMAP = 25, + + SC_MARK_FULLRECT = 26, + + SC_MARK_LEFTRECT = 27, + + SC_MARK_AVAILABLE = 28, + + SC_MARK_UNDERLINE = 29, + + SC_MARK_RGBAIMAGE = 30, + + SC_MARK_BOOKMARK = 31, + + SC_MARK_VERTICALBOOKMARK = 32, + + SC_MARK_CHARACTER = 10000, + + SC_MARKNUM_FOLDEREND = 25, + + SC_MARKNUM_FOLDEROPENMID = 26, + + SC_MARKNUM_FOLDERMIDTAIL = 27, + + SC_MARKNUM_FOLDERTAIL = 28, + + SC_MARKNUM_FOLDERSUB = 29, + + SC_MARKNUM_FOLDER = 30, + + SC_MARKNUM_FOLDEROPEN = 31, + + SC_MASK_FOLDERS = 0xFE000000, + + /// Set the symbol used for a particular marker number. + SCI_MARKERDEFINE = 2040, + + /// Set the foreground colour used for a particular marker number. + SCI_MARKERSETFORE = 2041, + + /// Set the background colour used for a particular marker number. + SCI_MARKERSETBACK = 2042, + + /// Set the background colour used for a particular marker number when its folding block is selected. + SCI_MARKERSETBACKSELECTED = 2292, + + /// Enable/disable highlight for current folding bloc (smallest one that contains the caret) + SCI_MARKERENABLEHIGHLIGHT = 2293, + + /// Add a marker to a line, returning an ID which can be used to find or delete the marker. + SCI_MARKERADD = 2043, + + /// Delete a marker from a line. + SCI_MARKERDELETE = 2044, + + /// Delete all markers with a particular number from all lines. + SCI_MARKERDELETEALL = 2045, + + /// Get a bit mask of all the markers set on a line. + SCI_MARKERGET = 2046, + + /// Find the next line at or after lineStart that includes a marker in mask. + /// Return -1 when no more lines. + SCI_MARKERNEXT = 2047, + + /// Find the previous line before lineStart that includes a marker in mask. + SCI_MARKERPREVIOUS = 2048, + + /// Define a marker from a pixmap. + SCI_MARKERDEFINEPIXMAP = 2049, + + /// Add a set of markers to a line. + SCI_MARKERADDSET = 2466, + + /// Set the alpha used for a marker that is drawn in the text area, not the margin. + SCI_MARKERSETALPHA = 2476, + + SC_MAX_MARGIN = 4, + + SC_MARGIN_SYMBOL = 0, + + SC_MARGIN_NUMBER = 1, + + SC_MARGIN_BACK = 2, + + SC_MARGIN_FORE = 3, + + SC_MARGIN_TEXT = 4, + + SC_MARGIN_RTEXT = 5, + + SC_MARGIN_COLOUR = 6, + + /// Set a margin to be either numeric or symbolic. + SCI_SETMARGINTYPEN = 2240, + + /// Retrieve the type of a margin. + SCI_GETMARGINTYPEN = 2241, + + /// Set the width of a margin to a width expressed in pixels. + SCI_SETMARGINWIDTHN = 2242, + + /// Retrieve the width of a margin in pixels. + SCI_GETMARGINWIDTHN = 2243, + + /// Set a mask that determines which markers are displayed in a margin. + SCI_SETMARGINMASKN = 2244, + + /// Retrieve the marker mask of a margin. + SCI_GETMARGINMASKN = 2245, + + /// Make a margin sensitive or insensitive to mouse clicks. + SCI_SETMARGINSENSITIVEN = 2246, + + /// Retrieve the mouse click sensitivity of a margin. + SCI_GETMARGINSENSITIVEN = 2247, + + /// Set the cursor shown when the mouse is inside a margin. + SCI_SETMARGINCURSORN = 2248, + + /// Retrieve the cursor shown in a margin. + SCI_GETMARGINCURSORN = 2249, + + /// Set the background colour of a margin. Only visible for SC_MARGIN_COLOUR. + SCI_SETMARGINBACKN = 2250, + + /// Retrieve the background colour of a margin + SCI_GETMARGINBACKN = 2251, + + /// Allocate a non-standard number of margins. + SCI_SETMARGINS = 2252, + + /// How many margins are there?. + SCI_GETMARGINS = 2253, + + STYLE_DEFAULT = 32, + + STYLE_LINENUMBER = 33, + + STYLE_BRACELIGHT = 34, + + STYLE_BRACEBAD = 35, + + STYLE_CONTROLCHAR = 36, + + STYLE_INDENTGUIDE = 37, + + STYLE_CALLTIP = 38, + + STYLE_FOLDDISPLAYTEXT = 39, + + STYLE_LASTPREDEFINED = 39, + + STYLE_MAX = 255, + + SC_CHARSET_ANSI = 0, + + SC_CHARSET_DEFAULT = 1, + + SC_CHARSET_BALTIC = 186, + + SC_CHARSET_CHINESEBIG5 = 136, + + SC_CHARSET_EASTEUROPE = 238, + + SC_CHARSET_GB2312 = 134, + + SC_CHARSET_GREEK = 161, + + SC_CHARSET_HANGUL = 129, + + SC_CHARSET_MAC = 77, + + SC_CHARSET_OEM = 255, + + SC_CHARSET_RUSSIAN = 204, + + SC_CHARSET_OEM866 = 866, + + SC_CHARSET_CYRILLIC = 1251, + + SC_CHARSET_SHIFTJIS = 128, + + SC_CHARSET_SYMBOL = 2, + + SC_CHARSET_TURKISH = 162, + + SC_CHARSET_JOHAB = 130, + + SC_CHARSET_HEBREW = 177, + + SC_CHARSET_ARABIC = 178, + + SC_CHARSET_VIETNAMESE = 163, + + SC_CHARSET_THAI = 222, + + SC_CHARSET_8859_15 = 1000, + + /// Clear all the styles and make equivalent to the global default style. + SCI_STYLECLEARALL = 2050, + + /// Set the foreground colour of a style. + SCI_STYLESETFORE = 2051, + + /// Set the background colour of a style. + SCI_STYLESETBACK = 2052, + + /// Set a style to be bold or not. + SCI_STYLESETBOLD = 2053, + + /// Set a style to be italic or not. + SCI_STYLESETITALIC = 2054, + + /// Set the size of characters of a style. + SCI_STYLESETSIZE = 2055, + + /// Set the font of a style. + SCI_STYLESETFONT = 2056, + + /// Set a style to have its end of line filled or not. + SCI_STYLESETEOLFILLED = 2057, + + /// Reset the default style to its state at startup + SCI_STYLERESETDEFAULT = 2058, + + /// Set a style to be underlined or not. + SCI_STYLESETUNDERLINE = 2059, + + SC_CASE_MIXED = 0, + + SC_CASE_UPPER = 1, + + SC_CASE_LOWER = 2, + + SC_CASE_CAMEL = 3, + + /// Get the foreground colour of a style. + SCI_STYLEGETFORE = 2481, + + /// Get the background colour of a style. + SCI_STYLEGETBACK = 2482, + + /// Get is a style bold or not. + SCI_STYLEGETBOLD = 2483, + + /// Get is a style italic or not. + SCI_STYLEGETITALIC = 2484, + + /// Get the size of characters of a style. + SCI_STYLEGETSIZE = 2485, + + /// Get the font of a style. + /// Returns the length of the fontName + /// Result is NUL-terminated. + SCI_STYLEGETFONT = 2486, + + /// Get is a style to have its end of line filled or not. + SCI_STYLEGETEOLFILLED = 2487, + + /// Get is a style underlined or not. + SCI_STYLEGETUNDERLINE = 2488, + + /// Get is a style mixed case, or to force upper or lower case. + SCI_STYLEGETCASE = 2489, + + /// Get the character get of the font in a style. + SCI_STYLEGETCHARACTERSET = 2490, + + /// Get is a style visible or not. + SCI_STYLEGETVISIBLE = 2491, + + /// Get is a style changeable or not (read only). + /// Experimental feature, currently buggy. + SCI_STYLEGETCHANGEABLE = 2492, + + /// Get is a style a hotspot or not. + SCI_STYLEGETHOTSPOT = 2493, + + /// Set a style to be mixed case, or to force upper or lower case. + SCI_STYLESETCASE = 2060, + + SC_FONT_SIZE_MULTIPLIER = 100, + + /// Set the size of characters of a style. Size is in points multiplied by 100. + SCI_STYLESETSIZEFRACTIONAL = 2061, + + /// Get the size of characters of a style in points multiplied by 100 + SCI_STYLEGETSIZEFRACTIONAL = 2062, + + SC_WEIGHT_NORMAL = 400, + + SC_WEIGHT_SEMIBOLD = 600, + + SC_WEIGHT_BOLD = 700, + + /// Set the weight of characters of a style. + SCI_STYLESETWEIGHT = 2063, + + /// Get the weight of characters of a style. + SCI_STYLEGETWEIGHT = 2064, + + /// Set the character set of the font in a style. + SCI_STYLESETCHARACTERSET = 2066, + + /// Set a style to be a hotspot or not. + SCI_STYLESETHOTSPOT = 2409, + + /// Set the foreground colour of the main and additional selections and whether to use this setting. + SCI_SETSELFORE = 2067, + + /// Set the background colour of the main and additional selections and whether to use this setting. + SCI_SETSELBACK = 2068, + + /// Get the alpha of the selection. + SCI_GETSELALPHA = 2477, + + /// Set the alpha of the selection. + SCI_SETSELALPHA = 2478, + + /// Is the selection end of line filled? + SCI_GETSELEOLFILLED = 2479, + + /// Set the selection to have its end of line filled or not. + SCI_SETSELEOLFILLED = 2480, + + /// Set the foreground colour of the caret. + SCI_SETCARETFORE = 2069, + + /// When key+modifier combination keyDefinition is pressed perform sciCommand. + SCI_ASSIGNCMDKEY = 2070, + + /// When key+modifier combination keyDefinition is pressed do nothing. + SCI_CLEARCMDKEY = 2071, + + /// Drop all key mappings. + SCI_CLEARALLCMDKEYS = 2072, + + /// Set the styles for a segment of the document. + SCI_SETSTYLINGEX = 2073, + + /// Set a style to be visible or not. + SCI_STYLESETVISIBLE = 2074, + + /// Get the time in milliseconds that the caret is on and off. + SCI_GETCARETPERIOD = 2075, + + /// Get the time in milliseconds that the caret is on and off. 0 = steady on. + SCI_SETCARETPERIOD = 2076, + + /// Set the set of characters making up words for when moving or selecting by word. + /// First sets defaults like SetCharsDefault. + SCI_SETWORDCHARS = 2077, + + /// Get the set of characters making up words for when moving or selecting by word. + /// Returns the number of characters + SCI_GETWORDCHARS = 2646, + + /// Set the number of characters to have directly indexed categories + SCI_SETCHARACTERCATEGORYOPTIMIZATION = 2720, + + /// Get the number of characters to have directly indexed categories + SCI_GETCHARACTERCATEGORYOPTIMIZATION = 2721, + + /// Start a sequence of actions that is undone and redone as a unit. + /// May be nested. + SCI_BEGINUNDOACTION = 2078, + + /// End a sequence of actions that is undone and redone as a unit. + SCI_ENDUNDOACTION = 2079, + + INDIC_PLAIN = 0, + + INDIC_SQUIGGLE = 1, + + INDIC_TT = 2, + + INDIC_DIAGONAL = 3, + + INDIC_STRIKE = 4, + + INDIC_HIDDEN = 5, + + INDIC_BOX = 6, + + INDIC_ROUNDBOX = 7, + + INDIC_STRAIGHTBOX = 8, + + INDIC_DASH = 9, + + INDIC_DOTS = 10, + + INDIC_SQUIGGLELOW = 11, + + INDIC_DOTBOX = 12, + + INDIC_SQUIGGLEPIXMAP = 13, + + INDIC_COMPOSITIONTHICK = 14, + + INDIC_COMPOSITIONTHIN = 15, + + INDIC_FULLBOX = 16, + + INDIC_TEXTFORE = 17, + + INDIC_POINT = 18, + + INDIC_POINTCHARACTER = 19, + + INDIC_GRADIENT = 20, + + INDIC_GRADIENTCENTRE = 21, + + INDIC_CONTAINER = 8, + + INDIC_IME = 32, + + INDIC_IME_MAX = 35, + + INDIC_MAX = 35, + + INDICATOR_CONTAINER = 8, + + INDICATOR_IME = 32, + + INDICATOR_IME_MAX = 35, + + INDICATOR_MAX = 35, + + /// Set an indicator to plain, squiggle or TT. + SCI_INDICSETSTYLE = 2080, + + /// Retrieve the style of an indicator. + SCI_INDICGETSTYLE = 2081, + + /// Set the foreground colour of an indicator. + SCI_INDICSETFORE = 2082, + + /// Retrieve the foreground colour of an indicator. + SCI_INDICGETFORE = 2083, + + /// Set an indicator to draw under text or over(default). + SCI_INDICSETUNDER = 2510, + + /// Retrieve whether indicator drawn under or over text. + SCI_INDICGETUNDER = 2511, + + /// Set a hover indicator to plain, squiggle or TT. + SCI_INDICSETHOVERSTYLE = 2680, + + /// Retrieve the hover style of an indicator. + SCI_INDICGETHOVERSTYLE = 2681, + + /// Set the foreground hover colour of an indicator. + SCI_INDICSETHOVERFORE = 2682, + + /// Retrieve the foreground hover colour of an indicator. + SCI_INDICGETHOVERFORE = 2683, + + SC_INDICVALUEBIT = 0x1000000, + + SC_INDICVALUEMASK = 0xFFFFFF, + + SC_INDICFLAG_VALUEFORE = 1, + + /// Set the attributes of an indicator. + SCI_INDICSETFLAGS = 2684, + + /// Retrieve the attributes of an indicator. + SCI_INDICGETFLAGS = 2685, + + /// Set the foreground colour of all whitespace and whether to use this setting. + SCI_SETWHITESPACEFORE = 2084, + + /// Set the background colour of all whitespace and whether to use this setting. + SCI_SETWHITESPACEBACK = 2085, + + /// Set the size of the dots used to mark space characters. + SCI_SETWHITESPACESIZE = 2086, + + /// Get the size of the dots used to mark space characters. + SCI_GETWHITESPACESIZE = 2087, + + /// Used to hold extra styling information for each line. + SCI_SETLINESTATE = 2092, + + /// Retrieve the extra styling information for a line. + SCI_GETLINESTATE = 2093, + + /// Retrieve the last line number that has line state. + SCI_GETMAXLINESTATE = 2094, + + /// Is the background of the line containing the caret in a different colour? + SCI_GETCARETLINEVISIBLE = 2095, + + /// Display the background of the line containing the caret in a different colour. + SCI_SETCARETLINEVISIBLE = 2096, + + /// Get the colour of the background of the line containing the caret. + SCI_GETCARETLINEBACK = 2097, + + /// Set the colour of the background of the line containing the caret. + SCI_SETCARETLINEBACK = 2098, + + /// Retrieve the caret line frame width. + /// Width = 0 means this option is disabled. + SCI_GETCARETLINEFRAME = 2704, + + /// Display the caret line framed. + /// Set width != 0 to enable this option and width = 0 to disable it. + SCI_SETCARETLINEFRAME = 2705, + + /// Set a style to be changeable or not (read only). + /// Experimental feature, currently buggy. + SCI_STYLESETCHANGEABLE = 2099, + + /// Display a auto-completion list. + /// The lengthEntered parameter indicates how many characters before + /// the caret should be used to provide context. + SCI_AUTOCSHOW = 2100, + + /// Remove the auto-completion list from the screen. + SCI_AUTOCCANCEL = 2101, + + /// Is there an auto-completion list visible? + SCI_AUTOCACTIVE = 2102, + + /// Retrieve the position of the caret when the auto-completion list was displayed. + SCI_AUTOCPOSSTART = 2103, + + /// User has selected an item so remove the list and insert the selection. + SCI_AUTOCCOMPLETE = 2104, + + /// Define a set of character that when typed cancel the auto-completion list. + SCI_AUTOCSTOPS = 2105, + + /// Change the separator character in the string setting up an auto-completion list. + /// Default is space but can be changed if items contain space. + SCI_AUTOCSETSEPARATOR = 2106, + + /// Retrieve the auto-completion list separator character. + SCI_AUTOCGETSEPARATOR = 2107, + + /// Select the item in the auto-completion list that starts with a string. + SCI_AUTOCSELECT = 2108, + + /// Should the auto-completion list be cancelled if the user backspaces to a + /// position before where the box was created. + SCI_AUTOCSETCANCELATSTART = 2110, + + /// Retrieve whether auto-completion cancelled by backspacing before start. + SCI_AUTOCGETCANCELATSTART = 2111, + + /// Define a set of characters that when typed will cause the autocompletion to + /// choose the selected item. + SCI_AUTOCSETFILLUPS = 2112, + + /// Should a single item auto-completion list automatically choose the item. + SCI_AUTOCSETCHOOSESINGLE = 2113, + + /// Retrieve whether a single item auto-completion list automatically choose the item. + SCI_AUTOCGETCHOOSESINGLE = 2114, + + /// Set whether case is significant when performing auto-completion searches. + SCI_AUTOCSETIGNORECASE = 2115, + + /// Retrieve state of ignore case flag. + SCI_AUTOCGETIGNORECASE = 2116, + + /// Display a list of strings and send notification when user chooses one. + SCI_USERLISTSHOW = 2117, + + /// Set whether or not autocompletion is hidden automatically when nothing matches. + SCI_AUTOCSETAUTOHIDE = 2118, + + /// Retrieve whether or not autocompletion is hidden automatically when nothing matches. + SCI_AUTOCGETAUTOHIDE = 2119, + + /// Set whether or not autocompletion deletes any word characters + /// after the inserted text upon completion. + SCI_AUTOCSETDROPRESTOFWORD = 2270, + + /// Retrieve whether or not autocompletion deletes any word characters + /// after the inserted text upon completion. + SCI_AUTOCGETDROPRESTOFWORD = 2271, + + /// Register an XPM image for use in autocompletion lists. + SCI_REGISTERIMAGE = 2405, + + /// Clear all the registered XPM images. + SCI_CLEARREGISTEREDIMAGES = 2408, + + /// Retrieve the auto-completion list type-separator character. + SCI_AUTOCGETTYPESEPARATOR = 2285, + + /// Change the type-separator character in the string setting up an auto-completion list. + /// Default is '?' but can be changed if items contain '?'. + SCI_AUTOCSETTYPESEPARATOR = 2286, + + /// Set the maximum width, in characters, of auto-completion and user lists. + /// Set to 0 to autosize to fit longest item, which is the default. + SCI_AUTOCSETMAXWIDTH = 2208, + + /// Get the maximum width, in characters, of auto-completion and user lists. + SCI_AUTOCGETMAXWIDTH = 2209, + + /// Set the maximum height, in rows, of auto-completion and user lists. + /// The default is 5 rows. + SCI_AUTOCSETMAXHEIGHT = 2210, + + /// Set the maximum height, in rows, of auto-completion and user lists. + SCI_AUTOCGETMAXHEIGHT = 2211, + + /// Set the number of spaces used for one level of indentation. + SCI_SETINDENT = 2122, + + /// Retrieve indentation size. + SCI_GETINDENT = 2123, + + /// Indentation will only use space characters if useTabs is false, otherwise + /// it will use a combination of tabs and spaces. + SCI_SETUSETABS = 2124, + + /// Retrieve whether tabs will be used in indentation. + SCI_GETUSETABS = 2125, + + /// Change the indentation of a line to a number of columns. + SCI_SETLINEINDENTATION = 2126, + + /// Retrieve the number of columns that a line is indented. + SCI_GETLINEINDENTATION = 2127, + + /// Retrieve the position before the first non indentation character on a line. + SCI_GETLINEINDENTPOSITION = 2128, + + /// Retrieve the column number of a position, taking tab width into account. + SCI_GETCOLUMN = 2129, + + /// Count characters between two positions. + SCI_COUNTCHARACTERS = 2633, + + /// Count code units between two positions. + SCI_COUNTCODEUNITS = 2715, + + /// Show or hide the horizontal scroll bar. + SCI_SETHSCROLLBAR = 2130, + + /// Is the horizontal scroll bar visible? + SCI_GETHSCROLLBAR = 2131, + + SC_IV_NONE = 0, + + SC_IV_REAL = 1, + + SC_IV_LOOKFORWARD = 2, + + SC_IV_LOOKBOTH = 3, + + /// Show or hide indentation guides. + SCI_SETINDENTATIONGUIDES = 2132, + + /// Are the indentation guides visible? + SCI_GETINDENTATIONGUIDES = 2133, + + /// Set the highlighted indentation guide column. + /// 0 = no highlighted guide. + SCI_SETHIGHLIGHTGUIDE = 2134, + + /// Get the highlighted indentation guide column. + SCI_GETHIGHLIGHTGUIDE = 2135, + + /// Get the position after the last visible characters on a line. + SCI_GETLINEENDPOSITION = 2136, + + /// Get the code page used to interpret the bytes of the document as characters. + SCI_GETCODEPAGE = 2137, + + /// Get the foreground colour of the caret. + SCI_GETCARETFORE = 2138, + + /// In read-only mode? + SCI_GETREADONLY = 2140, + + /// Sets the position of the caret. + SCI_SETCURRENTPOS = 2141, + + /// Sets the position that starts the selection - this becomes the anchor. + SCI_SETSELECTIONSTART = 2142, + + /// Returns the position at the start of the selection. + SCI_GETSELECTIONSTART = 2143, + + /// Sets the position that ends the selection - this becomes the caret. + SCI_SETSELECTIONEND = 2144, + + /// Returns the position at the end of the selection. + SCI_GETSELECTIONEND = 2145, + + /// Set caret to a position, while removing any existing selection. + SCI_SETEMPTYSELECTION = 2556, + + /// Sets the print magnification added to the point size of each style for printing. + SCI_SETPRINTMAGNIFICATION = 2146, + + /// Returns the print magnification. + SCI_GETPRINTMAGNIFICATION = 2147, + + SC_PRINT_NORMAL = 0, + + SC_PRINT_INVERTLIGHT = 1, + + SC_PRINT_BLACKONWHITE = 2, + + SC_PRINT_COLOURONWHITE = 3, + + SC_PRINT_COLOURONWHITEDEFAULTBG = 4, + + SC_PRINT_SCREENCOLOURS = 5, + + /// Modify colours when printing for clearer printed text. + SCI_SETPRINTCOLOURMODE = 2148, + + /// Returns the print colour mode. + SCI_GETPRINTCOLOURMODE = 2149, + + SCFIND_NONE = 0x0, + + SCFIND_WHOLEWORD = 0x2, + + SCFIND_MATCHCASE = 0x4, + + SCFIND_WORDSTART = 0x00100000, + + SCFIND_REGEXP = 0x00200000, + + SCFIND_POSIX = 0x00400000, + + SCFIND_CXX11REGEX = 0x00800000, + + /// Find some text in the document. + SCI_FINDTEXT = 2150, + + /// On Windows, will draw the document into a display context such as a printer. + SCI_FORMATRANGE = 2151, + + /// Retrieve the display line at the top of the display. + SCI_GETFIRSTVISIBLELINE = 2152, + + /// Retrieve the contents of a line. + /// Returns the length of the line. + SCI_GETLINE = 2153, + + /// Returns the number of lines in the document. There is always at least one. + SCI_GETLINECOUNT = 2154, + + /// Sets the size in pixels of the left margin. + SCI_SETMARGINLEFT = 2155, + + /// Returns the size in pixels of the left margin. + SCI_GETMARGINLEFT = 2156, + + /// Sets the size in pixels of the right margin. + SCI_SETMARGINRIGHT = 2157, + + /// Returns the size in pixels of the right margin. + SCI_GETMARGINRIGHT = 2158, + + /// Is the document different from when it was last saved? + SCI_GETMODIFY = 2159, + + /// Select a range of text. + SCI_SETSEL = 2160, + + /// Retrieve the selected text. + /// Return the length of the text. + /// Result is NUL-terminated. + SCI_GETSELTEXT = 2161, + + /// Retrieve a range of text. + /// Return the length of the text. + SCI_GETTEXTRANGE = 2162, + + /// Draw the selection either highlighted or in normal (non-highlighted) style. + SCI_HIDESELECTION = 2163, + + /// Retrieve the x value of the point in the window where a position is displayed. + SCI_POINTXFROMPOSITION = 2164, + + /// Retrieve the y value of the point in the window where a position is displayed. + SCI_POINTYFROMPOSITION = 2165, + + /// Retrieve the line containing a position. + SCI_LINEFROMPOSITION = 2166, + + /// Retrieve the position at the start of a line. + SCI_POSITIONFROMLINE = 2167, + + /// Scroll horizontally and vertically. + SCI_LINESCROLL = 2168, + + /// Ensure the caret is visible. + SCI_SCROLLCARET = 2169, + + /// Scroll the argument positions and the range between them into view giving + /// priority to the primary position then the secondary position. + /// This may be used to make a search match visible. + SCI_SCROLLRANGE = 2569, + + /// Replace the selected text with the argument text. + SCI_REPLACESEL = 2170, + + /// Set to read only or read write. + SCI_SETREADONLY = 2171, + + /// Null operation. + SCI_NULL = 2172, + + /// Will a paste succeed? + SCI_CANPASTE = 2173, + + /// Are there any undoable actions in the undo history? + SCI_CANUNDO = 2174, + + /// Delete the undo history. + SCI_EMPTYUNDOBUFFER = 2175, + + /// Undo one action in the undo history. + SCI_UNDO = 2176, + + /// Cut the selection to the clipboard. + SCI_CUT = 2177, + + /// Copy the selection to the clipboard. + SCI_COPY = 2178, + + /// Paste the contents of the clipboard into the document replacing the selection. + SCI_PASTE = 2179, + + /// Clear the selection. + SCI_CLEAR = 2180, + + /// Replace the contents of the document with the argument text. + SCI_SETTEXT = 2181, + + /// Retrieve all the text in the document. + /// Returns number of characters retrieved. + /// Result is NUL-terminated. + SCI_GETTEXT = 2182, + + /// Retrieve the number of characters in the document. + SCI_GETTEXTLENGTH = 2183, + + /// Retrieve a pointer to a function that processes messages for this Scintilla. + SCI_GETDIRECTFUNCTION = 2184, + + /// Retrieve a pointer value to use as the first argument when calling + /// the function returned by GetDirectFunction. + SCI_GETDIRECTPOINTER = 2185, + + /// Set to overtype (true) or insert mode. + SCI_SETOVERTYPE = 2186, + + /// Returns true if overtype mode is active otherwise false is returned. + SCI_GETOVERTYPE = 2187, + + /// Set the width of the insert mode caret. + SCI_SETCARETWIDTH = 2188, + + /// Returns the width of the insert mode caret. + SCI_GETCARETWIDTH = 2189, + + /// Sets the position that starts the target which is used for updating the + /// document without affecting the scroll position. + SCI_SETTARGETSTART = 2190, + + /// Get the position that starts the target. + SCI_GETTARGETSTART = 2191, + + /// Sets the position that ends the target which is used for updating the + /// document without affecting the scroll position. + SCI_SETTARGETEND = 2192, + + /// Get the position that ends the target. + SCI_GETTARGETEND = 2193, + + /// Sets both the start and end of the target in one call. + SCI_SETTARGETRANGE = 2686, + + /// Retrieve the text in the target. + SCI_GETTARGETTEXT = 2687, + + /// Make the target range start and end be the same as the selection range start and end. + SCI_TARGETFROMSELECTION = 2287, + + /// Sets the target to the whole document. + SCI_TARGETWHOLEDOCUMENT = 2690, + + /// Replace the target text with the argument text. + /// Text is counted so it can contain NULs. + /// Returns the length of the replacement text. + SCI_REPLACETARGET = 2194, + + /// Replace the target text with the argument text after \d processing. + /// Text is counted so it can contain NULs. + /// Looks for \d where d is between 1 and 9 and replaces these with the strings + /// matched in the last search operation which were surrounded by \( and \). + /// Returns the length of the replacement text including any change + /// caused by processing the \d patterns. + SCI_REPLACETARGETRE = 2195, + + /// Search for a counted string in the target and set the target to the found + /// range. Text is counted so it can contain NULs. + /// Returns start of found range or -1 for failure in which case target is not moved. + SCI_SEARCHINTARGET = 2197, + + /// Set the search flags used by SearchInTarget. + SCI_SETSEARCHFLAGS = 2198, + + /// Get the search flags used by SearchInTarget. + SCI_GETSEARCHFLAGS = 2199, + + /// Show a call tip containing a definition near position pos. + SCI_CALLTIPSHOW = 2200, + + /// Remove the call tip from the screen. + SCI_CALLTIPCANCEL = 2201, + + /// Is there an active call tip? + SCI_CALLTIPACTIVE = 2202, + + /// Retrieve the position where the caret was before displaying the call tip. + SCI_CALLTIPPOSSTART = 2203, + + /// Set the start position in order to change when backspacing removes the calltip. + SCI_CALLTIPSETPOSSTART = 2214, + + /// Highlight a segment of the definition. + SCI_CALLTIPSETHLT = 2204, + + /// Set the background colour for the call tip. + SCI_CALLTIPSETBACK = 2205, + + /// Set the foreground colour for the call tip. + SCI_CALLTIPSETFORE = 2206, + + /// Set the foreground colour for the highlighted part of the call tip. + SCI_CALLTIPSETFOREHLT = 2207, + + /// Enable use of STYLE_CALLTIP and set call tip tab size in pixels. + SCI_CALLTIPUSESTYLE = 2212, + + /// Set position of calltip, above or below text. + SCI_CALLTIPSETPOSITION = 2213, + + /// Find the display line of a document line taking hidden lines into account. + SCI_VISIBLEFROMDOCLINE = 2220, + + /// Find the document line of a display line taking hidden lines into account. + SCI_DOCLINEFROMVISIBLE = 2221, + + /// The number of display lines needed to wrap a document line + SCI_WRAPCOUNT = 2235, + + SC_FOLDLEVELBASE = 0x400, + + SC_FOLDLEVELWHITEFLAG = 0x1000, + + SC_FOLDLEVELHEADERFLAG = 0x2000, + + SC_FOLDLEVELNUMBERMASK = 0x0FFF, + + /// Set the fold level of a line. + /// This encodes an integer level along with flags indicating whether the + /// line is a header and whether it is effectively white space. + SCI_SETFOLDLEVEL = 2222, + + /// Retrieve the fold level of a line. + SCI_GETFOLDLEVEL = 2223, + + /// Find the last child line of a header line. + SCI_GETLASTCHILD = 2224, + + /// Find the parent line of a child line. + SCI_GETFOLDPARENT = 2225, + + /// Make a range of lines visible. + SCI_SHOWLINES = 2226, + + /// Make a range of lines invisible. + SCI_HIDELINES = 2227, + + /// Is a line visible? + SCI_GETLINEVISIBLE = 2228, + + /// Are all lines visible? + SCI_GETALLLINESVISIBLE = 2236, + + /// Show the children of a header line. + SCI_SETFOLDEXPANDED = 2229, + + /// Is a header line expanded? + SCI_GETFOLDEXPANDED = 2230, + + /// Switch a header line between expanded and contracted. + SCI_TOGGLEFOLD = 2231, + + /// Switch a header line between expanded and contracted and show some text after the line. + SCI_TOGGLEFOLDSHOWTEXT = 2700, + + SC_FOLDDISPLAYTEXT_HIDDEN = 0, + + SC_FOLDDISPLAYTEXT_STANDARD = 1, + + SC_FOLDDISPLAYTEXT_BOXED = 2, + + /// Set the style of fold display text. + SCI_FOLDDISPLAYTEXTSETSTYLE = 2701, + + /// Get the style of fold display text. + SCI_FOLDDISPLAYTEXTGETSTYLE = 2707, + + /// Set the default fold display text. + SCI_SETDEFAULTFOLDDISPLAYTEXT = 2722, + + /// Get the default fold display text. + SCI_GETDEFAULTFOLDDISPLAYTEXT = 2723, + + SC_FOLDACTION_CONTRACT = 0, + + SC_FOLDACTION_EXPAND = 1, + + SC_FOLDACTION_TOGGLE = 2, + + /// Expand or contract a fold header. + SCI_FOLDLINE = 2237, + + /// Expand or contract a fold header and its children. + SCI_FOLDCHILDREN = 2238, + + /// Expand a fold header and all children. Use the level argument instead of the line's current level. + SCI_EXPANDCHILDREN = 2239, + + /// Expand or contract all fold headers. + SCI_FOLDALL = 2662, + + /// Ensure a particular line is visible by expanding any header line hiding it. + SCI_ENSUREVISIBLE = 2232, + + SC_AUTOMATICFOLD_SHOW = 0x0001, + + SC_AUTOMATICFOLD_CLICK = 0x0002, + + SC_AUTOMATICFOLD_CHANGE = 0x0004, + + /// Set automatic folding behaviours. + SCI_SETAUTOMATICFOLD = 2663, + + /// Get automatic folding behaviours. + SCI_GETAUTOMATICFOLD = 2664, + + SC_FOLDFLAG_LINEBEFORE_EXPANDED = 0x0002, + + SC_FOLDFLAG_LINEBEFORE_CONTRACTED = 0x0004, + + SC_FOLDFLAG_LINEAFTER_EXPANDED = 0x0008, + + SC_FOLDFLAG_LINEAFTER_CONTRACTED = 0x0010, + + SC_FOLDFLAG_LEVELNUMBERS = 0x0040, + + SC_FOLDFLAG_LINESTATE = 0x0080, + + /// Set some style options for folding. + SCI_SETFOLDFLAGS = 2233, + + /// Ensure a particular line is visible by expanding any header line hiding it. + /// Use the currently set visibility policy to determine which range to display. + SCI_ENSUREVISIBLEENFORCEPOLICY = 2234, + + /// Sets whether a tab pressed when caret is within indentation indents. + SCI_SETTABINDENTS = 2260, + + /// Does a tab pressed when caret is within indentation indent? + SCI_GETTABINDENTS = 2261, + + /// Sets whether a backspace pressed when caret is within indentation unindents. + SCI_SETBACKSPACEUNINDENTS = 2262, + + /// Does a backspace pressed when caret is within indentation unindent? + SCI_GETBACKSPACEUNINDENTS = 2263, + + SC_TIME_FOREVER = 10000000, + + /// Sets the time the mouse must sit still to generate a mouse dwell event. + SCI_SETMOUSEDWELLTIME = 2264, + + /// Retrieve the time the mouse must sit still to generate a mouse dwell event. + SCI_GETMOUSEDWELLTIME = 2265, + + /// Get position of start of word. + SCI_WORDSTARTPOSITION = 2266, + + /// Get position of end of word. + SCI_WORDENDPOSITION = 2267, + + /// Is the range start..end considered a word? + SCI_ISRANGEWORD = 2691, + + SC_IDLESTYLING_NONE = 0, + + SC_IDLESTYLING_TOVISIBLE = 1, + + SC_IDLESTYLING_AFTERVISIBLE = 2, + + SC_IDLESTYLING_ALL = 3, + + /// Sets limits to idle styling. + SCI_SETIDLESTYLING = 2692, + + /// Retrieve the limits to idle styling. + SCI_GETIDLESTYLING = 2693, + + SC_WRAP_NONE = 0, + + SC_WRAP_WORD = 1, + + SC_WRAP_CHAR = 2, + + SC_WRAP_WHITESPACE = 3, + + /// Sets whether text is word wrapped. + SCI_SETWRAPMODE = 2268, + + /// Retrieve whether text is word wrapped. + SCI_GETWRAPMODE = 2269, + + SC_WRAPVISUALFLAG_NONE = 0x0000, + + SC_WRAPVISUALFLAG_END = 0x0001, + + SC_WRAPVISUALFLAG_START = 0x0002, + + SC_WRAPVISUALFLAG_MARGIN = 0x0004, + + /// Set the display mode of visual flags for wrapped lines. + SCI_SETWRAPVISUALFLAGS = 2460, + + /// Retrive the display mode of visual flags for wrapped lines. + SCI_GETWRAPVISUALFLAGS = 2461, + + SC_WRAPVISUALFLAGLOC_DEFAULT = 0x0000, + + SC_WRAPVISUALFLAGLOC_END_BY_TEXT = 0x0001, + + SC_WRAPVISUALFLAGLOC_START_BY_TEXT = 0x0002, + + /// Set the location of visual flags for wrapped lines. + SCI_SETWRAPVISUALFLAGSLOCATION = 2462, + + /// Retrive the location of visual flags for wrapped lines. + SCI_GETWRAPVISUALFLAGSLOCATION = 2463, + + /// Set the start indent for wrapped lines. + SCI_SETWRAPSTARTINDENT = 2464, + + /// Retrive the start indent for wrapped lines. + SCI_GETWRAPSTARTINDENT = 2465, + + SC_WRAPINDENT_FIXED = 0, + + SC_WRAPINDENT_SAME = 1, + + SC_WRAPINDENT_INDENT = 2, + + SC_WRAPINDENT_DEEPINDENT = 3, + + /// Sets how wrapped sublines are placed. Default is fixed. + SCI_SETWRAPINDENTMODE = 2472, + + /// Retrieve how wrapped sublines are placed. Default is fixed. + SCI_GETWRAPINDENTMODE = 2473, + + SC_CACHE_NONE = 0, + + SC_CACHE_CARET = 1, + + SC_CACHE_PAGE = 2, + + SC_CACHE_DOCUMENT = 3, + + /// Sets the degree of caching of layout information. + SCI_SETLAYOUTCACHE = 2272, + + /// Retrieve the degree of caching of layout information. + SCI_GETLAYOUTCACHE = 2273, + + /// Sets the document width assumed for scrolling. + SCI_SETSCROLLWIDTH = 2274, + + /// Retrieve the document width assumed for scrolling. + SCI_GETSCROLLWIDTH = 2275, + + /// Sets whether the maximum width line displayed is used to set scroll width. + SCI_SETSCROLLWIDTHTRACKING = 2516, + + /// Retrieve whether the scroll width tracks wide lines. + SCI_GETSCROLLWIDTHTRACKING = 2517, + + /// Measure the pixel width of some text in a particular style. + /// NUL terminated text argument. + /// Does not handle tab or control characters. + SCI_TEXTWIDTH = 2276, + + /// Sets the scroll range so that maximum scroll position has + /// the last line at the bottom of the view (default). + /// Setting this to false allows scrolling one page below the last line. + SCI_SETENDATLASTLINE = 2277, + + /// Retrieve whether the maximum scroll position has the last + /// line at the bottom of the view. + SCI_GETENDATLASTLINE = 2278, + + /// Retrieve the height of a particular line of text in pixels. + SCI_TEXTHEIGHT = 2279, + + /// Show or hide the vertical scroll bar. + SCI_SETVSCROLLBAR = 2280, + + /// Is the vertical scroll bar visible? + SCI_GETVSCROLLBAR = 2281, + + /// Append a string to the end of the document without changing the selection. + SCI_APPENDTEXT = 2282, + + SC_PHASES_ONE = 0, + + SC_PHASES_TWO = 1, + + SC_PHASES_MULTIPLE = 2, + + /// How many phases is drawing done in? + SCI_GETPHASESDRAW = 2673, + + /// In one phase draw, text is drawn in a series of rectangular blocks with no overlap. + /// In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally. + /// In multiple phase draw, each element is drawn over the whole drawing area, allowing text + /// to overlap from one line to the next. + SCI_SETPHASESDRAW = 2674, + + SC_EFF_QUALITY_MASK = 0xF, + + SC_EFF_QUALITY_DEFAULT = 0, + + SC_EFF_QUALITY_NON_ANTIALIASED = 1, + + SC_EFF_QUALITY_ANTIALIASED = 2, + + SC_EFF_QUALITY_LCD_OPTIMIZED = 3, + + /// Choose the quality level for text from the FontQuality enumeration. + SCI_SETFONTQUALITY = 2611, + + /// Retrieve the quality level for text. + SCI_GETFONTQUALITY = 2612, + + /// Scroll so that a display line is at the top of the display. + SCI_SETFIRSTVISIBLELINE = 2613, + + SC_MULTIPASTE_ONCE = 0, + + SC_MULTIPASTE_EACH = 1, + + /// Change the effect of pasting when there are multiple selections. + SCI_SETMULTIPASTE = 2614, + + /// Retrieve the effect of pasting when there are multiple selections. + SCI_GETMULTIPASTE = 2615, + + /// Retrieve the value of a tag from a regular expression search. + /// Result is NUL-terminated. + SCI_GETTAG = 2616, + + /// Join the lines in the target. + SCI_LINESJOIN = 2288, + + /// Split the lines in the target into lines that are less wide than pixelWidth + /// where possible. + SCI_LINESSPLIT = 2289, + + /// Set one of the colours used as a chequerboard pattern in the fold margin + SCI_SETFOLDMARGINCOLOUR = 2290, + + /// Set the other colour used as a chequerboard pattern in the fold margin + SCI_SETFOLDMARGINHICOLOUR = 2291, + + SC_ACCESSIBILITY_DISABLED = 0, + + SC_ACCESSIBILITY_ENABLED = 1, + + /// Enable or disable accessibility. + SCI_SETACCESSIBILITY = 2702, + + /// Report accessibility status. + SCI_GETACCESSIBILITY = 2703, + + /// Move caret down one line. + SCI_LINEDOWN = 2300, + + /// Move caret down one line extending selection to new caret position. + SCI_LINEDOWNEXTEND = 2301, + + /// Move caret up one line. + SCI_LINEUP = 2302, + + /// Move caret up one line extending selection to new caret position. + SCI_LINEUPEXTEND = 2303, + + /// Move caret left one character. + SCI_CHARLEFT = 2304, + + /// Move caret left one character extending selection to new caret position. + SCI_CHARLEFTEXTEND = 2305, + + /// Move caret right one character. + SCI_CHARRIGHT = 2306, + + /// Move caret right one character extending selection to new caret position. + SCI_CHARRIGHTEXTEND = 2307, + + /// Move caret left one word. + SCI_WORDLEFT = 2308, + + /// Move caret left one word extending selection to new caret position. + SCI_WORDLEFTEXTEND = 2309, + + /// Move caret right one word. + SCI_WORDRIGHT = 2310, + + /// Move caret right one word extending selection to new caret position. + SCI_WORDRIGHTEXTEND = 2311, + + /// Move caret to first position on line. + SCI_HOME = 2312, + + /// Move caret to first position on line extending selection to new caret position. + SCI_HOMEEXTEND = 2313, + + /// Move caret to last position on line. + SCI_LINEEND = 2314, + + /// Move caret to last position on line extending selection to new caret position. + SCI_LINEENDEXTEND = 2315, + + /// Move caret to first position in document. + SCI_DOCUMENTSTART = 2316, + + /// Move caret to first position in document extending selection to new caret position. + SCI_DOCUMENTSTARTEXTEND = 2317, + + /// Move caret to last position in document. + SCI_DOCUMENTEND = 2318, + + /// Move caret to last position in document extending selection to new caret position. + SCI_DOCUMENTENDEXTEND = 2319, + + /// Move caret one page up. + SCI_PAGEUP = 2320, + + /// Move caret one page up extending selection to new caret position. + SCI_PAGEUPEXTEND = 2321, + + /// Move caret one page down. + SCI_PAGEDOWN = 2322, + + /// Move caret one page down extending selection to new caret position. + SCI_PAGEDOWNEXTEND = 2323, + + /// Switch from insert to overtype mode or the reverse. + SCI_EDITTOGGLEOVERTYPE = 2324, + + /// Cancel any modes such as call tip or auto-completion list display. + SCI_CANCEL = 2325, + + /// Delete the selection or if no selection, the character before the caret. + SCI_DELETEBACK = 2326, + + /// If selection is empty or all on one line replace the selection with a tab character. + /// If more than one line selected, indent the lines. + SCI_TAB = 2327, + + /// Dedent the selected lines. + SCI_BACKTAB = 2328, + + /// Insert a new line, may use a CRLF, CR or LF depending on EOL mode. + SCI_NEWLINE = 2329, + + /// Insert a Form Feed character. + SCI_FORMFEED = 2330, + + /// Move caret to before first visible character on line. + /// If already there move to first character on line. + SCI_VCHOME = 2331, + + /// Like VCHome but extending selection to new caret position. + SCI_VCHOMEEXTEND = 2332, + + /// Magnify the displayed text by increasing the sizes by 1 point. + SCI_ZOOMIN = 2333, + + /// Make the displayed text smaller by decreasing the sizes by 1 point. + SCI_ZOOMOUT = 2334, + + /// Delete the word to the left of the caret. + SCI_DELWORDLEFT = 2335, + + /// Delete the word to the right of the caret. + SCI_DELWORDRIGHT = 2336, + + /// Delete the word to the right of the caret, but not the trailing non-word characters. + SCI_DELWORDRIGHTEND = 2518, + + /// Cut the line containing the caret. + SCI_LINECUT = 2337, + + /// Delete the line containing the caret. + SCI_LINEDELETE = 2338, + + /// Switch the current line with the previous. + SCI_LINETRANSPOSE = 2339, + + /// Reverse order of selected lines. + SCI_LINEREVERSE = 2354, + + /// Duplicate the current line. + SCI_LINEDUPLICATE = 2404, + + /// Transform the selection to lower case. + SCI_LOWERCASE = 2340, + + /// Transform the selection to upper case. + SCI_UPPERCASE = 2341, + + /// Scroll the document down, keeping the caret visible. + SCI_LINESCROLLDOWN = 2342, + + /// Scroll the document up, keeping the caret visible. + SCI_LINESCROLLUP = 2343, + + /// Delete the selection or if no selection, the character before the caret. + /// Will not delete the character before at the start of a line. + SCI_DELETEBACKNOTLINE = 2344, + + /// Move caret to first position on display line. + SCI_HOMEDISPLAY = 2345, + + /// Move caret to first position on display line extending selection to + /// new caret position. + SCI_HOMEDISPLAYEXTEND = 2346, + + /// Move caret to last position on display line. + SCI_LINEENDDISPLAY = 2347, + + /// Move caret to last position on display line extending selection to new + /// caret position. + SCI_LINEENDDISPLAYEXTEND = 2348, + + /// Like Home but when word-wrap is enabled goes first to start of display line + /// HomeDisplay, then to start of document line Home. + SCI_HOMEWRAP = 2349, + + /// Like HomeExtend but when word-wrap is enabled extends first to start of display line + /// HomeDisplayExtend, then to start of document line HomeExtend. + SCI_HOMEWRAPEXTEND = 2450, + + /// Like LineEnd but when word-wrap is enabled goes first to end of display line + /// LineEndDisplay, then to start of document line LineEnd. + SCI_LINEENDWRAP = 2451, + + /// Like LineEndExtend but when word-wrap is enabled extends first to end of display line + /// LineEndDisplayExtend, then to start of document line LineEndExtend. + SCI_LINEENDWRAPEXTEND = 2452, + + /// Like VCHome but when word-wrap is enabled goes first to start of display line + /// VCHomeDisplay, then behaves like VCHome. + SCI_VCHOMEWRAP = 2453, + + /// Like VCHomeExtend but when word-wrap is enabled extends first to start of display line + /// VCHomeDisplayExtend, then behaves like VCHomeExtend. + SCI_VCHOMEWRAPEXTEND = 2454, + + /// Copy the line containing the caret. + SCI_LINECOPY = 2455, + + /// Move the caret inside current view if it's not there already. + SCI_MOVECARETINSIDEVIEW = 2401, + + /// How many characters are on a line, including end of line characters? + SCI_LINELENGTH = 2350, + + /// Highlight the characters at two positions. + SCI_BRACEHIGHLIGHT = 2351, + + /// Use specified indicator to highlight matching braces instead of changing their style. + SCI_BRACEHIGHLIGHTINDICATOR = 2498, + + /// Highlight the character at a position indicating there is no matching brace. + SCI_BRACEBADLIGHT = 2352, + + /// Use specified indicator to highlight non matching brace instead of changing its style. + SCI_BRACEBADLIGHTINDICATOR = 2499, + + /// Find the position of a matching brace or INVALID_POSITION if no match. + /// The maxReStyle must be 0 for now. It may be defined in a future release. + SCI_BRACEMATCH = 2353, + + /// Are the end of line characters visible? + SCI_GETVIEWEOL = 2355, + + /// Make the end of line characters visible or invisible. + SCI_SETVIEWEOL = 2356, + + /// Retrieve a pointer to the document object. + SCI_GETDOCPOINTER = 2357, + + /// Change the document object used. + SCI_SETDOCPOINTER = 2358, + + /// Set which document modification events are sent to the container. + SCI_SETMODEVENTMASK = 2359, + + EDGE_NONE = 0, + + EDGE_LINE = 1, + + EDGE_BACKGROUND = 2, + + EDGE_MULTILINE = 3, + + /// Retrieve the column number which text should be kept within. + SCI_GETEDGECOLUMN = 2360, + + /// Set the column number of the edge. + /// If text goes past the edge then it is highlighted. + SCI_SETEDGECOLUMN = 2361, + + /// Retrieve the edge highlight mode. + SCI_GETEDGEMODE = 2362, + + /// The edge may be displayed by a line (EDGE_LINE/EDGE_MULTILINE) or by highlighting text that + /// goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE). + SCI_SETEDGEMODE = 2363, + + /// Retrieve the colour used in edge indication. + SCI_GETEDGECOLOUR = 2364, + + /// Change the colour used in edge indication. + SCI_SETEDGECOLOUR = 2365, + + /// Add a new vertical edge to the view. + SCI_MULTIEDGEADDLINE = 2694, + + /// Clear all vertical edges. + SCI_MULTIEDGECLEARALL = 2695, + + /// Sets the current caret position to be the search anchor. + SCI_SEARCHANCHOR = 2366, + + /// Find some text starting at the search anchor. + /// Does not ensure the selection is visible. + SCI_SEARCHNEXT = 2367, + + /// Find some text starting at the search anchor and moving backwards. + /// Does not ensure the selection is visible. + SCI_SEARCHPREV = 2368, + + /// Retrieves the number of lines completely visible. + SCI_LINESONSCREEN = 2370, + + SC_POPUP_NEVER = 0, + + SC_POPUP_ALL = 1, + + SC_POPUP_TEXT = 2, + + /// Set whether a pop up menu is displayed automatically when the user presses + /// the wrong mouse button on certain areas. + SCI_USEPOPUP = 2371, + + /// Is the selection rectangular? The alternative is the more common stream selection. + SCI_SELECTIONISRECTANGLE = 2372, + + /// Set the zoom level. This number of points is added to the size of all fonts. + /// It may be positive to magnify or negative to reduce. + SCI_SETZOOM = 2373, + + /// Retrieve the zoom level. + SCI_GETZOOM = 2374, + + SC_DOCUMENTOPTION_DEFAULT = 0, + + SC_DOCUMENTOPTION_STYLES_NONE = 0x1, + + SC_DOCUMENTOPTION_TEXT_LARGE = 0x100, + + /// Create a new document object. + /// Starts with reference count of 1 and not selected into editor. + SCI_CREATEDOCUMENT = 2375, + + /// Extend life of document. + SCI_ADDREFDOCUMENT = 2376, + + /// Release a reference to the document, deleting document if it fades to black. + SCI_RELEASEDOCUMENT = 2377, + + /// Get which document options are set. + SCI_GETDOCUMENTOPTIONS = 2379, + + /// Get which document modification events are sent to the container. + SCI_GETMODEVENTMASK = 2378, + + /// Set whether command events are sent to the container. + SCI_SETCOMMANDEVENTS = 2717, + + /// Get whether command events are sent to the container. + SCI_GETCOMMANDEVENTS = 2718, + + /// Change internal focus flag. + SCI_SETFOCUS = 2380, + + /// Get internal focus flag. + SCI_GETFOCUS = 2381, + + SC_STATUS_OK = 0, + + SC_STATUS_FAILURE = 1, + + SC_STATUS_BADALLOC = 2, + + SC_STATUS_WARN_START = 1000, + + SC_STATUS_WARN_REGEX = 1001, + + /// Change error status - 0 = OK. + SCI_SETSTATUS = 2382, + + /// Get error status. + SCI_GETSTATUS = 2383, + + /// Set whether the mouse is captured when its button is pressed. + SCI_SETMOUSEDOWNCAPTURES = 2384, + + /// Get whether mouse gets captured. + SCI_GETMOUSEDOWNCAPTURES = 2385, + + /// Set whether the mouse wheel can be active outside the window. + SCI_SETMOUSEWHEELCAPTURES = 2696, + + /// Get whether mouse wheel can be active outside the window. + SCI_GETMOUSEWHEELCAPTURES = 2697, + + SC_CURSORNORMAL = 0xFFFFFFFF, + + SC_CURSORARROW = 2, + + SC_CURSORWAIT = 4, + + SC_CURSORREVERSEARROW = 7, + + /// Sets the cursor to one of the SC_CURSOR* values. + SCI_SETCURSOR = 2386, + + /// Get cursor type. + SCI_GETCURSOR = 2387, + + /// Change the way control characters are displayed: + /// If symbol is < 32, keep the drawn way, else, use the given character. + SCI_SETCONTROLCHARSYMBOL = 2388, + + /// Get the way control characters are displayed. + SCI_GETCONTROLCHARSYMBOL = 2389, + + /// Move to the previous change in capitalisation. + SCI_WORDPARTLEFT = 2390, + + /// Move to the previous change in capitalisation extending selection + /// to new caret position. + SCI_WORDPARTLEFTEXTEND = 2391, + + /// Move to the change next in capitalisation. + SCI_WORDPARTRIGHT = 2392, + + /// Move to the next change in capitalisation extending selection + /// to new caret position. + SCI_WORDPARTRIGHTEXTEND = 2393, + + VISIBLE_SLOP = 0x01, + + VISIBLE_STRICT = 0x04, + + /// Set the way the display area is determined when a particular line + /// is to be moved to by Find, FindNext, GotoLine, etc. + SCI_SETVISIBLEPOLICY = 2394, + + /// Delete back from the current position to the start of the line. + SCI_DELLINELEFT = 2395, + + /// Delete forwards from the current position to the end of the line. + SCI_DELLINERIGHT = 2396, + + /// Set the xOffset (ie, horizontal scroll position). + SCI_SETXOFFSET = 2397, + + /// Get the xOffset (ie, horizontal scroll position). + SCI_GETXOFFSET = 2398, + + /// Set the last x chosen value to be the caret x position. + SCI_CHOOSECARETX = 2399, + + /// Set the focus to this Scintilla widget. + SCI_GRABFOCUS = 2400, + + CARET_SLOP = 0x01, + + CARET_STRICT = 0x04, + + CARET_JUMPS = 0x10, + + CARET_EVEN = 0x08, + + /// Set the way the caret is kept visible when going sideways. + /// The exclusion zone is given in pixels. + SCI_SETXCARETPOLICY = 2402, + + /// Set the way the line the caret is on is kept visible. + /// The exclusion zone is given in lines. + SCI_SETYCARETPOLICY = 2403, + + /// Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE). + SCI_SETPRINTWRAPMODE = 2406, + + /// Is printing line wrapped? + SCI_GETPRINTWRAPMODE = 2407, + + /// Set a fore colour for active hotspots. + SCI_SETHOTSPOTACTIVEFORE = 2410, + + /// Get the fore colour for active hotspots. + SCI_GETHOTSPOTACTIVEFORE = 2494, + + /// Set a back colour for active hotspots. + SCI_SETHOTSPOTACTIVEBACK = 2411, + + /// Get the back colour for active hotspots. + SCI_GETHOTSPOTACTIVEBACK = 2495, + + /// Enable / Disable underlining active hotspots. + SCI_SETHOTSPOTACTIVEUNDERLINE = 2412, + + /// Get whether underlining for active hotspots. + SCI_GETHOTSPOTACTIVEUNDERLINE = 2496, + + /// Limit hotspots to single line so hotspots on two lines don't merge. + SCI_SETHOTSPOTSINGLELINE = 2421, + + /// Get the HotspotSingleLine property + SCI_GETHOTSPOTSINGLELINE = 2497, + + /// Move caret down one paragraph (delimited by empty lines). + SCI_PARADOWN = 2413, + + /// Extend selection down one paragraph (delimited by empty lines). + SCI_PARADOWNEXTEND = 2414, + + /// Move caret up one paragraph (delimited by empty lines). + SCI_PARAUP = 2415, + + /// Extend selection up one paragraph (delimited by empty lines). + SCI_PARAUPEXTEND = 2416, + + /// Given a valid document position, return the previous position taking code + /// page into account. Returns 0 if passed 0. + SCI_POSITIONBEFORE = 2417, + + /// Given a valid document position, return the next position taking code + /// page into account. Maximum value returned is the last position in the document. + SCI_POSITIONAFTER = 2418, + + /// Given a valid document position, return a position that differs in a number + /// of characters. Returned value is always between 0 and last position in document. + SCI_POSITIONRELATIVE = 2670, + + /// Given a valid document position, return a position that differs in a number + /// of UTF-16 code units. Returned value is always between 0 and last position in document. + /// The result may point half way (2 bytes) inside a non-BMP character. + SCI_POSITIONRELATIVECODEUNITS = 2716, + + /// Copy a range of text to the clipboard. Positions are clipped into the document. + SCI_COPYRANGE = 2419, + + /// Copy argument text to the clipboard. + SCI_COPYTEXT = 2420, + + SC_SEL_STREAM = 0, + + SC_SEL_RECTANGLE = 1, + + SC_SEL_LINES = 2, + + SC_SEL_THIN = 3, + + /// Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or + /// by lines (SC_SEL_LINES). + SCI_SETSELECTIONMODE = 2422, + + /// Get the mode of the current selection. + SCI_GETSELECTIONMODE = 2423, + + /// Get whether or not regular caret moves will extend or reduce the selection. + SCI_GETMOVEEXTENDSSELECTION = 2706, + + /// Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line). + SCI_GETLINESELSTARTPOSITION = 2424, + + /// Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line). + SCI_GETLINESELENDPOSITION = 2425, + + /// Move caret down one line, extending rectangular selection to new caret position. + SCI_LINEDOWNRECTEXTEND = 2426, + + /// Move caret up one line, extending rectangular selection to new caret position. + SCI_LINEUPRECTEXTEND = 2427, + + /// Move caret left one character, extending rectangular selection to new caret position. + SCI_CHARLEFTRECTEXTEND = 2428, + + /// Move caret right one character, extending rectangular selection to new caret position. + SCI_CHARRIGHTRECTEXTEND = 2429, + + /// Move caret to first position on line, extending rectangular selection to new caret position. + SCI_HOMERECTEXTEND = 2430, + + /// Move caret to before first visible character on line. + /// If already there move to first character on line. + /// In either case, extend rectangular selection to new caret position. + SCI_VCHOMERECTEXTEND = 2431, + + /// Move caret to last position on line, extending rectangular selection to new caret position. + SCI_LINEENDRECTEXTEND = 2432, + + /// Move caret one page up, extending rectangular selection to new caret position. + SCI_PAGEUPRECTEXTEND = 2433, + + /// Move caret one page down, extending rectangular selection to new caret position. + SCI_PAGEDOWNRECTEXTEND = 2434, + + /// Move caret to top of page, or one page up if already at top of page. + SCI_STUTTEREDPAGEUP = 2435, + + /// Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. + SCI_STUTTEREDPAGEUPEXTEND = 2436, + + /// Move caret to bottom of page, or one page down if already at bottom of page. + SCI_STUTTEREDPAGEDOWN = 2437, + + /// Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. + SCI_STUTTEREDPAGEDOWNEXTEND = 2438, + + /// Move caret left one word, position cursor at end of word. + SCI_WORDLEFTEND = 2439, + + /// Move caret left one word, position cursor at end of word, extending selection to new caret position. + SCI_WORDLEFTENDEXTEND = 2440, + + /// Move caret right one word, position cursor at end of word. + SCI_WORDRIGHTEND = 2441, + + /// Move caret right one word, position cursor at end of word, extending selection to new caret position. + SCI_WORDRIGHTENDEXTEND = 2442, + + /// Set the set of characters making up whitespace for when moving or selecting by word. + /// Should be called after SetWordChars. + SCI_SETWHITESPACECHARS = 2443, + + /// Get the set of characters making up whitespace for when moving or selecting by word. + SCI_GETWHITESPACECHARS = 2647, + + /// Set the set of characters making up punctuation characters + /// Should be called after SetWordChars. + SCI_SETPUNCTUATIONCHARS = 2648, + + /// Get the set of characters making up punctuation characters + SCI_GETPUNCTUATIONCHARS = 2649, + + /// Reset the set of characters for whitespace and word characters to the defaults. + SCI_SETCHARSDEFAULT = 2444, + + /// Get currently selected item position in the auto-completion list + SCI_AUTOCGETCURRENT = 2445, + + /// Get currently selected item text in the auto-completion list + /// Returns the length of the item text + /// Result is NUL-terminated. + SCI_AUTOCGETCURRENTTEXT = 2610, + + SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE = 0, + + SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE = 1, + + /// Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. + SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR = 2634, + + /// Get auto-completion case insensitive behaviour. + SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR = 2635, + + SC_MULTIAUTOC_ONCE = 0, + + SC_MULTIAUTOC_EACH = 1, + + /// Change the effect of autocompleting when there are multiple selections. + SCI_AUTOCSETMULTI = 2636, + + /// Retrieve the effect of autocompleting when there are multiple selections. + SCI_AUTOCGETMULTI = 2637, + + SC_ORDER_PRESORTED = 0, + + SC_ORDER_PERFORMSORT = 1, + + SC_ORDER_CUSTOM = 2, + + /// Set the way autocompletion lists are ordered. + SCI_AUTOCSETORDER = 2660, + + /// Get the way autocompletion lists are ordered. + SCI_AUTOCGETORDER = 2661, + + /// Enlarge the document to a particular size of text bytes. + SCI_ALLOCATE = 2446, + + /// Returns the target converted to UTF8. + /// Return the length in bytes. + SCI_TARGETASUTF8 = 2447, + + /// Set the length of the utf8 argument for calling EncodedFromUTF8. + /// Set to -1 and the string will be measured to the first nul. + SCI_SETLENGTHFORENCODE = 2448, + + /// Translates a UTF8 string into the document encoding. + /// Return the length of the result in bytes. + /// On error return 0. + SCI_ENCODEDFROMUTF8 = 2449, + + /// Find the position of a column on a line taking into account tabs and + /// multi-byte characters. If beyond end of line, return line end position. + SCI_FINDCOLUMN = 2456, + + /// Can the caret preferred x position only be changed by explicit movement commands? + SCI_GETCARETSTICKY = 2457, + + /// Stop the caret preferred x position changing when the user types. + SCI_SETCARETSTICKY = 2458, + + SC_CARETSTICKY_OFF = 0, + + SC_CARETSTICKY_ON = 1, + + SC_CARETSTICKY_WHITESPACE = 2, + + /// Switch between sticky and non-sticky: meant to be bound to a key. + SCI_TOGGLECARETSTICKY = 2459, + + /// Enable/Disable convert-on-paste for line endings + SCI_SETPASTECONVERTENDINGS = 2467, + + /// Get convert-on-paste setting + SCI_GETPASTECONVERTENDINGS = 2468, + + /// Duplicate the selection. If selection empty duplicate the line containing the caret. + SCI_SELECTIONDUPLICATE = 2469, + + SC_ALPHA_TRANSPARENT = 0, + + SC_ALPHA_OPAQUE = 255, + + SC_ALPHA_NOALPHA = 256, + + /// Set background alpha of the caret line. + SCI_SETCARETLINEBACKALPHA = 2470, + + /// Get the background alpha of the caret line. + SCI_GETCARETLINEBACKALPHA = 2471, + + CARETSTYLE_INVISIBLE = 0, + + CARETSTYLE_LINE = 1, + + CARETSTYLE_BLOCK = 2, + + CARETSTYLE_OVERSTRIKE_BAR = 0, + + CARETSTYLE_OVERSTRIKE_BLOCK = 0x10, + + CARETSTYLE_INS_MASK = 0xF, + + CARETSTYLE_BLOCK_AFTER = 0x100, + + /// Set the style of the caret to be drawn. + SCI_SETCARETSTYLE = 2512, + + /// Returns the current style of the caret. + SCI_GETCARETSTYLE = 2513, + + /// Set the indicator used for IndicatorFillRange and IndicatorClearRange + SCI_SETINDICATORCURRENT = 2500, + + /// Get the current indicator + SCI_GETINDICATORCURRENT = 2501, + + /// Set the value used for IndicatorFillRange + SCI_SETINDICATORVALUE = 2502, + + /// Get the current indicator value + SCI_GETINDICATORVALUE = 2503, + + /// Turn a indicator on over a range. + SCI_INDICATORFILLRANGE = 2504, + + /// Turn a indicator off over a range. + SCI_INDICATORCLEARRANGE = 2505, + + /// Are any indicators present at pos? + SCI_INDICATORALLONFOR = 2506, + + /// What value does a particular indicator have at a position? + SCI_INDICATORVALUEAT = 2507, + + /// Where does a particular indicator start? + SCI_INDICATORSTART = 2508, + + /// Where does a particular indicator end? + SCI_INDICATOREND = 2509, + + /// Set number of entries in position cache + SCI_SETPOSITIONCACHE = 2514, + + /// How many entries are allocated to the position cache? + SCI_GETPOSITIONCACHE = 2515, + + /// Copy the selection, if selection empty copy the line with the caret + SCI_COPYALLOWLINE = 2519, + + /// Compact the document buffer and return a read-only pointer to the + /// characters in the document. + SCI_GETCHARACTERPOINTER = 2520, + + /// Return a read-only pointer to a range of characters in the document. + /// May move the gap so that the range is contiguous, but will only move up + /// to lengthRange bytes. + SCI_GETRANGEPOINTER = 2643, + + /// Return a position which, to avoid performance costs, should not be within + /// the range of a call to GetRangePointer. + SCI_GETGAPPOSITION = 2644, + + /// Set the alpha fill colour of the given indicator. + SCI_INDICSETALPHA = 2523, + + /// Get the alpha fill colour of the given indicator. + SCI_INDICGETALPHA = 2524, + + /// Set the alpha outline colour of the given indicator. + SCI_INDICSETOUTLINEALPHA = 2558, + + /// Get the alpha outline colour of the given indicator. + SCI_INDICGETOUTLINEALPHA = 2559, + + /// Set extra ascent for each line + SCI_SETEXTRAASCENT = 2525, + + /// Get extra ascent for each line + SCI_GETEXTRAASCENT = 2526, + + /// Set extra descent for each line + SCI_SETEXTRADESCENT = 2527, + + /// Get extra descent for each line + SCI_GETEXTRADESCENT = 2528, + + /// Which symbol was defined for markerNumber with MarkerDefine + SCI_MARKERSYMBOLDEFINED = 2529, + + /// Set the text in the text margin for a line + SCI_MARGINSETTEXT = 2530, + + /// Get the text in the text margin for a line + SCI_MARGINGETTEXT = 2531, + + /// Set the style number for the text margin for a line + SCI_MARGINSETSTYLE = 2532, + + /// Get the style number for the text margin for a line + SCI_MARGINGETSTYLE = 2533, + + /// Set the style in the text margin for a line + SCI_MARGINSETSTYLES = 2534, + + /// Get the styles in the text margin for a line + SCI_MARGINGETSTYLES = 2535, + + /// Clear the margin text on all lines + SCI_MARGINTEXTCLEARALL = 2536, + + /// Get the start of the range of style numbers used for margin text + SCI_MARGINSETSTYLEOFFSET = 2537, + + /// Get the start of the range of style numbers used for margin text + SCI_MARGINGETSTYLEOFFSET = 2538, + + SC_MARGINOPTION_NONE = 0, + + SC_MARGINOPTION_SUBLINESELECT = 1, + + /// Set the margin options. + SCI_SETMARGINOPTIONS = 2539, + + /// Get the margin options. + SCI_GETMARGINOPTIONS = 2557, + + /// Set the annotation text for a line + SCI_ANNOTATIONSETTEXT = 2540, + + /// Get the annotation text for a line + SCI_ANNOTATIONGETTEXT = 2541, + + /// Set the style number for the annotations for a line + SCI_ANNOTATIONSETSTYLE = 2542, + + /// Get the style number for the annotations for a line + SCI_ANNOTATIONGETSTYLE = 2543, + + /// Set the annotation styles for a line + SCI_ANNOTATIONSETSTYLES = 2544, + + /// Get the annotation styles for a line + SCI_ANNOTATIONGETSTYLES = 2545, + + /// Get the number of annotation lines for a line + SCI_ANNOTATIONGETLINES = 2546, + + /// Clear the annotations from all lines + SCI_ANNOTATIONCLEARALL = 2547, + + ANNOTATION_HIDDEN = 0, + + ANNOTATION_STANDARD = 1, + + ANNOTATION_BOXED = 2, + + ANNOTATION_INDENTED = 3, + + /// Set the visibility for the annotations for a view + SCI_ANNOTATIONSETVISIBLE = 2548, + + /// Get the visibility for the annotations for a view + SCI_ANNOTATIONGETVISIBLE = 2549, + + /// Get the start of the range of style numbers used for annotations + SCI_ANNOTATIONSETSTYLEOFFSET = 2550, + + /// Get the start of the range of style numbers used for annotations + SCI_ANNOTATIONGETSTYLEOFFSET = 2551, + + /// Release all extended (>255) style numbers + SCI_RELEASEALLEXTENDEDSTYLES = 2552, + + /// Allocate some extended (>255) style numbers and return the start of the range + SCI_ALLOCATEEXTENDEDSTYLES = 2553, + + UNDO_NONE = 0, + + UNDO_MAY_COALESCE = 1, + + /// Add a container action to the undo stack + SCI_ADDUNDOACTION = 2560, + + /// Find the position of a character from a point within the window. + SCI_CHARPOSITIONFROMPOINT = 2561, + + /// Find the position of a character from a point within the window. + /// Return INVALID_POSITION if not close to text. + SCI_CHARPOSITIONFROMPOINTCLOSE = 2562, + + /// Set whether switching to rectangular mode while selecting with the mouse is allowed. + SCI_SETMOUSESELECTIONRECTANGULARSWITCH = 2668, + + /// Whether switching to rectangular mode while selecting with the mouse is allowed. + SCI_GETMOUSESELECTIONRECTANGULARSWITCH = 2669, + + /// Set whether multiple selections can be made + SCI_SETMULTIPLESELECTION = 2563, + + /// Whether multiple selections can be made + SCI_GETMULTIPLESELECTION = 2564, + + /// Set whether typing can be performed into multiple selections + SCI_SETADDITIONALSELECTIONTYPING = 2565, + + /// Whether typing can be performed into multiple selections + SCI_GETADDITIONALSELECTIONTYPING = 2566, + + /// Set whether additional carets will blink + SCI_SETADDITIONALCARETSBLINK = 2567, + + /// Whether additional carets will blink + SCI_GETADDITIONALCARETSBLINK = 2568, + + /// Set whether additional carets are visible + SCI_SETADDITIONALCARETSVISIBLE = 2608, + + /// Whether additional carets are visible + SCI_GETADDITIONALCARETSVISIBLE = 2609, + + /// How many selections are there? + SCI_GETSELECTIONS = 2570, + + /// Is every selected range empty? + SCI_GETSELECTIONEMPTY = 2650, + + /// Clear selections to a single empty stream selection + SCI_CLEARSELECTIONS = 2571, + + /// Set a simple selection + SCI_SETSELECTION = 2572, + + /// Add a selection + SCI_ADDSELECTION = 2573, + + /// Drop one selection + SCI_DROPSELECTIONN = 2671, + + /// Set the main selection + SCI_SETMAINSELECTION = 2574, + + /// Which selection is the main selection + SCI_GETMAINSELECTION = 2575, + + /// Set the caret position of the nth selection. + SCI_SETSELECTIONNCARET = 2576, + + /// Return the caret position of the nth selection. + SCI_GETSELECTIONNCARET = 2577, + + /// Set the anchor position of the nth selection. + SCI_SETSELECTIONNANCHOR = 2578, + + /// Return the anchor position of the nth selection. + SCI_GETSELECTIONNANCHOR = 2579, + + /// Set the virtual space of the caret of the nth selection. + SCI_SETSELECTIONNCARETVIRTUALSPACE = 2580, + + /// Return the virtual space of the caret of the nth selection. + SCI_GETSELECTIONNCARETVIRTUALSPACE = 2581, + + /// Set the virtual space of the anchor of the nth selection. + SCI_SETSELECTIONNANCHORVIRTUALSPACE = 2582, + + /// Return the virtual space of the anchor of the nth selection. + SCI_GETSELECTIONNANCHORVIRTUALSPACE = 2583, + + /// Sets the position that starts the selection - this becomes the anchor. + SCI_SETSELECTIONNSTART = 2584, + + /// Returns the position at the start of the selection. + SCI_GETSELECTIONNSTART = 2585, + + /// Sets the position that ends the selection - this becomes the currentPosition. + SCI_SETSELECTIONNEND = 2586, + + /// Returns the position at the end of the selection. + SCI_GETSELECTIONNEND = 2587, + + /// Set the caret position of the rectangular selection. + SCI_SETRECTANGULARSELECTIONCARET = 2588, + + /// Return the caret position of the rectangular selection. + SCI_GETRECTANGULARSELECTIONCARET = 2589, + + /// Set the anchor position of the rectangular selection. + SCI_SETRECTANGULARSELECTIONANCHOR = 2590, + + /// Return the anchor position of the rectangular selection. + SCI_GETRECTANGULARSELECTIONANCHOR = 2591, + + /// Set the virtual space of the caret of the rectangular selection. + SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2592, + + /// Return the virtual space of the caret of the rectangular selection. + SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2593, + + /// Set the virtual space of the anchor of the rectangular selection. + SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2594, + + /// Return the virtual space of the anchor of the rectangular selection. + SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2595, + + SCVS_NONE = 0, + + SCVS_RECTANGULARSELECTION = 1, + + SCVS_USERACCESSIBLE = 2, + + SCVS_NOWRAPLINESTART = 4, + + /// Set options for virtual space behaviour. + SCI_SETVIRTUALSPACEOPTIONS = 2596, + + /// Return options for virtual space behaviour. + SCI_GETVIRTUALSPACEOPTIONS = 2597, + + /// On GTK, allow selecting the modifier key to use for mouse-based + /// rectangular selection. Often the window manager requires Alt+Mouse Drag + /// for moving windows. + /// Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER. + SCI_SETRECTANGULARSELECTIONMODIFIER = 2598, + + /// Get the modifier key used for rectangular selection. + SCI_GETRECTANGULARSELECTIONMODIFIER = 2599, + + /// Set the foreground colour of additional selections. + /// Must have previously called SetSelFore with non-zero first argument for this to have an effect. + SCI_SETADDITIONALSELFORE = 2600, + + /// Set the background colour of additional selections. + /// Must have previously called SetSelBack with non-zero first argument for this to have an effect. + SCI_SETADDITIONALSELBACK = 2601, + + /// Set the alpha of the selection. + SCI_SETADDITIONALSELALPHA = 2602, + + /// Get the alpha of the selection. + SCI_GETADDITIONALSELALPHA = 2603, + + /// Set the foreground colour of additional carets. + SCI_SETADDITIONALCARETFORE = 2604, + + /// Get the foreground colour of additional carets. + SCI_GETADDITIONALCARETFORE = 2605, + + /// Set the main selection to the next selection. + SCI_ROTATESELECTION = 2606, + + /// Swap that caret and anchor of the main selection. + SCI_SWAPMAINANCHORCARET = 2607, + + /// Add the next occurrence of the main selection to the set of selections as main. + /// If the current selection is empty then select word around caret. + SCI_MULTIPLESELECTADDNEXT = 2688, + + /// Add each occurrence of the main selection in the target to the set of selections. + /// If the current selection is empty then select word around caret. + SCI_MULTIPLESELECTADDEACH = 2689, + + /// Indicate that the internal state of a lexer has changed over a range and therefore + /// there may be a need to redraw. + SCI_CHANGELEXERSTATE = 2617, + + /// Find the next line at or after lineStart that is a contracted fold header line. + /// Return -1 when no more lines. + SCI_CONTRACTEDFOLDNEXT = 2618, + + /// Centre current line in window. + SCI_VERTICALCENTRECARET = 2619, + + /// Move the selected lines up one line, shifting the line above after the selection + SCI_MOVESELECTEDLINESUP = 2620, + + /// Move the selected lines down one line, shifting the line below before the selection + SCI_MOVESELECTEDLINESDOWN = 2621, + + /// Set the identifier reported as idFrom in notification messages. + SCI_SETIDENTIFIER = 2622, + + /// Get the identifier. + SCI_GETIDENTIFIER = 2623, + + /// Set the width for future RGBA image data. + SCI_RGBAIMAGESETWIDTH = 2624, + + /// Set the height for future RGBA image data. + SCI_RGBAIMAGESETHEIGHT = 2625, + + /// Set the scale factor in percent for future RGBA image data. + SCI_RGBAIMAGESETSCALE = 2651, + + /// Define a marker from RGBA data. + /// It has the width and height from RGBAImageSetWidth/Height + SCI_MARKERDEFINERGBAIMAGE = 2626, + + /// Register an RGBA image for use in autocompletion lists. + /// It has the width and height from RGBAImageSetWidth/Height + SCI_REGISTERRGBAIMAGE = 2627, + + /// Scroll to start of document. + SCI_SCROLLTOSTART = 2628, + + /// Scroll to end of document. + SCI_SCROLLTOEND = 2629, + + SC_TECHNOLOGY_DEFAULT = 0, + + SC_TECHNOLOGY_DIRECTWRITE = 1, + + SC_TECHNOLOGY_DIRECTWRITERETAIN = 2, + + SC_TECHNOLOGY_DIRECTWRITEDC = 3, + + /// Set the technology used. + SCI_SETTECHNOLOGY = 2630, + + /// Get the tech. + SCI_GETTECHNOLOGY = 2631, + + /// Create an ILoader*. + SCI_CREATELOADER = 2632, + + /// On OS X, show a find indicator. + SCI_FINDINDICATORSHOW = 2640, + + /// On OS X, flash a find indicator, then fade out. + SCI_FINDINDICATORFLASH = 2641, + + /// On OS X, hide the find indicator. + SCI_FINDINDICATORHIDE = 2642, + + /// Move caret to before first visible character on display line. + /// If already there move to first character on display line. + SCI_VCHOMEDISPLAY = 2652, + + /// Like VCHomeDisplay but extending selection to new caret position. + SCI_VCHOMEDISPLAYEXTEND = 2653, + + /// Is the caret line always visible? + SCI_GETCARETLINEVISIBLEALWAYS = 2654, + + /// Sets the caret line to always visible. + SCI_SETCARETLINEVISIBLEALWAYS = 2655, + + SC_LINE_END_TYPE_DEFAULT = 0, + + SC_LINE_END_TYPE_UNICODE = 1, + + /// Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding. + SCI_SETLINEENDTYPESALLOWED = 2656, + + /// Get the line end types currently allowed. + SCI_GETLINEENDTYPESALLOWED = 2657, + + /// Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation. + SCI_GETLINEENDTYPESACTIVE = 2658, + + /// Set the way a character is drawn. + SCI_SETREPRESENTATION = 2665, + + /// Set the way a character is drawn. + /// Result is NUL-terminated. + SCI_GETREPRESENTATION = 2666, + + /// Remove a character representation. + SCI_CLEARREPRESENTATION = 2667, + + /// Start notifying the container of all key presses and commands. + SCI_STARTRECORD = 3001, + + /// Stop notifying the container of all key presses and commands. + SCI_STOPRECORD = 3002, + + /// Set the lexing language of the document. + SCI_SETLEXER = 4001, + + /// Retrieve the lexing language of the document. + SCI_GETLEXER = 4002, + + /// Colourise a segment of the document using the current lexing language. + SCI_COLOURISE = 4003, + + /// Set up a value that may be used by a lexer for some optional feature. + SCI_SETPROPERTY = 4004, + + KEYWORDSET_MAX = 8, + + /// Set up the key words used by the lexer. + SCI_SETKEYWORDS = 4005, + + /// Set the lexing language of the document based on string name. + SCI_SETLEXERLANGUAGE = 4006, + + /// Load a lexer library (dll / so). + SCI_LOADLEXERLIBRARY = 4007, + + /// Retrieve a "property" value previously set with SetProperty. + /// Result is NUL-terminated. + SCI_GETPROPERTY = 4008, + + /// Retrieve a "property" value previously set with SetProperty, + /// with "$()" variable replacement on returned buffer. + /// Result is NUL-terminated. + SCI_GETPROPERTYEXPANDED = 4009, + + /// Retrieve a "property" value previously set with SetProperty, + /// interpreted as an int AFTER any "$()" variable replacement. + SCI_GETPROPERTYINT = 4010, + + /// Retrieve the name of the lexer. + /// Return the length of the text. + /// Result is NUL-terminated. + SCI_GETLEXERLANGUAGE = 4012, + + /// For private communication between an application and a known lexer. + SCI_PRIVATELEXERCALL = 4013, + + /// Retrieve a '\n' separated list of properties understood by the current lexer. + /// Result is NUL-terminated. + SCI_PROPERTYNAMES = 4014, + + SC_TYPE_BOOLEAN = 0, + + SC_TYPE_INTEGER = 1, + + SC_TYPE_STRING = 2, + + /// Retrieve the type of a property. + SCI_PROPERTYTYPE = 4015, + + /// Describe a property. + /// Result is NUL-terminated. + SCI_DESCRIBEPROPERTY = 4016, + + /// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer. + /// Result is NUL-terminated. + SCI_DESCRIBEKEYWORDSETS = 4017, + + /// Bit set of LineEndType enumertion for which line ends beyond the standard + /// LF, CR, and CRLF are supported by the lexer. + SCI_GETLINEENDTYPESSUPPORTED = 4018, + + /// Allocate a set of sub styles for a particular base style, returning start of range + SCI_ALLOCATESUBSTYLES = 4020, + + /// The starting style number for the sub styles associated with a base style + SCI_GETSUBSTYLESSTART = 4021, + + /// The number of sub styles associated with a base style + SCI_GETSUBSTYLESLENGTH = 4022, + + /// For a sub style, return the base style, else return the argument. + SCI_GETSTYLEFROMSUBSTYLE = 4027, + + /// For a secondary style, return the primary style, else return the argument. + SCI_GETPRIMARYSTYLEFROMSTYLE = 4028, + + /// Free allocated sub styles + SCI_FREESUBSTYLES = 4023, + + /// Set the identifiers that are shown in a particular style + SCI_SETIDENTIFIERS = 4024, + + /// Where styles are duplicated by a feature such as active/inactive code + /// return the distance between the two types. + SCI_DISTANCETOSECONDARYSTYLES = 4025, + + /// Get the set of base styles that can be extended with sub styles + /// Result is NUL-terminated. + SCI_GETSUBSTYLEBASES = 4026, + + /// Retrieve the number of named styles for the lexer. + SCI_GETNAMEDSTYLES = 4029, + + /// Retrieve the name of a style. + /// Result is NUL-terminated. + SCI_NAMEOFSTYLE = 4030, + + /// Retrieve a ' ' separated list of style tags like "literal quoted string". + /// Result is NUL-terminated. + SCI_TAGSOFSTYLE = 4031, + + /// Retrieve a description of a style. + /// Result is NUL-terminated. + SCI_DESCRIPTIONOFSTYLE = 4032, + + SC_MOD_NONE = 0x0, + + SC_MOD_INSERTTEXT = 0x1, + + SC_MOD_DELETETEXT = 0x2, + + SC_MOD_CHANGESTYLE = 0x4, + + SC_MOD_CHANGEFOLD = 0x8, + + SC_PERFORMED_USER = 0x10, + + SC_PERFORMED_UNDO = 0x20, + + SC_PERFORMED_REDO = 0x40, + + SC_MULTISTEPUNDOREDO = 0x80, + + SC_LASTSTEPINUNDOREDO = 0x100, + + SC_MOD_CHANGEMARKER = 0x200, + + SC_MOD_BEFOREINSERT = 0x400, + + SC_MOD_BEFOREDELETE = 0x800, + + SC_MULTILINEUNDOREDO = 0x1000, + + SC_STARTACTION = 0x2000, + + SC_MOD_CHANGEINDICATOR = 0x4000, + + SC_MOD_CHANGELINESTATE = 0x8000, + + SC_MOD_CHANGEMARGIN = 0x10000, + + SC_MOD_CHANGEANNOTATION = 0x20000, + + SC_MOD_CONTAINER = 0x40000, + + SC_MOD_LEXERSTATE = 0x80000, + + SC_MOD_INSERTCHECK = 0x100000, + + SC_MOD_CHANGETABSTOPS = 0x200000, + + SC_MODEVENTMASKALL = 0x3FFFFF, + + SC_UPDATE_CONTENT = 0x1, + + SC_UPDATE_SELECTION = 0x2, + + SC_UPDATE_V_SCROLL = 0x4, + + SC_UPDATE_H_SCROLL = 0x8, + + SCEN_CHANGE = 768, + + SCEN_SETFOCUS = 512, + + SCEN_KILLFOCUS = 256, + + SCK_DOWN = 300, + + SCK_UP = 301, + + SCK_LEFT = 302, + + SCK_RIGHT = 303, + + SCK_HOME = 304, + + SCK_END = 305, + + SCK_PRIOR = 306, + + SCK_NEXT = 307, + + SCK_DELETE = 308, + + SCK_INSERT = 309, + + SCK_ESCAPE = 7, + + SCK_BACK = 8, + + SCK_TAB = 9, + + SCK_RETURN = 13, + + SCK_ADD = 310, + + SCK_SUBTRACT = 311, + + SCK_DIVIDE = 312, + + SCK_WIN = 313, + + SCK_RWIN = 314, + + SCK_MENU = 315, + + SCMOD_NORM = 0, + + SCMOD_SHIFT = 1, + + SCMOD_CTRL = 2, + + SCMOD_ALT = 4, + + SCMOD_SUPER = 8, + + SCMOD_META = 16, + + SC_AC_FILLUP = 1, + + SC_AC_DOUBLECLICK = 2, + + SC_AC_TAB = 3, + + SC_AC_NEWLINE = 4, + + SC_AC_COMMAND = 5, + + SC_CHARACTERSOURCE_DIRECT_INPUT = 0, + + SC_CHARACTERSOURCE_TENTATIVE_INPUT = 1, + + SC_CHARACTERSOURCE_IME_RESULT = 2, + + /// Events + SCN_STYLENEEDED = 2000, + + /// Events + SCN_CHARADDED = 2001, + + /// Events + SCN_SAVEPOINTREACHED = 2002, + + /// Events + SCN_SAVEPOINTLEFT = 2003, + + /// Events + SCN_MODIFYATTEMPTRO = 2004, + + /// GTK Specific to work around focus and accelerator problems: + SCN_KEY = 2005, + + /// GTK Specific to work around focus and accelerator problems: + SCN_DOUBLECLICK = 2006, + + /// GTK Specific to work around focus and accelerator problems: + SCN_UPDATEUI = 2007, + + /// GTK Specific to work around focus and accelerator problems: + SCN_MODIFIED = 2008, + + /// GTK Specific to work around focus and accelerator problems: + SCN_MACRORECORD = 2009, + + /// GTK Specific to work around focus and accelerator problems: + SCN_MARGINCLICK = 2010, + + /// GTK Specific to work around focus and accelerator problems: + SCN_NEEDSHOWN = 2011, + + /// GTK Specific to work around focus and accelerator problems: + SCN_PAINTED = 2013, + + /// GTK Specific to work around focus and accelerator problems: + SCN_USERLISTSELECTION = 2014, + + /// GTK Specific to work around focus and accelerator problems: + SCN_URIDROPPED = 2015, + + /// GTK Specific to work around focus and accelerator problems: + SCN_DWELLSTART = 2016, + + /// GTK Specific to work around focus and accelerator problems: + SCN_DWELLEND = 2017, + + /// GTK Specific to work around focus and accelerator problems: + SCN_ZOOM = 2018, + + /// GTK Specific to work around focus and accelerator problems: + SCN_HOTSPOTCLICK = 2019, + + /// GTK Specific to work around focus and accelerator problems: + SCN_HOTSPOTDOUBLECLICK = 2020, + + /// GTK Specific to work around focus and accelerator problems: + SCN_CALLTIPCLICK = 2021, + + /// GTK Specific to work around focus and accelerator problems: + SCN_AUTOCSELECTION = 2022, + + /// GTK Specific to work around focus and accelerator problems: + SCN_INDICATORCLICK = 2023, + + /// GTK Specific to work around focus and accelerator problems: + SCN_INDICATORRELEASE = 2024, + + /// GTK Specific to work around focus and accelerator problems: + SCN_AUTOCCANCELLED = 2025, + + /// GTK Specific to work around focus and accelerator problems: + SCN_AUTOCCHARDELETED = 2026, + + /// GTK Specific to work around focus and accelerator problems: + SCN_HOTSPOTRELEASECLICK = 2027, + + /// GTK Specific to work around focus and accelerator problems: + SCN_FOCUSIN = 2028, + + /// GTK Specific to work around focus and accelerator problems: + SCN_FOCUSOUT = 2029, + + /// GTK Specific to work around focus and accelerator problems: + SCN_AUTOCCOMPLETED = 2030, + + /// GTK Specific to work around focus and accelerator problems: + SCN_MARGINRIGHTCLICK = 2031, + + /// GTK Specific to work around focus and accelerator problems: + SCN_AUTOCSELECTIONCHANGE = 2032, + + SC_BIDIRECTIONAL_DISABLED = 0, + + SC_BIDIRECTIONAL_L2R = 1, + + SC_BIDIRECTIONAL_R2L = 2, + + /// Retrieve bidirectional text display state. + SCI_GETBIDIRECTIONAL = 2708, + + /// Set bidirectional text display state. + SCI_SETBIDIRECTIONAL = 2709, + + SC_LINECHARACTERINDEX_NONE = 0, + + SC_LINECHARACTERINDEX_UTF32 = 1, + + SC_LINECHARACTERINDEX_UTF16 = 2, + + /// Retrieve line character index state. + SCI_GETLINECHARACTERINDEX = 2710, + + /// Request line character index be created or its use count increased. + SCI_ALLOCATELINECHARACTERINDEX = 2711, + + /// Decrease use count of line character index and remove if 0. + SCI_RELEASELINECHARACTERINDEX = 2712, + + /// Retrieve the document line containing a position measured in index units. + SCI_LINEFROMINDEXPOSITION = 2713, + + /// Retrieve the position measured in index units at the start of a document line. + SCI_INDEXPOSITIONFROMLINE = 2714, + + /// Divide each styling byte into lexical class bits (default: 5) and indicator + /// bits (default: 3). If a lexer requires more than 32 lexical states, then this + /// is used to expand the possible states. + SCI_SETSTYLEBITS = 2090, + + /// Retrieve number of bits in style bytes used to hold the lexical state. + SCI_GETSTYLEBITS = 2091, + + /// Retrieve the number of bits the current lexer needs for styling. + SCI_GETSTYLEBITSNEEDED = 4011, + + /// Deprecated in 3.5.5 + /// Always interpret keyboard input as Unicode + SCI_SETKEYSUNICODE = 2521, + + /// Are keys always interpreted as Unicode? + SCI_GETKEYSUNICODE = 2522, + + /// Is drawing done in two phases with backgrounds drawn before foregrounds? + SCI_GETTWOPHASEDRAW = 2283, + + /// In twoPhaseDraw mode, drawing is performed in two phases, first the background + /// and then the foreground. This avoids chopping off characters that overlap the next run. + SCI_SETTWOPHASEDRAW = 2284, + + INDIC0_MASK = 0x20, + + INDIC1_MASK = 0x40, + + INDIC2_MASK = 0x80, + + INDICS_MASK = 0xE0, + + /* --Autogenerated -- end of section automatically generated from Scintilla.iface */ + + SC_SEARCHRESULT_LINEBUFFERMAXLENGTH = 1024 + } + + public class TextToFind : IDisposable + { + Sci_TextToFind _sciTextToFind; + IntPtr _ptrSciTextToFind; + bool _disposed = false; + + /// + /// text to find + /// + /// range to search + /// the search pattern + public TextToFind(CharacterRange chrRange, string searchText) + { + _sciTextToFind.chrg = chrRange; + _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(searchText); + } + + /// + /// text to find + /// + /// range to search + /// range to search + /// the search pattern + public TextToFind(int cpmin, int cpmax, string searchText) + { + _sciTextToFind.chrg.cpMin = cpmin; + _sciTextToFind.chrg.cpMax = cpmax; + _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(searchText); + } + + [StructLayout(LayoutKind.Sequential)] + struct Sci_TextToFind + { + public CharacterRange chrg; + public IntPtr lpstrText; + public CharacterRange chrgText; + } + + public IntPtr NativePointer { get { _initNativeStruct(); return _ptrSciTextToFind; } } + public string lpstrText { set { _freeNativeString(); _sciTextToFind.lpstrText = Marshal.StringToHGlobalAnsi(value); } } + public CharacterRange chrg { get { _readNativeStruct(); return _sciTextToFind.chrg; } set { _sciTextToFind.chrg = value; _initNativeStruct(); } } + public CharacterRange chrgText { get { _readNativeStruct(); return _sciTextToFind.chrgText; } } + + void _initNativeStruct() + { + if (_ptrSciTextToFind == IntPtr.Zero) + _ptrSciTextToFind = Marshal.AllocHGlobal(Marshal.SizeOf(_sciTextToFind)); + Marshal.StructureToPtr(_sciTextToFind, _ptrSciTextToFind, false); + } + + void _readNativeStruct() + { + if (_ptrSciTextToFind != IntPtr.Zero) + _sciTextToFind = (Sci_TextToFind)Marshal.PtrToStructure(_ptrSciTextToFind, typeof(Sci_TextToFind)); + } + + void _freeNativeString() + { + if (_sciTextToFind.lpstrText != IntPtr.Zero) Marshal.FreeHGlobal(_sciTextToFind.lpstrText); + } + + public void Dispose() + { + if (!_disposed) + { + _freeNativeString(); + if (_ptrSciTextToFind != IntPtr.Zero) Marshal.FreeHGlobal(_ptrSciTextToFind); + _disposed = true; + } + } + + ~TextToFind() + { + Dispose(); + } + } +} diff --git a/WakaTime/PluginInfrastructure/UnmanagedExports.cs b/WakaTime/PluginInfrastructure/UnmanagedExports.cs index 480ee74..01c344c 100644 --- a/WakaTime/PluginInfrastructure/UnmanagedExports.cs +++ b/WakaTime/PluginInfrastructure/UnmanagedExports.cs @@ -1,67 +1,54 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using System.Runtime.InteropServices; -using Kbg.NppPluginNET.PluginInfrastructure; -using NppPlugin.DllExport; -using WakaTime; - -namespace Kbg.NppPluginNET -{ - class UnmanagedExports - { - [DllExport(CallingConvention=CallingConvention.Cdecl)] - static bool isUnicode() - { - return true; - } - - [DllExport(CallingConvention = CallingConvention.Cdecl)] - static void setInfo(NppData notepadPlusData) - { - PluginBase.nppData = notepadPlusData; - WakaTimePackage.CommandMenuInit(); - } - - [DllExport(CallingConvention = CallingConvention.Cdecl)] - static IntPtr getFuncsArray(ref int nbF) - { - nbF = PluginBase._funcItems.Items.Count; - return PluginBase._funcItems.NativePointer; - } - - [DllExport(CallingConvention = CallingConvention.Cdecl)] - static uint messageProc(uint Message, IntPtr wParam, IntPtr lParam) - { - return 1; - } - - static IntPtr _ptrPluginName = IntPtr.Zero; - [DllExport(CallingConvention = CallingConvention.Cdecl)] - static IntPtr getName() - { - if (_ptrPluginName == IntPtr.Zero) - _ptrPluginName = Marshal.StringToHGlobalUni(WakaTimePackage.PluginName); - return _ptrPluginName; - } - - [DllExport(CallingConvention = CallingConvention.Cdecl)] - static void beNotified(IntPtr notifyCode) - { - ScNotification notification = (ScNotification)Marshal.PtrToStructure(notifyCode, typeof(ScNotification)); - if (notification.Header.Code == (uint)NppMsg.NPPN_TBMODIFICATION) - { - PluginBase._funcItems.RefreshItems(); - WakaTimePackage.SetToolBarIcon(); - } - else if (notification.Header.Code == (uint)NppMsg.NPPN_SHUTDOWN) - { - WakaTimePackage.PluginCleanUp(); - Marshal.FreeHGlobal(_ptrPluginName); - } - else - { - WakaTimePackage.OnNotification(notification); - } - } - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System; +using System.Runtime.InteropServices; +using Kbg.NppPluginNET.PluginInfrastructure; +using WakaTime; + +namespace Kbg.NppPluginNET +{ + class UnmanagedExports + { + [DllExport(CallingConvention=CallingConvention.Cdecl)] + static bool isUnicode() + { + return true; + } + + [DllExport(CallingConvention = CallingConvention.Cdecl)] + static void setInfo(NppData notepadPlusData) + { + PluginBase.nppData = notepadPlusData; + //WakaTimePackage.CommandMenuInit(); + } + + [DllExport(CallingConvention = CallingConvention.Cdecl)] + static IntPtr getFuncsArray(ref int nbF) + { + WakaTimePackage.CommandMenuInit(); + nbF = PluginBase._funcItems.Items.Count; + return PluginBase._funcItems.NativePointer; + } + + [DllExport(CallingConvention = CallingConvention.Cdecl)] + static uint messageProc(uint Message, IntPtr wParam, IntPtr lParam) + { + return 1; + } + + static IntPtr _ptrPluginName = IntPtr.Zero; + [DllExport(CallingConvention = CallingConvention.Cdecl)] + static IntPtr getName() + { + if (_ptrPluginName == IntPtr.Zero) + _ptrPluginName = Marshal.StringToHGlobalUni("WakaTime"); + return _ptrPluginName; + } + + [DllExport(CallingConvention = CallingConvention.Cdecl)] + static void beNotified(IntPtr notifyCode) + { + var notification = (ScNotification)Marshal.PtrToStructure(notifyCode, typeof(ScNotification)); + WakaTimePackage.OnNppNotification(notification, _ptrPluginName); + } + } +} diff --git a/WakaTime/PluginInfrastructure/Win32.cs b/WakaTime/PluginInfrastructure/Win32.cs index d1a8c74..5a4bbd7 100644 --- a/WakaTime/PluginInfrastructure/Win32.cs +++ b/WakaTime/PluginInfrastructure/Win32.cs @@ -1,313 +1,313 @@ -// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. -using System; -using System.Drawing; -using System.Runtime.InteropServices; -using System.Text; - -namespace Kbg.NppPluginNET.PluginInfrastructure -{ - public class Win32 - { - /// - /// Get the scroll information of a scroll bar or window with scroll bar - /// @see https://msdn.microsoft.com/en-us/library/windows/desktop/bb787537(v=vs.85).aspx - /// - [StructLayout(LayoutKind.Sequential)] - public struct ScrollInfo - { - /// - /// Specifies the size, in bytes, of this structure. The caller must set this to sizeof(SCROLLINFO). - /// - public uint cbSize; - /// - /// Specifies the scroll bar parameters to set or retrieve. - /// @see ScrollInfoMask - /// - public uint fMask; - /// - /// Specifies the minimum scrolling position. - /// - public int nMin; - /// - /// Specifies the maximum scrolling position. - /// - public int nMax; - /// - /// Specifies the page size, in device units. A scroll bar uses this value to determine the appropriate size of the proportional scroll box. - /// - public uint nPage; - /// - /// Specifies the position of the scroll box. - /// - public int nPos; - /// - /// Specifies the immediate position of a scroll box that the user is dragging. - /// An application can retrieve this value while processing the SB_THUMBTRACK request code. - /// An application cannot set the immediate scroll position; the SetScrollInfo function ignores this member. - /// - public int nTrackPos; - } - - /// - /// Used for the ScrollInfo fMask - /// SIF_ALL => Combination of SIF_PAGE, SIF_POS, SIF_RANGE, and SIF_TRACKPOS. - /// SIF_DISABLENOSCROLL => This value is used only when setting a scroll bar's parameters. If the scroll bar's new parameters make the scroll bar unnecessary, disable the scroll bar instead of removing it. - /// SIF_PAGE => The nPage member contains the page size for a proportional scroll bar. - /// SIF_POS => The nPos member contains the scroll box position, which is not updated while the user drags the scroll box. - /// SIF_RANGE => The nMin and nMax members contain the minimum and maximum values for the scrolling range. - /// SIF_TRACKPOS => The nTrackPos member contains the current position of the scroll box while the user is dragging it. - /// - public enum ScrollInfoMask - { - SIF_RANGE = 0x1, - SIF_PAGE = 0x2, - SIF_POS = 0x4, - SIF_DISABLENOSCROLL = 0x8, - SIF_TRACKPOS = 0x10, - SIF_ALL = SIF_RANGE + SIF_PAGE + SIF_POS + SIF_TRACKPOS - } - - /// - /// Used for the GetScrollInfo() nBar parameter - /// - public enum ScrollInfoBar - { - SB_HORZ = 0, - SB_VERT = 1, - SB_CTL = 2, - SB_BOTH = 3 - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - [DllImport("user32")] - public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam); - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - [DllImport("user32")] - public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder lParam); - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - [DllImport("user32")] - public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam); - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - [DllImport("user32")] - public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, out IntPtr lParam); - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, NppMenuCmd lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), new IntPtr((uint)lParam)); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, IntPtr lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), new IntPtr(lParam)); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, out int lParam) - { - IntPtr outVal; - IntPtr retval = SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), out outVal); - lParam = outVal.ToInt32(); - return retval; - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, int lParam) - { - return SendMessage(hWnd, (UInt32)Msg, wParam, new IntPtr(lParam)); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, IntPtr wParam, int lParam) - { - return SendMessage(hWnd, (UInt32)Msg, wParam, new IntPtr(lParam)); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, int wParam, IntPtr lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, int wParam, string lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, int wParam, [MarshalAs(UnmanagedType.LPStr)] StringBuilder lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, int wParam, int lParam) - { - return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), new IntPtr(lParam)); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, IntPtr wParam, IntPtr lParam) - { - return SendMessage(hWnd, (UInt32)Msg, wParam, lParam); - } - - /// - /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as - /// or . - /// If gateways are missing or incomplete, please help extend them and send your code to the project - /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net - /// - public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, ref LangType lParam) - { - IntPtr outVal; - IntPtr retval = SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), out outVal); - lParam = (LangType)outVal; - return retval; - } - - public const int MAX_PATH = 260; - - [DllImport("kernel32")] - public static extern int GetPrivateProfileInt(string lpAppName, string lpKeyName, int nDefault, string lpFileName); - - [DllImport("kernel32")] - public static extern bool WritePrivateProfileString(string lpAppName, string lpKeyName, string lpString, string lpFileName); - - public const int MF_BYCOMMAND = 0; - public const int MF_CHECKED = 8; - public const int MF_UNCHECKED = 0; - - [DllImport("user32")] - public static extern IntPtr GetMenu(IntPtr hWnd); - - [DllImport("user32")] - public static extern int CheckMenuItem(IntPtr hmenu, int uIDCheckItem, int uCheck); - - public const int WM_CREATE = 1; - - [DllImport("user32")] - public static extern bool ClientToScreen(IntPtr hWnd, ref Point lpPoint); - - [DllImport("kernel32")] - public static extern void OutputDebugString(string lpOutputString); - - /// - /// @see https://msdn.microsoft.com/en-us/library/windows/desktop/bb787583(v=vs.85).aspx - /// - /// - /// - /// - /// - [DllImport("user32")] - public static extern int GetScrollInfo(IntPtr hwnd, int nBar, ref ScrollInfo scrollInfo); - } -} +// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc. +using System; +using System.Drawing; +using System.Runtime.InteropServices; +using System.Text; + +namespace Kbg.NppPluginNET.PluginInfrastructure +{ + public class Win32 + { + /// + /// Get the scroll information of a scroll bar or window with scroll bar + /// @see https://msdn.microsoft.com/en-us/library/windows/desktop/bb787537(v=vs.85).aspx + /// + [StructLayout(LayoutKind.Sequential)] + public struct ScrollInfo + { + /// + /// Specifies the size, in bytes, of this structure. The caller must set this to sizeof(SCROLLINFO). + /// + public uint cbSize; + /// + /// Specifies the scroll bar parameters to set or retrieve. + /// @see ScrollInfoMask + /// + public uint fMask; + /// + /// Specifies the minimum scrolling position. + /// + public int nMin; + /// + /// Specifies the maximum scrolling position. + /// + public int nMax; + /// + /// Specifies the page size, in device units. A scroll bar uses this value to determine the appropriate size of the proportional scroll box. + /// + public uint nPage; + /// + /// Specifies the position of the scroll box. + /// + public int nPos; + /// + /// Specifies the immediate position of a scroll box that the user is dragging. + /// An application can retrieve this value while processing the SB_THUMBTRACK request code. + /// An application cannot set the immediate scroll position; the SetScrollInfo function ignores this member. + /// + public int nTrackPos; + } + + /// + /// Used for the ScrollInfo fMask + /// SIF_ALL => Combination of SIF_PAGE, SIF_POS, SIF_RANGE, and SIF_TRACKPOS. + /// SIF_DISABLENOSCROLL => This value is used only when setting a scroll bar's parameters. If the scroll bar's new parameters make the scroll bar unnecessary, disable the scroll bar instead of removing it. + /// SIF_PAGE => The nPage member contains the page size for a proportional scroll bar. + /// SIF_POS => The nPos member contains the scroll box position, which is not updated while the user drags the scroll box. + /// SIF_RANGE => The nMin and nMax members contain the minimum and maximum values for the scrolling range. + /// SIF_TRACKPOS => The nTrackPos member contains the current position of the scroll box while the user is dragging it. + /// + public enum ScrollInfoMask + { + SIF_RANGE = 0x1, + SIF_PAGE = 0x2, + SIF_POS = 0x4, + SIF_DISABLENOSCROLL = 0x8, + SIF_TRACKPOS = 0x10, + SIF_ALL = SIF_RANGE + SIF_PAGE + SIF_POS + SIF_TRACKPOS + } + + /// + /// Used for the GetScrollInfo() nBar parameter + /// + public enum ScrollInfoBar + { + SB_HORZ = 0, + SB_VERT = 1, + SB_CTL = 2, + SB_BOTH = 3 + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + [DllImport("user32")] + public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam); + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + [DllImport("user32")] + public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder lParam); + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + [DllImport("user32")] + public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam); + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + [DllImport("user32")] + public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, out IntPtr lParam); + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, NppMenuCmd lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), new IntPtr((uint)lParam)); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, IntPtr lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), new IntPtr(lParam)); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, out int lParam) + { + IntPtr outVal; + IntPtr retval = SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), out outVal); + lParam = outVal.ToInt32(); + return retval; + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, int lParam) + { + return SendMessage(hWnd, (UInt32)Msg, wParam, new IntPtr(lParam)); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, IntPtr wParam, int lParam) + { + return SendMessage(hWnd, (UInt32)Msg, wParam, new IntPtr(lParam)); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, int wParam, IntPtr lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, int wParam, string lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, int wParam, [MarshalAs(UnmanagedType.LPStr)] StringBuilder lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), lParam); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, int wParam, int lParam) + { + return SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), new IntPtr(lParam)); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, SciMsg Msg, IntPtr wParam, IntPtr lParam) + { + return SendMessage(hWnd, (UInt32)Msg, wParam, lParam); + } + + /// + /// You should try to avoid calling this method in your plugin code. Rather use one of the gateways such as + /// or . + /// If gateways are missing or incomplete, please help extend them and send your code to the project + /// at https://github.com/kbilsted/NotepadPlusPlusPluginPack.Net + /// + public static IntPtr SendMessage(IntPtr hWnd, uint Msg, int wParam, ref LangType lParam) + { + IntPtr outVal; + IntPtr retval = SendMessage(hWnd, (UInt32)Msg, new IntPtr(wParam), out outVal); + lParam = (LangType)outVal; + return retval; + } + + public const int MAX_PATH = 260; + + [DllImport("kernel32")] + public static extern int GetPrivateProfileInt(string lpAppName, string lpKeyName, int nDefault, string lpFileName); + + [DllImport("kernel32")] + public static extern bool WritePrivateProfileString(string lpAppName, string lpKeyName, string lpString, string lpFileName); + + public const int MF_BYCOMMAND = 0; + public const int MF_CHECKED = 8; + public const int MF_UNCHECKED = 0; + + [DllImport("user32")] + public static extern IntPtr GetMenu(IntPtr hWnd); + + [DllImport("user32")] + public static extern int CheckMenuItem(IntPtr hmenu, int uIDCheckItem, int uCheck); + + public const int WM_CREATE = 1; + + [DllImport("user32")] + public static extern bool ClientToScreen(IntPtr hWnd, ref Point lpPoint); + + [DllImport("kernel32")] + public static extern void OutputDebugString(string lpOutputString); + + /// + /// @see https://msdn.microsoft.com/en-us/library/windows/desktop/bb787583(v=vs.85).aspx + /// + /// + /// + /// + /// + [DllImport("user32")] + public static extern int GetScrollInfo(IntPtr hwnd, int nBar, ref ScrollInfo scrollInfo); + } +} diff --git a/WakaTime/ProcessorArchitectureHelper.cs b/WakaTime/ProcessorArchitectureHelper.cs index cf19ccd..a214c32 100644 --- a/WakaTime/ProcessorArchitectureHelper.cs +++ b/WakaTime/ProcessorArchitectureHelper.cs @@ -1,22 +1,20 @@ -using System; -using System.Diagnostics; - -namespace WakaTime -{ - internal static class ProcessorArchitectureHelper - { - private static readonly bool Is64BitProcess = IntPtr.Size == 8; - internal static bool Is64BitOperatingSystem = Is64BitProcess || InternalCheckIsWow64(); - - public static bool InternalCheckIsWow64() - { - if ((Environment.OSVersion.Version.Major != 5 || Environment.OSVersion.Version.Minor < 1) && - Environment.OSVersion.Version.Major < 6) return false; - - using (var p = Process.GetCurrentProcess()) - { - return NativeMethods.IsWow64Process(p.Handle, out var retVal) && retVal; - } - } - } -} \ No newline at end of file +using System; +using System.Diagnostics; + +namespace WakaTime +{ + internal static class ProcessorArchitectureHelper + { + private static readonly bool Is64BitProcess = IntPtr.Size == 8; + internal static bool Is64BitOperatingSystem = Is64BitProcess || InternalCheckIsWow64(); + + public static bool InternalCheckIsWow64() + { + if ((Environment.OSVersion.Version.Major != 5 || Environment.OSVersion.Version.Minor < 1) && + Environment.OSVersion.Version.Major < 6) return false; + + using (var p = Process.GetCurrentProcess()) + return NativeMethods.IsWow64Process(p.Handle, out var retVal) && retVal; + } + } +} diff --git a/WakaTime/Properties/AssemblyInfo.cs b/WakaTime/Properties/AssemblyInfo.cs index 34aade0..2a3d532 100644 --- a/WakaTime/Properties/AssemblyInfo.cs +++ b/WakaTime/Properties/AssemblyInfo.cs @@ -1,36 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WakaTime")] -[assembly: AssemblyDescription("WakaTime is a productivity & time tracking tool for programmers. Once the WakaTime plugin is installed, you get a dashboard with reports about your programming by time, language, project, and branch.")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("WakaTime")] -[assembly: AssemblyProduct("WakaTime")] -[assembly: AssemblyCopyright("Copyright © WakaTime 2016")] -[assembly: AssemblyTrademark("WakaTime ®")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("31492674-6fe0-485c-91f0-2e17244588ff")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("4.3.0")] -[assembly: AssemblyFileVersion("4.3.0")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WakaTime")] +[assembly: AssemblyDescription("WakaTime is a productivity & time tracking tool for programmers. Once the WakaTime plugin is installed, you get a dashboard with reports about your programming by time, language, project, and branch.")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("WakaTime")] +[assembly: AssemblyProduct("WakaTime")] +[assembly: AssemblyCopyright("Copyright © WakaTime 2022")] +[assembly: AssemblyTrademark("WakaTime ®")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0f9f9ac7-1922-42ec-8bb5-a1598f3d2650")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("5.0.0")] +[assembly: AssemblyFileVersion("5.0.0")] diff --git a/WakaTime/Properties/star.png b/WakaTime/Properties/star.png deleted file mode 100644 index 164d16b..0000000 Binary files a/WakaTime/Properties/star.png and /dev/null differ diff --git a/WakaTime/Properties/star_bmp.bmp b/WakaTime/Properties/star_bmp.bmp deleted file mode 100644 index 689ab17..0000000 Binary files a/WakaTime/Properties/star_bmp.bmp and /dev/null differ diff --git a/WakaTime/Proxy.cs b/WakaTime/Proxy.cs new file mode 100644 index 0000000..67edd08 --- /dev/null +++ b/WakaTime/Proxy.cs @@ -0,0 +1,70 @@ +using System; +using System.Net; +using System.Text.RegularExpressions; + +namespace WakaTime +{ + public class Proxy + { + private readonly ConfigFile _config; + private readonly Logger _logger; + + public Proxy(Logger logger, string configFilepath) + { + _logger = logger; + _config = new ConfigFile(configFilepath); + } + + public WebProxy Get() + { + WebProxy proxy = null; + + try + { + var proxyStr = _config.GetSetting("proxy"); + if (string.IsNullOrEmpty(proxyStr)) + { + _logger.Debug("No proxy will be used. It's not set."); + + return null; + } + + var proxyRegex = new Regex(@"\s*((?https?|socks5):\/\/)?(([^\s:]+):([^\s:]+)@)?([^\s:]+):(\d+)\s*"); + var match = proxyRegex.Match(proxyStr); + + if (match.Success) + { + var protocol = match.Groups["protocol"].Success ? match.Groups["protocol"].Value : null; + var address = match.Groups[5].Value; + var port = match.Groups[6].Value; + + proxy = new WebProxy( + protocol != null ? $"{protocol}://{address}:{port}" : $"{address}:{port}", + true, null); + + if (match.Groups["3"].Success) + { + var username = match.Groups[3].Value; + var password = match.Groups[4].Value; + + proxy.Credentials = new NetworkCredential(username, password); + } + + _logger.Debug("A proxy with authentication will be used."); + + return proxy; + } + + _logger.Debug("No proxy will be used. It's either not set or badly formatted."); + } + catch (Exception ex) + { + _logger.Error( + "Exception while parsing the proxy string from WakaTime config file. No proxy will be used.", + ex); + } + + return proxy; + } + } +} diff --git a/WakaTime/Resources/wakatime-120.png b/WakaTime/Resources/wakatime-120.png deleted file mode 100644 index 0cee47f..0000000 Binary files a/WakaTime/Resources/wakatime-120.png and /dev/null differ diff --git a/WakaTime/Resources/wakatime-16.png b/WakaTime/Resources/wakatime-16.png deleted file mode 100644 index c7c3ba3..0000000 Binary files a/WakaTime/Resources/wakatime-16.png and /dev/null differ diff --git a/WakaTime/RunProcess.cs b/WakaTime/RunProcess.cs index 08339b4..3d4b9a7 100644 --- a/WakaTime/RunProcess.cs +++ b/WakaTime/RunProcess.cs @@ -1,111 +1,109 @@ -using System; -using System.Collections; -using System.Diagnostics; -using System.Linq; -using System.Text; - -namespace WakaTime -{ - internal class RunProcess - { - private readonly string _program; - private readonly string[] _arguments; - private string _stdin; - private bool _captureOutput; - - internal RunProcess(string program, params string[] arguments) - { - _program = program; - _arguments = arguments; - _captureOutput = true; - } - - internal void RunInBackground() - { - _captureOutput = false; - Run(); - } - - internal void RunInBackground(string stdin) - { - _captureOutput = false; - _stdin = stdin; - Run(); - } - - internal void Run(string stdin) - { - _stdin = stdin; - Run(); - } - - internal string Output { get; private set; } - - internal string Error { get; private set; } - - internal bool Success => Exception == null; - - internal Exception Exception { get; private set; } - - internal void Run() - { - try - { - var procInfo = new ProcessStartInfo - { - UseShellExecute = false, - RedirectStandardError = _captureOutput, - RedirectStandardOutput = _captureOutput, - RedirectStandardInput = _stdin != null, - FileName = _program, - CreateNoWindow = true, - Arguments = GetArgumentString() - }; - - using (var process = Process.Start(procInfo)) - { - - if (_stdin != null) - { - process?.StandardInput.WriteLine($"{_stdin}\n"); - } - - if (_captureOutput) - { - var stdOut = new StringBuilder(); - var stdErr = new StringBuilder(); - - while (process != null && !process.HasExited) - { - stdOut.Append(process.StandardOutput.ReadToEnd()); - stdErr.Append(process.StandardError.ReadToEnd()); - } - - if (process != null) - { - stdOut.Append(process.StandardOutput.ReadToEnd()); - stdErr.Append(process.StandardError.ReadToEnd()); - } - - Output = stdOut.ToString().Trim(Environment.NewLine.ToCharArray()).Trim('\r', '\n'); - Error = stdErr.ToString().Trim(Environment.NewLine.ToCharArray()).Trim('\r', '\n'); - } - - Exception = null; - } - } - catch (Exception ex) - { - Output = null; - Error = ex.Message; - Exception = ex; - } - } - - private string GetArgumentString() - { - var args = _arguments.Aggregate(string.Empty, (current, arg) => current + "\"" + arg + "\" "); - return args.TrimEnd(' '); - } - } -} +using System; +using System.Diagnostics; +using System.Linq; +using System.Text; + +namespace WakaTime +{ + internal class RunProcess + { + private readonly string _program; + private readonly string _arguments; + private string _stdin; + private bool _captureOutput; + + internal RunProcess(string program, params string[] arguments) + { + _program = program; + _arguments = arguments + .Aggregate(string.Empty, (current, arg) => current + "\"" + arg + "\" ") + .TrimEnd(' '); + _captureOutput = true; + } + + internal void RunInBackground() + { + _captureOutput = false; + Run(); + } + + internal void RunInBackground(string stdin) + { + _captureOutput = false; + _stdin = stdin; + Run(); + } + + internal void Run(string stdin) + { + _stdin = stdin; + Run(); + } + + internal string Output { get; private set; } + + internal string Error { get; private set; } + + internal bool Success => Exception == null; + + private Exception Exception { get; set; } + + internal void Run() + { + try + { + var procInfo = new ProcessStartInfo + { + UseShellExecute = false, + RedirectStandardError = _captureOutput, + RedirectStandardOutput = _captureOutput, + RedirectStandardInput = _stdin != null, + FileName = _program, + CreateNoWindow = true, + Arguments = _arguments, + }; + + using (var process = Process.Start(procInfo)) + { + // run background process at lower priority to prevent lagging GUI + try + { + if (process != null) process.PriorityClass = ProcessPriorityClass.BelowNormal; + } + catch (Exception) { /* Might fail if not Admin */ } + + if (_stdin != null) + { + process?.StandardInput.WriteLine($"{_stdin}\n"); + } + + if (_captureOutput) + { + var stdOut = new StringBuilder(); + var stdErr = new StringBuilder(); + + if (process != null) + { + process.OutputDataReceived += (s, e) => stdOut.Append(e.Data); + process.ErrorDataReceived += (s, e) => stdErr.Append(e.Data); + process.BeginOutputReadLine(); + process.BeginErrorReadLine(); + process.WaitForExit(1000 * 60 * 10); // 10 minutes + } + + Output = stdOut.ToString().Trim(Environment.NewLine.ToCharArray()).Trim('\r', '\n'); + Error = stdErr.ToString().Trim(Environment.NewLine.ToCharArray()).Trim('\r', '\n'); + } + + Exception = null; + } + } + catch (Exception ex) + { + Output = null; + Error = ex.Message; + Exception = ex; + } + } + } +} diff --git a/WakaTime/WakaTime.cs b/WakaTime/WakaTime.cs new file mode 100644 index 0000000..49fa9b3 --- /dev/null +++ b/WakaTime/WakaTime.cs @@ -0,0 +1,207 @@ +using Kbg.NppPluginNET.PluginInfrastructure; +using System; +using System.Collections.Concurrent; +using System.Collections.ObjectModel; +using System.Net; +using System.Threading.Tasks; +using System.Timers; + +namespace WakaTime +{ + public class WakaTime : IDisposable + { + private readonly Metadata _metadata; + private readonly CliParameters _cliParameters; + private readonly Dependencies _dependencies; + private readonly Timer _timer; + private readonly ConcurrentQueue HeartbeatQueue; + + private string _lastFile; + private DateTime _lastHeartbeat; + private IScintillaGateway ScintillaGateway; + + internal readonly ConfigFile Config; + + public Logger Logger { get; } + + public WakaTime(Metadata metadata, Logger logger) + { + if (metadata is null) + throw new ArgumentNullException("metadata"); + + if (logger is null) + throw new ArgumentNullException("logger"); + + Logger = logger; + Config = new ConfigFile(Dependencies.GetConfigFilePath()); + HeartbeatQueue = new ConcurrentQueue(); + + _metadata = metadata; + _cliParameters = new CliParameters + { + Key = Config.GetSetting("api_key"), + Plugin = + $"{_metadata.EditorName}/{_metadata.EditorVersion} {_metadata.PluginName}/{_metadata.PluginVersion}" + }; + _dependencies = new Dependencies(logger, Config); + _timer = new Timer(10000); + _lastHeartbeat = DateTime.UtcNow.AddMinutes(-3); + } + + public void Initialize() + { + Logger.Info($"Initializing WakaTime v{_metadata.PluginVersion}"); + + try + { + _dependencies.CheckAndInstallCli(); + + ScintillaGateway = new ScintillaGateway(PluginBase.GetCurrentScintilla()); + + _timer.Elapsed += new ElapsedEventHandler(ProcessHeartbeats); + _timer.Start(); + + Logger.Info($"Finished initializing WakaTime v{_metadata.PluginVersion}"); + } + catch (WebException ex) + { + Logger.Error($"Are you behind a proxy? Try setting a proxy in WakaTime Settings with format https://user:pass@host:port", ex); + } + catch (Exception ex) + { + Logger.Error($"Error installing dependencies", ex); + } + } + + public void HandleActivity(string currentFile, bool isWrite) + { + if (currentFile == null) + return; + + var now = DateTime.UtcNow; + + if (!isWrite && _lastFile != null && !EnoughTimePassed(now) && currentFile.Equals(_lastFile)) + return; + + _lastFile = currentFile; + _lastHeartbeat = now; + + AppendHeartbeat(currentFile, isWrite, now); + } + + private void AppendHeartbeat(string fileName, bool isWrite, DateTime time) + { + var h = new Heartbeat + { + Entity = fileName, + LineNumber = ScintillaGateway.GetCurrentLineNumber(), + Lines = ScintillaGateway.GetLineCount(), + Timestamp = ToUnixEpoch(time), + IsWrite = isWrite + }; + + HeartbeatQueue.Enqueue(h); + } + + private bool EnoughTimePassed(DateTime now) + { + return _lastHeartbeat < now.AddMinutes(Constants.HeartbeatFrequency * -1); + } + + private static string ToUnixEpoch(DateTime date) + { + var epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); + var timestamp = date - epoch; + var seconds = Convert.ToInt64(Math.Floor(timestamp.TotalSeconds)); + var milliseconds = timestamp.ToString("ffffff"); + return $"{seconds}.{milliseconds}"; + } + + private void ProcessHeartbeats(object sender, ElapsedEventArgs e) + { + _ = Task.Run(() => + { + // ReSharper disable once ConvertClosureToMethodGroup + ProcessHeartbeats(); + }); + } + + private void ProcessHeartbeats() + { + try + { + var binary = Dependencies.GetCliLocation(); + + // get first heartbeat from queue + var gotOne = HeartbeatQueue.TryDequeue(out var heartbeat); + if (!gotOne) + return; + + // pop all extra heartbeats from queue + var extraHeartbeats = new Collection(); + while (HeartbeatQueue.TryDequeue(out var h)) + extraHeartbeats.Add(h); + + var hasExtraHeartbeats = extraHeartbeats.Count > 0; + + _cliParameters.File = heartbeat.Entity; + _cliParameters.Lines = heartbeat.Lines.ToString(); + _cliParameters.LineNumber = heartbeat.LineNumber.ToString(); + _cliParameters.Time = heartbeat.Timestamp; + _cliParameters.IsWrite = heartbeat.IsWrite; + _cliParameters.HasExtraHeartbeats = hasExtraHeartbeats; + + string extraHeartbeatsString = null; + if (hasExtraHeartbeats) + extraHeartbeatsString = JSONSerializer.SerializeArrayHeartbeat(extraHeartbeats); + + var process = new RunProcess(binary, _cliParameters.ToArray()); + + if (Config.GetSettingAsBoolean("debug")) + { + Logger.Debug( + $"[\"{binary}\", \"{string.Join("\", \"", _cliParameters.ToArray(true))}\"]"); + + process.Run(extraHeartbeatsString); + + if (!string.IsNullOrEmpty(process.Output)) + Logger.Debug(process.Output); + + if (!string.IsNullOrEmpty(process.Error)) + Logger.Debug(process.Error); + } + else + process.RunInBackground(extraHeartbeatsString); + + if (process.Success) return; + + Logger.Error("Could not send heartbeat."); + + if (!string.IsNullOrEmpty(process.Output)) + Logger.Error(process.Output); + + if (!string.IsNullOrEmpty(process.Error)) + Logger.Error(process.Error); + } + catch (Exception ex) + { + Logger.Error("Error processing heartbeat(s).", ex); + } + } + + public void Dispose() + { + if (_timer != null) + { + _timer.Stop(); + _timer.Elapsed -= ProcessHeartbeats; + _timer.Dispose(); + } + + Logger?.Close(); + + // make sure the queue is empty + ProcessHeartbeats(); + } + } +} diff --git a/WakaTime/WakaTime.csproj b/WakaTime/WakaTime.csproj index 711498e..79b8688 100644 --- a/WakaTime/WakaTime.csproj +++ b/WakaTime/WakaTime.csproj @@ -1,225 +1,245 @@ - - - - - - Debug - x86 - 2.0 - {E56F6E12-089C-40ED-BCFD-923E5FA121A1} - Library - Properties - WakaTime - WakaTime - bin\Debug\ - v4.5 - - - - - 3.5 - - - - - - true - DEBUG;TRACE - full - prompt - false - bin\Debug - AnyCPU - true - false - - - - - true - bin\Release - none - prompt - AnyCPU - true - false - false - true - On - - - true - bin\x64\Debug\ - DEBUG;TRACE - true - full - x64 - prompt - MinimumRecommendedRules.ruleset - - - bin\x64\Release\ - - - true - true - none - x64 - prompt - MinimumRecommendedRules.ruleset - false - - - true - bin\x86\Debug\ - DEBUG;TRACE - true - full - x86 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - true - true - x86 - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form - - - ApiKeyForm.cs - - - Form - - - SettingsForm.cs - - - True - True - Resources.resx - - - - - - - - ApiKeyForm.cs - - - SettingsForm.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - $([System.IO.File]::ReadAllText('Properties\AssemblyInfo.cs')) - ^\s*\[assembly: AssemblyVersion\(\D*(\d+)\.(\d+)\.(\d+) - $([System.Text.RegularExpressions.Regex]::Match($(In), $(Pattern), System.Text.RegularExpressions.RegexOptions.Multiline).Groups[1].Value) - $([System.Text.RegularExpressions.Regex]::Match($(In), $(Pattern), System.Text.RegularExpressions.RegexOptions.Multiline).Groups[2].Value) - $([System.Text.RegularExpressions.Regex]::Match($(In), $(Pattern), System.Text.RegularExpressions.RegexOptions.Multiline).Groups[3].Value) - - - - - - - - - - %(ParentFolder.Fullpath) - $(AssemblyName)-$(AssemblyVersionMajor).$(AssemblyVersionMinor).$(AssemblyVersionBuild)-$(Platform).zip - %(OutputDirectory.Fullpath) - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - + + + + Debug + x86 + {0F9F9AC7-1922-42EC-8BB5-A1598F3D2650} + Library + Properties + WakaTime + WakaTime + v4.8 + 512 + true + + + + CC6D86D3-EE13-465B-A98B-CB7E1E7972AA + DllExport.dll + WakaTime + true + false + Auto + 1 + false + false + false + false + 30000 + 2 + 0 + 0 + 0 + + + true + full + false + bin\x86\Debug\ + DEBUG;TRACE + prompt + 4 + true + x86 + + + pdbonly + true + bin\x86\Release\ + TRACE + prompt + 4 + true + x86 + + + true + bin\x64\Debug\ + DEBUG;TRACE + true + full + x64 + 7.3 + prompt + + + bin\x64\Release\ + TRACE + true + true + pdbonly + x64 + 7.3 + prompt + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + ApiKeyForm.cs + + + Form + + + SettingsForm.cs + + + + + True + True + ImageResources.resx + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ApiKeyForm.cs + + + SettingsForm.cs + + + ResXFileCodeGenerator + ImageResources.Designer.cs + + + + + 1.7.4 + false + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)WakaTime\packages\DllExport.1.7.4\gcache\$(DllExportMetaXBase)\$(DllExportNamespace)\$(DllExportMetaLibName) + False + False + + + + + + \ No newline at end of file diff --git a/WakaTime/WakaTimePackage.cs b/WakaTime/WakaTimePackage.cs index 5be6801..c993486 100644 --- a/WakaTime/WakaTimePackage.cs +++ b/WakaTime/WakaTimePackage.cs @@ -1,356 +1,140 @@ -using System; -using System.Drawing; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Text; -using System.Text.RegularExpressions; -using System.Windows.Forms; -using System.Net; -using Task = System.Threading.Tasks.Task; -using System.Collections.Concurrent; -using System.Collections; -using System.Timers; -using System.Web.Script.Serialization; -using Kbg.NppPluginNET.PluginInfrastructure; - -namespace WakaTime -{ - internal class WakaTimePackage - { - #region Properties - internal const string PluginName = Constants.PluginName; - - private static int _idMyDlg = -1; - private static readonly Bitmap TbBmp = Properties.Resources.wakatime; - - private static readonly PythonCliParameters PythonCliParameters = new PythonCliParameters(); - internal static ConfigFile Config; - private static Forms.SettingsForm _settingsForm; - private static string _lastFile; - private static DateTime _lastHeartbeat = DateTime.UtcNow.AddMinutes(-3); - private const int HeartbeatFrequency = 2; // minutes - - private static readonly ConcurrentQueue HeartbeatQueue = new ConcurrentQueue(); - private static System.Timers.Timer _timer = new System.Timers.Timer(); - #endregion - - internal static void CommandMenuInit() - { - // must add menu item in foreground thread - PluginBase.SetCommand(0, "Wakatime Settings", SettingsPopup, new ShortcutKey(false, false, false, Keys.None)); - _idMyDlg = 0; - - // finish initializing in background thread - Task.Run(() => - { - InitializeAsync(); - }); - } - - private static void InitializeAsync() - { - try - { - Logger.Info($"Initializing WakaTime v{Constants.PluginVersion}"); - - // Settings Form - _settingsForm = new Forms.SettingsForm(); - _settingsForm.ConfigSaved += SettingsFormOnConfigSaved; - - // Load config file - Config = new ConfigFile(); - - // Prompt for api key if not already set - if (string.IsNullOrEmpty(Config.ApiKey)) - PromptApiKey(); - - try - { - // Make sure python is installed - if (!Dependencies.IsPythonInstalled()) - { - Dependencies.DownloadAndInstallPython(); - } - - if (!Dependencies.DoesCliExist() || !Dependencies.IsCliUpToDate()) - { - Dependencies.DownloadAndInstallCli(); - } - } - catch (WebException ex) - { - Logger.Error("Are you behind a proxy? Try setting a proxy in WakaTime Settings with format https://user:pass@host:port. Exception Traceback:", ex); - } - catch (Exception ex) - { - Logger.Error("Error detecting dependencies. Exception Traceback:", ex); - } - - // setup timer to process queued heartbeats after 10 second delay - _timer.Interval = 10 * 1000; - _timer.AutoReset = false; - _timer.Elapsed += ProcessHeartbeats; - - Logger.Info($"Finished initializing WakaTime v{Constants.PluginVersion}"); - } - catch (Exception ex) - { - Logger.Error("Error Initializing WakaTime", ex); - } - } - - internal static void SetToolBarIcon() - { - var tbIcons = new toolbarIcons { hToolbarBmp = TbBmp.GetHbitmap() }; - var pTbIcons = Marshal.AllocHGlobal(Marshal.SizeOf(tbIcons)); - Marshal.StructureToPtr(tbIcons, pTbIcons, false); - Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_ADDTOOLBARICON, - PluginBase._funcItems.Items[_idMyDlg]._cmdID, pTbIcons); - Marshal.FreeHGlobal(pTbIcons); - } - - public static void OnNotification(ScNotification notification) - { - switch (notification.Header.Code) - { - case (uint)NppMsg.NPPN_FILESAVED: - HandleActivity(GetCurrentFile(), true); - break; - case (uint)SciMsg.SCN_MODIFIED when (notification.ModificationType & (int)SciMsg.SC_MOD_INSERTTEXT) == (int)SciMsg.SC_MOD_INSERTTEXT: - HandleActivity(GetCurrentFile(), false); - break; - } - } - - public static void HandleActivity(string currentFile, bool isWrite) - { - try - { - if (currentFile == null) - return; - - var now = DateTime.UtcNow; - - if (!isWrite && _lastFile != null && !EnoughTimePassed(now) && currentFile.Equals(_lastFile)) - return; - - _lastFile = currentFile; - _lastHeartbeat = now; - - AppendHeartbeat(currentFile, isWrite, now); - } - catch (Exception ex) - { - Logger.Error("Error appending heartbeat", ex); - } - } - - private static void AppendHeartbeat(string fileName, bool isWrite, DateTime time) - { - Task.Run(() => - { - try - { - var h = new Heartbeat - { - entity = fileName, - timestamp = ToUnixEpoch(time), - is_write = isWrite - }; - HeartbeatQueue.Enqueue(h); - } - catch (Exception ex) - { - Logger.Error("Error appending heartbeat", ex); - } - if (_timer != null) - _timer.Start(); // process heartbeats after 10 second delay - }); - } - - private static void ProcessHeartbeats(object sender, ElapsedEventArgs e) - { - Task.Run(() => - { - try - { - ProcessHeartbeats(); - } - catch (Exception ex) - { - Logger.Error("Error processing heartbeats", ex); - } - }); - } - - private static void ProcessHeartbeats() - { - var pythonBinary = Dependencies.GetPython(); - Heartbeat h; - if (pythonBinary != null) - { - // get first heartbeat from queue - var gotOne = HeartbeatQueue.TryDequeue(out var heartbeat); - if (!gotOne) - return; - - // remove all extra heartbeats from queue - var extraHeartbeats = new ArrayList(); - while (HeartbeatQueue.TryDequeue(out h)) - extraHeartbeats.Add(new Heartbeat(h)); - var hasExtraHeartbeats = extraHeartbeats.Count > 0; - - PythonCliParameters.Key = Config.ApiKey; - PythonCliParameters.Plugin = - $"{Constants.EditorName}/{Constants.EditorVersion} {Constants.PluginKey}/{Constants.PluginVersion}"; - PythonCliParameters.File = heartbeat.entity; - PythonCliParameters.Time = heartbeat.timestamp; - PythonCliParameters.IsWrite = heartbeat.is_write; - PythonCliParameters.HasExtraHeartbeats = hasExtraHeartbeats; - - string extraHeartbeatsJson = null; - if (hasExtraHeartbeats) - extraHeartbeatsJson = new JavaScriptSerializer().Serialize(extraHeartbeats); - - var process = new RunProcess(pythonBinary, PythonCliParameters.ToArray()); - if (Config.Debug) - { - Logger.Debug( - $"[\"{pythonBinary}\", \"{string.Join("\", \"", PythonCliParameters.ToArray(true))}\"]"); - process.Run(extraHeartbeatsJson); - - if (!string.IsNullOrEmpty(process.Output)) - Logger.Debug(process.Output); - - if (!string.IsNullOrEmpty(process.Error)) - Logger.Debug(process.Error); - } - else - process.RunInBackground(extraHeartbeatsJson); - - if (!process.Success) - { - Logger.Error("Could not send heartbeat."); - if (!string.IsNullOrEmpty(process.Output)) - Logger.Error(process.Output); - - if (!string.IsNullOrEmpty(process.Error)) - Logger.Error(process.Error); - } - } - else - Logger.Error("Could not send heartbeat because python is not installed"); - } - - public static string GetCurrentFile() - { - var currentFile = new StringBuilder(Win32.MAX_PATH); - return - (int)Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_GETFULLCURRENTPATH, 0, currentFile) != -1 - ? currentFile.ToString() - : null; - } - - public static bool EnoughTimePassed(DateTime now) - { - return _lastHeartbeat < now.AddMinutes(-1 * HeartbeatFrequency); - } - - private static void SettingsFormOnConfigSaved(object sender, EventArgs eventArgs) - { - Config.Read(); - } - - private static void PromptApiKey() - { - Logger.Info("Please input your api key into the wakatime window."); - var form = new Forms.ApiKeyForm(); - form.ShowDialog(); - } - - private static void SettingsPopup() - { - _settingsForm.ShowDialog(); - } - - private static string ToUnixEpoch(DateTime date) - { - var epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); - var timestamp = date - epoch; - var seconds = Convert.ToInt64(Math.Floor(timestamp.TotalSeconds)); - var milliseconds = timestamp.ToString("ffffff"); - return $"{seconds}.{milliseconds}"; - } - - public static WebProxy GetProxy() - { - WebProxy proxy = null; - - try - { - var proxyStr = Config.Proxy; - - // Regex that matches proxy address with authentication - var regProxyWithAuth = new Regex(@"\s*(https?:\/\/)?([^\s:]+):([^\s:]+)@([^\s:]+):(\d+)\s*"); - var match = regProxyWithAuth.Match(proxyStr); - - if (match.Success) - { - var username = match.Groups[2].Value; - var password = match.Groups[3].Value; - var address = match.Groups[4].Value; - var port = match.Groups[5].Value; - - var credentials = new NetworkCredential(username, password); - proxy = new WebProxy(string.Join(":", new string[] { address, port }), true, null, credentials); - - Logger.Debug("A proxy with authentication will be used."); - return proxy; - } - - // Regex that matches proxy address and port(no authentication) - var regProxy = new Regex(@"\s*(https?:\/\/)?([^\s@]+):(\d+)\s*"); - match = regProxy.Match(proxyStr); - - if (match.Success) - { - var address = match.Groups[2].Value; - var port = int.Parse(match.Groups[3].Value); - - proxy = new WebProxy(address, port); - - Logger.Debug("A proxy will be used."); - return proxy; - } - - Logger.Debug("No proxy will be used. It's either not set or badly formatted."); - } - catch (Exception ex) - { - Logger.Error("Exception while parsing the proxy string from WakaTime config file. No proxy will be used.", ex); - } - - return proxy; - } - - internal static class CoreAssembly - { - private static readonly Assembly Reference = typeof(CoreAssembly).Assembly; - public static readonly Version Version = Reference.GetName().Version; - } - - internal static void PluginCleanUp() - { - if (_timer != null) - { - _timer.Stop(); - _timer.Elapsed -= ProcessHeartbeats; - _timer.Dispose(); - _timer = null; - - // make sure the queue is empty - ProcessHeartbeats(); - } - } - } -} +using Kbg.NppPluginNET.PluginInfrastructure; +using System; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Text; +using System.Windows.Forms; +using WakaTime.Forms; + +namespace WakaTime +{ + internal class WakaTimePackage + { + private static WakaTime _wakaTime; + private static SettingsForm _settingsForm; + + private static void Initialize() + { + var metadata = new Metadata + { + EditorName = "notepadpp", + PluginName = "notepadpp-wakatime", + EditorVersion = EditorVersion, + PluginVersion = PluginVersion + }; + + _wakaTime = new WakaTime(metadata, new Logger(Dependencies.GetConfigFilePath())); + _wakaTime.Initialize(); + + _settingsForm = new SettingsForm(_wakaTime.Config, _wakaTime.Logger); + + if (string.IsNullOrEmpty(_wakaTime.Config.GetSetting("api_key"))) + PromptApiKey(); + } + + internal static void CommandMenuInit() + { + PluginBase.SetCommand(0, "Settings", SettingsPopup, new ShortcutKey(false, false, false, Keys.None)); + } + + private static void SettingsPopup() + { + _settingsForm.ShowDialog(); + } + + private static void PromptApiKey() + { + var form = new ApiKeyForm(_wakaTime.Config, _wakaTime.Logger); + form.ShowDialog(); + } + + private static string GetCurrentFile() + { + var currentFile = new StringBuilder(Win32.MAX_PATH); + return + (int)Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_GETFULLCURRENTPATH, 0, currentFile) != -1 + ? currentFile.ToString() + : null; + } + + public static void OnNppNotification(ScNotification nc, IntPtr ptrPluginName) + { + switch (nc.Header.Code) + { + case (uint)NppMsg.NPPN_TBMODIFICATION: + PluginBase._funcItems.RefreshItems(); + SetToolBarIcon(); + return; + case (uint)NppMsg.NPPN_READY: + Initialize(); + return; + case (uint)NppMsg.NPPN_FILESAVED: + _wakaTime.HandleActivity(GetCurrentFile(), true); + return; + case (uint)SciMsg.SCN_MODIFIED when (nc.ModificationType & (int)SciMsg.SC_MOD_INSERTTEXT) == (int)SciMsg.SC_MOD_INSERTTEXT: + _wakaTime.HandleActivity(GetCurrentFile(), false); + return; + case (uint)NppMsg.NPPN_SHUTDOWN: + ShutDown(); + Marshal.FreeHGlobal(ptrPluginName); + return; + } + } + + internal static void SetToolBarIcon() + { + var tbIcons = new toolbarIcons { hToolbarBmp = ImageResources.WakaTime.GetHbitmap() }; + var pTbIcons = Marshal.AllocHGlobal(Marshal.SizeOf(tbIcons)); + Marshal.StructureToPtr(tbIcons, pTbIcons, false); + Win32.SendMessage( + PluginBase.nppData._nppHandle, + (uint)NppMsg.NPPM_ADDTOOLBARICON, + PluginBase._funcItems.Items[0]._cmdID, + pTbIcons); + Marshal.FreeHGlobal(pTbIcons); + } + + private static string EditorVersion + { + get + { + var msgPtr = Win32.SendMessage(PluginBase.nppData._nppHandle, (uint)NppMsg.NPPM_GETNPPVERSION, 0, 0); + + try + { + var num = Convert.ToInt32(msgPtr.ToString()); + var high = num >> 16; + var low = num & 0xFFFF; + + return $"{high}.{string.Join(".", low.ToString().ToCharArray())}"; + } + catch + { + return "0"; + } + } + } + + private static void ShutDown() + { + _wakaTime?.Dispose(); + } + + private static string PluginVersion + { + get + { + var version = CoreAssembly.Version; + + return $"{version.Major}.{version.Minor}.{version.Build}"; + } + } + + + internal static class CoreAssembly + { + private static readonly Assembly Reference = typeof(CoreAssembly).Assembly; + public static readonly Version Version = Reference.GetName().Version; + } + } +} diff --git a/WakaTime/packages.config b/WakaTime/packages.config deleted file mode 100644 index 4d994f1..0000000 --- a/WakaTime/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/WakaTime/packages/DllExport.1.7.4/.gitattributes b/WakaTime/packages/DllExport.1.7.4/.gitattributes new file mode 100644 index 0000000..ae6dae6 --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/.gitattributes @@ -0,0 +1,7 @@ + +# Our batch files requires CRLF for correct work. +# https://github.com/3F/hMSBuild/issues/2 + +*.bat text eol=crlf +*.cmd text eol=crlf +*.tpl text eol=crlf \ No newline at end of file diff --git a/WakaTime/packages/DllExport.1.7.4/3rd-party.txt b/WakaTime/packages/DllExport.1.7.4/3rd-party.txt new file mode 100644 index 0000000..6d83cb7 --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/3rd-party.txt @@ -0,0 +1,59 @@ +DllExport - https://github.com/3F/DllExport +- - - - - - - - - - - - - - - - - - - - - - + +# Third-party software components + + ## DllExport project includes: + + ### CoreCLR ILAsm & ILDasm + + * https://github.com/3F/coreclr + + ### Mono.Cecil + + * https://github.com/jbevain/cecil + + ### MvSln + + * https://github.com/3F/MvsSln + + ### Conari + + * https://github.com/3F/Conari + + ### GetNuTool + hMSBuild + + As the main core for new manager + and helpers for modern SDK-based projects. + + * https://github.com/3F/GetNuTool + * https://github.com/3F/hMSBuild + + + ## Dev Dependencies includes the following tools for src: + + * vsSolutionBuildEvent + https://github.com/3F/vsSolutionBuildEvent + + * MSTest Framework + https://github.com/microsoft/testfx + + * hMSBuild + https://github.com/3F/hMSBuild + + * GetNuTool + https://github.com/3F/GetNuTool + + + ## Graphics + + ### The Visual Studio image library + + (Visual Studio 2017; 28 November 2017) + Over 1,000 images can be used to create applications that look visually consistent with Microsoft software: + https://docs.microsoft.com/en-us/visualstudio/designers/the-visual-studio-image-library?view=vs-2017 + + License Terms: + + * ./Resources/vsico/Visual Studio 2017 Image Library EULA.RTF + https://download.microsoft.com/download/0/6/0/0607D8EA-9BB7-440B-A36A-A24EB8C9C67E/Visual%20Studio%202017%20Image%20Library%20EULA.RTF diff --git a/WakaTime/packages/DllExport.1.7.4/DllExport.bat b/WakaTime/packages/DllExport.1.7.4/DllExport.bat new file mode 100644 index 0000000..c62293f --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/DllExport.bat @@ -0,0 +1,509 @@ +@echo off +:: Copyright (c) 2016-2021 Denis Kuzmin [x-3F@outlook.com] github/3F +:: https://github.com/3F/DllExport +if "%~1"=="/?" goto bq +set "aa=%~dpnx0" +set ab=%* +set ac=%* +if defined ab ( +if defined __p_call ( +set ac=%ac:^^=^% +) else ( +set ab=%ab:^=^^% +) +) +set wMgrArgs=%ac% +set ad=%ab:!=^!% +setlocal enableDelayedExpansion +set "ae=^" +set "ad=!ad:%%=%%%%!" +set "ad=!ad:&=%%ae%%&!" +set "af=1.7.4" +set "wAction=Configure" +set "ag=DllExport" +set "ah=tools/net.r_eg.DllExport.Wizard.targets" +set "ai=packages" +set "aj=https://www.nuget.org/api/v2/package/" +set "ak=build_info.txt" +set "al=!aa!" +set "wRootPath=!cd!" +set /a wDxpOpt=0 +set "am=" +set "an=" +set "ao=" +set "ap=" +set "aq=" +set "ar=" +set "as=" +set "at=" +set "au=" +set "av=" +set /a aw=0 +if not defined ab ( +if defined wAction goto br +goto bq +) +call :bs bk !ad! bl +goto bt +:bq +echo. +@echo .NET DllExport v1.7.4.29858+c1cc52f +@echo Copyright (c) 2009-2015 Robert Giesecke +@echo Copyright (c) 2016-2021 Denis Kuzmin ^ github/3F +echo. +echo MIT License +@echo https://github.com/3F/DllExport +echo Based on hMSBuild, MvsSln, +GetNuTool: https://github.com/3F +echo. +@echo. +@echo Usage: DllExport [args to DllExport] [args to GetNuTool] [args to hMSBuild] +echo ------ +echo. +echo Arguments +echo --------- +echo -action {type} - Specified action for Wizard. Where {type}: +echo * Configure - To configure DllExport for specific projects. +echo * Update - To update pkg reference for already configured projects. +echo * Restore - To restore configured DllExport. +echo * Export - To export configured projects data. +echo * Recover - To re-configure projects via predefined/exported data. +echo * Unset - To unset all data from specified projects. +echo * Upgrade - Aggregates an Update action with additions for upgrading. +echo. +echo -sln-dir {path} - Path to directory with .sln files to be processed. +echo -sln-file {path} - Optional predefined .sln file to be processed. +echo -metalib {path} - Relative path to meta library. +echo -metacor {path} - Relative path to meta core library. +echo -dxp-target {path} - Relative path to entrypoint wrapper of the main core. +echo -dxp-version {num} - Specific version of DllExport. Where {num}: +echo * Versions: 1.7.3 ... +echo * Keywords: +echo `actual` - Unspecified local/latest remote version; +echo ( Only if you know what you are doing ) +echo. +echo -msb {path} - Full path to specific msbuild. +echo -hMSBuild {args} - Access to hMSBuild tool (packed) https://github.com/3F/hMSBuild +echo -packages {path} - A common directory for packages. +echo -server {url} - Url for searching remote packages. +echo -proxy {cfg} - To use proxy. The format: [usr[:pwd]@]host[:port] +echo -pkg-link {uri} - Direct link to package from the source via specified URI. +echo -force - Aggressive behavior, e.g. like removing pkg when updating. +echo -no-mgr - Do not use %~nx0 for automatic restore the remote package. +echo -mgr-up - Updates %~nx0 to version from '-dxp-version'. +echo -wz-target {path} - Relative path to entrypoint wrapper of the main wizard. +echo -pe-exp-list {module} - To list all available exports from PE32/PE32+ module. +echo -eng - Try to use english language for all build messages. +echo -GetNuTool {args} - Access to GetNuTool (integrated) https://github.com/3F/GetNuTool +echo -debug - To show additional information. +echo -version - Displays version for which (together with) it was compiled. +echo -build-info - Displays actual build information from selected DllExport. +echo -help - Displays this help. Aliases: -help -h +echo. +echo Flags +echo ----- +echo __p_call - To use the call-type logic when invoking %~nx0 +echo. +echo Samples +echo ------- +echo DllExport -action Configure -force -pkg-link http://host/v1.7.3.nupkg +echo DllExport -action Restore -sln-file "Conari.sln" +echo DllExport -proxy guest:1234@10.0.2.15:7428 -action Configure +echo. +echo DllExport -mgr-up -dxp-version 1.7.3 +echo DllExport -action Upgrade -dxp-version 1.7.3 +echo. +echo DllExport -GetNuTool /p:ngpackages="Conari;regXwild" +echo DllExport -pe-exp-list bin\Debug\regXwild.dll +goto bu +:bt +set /a ax=0 +:bv +set ay=!bk[%ax%]! +if [!ay!]==[-help] ( goto bq ) else if [!ay!]==[-h] ( goto bq ) else if [!ay!]==[-?] ( goto bq ) +if [!ay!]==[-debug] ( +set am=1 +goto bw +) else if [!ay!]==[-action] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wAction=!v! +for %%g in (Restore, Configure, Update, Export, Recover, Unset, Upgrade, Default) do ( +if "!v!"=="%%g" goto bw +) +echo Unknown -action !v! +exit/B 1 +) else if [!ay!]==[-sln-dir] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wSlnDir=!v! +goto bw +) else if [!ay!]==[-sln-file] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wSlnFile=!v! +goto bw +) else if [!ay!]==[-metalib] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wMetaLib=!v! +goto bw +) else if [!ay!]==[-metacor] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wMetaCor=!v! +goto bw +) else if [!ay!]==[-dxp-target] ( set /a "ax+=1" & call :bx bk[!ax!] v +set wDxpTarget=!v! +goto bw +) else if [!ay!]==[-dxp-version] ( set /a "ax+=1" & call :bx bk[!ax!] v +set af=!v! +goto bw +) else if [!ay!]==[-msb] ( set /a "ax+=1" & call :bx bk[!ax!] v +set ao=!v! +goto bw +) else if [!ay!]==[-packages] ( set /a "ax+=1" & call :bx bk[!ax!] v +set ai=!v! +goto bw +) else if [!ay!]==[-server] ( set /a "ax+=1" & call :bx bk[!ax!] v +set aj=!v! +goto bw +) else if [!ay!]==[-proxy] ( set /a "ax+=1" & call :bx bk[!ax!] v +set at=!v! +set wProxy=!v! +goto bw +) else if [!ay!]==[-pkg-link] ( set /a "ax+=1" & call :bx bk[!ax!] v +set ap=!v! +set af=!ay! +goto bw +) else if [!ay!]==[-force] ( +set ar=1 +goto bw +) else if [!ay!]==[-no-mgr] ( +set /a wDxpOpt^|=1 +goto bw +) else if [!ay!]==[-mgr-up] ( +set as=1 +goto bw +) else if [!ay!]==[-wz-target] ( set /a "ax+=1" & call :bx bk[!ax!] v +set ah=!v! +goto bw +) else if [!ay!]==[-pe-exp-list] ( set /a "ax+=1" & call :bx bk[!ax!] v +set aq=!v! +goto bw +) else if [!ay!]==[-eng] ( +chcp 437 >nul +goto bw +) else if [!ay!]==[-GetNuTool] ( +call :by -GetNuTool 10 +set /a aw=!ERRORLEVEL! & goto bu +) else if [!ay!]==[-hMSBuild] ( +set av=1 & goto br +) else if [!ay!]==[-version] ( +@echo v1.7.4.29858+c1cc52f %__dxp_pv% +goto bu +) else if [!ay!]==[-build-info] ( +set an=1 +goto bw +) else if [!ay!]==[-tests] ( set /a "ax+=1" & call :bx bk[!ax!] v +set au=!v! +goto bw +) else ( +echo Incorrect key: !ay! +set /a aw=1 +goto bu +) +:bw +set /a "ax+=1" & if %ax% LSS !bl! goto bv +:br +call :bz "dxpName = " ag +call :bz "dxpVersion = " af +call :bz "-sln-dir = " wSlnDir +call :bz "-sln-file = " wSlnFile +call :bz "-metalib = " wMetaLib +call :bz "-metacor = " wMetaCor +call :bz "-dxp-target = " wDxpTarget +call :bz "-wz-target = " ah +call :bz "#opt " wDxpOpt +if defined af ( +if "!af!"=="actual" ( +set "af=" +) +) +set wPkgVer=!af! +if z%wAction%==zUpgrade ( +call :bz "Upgrade is on" +set as=1 +set ar=1 +) +call :b0 ai +set "ai=!ai!\\" +set "az=!ag!" +set "wPkgPath=!ai!!ag!" +if defined af ( +set "az=!az!/!af!" +set "wPkgPath=!wPkgPath!.!af!" +) +if defined ar ( +if exist "!wPkgPath!" ( +call :bz "Removing old version before continue. '-force' key rule. " wPkgPath +rmdir /S/Q "!wPkgPath!" +) +) +set a0="!wPkgPath!\\!ah!" +call :bz "wPkgPath = " wPkgPath +if not exist !a0! ( +if exist "!wPkgPath!" ( +call :bz "Trying to replace obsolete version ... " wPkgPath +rmdir /S/Q "!wPkgPath!" +) +call :bz "-pkg-link = " ap +call :bz "-server = " aj +if defined ap ( +set aj=!ap! +if "!aj::=!"=="!aj!" ( +set aj=!cd!/!aj! +) +if "!wPkgPath::=!"=="!wPkgPath!" ( +set "a1=../" +) +set "az=:!a1!!wPkgPath!|" +) +if defined ao ( +set a2=-msbuild "!ao!" +) +set a3=!a2! /p:ngserver="!aj!" /p:ngpackages="!az!" /p:ngpath="!ai!" /p:proxycfg="!at! " +call :bz "GetNuTool call: " a3 +if defined am ( +call :b1 !a3! +) else ( +call :b1 !a3! >nul +) +) +if defined av ( +call :by -hMSBuild 9 +set /a aw=!ERRORLEVEL! & goto bu +) +if defined aq ( +"!wPkgPath!\\tools\\PeViewer.exe" -list -pemodule "!aq!" +set /a aw=%ERRORLEVEL% +goto bu +) +if defined an ( +call :bz "buildInfo = " wPkgPath ak +if not exist "!wPkgPath!\\!ak!" ( +echo information about build is not available. +set /a aw=2 +goto bu +) +type "!wPkgPath!\\!ak!" +goto bu +) +if not exist !a0! ( +echo Something went wrong. Try to use another keys. +set /a aw=2 +goto bu +) +call :bz "wRootPath = " wRootPath +call :bz "wAction = " wAction +call :bz "wMgrArgs = " wMgrArgs +if defined ao ( +call :bz "Use specific MSBuild tools: " ao +set a4="!ao!" +goto b2 +) +call :b3 bm & set a4="!bm!" +if "!ERRORLEVEL!"=="0" goto b2 +echo MSBuild tools was not found. Try with `-msb` key. +set /a aw=2 +goto bu +:b2 +if not defined a4 ( +echo Something went wrong. Use `-debug` key for details. +set /a aw=2 +goto bu +) +if not defined au ( +if not defined ao if defined wPkgPath ( +set a4="!wPkgPath!\\hMSBuild" +for /f "tokens=*" %%i in ('!a4! -version') do set a5=%%i +call :b4 !a5! bn +call :bz "hMSBuild -v" a5 bn +if !bn! GEQ 230 ( +call :bz "2.3+" +set a4=!a4! -vsw-as "-requiresAny -requires Microsoft.NetCore.Component.SDK Microsoft.Net.Core.Component.SDK -products * -latest -prerelease" +) +) +call :bz "Target: " a4 a0 +call !a4! /nologo /v:m /m:4 !a0! +) +:bu +if defined au ( +echo Running Tests ... "!au!" +call :b3 bo +"!bo!" /nologo /v:m /m:4 "!au!" +exit/B 0 +) +if defined as ( +(copy /B/Y "!wPkgPath!\\DllExport.bat" "!al!" > nul) && ( echo Manager has been updated. & exit/B 0 ) || ( (echo -mgr-up failed:!aw! 1>&2) & exit/B 1 ) +) +exit/B !aw! +:b4 +set a6=%~1 +for /f "tokens=1,2 delims=." %%a in ("!a6!") do ( +set _=%%b & set /a _*=10 & set /a %2=%%a!_! +) +exit/B 0 +:by +set ay=%~1 +set /a a7=%~2 +call :bz "accessing to !ay! ..." +for /L %%p IN (0,1,8181) DO ( +if "!ad:~%%p,%a7%!"=="!ay!" ( +set a8=!ad:~%%p! +set a9=!a8:~%a7%! +if defined av ( +call "!wPkgPath!\\hMSBuild" !a9! +) else ( +call :b1 !a9! +) +exit/B !ERRORLEVEL! +) +) +call :bz "!ay! is corrupted: " ad +exit/B 1 +:b3 +call :bz "Searching from .NET Framework - .NET 4.0, ..." +for %%v in (4.0, 3.5, 2.0) do ( +call :b5 %%v Y & if defined Y ( +set %1=!Y! +exit/B 0 +) +) +call :bz "msb -netfx: not found" +set "%1=" +exit/B 2 +:b5 +call :bz "check %1" +for /F "usebackq tokens=2* skip=2" %%a in ( +`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%1" /v MSBuildToolsPath 2^> nul` +) do if exist %%b ( +set a_=%%~b +call :bz ":msbfound " a_ +call :b6 a_ bp +set %2=!bp! +exit/B 0 +) +set "%2=" +exit/B 0 +:b6 +set %2=!%~1!\MSBuild.exe +exit/B 0 +:bz +if defined am ( +set ba=%1 +set ba=!ba:~0,-1! +set ba=!ba:~1! +echo.[%TIME% ] !ba! !%2! !%3! +) +exit/B 0 +:b0 +call :b7 %1 +call :b8 %1 +exit/B 0 +:b7 +call :b9 %1 "-=1" +exit/B 0 +:b8 +call :b9 %1 "+=1" +exit/B 0 +:b9 +set bb=z!%1!z +if "%~2"=="-=1" (set "bc=1") else (set "bc=") +if defined bc ( +set /a "i=-2" +) else ( +set /a "i=1" +) +:b_ +if "!bb:~%i%,1!"==" " ( +set /a "i%~2" +goto b_ +) +if defined bc set /a "i+=1" +if defined bc ( +set "%1=!bb:~1,%i%!" +) else ( +set "%1=!bb:~%i%,-1!" +) +exit/B 0 +:bs +set "bd=%~1" +set /a ax=-1 +:ca +set /a ax+=1 +set %bd%[!ax!]=%~2 +shift & if not "%~3"=="" goto ca +set /a ax-=1 +set %1=!ax! +exit/B 0 +:bx +set %2=!%1! +exit/B 0 +:b1 +setlocal disableDelayedExpansion +@echo off +:: GetNuTool - Executable version +:: Copyright (c) 2015-2018,2020 Denis Kuzmin [ x-3F@outlook.com ] +:: https://github.com/3F/GetNuTool +set be=gnt.core +set bf="%temp%\%random%%random%%be%" +if "%~1"=="-unpack" goto cb +set bg=%* +if defined __p_call if defined bg set bg=%bg:^^=^% +set bh=%__p_msb% +if defined bh goto cc +if "%~1"=="-msbuild" goto cd +for %%v in (4.0, 14.0, 12.0, 3.5, 2.0) do ( +for /F "usebackq tokens=2* skip=2" %%a in ( +`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath 2^> nul` +) do if exist %%b ( +set bh="%%~b\MSBuild.exe" +goto cc +) +) +echo MSBuild was not found. Try -msbuild "fullpath" args 1>&2 +exit/B 2 +:cd +shift +set bh=%1 +shift +set bi=%bg:!= #__b_ECL## % +setlocal enableDelayedExpansion +set bi=!bi:%%=%%%%! +:ce +for /F "tokens=1* delims==" %%a in ("!bi!") do ( +if "%%~b"=="" ( +call :cf !bi! +exit/B %ERRORLEVEL% +) +set bi=%%a #__b_EQ## %%b +) +goto ce +:cf +shift & shift +set "bg=" +:cg +set bg=!bg! %1 +shift & if not "%~2"=="" goto cg +set bg=!bg: #__b_EQ## ==! +setlocal disableDelayedExpansion +set bg=%bg: #__b_ECL## =!% +:cc +call :ch +call %bh% %bf% /nologo /p:wpath="%cd%/" /v:m /m:4 %bg% +set "bh=" +set bj=%ERRORLEVEL% +del /Q/F %bf% +exit/B %bj% +:cb +set bf="%cd%\%be%" +echo Generating minified version in %bf% ... +:ch +%bf% +set a=PropertyGroup&set b=Condition&set c=ngpackages&set d=Target&set e=DependsOnTargets&set f=TaskCoreDllPath&set g=MSBuildToolsPath&set h=UsingTask&set i=CodeTaskFactory&set j=ParameterGroup&set k=Reference&set l=Include&set m=System&set n=Using&set o=Namespace&set p=IsNullOrEmpty&set q=return&set r=string&set s=delegate&set t=foreach&set u=WriteLine&set v=Combine&set w=Console.WriteLine&set x=Directory&set y=GetNuTool&set z=StringComparison&set _=EXT_NUSPEC +^ + + + ``` + https://github.com/3F/DllExport/pull/148#issuecomment-622115091 + + * NEW: Optional copying of intermediate files + x86+x64 directories into output + for projects that dependent on projects where used DllExport. Issue #144. + + Including sequential referencing through other projects: + https://github.com/3F/DllExport/pull/148#issuecomment-625193408 + + * FIXED: Fixed #140 ... failed to create safe SSL/TLS context. + + * FIXED: Pack of fixes for .net.dllexport.targets. PR #147. + + * Fixed "Cannot modify an evaluated object originating in an imported file". + * Fixed possible duplication in .net.dllexport.targets when configuring. + * Adds removing TargetsFile if not used. + * Fixed possible loss of settings in .targets when configuring. + + * FIXED: Fixed #143 'Microsoft.NET.Sdk' specified could not be found. + + * FIXED: A multiple empty `` in project files during new configuration. + + * CHANGED: Wizard. Dropped support for ssl3 + tls1.0 + tls1.1 + + * CHANGED: Wizard. Simplified notification for stable versions. + + * CHANGED: Manager. Access to hMSBuild tool (packed) via `-hMSBuild` key. + https://github.com/3F/hMSBuild + Since it uses packed version (while GetNuTool is integrated inside), + you need use -dxp-version to control specific version. + + * CHANGED: Updated Cecil 0.11.2 + https://github.com/jbevain/cecil/releases/tag/0.11.2 + + * CHANGED: Updated MvsSln 2.5.2 + https://github.com/3F/MvsSln/releases/tag/2.5.2 + + +[v1.7] 2020.01.31 + + * NEW: .NET Core based projects support. + Issues: #90, #67 + PR: #123 + + * NEW: .NET Standard 1.1 and above targeting support. + + * NEW: Implemented "Single + Double Inf/-Inf token patching" option. + Related Issue #128. + + * NEW: Implemented "Rebase System Object" option for our assembler. + + Helps to avoid possible "Invalid memory access" (JNA/Java). Issue #125. + For C/C++ such as "Unhandled exception at ... (KernelBase)" + + https://twitter.com/GitHub3F/status/1201904821093187585 + Part of PR #123 + + * NEW: Implemented updater for wizard. Issue #109. + + * NEW: Textual export of affected data to diag. + + * CHANGED: Updated CoreCLR 3.1.0 LTS \ IL Assembler 4.700.2. + https://github.com/3F/coreclr/releases/tag/ILAsm.4.700.2 + + Includes an implemented `/REBASE` feature for related issue #125. + + * CHANGED: New installation behavior through official NuGet. + init.ps1 also adds optional copying of package data for our manager. + + Please note: This is not nuget support! + It just replaces known info-form that was in 1.6.x. + + * CHANGED: New wizard layout for 1.7. + + * CHANGED: Local scope when invoking .\DllExport manager in project files. + + * CHANGED: Updated logic for an offline versions + with optional converting to online if needed. + + * CHANGED: Updated MvsSln 2.5.1 + https://github.com/3F/MvsSln/releases/tag/2.5.1 + + * CHANGED: Updated hMSBuild 2.3 + https://github.com/3F/hMSBuild/releases/tag/v2.3 + + * KNOWN: You can finally get another System.Object in modified assembly: + https://github.com/3F/DllExport/issues/90#issuecomment-546637702 + + * NOTE: You need an updated/modern manager to avoid problem + when "Possible incorrect Sdk-based project types": PR #123 + https://github.com/3F/MvsSln/issues/23 + + Use it from official 1.7 release: + https://github.com/3F/DllExport/releases/tag/v1.7 + https://www.nuget.org/packages/DllExport/1.7.0 + + Otherwise you need provide manually msbuild instance + that can process modern Sdk-types due to modern VS/dotnet sdk + dependencies for netcore-based projects. + + For example, through hMSBuild https://github.com/3F/hMSBuild + ``` + DllExport ... -msb hMSBuild + ``` + + * NOTE: For command-line mode, To upgrade configured version to 1.7: + ``` + DllExport -action Upgrade -dxp-version 1.7.0 + ``` + + +[v1.7-RC] 2020.01.27 + + * NOTE: Release Candidate includes all actual fixes from + [ 1.7 beta-1 to beta-4 ] releases. And also adds the following: + + * NEW: Implemented updater for wizard. Issue #109. + + * NEW: Textual export of affected data to diag. + + * CHANGED: Updated logic for an offline versions + with optional converting to online if needed. + + * CHANGED: `.gitattributes` now will be distributed with packages. + Use this to avoid related problems: + `a7, a8, a9 - is not recognized as an internal or external command` + https://github.com/3F/hMSBuild/issues/2 + + +[v1.7-beta4] 2020.01.21 + + * NEW: Allowed .NET Standard 1.1 and above targeting. + + * FIXED: Fixed "Sdk.WindowsDesktop" problem for .NET Core / SDK-based projects. + Details in PR #123. + + * FIXED: Fixed beta3 incorrect layout (Thanks @Genteure, PR #131). + + Related problem with `Inf/-Inf token patching` option: + https://github.com/3F/DllExport/issues/128#issuecomment-566360606 + + * FIXED: DllExport crashing with proxy authentication error. Issue #133. + + * FIXED: Fixed actions for `-mgr-up` key. + Including `-action Upgrade` ( Update + mgr-up + force keys ) + + * FIXED: Fixes possible MSB1006 for proxycfg property. + "MSB1006: Property is not valid. Switch: proxycfg" + + * CHANGED: UI. VS project icons under Visual Studio 2017 Image Library EULA.RTF license. + + * CHANGED: init.ps1 adds optional copying of package data for our manager. + Part of the "new installation behavior through official NuGet." (beta2) + + Please note: This is not nuget support! + It just replaces known info-form that was in 1.6.x. + + * CHANGED: Local scope when invoking .\DllExport manager in project files. + + * CHANGED: Updated GetNuTool 1.8 + https://github.com/3F/GetNuTool/releases/tag/1.8 + + * NOTE: Please don't use beta releases in production! + + * NOTE: Please report about something here: https://github.com/3F/DllExport/issues + + +[v1.6.6] 2020.01.16 + + * NOTE: Please don't forget to test latest 1.7 BETA releases (not for production) + with .NET Core support! + https://github.com/3F/DllExport + + * FIXED: Fixed possible duplication of `PlatformTarget` during setup. + + * FIXED: Fixed error when switching between .sln in UI. Wizard. + + * FIXED: DllExport crashing with proxy authentication error. Issue #133. + + * FIXED: Fixed actions for `-mgr-up` key. + Including `-action Upgrade` ( Update + mgr-up + force keys ) + + * FIXED: Fixes possible MSB1006 for proxycfg property. + "MSB1006: Property is not valid. Switch: proxycfg" + + * CHANGED: Updated MvsSln 2.5 + https://github.com/3F/MvsSln/releases/tag/2.5 + + * CHANGED: Updated Mono Cecil 0.11.1 + https://github.com/jbevain/cecil/releases/tag/0.11.1 + + * CHANGED: Updated GetNuTool 1.8 + https://github.com/3F/GetNuTool/releases/tag/1.8 + + * CHANGED: Updated Conari 1.4 + https://github.com/3F/Conari/releases/tag/1.4 + + +[v1.7-beta3] 2019.12.15 + + * FIXED: Mismatch of the name of the exported function with the specified value. + Issue #129. + + * FIXED: Unchangeable cdecl convention. Part of Issue #129. + + * FIXED: Fixed possible duplication of `DllExportSysObjRebase` during setup. + + * NEW: Implemented "Single + Double Inf/-Inf token patching" option. + Related Issue #128. + + * KNOWN: You can finally get another System.Object in modified assembly: + https://github.com/3F/DllExport/issues/90#issuecomment-546637702 + + * NOTE: Please don't use beta releases in production! + + * NOTE: Please report about something here: https://github.com/3F/DllExport/issues + + +[v1.7-beta2] 2019.12.14 + + * FIXED: Fixed possible "Invalid memory access" (JNA/Java). Issue #125. + For C/C++ such as "Unhandled exception at ... (KernelBase)" + + https://twitter.com/GitHub3F/status/1201904821093187585 + + * FIXED: Fixed 'Failed to resolve assembly...' when .NET Standard. Issue #127. + + * FIXED: Fixed error when switching between .sln in UI. Wizard. + + * FIXED: Fixed possible duplication of `PlatformTarget` during setup. + + * NEW: Implemented "Rebase System Object" option for our assembler. + + * CHANGED: New installation behavior through official NuGet. + + * CHANGED: New wizard layout for 1.7. + + * CHANGED: Updated CoreCLR 3.1.0 RTM \ IL Assembler 4.700.2. + https://github.com/3F/coreclr/releases/tag/ILAsm.4.700.2 + + Includes an implemented `/REBASE` feature for related issue #125. + + * CHANGED: Updated Mono Cecil 0.11.1 + https://github.com/jbevain/cecil/releases/tag/0.11.1 + + * CHANGED: Updated Conari 1.4 + https://github.com/3F/Conari/releases/tag/1.4 + + * KNOWN: Possible syntax error at token 'inf'. Issue #128. + https://github.com/3F/DllExport/issues/128 + + * KNOWN: You can finally get another System.Object in modified assembly: + https://github.com/3F/DllExport/issues/90#issuecomment-546637702 + + * NOTE: Please don't use beta releases in production! + + * NOTE: Please report about something here: https://github.com/3F/DllExport/issues + + +[v1.7-beta] 2019.11.04 + + * NEW: Basic support for the netcore-based projects. + Issues: #90, #67 + PR: #123 + + * CHANGED: Updated CoreCLR 3.0 IL Assembler 4.700.1 + https://github.com/3F/coreclr + + * CHANGED: Updated Mono Cecil 0.11 + + * CHANGED: Updated MvsSln 2.5 + + * NOTE: You also need an updated manager to avoid problem + when "Possible incorrect Sdk-based project types": PR #123 + https://github.com/3F/MvsSln/issues/23 + + Use it from official 1.7-beta release: + https://github.com/3F/DllExport/releases/tag/v1.7-beta + https://www.nuget.org/packages/DllExport/1.7.0-beta + + Otherwise you need provide manually msbuild instance + that can process modern Sdk-types due to modern VS/dotnet sdk + dependencies for netcore-based projects. + + For example, through hMSBuild https://github.com/3F/hMSBuild + ``` + DllExport ... -msb hMSBuild + ``` + + * NOTE: To upgrade configured version to 1.7 beta: + ``` + DllExport -action Upgrade -dxp-version 1.7.0-beta + ``` + + * NOTE: Please don't use beta releases in production! + + * NOTE: Please report about something here: https://github.com/3F/DllExport/issues + + * KNOWN: You can finally get another System.Object in modified assembly: + https://github.com/3F/DllExport/issues/90#issuecomment-546637702 + + +[v1.6.5] 2019.08.10 + + * FIXED: Possible "The format ... of configuration is not supported." + Issue #114. + + * FIXED: XML meta comments for DllExport Metadata. + + * CHANGED: Updated MvsSln 2.4 + Release notes: + https://github.com/3F/MvsSln/releases/tag/v2.4 + + * NOTE: To upgrade configured version to v1.6.5: + ``` + DllExport -action Upgrade -dxp-version 1.6.5 + ``` + +[v1.6.4] 2019.07.04 + + * FIXED: Possible "The process cannot access the file because it is being used by another process" + Issue #106 + + * CHANGED: Updated Mono.Cecil 0.10.4 + https://github.com/jbevain/cecil/commits/0.10.4 + + * CHANGED: Updated MvsSln 2.3 + Release notes: + https://github.com/3F/MvsSln/releases/tag/v2.3 + + * NOTE: To upgrade configured version to v1.6.4: + ``` + DllExport -action Upgrade -dxp-version 1.6.4 + ``` + +[v1.6.3] 2019.05.30 + + * NEW: Support of unicode characters in namespaces. Issue #80 + + * NEW: Integrated `-action Configure` command by default. Issue #96 + Configure everything in one click. + https://github.com/3F/DllExport/wiki/Quick-start + + * CHANGED: Updated Mono.Cecil 0.10.3 + https://github.com/jbevain/cecil/commits/0.10.3 + + * CHANGED: Updated MvsSln 2.2 + Release notes: + https://github.com/3F/MvsSln/releases/tag/v2.2 + + * NOTE: To upgrade configured version to v1.6.3: + ``` + DllExport -action Upgrade -dxp-version 1.6.3 + ``` + +[v1.6.2] 2018.12.27 + + * NEW: Added option 'auto' into panel of platforms as an automatic configuring platform from user settings. + An easy configuring between different configurations, like from BasicExport example: + https://github.com/3F/Examples/tree/master/DllExport/BasicExport + + * FIXED: MSB3073 for paths with `%` and `;`. + * FIXED: Inactive `-packages` key. (broken in 1.6.1) + * FIXED: Problems with relative paths for `-pkg-link`. (incomplete logic from 1.6.0) + * FIXED: Fixed problems with special symbols in path. Related Issue #88. + ``` + ' &!~`@#$^(+)_=%-;[.]{,} + ``` + + * FIXED: Fixes possible Null Exception for empty project collection when applying filter. + * FIXED: Build problem when project is configured from arguments ending with `"` (double quote mark). + For example: `-action Configure -sln-dir "path"` + + * CHANGED: Removed obsolete Configurator (old PowerShell way) from NuGet package. + * CHANGED: Updated hMSBuild 2.0 & GetNuTool 1.7. + Release notes: + * https://github.com/3F/GetNuTool/releases/tag/v1.7 + * https://github.com/3F/hMSBuild/releases/tag/v2.0 + + * NOTE: To upgrade configured version on v1.6.2: + ``` + DllExport -action Upgrade -dxp-version 1.6.2 + ``` + +[v1.6.1] 2018.08.05 + + * FIXED: Fixed bug when some methods cannot be exported. Issue #59. + * FIXED: Bug 'The node is not parented by this object' when Configuring projects. Issue: #77. + * FIXED: Fixed GDI objects leak in Wizard. + * FIXED: `-msb` key cannot affect for GetNuTool section. Issue #74. + * FIXED: Bug when automatic restoring still uses default keys from manager after configuring with custom `-server`. + * FIXED: Problem with double quotes for `-packages` key. + * FIXED: Possible incorrect repetition of the relative path for `-packages` key. + * FIXED: Possible problem 'The request was aborted: Could not create SSL/TLS secure channel.'. Issue: #77. + * FIXED: Possible problem with path when `-msb` key contains round brackets, + e.g.: `D:\C\Program Files (x86)\Microsoft Visual Studio\`... + + * NEW: Implemented features for additional automation. Issue #76. + New actions: + * `-action Export` + * `-action Recover` + * `-action Unset` + + Documentation: https://github.com/3F/DllExport/wiki/DllExport-Manager#automation + + * NEW: Added proxy support for manager. + The common format: `[usr[:pwd]@]host[:port]` + + Documentation: https://github.com/3F/DllExport/wiki/DllExport-Manager#proxy + + * NEW: Wizard. Added sorting an projects in main window by its installing status and by availability. + * NEW: Wizard. Added filter for list of projects in main wizard window. + * NEW: New 'Offline' versions from our packages. See GitHub Releases page. + * NEW: Added key to force update `Reference` without PublicKeyToken. Issue #65. + * NEW: Added `-force` key for manager to use aggressive behavior, e.g. like removing pkg when updating. + Wiki: https://github.com/3F/DllExport/wiki/DllExport-Manager#receiving-new-package-version + + * NEW: New action `-action Upgrade`. + Aggregates an Update action with additions for upgrading. + + Today's an Upgrade action: + ``` + DllExport -action Upgrade ... + ``` + + is equal to: + ``` + DllExport -action Update -mgr-up -force ... + ``` + + Wiki: https://github.com/3F/DllExport/wiki/DllExport-Manager#updating + + * CHANGED: Case sensitivity for the Action names. + * CHANGED: `-action Default` for nothing. + * CHANGED: UI layout fixes for -Info form (Thanks @Genteure, Issue #61). + * CHANGED: Allows absolute path for `-packages` key. + * CHANGED: `-sln-file` key now can affect to `-action Configure` + * CHANGED: hMSBuild tool now is also distributed inside root directory of the packages zip & nupkg. + Use this for EXP0014 problem: "RunIlAsm. The library manager still cannot be found." + Example: https://www.youtube.com/watch?v=zUejJ4vUPGw + + * CHANGED: Updated GetNuTool v1.6.2 + * CHANGED: Updated MvsSln v2.1.0 + * OTHER: Some other fixes and changes with manager and wizard. + * NOTE: To upgrade configured version: `DllExport -action Upgrade ...` + * NOTE: Configuring projects: `DllExport -action Configure ...` + * NOTE: Screencasts: + * Quick start: https://www.youtube.com/watch?v=sBWt-KdQtoc + * Basic examples for C++ and C#: https://www.youtube.com/watch?v=9Hyg3_WE9Ks + * Complex types and Strings: https://www.youtube.com/watch?v=QXMj9-8XJnY + + * NOTE: Our actual wiki - https://github.com/3F/DllExport/wiki + * Documentation for manager: https://github.com/3F/DllExport/wiki/DllExport-Manager + +[v1.6] 2017.12.29 + + * NEW: The new embeddable lightweight manager for distribution via MvsSln & GetNuTool projects. Issue #38. + Based on hMSBuild logic and includes GetNuTool core v1.6.1. + + Now you shouldn't use standard nuget clients anymore: + https://www.youtube.com/watch?v=9bYgywZ9pPE + + Quick start: https://www.youtube.com/watch?v=sBWt-KdQtoc + ============================== + DllExport -action Configure + ============================== + + Package from nuget.org already contains manager, but you can also get it directly. + Latest manager: https://3F.github.io/DllExport/releases/latest/manager/ + ~18 Kb text-based embeddable batch-script that does not require powershell and dotnet-cli. + + Automatic restoring still is available but you can also use: `DllExport -action Restore` + All available features: `DllExport -h` + + Direct links to remote package (without nuget server) via `-pkg-link {uri}` key. Issue #53. + NuGet Server by default: nuget.org. + + * NEW: The new Wizard (configurator via MvsSln). To easy configure your projects in any place. Part of Issue #38. + MvsSln v2.0: https://github.com/3F/MvsSln + + * NEW: Added support of empty/global namespaces - Issue #47. + Use `Direct-Mod` if Cecil will not process this correctly. + + * NEW: Implemented another storage for configuration: '.net.dllexport.targets'. Issue #49. + + * NEW: New settings for configurator (Wizard): + * Path to custom ILAsm. + * Flag to keep intermediate Files (IL Code, Resources, ...). + * Timeout of execution in milliseconds. + + * NEW: Implemented automatic checking existence of a correct exported proc via Conari. Issue #55. + Wizard controls it via `$(DllExportPeCheck)`: + * 0x01 bit - Will check count of all planned exports from final PE32/PE32+ module. + * 0x02 bit - Will check existence of all planned exports (IL code) in actual PE32/PE32+ module. + + * NEW: Implemented PE32/PE32+ Viewer to check manually available exports from final modules. Issue #55. + New key for manager: + ``` + -pe-exp-list {module} - To list all available exports from PE32/PE32+ module. + ``` + + Sample: + ``` + DllExport -pe-exp-list bin\Debug\regXwild.dll + ``` + + * FIXED: Fixed target platform detection. Issue #34. + Details: https://github.com/3F/DllExport/issues/34#issuecomment-306171060 + + * FIXED: Fixed problem when the Post-Build event is triggered before our tool. Issue #35. + Use this if still is needed: + ``` + + ... + + ``` + + * FIXED: Fixed generation of exp + .lib via MS Library Manager for VS2017. Issue #37. + Now it also includes processing through VsDevCmd & VcVarsAll initializer scripts. + Use the folowing msbuild properties to override values by default: + * $(DllExportVcVarsAll); $(DllExportVsDevCmd) + + * FIXED: Fixes possible problem with multiple properties that contains *Undefined* word, + e.g.: *Undefined*\path1;C:\path2 ... + + * CHANGED: Added information about finding lib tool. Issue #44. + + * CHANGED: UI. Selected platform now affects to all configurations of project instead of active as before. + + * CHANGED: Now nuget package does not contain library in `lib/.../` Details in #36. + + * CHANGED: Now we also distribute .zip package for work through our manager etc. + https://github.com/3F/DllExport/releases + + * NOTE: How to avoid EXP0014: RunIlAsm. The library manager still cannot be found. + https://www.youtube.com/watch?v=zUejJ4vUPGw + Related Issue #44 + + * NOTE: Quick start (Configuring, Automatic restoring, Pe-Viewer): + https://www.youtube.com/watch?v=sBWt-KdQtoc + + * NOTE: The latest text-based manager: + https://3F.github.io/DllExport/releases/latest/manager/ + + Other versions you can find from GitHub Releases: + * https://github.com/3F/DllExport/releases + + Or get it from nuget packages starting with v1.6+ + + * NOTE: PE-features via Conari v1.3.0 https://github.com/3F/Conari + + * KNOWN: Bug when - "Build successful but methods are not exported." Issue #59 + For today, anyone else may also try to use https://github.com/3F/Conari to avoid similar @Genteure's problem. + + * DIFF(v1.6-RC): + + * FIXED: Wizard. Fixed incorrect layout for zh_CN Simplified Chinese (Thanks @Genteure). Issue #61 + * FIXED: Fixes automatic restoring the package via msbuild. Issue #62 + + +[v1.6-RC] 2017.11.26 + + * FIXED: Avoids crashes when project cannot be loaded for some reasons. Issue #56 + * FIXED: Fixed usage of manager outside the Solution directory. + * FIXED: Fixed restoring package when using `-pe-exp-list` command. + * NEW: Added `-mgr-up` key. Will update manager to version from '-dxp-version'. + * NOTE: Thanks for your feedback. Now we're ready for release v1.6, soon. + Please check release-candidate as carefully as possible. + + Start with: + ============================== + DllExport -action Configure + ============================== + https://3F.github.io/DllExport/releases/latest/manager/ + https://www.youtube.com/watch?v=okPThdWDZMM&t=46s + + +[v1.6-beta3] 2017.10.27 + + * NEW: Implemented another storage for configuration: '.net.dllexport.targets'. Issue #49. + * NEW: Implemented automatic checking existence of a correct exported proc via Conari. Issue #55. + Wizard controls it via `$(DllExportPeCheck)`: + * 0x01 bit - Will check count of all planned exports from final PE32/PE32+ module. + * 0x02 bit - Will check existence of all planned exports (IL code) in actual PE32/PE32+ module. + + * NEW: Implemented PE32/PE32+ Viewer to check manually available exports from final modules. Issue #55. + New key for manager: + ``` + -pe-exp-list {module} - To list all available exports from PE32/PE32+ module. + ``` + + Sample: + ``` + DllExport -pe-exp-list bin\Debug\regXwild.dll + ``` + + * NEW: Implemented `-pkg-link {uri}` key for DllExport manager. Issue #53. + * NEW: New settings for Wizard: + * Path to custom ILAsm. + * Flag to keep intermediate Files (IL Code, Resources, ...). + * Timeout of execution in milliseconds. + + * CHANGED: Updated MvsSln v2.0. Full changelog: https://github.com/3F/MvsSln/blob/master/changelog.txt + * NOTE: PE-features via Conari v1.3.0 https://github.com/3F/Conari + + +[v1.6-beta2] 2017.08.19 + + * NOTE: This release contains trivial fixes only for our manager because of problems with nuget.org. Issue #38. + Please read all changes in previous beta release and please note again - you shouldn't use standard nuget clients anymore: + https://www.youtube.com/watch?v=okPThdWDZMM + + Test and comment anything about this in Issue #38 if you need. + + * FIXED: Updated GetNuTool v1.6.1 to fix problems with possible incorrect CRC & Compressed size info from nuget.org. + + Changelog here: + https://github.com/3F/GetNuTool/blob/master/changelog.txt + + Related issues: + * https://github.com/3F/GetNuTool/issues/3 + * https://github.com/3F/DllExport/issues/38#issuecomment-322250229 + + * CHANGED: Changed url to get latest manager directly. Please use this if you need: + * https://3F.github.io/DllExport/releases/latest/manager/ + + Other versions you can find from GitHub Releases: + * https://github.com/3F/DllExport/releases + + Or get it from nuget packages starting with v1.6+ + +[v1.6-beta] 2017.08.12 + + * NEW: The new lightweight manager & distribution via MvsSln & GetNuTool projects. Issue #38. + Based on hMSBuild logic and includes GetNuTool core. + + Now you shouldn't use standard nuget clients anymore: + https://www.youtube.com/watch?v=okPThdWDZMM + + Package from nuget.org already contains this, but you can also get it directly. + Latest version: https://raw.githubusercontent.com/3F/DllExport/latest/manager/DllExport.bat + ~18 Kb text-based embeddable batch-scripts that does not require powershell and dotnet-cli. + + To install/uninstall or to reconfigure your projects: `DllExport -action Configure` + To manually restore package: `DllExport -action Restore` + All available features: `DllExport -h` + + Server by default - nuget.org + + * NEW: The new Wizard (configurator via MvsSln). To easy configure your projects in any place. Issue #38. + MvsSln v1.0.1.43422: https://github.com/3F/MvsSln + + * NEW: Added support of global namespaces - Issue #47. + Use `Direct-Mod` if Cecil will not process this correctly. + + * FIXED: Fixed target platform detection. Issue #34. + Details: https://github.com/3F/DllExport/issues/34#issuecomment-306171060 + + * FIXED: Fixed problem when the Post-Build event is triggered before our tool. Issue #35. + Use this if still is needed: + ``` + + ... + + ``` + + * FIXED: Fixed generation of exp + .lib via MS Library Manager for VS2017. Issue #37. + Now it also includes processing through VsDevCmd & VcVarsAll initializer scripts. + Use the folowing msbuild properties to override values by default: + * $(DllExportVcVarsAll); $(DllExportVsDevCmd) + + * FIXED: Fixes possible problem with multiple properties that contains *Undefined* word, + e.g.: *Undefined*\path1;C:\path2 ... + + * CHANGED: Added information about finding lib tool. Issue #44. + * CHANGED: UI. Selected platform now affects to all configurations of project instead of active as before. + * CHANGED: Now, nuget package does not contain library in `lib/.../` Details in #36. + * CHANGED: Now, we also distribute .zip package for work through our manager etc. + https://github.com/3F/DllExport/releases + + The latest text-based manager you can find here: + https://raw.githubusercontent.com/3F/DllExport/latest/manager/DllExport.bat + Illustration here: https://www.youtube.com/watch?v=okPThdWDZMM + + +[v1.5.2] 2017.03.13 + + * FIXED: Failing to compile in VS2017. Issue #29 + `Error The "DllExportAppDomainIsolatedTask" task failed unexpectedly. System.ArgumentException: Requested value 'Version46' was not found.` + + * FIXED: Possible error `Could not load file or assembly Microsoft.Build.Utilities or one of its dependencies.` + * CHANGED: Updated script for loading of the Configurator to avoid problem with old assemblies. Issue #22 + +[v1.5.1] 2016.11.12 + + * FIXED: Error : Invalid Option: /CVRES= Issue #20 + * NOTE: Our coreclr version was compiled with MSVC 14.0. Related Issue #21 + +[v1.5] 2016.11.04 + + * FIXED: Fixed problem with white-space chars in path: `Cannot find path '' because it does not exist ...` + * FIXED: Fixed typo with fullseq (ddNS) - incorrect `0x30 0x30` ~0x007A7-0x007A8 /details in #14 + * FIXED: Possible problem with NullReferenceException when removing package. + * FIXED: Fixed problem with old NS data when we try to install package for project A, then for project B + * NEW: Implemented 'Generate .exp + .lib via MS Library Manager' #9 + GUI Configurator + MSBuild property: `DllExportGenExpLib` + + * NEW: Added support of unmanaged-export for Executable Modules (.exe) #18 + * NEW: Cecil variant for ddNS features /#14, #2 + * NEW: Added our custom IL Assembler as option to fix incorrect 0x13 / 0x11 opcodes. #17 + GUI Configurator + MSBuild property: `DllExportOurILAsm` + It should help for users of Fody projects, etc. + https://github.com/Fody/Fody/issues/271 + + IlAsm 4.5.1 https://github.com/3F/coreclr + based on 4.5.22220.0 / coreclr 1.0.4 + changelog of our coreclr for this release: https://github.com/3F/coreclr/blob/master/changelog.txt + + * CHANGED: Updated scripts of installing/removing package for more correct loading of our assemblies. + +[v1.4] 2016.10.05 + + * FIXED: Fixed bug - `An item with the same key has already been added`. Issue #10 + * FIXED: Bug with Meta library: Incorrect default values. Issue #16 + please note, the __cdecl is the default calling convention for our library + as and for C and C++ programs. + + * FIXED?: Probably fixed bug - `Script errors on package install` Issue #6 + * FIXED?: Probably fixed bug - `non-English system language - syntax error` Issue #7 + * NEW: GUI Configurator with updated ddNS features. + * NEW: Implemented feature 'Export for platform': [ x86 / x64 / x86 + x64 ] Issue #9 + * NEW: Implemented feature 'Base for ordinals'. Issue #11 + There is also alternative to configure this number - MSBuild property: DllExportOrdinalsBase + + * NEW: The one (1) now is used by default as Base for all ordinals. + `Mimic ordinal counter (start from 1 instead of 0)` Issue #8 + + * CHANGED: The ddNS features now as binary cmdlet `NSBin`. Use `nsbin.bat` if needed. + * CHANGED: `Set "Inherited = false" in AttributeUsage for DllExportAttribute`. Issue #15 + * OTHER: other possible changes and fixes. + +[v1.3] 2016.08.21 + + * FIXED: bug 'Incorrect library' when DllExport installed for 2+ projects. + * CHANGED: DllExport now uses `Cdecl` calling convention by default. + * CHANGED: Mono.Cecil v0.9.6.4 + +[v1.2] 2016.07.13 + + * CHANGED: dynamic definition of namespace for user scope. Issue #2 + +[v1.1] 2016.06.29 + + * CHANGED: DllExport now is part of System.Runtime.InteropServices as and DllImport. + * CHANGED: Mono.Cecil v0.9.6.1 + * NEW: 0x80070005 meaning... Issue #1 + * NEW: +DllExport(CallingConvention convention) signature + +[v1.0] 2016.06.25 + + * Initial the open release, based on v1.2.7.38850 + diff --git a/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.dll b/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.dll new file mode 100644 index 0000000..a5391c7 Binary files /dev/null and b/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.dll differ diff --git a/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.dll.ddNSi b/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.dll.ddNSi new file mode 100644 index 0000000..705dc66 Binary files /dev/null and b/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.dll.ddNSi differ diff --git a/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.xml b/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.xml new file mode 100644 index 0000000..2bcc805 --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/gcache/metacor/WakaTime/DllExport.xml @@ -0,0 +1,49 @@ + + + + DllExport + + + + + To export this as __cdecl C-exported function. Named as current method where is used attribute. + [.NET DllExport] + + About our meta-information in user-code: + https://github.com/3F/DllExport/issues/16 + + + + + Specified calling convention. + + __cdecl is the default convention in .NET DllExport like for other C/C++ programs (Microsoft Specific). + __stdCall mostly used with winapi. + + https://msdn.microsoft.com/en-us/library/zkwh89ks.aspx + https://msdn.microsoft.com/en-us/library/56h2zst2.aspx + https://github.com/3F/Conari also uses __cdecl by default + + + + + Optional name for C-exported function. + + + + Optional name for C-exported function. + Specified calling convention. __cdecl is the default convention in .NET DllExport. + + + Optional name for C-exported function. + + + Specified calling convention. __cdecl is the default convention in .NET DllExport. + + + + To export this as __cdecl C-exported function. Named as current method where is used attribute. + + + + diff --git a/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.dll b/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.dll new file mode 100644 index 0000000..5beeb69 Binary files /dev/null and b/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.dll differ diff --git a/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.dll.ddNSi b/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.dll.ddNSi new file mode 100644 index 0000000..705dc66 Binary files /dev/null and b/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.dll.ddNSi differ diff --git a/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.xml b/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.xml new file mode 100644 index 0000000..2bcc805 --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/gcache/metalib/WakaTime/DllExport.xml @@ -0,0 +1,49 @@ + + + + DllExport + + + + + To export this as __cdecl C-exported function. Named as current method where is used attribute. + [.NET DllExport] + + About our meta-information in user-code: + https://github.com/3F/DllExport/issues/16 + + + + + Specified calling convention. + + __cdecl is the default convention in .NET DllExport like for other C/C++ programs (Microsoft Specific). + __stdCall mostly used with winapi. + + https://msdn.microsoft.com/en-us/library/zkwh89ks.aspx + https://msdn.microsoft.com/en-us/library/56h2zst2.aspx + https://github.com/3F/Conari also uses __cdecl by default + + + + + Optional name for C-exported function. + + + + Optional name for C-exported function. + Specified calling convention. __cdecl is the default convention in .NET DllExport. + + + Optional name for C-exported function. + + + Specified calling convention. __cdecl is the default convention in .NET DllExport. + + + + To export this as __cdecl C-exported function. Named as current method where is used attribute. + + + + diff --git a/WakaTime/packages/DllExport.1.7.4/hMSBuild.bat b/WakaTime/packages/DllExport.1.7.4/hMSBuild.bat new file mode 100644 index 0000000..875d5f2 --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/hMSBuild.bat @@ -0,0 +1,522 @@ +@echo off +:: hMSBuild - 2.3.0.31675+78b6c77 +:: Copyright (c) 2017-2020 Denis Kuzmin [ x-3F@outlook.com ] GitHub/3F +:: Copyright (c) the hMSBuild contributors +set "aa=%~dp0" +set ab=%* +if not defined ab setlocal enableDelayedExpansion & goto bt +if not defined __p_call set ab=%ab:^=^^% +set ac=%ab:!= #__b_ECL## % +set ac=%ac:^= #__b_CRT## % +setlocal enableDelayedExpansion +set "ad=^" +set "ac=!ac:%%=%%%%!" +set "ac=!ac:&=%%ad%%&!" +:bt +set "ae=2.8.4" +set af=%temp%\hMSBuild_vswhere +set "ag=" +set "ah=" +set "ai=" +set "aj=" +set "ak=" +set "al=" +set "am=" +set "an=" +set "ao=" +set "ap=" +set "aq=" +set "ar=" +set "as=" +set /a at=0 +if not defined ab goto bu +set ac=!ac:/?=/h! +call :bv bo ac bp +goto bw +:bx +echo. +@echo hMSBuild 2.3.0.31675+78b6c77 +@echo Copyright (c) 2017-2020 Denis Kuzmin [ x-3F@outlook.com ] GitHub/3F +@echo Copyright (c) hMSBuild contributors +echo. +echo Licensed under the MIT License +@echo https://github.com/3F/hMSBuild +echo. +@echo. +@echo Usage: hMSBuild [args to hMSBuild] [args to msbuild.exe or GetNuTool core] +echo ------ +echo. +echo Arguments: +echo ---------- +echo -no-vs - Disable searching from Visual Studio. +echo -no-netfx - Disable searching from .NET Framework. +echo -no-vswhere - Do not search via vswhere. +echo. +echo -vsw-priority {IDs} - Non-strict components preference: C++ etc. +echo Separated by space: https://aka.ms/vs/workloads +echo. +echo -vsw-version {arg} - Specific version of vswhere. Where {arg}: +echo * 2.6.7 ... +echo * Keywords: +echo `latest` - To get latest remote version; +echo `local` - To use only local versions; +echo (.bat;.exe /or from +15.2.26418.1 VS-build) +echo. +echo -no-cache - Do not cache vswhere for this request. +echo -reset-cache - To reset all cached vswhere versions before processing. +echo -notamd64 - To use 32bit version of found msbuild.exe if it's possible. +echo -stable - It will ignore possible beta releases in last attempts. +echo -eng - Try to use english language for all build messages. +echo -GetNuTool {args} - Access to GetNuTool core. https://github.com/3F/GetNuTool +echo -only-path - Only display fullpath to found MSBuild. +echo -force - Aggressive behavior for -vsw-priority, -notamd64, etc. +echo -vsw-as "args..." - Reassign default commands to vswhere if used. +echo -debug - To show additional information from hMSBuild. +echo -version - Display version of hMSBuild. +echo -help - Display this help. Aliases: -help -h +echo. +echo. +echo ------ +echo Flags: +echo ------ +echo __p_call - Tries to eliminate the difference for the call-type invoking %~nx0 +echo. +echo -------- +echo Samples: +echo -------- +echo hMSBuild -notamd64 -vsw-version 2.6.7 "Conari.sln" /t:Rebuild +echo hMSBuild -vsw-version latest "Conari.sln" +echo. +echo hMSBuild -no-vswhere -no-vs -notamd64 "Conari.sln" +echo hMSBuild -no-vs "DllExport.sln" +echo hMSBuild vsSolutionBuildEvent.sln +echo. +echo hMSBuild -GetNuTool -unpack +echo hMSBuild -GetNuTool /p:ngpackages="Conari;regXwild" +echo. +echo hMSBuild -no-vs "DllExport.sln" ^|^| goto by +goto bz +:bw +set "au=" +set /a av=0 +:b0 +set aw=!bo[%av%]! +if [!aw!]==[-help] ( goto bx ) else if [!aw!]==[-h] ( goto bx ) else if [!aw!]==[-?] ( goto bx ) +if [!aw!]==[-nocachevswhere] ( +call :b1 -nocachevswhere -no-cache -reset-cache +set aw=-no-cache +) else if [!aw!]==[-novswhere] ( +call :b1 -novswhere -no-vswhere +set aw=-no-vswhere +) else if [!aw!]==[-novs] ( +call :b1 -novs -no-vs +set aw=-no-vs +) else if [!aw!]==[-nonet] ( +call :b1 -nonet -no-netfx +set aw=-no-netfx +) else if [!aw!]==[-vswhere-version] ( +call :b1 -vswhere-version -vsw-version +set aw=-vsw-version +) +if [!aw!]==[-debug] ( +set am=1 +goto b2 +) else if [!aw!]==[-GetNuTool] ( +call :b3 "accessing to GetNuTool ..." +for /L %%p IN (0,1,8181) DO ( +if "!escg:~%%p,10!"=="-GetNuTool" ( +set ax=!escg:~%%p! +call :b4 !ax:~10! +set /a at=%ERRORLEVEL% +goto bz +) +) +call :b3 "!aw! is corrupted: !escg!" +set /a at=1 +goto bz +) else if [!aw!]==[-no-vswhere] ( +set aj=1 +goto b2 +) else if [!aw!]==[-no-cache] ( +set ak=1 +goto b2 +) else if [!aw!]==[-reset-cache] ( +set al=1 +goto b2 +) else if [!aw!]==[-no-vs] ( +set ah=1 +goto b2 +) else if [!aw!]==[-no-netfx] ( +set ai=1 +goto b2 +) else if [!aw!]==[-notamd64] ( +set ag=1 +goto b2 +) else if [!aw!]==[-only-path] ( +set an=1 +goto b2 +) else if [!aw!]==[-eng] ( +chcp 437 >nul +goto b2 +) else if [!aw!]==[-vsw-version] ( set /a "av+=1" & call :b5 bo[!av!] v +set ae=!v! +call :b3 "selected vswhere version:" v +set ao=1 +goto b2 +) else if [!aw!]==[-version] ( +@echo 2.3.0.31675+78b6c77 +goto bz +) else if [!aw!]==[-vsw-priority] ( set /a "av+=1" & call :b5 bo[!av!] v +set ap=!v! +goto b2 +) else if [!aw!]==[-vsw-as] ( set /a "av+=1" & call :b5 bo[!av!] v +set aq=!v! +goto b2 +) else if [!aw!]==[-stable] ( +set ar=1 +goto b2 +) else if [!aw!]==[-force] ( +set as=1 +goto b2 +) else ( +call :b3 "non-handled key:" bo{%av%} +set au=!au! !bo{%av%}! +) +:b2 +set /a "av+=1" & if %av% LSS !bp! goto b0 +:bu +if defined al ( +call :b3 "resetting vswhere cache" +rmdir /S/Q "%af%" 2>nul +) +if not defined aj if not defined ah ( +call :b6 bq +if defined bq goto b7 +) +if not defined ah ( +call :b8 bq +if defined bq goto b7 +) +if not defined ai ( +call :b9 bq +if defined bq goto b7 +) +echo MSBuild tools was not found. Use `-debug` key for details. +set /a at=2 +goto bz +:b7 +if defined an ( +echo !bq! +goto bz +) +set ay="!bq!" +echo hMSBuild: !ay! +if not defined au goto b_ +set au=%au: #__b_CRT## =^% +set au=%au: #__b_ECL## =^!% +set au=!au: #__b_EQ## ==! +:b_ +call :b3 "Arguments: " au +!ay! !au! +set /a at=%ERRORLEVEL% +goto bz +:bz +exit/B !at! +:b6 +call :b3 "trying via vswhere..." +if defined ao if not "!ae!"=="local" ( +call :ca a5 az +call :cb a5 br az +set %1=!br! +exit/B 0 +) +call :cc a5 +set "az=" +if not defined a5 ( +if "!ae!"=="local" ( +set "%1=" & exit/B 2 +) +call :ca a5 az +) +call :cb a5 br az +set %1=!br! +exit/B 0 +:cc +set a0=!aa!vswhere +call :cd a0 bs +if defined bs set "%1=!a0!" & exit/B 0 +set a1=Microsoft Visual Studio\Installer +if exist "%ProgramFiles(x86)%\!a1!" set "%1=%ProgramFiles(x86)%\!a1!\vswhere" & exit/B 0 +if exist "%ProgramFiles%\!a1!" set "%1=%ProgramFiles%\!a1!\vswhere" & exit/B 0 +call :b3 "local vswhere is not found." +set "%1=" +exit/B 3 +:ca +if defined ak ( +set a2=!af!\_mta\%random%%random%vswhere +) else ( +set a2=!af! +if defined ae ( +set a2=!a2!\!ae! +) +) +call :b3 "tvswhere: " a2 +if "!ae!"=="latest" ( +set a3=vswhere +) else ( +set a3=vswhere/!ae! +) +set a4=/p:ngpackages="!a3!:vswhere" /p:ngpath="!a2!" +call :b3 "GetNuTool call: " a4 +setlocal +set __p_call=1 +if defined am ( +call :b4 !a4! +) else ( +call :b4 !a4! >nul +) +endlocal +set "%1=!a2!\vswhere\tools\vswhere" +set "%2=!a2!" +exit/B 0 +:cb +set "a5=!%1!" +set "a6=!%3!" +call :cd a5 a5 +if not defined a5 ( +call :b3 "vswhere tool does not exist" +set "%2=" & exit/B 1 +) +call :b3 "vswbin: " a5 +set "a7=" +set "a8=" +set a9=!ap! +if not defined aq set aq=-products * -latest +call :b3 "assign command: " aq +:ce +call :b3 "attempts with filter: " a9 a7 +set "a_=" & set "ba=" +for /F "usebackq tokens=1* delims=: " %%a in (`"!a5!" -nologo !a7! -requires !a9! Microsoft.Component.MSBuild !aq!`) do ( +if /I "%%~a"=="installationPath" set a_=%%~b +if /I "%%~a"=="installationVersion" set ba=%%~b +if defined a_ if defined ba ( +call :cf a_ ba a8 +if defined a8 goto cg +set "a_=" & set "ba=" +) +) +if not defined ar if not defined a7 ( +set a7=-prerelease +goto ce +) +if defined a9 ( +set bb=Tools was not found for: !a9! +if defined as ( +call :b3 "Ignored via -force. !bb!" +set "a8=" & goto cg +) +call :ch "!bb!" +set "a9=" & set "a7=" +goto ce +) +:cg +if defined a6 if defined ak ( +call :b3 "reset vswhere " a6 +rmdir /S/Q "!a6!" +) +set %2=!a8! +exit/B 0 +:cf +set a_=!%1! +set ba=!%2! +call :b3 "vspath: " a_ +call :b3 "vsver: " ba +if not defined ba ( +call :b3 "nothing to see via vswhere" +set "%3=" & exit/B 3 +) +for /F "tokens=1,2 delims=." %%a in ("!ba!") do ( +set ba=%%~a.0 +) +if !ba! geq 16 set ba=Current +if not exist "!a_!\MSBuild\!ba!\Bin" set "%3=" & exit/B 3 +set bc=!a_!\MSBuild\!ba!\Bin +call :b3 "found path via vswhere: " bc +if exist "!bc!\amd64" ( +call :b3 "found /amd64" +set bc=!bc!\amd64 +) +call :ci bc bc +set %3=!bc! +exit/B 0 +:b8 +call :b3 "Searching from Visual Studio - 2015, 2013, ..." +for %%v in (14.0, 12.0) do ( +call :cj %%v Y & if defined Y ( +set %1=!Y! +exit/B 0 +) +) +call :b3 "-vs: not found" +set "%1=" +exit/B 0 +:b9 +call :b3 "Searching from .NET Framework - .NET 4.0, ..." +for %%v in (4.0, 3.5, 2.0) do ( +call :cj %%v Y & if defined Y ( +set %1=!Y! +exit/B 0 +) +) +call :b3 "-netfx: not found" +set "%1=" +exit/B 0 +:cj +call :b3 "check %1" +for /F "usebackq tokens=2* skip=2" %%a in ( +`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%1" /v MSBuildToolsPath 2^> nul` +) do if exist %%b ( +set bc=%%~b +call :b3 ":msbfound " bc +call :ci bc br +set %2=!br! +exit/B 0 +) +set "%2=" +exit/B 0 +:ci +set bc=!%~1!\MSBuild.exe +set %2=!bc! +if not defined ag ( +exit/B 0 +) +set bd=!bc:Framework64=Framework! +set bd=!bd:\amd64=! +if exist "!bd!" ( +call :b3 "Return 32bit version because of -notamd64 key." +set %2=!bd! +exit/B 0 +) +if defined as ( +call :b3 "Ignored via -force. Only 64bit version was found for -notamd64" +set "%2=" & exit/B 0 +) +call :ch "Return 64bit version. Found only this." +exit/B 0 +:cd +call :b3 "bat/exe: " %1 +if exist "!%1!.bat" set %2="!%1!.bat" & exit/B 0 +if exist "!%1!.exe" set %2="!%1!.exe" & exit/B 0 +set "%2=" +exit/B 0 +:b1 +call :ch "'%~1' is obsolete. Use alternative: %~2 %~3" +exit/B 0 +:ch +echo [*] WARN: %~1 +exit/B 0 +:b3 +if defined am ( +set be=%1 +set be=!be:~0,-1! +set be=!be:~1! +echo.[%TIME% ] !be! !%2! !%3! +) +exit/B 0 +:bv +set bf=!%2! +:ck +for /F "tokens=1* delims==" %%a in ("!bf!") do ( +if "%%~b"=="" ( +call :cl %1 !bf! %3 +exit/B 0 +) +set bf=%%a #__b_EQ## %%b +) +goto ck +:cl +set "bg=%~1" +set /a av=-1 +:cm +set /a av+=1 +set %bg%[!av!]=%~2 +set %bg%{!av!}=%2 +shift & if not "%~3"=="" goto cm +set /a av-=1 +set %1=!av! +exit/B 0 +:b5 +set bh=!%1! +set "bh=%bh: #__b_CRT## =^%" +set "bh=%bh: #__b_ECL## =^!%" +set bh=!bh: #__b_EQ## ==! +set %2=!bh! +exit/B 0 +:b4 +setlocal disableDelayedExpansion +@echo off +:: GetNuTool - Executable version +:: Copyright (c) 2015-2018,2020 Denis Kuzmin [ x-3F@outlook.com ] +:: https://github.com/3F/GetNuTool +set bi=gnt.core +set bj="%temp%\%random%%random%%bi%" +if "%~1"=="-unpack" goto cn +set bk=%* +if defined __p_call if defined bk set bk=%bk:^^=^% +set bl=%__p_msb% +if defined bl goto co +if "%~1"=="-msbuild" goto cp +for %%v in (4.0, 14.0, 12.0, 3.5, 2.0) do ( +for /F "usebackq tokens=2* skip=2" %%a in ( +`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\%%v" /v MSBuildToolsPath 2^> nul` +) do if exist %%b ( +set bl="%%~b\MSBuild.exe" +goto co +) +) +echo MSBuild was not found. Try -msbuild "fullpath" args 1>&2 +exit/B 2 +:cp +shift +set bl=%1 +shift +set bm=%bk:!= #__b_ECL## % +setlocal enableDelayedExpansion +set bm=!bm:%%=%%%%! +:cq +for /F "tokens=1* delims==" %%a in ("!bm!") do ( +if "%%~b"=="" ( +call :cr !bm! +exit/B %ERRORLEVEL% +) +set bm=%%a #__b_EQ## %%b +) +goto cq +:cr +shift & shift +set "bk=" +:cs +set bk=!bk! %1 +shift & if not "%~2"=="" goto cs +set bk=!bk: #__b_EQ## ==! +setlocal disableDelayedExpansion +set bk=%bk: #__b_ECL## =!% +:co +call :ct +call %bl% %bj% /nologo /p:wpath="%cd%/" /v:m /m:4 %bk% +set "bl=" +set bn=%ERRORLEVEL% +del /Q/F %bj% +exit/B %bn% +:cn +set bj="%cd%\%bi%" +echo Generating minified version in %bj% ... +:ct +%bj% +set a=PropertyGroup&set b=Condition&set c=ngpackages&set d=Target&set e=DependsOnTargets&set f=TaskCoreDllPath&set g=MSBuildToolsPath&set h=UsingTask&set i=CodeTaskFactory&set j=ParameterGroup&set k=Reference&set l=Include&set m=System&set n=Using&set o=Namespace&set p=IsNullOrEmpty&set q=return&set r=string&set s=delegate&set t=foreach&set u=WriteLine&set v=Combine&set w=Console.WriteLine&set x=Directory&set y=GetNuTool&set z=StringComparison&set _=EXT_NUSPEC +^ + + + + true + + + + + + tools\raw\lib\net20\DllExport.dll + tools\raw\lib\netstd\DllExport.dll + tools\net.r_eg.DllExport.targets + Restore + + + + + + + + + + + Default + + + + 0 + + + + + -1 + + + + + + true + + + + + + \ No newline at end of file diff --git a/WakaTime/packages/DllExport.1.7.4/tools/net.r_eg.DllExport.targets b/WakaTime/packages/DllExport.1.7.4/tools/net.r_eg.DllExport.targets new file mode 100644 index 0000000..258fb4f --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/tools/net.r_eg.DllExport.targets @@ -0,0 +1,121 @@ + + + + + + true + + + + metacor + metalib + + + + + true + $(DllExportDirMetaCore) + $(DllExportDirMetaFX) + gcache\$(DllExportMetaXBase)\$(DllExportNamespace)\ + + + + $(MSBuildThisFileDirectory)..\ + $(VsInstallRoot)\ + $(DevEnvDir)\..\..\ + $(DllExportVSRoot)Common7\IDE\ + + metalib + gcache\$(DllExportMetaXBase)\$(DllExportNamespace)\ + tools\ + + + $(DllExportRootPkg)$(DllExportLibPath) + DllExportAttribute + DllExport.dll + $(DllExportLibFullPath)$(DllExportMetaLibName) + $(DllExportRootPkg)$(DllExportToolsPath)coreclr\ + + + $(DllExportNamespace).$(DllExportMetaLibAttr) + $(DllExportMetaLibAttr) + + $(PlatformTarget) + AnyCPU + + + + + $(DllExportDefPlatform) + $(CpuType) + $(DebugSymbols) + false + 45000 + $(KeyContainerName)$(AssemblyKeyContainerName) + $(KeyOriginatorFile) + $(MSBuildProjectDirectory) + $(TargetPath) + $(DllExportILAsmCustomPath);$(TargetedFrameworkDir);$(TargetFrameworkDirectory) + $(DllExportVSRoot)VC\bin + $(DllExportVSBin) + $(TargetFrameworkVersion) + $(DllExportILAsmCustomPath);$(TargetFrameworkSDKToolsDirectory) + $(NoDllExportsForAnyCpu) + true + false + false + 1 + false + + $(DllExportVSRoot)Common7\Tools\VsDevCmd.bat + $(DllExportVSRoot)VC\vcvarsall.bat;$(DllExportVSRoot)VC\Auxiliary\Build\vcvarsall.bat + + + + + + + + true + + + + + + + + true + $(DllExportDirMetaCore) + $(DllExportDirMetaFX) + gcache\$(DllExportMetaXBase)\$(DllExportNamespace)\ + + + + \ No newline at end of file diff --git a/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/net20/DllExport.dll b/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/net20/DllExport.dll new file mode 100644 index 0000000..8c2c090 Binary files /dev/null and b/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/net20/DllExport.dll differ diff --git a/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/net20/DllExport.xml b/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/net20/DllExport.xml new file mode 100644 index 0000000..6161313 --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/net20/DllExport.xml @@ -0,0 +1,49 @@ + + + + DllExport + + + + + To export this as __cdecl C-exported function. Named as current method where is used attribute. + [.NET DllExport] + + About our meta-information in user-code: + https://github.com/3F/DllExport/issues/16 + + + + + Specified calling convention. + + __cdecl is the default convention in .NET DllExport like for other C/C++ programs (Microsoft Specific). + __stdCall mostly used with winapi. + + https://msdn.microsoft.com/en-us/library/zkwh89ks.aspx + https://msdn.microsoft.com/en-us/library/56h2zst2.aspx + https://github.com/3F/Conari also uses __cdecl by default + + + + + Optional name for C-exported function. + + + + Optional name for C-exported function. + Specified calling convention. __cdecl is the default convention in .NET DllExport. + + + Optional name for C-exported function. + + + Specified calling convention. __cdecl is the default convention in .NET DllExport. + + + + To export this as __cdecl C-exported function. Named as current method where is used attribute. + + + + diff --git a/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/netstd/DllExport.dll b/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/netstd/DllExport.dll new file mode 100644 index 0000000..47e95a6 Binary files /dev/null and b/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/netstd/DllExport.dll differ diff --git a/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/netstd/DllExport.xml b/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/netstd/DllExport.xml new file mode 100644 index 0000000..6161313 --- /dev/null +++ b/WakaTime/packages/DllExport.1.7.4/tools/raw/lib/netstd/DllExport.xml @@ -0,0 +1,49 @@ + + + + DllExport + + + + + To export this as __cdecl C-exported function. Named as current method where is used attribute. + [.NET DllExport] + + About our meta-information in user-code: + https://github.com/3F/DllExport/issues/16 + + + + + Specified calling convention. + + __cdecl is the default convention in .NET DllExport like for other C/C++ programs (Microsoft Specific). + __stdCall mostly used with winapi. + + https://msdn.microsoft.com/en-us/library/zkwh89ks.aspx + https://msdn.microsoft.com/en-us/library/56h2zst2.aspx + https://github.com/3F/Conari also uses __cdecl by default + + + + + Optional name for C-exported function. + + + + Optional name for C-exported function. + Specified calling convention. __cdecl is the default convention in .NET DllExport. + + + Optional name for C-exported function. + + + Specified calling convention. __cdecl is the default convention in .NET DllExport. + + + + To export this as __cdecl C-exported function. Named as current method where is used attribute. + + + + diff --git a/appveyor.yml b/appveyor.yml index 5ae7c34..65a3f86 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,11 +1,9 @@ -version: 4.2.3.{build} -image: Visual Studio 2017 - +version: 5.0.0.{build} +image: Visual Studio 2022 platform: - x64 - x86 - - Any CPU configuration: - Release @@ -13,7 +11,6 @@ configuration: install: - if "%platform%"=="x64" set archi=amd64 - - if "%platform%"=="Any CPU" set archi=x86 - if "%platform%"=="x86" set archi=x86 before_build: @@ -26,7 +23,6 @@ build_script: after_build: - cd "%APPVEYOR_BUILD_FOLDER%" - ps: >- - if ($env:CONFIGURATION -eq "Release") { Push-AppveyorArtifact "WakaTime\bin\$env:PLATFORM\$env:CONFIGURATION\WakaTime.dll" -FileName WakaTime.dll }