SynEdit: remove circular dependency between SynEdit and SynEditMarkupGutterMark

git-svn-id: trunk@64480 -
This commit is contained in:
ondrej 2021-02-05 13:20:26 +00:00
parent 3afd98807d
commit 3c494e28e9
3 changed files with 9 additions and 5 deletions

View File

@ -833,6 +833,7 @@ type
function GetCanUndo: Boolean; override;
function GetCaretObj: TSynEditCaret; override;
function GetHighlighterObj: TObject; override;
function GetMarksObj: TObject; override;
function GetSelectedColor : TSynSelectedColor; override;
function GetTextViewsManager: TSynTextViewsManager; override;
procedure FontChanged(Sender: TObject); override;
@ -2872,6 +2873,11 @@ begin
Result := FCaret.LineBytePos;
end;
function TCustomSynEdit.GetMarksObj: TObject;
begin
Result := FMarkList;
end;
procedure TCustomSynEdit.SetLogicalCaretXY(const NewLogCaretXY: TPoint);
begin
FCaret.ChangeOnTouch;

View File

@ -72,10 +72,6 @@ type
implementation
uses
SynEdit;
{ TSynEditMarkupGutterMark }
procedure TSynEditMarkupGutterMark.DoMarkupChanged(AMarkup: TSynSelectedColor);
@ -100,7 +96,7 @@ var
Section: PMarkSection;
x: Integer;
begin
MLine := TCustomSynEdit(SynEdit).Marks.Line[ARow];
MLine := (SynEdit.Marks as TSynEditMarkList).Line[ARow];
if MLine = nil then begin
SetLength(FRowData, 0);
exit;

View File

@ -154,6 +154,7 @@ type
function GetReadOnly: boolean; virtual;
function GetIsBackwardSel: Boolean;
function GetHighlighterObj: TObject; virtual; abstract;
function GetMarksObj: TObject; virtual; abstract;
function GetSelText: string;
function GetSelAvail: Boolean;
function GetSelectedColor: TSynSelectedColor; virtual; abstract;
@ -320,6 +321,7 @@ type
property SelAvail: Boolean read GetSelAvail;
property Highlighter: TObject read GetHighlighterObj;
property Marks: TObject read GetMarksObj;
end;
{ TSynEditFriend }