├── Colors ├── Blue.json ├── Classic.json ├── Default.json ├── Monokai.json ├── Ocean.json ├── Purple.json ├── Twilight.json └── Visual Studio [TM].json ├── Demos ├── AlphaSkins │ ├── EditBone_Icon.ico │ ├── Forms │ │ ├── TBCEditorDemo.Forms.Main.dfm │ │ └── TBCEditorDemo.Forms.Main.pas │ ├── TBCEditorDemo.dpr │ ├── TBCEditorDemo.dproj │ ├── TBCEditorDemo.res │ └── readme.txt └── Simple │ ├── Colors │ ├── Blue.json │ ├── Classic.json │ ├── Default.json │ ├── Monokai.json │ ├── Ocean.json │ ├── Purple.json │ ├── Twilight.json │ └── Visual Studio [TM].json │ ├── Forms │ ├── TBCEditorDemo.Forms.Main.dcu │ ├── TBCEditorDemo.Forms.Main.dfm │ └── TBCEditorDemo.Forms.Main.pas │ ├── Highlighters │ ├── ASP.json │ ├── AWK.json │ ├── ActionScript.json │ ├── Assembler - 68HC11.json │ ├── AutoIt v3.json │ ├── C#.json │ ├── C++.json │ ├── C.json │ ├── CSS.json │ ├── CoffeeScript.json │ ├── D.json │ ├── Delphi Form Module.json │ ├── Free Pascal.json │ ├── GLSL.json │ ├── Go.json │ ├── Groovy.json │ ├── HTML with Scripts.json │ ├── INI.json │ ├── Inno Setup.json │ ├── JSON.json │ ├── Java.json │ ├── JavaScript.json │ ├── LaTex.json │ ├── Lisp.json │ ├── Lua.json │ ├── MATLAB.json │ ├── MIME.json │ ├── MS-DOS Batch.json │ ├── OCaml.json │ ├── Object Pascal.json │ ├── Objective-C.json │ ├── PHP.json │ ├── Perl.json │ ├── PowerShell.json │ ├── Python.json │ ├── Ruby.json │ ├── Rust.json │ ├── SQL - Firebird.json │ ├── SQL - Oracle.json │ ├── SQL - PostgreSQL.json │ ├── SQL - SQLite.json │ ├── SQL - Standard.json │ ├── SQL - Sybase.json │ ├── Scala.json │ ├── Swift.json │ ├── TclTk.json │ ├── Text.json │ ├── TypeScript.json │ ├── UnrealScript.json │ ├── Visual Basic.json │ ├── XML.json │ ├── XSL.json │ └── readme.txt │ ├── TBCEditorDemo.dpr │ ├── TBCEditorDemo.dproj │ ├── TBCEditorDemo.res │ └── readme.txt ├── Highlighters ├── ASP.json ├── AWK.json ├── ActionScript.json ├── Assembler - 68HC11.json ├── AutoIt v3.json ├── C#.json ├── C++.json ├── C.json ├── CSS.json ├── CoffeeScript.json ├── D.json ├── Delphi Form Module.json ├── Free Pascal.json ├── GLSL.json ├── Go.json ├── Groovy.json ├── HTML with Scripts.json ├── INI.json ├── Inno Setup.json ├── JSON.json ├── Java.json ├── JavaScript.json ├── LaTex.json ├── Lisp.json ├── Lua.json ├── MATLAB.json ├── MIME.json ├── MS-DOS Batch.json ├── Markdown.json ├── OCaml.json ├── Object Pascal.json ├── Objective-C.json ├── PHP.json ├── Perl.json ├── PowerShell.json ├── Python.json ├── Ruby.json ├── Rust.json ├── SQL - Firebird.json ├── SQL - Oracle.json ├── SQL - PostgreSQL.json ├── SQL - SQLite.json ├── SQL - Standard.json ├── SQL - Sybase.json ├── Scala.json ├── Swift.json ├── TclTk.json ├── Text.json ├── TypeScript.json ├── UnrealScript.json ├── Visual Basic.json ├── XML.json ├── XSL.json └── readme.txt ├── LICENSE.md ├── Packages ├── BCEditor.CBuilder.Berlin.Designtime.cbproj ├── BCEditor.CBuilder.Berlin.Designtime.cpp ├── BCEditor.CBuilder.Berlin.Designtime.res ├── BCEditor.CBuilder.Berlin.Runtime.cbproj ├── BCEditor.CBuilder.Berlin.Runtime.cpp ├── BCEditor.CBuilder.Berlin.Runtime.res ├── BCEditor.CBuilder.Berlin.groupproj ├── BCEditor.CBuilder.Seattle.Designtime.cbproj ├── BCEditor.CBuilder.Seattle.Designtime.cpp ├── BCEditor.CBuilder.Seattle.Designtime.res ├── BCEditor.CBuilder.Seattle.Runtime.cbproj ├── BCEditor.CBuilder.Seattle.Runtime.cpp ├── BCEditor.CBuilder.Seattle.Runtime.res ├── BCEditor.CBuilder.Seattle.groupproj ├── BCEditor.CBuilder.XE7.Designtime.cbproj ├── BCEditor.CBuilder.XE7.Designtime.cpp ├── BCEditor.CBuilder.XE7.Designtime.res ├── BCEditor.CBuilder.XE7.Runtime.cbproj ├── BCEditor.CBuilder.XE7.Runtime.cpp ├── BCEditor.CBuilder.XE7.Runtime.res ├── BCEditor.CBuilder.XE7.groupproj ├── BCEditor.CBuilder.XE8.Designtime.cbproj ├── BCEditor.CBuilder.XE8.Designtime.cpp ├── BCEditor.CBuilder.XE8.Runtime.cbproj ├── BCEditor.CBuilder.XE8.Runtime.cpp ├── BCEditor.CBuilder.XE8.groupproj ├── BCEditor.Delphi.Berlin.Designtime.dpk ├── BCEditor.Delphi.Berlin.Designtime.dproj ├── BCEditor.Delphi.Berlin.Designtime.res ├── BCEditor.Delphi.Berlin.Runtime.dpk ├── BCEditor.Delphi.Berlin.Runtime.dproj ├── BCEditor.Delphi.Berlin.Runtime.res ├── BCEditor.Delphi.Berlin.groupproj ├── BCEditor.Delphi.Seattle.Designtime.dpk ├── BCEditor.Delphi.Seattle.Designtime.dproj ├── BCEditor.Delphi.Seattle.Designtime.res ├── BCEditor.Delphi.Seattle.Runtime.dpk ├── BCEditor.Delphi.Seattle.Runtime.dproj ├── BCEditor.Delphi.Seattle.Runtime.res ├── BCEditor.Delphi.Seattle.groupproj ├── BCEditor.Delphi.XE4.Designtime.dpk ├── BCEditor.Delphi.XE4.Designtime.dproj ├── BCEditor.Delphi.XE4.Designtime.res ├── BCEditor.Delphi.XE4.Runtime.dpk ├── BCEditor.Delphi.XE4.Runtime.dproj ├── BCEditor.Delphi.XE4.Runtime.res ├── BCEditor.Delphi.XE4.groupproj ├── BCEditor.Delphi.XE5.Designtime.dpk ├── BCEditor.Delphi.XE5.Designtime.dproj ├── BCEditor.Delphi.XE5.Designtime.res ├── BCEditor.Delphi.XE5.Runtime.dpk ├── BCEditor.Delphi.XE5.Runtime.dproj ├── BCEditor.Delphi.XE5.Runtime.res ├── BCEditor.Delphi.XE5.groupproj ├── BCEditor.Delphi.XE6.Designtime.dpk ├── BCEditor.Delphi.XE6.Designtime.dproj ├── BCEditor.Delphi.XE6.Designtime.res ├── BCEditor.Delphi.XE6.Runtime.dpk ├── BCEditor.Delphi.XE6.Runtime.dproj ├── BCEditor.Delphi.XE6.Runtime.res ├── BCEditor.Delphi.XE6.groupproj ├── BCEditor.Delphi.XE7.Designtime.dpk ├── BCEditor.Delphi.XE7.Designtime.dproj ├── BCEditor.Delphi.XE7.Designtime.res ├── BCEditor.Delphi.XE7.Runtime.dpk ├── BCEditor.Delphi.XE7.Runtime.dproj ├── BCEditor.Delphi.XE7.Runtime.res ├── BCEditor.Delphi.XE7.groupproj ├── BCEditor.Delphi.XE8.Designtime.dpk ├── BCEditor.Delphi.XE8.Designtime.dproj ├── BCEditor.Delphi.XE8.Designtime.res ├── BCEditor.Delphi.XE8.Runtime.dpk ├── BCEditor.Delphi.XE8.Runtime.dproj ├── BCEditor.Delphi.XE8.Runtime.res └── BCEditor.Delphi.XE8.groupproj ├── README.md └── Source ├── BCEditor.Consts.pas ├── BCEditor.Editor.ActiveLine.pas ├── BCEditor.Editor.Base.pas ├── BCEditor.Editor.Caret.MultiEdit.Colors.pas ├── BCEditor.Editor.Caret.MultiEdit.pas ├── BCEditor.Editor.Caret.NonBlinking.Colors.pas ├── BCEditor.Editor.Caret.NonBlinking.pas ├── BCEditor.Editor.Caret.Offsets.pas ├── BCEditor.Editor.Caret.Styles.pas ├── BCEditor.Editor.Caret.pas ├── BCEditor.Editor.CodeFolding.Colors.pas ├── BCEditor.Editor.CodeFolding.Hint.Colors.pas ├── BCEditor.Editor.CodeFolding.Hint.Form.pas ├── BCEditor.Editor.CodeFolding.Hint.Indicator.Colors.pas ├── BCEditor.Editor.CodeFolding.Hint.Indicator.pas ├── BCEditor.Editor.CodeFolding.Hint.pas ├── BCEditor.Editor.CodeFolding.Ranges.pas ├── BCEditor.Editor.CodeFolding.Regions.pas ├── BCEditor.Editor.CodeFolding.pas ├── BCEditor.Editor.CompletionProposal.Colors.pas ├── BCEditor.Editor.CompletionProposal.Columns.Items.pas ├── BCEditor.Editor.CompletionProposal.Columns.Title.Colors.pas ├── BCEditor.Editor.CompletionProposal.Columns.Title.pas ├── BCEditor.Editor.CompletionProposal.Columns.pas ├── BCEditor.Editor.CompletionProposal.PopupWindow.pas ├── BCEditor.Editor.CompletionProposal.Trigger.pas ├── BCEditor.Editor.CompletionProposal.pas ├── BCEditor.Editor.DB.pas ├── BCEditor.Editor.Directories.pas ├── BCEditor.Editor.Glyph.pas ├── BCEditor.Editor.InternalImage.pas ├── BCEditor.Editor.KeyCommands.pas ├── BCEditor.Editor.LeftMargin.Bookmarks.pas ├── BCEditor.Editor.LeftMargin.Border.pas ├── BCEditor.Editor.LeftMargin.Colors.pas ├── BCEditor.Editor.LeftMargin.LineNumbers.pas ├── BCEditor.Editor.LeftMargin.LineState.pas ├── BCEditor.Editor.LeftMargin.Marks.pas ├── BCEditor.Editor.LeftMargin.MarksPanel.pas ├── BCEditor.Editor.LeftMargin.pas ├── BCEditor.Editor.Marks.pas ├── BCEditor.Editor.MatchingPair.Colors.pas ├── BCEditor.Editor.MatchingPair.pas ├── BCEditor.Editor.Minimap.Colors.pas ├── BCEditor.Editor.Minimap.Indicator.pas ├── BCEditor.Editor.Minimap.Shadow.pas ├── BCEditor.Editor.Minimap.pas ├── BCEditor.Editor.PopupWindow.pas ├── BCEditor.Editor.Replace.pas ├── BCEditor.Editor.RightMargin.Colors.pas ├── BCEditor.Editor.RightMargin.pas ├── BCEditor.Editor.Scroll.Hint.pas ├── BCEditor.Editor.Scroll.Shadow.pas ├── BCEditor.Editor.Scroll.pas ├── BCEditor.Editor.Search.Highlighter.Colors.pas ├── BCEditor.Editor.Search.Highlighter.pas ├── BCEditor.Editor.Search.InSelection.pas ├── BCEditor.Editor.Search.Map.Colors.pas ├── BCEditor.Editor.Search.Map.pas ├── BCEditor.Editor.Search.pas ├── BCEditor.Editor.Selection.Colors.pas ├── BCEditor.Editor.Selection.pas ├── BCEditor.Editor.SkipRegions.pas ├── BCEditor.Editor.SpecialChars.EndOfLine.pas ├── BCEditor.Editor.SpecialChars.Selection.pas ├── BCEditor.Editor.SpecialChars.pas ├── BCEditor.Editor.SyncEdit.Colors.pas ├── BCEditor.Editor.SyncEdit.pas ├── BCEditor.Editor.Tabs.pas ├── BCEditor.Editor.TokenInfo.Colors.pas ├── BCEditor.Editor.TokenInfo.PopupWindow.pas ├── BCEditor.Editor.TokenInfo.Title.Colors.pas ├── BCEditor.Editor.TokenInfo.Title.pas ├── BCEditor.Editor.TokenInfo.pas ├── BCEditor.Editor.Undo.Item.pas ├── BCEditor.Editor.Undo.List.pas ├── BCEditor.Editor.Undo.pas ├── BCEditor.Editor.UnknownChars.pas ├── BCEditor.Editor.Utils.pas ├── BCEditor.Editor.WordWrap.Colors.pas ├── BCEditor.Editor.WordWrap.pas ├── BCEditor.Editor.pas ├── BCEditor.Encoding.pas ├── BCEditor.Export.HTML.pas ├── BCEditor.Highlighter.Attributes.pas ├── BCEditor.Highlighter.Colors.pas ├── BCEditor.Highlighter.Comments.pas ├── BCEditor.Highlighter.Import.JSON.pas ├── BCEditor.Highlighter.Info.pas ├── BCEditor.Highlighter.Rules.pas ├── BCEditor.Highlighter.Token.pas ├── BCEditor.Highlighter.pas ├── BCEditor.JsonDataObjects.pas ├── BCEditor.KeyboardHandler.pas ├── BCEditor.Language.pas ├── BCEditor.Lines.pas ├── BCEditor.MacroRecorder.pas ├── BCEditor.PaintHelper.pas ├── BCEditor.Print.HeaderFooter.pas ├── BCEditor.Print.Margins.pas ├── BCEditor.Print.Preview.pas ├── BCEditor.Print.PrinterInfo.pas ├── BCEditor.Print.Types.pas ├── BCEditor.Print.pas ├── BCEditor.Register.dcr ├── BCEditor.Register.pas ├── BCEditor.RegisterProperty.pas ├── BCEditor.Search.Normal.pas ├── BCEditor.Search.RegularExpressions.pas ├── BCEditor.Search.Wildcard.pas ├── BCEditor.Search.pas ├── BCEditor.StyleHooks.pas ├── BCEditor.Types.pas ├── BCEditor.Utils.pas ├── BCEditor.res └── Languages └── Russian └── BCEditor.Language.pas /Demos/AlphaSkins/EditBone_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/AlphaSkins/EditBone_Icon.ico -------------------------------------------------------------------------------- /Demos/AlphaSkins/TBCEditorDemo.dpr: -------------------------------------------------------------------------------- 1 | program TBCEditorDemo; 2 | 3 | uses 4 | {$ifdef DEBUG} 5 | FastMM4, 6 | {$endif} 7 | Vcl.Forms, 8 | TBCEditorDemo.Forms.Main in 'Forms\TBCEditorDemo.Forms.Main.pas' {MainForm}; 9 | 10 | {$R *.res} 11 | 12 | begin 13 | {$ifdef DEBUG} 14 | ReportMemoryLeaksOnShutdown := True; 15 | {$endif} 16 | Application.Initialize; 17 | Application.MainFormOnTaskbar := True; 18 | Application.CreateForm(TMainForm, MainForm); 19 | Application.Run; 20 | end. 21 | -------------------------------------------------------------------------------- /Demos/AlphaSkins/TBCEditorDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/AlphaSkins/TBCEditorDemo.res -------------------------------------------------------------------------------- /Demos/AlphaSkins/readme.txt: -------------------------------------------------------------------------------- 1 | Demo source build requires 2 | 3 | - Delphi Berlin 4 | - BCEditor control 5 | - AlphaSkins (commercial) 6 | - BCComponents 7 | - BCControls 8 | - Common 9 | -------------------------------------------------------------------------------- /Demos/Simple/Forms/TBCEditorDemo.Forms.Main.dcu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Forms/TBCEditorDemo.Forms.Main.dcu -------------------------------------------------------------------------------- /Demos/Simple/Forms/TBCEditorDemo.Forms.Main.pas: -------------------------------------------------------------------------------- 1 | unit TBCEditorDemo.Forms.Main; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, BCEditor.Editor.Base, BCEditor.Editor, Vcl.ExtCtrls, Vcl.StdCtrls; 8 | 9 | type 10 | TMainForm = class(TForm) 11 | Editor: TBCEditor; 12 | ListBoxColors: TListBox; 13 | ListBoxHighlighters: TListBox; 14 | PanelLeft: TPanel; 15 | SplitterVertical: TSplitter; 16 | SplitterHorizontal: TSplitter; 17 | procedure FormCreate(Sender: TObject); 18 | procedure ListBoxHighlightersClick(Sender: TObject); 19 | procedure ListBoxColorsClick(Sender: TObject); 20 | private 21 | { Private declarations } 22 | procedure SetSelectedColor; 23 | procedure SetSelectedHighlighter; 24 | end; 25 | 26 | var 27 | MainForm: TMainForm; 28 | 29 | implementation 30 | 31 | {$R *.dfm} 32 | 33 | procedure AddFileNamesFromPathIntoListBox(const APath: string; AListBox: TListBox); 34 | var 35 | LSearchRec: TSearchRec; 36 | begin 37 | if FindFirst(APath + '*.json', faNormal, LSearchRec) = 0 then 38 | try 39 | repeat 40 | AListBox.AddItem(LSearchRec.Name, nil); 41 | until FindNext(LSearchRec) <> 0; 42 | finally 43 | FindClose(LSearchRec); 44 | end; 45 | end; 46 | 47 | procedure TMainForm.FormCreate(Sender: TObject); 48 | var 49 | LApplicationPath, LHighlighterPath, LColorsPath: string; 50 | begin 51 | LApplicationPath := IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)); 52 | with Editor.Directories do 53 | begin 54 | LHighlighterPath := IncludeTrailingPathDelimiter(LApplicationPath + Highlighters); 55 | LColorsPath := IncludeTrailingPathDelimiter(LApplicationPath + Colors); 56 | end; 57 | 58 | AddFileNamesFromPathIntoListBox(LHighlighterPath, ListBoxHighlighters); 59 | AddFileNamesFromPathIntoListBox(LColorsPath, ListBoxColors); 60 | 61 | with ListBoxHighlighters do 62 | Selected[Items.IndexOf('Object Pascal.json')] := True; 63 | 64 | with ListBoxColors do 65 | Selected[Items.IndexOf('Default.json')] := True; 66 | 67 | SetSelectedHighlighter; 68 | SetSelectedColor; 69 | end; 70 | 71 | procedure TMainForm.SetSelectedColor; 72 | begin 73 | with ListBoxColors do 74 | Editor.Highlighter.Colors.LoadFromFile(Items[ItemIndex]); 75 | end; 76 | 77 | procedure TMainForm.SetSelectedHighlighter; 78 | begin 79 | with ListBoxHighlighters do 80 | Editor.Highlighter.LoadFromFile(Items[ItemIndex]); 81 | Editor.Lines.Text := Editor.Highlighter.Info.General.Sample; 82 | end; 83 | 84 | procedure TMainForm.ListBoxColorsClick(Sender: TObject); 85 | begin 86 | SetSelectedColor; 87 | end; 88 | 89 | procedure TMainForm.ListBoxHighlightersClick(Sender: TObject); 90 | begin 91 | SetSelectedHighlighter; 92 | end; 93 | 94 | end. 95 | -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/ActionScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/ActionScript.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/C#.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/C#.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/C++.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/C++.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/C.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/C.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/CoffeeScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/CoffeeScript.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/D.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/D.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/GLSL.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/GLSL.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Go.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Go.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Groovy.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Groovy.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/INI.json: -------------------------------------------------------------------------------- 1 | { 2 | "Highlighter": { 3 | "Info": { 4 | "General": { 5 | "Version": "2.0.0", 6 | "Date": "05.01.2017", 7 | "Sample": [ 8 | "; Comment\r\n", 9 | "[Section]\r\n", 10 | "Name=Value" 11 | ] 12 | }, 13 | "Author": { 14 | "Name": "Lasse Rautiainen", 15 | "Mail": "lasse@bonecode.com" 16 | } 17 | }, 18 | "MainRules": { 19 | "Attributes": { 20 | "Element": "Editor" 21 | }, 22 | "SubRules": { 23 | "Range": [ 24 | { 25 | "Type": "LineComment", 26 | "Attributes": { 27 | "Element": "Comment" 28 | }, 29 | "Properties": { 30 | "CloseOnEndOfLine": true, 31 | "OpenBeginningOfLine": true 32 | }, 33 | "TokenRange": { 34 | "Open": ";" 35 | } 36 | }, 37 | { 38 | "Type": "String", 39 | "Attributes": { 40 | "Element": "ReservedWord" 41 | }, 42 | "Properties": { 43 | "CloseOnEndOfLine": true 44 | }, 45 | "TokenRange": { 46 | "Open": "[", 47 | "Close": "]" 48 | } 49 | }, 50 | { 51 | "Type": "String", 52 | "Attributes": { 53 | "Element": "String" 54 | }, 55 | "Properties": { 56 | "CloseOnEndOfLine": true 57 | }, 58 | "TokenRange": { 59 | "Open": "=" 60 | } 61 | } 62 | ], 63 | "KeyList": [ 64 | { 65 | "Type": "Symbol", 66 | "Words": [ 67 | "=" 68 | ], 69 | "Attributes": { 70 | "Element": "Symbol" 71 | } 72 | } 73 | ] 74 | } 75 | } 76 | }, 77 | "CodeFolding": { 78 | "Ranges": [ 79 | { 80 | "Options": { 81 | "MatchingPairHighlight": false 82 | }, 83 | "SkipRegion": [ 84 | { 85 | "OpenToken": ";", 86 | "RegionType": "SingleLine" 87 | } 88 | ], 89 | "FoldRegion": [ 90 | { 91 | "OpenToken": "[", 92 | "CloseToken": "[", 93 | "Properties": { 94 | "OpenTokenBeginningOfLine": true, 95 | "CloseTokenBeginningOfLine": true, 96 | "OpenIsClose": true, 97 | "TokenEndIsPreviousLine": true, 98 | "OpenTokenEnd": "]", 99 | "BreakCharFollows": false 100 | } 101 | } 102 | ] 103 | } 104 | ] 105 | }, 106 | "MatchingPair": { 107 | "Pairs": [ 108 | { 109 | "OpenToken": "[", 110 | "CloseToken": "]" 111 | } 112 | ] 113 | }, 114 | "CompletionProposal": { 115 | "SkipRegion": [ 116 | { 117 | "OpenToken": ";", 118 | "RegionType": "SingleLine" 119 | } 120 | ] 121 | } 122 | } -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Java.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Java.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/JavaScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/JavaScript.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Lisp.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Lisp.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Lua.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Lua.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/MATLAB.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/MATLAB.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/OCaml.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/OCaml.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Objective-C.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Objective-C.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/PHP.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/PHP.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Perl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Perl.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/PowerShell.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/PowerShell.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Ruby.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Ruby.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Rust.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Rust.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Swift.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Swift.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/TclTk.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/TclTk.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/TypeScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/TypeScript.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/UnrealScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/UnrealScript.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/Visual Basic.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/Highlighters/Visual Basic.json -------------------------------------------------------------------------------- /Demos/Simple/Highlighters/readme.txt: -------------------------------------------------------------------------------- 1 | If you create a new highlighter file and you want others to enjoy it, send it to lasse@bonecode.com. 2 | 3 | Highlighter requests can be sent to the above e-mail address. 4 | -------------------------------------------------------------------------------- /Demos/Simple/TBCEditorDemo.dpr: -------------------------------------------------------------------------------- 1 | program TBCEditorDemo; 2 | 3 | uses 4 | Vcl.Forms, 5 | TBCEditorDemo.Forms.Main in 'Forms\TBCEditorDemo.Forms.Main.pas' {MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TMainForm, MainForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /Demos/Simple/TBCEditorDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Demos/Simple/TBCEditorDemo.res -------------------------------------------------------------------------------- /Demos/Simple/readme.txt: -------------------------------------------------------------------------------- 1 | Demo source build requires 2 | 3 | - Delphi XE4-8, Seattle, or Berlin 4 | - BCEditor control 5 | -------------------------------------------------------------------------------- /Highlighters/ActionScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/ActionScript.json -------------------------------------------------------------------------------- /Highlighters/C#.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/C#.json -------------------------------------------------------------------------------- /Highlighters/C++.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/C++.json -------------------------------------------------------------------------------- /Highlighters/C.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/C.json -------------------------------------------------------------------------------- /Highlighters/CoffeeScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/CoffeeScript.json -------------------------------------------------------------------------------- /Highlighters/D.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/D.json -------------------------------------------------------------------------------- /Highlighters/GLSL.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/GLSL.json -------------------------------------------------------------------------------- /Highlighters/Go.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Go.json -------------------------------------------------------------------------------- /Highlighters/Groovy.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Groovy.json -------------------------------------------------------------------------------- /Highlighters/INI.json: -------------------------------------------------------------------------------- 1 | { 2 | "Highlighter": { 3 | "Info": { 4 | "General": { 5 | "Version": "2.0.0", 6 | "Date": "05.01.2017", 7 | "Sample": [ 8 | "; Comment\r\n", 9 | "[Section]\r\n", 10 | "Name=Value" 11 | ] 12 | }, 13 | "Author": { 14 | "Name": "Lasse Rautiainen", 15 | "Mail": "lasse@bonecode.com" 16 | } 17 | }, 18 | "MainRules": { 19 | "Attributes": { 20 | "Element": "Editor" 21 | }, 22 | "SubRules": { 23 | "Range": [ 24 | { 25 | "Type": "LineComment", 26 | "Attributes": { 27 | "Element": "Comment" 28 | }, 29 | "Properties": { 30 | "CloseOnEndOfLine": true, 31 | "OpenBeginningOfLine": true 32 | }, 33 | "TokenRange": { 34 | "Open": ";" 35 | } 36 | }, 37 | { 38 | "Type": "String", 39 | "Attributes": { 40 | "Element": "ReservedWord" 41 | }, 42 | "Properties": { 43 | "CloseOnEndOfLine": true 44 | }, 45 | "TokenRange": { 46 | "Open": "[", 47 | "Close": "]" 48 | } 49 | }, 50 | { 51 | "Type": "String", 52 | "Attributes": { 53 | "Element": "String" 54 | }, 55 | "Properties": { 56 | "CloseOnEndOfLine": true 57 | }, 58 | "TokenRange": { 59 | "Open": "=" 60 | } 61 | } 62 | ], 63 | "KeyList": [ 64 | { 65 | "Type": "Symbol", 66 | "Words": [ 67 | "=" 68 | ], 69 | "Attributes": { 70 | "Element": "Symbol" 71 | } 72 | } 73 | ] 74 | } 75 | } 76 | }, 77 | "CodeFolding": { 78 | "Ranges": [ 79 | { 80 | "Options": { 81 | "MatchingPairHighlight": false 82 | }, 83 | "SkipRegion": [ 84 | { 85 | "OpenToken": ";", 86 | "RegionType": "SingleLine" 87 | } 88 | ], 89 | "FoldRegion": [ 90 | { 91 | "OpenToken": "[", 92 | "CloseToken": "[", 93 | "Properties": { 94 | "OpenTokenBeginningOfLine": true, 95 | "CloseTokenBeginningOfLine": true, 96 | "OpenIsClose": true, 97 | "TokenEndIsPreviousLine": true, 98 | "OpenTokenEnd": "]", 99 | "BreakCharFollows": false 100 | } 101 | } 102 | ] 103 | } 104 | ] 105 | }, 106 | "MatchingPair": { 107 | "Pairs": [ 108 | { 109 | "OpenToken": "[", 110 | "CloseToken": "]" 111 | } 112 | ] 113 | }, 114 | "CompletionProposal": { 115 | "SkipRegion": [ 116 | { 117 | "OpenToken": ";", 118 | "RegionType": "SingleLine" 119 | } 120 | ] 121 | } 122 | } -------------------------------------------------------------------------------- /Highlighters/Java.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Java.json -------------------------------------------------------------------------------- /Highlighters/JavaScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/JavaScript.json -------------------------------------------------------------------------------- /Highlighters/Lisp.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Lisp.json -------------------------------------------------------------------------------- /Highlighters/Lua.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Lua.json -------------------------------------------------------------------------------- /Highlighters/MATLAB.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/MATLAB.json -------------------------------------------------------------------------------- /Highlighters/OCaml.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/OCaml.json -------------------------------------------------------------------------------- /Highlighters/Objective-C.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Objective-C.json -------------------------------------------------------------------------------- /Highlighters/PHP.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/PHP.json -------------------------------------------------------------------------------- /Highlighters/Perl.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Perl.json -------------------------------------------------------------------------------- /Highlighters/PowerShell.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/PowerShell.json -------------------------------------------------------------------------------- /Highlighters/Ruby.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Ruby.json -------------------------------------------------------------------------------- /Highlighters/Rust.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Rust.json -------------------------------------------------------------------------------- /Highlighters/Swift.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Swift.json -------------------------------------------------------------------------------- /Highlighters/TclTk.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/TclTk.json -------------------------------------------------------------------------------- /Highlighters/TypeScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/TypeScript.json -------------------------------------------------------------------------------- /Highlighters/UnrealScript.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/UnrealScript.json -------------------------------------------------------------------------------- /Highlighters/Visual Basic.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Highlighters/Visual Basic.json -------------------------------------------------------------------------------- /Highlighters/readme.txt: -------------------------------------------------------------------------------- 1 | If you create a new highlighter file and you want others to enjoy it, send it to lasse@bonecode.com. 2 | 3 | Highlighter requests can be sent to the above e-mail address. 4 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Lasse Markus Rautiainen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Berlin.Designtime.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | #pragma package(smart_init) 6 | //--------------------------------------------------------------------------- 7 | 8 | // Package source. 9 | //--------------------------------------------------------------------------- 10 | 11 | 12 | #pragma argsused 13 | int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) 14 | { 15 | return 1; 16 | } 17 | //--------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Berlin.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.CBuilder.Berlin.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Berlin.Runtime.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | #pragma package(smart_init) 6 | //--------------------------------------------------------------------------- 7 | 8 | // Package source. 9 | //--------------------------------------------------------------------------- 10 | 11 | 12 | #pragma argsused 13 | int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) 14 | { 15 | return 1; 16 | } 17 | //--------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Berlin.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.CBuilder.Berlin.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Berlin.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {98CA83B1-B38A-49C4-8FA5-9B99828585AE} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Seattle.Designtime.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | #pragma package(smart_init) 6 | //--------------------------------------------------------------------------- 7 | 8 | // Package source. 9 | //--------------------------------------------------------------------------- 10 | 11 | 12 | #pragma argsused 13 | int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) 14 | { 15 | return 1; 16 | } 17 | //--------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Seattle.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.CBuilder.Seattle.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Seattle.Runtime.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | #pragma package(smart_init) 6 | //--------------------------------------------------------------------------- 7 | 8 | // Package source. 9 | //--------------------------------------------------------------------------- 10 | 11 | 12 | #pragma argsused 13 | int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) 14 | { 15 | return 1; 16 | } 17 | //--------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Seattle.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.CBuilder.Seattle.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.Seattle.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {98CA83B1-B38A-49C4-8FA5-9B99828585AE} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.XE7.Designtime.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | #pragma package(smart_init) 6 | //--------------------------------------------------------------------------- 7 | 8 | // Package source. 9 | //--------------------------------------------------------------------------- 10 | 11 | 12 | #pragma argsused 13 | int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) 14 | { 15 | return 1; 16 | } 17 | //--------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.XE7.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.CBuilder.XE7.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.XE7.Runtime.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | #pragma package(smart_init) 6 | //--------------------------------------------------------------------------- 7 | 8 | // Package source. 9 | //--------------------------------------------------------------------------- 10 | 11 | 12 | #pragma argsused 13 | int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) 14 | { 15 | return 1; 16 | } 17 | //--------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.XE7.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.CBuilder.XE7.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.XE7.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {98CA83B1-B38A-49C4-8FA5-9B99828585AE} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.XE8.Designtime.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | #pragma package(smart_init) 6 | //--------------------------------------------------------------------------- 7 | 8 | // Package source. 9 | //--------------------------------------------------------------------------- 10 | 11 | 12 | #pragma argsused 13 | int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) 14 | { 15 | return 1; 16 | } 17 | //--------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.XE8.Runtime.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | #pragma package(smart_init) 6 | //--------------------------------------------------------------------------- 7 | 8 | // Package source. 9 | //--------------------------------------------------------------------------- 10 | 11 | 12 | #pragma argsused 13 | int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) 14 | { 15 | return 1; 16 | } 17 | //--------------------------------------------------------------------------- 18 | -------------------------------------------------------------------------------- /Packages/BCEditor.CBuilder.XE8.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {98CA83B1-B38A-49C4-8FA5-9B99828585AE} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.Berlin.Designtime.dpk: -------------------------------------------------------------------------------- 1 | package BCEditor.Delphi.Berlin.Designtime; 2 | 3 | {$R *.res} 4 | {$R '..\Source\BCEditor.Register.dcr'} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION OFF} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES ON} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST ON} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'BCEditor component suite'} 30 | {$DESIGNONLY} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | dbrtl, 36 | vcldb, 37 | BCEditor.Delphi.Berlin.Runtime; 38 | 39 | contains 40 | BCEditor.Register in '..\Source\BCEditor.Register.pas', 41 | BCEditor.RegisterProperty in '..\Source\BCEditor.RegisterProperty.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.Berlin.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.Berlin.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.Berlin.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.Berlin.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.Berlin.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {2F95E7A1-2A4E-443E-9E31-C93E3D8E882D} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.Seattle.Designtime.dpk: -------------------------------------------------------------------------------- 1 | package BCEditor.Delphi.Seattle.Designtime; 2 | 3 | {$R *.res} 4 | {$R '..\Source\BCEditor.Register.dcr'} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION OFF} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES ON} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST ON} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'BCEditor component suite'} 30 | {$DESIGNONLY} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | dbrtl, 36 | vcldb, 37 | BCEditor.Delphi.Seattle.Runtime; 38 | 39 | contains 40 | BCEditor.Register in '..\Source\BCEditor.Register.pas', 41 | BCEditor.RegisterProperty in '..\Source\BCEditor.RegisterProperty.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.Seattle.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.Seattle.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.Seattle.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.Seattle.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.Seattle.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {2F95E7A1-2A4E-443E-9E31-C93E3D8E882D} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE4.Designtime.dpk: -------------------------------------------------------------------------------- 1 | package BCEditor.Delphi.XE4.Designtime; 2 | 3 | {$R *.res} 4 | {$R '..\Source\BCEditor.Register.dcr'} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS OFF} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO OFF} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST ON} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE RELEASE} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'BCEditor component suite'} 30 | {$DESIGNONLY} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | dbrtl, 36 | vcldb, 37 | BCEditor.Delphi.XE4.Runtime; 38 | 39 | contains 40 | BCEditor.Register in '..\Source\BCEditor.Register.pas', 41 | BCEditor.RegisterProperty in '..\Source\BCEditor.RegisterProperty.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE4.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE4.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE4.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE4.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE4.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {2F95E7A1-2A4E-443E-9E31-C93E3D8E882D} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE5.Designtime.dpk: -------------------------------------------------------------------------------- 1 | package BCEditor.Delphi.XE5.Designtime; 2 | 3 | {$R *.res} 4 | {$R '..\Source\BCEditor.Register.dcr'} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS OFF} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO OFF} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST ON} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE RELEASE} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'BCEditor component suite'} 30 | {$DESIGNONLY} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | dbrtl, 36 | vcldb, 37 | BCEditor.Delphi.XE5.Runtime; 38 | 39 | contains 40 | BCEditor.Register in '..\Source\BCEditor.Register.pas', 41 | BCEditor.RegisterProperty in '..\Source\BCEditor.RegisterProperty.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE5.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE5.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE5.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE5.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE5.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {2F95E7A1-2A4E-443E-9E31-C93E3D8E882D} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE6.Designtime.dpk: -------------------------------------------------------------------------------- 1 | package BCEditor.Delphi.XE6.Designtime; 2 | 3 | {$R *.res} 4 | {$R '..\Source\BCEditor.Register.dcr'} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS OFF} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO OFF} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST ON} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE RELEASE} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'BCEditor component suite'} 30 | {$DESIGNONLY} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | dbrtl, 36 | vcldb, 37 | BCEditor.Delphi.XE6.Runtime; 38 | 39 | contains 40 | BCEditor.Register in '..\Source\BCEditor.Register.pas', 41 | BCEditor.RegisterProperty in '..\Source\BCEditor.RegisterProperty.pas'; 42 | 43 | end. 44 | 45 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE6.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE6.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE6.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE6.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE6.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {2F95E7A1-2A4E-443E-9E31-C93E3D8E882D} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE7.Designtime.dpk: -------------------------------------------------------------------------------- 1 | package BCEditor.Delphi.XE7.Designtime; 2 | 3 | {$R *.res} 4 | {$R '..\Source\BCEditor.Register.dcr'} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS OFF} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION ON} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO OFF} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES OFF} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST ON} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE RELEASE} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'BCEditor component suite'} 30 | {$DESIGNONLY} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | dbrtl, 36 | vcldb, 37 | BCEditor.Delphi.XE7.Runtime; 38 | 39 | contains 40 | BCEditor.Register in '..\Source\BCEditor.Register.pas', 41 | BCEditor.RegisterProperty in '..\Source\BCEditor.RegisterProperty.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE7.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE7.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE7.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE7.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE7.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {2F95E7A1-2A4E-443E-9E31-C93E3D8E882D} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE8.Designtime.dpk: -------------------------------------------------------------------------------- 1 | package BCEditor.Delphi.XE8.Designtime; 2 | 3 | {$R *.res} 4 | {$R '..\Source\BCEditor.Register.dcr'} 5 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 6 | {$ALIGN 8} 7 | {$ASSERTIONS ON} 8 | {$BOOLEVAL OFF} 9 | {$DEBUGINFO OFF} 10 | {$EXTENDEDSYNTAX ON} 11 | {$IMPORTEDDATA ON} 12 | {$IOCHECKS ON} 13 | {$LOCALSYMBOLS ON} 14 | {$LONGSTRINGS ON} 15 | {$OPENSTRINGS ON} 16 | {$OPTIMIZATION OFF} 17 | {$OVERFLOWCHECKS OFF} 18 | {$RANGECHECKS OFF} 19 | {$REFERENCEINFO ON} 20 | {$SAFEDIVIDE OFF} 21 | {$STACKFRAMES ON} 22 | {$TYPEDADDRESS OFF} 23 | {$VARSTRINGCHECKS ON} 24 | {$WRITEABLECONST ON} 25 | {$MINENUMSIZE 1} 26 | {$IMAGEBASE $400000} 27 | {$DEFINE DEBUG} 28 | {$ENDIF IMPLICITBUILDING} 29 | {$DESCRIPTION 'BCEditor component suite'} 30 | {$DESIGNONLY} 31 | {$IMPLICITBUILD ON} 32 | 33 | requires 34 | designide, 35 | dbrtl, 36 | vcldb, 37 | BCEditor.Delphi.XE8.Runtime; 38 | 39 | contains 40 | BCEditor.Register in '..\Source\BCEditor.Register.pas', 41 | BCEditor.RegisterProperty in '..\Source\BCEditor.RegisterProperty.pas'; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE8.Designtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE8.Designtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE8.Runtime.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Packages/BCEditor.Delphi.XE8.Runtime.res -------------------------------------------------------------------------------- /Packages/BCEditor.Delphi.XE8.groupproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {2F95E7A1-2A4E-443E-9E31-C93E3D8E882D} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The latest release version 1.9.0 2 | 3 | Use the Issues page to report bugs or send them directly to lasse@bonecode.com. 4 | 5 |

