mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 11:18:22 +02:00
SynEdit: remove circular dependency between SynEdit and SynGutterChanges
git-svn-id: trunk@64486 -
This commit is contained in:
parent
2c18181316
commit
e966434b1a
@ -264,8 +264,6 @@ type
|
||||
|
||||
TCustomSynEdit = class;
|
||||
|
||||
TSynLineState = (slsNone, slsSaved, slsUnsaved);
|
||||
|
||||
|
||||
{ TLazSynEditPlugin }
|
||||
|
||||
@ -947,7 +945,7 @@ type
|
||||
);
|
||||
|
||||
|
||||
function GetLineState(ALine: Integer): TSynLineState;
|
||||
function GetLineState(ALine: Integer): TSynLineState; override;
|
||||
procedure MarkTextAsSaved;
|
||||
|
||||
// BoorMark
|
||||
|
@ -291,6 +291,9 @@ type
|
||||
procedure InvalidateLine(Line: integer); virtual; abstract;
|
||||
procedure InvalidateGutterLines(FirstLine, LastLine: integer); virtual; abstract; // Currently invalidates full line => that may change
|
||||
procedure InvalidateLines(FirstLine, LastLine: integer); virtual; abstract;
|
||||
|
||||
// text / lines
|
||||
function GetLineState(ALine: Integer): TSynLineState; virtual; abstract;
|
||||
public
|
||||
// Byte to Char
|
||||
function LogicalToPhysicalPos(const p: TPoint): TPoint; virtual; abstract;
|
||||
|
@ -67,6 +67,7 @@ type
|
||||
X, Y, Offs: Integer;
|
||||
end;
|
||||
|
||||
TSynLineState = (slsNone, slsSaved, slsUnsaved);
|
||||
|
||||
TSynCoordinateMappingFlag = (
|
||||
scmLimitToLines,
|
||||
|
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, FPCanvas, Graphics, LCLType, LCLIntf, SynGutterBase,
|
||||
SynEditMiscProcs, LazSynEditText;
|
||||
SynEditMiscProcs, LazSynEditText, SynEditTypes;
|
||||
|
||||
type
|
||||
{ TSynGutterChanges }
|
||||
@ -29,8 +29,6 @@ type
|
||||
end;
|
||||
|
||||
implementation
|
||||
uses
|
||||
SynEdit;
|
||||
|
||||
{ TSynGutterChanges }
|
||||
|
||||
@ -82,8 +80,8 @@ var
|
||||
begin
|
||||
if not Visible then exit;
|
||||
|
||||
LineHeight := TCustomSynEdit(SynEdit).LineHeight;
|
||||
c := TCustomSynEdit(SynEdit).Lines.Count;
|
||||
LineHeight := SynEdit.LineHeight;
|
||||
c := SynEdit.Lines.Count;
|
||||
t := ToIdx(GutterArea.TextArea.TopLine);
|
||||
|
||||
if MarkupInfo.Background <> clNone then
|
||||
@ -108,7 +106,7 @@ begin
|
||||
rcLine.Top := rcLine.Bottom;
|
||||
Inc(rcLine.Bottom, LineHeight);
|
||||
|
||||
case TCustomSynEdit(SynEdit).GetLineState(iLine) of
|
||||
case SynEdit.GetLineState(iLine) of
|
||||
slsNone: ;
|
||||
slsSaved:
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user