Description

6 | 7 | A syntax highlighting edit control for RAD Studio (Delphi/C++ Builder) with code folding, completion proposal, matching pair, minimap, sync edit, multi-caret editing, word wrap, support for non-fixed-width fonts, etc. External highlighter and color scheme files are in JSON format which can be also loaded from a stream. 8 | 9 |

Build requirements

10 | 11 | * Json Data Objects (included) 12 | * Delphi versions XE4-8, Seattle, and Berlin are supported 13 | * C++ Builder versions XE7-8, Seattle, and Berlin are supported 14 | 15 | Note! Do not offer me older versions to support. I don't have time to keep up with those. 16 | 17 |

Conditional compilation

18 | 19 | Define | Description 20 | --- | --- 21 | USE_ALPHASKINS | Use AlphaSkins. AlphaSkins are most powerful theming solutions for apps developed in Delphi. 22 | USE_VCL_STYLES | Use VCL styles. A set of graphical details that define the look and feel of a VCL application. 23 | 24 |

Usage example

25 | 26 | ```objectpascal 27 | with BCEditor1 do 28 | begin 29 | Highlighter.LoadFromFile('JSON.json'); 30 | Highlighter.Colors.LoadFromFile('Default.json'); 31 | LoadFromFile(GetHighlighterFileName('JSON.json')); 32 | ... 33 | Lines.Text := Highlighter.Info.General.Sample; 34 | end; 35 | ``` 36 | Note! LoadFromStream does not support multi-highlighters (for example HTML with Scripts.json). Override TBCBaseEditor.CreateFileStream function, if you want to load multi-highlighters from a stream. 37 | 38 |

Demo

39 | 40 | TBCEditor Control Demo v. 2.0.0 (dev). 41 | 42 | * 32-bit Windows 43 | * 64-bit Windows 44 | 45 | The latest update: 05.02.2017 20:19, UTC+02:00 46 | 47 |

Documentation

48 | 49 | Documentation will be written after the project stabilizes and dust settles. This project is developed in my spare time without sources of income and as long as this is the case there is no timetable for anything. 50 | 51 |

Projects using the control

52 | 53 | * EditBone 54 | * MiTeC Interbase Query 55 | * MiTeC SQLite Query 56 | 57 |

Screenshots

58 | 59 | ![bceditor0](https://cloud.githubusercontent.com/assets/11475177/20067778/2e403442-a51f-11e6-8c3e-532ae48b7d72.png) 60 | ![bceditor1](https://cloud.githubusercontent.com/assets/11475177/20067780/2e5c78be-a51f-11e6-98b3-837ab6c630f9.png) 61 | ![bceditor2](https://cloud.githubusercontent.com/assets/11475177/20067783/2e7e074a-a51f-11e6-9152-e7298b510fac.png) 62 | ![bceditor3](https://cloud.githubusercontent.com/assets/11475177/20067782/2e7e15b4-a51f-11e6-945f-69ae5f7c6391.png) 63 | ![bceditor4](https://cloud.githubusercontent.com/assets/11475177/20067784/2e7e457a-a51f-11e6-802d-1b90bd952538.png) 64 | ![bceditor5](https://cloud.githubusercontent.com/assets/11475177/20114666/d317c5a0-a5fd-11e6-9c0d-8fc71d177943.png) 65 | ![bceditor6](https://cloud.githubusercontent.com/assets/11475177/20067785/2e831d16-a51f-11e6-93ca-51eb13a1501f.png) 66 | ![bceditor7](https://cloud.githubusercontent.com/assets/11475177/20067786/2e83a9c0-a51f-11e6-918d-e039512503ca.png) 67 | ![bceditor8](https://cloud.githubusercontent.com/assets/11475177/20067774/2de408c0-a51f-11e6-9bbc-68c4824c7d10.png) 68 | ![bceditor9](https://cloud.githubusercontent.com/assets/11475177/20067777/2e22d398-a51f-11e6-80dc-aada64961860.png) 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /Source/BCEditor.Consts.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Source/BCEditor.Consts.pas -------------------------------------------------------------------------------- /Source/BCEditor.Editor.ActiveLine.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.ActiveLine; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Editor.Glyph, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorActiveLine = class(TPersistent) 10 | strict private 11 | FColor: TColor; 12 | FIndicator: TBCEditorGlyph; 13 | FOnChange: TNotifyEvent; 14 | FVisible: Boolean; 15 | procedure DoChange(ASender: TObject); 16 | procedure SetColor(const AValue: TColor); 17 | procedure SetIndicator(const AValue: TBCEditorGlyph); 18 | procedure SetOnChange(AValue: TNotifyEvent); 19 | procedure SetVisible(const AValue: Boolean); 20 | public 21 | constructor Create; 22 | destructor Destroy; override; 23 | procedure Assign(ASource: TPersistent); override; 24 | published 25 | property Color: TColor read FColor write SetColor default clActiveLineBackground; 26 | property Indicator: TBCEditorGlyph read FIndicator write SetIndicator; 27 | property OnChange: TNotifyEvent read FOnChange write SetOnChange; 28 | property Visible: Boolean read FVisible write SetVisible default True; 29 | end; 30 | 31 | implementation 32 | 33 | constructor TBCEditorActiveLine.Create; 34 | begin 35 | inherited; 36 | 37 | FColor := clActiveLineBackground; 38 | FIndicator := TBCEditorGlyph.Create(HInstance, BCEDITOR_ACTIVE_LINE, clFuchsia); 39 | FIndicator.Visible := False; 40 | FVisible := True; 41 | end; 42 | 43 | destructor TBCEditorActiveLine.Destroy; 44 | begin 45 | FIndicator.Free; 46 | 47 | inherited; 48 | end; 49 | 50 | procedure TBCEditorActiveLine.Assign(ASource: TPersistent); 51 | begin 52 | if Assigned(ASource) and (ASource is TBCEditorActiveLine) then 53 | with ASource as TBCEditorActiveLine do 54 | begin 55 | Self.FColor := FColor; 56 | Self.FVisible := FVisible; 57 | Self.FIndicator.Assign(FIndicator); 58 | Self.DoChange(Self); 59 | end 60 | else 61 | inherited Assign(ASource); 62 | end; 63 | 64 | procedure TBCEditorActiveLine.SetOnChange(AValue: TNotifyEvent); 65 | begin 66 | FOnChange := AValue; 67 | FIndicator.OnChange := AValue; 68 | end; 69 | 70 | procedure TBCEditorActiveLine.DoChange(ASender: TObject); 71 | begin 72 | if Assigned(FOnChange) then 73 | FOnChange(ASender); 74 | end; 75 | 76 | procedure TBCEditorActiveLine.SetColor(const AValue: TColor); 77 | begin 78 | if FColor <> AValue then 79 | begin 80 | FColor := AValue; 81 | DoChange(Self); 82 | end; 83 | end; 84 | 85 | procedure TBCEditorActiveLine.SetIndicator(const AValue: TBCEditorGlyph); 86 | begin 87 | FIndicator.Assign(AValue); 88 | end; 89 | 90 | procedure TBCEditorActiveLine.SetVisible(const AValue: Boolean); 91 | begin 92 | if FVisible <> AValue then 93 | begin 94 | FVisible := AValue; 95 | DoChange(Self); 96 | end; 97 | end; 98 | 99 | end. 100 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Caret.MultiEdit.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Caret.MultiEdit.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorCaretMultiEditColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FForeground: TColor; 13 | public 14 | constructor Create; 15 | procedure Assign(ASource: TPersistent); override; 16 | published 17 | property Background: TColor read FBackground write FBackground default clBlack; 18 | property Foreground: TColor read FForeground write FForeground default clWhite; 19 | end; 20 | 21 | implementation 22 | 23 | constructor TBCEditorCaretMultiEditColors.Create; 24 | begin 25 | inherited; 26 | 27 | FBackground := clBlack; 28 | FForeground := clWhite; 29 | end; 30 | 31 | procedure TBCEditorCaretMultiEditColors.Assign(ASource: TPersistent); 32 | begin 33 | if Assigned(ASource) and (ASource is TBCEditorCaretMultiEditColors) then 34 | with ASource as TBCEditorCaretMultiEditColors do 35 | begin 36 | Self.FBackground := FBackground; 37 | Self.FForeground := FForeground; 38 | end 39 | else 40 | inherited Assign(ASource); 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Caret.MultiEdit.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Caret.MultiEdit; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Editor.Caret.MultiEdit.Colors, BCEditor.Types; 7 | 8 | const 9 | BCEDITOR_MULTIEDIT_DEFAULT_OPTIONS = [meoShowActiveLine, meoShowGhost]; 10 | 11 | type 12 | TBCEditorCaretMultiEdit = class(TPersistent) 13 | strict private 14 | FColors: TBCEditorCaretMultiEditColors; 15 | FEnabled: Boolean; 16 | FOnChange: TNotifyEvent; 17 | FOptions: TBCEditorCaretMultiEditOptions; 18 | FStyle: TBCEditorCaretStyle; 19 | procedure DoChange; 20 | procedure SetColors(AValue: TBCEditorCaretMultiEditColors); 21 | procedure SetEnabled(AValue: Boolean); 22 | procedure SetOptions(const AValue: TBCEditorCaretMultiEditOptions); 23 | procedure SetStyle(const AValue: TBCEditorCaretStyle); 24 | public 25 | constructor Create; 26 | destructor Destroy; override; 27 | procedure Assign(ASource: TPersistent); override; 28 | published 29 | property Colors: TBCEditorCaretMultiEditColors read FColors write SetColors; 30 | property Enabled: Boolean read FEnabled write SetEnabled default True; 31 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 32 | property Options: TBCEditorCaretMultiEditOptions read FOptions write SetOptions default BCEDITOR_MULTIEDIT_DEFAULT_OPTIONS; 33 | property Style: TBCEditorCaretStyle read FStyle write SetStyle default csThinVerticalLine; 34 | end; 35 | 36 | implementation 37 | 38 | constructor TBCEditorCaretMultiEdit.Create; 39 | begin 40 | inherited; 41 | 42 | FColors := TBCEditorCaretMultiEditColors.Create; 43 | FEnabled := True; 44 | FStyle := csThinVerticalLine; 45 | FOptions := BCEDITOR_MULTIEDIT_DEFAULT_OPTIONS; 46 | end; 47 | 48 | destructor TBCEditorCaretMultiEdit.Destroy; 49 | begin 50 | FColors.Free; 51 | 52 | inherited; 53 | end; 54 | 55 | procedure TBCEditorCaretMultiEdit.Assign(ASource: TPersistent); 56 | begin 57 | if Assigned(ASource) and (ASource is TBCEditorCaretMultiEdit) then 58 | with ASource as TBCEditorCaretMultiEdit do 59 | begin 60 | Self.FColors.Assign(FColors); 61 | Self.FEnabled := FEnabled; 62 | Self.FOptions := FOptions; 63 | Self.FStyle := FStyle; 64 | Self.DoChange; 65 | end 66 | else 67 | inherited Assign(ASource); 68 | end; 69 | 70 | procedure TBCEditorCaretMultiEdit.DoChange; 71 | begin 72 | if Assigned(FOnChange) then 73 | FOnChange(Self); 74 | end; 75 | 76 | procedure TBCEditorCaretMultiEdit.SetEnabled(AValue: Boolean); 77 | begin 78 | if FEnabled <> AValue then 79 | begin 80 | FEnabled := AValue; 81 | DoChange; 82 | end; 83 | end; 84 | 85 | procedure TBCEditorCaretMultiEdit.SetStyle(const AValue: TBCEditorCaretStyle); 86 | begin 87 | if FStyle <> AValue then 88 | begin 89 | FStyle := AValue; 90 | DoChange; 91 | end; 92 | end; 93 | 94 | procedure TBCEditorCaretMultiEdit.SetColors(AValue: TBCEditorCaretMultiEditColors); 95 | begin 96 | FColors.Assign(AValue); 97 | end; 98 | 99 | procedure TBCEditorCaretMultiEdit.SetOptions(const AValue: TBCEditorCaretMultiEditOptions); 100 | begin 101 | if FOptions <> AValue then 102 | begin 103 | FOptions := AValue; 104 | DoChange; 105 | end; 106 | end; 107 | 108 | end. 109 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Caret.NonBlinking.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Caret.NonBlinking.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorCaretNonBlinkingColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FForeground: TColor; 13 | public 14 | constructor Create; 15 | procedure Assign(ASource: TPersistent); override; 16 | published 17 | property Background: TColor read FBackground write FBackground default clBlack; 18 | property Foreground: TColor read FForeground write FForeground default clWhite; 19 | end; 20 | 21 | implementation 22 | 23 | constructor TBCEditorCaretNonBlinkingColors.Create; 24 | begin 25 | inherited; 26 | 27 | FBackground := clBlack; 28 | FForeground := clWhite; 29 | end; 30 | 31 | procedure TBCEditorCaretNonBlinkingColors.Assign(ASource: TPersistent); 32 | begin 33 | if Assigned(ASource) and (ASource is TBCEditorCaretNonBlinkingColors) then 34 | with ASource as TBCEditorCaretNonBlinkingColors do 35 | begin 36 | Self.FBackground := FBackground; 37 | Self.FForeground := FForeground; 38 | end 39 | else 40 | inherited Assign(ASource); 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Caret.NonBlinking.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Caret.NonBlinking; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Editor.Caret.NonBlinking.Colors; 7 | 8 | type 9 | TBCEditorCaretNonBlinking = class(TPersistent) 10 | strict private 11 | FColors: TBCEditorCaretNonBlinkingColors; 12 | FEnabled: Boolean; 13 | FOnChange: TNotifyEvent; 14 | procedure DoChange; 15 | procedure SetColors(AValue: TBCEditorCaretNonBlinkingColors); 16 | procedure SetEnabled(AValue: Boolean); 17 | public 18 | constructor Create; 19 | destructor Destroy; override; 20 | procedure Assign(ASource: TPersistent); override; 21 | published 22 | property Colors: TBCEditorCaretNonBlinkingColors read FColors write SetColors; 23 | property Enabled: Boolean read FEnabled write SetEnabled default False; 24 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 25 | end; 26 | 27 | implementation 28 | 29 | constructor TBCEditorCaretNonBlinking.Create; 30 | begin 31 | inherited; 32 | 33 | FColors := TBCEditorCaretNonBlinkingColors.Create; 34 | FEnabled := False; 35 | end; 36 | 37 | destructor TBCEditorCaretNonBlinking.Destroy; 38 | begin 39 | FColors.Free; 40 | 41 | inherited; 42 | end; 43 | 44 | procedure TBCEditorCaretNonBlinking.Assign(ASource: TPersistent); 45 | begin 46 | if Assigned(ASource) and (ASource is TBCEditorCaretNonBlinking) then 47 | with ASource as TBCEditorCaretNonBlinking do 48 | begin 49 | Self.FColors.Assign(FColors); 50 | Self.FEnabled := FEnabled; 51 | Self.DoChange; 52 | end 53 | else 54 | inherited Assign(ASource); 55 | end; 56 | 57 | procedure TBCEditorCaretNonBlinking.DoChange; 58 | begin 59 | if Assigned(FOnChange) then 60 | FOnChange(Self); 61 | end; 62 | 63 | procedure TBCEditorCaretNonBlinking.SetEnabled(AValue: Boolean); 64 | begin 65 | if FEnabled <> AValue then 66 | begin 67 | FEnabled := AValue; 68 | DoChange; 69 | end; 70 | end; 71 | 72 | procedure TBCEditorCaretNonBlinking.SetColors(AValue: TBCEditorCaretNonBlinkingColors); 73 | begin 74 | FColors.Assign(AValue); 75 | end; 76 | 77 | end. 78 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Caret.Offsets.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Caret.Offsets; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes; 7 | 8 | type 9 | TBCEditorCaretOffsets = class(TPersistent) 10 | strict private 11 | FOnChange: TNotifyEvent; 12 | FLeft: Integer; 13 | FTop: Integer; 14 | procedure DoChange(ASender: TObject); 15 | procedure SetLeft(const AValue: Integer); 16 | procedure SetTop(const AValue: Integer); 17 | public 18 | constructor Create; 19 | procedure Assign(ASource: TPersistent); override; 20 | published 21 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 22 | property Left: Integer read FLeft write SetLeft default 0; 23 | property Top: Integer read FTop write SetTop default 0; 24 | end; 25 | 26 | implementation 27 | 28 | constructor TBCEditorCaretOffsets.Create; 29 | begin 30 | inherited; 31 | 32 | FLeft := 0; 33 | FTop := 0; 34 | end; 35 | 36 | procedure TBCEditorCaretOffsets.Assign(ASource: TPersistent); 37 | begin 38 | if Assigned(ASource) and (ASource is TBCEditorCaretOffsets) then 39 | with ASource as TBCEditorCaretOffsets do 40 | begin 41 | Self.FLeft := FLeft; 42 | Self.FTop := FTop; 43 | Self.DoChange(Self); 44 | end 45 | else 46 | inherited Assign(ASource); 47 | end; 48 | 49 | procedure TBCEditorCaretOffsets.DoChange(ASender: TObject); 50 | begin 51 | if Assigned(FOnChange) then 52 | FOnChange(ASender); 53 | end; 54 | 55 | procedure TBCEditorCaretOffsets.SetLeft(const AValue: Integer); 56 | begin 57 | if FLeft <> AValue then 58 | begin 59 | FLeft := AValue; 60 | DoChange(Self); 61 | end; 62 | end; 63 | 64 | procedure TBCEditorCaretOffsets.SetTop(const AValue: Integer); 65 | begin 66 | if FTop <> AValue then 67 | begin 68 | FTop := AValue; 69 | DoChange(Self); 70 | end; 71 | end; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Caret.Styles.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Caret.Styles; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Types; 7 | 8 | type 9 | TBCEditorCaretStyles = class(TPersistent) 10 | strict private 11 | FInsert: TBCEditorCaretStyle; 12 | FOnChange: TNotifyEvent; 13 | FOverwrite: TBCEditorCaretStyle; 14 | procedure DoChange; 15 | procedure SetInsert(const AValue: TBCEditorCaretStyle); 16 | procedure SetOverwrite(const AValue: TBCEditorCaretStyle); 17 | public 18 | constructor Create; 19 | procedure Assign(ASource: TPersistent); override; 20 | published 21 | property Insert: TBCEditorCaretStyle read FInsert write SetInsert default csThinVerticalLine; 22 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 23 | property Overwrite: TBCEditorCaretStyle read FOverwrite write SetOverwrite default csThinVerticalLine; 24 | end; 25 | 26 | implementation 27 | 28 | constructor TBCEditorCaretStyles.Create; 29 | begin 30 | inherited; 31 | 32 | FInsert := csThinVerticalLine; 33 | FOverwrite := csThinVerticalLine; 34 | end; 35 | 36 | procedure TBCEditorCaretStyles.Assign(ASource: TPersistent); 37 | begin 38 | if Assigned(ASource) and (ASource is TBCEditorCaretStyles) then 39 | with ASource as TBCEditorCaretStyles do 40 | begin 41 | Self.FOverwrite := FOverwrite; 42 | Self.FInsert := FInsert; 43 | Self.DoChange; 44 | end 45 | else 46 | inherited Assign(ASource); 47 | end; 48 | 49 | procedure TBCEditorCaretStyles.DoChange; 50 | begin 51 | if Assigned(FOnChange) then 52 | FOnChange(Self); 53 | end; 54 | 55 | procedure TBCEditorCaretStyles.SetInsert(const AValue: TBCEditorCaretStyle); 56 | begin 57 | if FInsert <> AValue then 58 | begin 59 | FInsert := AValue; 60 | DoChange; 61 | end; 62 | end; 63 | 64 | procedure TBCEditorCaretStyles.SetOverwrite(const AValue: TBCEditorCaretStyle); 65 | begin 66 | if FOverwrite <> AValue then 67 | begin 68 | FOverwrite := AValue; 69 | DoChange; 70 | end; 71 | end; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CodeFolding.Hint.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CodeFolding.Hint.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorCodeFoldingHintColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FBorder: TColor; 13 | public 14 | constructor Create; 15 | procedure Assign(ASource: TPersistent); override; 16 | published 17 | property Background: TColor read FBackground write FBackground default clWindow; 18 | property Border: TColor read FBorder write FBorder default clBtnFace; 19 | end; 20 | 21 | implementation 22 | 23 | constructor TBCEditorCodeFoldingHintColors.Create; 24 | begin 25 | inherited; 26 | 27 | FBackground := clWindow; 28 | FBorder := clBtnFace; 29 | end; 30 | 31 | procedure TBCEditorCodeFoldingHintColors.Assign(ASource: TPersistent); 32 | begin 33 | if ASource is TBCEditorCodeFoldingHintColors then 34 | with ASource as TBCEditorCodeFoldingHintColors do 35 | begin 36 | Self.FBackground := FBackground; 37 | Self.FBorder := FBorder; 38 | end 39 | else 40 | inherited Assign(ASource); 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CodeFolding.Hint.Indicator.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CodeFolding.Hint.Indicator.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorCodeFoldingHintIndicatorColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FBorder: TColor; 13 | FMark: TColor; 14 | public 15 | constructor Create; 16 | procedure Assign(ASource: TPersistent); override; 17 | published 18 | property Background: TColor read FBackground write FBackground default clLeftMarginBackground; 19 | property Border: TColor read FBorder write FBorder default clLeftMarginFontForeground; 20 | property Mark: TColor read FMark write FMark default clLeftMarginFontForeground; 21 | end; 22 | 23 | implementation 24 | 25 | constructor TBCEditorCodeFoldingHintIndicatorColors.Create; 26 | begin 27 | inherited; 28 | 29 | FBackground := clLeftMarginBackground; 30 | FBorder := clLeftMarginFontForeground; 31 | FMark := clLeftMarginFontForeground; 32 | end; 33 | 34 | procedure TBCEditorCodeFoldingHintIndicatorColors.Assign(ASource: TPersistent); 35 | begin 36 | if ASource is TBCEditorCodeFoldingHintIndicatorColors then 37 | with ASource as TBCEditorCodeFoldingHintIndicatorColors do 38 | begin 39 | Self.FBackground := FBackground; 40 | Self.FBorder := FBorder; 41 | Self.FMark := FMark; 42 | end 43 | else 44 | inherited Assign(ASource); 45 | end; 46 | 47 | end. 48 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CodeFolding.Hint.Indicator.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CodeFolding.Hint.Indicator; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Controls, BCEditor.Editor.CodeFolding.Hint.Indicator.Colors, BCEditor.Editor.Glyph, 7 | BCEditor.Types; 8 | 9 | const 10 | BCEDITOR_CODE_FOLDING_HINT_INDICATOR_DEFAULT_OPTIONS = [hioShowBorder, hioShowMark]; 11 | 12 | type 13 | TBCEditorCodeFoldingHintIndicator = class(TPersistent) 14 | strict private 15 | FColors: TBCEditorCodeFoldingHintIndicatorColors; 16 | FGlyph: TBCEditorGlyph; 17 | FMarkStyle: TBCEditorCodeFoldingHintIndicatorMarkStyle; 18 | FOptions: TBCEditorCodeFoldingHintIndicatorOptions; 19 | FPadding: TBCEditorCodeFoldingHintIndicatorPadding; 20 | FVisible: Boolean; 21 | FWidth: Integer; 22 | procedure SetGlyph(const AValue: TBCEditorGlyph); 23 | public 24 | constructor Create; 25 | destructor Destroy; override; 26 | procedure Assign(ASource: TPersistent); override; 27 | published 28 | property Colors: TBCEditorCodeFoldingHintIndicatorColors read FColors write FColors; 29 | property Glyph: TBCEditorGlyph read FGlyph write SetGlyph; 30 | property MarkStyle: TBCEditorCodeFoldingHintIndicatorMarkStyle read FMarkStyle write FMarkStyle default imsThreeDots; 31 | property Options: TBCEditorCodeFoldingHintIndicatorOptions read FOptions write FOptions default BCEDITOR_CODE_FOLDING_HINT_INDICATOR_DEFAULT_OPTIONS; 32 | property Padding: TBCEditorCodeFoldingHintIndicatorPadding read FPadding write FPadding; 33 | property Visible: Boolean read FVisible write FVisible default True; 34 | property Width: Integer read FWidth write FWidth default 26; 35 | end; 36 | 37 | implementation 38 | 39 | constructor TBCEditorCodeFoldingHintIndicator.Create; 40 | begin 41 | inherited; 42 | 43 | FColors := TBCEditorCodeFoldingHintIndicatorColors.Create; 44 | FGlyph := TBCEditorGlyph.Create; 45 | FPadding := TBCEditorCodeFoldingHintIndicatorPadding.Create(nil); 46 | FGlyph.Visible := False; 47 | FMarkStyle := imsThreeDots; 48 | FVisible := True; 49 | FOptions := BCEDITOR_CODE_FOLDING_HINT_INDICATOR_DEFAULT_OPTIONS; 50 | FWidth := 26; 51 | end; 52 | 53 | destructor TBCEditorCodeFoldingHintIndicator.Destroy; 54 | begin 55 | FColors.Free; 56 | FGlyph.Free; 57 | FPadding.Free; 58 | 59 | inherited; 60 | end; 61 | 62 | procedure TBCEditorCodeFoldingHintIndicator.Assign(ASource: TPersistent); 63 | begin 64 | if Assigned(ASource) and (ASource is TBCEditorCodeFoldingHintIndicator) then 65 | with ASource as TBCEditorCodeFoldingHintIndicator do 66 | begin 67 | Self.FVisible := FVisible; 68 | Self.FMarkStyle := FMarkStyle; 69 | Self.FWidth := FWidth; 70 | Self.FColors.Assign(FColors); 71 | Self.FGlyph.Assign(FGlyph); 72 | Self.FPadding.Assign(FPadding); 73 | end 74 | else 75 | inherited Assign(ASource); 76 | end; 77 | 78 | procedure TBCEditorCodeFoldingHintIndicator.SetGlyph(const AValue: TBCEditorGlyph); 79 | begin 80 | FGlyph.Assign(AValue); 81 | end; 82 | 83 | end. 84 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CodeFolding.Hint.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CodeFolding.Hint; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, System.UITypes, Vcl.Graphics, BCEditor.Editor.CodeFolding.Hint.Colors, 7 | BCEditor.Editor.CodeFolding.Hint.Indicator; 8 | 9 | type 10 | TBCEditorCodeFoldingHint = class(TPersistent) 11 | strict private 12 | FColors: TBCEditorCodeFoldingHintColors; 13 | FCursor: TCursor; 14 | FFont: TFont; 15 | FIndicator: TBCEditorCodeFoldingHintIndicator; 16 | FRowCount: Integer; 17 | FVisible: Boolean; 18 | procedure SetFont(const AValue: TFont); 19 | public 20 | constructor Create; 21 | destructor Destroy; override; 22 | procedure Assign(ASource: TPersistent); override; 23 | published 24 | property Colors: TBCEditorCodeFoldingHintColors read FColors write FColors; 25 | property Cursor: TCursor read FCursor write FCursor default crHelp; 26 | property Font: TFont read FFont write SetFont; 27 | property Indicator: TBCEditorCodeFoldingHintIndicator read FIndicator write FIndicator; 28 | property RowCount: Integer read FRowCount write FRowCount default 40; 29 | property Visible: Boolean read FVisible write FVisible default True; 30 | end; 31 | 32 | implementation 33 | 34 | constructor TBCEditorCodeFoldingHint.Create; 35 | begin 36 | inherited; 37 | 38 | FColors := TBCEditorCodeFoldingHintColors.Create; 39 | FIndicator := TBCEditorCodeFoldingHintIndicator.Create; 40 | FCursor := crHelp; 41 | FRowCount := 40; 42 | FVisible := True; 43 | FFont := TFont.Create; 44 | FFont.Name := 'Courier New'; 45 | FFont.Size := 8; 46 | end; 47 | 48 | destructor TBCEditorCodeFoldingHint.Destroy; 49 | begin 50 | FColors.Free; 51 | FIndicator.Free; 52 | FFont.Free; 53 | 54 | inherited; 55 | end; 56 | 57 | procedure TBCEditorCodeFoldingHint.Assign(ASource: TPersistent); 58 | begin 59 | if ASource is TBCEditorCodeFoldingHint then 60 | with ASource as TBCEditorCodeFoldingHint do 61 | begin 62 | Self.FColors.Assign(FColors); 63 | Self.FIndicator.Assign(FIndicator); 64 | Self.FCursor := FCursor; 65 | Self.FFont.Assign(FFont); 66 | end 67 | else 68 | inherited Assign(ASource); 69 | end; 70 | 71 | procedure TBCEditorCodeFoldingHint.SetFont(const AValue: TFont); 72 | begin 73 | FFont.Assign(AValue); 74 | end; 75 | 76 | end. 77 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CompletionProposal.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CompletionProposal.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorCompletionProposalColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FForeground: TColor; 13 | FSelectedBackground: TColor; 14 | FSelectedText: TColor; 15 | public 16 | constructor Create; 17 | procedure Assign(ASource: TPersistent); override; 18 | published 19 | property Background: TColor read FBackground write FBackground default clWindow; 20 | property Foreground: TColor read FForeground write FForeground default clWindowText; 21 | property SelectedBackground: TColor read FSelectedBackground write FSelectedBackground default clHighlight; 22 | property SelectedText: TColor read FSelectedText write FSelectedText default clHighlightText; 23 | end; 24 | 25 | implementation 26 | 27 | constructor TBCEditorCompletionProposalColors.Create; 28 | begin 29 | inherited; 30 | 31 | FBackground := clWindow; 32 | FForeground := clWindowText; 33 | FSelectedBackground := clHighlight; 34 | FSelectedText := clHighlightText; 35 | end; 36 | 37 | procedure TBCEditorCompletionProposalColors.Assign(ASource: TPersistent); 38 | begin 39 | if ASource is TBCEditorCompletionProposalColors then 40 | with ASource as TBCEditorCompletionProposalColors do 41 | begin 42 | Self.FBackground := FBackground; 43 | Self.FForeground := FForeground; 44 | Self.FSelectedBackground := FSelectedBackground; 45 | Self.FSelectedText := FSelectedText; 46 | end 47 | else 48 | inherited Assign(ASource); 49 | end; 50 | 51 | end. 52 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CompletionProposal.Columns.Items.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CompletionProposal.Columns.Items; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes; 7 | 8 | type 9 | TBCEditorCompletionProposalColumnItem = class(TCollectionItem) 10 | strict private 11 | FImageIndex: Integer; 12 | FValue: string; 13 | public 14 | constructor Create(ACollection: TCollection); override; 15 | procedure Assign(ASource: TPersistent); override; 16 | published 17 | property ImageIndex: Integer read FImageIndex write FImageIndex default -1; 18 | property Value: string read FValue write FValue; 19 | end; 20 | 21 | TBCEditorCompletionProposalColumnItems = class(TCollection) 22 | strict private 23 | FOwner: TPersistent; 24 | function GetItem(AIndex: Integer): TBCEditorCompletionProposalColumnItem; 25 | procedure SetItem(AIndex: Integer; AValue: TBCEditorCompletionProposalColumnItem); 26 | protected 27 | function GetOwner: TPersistent; override; 28 | public 29 | constructor Create(AOwner: TPersistent; AItemClass: TCollectionItemClass); 30 | function Add: TBCEditorCompletionProposalColumnItem; 31 | function FindItemID(AID: Integer): TBCEditorCompletionProposalColumnItem; 32 | function Insert(AIndex: Integer): TBCEditorCompletionProposalColumnItem; 33 | property Items[AIndex: Integer]: TBCEditorCompletionProposalColumnItem read GetItem write SetItem; default; 34 | end; 35 | 36 | implementation 37 | 38 | { TBCEditorCompletionProposalColumnItem } 39 | 40 | constructor TBCEditorCompletionProposalColumnItem.Create(ACollection: TCollection); 41 | begin 42 | inherited; 43 | 44 | FImageIndex := -1; 45 | end; 46 | 47 | procedure TBCEditorCompletionProposalColumnItem.Assign(ASource: TPersistent); 48 | begin 49 | if ASource is TBCEditorCompletionProposalColumnItem then 50 | with ASource as TBCEditorCompletionProposalColumnItem do 51 | begin 52 | Self.FImageIndex := FImageIndex; 53 | Self.FValue := FValue; 54 | end 55 | else 56 | inherited Assign(ASource); 57 | end; 58 | 59 | { TBCEditorCompletionProposalColumnItems } 60 | 61 | constructor TBCEditorCompletionProposalColumnItems.Create(AOwner: TPersistent; AItemClass: TCollectionItemClass); 62 | begin 63 | inherited Create(AItemClass); 64 | 65 | FOwner := AOwner; 66 | end; 67 | 68 | function TBCEditorCompletionProposalColumnItems.GetOwner: TPersistent; 69 | begin 70 | Result := FOwner; 71 | end; 72 | 73 | function TBCEditorCompletionProposalColumnItems.GetItem(AIndex: Integer): TBCEditorCompletionProposalColumnItem; 74 | begin 75 | Result := inherited GetItem(AIndex) as TBCEditorCompletionProposalColumnItem; 76 | end; 77 | 78 | procedure TBCEditorCompletionProposalColumnItems.SetItem(AIndex: Integer; AValue: TBCEditorCompletionProposalColumnItem); 79 | begin 80 | inherited SetItem(AIndex, AValue); 81 | end; 82 | 83 | function TBCEditorCompletionProposalColumnItems.Add: TBCEditorCompletionProposalColumnItem; 84 | begin 85 | Result := inherited Add as TBCEditorCompletionProposalColumnItem; 86 | end; 87 | 88 | function TBCEditorCompletionProposalColumnItems.FindItemID(AID: Integer): TBCEditorCompletionProposalColumnItem; 89 | begin 90 | Result := inherited FindItemID(AID) as TBCEditorCompletionProposalColumnItem; 91 | end; 92 | 93 | function TBCEditorCompletionProposalColumnItems.Insert(AIndex: Integer): TBCEditorCompletionProposalColumnItem; 94 | begin 95 | Result := inherited Insert(AIndex) as TBCEditorCompletionProposalColumnItem; 96 | end; 97 | 98 | end. 99 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CompletionProposal.Columns.Title.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CompletionProposal.Columns.Title.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorCompletionProposalColumnTitleColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FBottomBorder: TColor; 13 | FRightBorder: TColor; 14 | public 15 | constructor Create; 16 | procedure Assign(ASource: TPersistent); override; 17 | published 18 | property Background: TColor read FBackground write FBackground default clWindow; 19 | property BottomBorder: TColor read FBottomBorder write FBottomBorder default clBtnFace; 20 | property RightBorder: TColor read FRightBorder write FRightBorder default clBtnFace; 21 | end; 22 | 23 | implementation 24 | 25 | constructor TBCEditorCompletionProposalColumnTitleColors.Create; 26 | begin 27 | inherited; 28 | 29 | FBackground := clWindow; 30 | FBottomBorder := clBtnFace; 31 | FRightBorder := clBtnFace; 32 | end; 33 | 34 | procedure TBCEditorCompletionProposalColumnTitleColors.Assign(ASource: TPersistent); 35 | begin 36 | if ASource is TBCEditorCompletionProposalColumnTitleColors then 37 | with ASource as TBCEditorCompletionProposalColumnTitleColors do 38 | begin 39 | Self.FBackground := FBackground; 40 | Self.FBottomBorder := FBottomBorder; 41 | Self.FRightBorder := FRightBorder; 42 | end 43 | else 44 | inherited Assign(ASource); 45 | end; 46 | 47 | end. 48 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CompletionProposal.Columns.Title.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CompletionProposal.Columns.Title; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Editor.CompletionProposal.Columns.Title.Colors; 7 | 8 | type 9 | TBCEditorCompletionProposalColumnTitle = class(TPersistent) 10 | strict private 11 | FCaption: string; 12 | FColors: TBCEditorCompletionProposalColumnTitleColors; 13 | FFont: TFont; 14 | FVisible: Boolean; 15 | procedure SetFont(const AValue: TFont); 16 | public 17 | constructor Create; 18 | destructor Destroy; override; 19 | procedure Assign(ASource: TPersistent); override; 20 | published 21 | property Caption: string read FCaption write FCaption; 22 | property Colors: TBCEditorCompletionProposalColumnTitleColors read FColors write FColors; 23 | property Font: TFont read FFont write SetFont; 24 | property Visible: Boolean read FVisible write FVisible default False; 25 | end; 26 | 27 | implementation 28 | 29 | constructor TBCEditorCompletionProposalColumnTitle.Create; 30 | begin 31 | inherited; 32 | 33 | FColors := TBCEditorCompletionProposalColumnTitleColors.Create; 34 | FFont := TFont.Create; 35 | FFont.Name := 'Courier New'; 36 | FFont.Size := 8; 37 | FVisible := False; 38 | end; 39 | 40 | destructor TBCEditorCompletionProposalColumnTitle.Destroy; 41 | begin 42 | FColors.Free; 43 | FFont.Free; 44 | 45 | inherited; 46 | end; 47 | 48 | procedure TBCEditorCompletionProposalColumnTitle.Assign(ASource: TPersistent); 49 | begin 50 | if ASource is TBCEditorCompletionProposalColumnTitle then 51 | with ASource as TBCEditorCompletionProposalColumnTitle do 52 | begin 53 | Self.FCaption := FCaption; 54 | Self.FColors.Assign(FColors); 55 | Self.FFont.Assign(FFont); 56 | Self.FVisible := FVisible; 57 | end 58 | else 59 | inherited Assign(ASource); 60 | end; 61 | 62 | procedure TBCEditorCompletionProposalColumnTitle.SetFont(const AValue: TFont); 63 | begin 64 | FFont.Assign(AValue); 65 | end; 66 | 67 | end. 68 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.CompletionProposal.Trigger.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.CompletionProposal.Trigger; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes; 7 | 8 | type 9 | TBCEditorCompletionProposalTrigger = class(TPersistent) 10 | strict private 11 | FChars: string; 12 | FEnabled: Boolean; 13 | FInterval: Integer; 14 | public 15 | constructor Create; 16 | procedure Assign(ASource: TPersistent); override; 17 | published 18 | property Chars: string read FChars write FChars; 19 | property Enabled: Boolean read FEnabled write FEnabled; 20 | property Interval: Integer read FInterval write FInterval default 1000; 21 | end; 22 | 23 | implementation 24 | 25 | constructor TBCEditorCompletionProposalTrigger.Create; 26 | begin 27 | inherited; 28 | 29 | FChars := '.'; 30 | FEnabled := False; 31 | FInterval := 1000; 32 | end; 33 | 34 | procedure TBCEditorCompletionProposalTrigger.Assign(ASource: TPersistent); 35 | begin 36 | if ASource is TBCEditorCompletionProposalTrigger then 37 | with ASource as TBCEditorCompletionProposalTrigger do 38 | begin 39 | Self.FChars := FChars; 40 | Self.FEnabled := FEnabled; 41 | Self.FInterval := FInterval; 42 | end 43 | else 44 | inherited Assign(ASource); 45 | end; 46 | 47 | end. 48 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Directories.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Directories; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes; 7 | 8 | type 9 | TBCEditorDirectories = class(TPersistent) 10 | strict private 11 | FColors: string; 12 | FHighlighters: string; 13 | public 14 | constructor Create; 15 | procedure Assign(ASource: TPersistent); override; 16 | published 17 | property Colors: string read FColors write FColors; 18 | property Highlighters: string read FHighlighters write FHighlighters; 19 | end; 20 | 21 | implementation 22 | 23 | constructor TBCEditorDirectories.Create; 24 | begin 25 | inherited; 26 | 27 | FColors := 'Colors'; 28 | FHighlighters := 'Highlighters' 29 | end; 30 | 31 | procedure TBCEditorDirectories.Assign(ASource: TPersistent); 32 | begin 33 | if Assigned(ASource) and (ASource is TBCEditorDirectories) then 34 | with ASource as TBCEditorDirectories do 35 | begin 36 | Self.FColors := FColors; 37 | Self.FHighlighters := FHighlighters; 38 | end 39 | else 40 | inherited Assign(ASource); 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.LeftMargin.Bookmarks.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.LeftMargin.Bookmarks; 2 | 3 | interface 4 | 5 | uses 6 | Vcl.Controls, System.Classes, Vcl.Graphics, Vcl.ImgList; 7 | 8 | type 9 | TBCEditorLeftMarginBookMarks = class(TPersistent) 10 | strict private 11 | FImages: TCustomImageList; 12 | FLeftMargin: Integer; 13 | FOnChange: TNotifyEvent; 14 | FOwner: TComponent; 15 | FShortCuts: Boolean; 16 | FVisible: Boolean; 17 | procedure DoChange; 18 | procedure SetImages(const AValue: TCustomImageList); 19 | procedure SetVisible(AValue: Boolean); 20 | public 21 | constructor Create(AOwner: TComponent); 22 | procedure Assign(ASource: TPersistent); override; 23 | published 24 | property Images: TCustomImageList read FImages write SetImages; 25 | property LeftMargin: Integer read FLeftMargin write FLeftMargin default 2; 26 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 27 | property ShortCuts: Boolean read FShortCuts write FShortCuts default True; 28 | property Visible: Boolean read FVisible write SetVisible default True; 29 | end; 30 | 31 | implementation 32 | 33 | constructor TBCEditorLeftMarginBookMarks.Create(AOwner: TComponent); 34 | begin 35 | inherited Create; 36 | 37 | FOwner := AOwner; 38 | FLeftMargin := 2; 39 | FShortCuts := True; 40 | FVisible := True; 41 | end; 42 | 43 | procedure TBCEditorLeftMarginBookMarks.Assign(ASource: TPersistent); 44 | begin 45 | if Assigned(ASource) and (ASource is TBCEditorLeftMarginBookMarks) then 46 | with ASource as TBCEditorLeftMarginBookMarks do 47 | begin 48 | Self.FImages := FImages; 49 | Self.FLeftMargin := FLeftMargin; 50 | Self.FShortCuts := FShortCuts; 51 | Self.FVisible := FVisible; 52 | if Assigned(Self.FOnChange) then 53 | Self.FOnChange(Self); 54 | end 55 | else 56 | inherited Assign(ASource); 57 | end; 58 | 59 | procedure TBCEditorLeftMarginBookMarks.DoChange; 60 | begin 61 | if Assigned(FOnChange) then 62 | FOnChange(Self); 63 | end; 64 | 65 | procedure TBCEditorLeftMarginBookMarks.SetImages(const AValue: TCustomImageList); 66 | begin 67 | if FImages <> AValue then 68 | begin 69 | FImages := AValue; 70 | if Assigned(FImages) then 71 | FImages.FreeNotification(FOwner); 72 | DoChange; 73 | end; 74 | end; 75 | 76 | procedure TBCEditorLeftMarginBookMarks.SetVisible(AValue: Boolean); 77 | begin 78 | if FVisible <> AValue then 79 | begin 80 | FVisible := AValue; 81 | DoChange; 82 | end; 83 | end; 84 | 85 | end. 86 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.LeftMargin.Border.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.LeftMargin.Border; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Types; 7 | 8 | type 9 | TBCEditorLeftMarginBorder = class(TPersistent) 10 | strict private 11 | FOnChange: TNotifyEvent; 12 | FStyle: TBCEditorLeftMarginBorderStyle; 13 | procedure SetStyle(const AValue: TBCEditorLeftMarginBorderStyle); 14 | procedure DoChange; 15 | public 16 | constructor Create; 17 | procedure Assign(ASource: TPersistent); override; 18 | published 19 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 20 | property Style: TBCEditorLeftMarginBorderStyle read FStyle write SetStyle default mbsNone; 21 | end; 22 | 23 | implementation 24 | 25 | constructor TBCEditorLeftMarginBorder.Create; 26 | begin 27 | inherited; 28 | 29 | FStyle := mbsNone; 30 | end; 31 | 32 | procedure TBCEditorLeftMarginBorder.DoChange; 33 | begin 34 | if Assigned(FOnChange) then 35 | FOnChange(Self); 36 | end; 37 | 38 | procedure TBCEditorLeftMarginBorder.Assign(ASource: TPersistent); 39 | begin 40 | if Assigned(ASource) and (ASource is TBCEditorLeftMarginBorder) then 41 | with ASource as TBCEditorLeftMarginBorder do 42 | begin 43 | Self.FStyle := FStyle; 44 | Self.DoChange; 45 | end 46 | else 47 | inherited Assign(ASource); 48 | end; 49 | 50 | procedure TBCEditorLeftMarginBorder.SetStyle(const AValue: TBCEditorLeftMarginBorderStyle); 51 | begin 52 | FStyle := AValue; 53 | DoChange 54 | end; 55 | 56 | end. 57 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.LeftMargin.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.LeftMargin.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorLeftMarginColors = class(TPersistent) 10 | strict private 11 | FActiveLineBackground: TColor; 12 | FBackground: TColor; 13 | FBookmarkBackground: TColor; 14 | FBookmarkPanelBackground: TColor; 15 | FBorder: TColor; 16 | FLineNumberLine: TColor; 17 | FLineStateModified: TColor; 18 | FLineStateNormal: TColor; 19 | FMarkDefaultBackground: TColor; 20 | public 21 | constructor Create; 22 | procedure Assign(ASource: TPersistent); override; 23 | published 24 | property ActiveLineBackground: TColor read FActiveLineBackground write FActiveLineBackground default clActiveLineBackground; 25 | property Background: TColor read FBackground write FBackground default clLeftMarginBackground; 26 | property BookmarkBackground: TColor read FBookmarkBackground write FBookmarkBackground default clNone; 27 | property BookmarkPanelBackground: TColor read FBookmarkPanelBackground write FBookmarkPanelBackground default clLeftMarginBackground; 28 | property Border: TColor read FBorder write FBorder default clLeftMarginBackground; 29 | property LineNumberLine: TColor read FLineNumberLine write FLineNumberLine default clLeftMarginFontForeground; 30 | property LineStateModified: TColor read FLineStateModified write FLineStateModified default clYellow; 31 | property LineStateNormal: TColor read FLineStateNormal write FLineStateNormal default clLime; 32 | property MarkDefaultBackground: TColor read FMarkDefaultBackground write FMarkDefaultBackground default clNone; 33 | end; 34 | 35 | implementation 36 | 37 | constructor TBCEditorLeftMarginColors.Create; 38 | begin 39 | inherited; 40 | 41 | FActiveLineBackground := clActiveLineBackground; 42 | FBackground := clLeftMarginBackground; 43 | FBookmarkBackground := clNone; 44 | FBookmarkPanelBackground := clLeftMarginBackground; 45 | FBorder := clLeftMarginBackground; 46 | FLineNumberLine := clLeftMarginFontForeground; 47 | FLineStateModified := clYellow; 48 | FLineStateNormal := clLime; 49 | FMarkDefaultBackground := clNone; 50 | end; 51 | 52 | procedure TBCEditorLeftMarginColors.Assign(ASource: TPersistent); 53 | begin 54 | if ASource is TBCEditorLeftMarginColors then 55 | with ASource as TBCEditorLeftMarginColors do 56 | begin 57 | Self.FActiveLineBackground := FActiveLineBackground; 58 | Self.FBackground := FBackground; 59 | Self.FBookmarkPanelBackground := FBookmarkPanelBackground; 60 | Self.FBorder := FBorder; 61 | Self.FLineNumberLine := FLineNumberLine; 62 | Self.FLineStateModified := FLineStateModified; 63 | Self.FLineStateNormal := FLineStateNormal; 64 | Self.FMarkDefaultBackground := FMarkDefaultBackground; 65 | end 66 | else 67 | inherited Assign(ASource); 68 | end; 69 | 70 | end. 71 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.LeftMargin.LineNumbers.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.LeftMargin.LineNumbers; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Types; 7 | 8 | type 9 | TBCEditorLeftMarginLineNumbers = class(TPersistent) 10 | strict private 11 | FAutosizeDigitCount: Integer; 12 | FDigitCount: Integer; 13 | FOnChange: TNotifyEvent; 14 | FOptions: TBCEditorLeftMarginLineNumberOptions; 15 | FStartFrom: Integer; 16 | FVisible: Boolean; 17 | procedure DoChange; 18 | procedure SetDigitCount(AValue: Integer); 19 | procedure SetOptions(const AValue: TBCEditorLeftMarginLineNumberOptions); 20 | procedure SetStartFrom(const AValue: Integer); 21 | procedure SetVisible(const AValue: Boolean); 22 | public 23 | constructor Create; 24 | procedure Assign(ASource: TPersistent); override; 25 | procedure SetOption(const AOption: TBCEditorLeftMarginLineNumberOption; const AEnabled: Boolean); 26 | property AutosizeDigitCount: Integer read FAutosizeDigitCount write FAutosizeDigitCount; 27 | published 28 | property DigitCount: Integer read FDigitCount write SetDigitCount default 4; 29 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 30 | property Options: TBCEditorLeftMarginLineNumberOptions read FOptions write SetOptions default [lnoIntens]; 31 | property StartFrom: Integer read FStartFrom write SetStartFrom default 1; 32 | property Visible: Boolean read FVisible write SetVisible default True; 33 | end; 34 | 35 | implementation 36 | 37 | uses 38 | BCEditor.Utils; 39 | 40 | constructor TBCEditorLeftMarginLineNumbers.Create; 41 | begin 42 | inherited; 43 | 44 | FAutosizeDigitCount := 4; 45 | FDigitCount := 4; 46 | FOptions := [lnoIntens]; 47 | FStartFrom := 1; 48 | FVisible := True; 49 | end; 50 | 51 | procedure TBCEditorLeftMarginLineNumbers.Assign(ASource: TPersistent); 52 | begin 53 | if Assigned(ASource) and (ASource is TBCEditorLeftMarginLineNumbers) then 54 | with ASource as TBCEditorLeftMarginLineNumbers do 55 | begin 56 | Self.FAutosizeDigitCount := FAutosizeDigitCount; 57 | Self.FDigitCount := FDigitCount; 58 | Self.FOptions := FOptions; 59 | Self.FStartFrom := FStartFrom; 60 | Self.FVisible := FVisible; 61 | 62 | Self.DoChange; 63 | end 64 | else 65 | inherited Assign(ASource); 66 | end; 67 | 68 | procedure TBCEditorLeftMarginLineNumbers.DoChange; 69 | begin 70 | if Assigned(FOnChange) then 71 | FOnChange(Self); 72 | end; 73 | 74 | procedure TBCEditorLeftMarginLineNumbers.SetOption(const AOption: TBCEditorLeftMarginLineNumberOption; const AEnabled: Boolean); 75 | begin 76 | if AEnabled then 77 | Include(FOptions, AOption) 78 | else 79 | Exclude(FOptions, AOption); 80 | end; 81 | 82 | procedure TBCEditorLeftMarginLineNumbers.SetDigitCount(AValue: Integer); 83 | begin 84 | AValue := MinMax(AValue, 2, 12); 85 | if FDigitCount <> AValue then 86 | begin 87 | FDigitCount := AValue; 88 | FAutosizeDigitCount := FDigitCount; 89 | DoChange 90 | end; 91 | end; 92 | 93 | procedure TBCEditorLeftMarginLineNumbers.SetOptions(const AValue: TBCEditorLeftMarginLineNumberOptions); 94 | begin 95 | if FOptions <> AValue then 96 | begin 97 | FOptions := AValue; 98 | DoChange 99 | end; 100 | end; 101 | 102 | procedure TBCEditorLeftMarginLineNumbers.SetStartFrom(const AValue: Integer); 103 | begin 104 | if FStartFrom <> AValue then 105 | begin 106 | FStartFrom := AValue; 107 | if FStartFrom < 0 then 108 | FStartFrom := 0; 109 | DoChange 110 | end; 111 | end; 112 | 113 | procedure TBCEditorLeftMarginLineNumbers.SetVisible(const AValue: Boolean); 114 | begin 115 | if FVisible <> AValue then 116 | begin 117 | FVisible := AValue; 118 | DoChange 119 | end; 120 | end; 121 | 122 | end. 123 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.LeftMargin.LineState.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.LeftMargin.LineState; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes; 7 | 8 | type 9 | TBCEditorLeftMarginLineState = class(TPersistent) 10 | strict private 11 | FEnabled: Boolean; 12 | FOnChange: TNotifyEvent; 13 | FWidth: Integer; 14 | procedure DoChange; 15 | procedure SetEnabled(const AValue: Boolean); 16 | procedure SetOnChange(AValue: TNotifyEvent); 17 | procedure SetWidth(const AValue: Integer); 18 | public 19 | constructor Create; 20 | procedure Assign(ASource: TPersistent); override; 21 | published 22 | property Enabled: Boolean read FEnabled write SetEnabled default True; 23 | property OnChange: TNotifyEvent read FOnChange write SetOnChange; 24 | property Width: Integer read FWidth write SetWidth default 2; 25 | end; 26 | 27 | implementation 28 | 29 | constructor TBCEditorLeftMarginLineState.Create; 30 | begin 31 | inherited; 32 | 33 | FEnabled := True; 34 | FWidth := 2; 35 | end; 36 | 37 | procedure TBCEditorLeftMarginLineState.Assign(ASource: TPersistent); 38 | begin 39 | if Assigned(ASource) and (ASource is TBCEditorLeftMarginLineState) then 40 | with ASource as TBCEditorLeftMarginLineState do 41 | begin 42 | Self.FEnabled := FEnabled; 43 | Self.FWidth := FWidth; 44 | Self.DoChange; 45 | end 46 | else 47 | inherited Assign(ASource); 48 | end; 49 | 50 | procedure TBCEditorLeftMarginLineState.SetOnChange(AValue: TNotifyEvent); 51 | begin 52 | FOnChange := AValue; 53 | end; 54 | 55 | procedure TBCEditorLeftMarginLineState.DoChange; 56 | begin 57 | if Assigned(FOnChange) then 58 | FOnChange(Self); 59 | end; 60 | 61 | procedure TBCEditorLeftMarginLineState.SetEnabled(const AValue: Boolean); 62 | begin 63 | if FEnabled <> AValue then 64 | begin 65 | FEnabled := AValue; 66 | DoChange 67 | end; 68 | end; 69 | 70 | procedure TBCEditorLeftMarginLineState.SetWidth(const AValue: Integer); 71 | begin 72 | if FWidth <> AValue then 73 | begin 74 | FWidth := AValue; 75 | DoChange 76 | end; 77 | end; 78 | 79 | end. 80 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.LeftMargin.Marks.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.LeftMargin.Marks; 2 | 3 | interface 4 | 5 | uses 6 | Vcl.Controls, System.Classes, Vcl.Graphics, Vcl.ImgList; 7 | 8 | type 9 | TBCEditorLeftMarginMarks = class(TPersistent) 10 | strict private 11 | FDefaultImageIndex: Integer; 12 | FImages: TCustomImageList; 13 | FLeftMargin: Integer; 14 | FOnChange: TNotifyEvent; 15 | FOverlappingOffset: Integer; 16 | FOwner: TComponent; 17 | FShortCuts: Boolean; 18 | FVisible: Boolean; 19 | procedure DoChange; 20 | procedure SetImages(const AValue: TCustomImageList); 21 | procedure SetVisible(AValue: Boolean); 22 | public 23 | constructor Create(AOwner: TComponent); 24 | procedure Assign(ASource: TPersistent); override; 25 | published 26 | property DefaultImageIndex: Integer read FDefaultImageIndex write FDefaultImageIndex default -1; 27 | property Images: TCustomImageList read FImages write SetImages; 28 | property LeftMargin: Integer read FLeftMargin write FLeftMargin default 2; 29 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 30 | property OverlappingOffset: Integer read FOverlappingOffset write FOverlappingOffset default 4; 31 | property Visible: Boolean read FVisible write SetVisible default True; 32 | end; 33 | 34 | implementation 35 | 36 | constructor TBCEditorLeftMarginMarks.Create(AOwner: TComponent); 37 | begin 38 | inherited Create; 39 | 40 | FOwner := AOwner; 41 | FDefaultImageIndex := -1; 42 | FLeftMargin := 2; 43 | FOverlappingOffset := 4; 44 | FShortCuts := True; 45 | FVisible := True; 46 | end; 47 | 48 | procedure TBCEditorLeftMarginMarks.Assign(ASource: TPersistent); 49 | begin 50 | if Assigned(ASource) and (ASource is TBCEditorLeftMarginMarks) then 51 | with ASource as TBCEditorLeftMarginMarks do 52 | begin 53 | Self.FDefaultImageIndex := FDefaultImageIndex; 54 | Self.FImages := FImages; 55 | Self.FLeftMargin := FLeftMargin; 56 | Self.FOverlappingOffset := FOverlappingOffset; 57 | Self.FShortCuts := FShortCuts; 58 | Self.FVisible := FVisible; 59 | if Assigned(Self.FOnChange) then 60 | Self.FOnChange(Self); 61 | end 62 | else 63 | inherited Assign(ASource); 64 | end; 65 | 66 | procedure TBCEditorLeftMarginMarks.DoChange; 67 | begin 68 | if Assigned(FOnChange) then 69 | FOnChange(Self); 70 | end; 71 | 72 | procedure TBCEditorLeftMarginMarks.SetImages(const AValue: TCustomImageList); 73 | begin 74 | if FImages <> AValue then 75 | begin 76 | FImages := AValue; 77 | if Assigned(FImages) then 78 | FImages.FreeNotification(FOwner); 79 | DoChange; 80 | end; 81 | end; 82 | 83 | procedure TBCEditorLeftMarginMarks.SetVisible(AValue: Boolean); 84 | begin 85 | if FVisible <> AValue then 86 | begin 87 | FVisible := AValue; 88 | DoChange; 89 | end; 90 | end; 91 | 92 | end. 93 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.LeftMargin.MarksPanel.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.LeftMargin.MarksPanel; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Types; 7 | 8 | type 9 | TBCEditorLeftMarginMarksPanel = class(TPersistent) 10 | strict private 11 | FOnChange: TNotifyEvent; 12 | FOptions: TBCEditorLeftMarginBookMarkPanelOptions; 13 | FVisible: Boolean; 14 | FWidth: Integer; 15 | procedure DoChange; 16 | procedure SetWidth(AValue: Integer); 17 | procedure SetVisible(const AValue: Boolean); 18 | public 19 | constructor Create; 20 | procedure Assign(ASource: TPersistent); override; 21 | published 22 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 23 | property Options: TBCEditorLeftMarginBookMarkPanelOptions read FOptions write FOptions default [bpoToggleBookmarkByClick]; 24 | property Visible: Boolean read FVisible write SetVisible default True; 25 | property Width: Integer read FWidth write SetWidth default 20; 26 | end; 27 | 28 | implementation 29 | 30 | uses 31 | System.Math; 32 | 33 | constructor TBCEditorLeftMarginMarksPanel.Create; 34 | begin 35 | inherited; 36 | 37 | FWidth := 20; 38 | FOptions := [bpoToggleBookmarkByClick]; 39 | FVisible := True; 40 | end; 41 | 42 | procedure TBCEditorLeftMarginMarksPanel.Assign(ASource: TPersistent); 43 | begin 44 | if Assigned(ASource) and (ASource is TBCEditorLeftMarginMarksPanel) then 45 | with ASource as TBCEditorLeftMarginMarksPanel do 46 | begin 47 | Self.FVisible := FVisible; 48 | Self.FWidth := FWidth; 49 | if Assigned(Self.FOnChange) then 50 | Self.FOnChange(Self); 51 | end 52 | else 53 | inherited Assign(ASource); 54 | end; 55 | 56 | procedure TBCEditorLeftMarginMarksPanel.DoChange; 57 | begin 58 | if Assigned(FOnChange) then 59 | FOnChange(Self); 60 | end; 61 | 62 | procedure TBCEditorLeftMarginMarksPanel.SetWidth(AValue: Integer); 63 | begin 64 | AValue := Max(0, AValue); 65 | if FWidth <> AValue then 66 | begin 67 | FWidth := AValue; 68 | DoChange 69 | end; 70 | end; 71 | 72 | procedure TBCEditorLeftMarginMarksPanel.SetVisible(const AValue: Boolean); 73 | begin 74 | if FVisible <> AValue then 75 | begin 76 | FVisible := AValue; 77 | DoChange 78 | end; 79 | end; 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.MatchingPair.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.MatchingPair.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorMatchingPairColors = class(TPersistent) 10 | strict private 11 | FMatched: TColor; 12 | FUnderline: TColor; 13 | FUnmatched: TColor; 14 | public 15 | constructor Create; 16 | procedure Assign(ASource: TPersistent); override; 17 | published 18 | property Matched: TColor read FMatched write FMatched default clAqua; 19 | property Underline: TColor read FUnderline write FUnderline default clMatchingPairUnderline; 20 | property Unmatched: TColor read FUnmatched write FUnmatched default clYellow; 21 | end; 22 | 23 | implementation 24 | 25 | constructor TBCEditorMatchingPairColors.Create; 26 | begin 27 | inherited; 28 | 29 | FMatched := clAqua; 30 | FUnderline := clMatchingPairUnderline; 31 | FUnmatched := clYellow; 32 | end; 33 | 34 | procedure TBCEditorMatchingPairColors.Assign(ASource: TPersistent); 35 | begin 36 | if ASource is TBCEditorMatchingPairColors then 37 | with ASource as TBCEditorMatchingPairColors do 38 | begin 39 | Self.FMatched := FMatched; 40 | Self.FUnmatched := FUnmatched; 41 | end 42 | else 43 | inherited Assign(ASource); 44 | end; 45 | 46 | end. 47 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.MatchingPair.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.MatchingPair; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Editor.MatchingPair.Colors, BCEditor.Types; 7 | 8 | type 9 | TBCEditorMatchingPair = class(TPersistent) 10 | strict private 11 | FColors: TBCEditorMatchingPairColors; 12 | FEnabled: Boolean; 13 | FOptions: TBCEditorMatchingPairOptions; 14 | procedure SetColors(const AValue: TBCEditorMatchingPairColors); 15 | public 16 | constructor Create; 17 | destructor Destroy; override; 18 | procedure Assign(ASource: TPersistent); override; 19 | procedure SetOption(const AOption: TBCEditorMatchingPairOption; const AEnabled: Boolean); 20 | published 21 | property Colors: TBCEditorMatchingPairColors read FColors write SetColors; 22 | property Enabled: Boolean read FEnabled write FEnabled; 23 | property Options: TBCEditorMatchingPairOptions read FOptions write FOptions default [mpoUseMatchedColor]; 24 | end; 25 | 26 | implementation 27 | 28 | constructor TBCEditorMatchingPair.Create; 29 | begin 30 | inherited; 31 | 32 | FColors := TBCEditorMatchingPairColors.Create; 33 | FEnabled := True; 34 | FOptions := [mpoUseMatchedColor]; 35 | end; 36 | 37 | destructor TBCEditorMatchingPair.Destroy; 38 | begin 39 | FColors.Free; 40 | 41 | inherited; 42 | end; 43 | 44 | procedure TBCEditorMatchingPair.Assign(ASource: TPersistent); 45 | begin 46 | if Assigned(ASource) and (ASource is TBCEditorMatchingPair) then 47 | with ASource as TBCEditorMatchingPair do 48 | begin 49 | Self.FEnabled := FEnabled; 50 | Self.FColors.Assign(FColors); 51 | end 52 | else 53 | inherited Assign(ASource); 54 | end; 55 | 56 | procedure TBCEditorMatchingPair.SetOption(const AOption: TBCEditorMatchingPairOption; const AEnabled: Boolean); 57 | begin 58 | if AEnabled then 59 | Include(FOptions, AOption) 60 | else 61 | Exclude(FOptions, AOption); 62 | end; 63 | 64 | procedure TBCEditorMatchingPair.SetColors(const AValue: TBCEditorMatchingPairColors); 65 | begin 66 | FColors.Assign(AValue); 67 | end; 68 | 69 | end. 70 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Minimap.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Minimap.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorMinimapColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FBookmark: TColor; 13 | FVisibleLines: TColor; 14 | FOnChange: TNotifyEvent; 15 | procedure SetBackground(const AValue: TColor); 16 | procedure SetBookmark(const AValue: TColor); 17 | procedure SetVisibleLines(const AValue: TColor); 18 | procedure DoChange; 19 | public 20 | constructor Create; 21 | procedure Assign(ASource: TPersistent); override; 22 | published 23 | property Background: TColor read FBackground write SetBackground default clNone; 24 | property Bookmark: TColor read FBookmark write SetBookmark default clMinimapBookmark; 25 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 26 | property VisibleLines: TColor read FVisibleLines write SetVisibleLines default clMinimapVisibleLines; 27 | end; 28 | 29 | implementation 30 | 31 | constructor TBCEditorMinimapColors.Create; 32 | begin 33 | inherited; 34 | 35 | FBackground := clNone; 36 | FBookmark := clMinimapBookmark; 37 | FVisibleLines := clMinimapVisibleLines; 38 | end; 39 | 40 | procedure TBCEditorMinimapColors.Assign(ASource: TPersistent); 41 | begin 42 | if ASource is TBCEditorMinimapColors then 43 | with ASource as TBCEditorMinimapColors do 44 | begin 45 | Self.FBackground := FBackground; 46 | Self.FBookmark := FBookmark; 47 | Self.FVisibleLines := FVisibleLines; 48 | Self.DoChange; 49 | end 50 | else 51 | inherited Assign(ASource); 52 | end; 53 | 54 | procedure TBCEditorMinimapColors.DoChange; 55 | begin 56 | if Assigned(FOnChange) then 57 | FOnChange(Self); 58 | end; 59 | 60 | procedure TBCEditorMinimapColors.SetBackground(const AValue: TColor); 61 | begin 62 | if FBackground <> AValue then 63 | begin 64 | FBackground := AValue; 65 | DoChange; 66 | end; 67 | end; 68 | 69 | procedure TBCEditorMinimapColors.SetBookmark(const AValue: TColor); 70 | begin 71 | if FBookmark <> AValue then 72 | begin 73 | FBookmark := AValue; 74 | DoChange; 75 | end; 76 | end; 77 | 78 | procedure TBCEditorMinimapColors.SetVisibleLines(const AValue: TColor); 79 | begin 80 | if FVisibleLines <> AValue then 81 | begin 82 | FVisibleLines := AValue; 83 | DoChange; 84 | end; 85 | end; 86 | 87 | end. 88 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Minimap.Indicator.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Minimap.Indicator; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Types; 7 | 8 | type 9 | TBCEditorMinimapIndicator = class(TPersistent) 10 | strict private 11 | FAlphaBlending: Byte; 12 | FOnChange: TNotifyEvent; 13 | FOptions: TBCEditorMinimapIndicatorOptions; 14 | procedure DoChange; 15 | procedure SetAlphaBlending(const AValue: Byte); 16 | public 17 | constructor Create; 18 | procedure Assign(ASource: TPersistent); override; 19 | procedure SetOption(const AOption: TBCEditorMinimapIndicatorOption; const AEnabled: Boolean); 20 | published 21 | property AlphaBlending: Byte read FAlphaBlending write SetAlphaBlending default 96; 22 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 23 | property Options: TBCEditorMinimapIndicatorOptions read FOptions write FOptions default []; 24 | end; 25 | 26 | implementation 27 | 28 | constructor TBCEditorMinimapIndicator.Create; 29 | begin 30 | inherited; 31 | 32 | FAlphaBlending := 96; 33 | FOptions := []; 34 | end; 35 | 36 | procedure TBCEditorMinimapIndicator.Assign(ASource: TPersistent); 37 | begin 38 | if Assigned(ASource) and (ASource is TBCEditorMinimapIndicator) then 39 | with ASource as TBCEditorMinimapIndicator do 40 | begin 41 | Self.FAlphaBlending := FAlphaBlending; 42 | Self.FOptions := FOptions; 43 | Self.DoChange; 44 | end 45 | else 46 | inherited Assign(ASource); 47 | end; 48 | 49 | procedure TBCEditorMinimapIndicator.SetOption(const AOption: TBCEditorMinimapIndicatorOption; const AEnabled: Boolean); 50 | begin 51 | if AEnabled then 52 | Include(FOptions, AOption) 53 | else 54 | Exclude(FOptions, AOption); 55 | end; 56 | 57 | 58 | procedure TBCEditorMinimapIndicator.DoChange; 59 | begin 60 | if Assigned(FOnChange) then 61 | FOnChange(Self); 62 | end; 63 | 64 | procedure TBCEditorMinimapIndicator.SetAlphaBlending(const AValue: Byte); 65 | begin 66 | if FAlphaBlending <> AValue then 67 | begin 68 | FAlphaBlending := AValue; 69 | DoChange; 70 | end; 71 | end; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Minimap.Shadow.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Minimap.Shadow; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorMinimapShadow = class(TPersistent) 10 | strict private 11 | FAlphaBlending: Byte; 12 | FColor: TColor; 13 | FOnChange: TNotifyEvent; 14 | FVisible: Boolean; 15 | FWidth: Integer; 16 | procedure DoChange; 17 | procedure SetAlphaBlending(const AValue: Byte); 18 | procedure SetColor(const AValue: TColor); 19 | procedure SetVisible(const AValue: Boolean); 20 | procedure SetWidth(const AValue: Integer); 21 | public 22 | constructor Create; 23 | procedure Assign(ASource: TPersistent); override; 24 | published 25 | property AlphaBlending: Byte read FAlphaBlending write SetAlphaBlending default 96; 26 | property Color: TColor read FColor write SetColor default clBlack; 27 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 28 | property Visible: Boolean read FVisible write SetVisible default False; 29 | property Width: Integer read FWidth write SetWidth default 8; 30 | end; 31 | 32 | implementation 33 | 34 | constructor TBCEditorMinimapShadow.Create; 35 | begin 36 | inherited; 37 | 38 | FAlphaBlending := 96; 39 | FColor := clBlack; 40 | FVisible := False; 41 | FWidth := 8; 42 | end; 43 | 44 | procedure TBCEditorMinimapShadow.Assign(ASource: TPersistent); 45 | begin 46 | if Assigned(ASource) and (ASource is TBCEditorMinimapShadow) then 47 | with ASource as TBCEditorMinimapShadow do 48 | begin 49 | Self.FAlphaBlending := FAlphaBlending; 50 | Self.FColor := FColor; 51 | Self.FVisible := FVisible; 52 | Self.DoChange; 53 | end 54 | else 55 | inherited Assign(ASource); 56 | end; 57 | 58 | procedure TBCEditorMinimapShadow.DoChange; 59 | begin 60 | if Assigned(FOnChange) then 61 | FOnChange(Self); 62 | end; 63 | 64 | procedure TBCEditorMinimapShadow.SetAlphaBlending(const AValue: Byte); 65 | begin 66 | if FAlphaBlending <> AValue then 67 | begin 68 | FAlphaBlending := AValue; 69 | DoChange; 70 | end; 71 | end; 72 | 73 | procedure TBCEditorMinimapShadow.SetColor(const AValue: TColor); 74 | begin 75 | if FColor <> AValue then 76 | begin 77 | FColor := AValue; 78 | DoChange; 79 | end; 80 | end; 81 | 82 | procedure TBCEditorMinimapShadow.SetVisible(const AValue: Boolean); 83 | begin 84 | if FVisible <> AValue then 85 | begin 86 | FVisible := AValue; 87 | DoChange; 88 | end; 89 | end; 90 | 91 | procedure TBCEditorMinimapShadow.SetWidth(const AValue: Integer); 92 | begin 93 | if FWidth <> AValue then 94 | begin 95 | FWidth := AValue; 96 | DoChange; 97 | end; 98 | end; 99 | 100 | end. 101 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Replace.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Replace; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Types; 7 | 8 | type 9 | TBCEditorReplace = class(TPersistent) 10 | strict private 11 | FAction: TBCEditorReplaceActionOption; 12 | FEngine: TBCEditorSearchEngine; 13 | FOnChange: TBCEditorReplaceChangeEvent; 14 | FOptions: TBCEditorReplaceOptions; 15 | procedure SetEngine(const AValue: TBCEditorSearchEngine); 16 | public 17 | constructor Create; 18 | procedure Assign(ASource: TPersistent); override; 19 | procedure SetOption(const AOption: TBCEditorReplaceOption; const AEnabled: Boolean); 20 | published 21 | property Action: TBCEditorReplaceActionOption read FAction write FAction default eraReplace; 22 | property Engine: TBCEditorSearchEngine read FEngine write SetEngine default seNormal; 23 | property OnChange: TBCEditorReplaceChangeEvent read FOnChange write FOnChange; 24 | property Options: TBCEditorReplaceOptions read FOptions write FOptions default [roPrompt]; 25 | end; 26 | 27 | implementation 28 | 29 | constructor TBCEditorReplace.Create; 30 | begin 31 | inherited; 32 | 33 | FAction := eraReplace; 34 | FEngine := seNormal; 35 | FOptions := [roPrompt]; 36 | end; 37 | 38 | procedure TBCEditorReplace.Assign(ASource: TPersistent); 39 | begin 40 | if Assigned(ASource) and (ASource is TBCEditorReplace) then 41 | with ASource as TBCEditorReplace do 42 | begin 43 | Self.FEngine := Engine; 44 | Self.FOptions := Options; 45 | Self.FAction := Action; 46 | end 47 | else 48 | inherited Assign(ASource); 49 | end; 50 | 51 | procedure TBCEditorReplace.SetOption(const AOption: TBCEditorReplaceOption; const AEnabled: Boolean); 52 | begin 53 | if AEnabled then 54 | Include(FOptions, AOption) 55 | else 56 | Exclude(FOptions, AOption); 57 | end; 58 | 59 | procedure TBCEditorReplace.SetEngine(const AValue: TBCEditorSearchEngine); 60 | begin 61 | if FEngine <> AValue then 62 | begin 63 | FEngine := AValue; 64 | if Assigned(FOnChange) then 65 | FOnChange(rcEngineUpdate); 66 | end; 67 | end; 68 | 69 | end. 70 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.RightMargin.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.RightMargin.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorRightMarginColors = class(TPersistent) 10 | strict private 11 | FEdge: TColor; 12 | FMovingEdge: TColor; 13 | FOnChange: TNotifyEvent; 14 | procedure SetEdge(AValue: TColor); 15 | procedure SetMovingEdge(AValue: TColor); 16 | procedure DoChange; 17 | public 18 | constructor Create; 19 | procedure Assign(ASource: TPersistent); override; 20 | published 21 | property Edge: TColor read FEdge write SetEdge default clSilver; 22 | property MovingEdge: TColor read FMovingEdge write SetMovingEdge default clSilver; 23 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 24 | end; 25 | 26 | implementation 27 | 28 | constructor TBCEditorRightMarginColors.Create; 29 | begin 30 | inherited; 31 | 32 | FEdge := clSilver; 33 | FMovingEdge := clSilver; 34 | end; 35 | 36 | procedure TBCEditorRightMarginColors.Assign(ASource: TPersistent); 37 | begin 38 | if Assigned(ASource) and (ASource is TBCEditorRightMarginColors) then 39 | with ASource as TBCEditorRightMarginColors do 40 | begin 41 | Self.FEdge := FEdge; 42 | Self.FMovingEdge := FMovingEdge; 43 | Self.DoChange; 44 | end 45 | else 46 | inherited Assign(ASource); 47 | end; 48 | 49 | procedure TBCEditorRightMarginColors.DoChange; 50 | begin 51 | if Assigned(FOnChange) then 52 | FOnChange(Self); 53 | end; 54 | 55 | procedure TBCEditorRightMarginColors.SetEdge(AValue: TColor); 56 | begin 57 | if FEdge <> AValue then 58 | begin 59 | FEdge := AValue; 60 | DoChange; 61 | end; 62 | end; 63 | 64 | procedure TBCEditorRightMarginColors.SetMovingEdge(AValue: TColor); 65 | begin 66 | if FMovingEdge <> AValue then 67 | begin 68 | FMovingEdge := AValue; 69 | DoChange; 70 | end; 71 | end; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.RightMargin.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.RightMargin; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, System.UITypes, BCEditor.Editor.RightMargin.Colors, BCEditor.Types; 7 | 8 | type 9 | TBCEditorRightMargin = class(TPersistent) 10 | strict private 11 | FColors: TBCEditorRightMarginColors; 12 | FCursor: TCursor; 13 | FMouseOver: Boolean; 14 | FMoving: Boolean; 15 | FOnChange: TNotifyEvent; 16 | FOptions: TBCEditorRightMarginOptions; 17 | FPosition: Integer; 18 | FVisible: Boolean; 19 | procedure DoChange; 20 | procedure SetColors(const AValue: TBCEditorRightMarginColors); 21 | procedure SetOnChange(AValue: TNotifyEvent); 22 | procedure SetPosition(const AValue: Integer); 23 | procedure SetVisible(const AValue: Boolean); 24 | public 25 | constructor Create; 26 | destructor Destroy; override; 27 | procedure Assign(ASource: TPersistent); override; 28 | procedure SetOption(const AOption: TBCEditorRightMarginOption; const AEnabled: Boolean); 29 | property Moving: Boolean read FMoving write FMoving; 30 | property MouseOver: Boolean read FMouseOver write FMouseOver; 31 | published 32 | property Colors: TBCEditorRightMarginColors read FColors write SetColors; 33 | property Cursor: TCursor read FCursor write FCursor default crHSplit; 34 | property OnChange: TNotifyEvent read FOnChange write SetOnChange; 35 | property Options: TBCEditorRightMarginOptions read FOptions write FOptions default [rmoMouseMove, rmoShowMovingHint]; 36 | property Position: Integer read FPosition write SetPosition default 80; 37 | property Visible: Boolean read FVisible write SetVisible default True; 38 | end; 39 | 40 | implementation 41 | 42 | constructor TBCEditorRightMargin.Create; 43 | begin 44 | inherited; 45 | 46 | FVisible := True; 47 | FPosition := 80; 48 | FColors := TBCEditorRightMarginColors.Create; 49 | FOptions := [rmoMouseMove, rmoShowMovingHint]; 50 | FMoving := False; 51 | FMouseOver := False; 52 | FCursor := crHSplit; 53 | end; 54 | 55 | destructor TBCEditorRightMargin.Destroy; 56 | begin 57 | FColors.Free; 58 | inherited; 59 | end; 60 | 61 | procedure TBCEditorRightMargin.SetOnChange(AValue: TNotifyEvent); 62 | begin 63 | FOnChange := AValue; 64 | FColors.OnChange := AValue; 65 | end; 66 | 67 | procedure TBCEditorRightMargin.Assign(ASource: TPersistent); 68 | begin 69 | if Assigned(ASource) and (ASource is TBCEditorRightMargin) then 70 | with ASource as TBCEditorRightMargin do 71 | begin 72 | Self.FVisible := FVisible; 73 | Self.FPosition := FPosition; 74 | Self.FColors.Assign(fColors); 75 | Self.FOptions := FOptions; 76 | Self.FCursor := FCursor; 77 | Self.DoChange; 78 | end 79 | else 80 | inherited Assign(ASource); 81 | end; 82 | 83 | procedure TBCEditorRightMargin.SetOption(const AOption: TBCEditorRightMarginOption; const AEnabled: Boolean); 84 | begin 85 | if AEnabled then 86 | Include(FOptions, AOption) 87 | else 88 | Exclude(FOptions, AOption); 89 | end; 90 | 91 | procedure TBCEditorRightMargin.DoChange; 92 | begin 93 | if Assigned(FOnChange) then 94 | FOnChange(Self); 95 | end; 96 | 97 | procedure TBCEditorRightMargin.SetColors(const AValue: TBCEditorRightMarginColors); 98 | begin 99 | FColors.Assign(AValue); 100 | end; 101 | 102 | procedure TBCEditorRightMargin.SetPosition(const AValue: Integer); 103 | begin 104 | if FPosition <> AValue then 105 | begin 106 | FPosition := AValue; 107 | DoChange 108 | end; 109 | end; 110 | 111 | procedure TBCEditorRightMargin.SetVisible(const AValue: Boolean); 112 | begin 113 | if FVisible <> AValue then 114 | begin 115 | FVisible := AValue; 116 | DoChange 117 | end; 118 | end; 119 | 120 | 121 | end. 122 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Scroll.Hint.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Scroll.Hint; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Types; 7 | 8 | type 9 | TBCEditorScrollHint = class(TPersistent) 10 | strict private 11 | FFormat: TBCEditorScrollHintFormat; 12 | public 13 | constructor Create; 14 | procedure Assign(ASource: TPersistent); override; 15 | published 16 | property Format: TBCEditorScrollHintFormat read FFormat write FFormat default shfTopLineOnly; 17 | end; 18 | 19 | implementation 20 | 21 | constructor TBCEditorScrollHint.Create; 22 | begin 23 | inherited; 24 | 25 | FFormat := shfTopLineOnly; 26 | end; 27 | 28 | procedure TBCEditorScrollHint.Assign(ASource: TPersistent); 29 | begin 30 | if ASource is TBCEditorScrollHint then 31 | with ASource as TBCEditorScrollHint do 32 | Self.FFormat := FFormat 33 | else 34 | inherited Assign(ASource); 35 | end; 36 | 37 | end. 38 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Scroll.Shadow.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Scroll.Shadow; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorScrollShadow = class(TPersistent) 10 | strict private 11 | FAlphaBlending: Byte; 12 | FColor: TColor; 13 | FOnChange: TNotifyEvent; 14 | FVisible: Boolean; 15 | FWidth: Integer; 16 | procedure DoChange; 17 | procedure SetAlphaBlending(const AValue: Byte); 18 | procedure SetColor(const AValue: TColor); 19 | procedure SetVisible(const AValue: Boolean); 20 | procedure SetWidth(const AValue: Integer); 21 | public 22 | constructor Create; 23 | procedure Assign(ASource: TPersistent); override; 24 | published 25 | property AlphaBlending: Byte read FAlphaBlending write SetAlphaBlending default 96; 26 | property Color: TColor read FColor write SetColor default clBlack; 27 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 28 | property Visible: Boolean read FVisible write SetVisible default True; 29 | property Width: Integer read FWidth write SetWidth default 8; 30 | end; 31 | 32 | implementation 33 | 34 | constructor TBCEditorScrollShadow.Create; 35 | begin 36 | inherited; 37 | 38 | FAlphaBlending := 96; 39 | FColor := clBlack; 40 | FVisible := True; 41 | FWidth := 8; 42 | end; 43 | 44 | procedure TBCEditorScrollShadow.Assign(ASource: TPersistent); 45 | begin 46 | if Assigned(ASource) and (ASource is TBCEditorScrollShadow) then 47 | with ASource as TBCEditorScrollShadow do 48 | begin 49 | Self.FAlphaBlending := FAlphaBlending; 50 | Self.FColor := FColor; 51 | Self.FVisible := FVisible; 52 | Self.DoChange; 53 | end 54 | else 55 | inherited Assign(ASource); 56 | end; 57 | 58 | procedure TBCEditorScrollShadow.DoChange; 59 | begin 60 | if Assigned(FOnChange) then 61 | FOnChange(Self); 62 | end; 63 | 64 | procedure TBCEditorScrollShadow.SetAlphaBlending(const AValue: Byte); 65 | begin 66 | if FAlphaBlending <> AValue then 67 | begin 68 | FAlphaBlending := AValue; 69 | DoChange; 70 | end; 71 | end; 72 | 73 | procedure TBCEditorScrollShadow.SetColor(const AValue: TColor); 74 | begin 75 | if FColor <> AValue then 76 | begin 77 | FColor := AValue; 78 | DoChange; 79 | end; 80 | end; 81 | 82 | procedure TBCEditorScrollShadow.SetVisible(const AValue: Boolean); 83 | begin 84 | if FVisible <> AValue then 85 | begin 86 | FVisible := AValue; 87 | DoChange; 88 | end; 89 | end; 90 | 91 | procedure TBCEditorScrollShadow.SetWidth(const AValue: Integer); 92 | begin 93 | if FWidth <> AValue then 94 | begin 95 | FWidth := AValue; 96 | DoChange; 97 | end; 98 | end; 99 | 100 | end. 101 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Scroll.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Scroll; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, System.UITypes, BCEditor.Types, BCEditor.Editor.Glyph, BCEditor.Editor.Scroll.Hint, 7 | BCEditor.Editor.Scroll.Shadow; 8 | 9 | const 10 | BCEDITOR_DEFAULT_SCROLL_OPTIONS = [{soAutosizeMaxWidth,} soPastEndOfLine, soShowVerticalScrollHint, soWheelClickMove]; 11 | 12 | type 13 | TBCEditorScroll = class(TPersistent) 14 | strict private 15 | FBars: System.UITypes.TScrollStyle; 16 | FHint: TBCEditorScrollHint; 17 | FIndicator: TBCEditorGlyph; 18 | FMaxWidth: Integer; 19 | FOnChange: TNotifyEvent; 20 | FOptions: TBCEditorScrollOptions; 21 | FShadow: TBCEditorScrollShadow; 22 | procedure DoChange; 23 | procedure SetBars(const AValue: System.UITypes.TScrollStyle); 24 | procedure SetHint(const AValue: TBCEditorScrollHint); 25 | procedure SetIndicator(const AValue: TBCEditorGlyph); 26 | procedure SetOnChange(AValue: TNotifyEvent); 27 | procedure SetOptions(const AValue: TBCEditorScrollOptions); 28 | public 29 | constructor Create; 30 | destructor Destroy; override; 31 | procedure Assign(ASource: TPersistent); override; 32 | procedure SetOption(const AOption: TBCEditorScrollOption; const AEnabled: Boolean); 33 | published 34 | property Bars: System.UITypes.TScrollStyle read FBars write SetBars default System.UITypes.TScrollStyle.ssBoth; 35 | property Hint: TBCEditorScrollHint read FHint write SetHint; 36 | property Indicator: TBCEditorGlyph read FIndicator write SetIndicator; 37 | property OnChange: TNotifyEvent read FOnChange write SetOnChange; 38 | property Options: TBCEditorScrollOptions read FOptions write SetOptions default BCEDITOR_DEFAULT_SCROLL_OPTIONS; 39 | property Shadow: TBCEditorScrollShadow read FShadow write FShadow; 40 | end; 41 | 42 | implementation 43 | 44 | uses 45 | BCEditor.Utils, BCEditor.Consts, Vcl.Graphics; 46 | 47 | constructor TBCEditorScroll.Create; 48 | begin 49 | inherited; 50 | 51 | FOptions := BCEDITOR_DEFAULT_SCROLL_OPTIONS; 52 | FMaxWidth := 1024; 53 | FBars := System.UITypes.TScrollStyle.ssBoth; 54 | FHint := TBCEditorScrollHint.Create; 55 | FIndicator := TBCEditorGlyph.Create(HInstance, BCEDITOR_MOUSE_MOVE_SCROLL, clFuchsia); 56 | FShadow := TBCEditorScrollShadow.Create; 57 | end; 58 | 59 | destructor TBCEditorScroll.Destroy; 60 | begin 61 | FHint.Free; 62 | FIndicator.Free; 63 | FShadow.Free; 64 | 65 | inherited; 66 | end; 67 | 68 | procedure TBCEditorScroll.SetOnChange(AValue: TNotifyEvent); 69 | begin 70 | FOnChange := AValue; 71 | FShadow.OnChange := AValue; 72 | end; 73 | 74 | procedure TBCEditorScroll.SetBars(const AValue: System.UITypes.TScrollStyle); 75 | begin 76 | if FBars <> AValue then 77 | begin 78 | FBars := AValue; 79 | DoChange; 80 | end; 81 | end; 82 | 83 | procedure TBCEditorScroll.DoChange; 84 | begin 85 | if Assigned(FOnChange) then 86 | FOnChange(Self); 87 | end; 88 | 89 | procedure TBCEditorScroll.Assign(ASource: TPersistent); 90 | begin 91 | if ASource is TBCEditorScroll then 92 | with ASource as TBCEditorScroll do 93 | begin 94 | Self.FBars := FBars; 95 | Self.FHint.Assign(FHint); 96 | Self.FIndicator.Assign(FIndicator); 97 | Self.FShadow.Assign(FShadow); 98 | Self.FOptions := FOptions; 99 | Self.FMaxWidth := FMaxWidth; 100 | Self.DoChange; 101 | end 102 | else 103 | inherited Assign(ASource); 104 | end; 105 | 106 | procedure TBCEditorScroll.SetOption(const AOption: TBCEditorScrollOption; const AEnabled: Boolean); 107 | begin 108 | if AEnabled then 109 | Include(FOptions, AOption) 110 | else 111 | Exclude(FOptions, AOption); 112 | end; 113 | 114 | procedure TBCEditorScroll.SetOptions(const AValue: TBCEditorScrollOptions); 115 | begin 116 | if FOptions <> AValue then 117 | begin 118 | FOptions := AValue; 119 | DoChange; 120 | end; 121 | end; 122 | 123 | procedure TBCEditorScroll.SetHint(const AValue: TBCEditorScrollHint); 124 | begin 125 | FHint.Assign(AValue); 126 | end; 127 | 128 | procedure TBCEditorScroll.SetIndicator(const AValue: TBCEditorGlyph); 129 | begin 130 | FIndicator.Assign(AValue); 131 | end; 132 | 133 | end. 134 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Search.Highlighter.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Search.Highlighter.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts, BCEditor.Types; 7 | 8 | type 9 | TBCEditorSearchColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FBorder: TColor; 13 | FForeground: TColor; 14 | FOnChange: TBCEditorSearchChangeEvent; 15 | procedure SetBackground(const AValue: TColor); 16 | procedure SetBorder(const AValue: TColor); 17 | procedure SetForeground(const AValue: TColor); 18 | procedure DoChange; 19 | public 20 | constructor Create; 21 | procedure Assign(ASource: TPersistent); override; 22 | published 23 | property Background: TColor read FBackground write SetBackground default clSearchHighlighter; 24 | property Border: TColor read FBorder write SetBorder default clNone; 25 | property Foreground: TColor read FForeground write SetForeground default clWindowText; 26 | property OnChange: TBCEditorSearchChangeEvent read FOnChange write FOnChange; 27 | end; 28 | 29 | implementation 30 | 31 | constructor TBCEditorSearchColors.Create; 32 | begin 33 | inherited; 34 | 35 | FBackground := clSearchHighlighter; 36 | FBorder := clNone; 37 | FForeground := clWindowText; 38 | end; 39 | 40 | procedure TBCEditorSearchColors.Assign(ASource: TPersistent); 41 | begin 42 | if ASource is TBCEditorSearchColors then 43 | with ASource as TBCEditorSearchColors do 44 | begin 45 | Self.FBackground := FBackground; 46 | Self.FBorder := FBorder; 47 | Self.FForeground := FForeground; 48 | Self.DoChange; 49 | end 50 | else 51 | inherited Assign(ASource); 52 | end; 53 | 54 | procedure TBCEditorSearchColors.DoChange; 55 | begin 56 | if Assigned(FOnChange) then 57 | FOnChange(scRefresh); 58 | end; 59 | 60 | procedure TBCEditorSearchColors.SetBackground(const AValue: TColor); 61 | begin 62 | if FBackground <> AValue then 63 | begin 64 | FBackground := AValue; 65 | DoChange; 66 | end; 67 | end; 68 | 69 | procedure TBCEditorSearchColors.SetBorder(const AValue: TColor); 70 | begin 71 | if FBorder <> AValue then 72 | begin 73 | FBorder := AValue; 74 | DoChange; 75 | end; 76 | end; 77 | 78 | procedure TBCEditorSearchColors.SetForeground(const AValue: TColor); 79 | begin 80 | if FForeground <> AValue then 81 | begin 82 | FForeground := AValue; 83 | DoChange; 84 | end; 85 | end; 86 | 87 | end. 88 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Search.Highlighter.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Search.Highlighter; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Editor.Search.Highlighter.Colors, BCEditor.Types; 7 | 8 | type 9 | TBCEditorSearchHighlighter = class(TPersistent) 10 | strict private 11 | FColors: TBCEditorSearchColors; 12 | FOnChange: TBCEditorSearchChangeEvent; 13 | procedure SetColors(const AValue: TBCEditorSearchColors); 14 | procedure DoChange; 15 | procedure SetOnChange(AValue: TBCEditorSearchChangeEvent); 16 | public 17 | constructor Create; 18 | destructor Destroy; override; 19 | procedure Assign(ASource: TPersistent); override; 20 | published 21 | property Colors: TBCEditorSearchColors read FColors write SetColors; 22 | property OnChange: TBCEditorSearchChangeEvent read FOnChange write SetOnChange; 23 | end; 24 | 25 | implementation 26 | 27 | constructor TBCEditorSearchHighlighter.Create; 28 | begin 29 | inherited; 30 | 31 | FColors := TBCEditorSearchColors.Create; 32 | end; 33 | 34 | destructor TBCEditorSearchHighlighter.Destroy; 35 | begin 36 | FColors.Free; 37 | inherited; 38 | end; 39 | 40 | procedure TBCEditorSearchHighlighter.Assign(ASource: TPersistent); 41 | begin 42 | if Assigned(ASource) and (ASource is TBCEditorSearchHighlighter) then 43 | with ASource as TBCEditorSearchHighlighter do 44 | begin 45 | Self.FColors.Assign(Colors); 46 | Self.DoChange; 47 | end 48 | else 49 | inherited Assign(ASource); 50 | end; 51 | 52 | procedure TBCEditorSearchHighlighter.DoChange; 53 | begin 54 | if Assigned(FOnChange) then 55 | FOnChange(scRefresh); 56 | end; 57 | 58 | procedure TBCEditorSearchHighlighter.SetOnChange(AValue: TBCEditorSearchChangeEvent); 59 | begin 60 | FOnChange := AValue; 61 | FColors.OnChange := FOnChange; 62 | end; 63 | 64 | procedure TBCEditorSearchHighlighter.SetColors(const AValue: TBCEditorSearchColors); 65 | begin 66 | FColors.Assign(AValue); 67 | end; 68 | 69 | end. 70 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Search.InSelection.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Search.InSelection; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Types, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorSearchInSelection = class(TPersistent) 10 | strict private 11 | FActive: Boolean; 12 | FBackground: TColor; 13 | FOnChange: TBCEditorSearchChangeEvent; 14 | FSelectionBeginPosition: TBCEditorTextPosition; 15 | FSelectionEndPosition: TBCEditorTextPosition; 16 | procedure DoChange; 17 | procedure SetActive(AValue: Boolean); 18 | public 19 | constructor Create; 20 | procedure Assign(ASource: TPersistent); override; 21 | property SelectionBeginPosition: TBCEditorTextPosition read FSelectionBeginPosition write FSelectionBeginPosition; 22 | property SelectionEndPosition: TBCEditorTextPosition read FSelectionEndPosition write FSelectionEndPosition; 23 | published 24 | property Active: Boolean read FActive write SetActive default False; 25 | property Background: TColor read FBackground write FBackground default clSearchInSelectionBackground; 26 | property OnChange: TBCEditorSearchChangeEvent read FOnChange write FOnChange; 27 | end; 28 | 29 | implementation 30 | 31 | constructor TBCEditorSearchInSelection.Create; 32 | begin 33 | inherited; 34 | 35 | FActive := False; 36 | FBackground := clSearchInSelectionBackground; 37 | end; 38 | 39 | procedure TBCEditorSearchInSelection.DoChange; 40 | begin 41 | if Assigned(FOnChange) then 42 | FOnChange(scInSelectionActive); 43 | end; 44 | 45 | procedure TBCEditorSearchInSelection.Assign(ASource: TPersistent); 46 | begin 47 | if Assigned(ASource) and (ASource is TBCEditorSearchInSelection) then 48 | with ASource as TBCEditorSearchInSelection do 49 | begin 50 | Self.FActive := FActive; 51 | Self.FBackground := FBackground; 52 | Self.FSelectionBeginPosition := FSelectionBeginPosition; 53 | Self.FSelectionEndPosition := FSelectionEndPosition; 54 | Self.DoChange; 55 | end 56 | else 57 | inherited Assign(ASource); 58 | end; 59 | 60 | procedure TBCEditorSearchInSelection.SetActive(AValue: Boolean); 61 | begin 62 | if FActive <> AValue then 63 | begin 64 | FActive := AValue; 65 | DoChange; 66 | end; 67 | end; 68 | 69 | end. 70 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Search.Map.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Search.Map.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts, BCEditor.Types; 7 | 8 | type 9 | TBCEditorSearchMapColors = class(TPersistent) 10 | strict private 11 | FActiveLine: TColor; 12 | FBackground: TColor; 13 | FForeground: TColor; 14 | FOnChange: TBCEditorSearchChangeEvent; 15 | procedure SetActiveLine(AValue: TColor); 16 | procedure SetBackground(AValue: TColor); 17 | procedure SetForeground(AValue: TColor); 18 | public 19 | constructor Create; 20 | procedure Assign(ASource: TPersistent); override; 21 | published 22 | property ActiveLine: TColor read FActiveLine write SetActiveLine default clSearchMapActiveLine; 23 | property Background: TColor read FBackground write SetBackground default clLeftMarginBackground; 24 | property Foreground: TColor read FForeground write SetForeground default clSearchHighlighter; 25 | property OnChange: TBCEditorSearchChangeEvent read FOnChange write FOnChange; 26 | end; 27 | 28 | implementation 29 | 30 | constructor TBCEditorSearchMapColors.Create; 31 | begin 32 | inherited; 33 | 34 | FActiveLine := clSearchMapActiveLine; 35 | FBackground := clLeftMarginBackground; 36 | FForeground := clSearchHighlighter; 37 | end; 38 | 39 | procedure TBCEditorSearchMapColors.Assign(ASource: TPersistent); 40 | begin 41 | if Assigned(ASource) and (ASource is TBCEditorSearchMapColors) then 42 | with ASource as TBCEditorSearchMapColors do 43 | begin 44 | Self.FBackground := FBackground; 45 | Self.FForeground := FForeground; 46 | Self.FActiveLine := FActiveLine; 47 | if Assigned(Self.FOnChange) then 48 | Self.FOnChange(scRefresh); 49 | end 50 | else 51 | inherited Assign(ASource); 52 | end; 53 | 54 | procedure TBCEditorSearchMapColors.SetActiveLine(AValue: TColor); 55 | begin 56 | if FActiveLine <> AValue then 57 | begin 58 | FActiveLine := AValue; 59 | if Assigned(FOnChange) then 60 | FOnChange(scRefresh); 61 | end; 62 | end; 63 | 64 | procedure TBCEditorSearchMapColors.SetBackground(AValue: TColor); 65 | begin 66 | if FBackground <> AValue then 67 | begin 68 | FBackground := AValue; 69 | if Assigned(FOnChange) then 70 | FOnChange(scRefresh); 71 | end; 72 | end; 73 | 74 | procedure TBCEditorSearchMapColors.SetForeground(AValue: TColor); 75 | begin 76 | if FForeground <> AValue then 77 | begin 78 | FForeground := AValue; 79 | if Assigned(FOnChange) then 80 | FOnChange(scRefresh); 81 | end; 82 | end; 83 | 84 | end. 85 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Search.Map.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Search.Map; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, System.UITypes, BCEditor.Editor.Search.Map.Colors, BCEditor.Types; 7 | 8 | type 9 | TBCEditorSearchMap = class(TPersistent) 10 | strict private 11 | FAlign: TBCEditorSearchMapAlign; 12 | FColors: TBCEditorSearchMapColors; 13 | FCursor: TCursor; 14 | FOnChange: TBCEditorSearchChangeEvent; 15 | FOptions: TBCEditorSearchMapOptions; 16 | FVisible: Boolean; 17 | FWidth: Integer; 18 | procedure DoChange; 19 | procedure SetAlign(const AValue: TBCEditorSearchMapAlign); 20 | procedure SetOnChange(AValue: TBCEditorSearchChangeEvent); 21 | procedure SetColors(const AValue: TBCEditorSearchMapColors); 22 | procedure SetOptions(const AValue: TBCEditorSearchMapOptions); 23 | procedure SetVisible(AValue: Boolean); 24 | procedure SetWidth(AValue: Integer); 25 | public 26 | constructor Create; 27 | destructor Destroy; override; 28 | procedure Assign(ASource: TPersistent); override; 29 | function GetWidth: Integer; 30 | published 31 | property Align: TBCEditorSearchMapAlign read FAlign write SetAlign default saRight; 32 | property Colors: TBCEditorSearchMapColors read FColors write SetColors; 33 | property Cursor: TCursor read FCursor write FCursor default crArrow; 34 | property OnChange: TBCEditorSearchChangeEvent read FOnChange write SetOnChange; 35 | property Options: TBCEditorSearchMapOptions read FOptions write SetOptions default [moShowActiveLine]; 36 | property Visible: Boolean read FVisible write SetVisible default False; 37 | property Width: Integer read FWidth write SetWidth default 5; 38 | end; 39 | 40 | implementation 41 | 42 | uses 43 | System.Math; 44 | 45 | constructor TBCEditorSearchMap.Create; 46 | begin 47 | inherited; 48 | 49 | FAlign := saRight; 50 | FColors := TBCEditorSearchMapColors.Create; 51 | FOptions := [moShowActiveLine]; 52 | FVisible := False; 53 | FWidth := 5; 54 | FCursor := crArrow; 55 | end; 56 | 57 | destructor TBCEditorSearchMap.Destroy; 58 | begin 59 | FColors.Free; 60 | inherited; 61 | end; 62 | 63 | procedure TBCEditorSearchMap.Assign(ASource: TPersistent); 64 | begin 65 | if ASource is TBCEditorSearchMap then 66 | with ASource as TBCEditorSearchMap do 67 | begin 68 | Self.FAlign := FAlign; 69 | Self.FVisible := FVisible; 70 | Self.FOptions := Options; 71 | Self.FWidth := FWidth; 72 | Self.FColors.Assign(FColors); 73 | Self.FCursor := FCursor; 74 | Self.DoChange; 75 | end 76 | else 77 | inherited Assign(ASource); 78 | end; 79 | 80 | procedure TBCEditorSearchMap.SetOnChange(AValue: TBCEditorSearchChangeEvent); 81 | begin 82 | FOnChange := AValue; 83 | FColors.OnChange := FOnChange; 84 | end; 85 | 86 | procedure TBCEditorSearchMap.SetWidth(AValue: Integer); 87 | begin 88 | AValue := Max(0, AValue); 89 | if FWidth <> AValue then 90 | FWidth := AValue; 91 | DoChange; 92 | end; 93 | 94 | procedure TBCEditorSearchMap.DoChange; 95 | begin 96 | if Assigned(FOnChange) then 97 | FOnChange(scSearch); 98 | end; 99 | 100 | procedure TBCEditorSearchMap.SetAlign(const AValue: TBCEditorSearchMapAlign); 101 | begin 102 | if FAlign <> AValue then 103 | begin 104 | FAlign := AValue; 105 | DoChange; 106 | end; 107 | end; 108 | 109 | procedure TBCEditorSearchMap.SetVisible(AValue: Boolean); 110 | begin 111 | if FVisible <> AValue then 112 | begin 113 | FVisible := AValue; 114 | DoChange; 115 | end; 116 | end; 117 | 118 | procedure TBCEditorSearchMap.SetOptions(const AValue: TBCEditorSearchMapOptions); 119 | begin 120 | if FOptions <> AValue then 121 | begin 122 | FOptions := AValue; 123 | DoChange; 124 | end; 125 | end; 126 | 127 | function TBCEditorSearchMap.GetWidth: Integer; 128 | begin 129 | if FVisible then 130 | Result := FWidth 131 | else 132 | Result := 0; 133 | end; 134 | 135 | procedure TBCEditorSearchMap.SetColors(const AValue: TBCEditorSearchMapColors); 136 | begin 137 | FColors.Assign(AValue); 138 | end; 139 | 140 | end. 141 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Selection.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Selection.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorSelectionColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FForeground: TColor; 13 | FOnChange: TNotifyEvent; 14 | procedure SetBackground(AValue: TColor); 15 | procedure SetForeground(AValue: TColor); 16 | public 17 | constructor Create; 18 | procedure Assign(ASource: TPersistent); override; 19 | published 20 | property Background: TColor read FBackground write SetBackground default clSelectionColor; 21 | property Foreground: TColor read FForeground write SetForeground default clHighLightText; 22 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 23 | end; 24 | 25 | implementation 26 | 27 | constructor TBCEditorSelectionColors.Create; 28 | begin 29 | inherited; 30 | 31 | FBackground := clSelectionColor; 32 | FForeground := clHighLightText; 33 | end; 34 | 35 | procedure TBCEditorSelectionColors.Assign(ASource: TPersistent); 36 | begin 37 | if Assigned(ASource) and (ASource is TBCEditorSelectionColors) then 38 | with ASource as TBCEditorSelectionColors do 39 | begin 40 | Self.FBackground := FBackground; 41 | Self.FForeground := FForeground; 42 | if Assigned(Self.FOnChange) then 43 | Self.FOnChange(Self); 44 | end 45 | else 46 | inherited Assign(ASource); 47 | end; 48 | 49 | procedure TBCEditorSelectionColors.SetBackground(AValue: TColor); 50 | begin 51 | if FBackground <> AValue then 52 | begin 53 | FBackground := AValue; 54 | if Assigned(FOnChange) then 55 | FOnChange(Self); 56 | end; 57 | end; 58 | 59 | procedure TBCEditorSelectionColors.SetForeground(AValue: TColor); 60 | begin 61 | if FForeground <> AValue then 62 | begin 63 | FForeground := AValue; 64 | if Assigned(FOnChange) then 65 | FOnChange(Self); 66 | end; 67 | end; 68 | 69 | end. 70 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Selection.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Selection; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Editor.Selection.Colors, BCEditor.Types; 7 | 8 | type 9 | TBCEditorSelection = class(TPersistent) 10 | strict private 11 | FActiveMode: TBCEditorSelectionMode; 12 | FColors: TBCEditorSelectionColors; 13 | FMode: TBCEditorSelectionMode; 14 | FOnChange: TNotifyEvent; 15 | FOptions: TBCEditorSelectionOptions; 16 | FVisible: Boolean; 17 | procedure DoChange; 18 | procedure SetActiveMode(const AValue: TBCEditorSelectionMode); 19 | procedure SetColors(const AValue: TBCEditorSelectionColors); 20 | procedure SetMode(const AValue: TBCEditorSelectionMode); 21 | procedure SetOnChange(AValue: TNotifyEvent); 22 | procedure SetOptions(AValue: TBCEditorSelectionOptions); 23 | procedure SetVisible(const AValue: Boolean); 24 | public 25 | constructor Create; 26 | destructor Destroy; override; 27 | procedure Assign(ASource: TPersistent); override; 28 | procedure SetOption(const AOption: TBCEditorSelectionOption; const AEnabled: Boolean); 29 | property ActiveMode: TBCEditorSelectionMode read FActiveMode write SetActiveMode stored False; 30 | published 31 | property Colors: TBCEditorSelectionColors read FColors write SetColors; 32 | property Mode: TBCEditorSelectionMode read FMode write SetMode default smNormal; 33 | property Options: TBCEditorSelectionOptions read FOptions write SetOptions default [soHighlightSimilarTerms, soTermsCaseSensitive]; 34 | property Visible: Boolean read FVisible write SetVisible default True; 35 | property OnChange: TNotifyEvent read FOnChange write SetOnChange; 36 | end; 37 | 38 | implementation 39 | 40 | constructor TBCEditorSelection.Create; 41 | begin 42 | inherited; 43 | 44 | FColors := TBCEditorSelectionColors.Create; 45 | FActiveMode := smNormal; 46 | FMode := smNormal; 47 | FOptions := [soHighlightSimilarTerms, soTermsCaseSensitive]; 48 | FVisible := True; 49 | end; 50 | 51 | destructor TBCEditorSelection.Destroy; 52 | begin 53 | FColors.Free; 54 | inherited Destroy; 55 | end; 56 | 57 | procedure TBCEditorSelection.SetOnChange(AValue: TNotifyEvent); 58 | begin 59 | FOnChange := AValue; 60 | FColors.OnChange := FOnChange; 61 | end; 62 | 63 | procedure TBCEditorSelection.Assign(ASource: TPersistent); 64 | begin 65 | if Assigned(ASource) and (ASource is TBCEditorSelection) then 66 | with ASource as TBCEditorSelection do 67 | begin 68 | Self.FColors.Assign(FColors); 69 | Self.FActiveMode := FActiveMode; 70 | Self.FMode := FMode; 71 | Self.FOptions := FOptions; 72 | Self.FVisible := FVisible; 73 | if Assigned(Self.FOnChange) then 74 | Self.FOnChange(Self); 75 | end 76 | else 77 | inherited Assign(ASource); 78 | end; 79 | 80 | procedure TBCEditorSelection.SetOption(const AOption: TBCEditorSelectionOption; const AEnabled: Boolean); 81 | begin 82 | if AEnabled then 83 | Include(FOptions, AOption) 84 | else 85 | Exclude(FOptions, AOption); 86 | end; 87 | 88 | procedure TBCEditorSelection.DoChange; 89 | begin 90 | if Assigned(FOnChange) then 91 | FOnChange(Self); 92 | end; 93 | 94 | procedure TBCEditorSelection.SetColors(const AValue: TBCEditorSelectionColors); 95 | begin 96 | FColors.Assign(AValue); 97 | end; 98 | 99 | procedure TBCEditorSelection.SetMode(const AValue: TBCEditorSelectionMode); 100 | begin 101 | if FMode <> AValue then 102 | begin 103 | FMode := AValue; 104 | ActiveMode := AValue; 105 | DoChange; 106 | end; 107 | end; 108 | 109 | procedure TBCEditorSelection.SetActiveMode(const AValue: TBCEditorSelectionMode); 110 | begin 111 | if FActiveMode <> AValue then 112 | begin 113 | FActiveMode := AValue; 114 | DoChange; 115 | end; 116 | end; 117 | 118 | procedure TBCEditorSelection.SetVisible(const AValue: Boolean); 119 | begin 120 | if FVisible <> AValue then 121 | begin 122 | FVisible := AValue; 123 | DoChange; 124 | end; 125 | end; 126 | 127 | procedure TBCEditorSelection.SetOptions(AValue: TBCEditorSelectionOptions); 128 | begin 129 | if FOptions <> AValue then 130 | begin 131 | FOptions := AValue; 132 | DoChange; 133 | end; 134 | end; 135 | 136 | end. 137 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.SkipRegions.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.SkipRegions; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, System.SysUtils, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorSkipRegionItemType = (ritUnspecified, ritMultiLineString, ritSingleLineString, ritMultiLineComment, ritSingleLineComment); 10 | 11 | TBCEditorSkipRegionItem = class(TCollectionItem) 12 | strict private 13 | FCloseToken: string; 14 | FOpenToken: string; 15 | FRegionType: TBCEditorSkipRegionItemType; 16 | FSkipEmptyChars: Boolean; 17 | FSkipIfNextCharIsNot: Char; 18 | public 19 | property OpenToken: string read FOpenToken write FOpenToken; 20 | property CloseToken: string read FCloseToken write FCloseToken; 21 | property RegionType: TBCEditorSkipRegionItemType read FRegionType write FRegionType; 22 | property SkipEmptyChars: Boolean read FSkipEmptyChars write FSkipEmptyChars; 23 | property SkipIfNextCharIsNot: Char read FSkipIfNextCharIsNot write FSkipIfNextCharIsNot default BCEDITOR_NONE_CHAR; 24 | end; 25 | 26 | TBCEditorSkipRegions = class(TCollection) 27 | strict private 28 | function GetSkipRegionItem(AIndex: Integer): TBCEditorSkipRegionItem; 29 | public 30 | function Add(const AOpenToken, ACloseToken: string): TBCEditorSkipRegionItem; 31 | function Contains(const AOpenToken, ACloseToken: string): Boolean; 32 | property SkipRegionItems[AIndex: Integer]: TBCEditorSkipRegionItem read GetSkipRegionItem; default; 33 | end; 34 | 35 | implementation 36 | 37 | uses 38 | Winapi.Windows; 39 | 40 | { TBCEditorSkipRegions } 41 | 42 | function TBCEditorSkipRegions.Add(const AOpenToken, ACloseToken: string): TBCEditorSkipRegionItem; 43 | begin 44 | Result := TBCEditorSkipRegionItem(inherited Add); 45 | with Result do 46 | begin 47 | OpenToken := AOpenToken; 48 | CloseToken := ACloseToken; 49 | end; 50 | end; 51 | 52 | function TBCEditorSkipRegions.Contains(const AOpenToken, ACloseToken: string): Boolean; 53 | var 54 | LIndex: Integer; 55 | LSkipRegion: TBCEditorSkipRegionItem; 56 | begin 57 | Result := False; 58 | for LIndex := 0 to Count - 1 do 59 | begin 60 | LSkipRegion := SkipRegionItems[LIndex]; 61 | if (LSkipRegion.OpenToken = AOpenToken) and (LSkipRegion.CloseToken = ACloseToken) then 62 | Exit(True); 63 | end; 64 | end; 65 | 66 | function TBCEditorSkipRegions.GetSkipRegionItem(AIndex: Integer): TBCEditorSkipRegionItem; 67 | begin 68 | Result := TBCEditorSkipRegionItem(inherited Items[AIndex]); 69 | end; 70 | 71 | end. 72 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.SpecialChars.EndOfLine.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.SpecialChars.EndOfLine; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Types; 7 | 8 | type 9 | TBCEditorSpecialCharsEndOfLine = class(TPersistent) 10 | strict private 11 | FColor: TColor; 12 | FOnChange: TNotifyEvent; 13 | FStyle: TBCEditorSpecialCharsEndOfLineStyle; 14 | FVisible: Boolean; 15 | procedure DoChange; 16 | procedure SetColor(const AValue: TColor); 17 | procedure SetStyle(const AValue: TBCEditorSpecialCharsEndOfLineStyle); 18 | procedure SetVisible(const AValue: Boolean); 19 | public 20 | constructor Create; 21 | procedure Assign(ASource: TPersistent); override; 22 | published 23 | property Color: TColor read FColor write SetColor default clBlack; 24 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 25 | property Style: TBCEditorSpecialCharsEndOfLineStyle read FStyle write SetStyle default eolArrow; 26 | property Visible: Boolean read FVisible write SetVisible default False; 27 | end; 28 | 29 | implementation 30 | 31 | constructor TBCEditorSpecialCharsEndOfLine.Create; 32 | begin 33 | inherited; 34 | 35 | FColor := clBlack; 36 | FStyle := eolArrow; 37 | FVisible := False; 38 | end; 39 | 40 | procedure TBCEditorSpecialCharsEndOfLine.Assign(ASource: TPersistent); 41 | begin 42 | if Assigned(ASource) and (ASource is TBCEditorSpecialCharsEndOfLine) then 43 | with ASource as TBCEditorSpecialCharsEndOfLine do 44 | begin 45 | Self.FColor := FColor; 46 | Self.FStyle := FStyle; 47 | Self.FVisible := FVisible; 48 | Self.DoChange; 49 | end 50 | else 51 | inherited Assign(ASource); 52 | end; 53 | 54 | procedure TBCEditorSpecialCharsEndOfLine.DoChange; 55 | begin 56 | if Assigned(FOnChange) then 57 | FOnChange(Self); 58 | end; 59 | 60 | procedure TBCEditorSpecialCharsEndOfLine.SetColor(const AValue: TColor); 61 | begin 62 | if FColor <> AValue then 63 | begin 64 | FColor := AValue; 65 | DoChange; 66 | end; 67 | end; 68 | 69 | procedure TBCEditorSpecialCharsEndOfLine.SetStyle(const AValue: TBCEditorSpecialCharsEndOfLineStyle); 70 | begin 71 | if FStyle <> AValue then 72 | begin 73 | FStyle := AValue; 74 | DoChange; 75 | end; 76 | end; 77 | 78 | procedure TBCEditorSpecialCharsEndOfLine.SetVisible(const AValue: Boolean); 79 | begin 80 | if FVisible <> AValue then 81 | begin 82 | FVisible := AValue; 83 | DoChange; 84 | end; 85 | end; 86 | 87 | end. 88 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.SpecialChars.Selection.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.SpecialChars.Selection; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorSpecialCharsSelection = class(TPersistent) 10 | strict private 11 | FColor: TColor; 12 | FOnChange: TNotifyEvent; 13 | FVisible: Boolean; 14 | procedure DoChange; 15 | procedure SetColor(const AValue: TColor); 16 | procedure SetVisible(const AValue: Boolean); 17 | public 18 | constructor Create; 19 | procedure Assign(ASource: TPersistent); override; 20 | published 21 | property Color: TColor read FColor write SetColor default clBlack; 22 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 23 | property Visible: Boolean read FVisible write SetVisible default False; 24 | end; 25 | 26 | implementation 27 | 28 | constructor TBCEditorSpecialCharsSelection.Create; 29 | begin 30 | inherited; 31 | 32 | FColor := clBlack; 33 | FVisible := False; 34 | end; 35 | 36 | procedure TBCEditorSpecialCharsSelection.Assign(ASource: TPersistent); 37 | begin 38 | if Assigned(ASource) and (ASource is TBCEditorSpecialCharsSelection) then 39 | with ASource as TBCEditorSpecialCharsSelection do 40 | begin 41 | Self.FColor := FColor; 42 | Self.FVisible := FVisible; 43 | Self.DoChange; 44 | end 45 | else 46 | inherited Assign(ASource); 47 | end; 48 | 49 | procedure TBCEditorSpecialCharsSelection.DoChange; 50 | begin 51 | if Assigned(FOnChange) then 52 | FOnChange(Self); 53 | end; 54 | 55 | procedure TBCEditorSpecialCharsSelection.SetColor(const AValue: TColor); 56 | begin 57 | if FColor <> AValue then 58 | begin 59 | FColor := AValue; 60 | DoChange; 61 | end; 62 | end; 63 | 64 | procedure TBCEditorSpecialCharsSelection.SetVisible(const AValue: Boolean); 65 | begin 66 | if FVisible <> AValue then 67 | begin 68 | FVisible := AValue; 69 | DoChange; 70 | end; 71 | end; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.SyncEdit.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.SyncEdit.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorSyncEditColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FEditBorder: TColor; 13 | FWordBorder: TColor; 14 | public 15 | constructor Create; 16 | procedure Assign(ASource: TPersistent); override; 17 | published 18 | property Background: TColor read FBackground write FBackground default clSyncEditBackground; 19 | property EditBorder: TColor read FEditBorder write FEditBorder default clWindowText; 20 | property WordBorder: TColor read FWordBorder write FWordBorder default clHighlight; 21 | end; 22 | 23 | implementation 24 | 25 | constructor TBCEditorSyncEditColors.Create; 26 | begin 27 | inherited; 28 | 29 | FBackground := clSyncEditBackground; 30 | FEditBorder := clWindowText; 31 | FWordBorder := clHighlight; 32 | end; 33 | 34 | procedure TBCEditorSyncEditColors.Assign(ASource: TPersistent); 35 | begin 36 | if Assigned(ASource) and (ASource is TBCEditorSyncEditColors) then 37 | with ASource as TBCEditorSyncEditColors do 38 | begin 39 | Self.FBackground := FBackground; 40 | Self.FEditBorder := FEditBorder; 41 | Self.FWordBorder := FWordBorder; 42 | end 43 | else 44 | inherited Assign(ASource); 45 | end; 46 | 47 | end. 48 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Tabs.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Tabs; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Types; 7 | 8 | const 9 | BCEDITOR_DEFAULT_TAB_OPTIONS = [toColumns, toSelectedBlockIndent]; 10 | 11 | type 12 | TBCEditorTabs = class(TPersistent) 13 | strict private 14 | FOnChange: TNotifyEvent; 15 | FOptions: TBCEditorTabOptions; 16 | FWantTabs: Boolean; 17 | FWidth: Integer; 18 | procedure SetWidth(AValue: Integer); 19 | procedure SetWantTabs(const AValue: Boolean); 20 | procedure SetOptions(const AValue: TBCEditorTabOptions); 21 | procedure DoChange; 22 | public 23 | constructor Create; 24 | procedure Assign(ASource: TPersistent); override; 25 | procedure SetOption(const AOption: TBCEditorTabOption; const AEnabled: Boolean); 26 | published 27 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 28 | property Options: TBCEditorTabOptions read FOptions write SetOptions default BCEDITOR_DEFAULT_TAB_OPTIONS; 29 | property WantTabs: Boolean read FWantTabs write SetWantTabs default True; 30 | property Width: Integer read FWidth write SetWidth default 2; 31 | end; 32 | 33 | implementation 34 | 35 | uses 36 | BCEditor.Utils; 37 | 38 | constructor TBCEditorTabs.Create; 39 | begin 40 | inherited; 41 | 42 | FOptions := BCEDITOR_DEFAULT_TAB_OPTIONS; 43 | FWantTabs := True; 44 | FWidth := 2; 45 | end; 46 | 47 | procedure TBCEditorTabs.DoChange; 48 | begin 49 | if Assigned(FOnChange) then 50 | FOnChange(Self); 51 | end; 52 | 53 | procedure TBCEditorTabs.Assign(ASource: TPersistent); 54 | begin 55 | if ASource is TBCEditorTabs then 56 | with ASource as TBCEditorTabs do 57 | begin 58 | Self.FOptions := FOptions; 59 | Self.FWantTabs := FWantTabs; 60 | Self.FWidth := FWidth; 61 | Self.DoChange; 62 | end 63 | else 64 | inherited Assign(ASource); 65 | end; 66 | 67 | procedure TBCEditorTabs.SetOption(const AOption: TBCEditorTabOption; const AEnabled: Boolean); 68 | begin 69 | if AEnabled then 70 | Include(FOptions, AOption) 71 | else 72 | Exclude(FOptions, AOption); 73 | end; 74 | 75 | procedure TBCEditorTabs.SetOptions(const AValue: TBCEditorTabOptions); 76 | begin 77 | if FOptions <> AValue then 78 | begin 79 | FOptions := AValue; 80 | DoChange; 81 | end; 82 | end; 83 | 84 | procedure TBCEditorTabs.SetWidth(AValue: Integer); 85 | begin 86 | AValue := MinMax(AValue, 1, 256); 87 | if FWidth <> AValue then 88 | begin 89 | FWidth := AValue; 90 | DoChange; 91 | end; 92 | end; 93 | 94 | procedure TBCEditorTabs.SetWantTabs(const AValue: Boolean); 95 | begin 96 | if FWantTabs <> AValue then 97 | begin 98 | FWantTabs := AValue; 99 | DoChange; 100 | end; 101 | end; 102 | 103 | end. 104 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.TokenInfo.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.TokenInfo.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorTokenInfoColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FReference: TColor; 13 | public 14 | constructor Create; 15 | procedure Assign(ASource: TPersistent); override; 16 | published 17 | property Background: TColor read FBackground write FBackground default clWindow; 18 | property Reference: TColor read FReference write FReference default clBlue; 19 | end; 20 | 21 | implementation 22 | 23 | constructor TBCEditorTokenInfoColors.Create; 24 | begin 25 | inherited; 26 | 27 | FBackground := clWindow; 28 | FReference := clBlue; 29 | end; 30 | 31 | procedure TBCEditorTokenInfoColors.Assign(ASource: TPersistent); 32 | begin 33 | if ASource is TBCEditorTokenInfoColors then 34 | with ASource as TBCEditorTokenInfoColors do 35 | begin 36 | Self.FBackground := FBackground; 37 | Self.FReference := FReference; 38 | end 39 | else 40 | inherited Assign(ASource); 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.TokenInfo.Title.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.TokenInfo.Title.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics; 7 | 8 | type 9 | TBCEditorTokenInfoTitleColors = class(TPersistent) 10 | strict private 11 | FBackground: TColor; 12 | FReference: TColor; 13 | public 14 | constructor Create; 15 | procedure Assign(ASource: TPersistent); override; 16 | published 17 | property Background: TColor read FBackground write FBackground default clWindow; 18 | property Reference: TColor read FReference write FReference default clBlue; 19 | end; 20 | 21 | implementation 22 | 23 | constructor TBCEditorTokenInfoTitleColors.Create; 24 | begin 25 | inherited; 26 | 27 | FBackground := clWindow; 28 | FReference := clBlue; 29 | end; 30 | 31 | procedure TBCEditorTokenInfoTitleColors.Assign(ASource: TPersistent); 32 | begin 33 | if ASource is TBCEditorTokenInfoTitleColors then 34 | with ASource as TBCEditorTokenInfoTitleColors do 35 | begin 36 | Self.FBackground := FBackground; 37 | Self.FReference := FReference; 38 | end 39 | else 40 | inherited Assign(ASource); 41 | end; 42 | end. 43 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.TokenInfo.Title.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.TokenInfo.Title; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Editor.TokenInfo.Title.Colors; 7 | 8 | type 9 | TBCEditorTokenInfoTitle = class(TPersistent) 10 | strict private 11 | FColors: TBCEditorTokenInfoTitleColors; 12 | FFont: TFont; 13 | FVisible: Boolean; 14 | procedure SetFont(const AValue: TFont); 15 | public 16 | constructor Create; 17 | destructor Destroy; override; 18 | procedure Assign(ASource: TPersistent); override; 19 | published 20 | property Colors: TBCEditorTokenInfoTitleColors read FColors write FColors; 21 | property Font: TFont read FFont write SetFont; 22 | property Visible: Boolean read FVisible write FVisible default False; 23 | end; 24 | 25 | implementation 26 | 27 | constructor TBCEditorTokenInfoTitle.Create; 28 | begin 29 | inherited; 30 | 31 | FColors := TBCEditorTokenInfoTitleColors.Create; 32 | FFont := TFont.Create; 33 | FFont.Name := 'Courier New'; 34 | FFont.Size := 8; 35 | FVisible := False; 36 | end; 37 | 38 | destructor TBCEditorTokenInfoTitle.Destroy; 39 | begin 40 | FColors.Free; 41 | FFont.Free; 42 | 43 | inherited; 44 | end; 45 | 46 | procedure TBCEditorTokenInfoTitle.Assign(ASource: TPersistent); 47 | begin 48 | if ASource is TBCEditorTokenInfoTitle then 49 | with ASource as TBCEditorTokenInfoTitle do 50 | begin 51 | Self.FColors.Assign(FColors); 52 | Self.FFont.Assign(FFont); 53 | Self.FVisible := FVisible; 54 | end 55 | else 56 | inherited Assign(ASource); 57 | end; 58 | 59 | procedure TBCEditorTokenInfoTitle.SetFont(const AValue: TFont); 60 | begin 61 | FFont.Assign(AValue); 62 | end; 63 | 64 | end. 65 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.TokenInfo.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.TokenInfo; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Controls, Vcl.Graphics, BCEditor.Types, BCEditor.Editor.TokenInfo.Colors, 7 | BCEditor.Editor.TokenInfo.Title; 8 | 9 | const 10 | BCEDITOR_TOKEN_INFO_DEFAULT_OPTIONS = [tioAutoSize]; 11 | 12 | type 13 | TBCEditorTokenInfo = class(TPersistent) 14 | strict private 15 | FColors: TBCEditorTokenInfoColors; 16 | FDelayInterval: Cardinal; 17 | FEnabled: Boolean; 18 | FFont: TFont; 19 | FHeight: Integer; 20 | FOptions: TBCEditorTokenInfoOptions; 21 | FTitle: TBCEditorTokenInfoTitle; 22 | FWidth: Integer; 23 | procedure SetFont(const AValue: TFont); 24 | public 25 | constructor Create; 26 | destructor Destroy; override; 27 | procedure Assign(ASource: TPersistent); override; 28 | published 29 | property Colors: TBCEditorTokenInfoColors read FColors write FColors; 30 | property DelayInterval: Cardinal read FDelayInterval write FDelayInterval default 300; 31 | property Enabled: Boolean read FEnabled write FEnabled default False; 32 | property Font: TFont read FFont write SetFont; 33 | property Height: Integer read FHeight write FHeight default 0; 34 | property Options: TBCEditorTokenInfoOptions read FOptions write FOptions default BCEDITOR_TOKEN_INFO_DEFAULT_OPTIONS; 35 | property Title: TBCEditorTokenInfoTitle read FTitle write FTitle; 36 | property Width: Integer read FWidth write FWidth default 0; 37 | end; 38 | 39 | implementation 40 | 41 | constructor TBCEditorTokenInfo.Create; 42 | begin 43 | inherited Create; 44 | 45 | FColors := TBCEditorTokenInfoColors.Create; 46 | FDelayInterval := 300; 47 | FEnabled := False; 48 | FFont := TFont.Create; 49 | FFont.Name := 'Courier New'; 50 | FFont.Size := 8; 51 | FHeight := 0; 52 | FOptions := BCEDITOR_TOKEN_INFO_DEFAULT_OPTIONS; 53 | FTitle := TBCEditorTokenInfoTitle.Create; 54 | FWidth := 0; 55 | end; 56 | 57 | destructor TBCEditorTokenInfo.Destroy; 58 | begin 59 | FColors.Free; 60 | FFont.Free; 61 | FTitle.Free; 62 | 63 | inherited; 64 | end; 65 | 66 | procedure TBCEditorTokenInfo.Assign(ASource: TPersistent); 67 | begin 68 | if ASource is TBCEditorTokenInfo then 69 | with ASource as TBCEditorTokenInfo do 70 | begin 71 | Self.FColors.Assign(FColors); 72 | Self.FDelayInterval := FDelayInterval; 73 | Self.FEnabled := FEnabled; 74 | Self.FFont.Assign(FFont); 75 | Self.FHeight := FHeight; 76 | Self.FOptions := FOptions; 77 | Self.FTitle.Assign(FTitle); 78 | Self.FWidth := FWidth; 79 | end 80 | else 81 | inherited Assign(ASource); 82 | end; 83 | 84 | procedure TBCEditorTokenInfo.SetFont(const AValue: TFont); 85 | begin 86 | FFont.Assign(AValue); 87 | end; 88 | 89 | end. 90 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Undo.Item.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Undo.Item; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Types; 7 | 8 | type 9 | TBCEditorUndoItem = class(TPersistent) 10 | protected 11 | FChangeBlockNumber: Integer; 12 | FChangeCaretPosition: TBCEditorTextPosition; 13 | FChangeData: Pointer; 14 | FChangeEndPosition: TBCEditorTextPosition; 15 | FChangeReason: TBCEditorChangeReason; 16 | FChangeSelectionMode: TBCEditorSelectionMode; 17 | FChangeBeginPosition: TBCEditorTextPosition; 18 | FChangeString: string; 19 | public 20 | procedure Assign(ASource: TPersistent); override; 21 | 22 | property ChangeBlockNumber: Integer read FChangeBlockNumber write FChangeBlockNumber; 23 | property ChangeCaretPosition: TBCEditorTextPosition read FChangeCaretPosition write FChangeCaretPosition; 24 | property ChangeData: Pointer read FChangeData write FChangeData; 25 | property ChangeEndPosition: TBCEditorTextPosition read FChangeEndPosition write FChangeEndPosition; 26 | property ChangeReason: TBCEditorChangeReason read FChangeReason write FChangeReason; 27 | property ChangeSelectionMode: TBCEditorSelectionMode read FChangeSelectionMode write FChangeSelectionMode; 28 | property ChangeBeginPosition: TBCEditorTextPosition read FChangeBeginPosition write FChangeBeginPosition; 29 | property ChangeString: string read FChangeString write FChangeString; 30 | end; 31 | 32 | implementation 33 | 34 | procedure TBCEditorUndoItem.Assign(ASource: TPersistent); 35 | begin 36 | if Assigned(ASource) and (ASource is TBCEditorUndoItem) then 37 | with ASource as TBCEditorUndoItem do 38 | begin 39 | Self.FChangeBlockNumber := FChangeBlockNumber; 40 | Self.FChangeCaretPosition := FChangeCaretPosition; 41 | Self.FChangeData := FChangeData; 42 | Self.FChangeReason := FChangeReason; 43 | Self.FChangeSelectionMode := FChangeSelectionMode; 44 | Self.FChangeBeginPosition := FChangeBeginPosition; 45 | Self.FChangeEndPosition := FChangeEndPosition; 46 | Self.FChangeString := FChangeString; 47 | end 48 | else 49 | inherited Assign(ASource); 50 | end; 51 | 52 | end. 53 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.Undo.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.Undo; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Types; 7 | 8 | type 9 | TBCEditorUndo = class(TPersistent) 10 | strict private 11 | FOptions: TBCEditorUndoOptions; 12 | procedure SetOptions(const AValue: TBCEditorUndoOptions); 13 | public 14 | constructor Create; 15 | procedure Assign(ASource: TPersistent); override; 16 | procedure SetOption(const AOption: TBCEditorUndoOption; const AEnabled: Boolean); 17 | published 18 | property Options: TBCEditorUndoOptions read FOptions write SetOptions default [uoGroupUndo]; 19 | end; 20 | 21 | implementation 22 | 23 | constructor TBCEditorUndo.Create; 24 | begin 25 | inherited; 26 | 27 | FOptions := [uoGroupUndo]; 28 | end; 29 | 30 | procedure TBCEditorUndo.Assign(ASource: TPersistent); 31 | begin 32 | if ASource is TBCEditorUndo then 33 | with ASource as TBCEditorUndo do 34 | Self.FOptions := FOptions 35 | else 36 | inherited Assign(ASource); 37 | end; 38 | 39 | procedure TBCEditorUndo.SetOption(const AOption: TBCEditorUndoOption; const AEnabled: Boolean); 40 | begin 41 | if AEnabled then 42 | Include(FOptions, AOption) 43 | else 44 | Exclude(FOptions, AOption); 45 | end; 46 | 47 | procedure TBCEditorUndo.SetOptions(const AValue: TBCEditorUndoOptions); 48 | begin 49 | if FOptions <> AValue then 50 | FOptions := AValue; 51 | end; 52 | 53 | end. 54 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.UnknownChars.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.UnknownChars; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes; 7 | 8 | type 9 | TBCEditorUnknownChars = class(TPersistent) 10 | strict private 11 | FEnabled: Boolean; 12 | FReplaceChar: AnsiChar; 13 | public 14 | constructor Create; 15 | procedure Assign(ASource: TPersistent); override; 16 | published 17 | property Enabled: Boolean read FEnabled write FEnabled default True; 18 | property ReplaceChar: AnsiChar read FReplaceChar write FReplaceChar default '?'; 19 | end; 20 | 21 | implementation 22 | 23 | constructor TBCEditorUnknownChars.Create; 24 | begin 25 | inherited; 26 | 27 | FEnabled := True; 28 | FReplaceChar := '?'; 29 | end; 30 | 31 | procedure TBCEditorUnknownChars.Assign(ASource: TPersistent); 32 | begin 33 | if Assigned(ASource) and (ASource is TBCEditorUnknownChars) then 34 | with ASource as TBCEditorUnknownChars do 35 | begin 36 | Self.FEnabled := FEnabled; 37 | Self.FReplaceChar := FReplaceChar; 38 | end 39 | else 40 | inherited Assign(ASource); 41 | end; 42 | 43 | 44 | end. 45 | -------------------------------------------------------------------------------- /Source/BCEditor.Editor.WordWrap.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Editor.WordWrap.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Consts; 7 | 8 | type 9 | TBCEditorWordWrapColors = class(TPersistent) 10 | strict private 11 | FArrow: TColor; 12 | FLines: TColor; 13 | FOnChange: TNotifyEvent; 14 | procedure SetArrow(const AValue: TColor); 15 | procedure SetLines(const AValue: TColor); 16 | procedure DoChange; 17 | public 18 | constructor Create; 19 | procedure Assign(ASource: TPersistent); override; 20 | published 21 | property Arrow: TColor read FArrow write SetArrow default clWordWrapIndicatorArrow; 22 | property Lines: TColor read FLines write SetLines default clWordWrapIndicatorLines; 23 | property OnChange: TNotifyEvent read FOnChange write FOnChange; 24 | end; 25 | 26 | implementation 27 | 28 | constructor TBCEditorWordWrapColors.Create; 29 | begin 30 | inherited; 31 | 32 | FArrow := clWordWrapIndicatorArrow; 33 | FLines := clWordWrapIndicatorLines; 34 | end; 35 | 36 | procedure TBCEditorWordWrapColors.Assign(ASource: TPersistent); 37 | begin 38 | if ASource is TBCEditorWordWrapColors then 39 | with ASource as TBCEditorWordWrapColors do 40 | begin 41 | Self.FArrow := FArrow; 42 | Self.FLines := FLines; 43 | Self.DoChange; 44 | end 45 | else 46 | inherited Assign(ASource); 47 | end; 48 | 49 | procedure TBCEditorWordWrapColors.DoChange; 50 | begin 51 | if Assigned(FOnChange) then 52 | FOnChange(Self); 53 | end; 54 | 55 | procedure TBCEditorWordWrapColors.SetArrow(const AValue: TColor); 56 | begin 57 | if FArrow <> AValue then 58 | begin 59 | FArrow := AValue; 60 | DoChange; 61 | end; 62 | end; 63 | 64 | procedure TBCEditorWordWrapColors.SetLines(const AValue: TColor); 65 | begin 66 | if FLines <> AValue then 67 | begin 68 | FLines := AValue; 69 | DoChange; 70 | end; 71 | end; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /Source/BCEditor.Encoding.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Encoding; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils; 7 | 8 | type 9 | TUTF8WithoutBOM = class(TUTF8Encoding) 10 | public 11 | function GetPreamble: TBytes; override; 12 | end; 13 | 14 | TEncoding = class(System.SysUtils.TEncoding) 15 | strict private 16 | class var 17 | FUTF8WithoutBOM: TEncoding; 18 | class function GetUTF8WithoutBOM: TEncoding; static; 19 | public 20 | class property UTF8WithoutBOM: TEncoding read GetUTF8WithoutBOM; 21 | end; 22 | 23 | implementation 24 | 25 | uses 26 | Winapi.Windows; 27 | 28 | { TUTF8WithoutBOM } 29 | 30 | function TUTF8WithoutBOM.GetPreamble: TBytes; 31 | begin 32 | SetLength(Result, 0); 33 | end; 34 | 35 | { TEncoding } 36 | 37 | class function TEncoding.GetUTF8WithoutBOM: TEncoding; 38 | var 39 | LEncoding: System.SysUtils.TEncoding; 40 | begin 41 | if not Assigned(FUTF8WithoutBOM) then 42 | begin 43 | LEncoding := TUTF8WithoutBOM.Create(CP_UTF8, 0, 0); 44 | if Assigned(AtomicCmpExchange(Pointer(FUTF8WithoutBOM), Pointer(LEncoding), nil)) then 45 | LEncoding.Free; 46 | end; 47 | Result := FUTF8WithoutBOM; 48 | end; 49 | 50 | initialization 51 | 52 | finalization 53 | 54 | TEncoding.UTF8WithoutBOM.Free; 55 | 56 | end. 57 | -------------------------------------------------------------------------------- /Source/BCEditor.Highlighter.Colors.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Highlighter.Colors; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, Vcl.Graphics, BCEditor.Highlighter.Info; 7 | 8 | type 9 | TBCEditorHighlighterElement = record 10 | Background: TColor; 11 | Foreground: TColor; 12 | Name: string; 13 | FontStyles: TFontStyles; 14 | end; 15 | PBCEditorHighlighterElement = ^TBCEditorHighlighterElement; 16 | 17 | TBCEditorHighlighterColors = class(TObject) 18 | strict private 19 | FFileName: string; 20 | FInfo: TBCEditorHighlighterInfo; 21 | FElements: TList; 22 | FName: string; 23 | FOwner: TObject; 24 | public 25 | constructor Create(AOwner: TObject); 26 | destructor Destroy; override; 27 | 28 | function GetElement(const Name: string): PBCEditorHighlighterElement; 29 | procedure Clear; 30 | procedure LoadFromFile(const AFileName: string); 31 | procedure LoadFromStream(AStream: TStream); 32 | property FileName: string read FFileName write FFileName; 33 | property Info: TBCEditorHighlighterInfo read FInfo write FInfo; 34 | property Name: string read FName write FName; 35 | property Styles: TList read FElements write FElements; 36 | end; 37 | 38 | implementation 39 | 40 | uses 41 | System.SysUtils, BCEditor.Editor.Base, BCEditor.Highlighter, BCEditor.Highlighter.Import.JSON, System.IOUtils; 42 | 43 | constructor TBCEditorHighlighterColors.Create(AOwner: TObject); 44 | begin 45 | inherited Create; 46 | 47 | FOwner := AOwner; 48 | FElements := TList.Create; 49 | FInfo := TBCEditorHighlighterInfo.Create; 50 | end; 51 | 52 | destructor TBCEditorHighlighterColors.Destroy; 53 | begin 54 | Clear; 55 | FElements.Free; 56 | FInfo.Free; 57 | 58 | inherited; 59 | end; 60 | 61 | procedure TBCEditorHighlighterColors.Clear; 62 | var 63 | LIndex: Integer; 64 | begin 65 | for LIndex := FElements.Count - 1 downto 0 do 66 | Dispose(PBCEditorHighlighterElement(FElements.Items[LIndex])); 67 | FElements.Clear; 68 | end; 69 | 70 | function TBCEditorHighlighterColors.GetElement(const Name: string): PBCEditorHighlighterElement; 71 | var 72 | LIndex: Integer; 73 | LElement: PBCEditorHighlighterElement; 74 | begin 75 | Result := nil; 76 | for LIndex := 0 to FElements.Count - 1 do 77 | begin 78 | LElement := PBCEditorHighlighterElement(FElements.Items[LIndex]); 79 | if LElement^.Name = Name then 80 | Exit(LElement); 81 | end; 82 | end; 83 | 84 | procedure TBCEditorHighlighterColors.LoadFromFile(const AFileName: string); 85 | var 86 | LStream: TStream; 87 | LHighlighter: TBCEditorHighlighter; 88 | LEditor: TBCBaseEditor; 89 | begin 90 | FFileName := AFileName; 91 | FName := TPath.GetFileNameWithoutExtension(AFileName); 92 | 93 | LHighlighter := TBCEditorHighlighter(FOwner); 94 | LEditor := LHighlighter.Editor as TBCBaseEditor; 95 | LStream := LEditor.CreateFileStream(LEditor.GetColorsFileName(AFileName)); 96 | try 97 | LoadFromStream(LStream); 98 | finally 99 | LStream.Free; 100 | end; 101 | end; 102 | 103 | procedure TBCEditorHighlighterColors.LoadFromStream(AStream: TStream); 104 | var 105 | LHighlighter: TBCEditorHighlighter; 106 | begin 107 | TBCEditorHighlighter(FOwner).Loading := True; 108 | LHighlighter := TBCEditorHighlighter(FOwner); 109 | with TBCEditorHighlighterImportJSON.Create(LHighlighter) do 110 | try 111 | ImportColorsFromStream(AStream); 112 | finally 113 | Free; 114 | end; 115 | LHighlighter.UpdateColors; 116 | TBCEditorHighlighter(FOwner).Loading := False; 117 | end; 118 | 119 | end. 120 | -------------------------------------------------------------------------------- /Source/BCEditor.Highlighter.Comments.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Highlighter.Comments; 2 | 3 | interface 4 | 5 | uses 6 | BCEditor.Consts, BCEditor.Types; 7 | 8 | type 9 | TBCEditorHighlighterComments = class(TObject) 10 | strict private 11 | FChars: TBCEditorCharSet; 12 | FBlockComments: TBCEditorArrayOfString; 13 | FLineComments: TBCEditorArrayOfString; 14 | procedure AddChars(const AToken: string); 15 | public 16 | destructor Destroy; override; 17 | 18 | procedure AddBlockComment(const AOpenToken: string; const ACloseToken: string); 19 | procedure AddLineComment(const AToken: string); 20 | procedure Clear; 21 | property Chars: TBCEditorCharSet read FChars write FChars; 22 | property BlockComments: TBCEditorArrayOfString read FBlockComments; 23 | property LineComments: TBCEditorArrayOfString read FLineComments; 24 | end; 25 | 26 | implementation 27 | 28 | destructor TBCEditorHighlighterComments.Destroy; 29 | begin 30 | Clear; 31 | 32 | inherited Destroy; 33 | end; 34 | 35 | procedure TBCEditorHighlighterComments.AddChars(const AToken: string); 36 | var 37 | LIndex: Integer; 38 | begin 39 | for LIndex := 1 to Length(AToken) do 40 | FChars := FChars + [AToken[LIndex]]; 41 | end; 42 | 43 | procedure TBCEditorHighlighterComments.AddBlockComment(const AOpenToken: string; const ACloseToken: string); 44 | var 45 | LIndex, LLength: Integer; 46 | begin 47 | LLength := Length(FBlockComments); 48 | 49 | for LIndex := 0 to LLength - 1 do 50 | begin 51 | if (FBlockComments[LIndex] = AOpenToken) and (FBlockComments[LIndex + 1] = ACloseToken) then 52 | Exit; 53 | end; 54 | 55 | SetLength(FBlockComments, LLength + 2); 56 | FBlockComments[LLength] := AOpenToken; 57 | FBlockComments[LLength + 1] := ACloseToken; 58 | 59 | AddChars(AOpenToken); 60 | AddChars(ACloseToken); 61 | end; 62 | 63 | procedure TBCEditorHighlighterComments.AddLineComment(const AToken: string); 64 | var 65 | LIndex, LLength: Integer; 66 | begin 67 | LLength := Length(FLineComments); 68 | 69 | for LIndex := 0 to LLength - 1 do 70 | if FLineComments[LIndex] = AToken then 71 | Exit; 72 | 73 | SetLength(FLineComments, LLength + 1); 74 | FLineComments[LLength] := AToken; 75 | 76 | AddChars(AToken); 77 | end; 78 | 79 | procedure TBCEditorHighlighterComments.Clear; 80 | begin 81 | SetLength(FBlockComments, 0); 82 | SetLength(FLineComments, 0); 83 | FChars := []; 84 | end; 85 | 86 | end. 87 | -------------------------------------------------------------------------------- /Source/BCEditor.Highlighter.Info.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Highlighter.Info; 2 | 3 | interface 4 | 5 | type 6 | TBCEditorAuthorInfo = record 7 | Name: string; 8 | Email: string; 9 | Comments: string; 10 | end; 11 | 12 | TBCEditorGeneralInfo = record 13 | Version: string; 14 | Date: string; 15 | Sample: string; 16 | end; 17 | 18 | TBCEditorHighlighterInfo = class 19 | public 20 | Author: TBCEditorAuthorInfo; 21 | General: TBCEditorGeneralInfo; 22 | procedure Clear; 23 | end; 24 | 25 | implementation 26 | 27 | procedure TBCEditorHighlighterInfo.Clear; 28 | begin 29 | General.Version := ''; 30 | General.Date := ''; 31 | General.Sample := ''; 32 | Author.Name := ''; 33 | Author.Email := ''; 34 | Author.Comments := ''; 35 | end; 36 | 37 | end. 38 | -------------------------------------------------------------------------------- /Source/BCEditor.Language.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Language; 2 | 3 | interface 4 | 5 | resourcestring 6 | { BCEditor.Editor.Base } 7 | SBCEditorVersion = 'Version'; 8 | SBCEditorScrollInfoTopLine = 'Top line: %d'; 9 | SBCEditorScrollInfo = '%d - %d'; 10 | SBCEditorSearchStringNotFound = 'Search string ''%s'' not found'; 11 | SBCEditorSearchMatchNotFound = 'Search match not found.%sRestart search from the beginning of the file?'; 12 | SBCEditorRightMarginPosition = 'Position: %d'; 13 | SBCEditorSearchEngineNotAssigned = 'Search engine has not been assigned'; 14 | 15 | { BCEditor.Editor.KeyCommands } 16 | SBCEditorDuplicateShortcut = 'Shortcut already exists'; 17 | 18 | { BCEditor.MacroRecorder } 19 | SBCEditorCannotRecord = 'Cannot record macro; already recording or playing'; 20 | SBCEditorCannotPlay = 'Cannot playback macro; already playing or recording'; 21 | SBCEditorCannotPause = 'Can only pause when recording'; 22 | SBCEditorCannotResume = 'Can only resume when paused'; 23 | SBCEditorShortcutAlreadyExists = 'Shortcut already exists'; 24 | 25 | { BCEditor.Print.Preview } 26 | SBCEditorPreviewScrollHint = 'Page: %d'; 27 | 28 | { BCEditor.TextBuffer } 29 | SBCEditorListIndexOutOfBounds = 'Invalid stringlist index %d'; 30 | SBCEditorInvalidCapacity = 'Stringlist capacity cannot be smaller than count'; 31 | 32 | { BCEditor.Highlighter.Import.JSON } 33 | SBCEditorErrorInHighlighterParse = 'JSON parse error on line %d column %d: %s'; 34 | SBCEditorErrorInHighlighterImport = 'Error in highlighter import: %s'; 35 | 36 | { BCEditor.Search } 37 | SBCEditorPatternIsEmpty = 'Pattern is empty'; 38 | 39 | { BCEditor.PaintHelper } 40 | SBCEditorValueMustBeSpecified = 'SetBaseFont: ''Value'' must be specified.'; 41 | 42 | implementation 43 | 44 | end. -------------------------------------------------------------------------------- /Source/BCEditor.Register.dcr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Source/BCEditor.Register.dcr -------------------------------------------------------------------------------- /Source/BCEditor.Register.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Register; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Editor, BCEditor.Editor.DB, BCEditor.Print, BCEditor.Print.Preview, BCEditor.MacroRecorder; 7 | 8 | procedure Register; 9 | 10 | implementation 11 | 12 | uses 13 | DesignIntf; 14 | 15 | procedure Register; 16 | begin 17 | RegisterComponents('BCEditor', [TBCEditor, TBCDBEditor, TBCEditorPrint, TBCEditorPrintPreview, TBCEditorMacroRecorder]); 18 | { UnlistPublishedProperty } 19 | UnlistPublishedProperty(TBCEditor, 'Ctl3D'); 20 | UnlistPublishedProperty(TBCEditor, 'CustomHint'); 21 | UnlistPublishedProperty(TBCEditor, 'Hint'); 22 | UnlistPublishedProperty(TBCEditor, 'HelpContext'); 23 | UnlistPublishedProperty(TBCEditor, 'HelpKeyword'); 24 | UnlistPublishedProperty(TBCEditor, 'HelpType'); 25 | UnlistPublishedProperty(TBCEditor, 'ImeMode'); 26 | UnlistPublishedProperty(TBCEditor, 'ImeName'); 27 | UnlistPublishedProperty(TBCEditor, 'ParentColor'); 28 | UnlistPublishedProperty(TBCEditor, 'ParentCtl3D'); 29 | UnlistPublishedProperty(TBCEditor, 'ParentCustomHint'); 30 | UnlistPublishedProperty(TBCEditor, 'ParentFont'); 31 | UnlistPublishedProperty(TBCEditor, 'ParentShowHint'); 32 | UnlistPublishedProperty(TBCEditor, 'ShowHint'); 33 | end; 34 | 35 | end. 36 | -------------------------------------------------------------------------------- /Source/BCEditor.RegisterProperty.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.RegisterProperty; 2 | 3 | interface 4 | 5 | uses 6 | DesignIntf, DesignEditors, VCLEditors, StrEdit, System.Classes; 7 | 8 | procedure Register; 9 | 10 | implementation 11 | 12 | uses 13 | Vcl.Controls, BCEditor.Editor, BCEditor.MacroRecorder, System.SysUtils; 14 | 15 | { Register } 16 | 17 | procedure Register; 18 | begin 19 | RegisterPropertyEditor(TypeInfo(Char), nil, '', TCharProperty); 20 | RegisterPropertyEditor(TypeInfo(TStrings), nil, '', TStringListProperty); 21 | RegisterPropertyEditor(TypeInfo(TShortCut), TBCEditorMacroRecorder, '', TShortCutProperty); 22 | end; 23 | 24 | end. 25 | -------------------------------------------------------------------------------- /Source/BCEditor.Search.RegularExpressions.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Search.RegularExpressions; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, System.RegularExpressions, BCEditor.Search, BCEditor.Lines; 7 | 8 | type 9 | TBCEditorRegexSearch = class(TBCEditorSearchBase) 10 | strict private 11 | FLengths: TList; 12 | FOptions: TRegexOptions; 13 | FPattern: string; 14 | FPositions: TList; 15 | protected 16 | function GetLength(const AIndex: Integer): Integer; override; 17 | function GetPattern: string; override; 18 | function GetResult(const AIndex: Integer): Integer; override; 19 | function GetResultCount: Integer; override; 20 | procedure CaseSensitiveChanged; override; 21 | procedure SetPattern(const AValue: string); override; 22 | public 23 | constructor Create; 24 | destructor Destroy; override; 25 | function SearchAll(const ALines: TBCEditorLines): Integer; override; 26 | procedure Clear; override; 27 | end; 28 | 29 | implementation 30 | 31 | uses 32 | System.SysUtils; 33 | 34 | constructor TBCEditorRegexSearch.Create; 35 | begin 36 | inherited Create; 37 | 38 | FOptions := [roMultiLine]; 39 | {$if CompilerVersion > 26} 40 | Include(FOptions, roNotEmpty); 41 | {$endif} 42 | FPositions := TList.Create; 43 | FLengths := TList.Create; 44 | end; 45 | 46 | destructor TBCEditorRegexSearch.Destroy; 47 | begin 48 | inherited; 49 | FPositions.Free; 50 | FLengths.Free; 51 | end; 52 | 53 | procedure TBCEditorRegexSearch.CaseSensitiveChanged; 54 | begin 55 | if CaseSensitive then 56 | Exclude(FOptions, roIgnoreCase) 57 | else 58 | Include(FOptions, roIgnoreCase); 59 | end; 60 | 61 | function TBCEditorRegexSearch.SearchAll(const ALines: TBCEditorLines): Integer; 62 | 63 | procedure AddResult(const APos, ALength: Integer); 64 | begin 65 | FPositions.Add(Pointer(APos)); 66 | FLengths.Add(Pointer(ALength)); 67 | end; 68 | 69 | var 70 | LRegex: TRegEx; 71 | LMatch: TMatch; 72 | begin 73 | Result := 0; 74 | Clear; 75 | Status := ''; 76 | try 77 | LRegex := TRegEx.Create(FPattern, FOptions); 78 | LMatch := LRegex.Match(ALines.Text); 79 | while LMatch.Success do 80 | begin 81 | AddResult(LMatch.Index, LMatch.Length); 82 | LMatch := LMatch.NextMatch; 83 | Inc(Result); 84 | end; 85 | except 86 | on E: Exception do 87 | Status := E.Message; 88 | end; 89 | end; 90 | 91 | procedure TBCEditorRegexSearch.Clear; 92 | begin 93 | FPositions.Clear; 94 | FLengths.Clear; 95 | end; 96 | 97 | function TBCEditorRegexSearch.GetLength(const AIndex: Integer): Integer; 98 | begin 99 | Result := Integer(FLengths[AIndex]); 100 | end; 101 | 102 | function TBCEditorRegexSearch.GetPattern: string; 103 | begin 104 | Result := FPattern; 105 | end; 106 | 107 | function TBCEditorRegexSearch.GetResult(const AIndex: Integer): Integer; 108 | begin 109 | Result := Integer(FPositions[AIndex]); 110 | end; 111 | 112 | function TBCEditorRegexSearch.GetResultCount: Integer; 113 | begin 114 | Result := FPositions.Count; 115 | end; 116 | 117 | procedure TBCEditorRegexSearch.SetPattern(const AValue: string); 118 | begin 119 | FPattern := AValue; 120 | end; 121 | 122 | end. 123 | -------------------------------------------------------------------------------- /Source/BCEditor.Search.Wildcard.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Search.Wildcard; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Search.RegularExpressions; 7 | 8 | type 9 | TBCEditorWildcardSearch = class(TBCEditorRegexSearch) 10 | strict private 11 | FPattern: string; 12 | protected 13 | function GetPattern: string; override; 14 | function WildCardToRegExpr(const AWildCard: string): string; 15 | procedure SetPattern(const AValue: string); override; 16 | public 17 | constructor Create; 18 | end; 19 | 20 | implementation 21 | 22 | { TBCEditorWildcardSearch } 23 | 24 | constructor TBCEditorWildcardSearch.Create; 25 | begin 26 | inherited Create; 27 | FPattern := ''; 28 | end; 29 | 30 | function TBCEditorWildcardSearch.GetPattern: string; 31 | begin 32 | Result := FPattern; 33 | end; 34 | 35 | procedure TBCEditorWildcardSearch.SetPattern(const AValue: string); 36 | begin 37 | FPattern := AValue; 38 | 39 | inherited SetPattern(WildCardToRegExpr(AValue)); 40 | end; 41 | 42 | function TBCEditorWildcardSearch.WildCardToRegExpr(const AWildCard: string): string; 43 | var 44 | LIndex: Integer; 45 | begin 46 | Result := ''; 47 | 48 | for LIndex := 1 to Length(AWildCard) do 49 | case AWildCard[LIndex] of 50 | '*': 51 | Result := Result + '.*'; 52 | '?': 53 | Result := Result + '.?'; 54 | else 55 | Result := Result + AWildCard[LIndex]; 56 | end; 57 | end; 58 | 59 | end. 60 | -------------------------------------------------------------------------------- /Source/BCEditor.Search.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Search; 2 | 3 | interface 4 | 5 | uses 6 | System.Classes, BCEditor.Lines; 7 | 8 | type 9 | TBCEditorSearchBase = class 10 | strict private 11 | FCaseSensitive: Boolean; 12 | FStatus: string; 13 | FWholeWordsOnly: Boolean; 14 | procedure SetCaseSensitive(const AValue: Boolean); 15 | protected 16 | function GetLength(const AIndex: Integer): Integer; virtual; abstract; 17 | function GetPattern: string; virtual; abstract; 18 | function GetResult(const AIndex: Integer): Integer; virtual; abstract; 19 | function GetResultCount: Integer; virtual; abstract; 20 | procedure CaseSensitiveChanged; virtual; abstract; 21 | procedure SetPattern(const AValue: string); virtual; abstract; 22 | public 23 | constructor Create; 24 | function SearchAll(const ALines: TBCEditorLines): Integer; virtual; abstract; 25 | procedure Clear; virtual; abstract; 26 | property CaseSensitive: Boolean read FCaseSensitive write SetCaseSensitive default False; 27 | property Lengths[const AIndex: Integer]: Integer read GetLength; 28 | property Pattern: string read GetPattern write SetPattern; 29 | property ResultCount: Integer read GetResultCount; 30 | property Results[const AIndex: Integer]: Integer read GetResult; 31 | property Status: string read FStatus write FStatus; 32 | property WholeWordsOnly: Boolean read FWholeWordsOnly write FWholeWordsOnly default False; 33 | end; 34 | 35 | implementation 36 | 37 | constructor TBCEditorSearchBase.Create; 38 | begin 39 | inherited; 40 | 41 | FCaseSensitive := False; 42 | FWholeWordsOnly := False; 43 | end; 44 | 45 | procedure TBCEditorSearchBase.SetCaseSensitive(const AValue: Boolean); 46 | begin 47 | FCaseSensitive := AValue; 48 | CaseSensitiveChanged; 49 | end; 50 | 51 | end. 52 | 53 | -------------------------------------------------------------------------------- /Source/BCEditor.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/TBCEditor/d7015b4fa36eef12a6b54e361816fe9ad85f95e1/Source/BCEditor.res -------------------------------------------------------------------------------- /Source/Languages/Russian/BCEditor.Language.pas: -------------------------------------------------------------------------------- 1 | unit BCEditor.Language; 2 | 3 | interface 4 | 5 | resourcestring 6 | 7 | { BCEditor.Editor.Base } 8 | SBCEditorVersion = 'Версия'; 9 | SBCEditorScrollInfoTopLine = 'Верхняя строка: %d'; 10 | SBCEditorScrollInfo = '%d - %d'; 11 | SBCEditorSearchStringNotFound = 'Строка ''%s'' не найдена'; 12 | SBCEditorSearchMatchNotFound = 'Выражение не найдено. %s Повторить поиск с начала текста?'; 13 | SBCEditorRightMarginPosition = 'Позиция: %d'; 14 | SBCEditorSearchEngineNotAssigned = 'Поисковая машина не может быть присвоена'; 15 | 16 | { BCEditor.Editor.KeyCommands } 17 | SBCEditorDuplicateShortcut = 'Сочетание клавиш уже существует'; 18 | 19 | { BCEditor.MacroRecorder } 20 | SBCEditorCannotRecord = 'Невозможно записать макрос - он уже записывается или проигрывается'; 21 | SBCEditorCannotPlay = 'Невозможно воспроизвести макрос - он уже записывается или проигрывается'; 22 | SBCEditorCannotPause = 'Можно приостановить запись'; 23 | SBCEditorCannotResume = 'Можно продолжить после паузы'; 24 | SBCEditorShortcutAlreadyExists = 'Сочетание клавиш уже существует'; 25 | 26 | { BCEditor.Print.Preview } 27 | SBCEditorPreviewScrollHint = 'Страница: %d'; 28 | 29 | { BCEditor.TextBuffer } 30 | SBCEditorListIndexOutOfBounds = 'Неверный индекст списка строк %d'; 31 | SBCEditorInvalidCapacity = 'Ёмкость списка строк не может быть меньше количества строк в нём'; 32 | 33 | { BCEditor.Highlighter.Import.JSON } 34 | SBCEditorErrorInHighlighterParse = 'Ошибка разбора JSON строка %d столбец %d: %s'; 35 | SBCEditorErrorInHighlighterImport = 'Ошибка импорта схемы подсветки: %s'; 36 | 37 | { BCEditor.Search } 38 | SBCEditorPatternIsEmpty = 'Паттерн занят'; 39 | 40 | { BCEditor.PaintHelper } 41 | SBCEditorValueMustBeSpecified = 'SetBaseFont: ''Value'' должно быть указано.'; 42 | 43 | implementation 44 | 45 | end. --------------------------------------------------------------------------------