mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:56:01 +02:00
SynEdit: Added some debug helper
git-svn-id: trunk@20936 -
This commit is contained in:
parent
8d062d9fa4
commit
b83b08576a
@ -221,6 +221,7 @@ type
|
||||
// IsEqual is only needed/implemented for Carets
|
||||
function IsEqualContent(AnItem: TSynEditUndoItem): Boolean; virtual;
|
||||
function IsEqual(AnItem: TSynEditUndoItem): Boolean;
|
||||
function DebugString: String; virtual;
|
||||
public
|
||||
function IsCaretInfo: Boolean; virtual;
|
||||
function PerformUndo(Caller: TObject): Boolean; virtual; abstract;
|
||||
@ -884,6 +885,11 @@ begin
|
||||
if Result then Result := Result and IsEqualContent(AnItem);
|
||||
end;
|
||||
|
||||
function TSynEditUndoItem.DebugString: String;
|
||||
begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TSynEditUndoItem.IsCaretInfo: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
@ -115,6 +115,8 @@ type
|
||||
TSynEditUndoTrimMoveTo = class(TSynEditUndoItem)
|
||||
private
|
||||
FPosY, FLen: Integer;
|
||||
protected
|
||||
function DebugString: String; override;
|
||||
public
|
||||
constructor Create(APosY, ALen: Integer);
|
||||
function PerformUndo(Caller: TObject): Boolean; override;
|
||||
@ -125,6 +127,8 @@ type
|
||||
TSynEditUndoTrimMoveFrom = class(TSynEditUndoItem)
|
||||
private
|
||||
FPosY, FLen: Integer;
|
||||
protected
|
||||
function DebugString: String; override;
|
||||
public
|
||||
constructor Create(APosY, ALen: Integer);
|
||||
function PerformUndo(Caller: TObject): Boolean; override;
|
||||
@ -135,6 +139,8 @@ type
|
||||
TSynEditUndoTrimInsert = class(TSynEditUndoItem)
|
||||
private
|
||||
FPosX, FPosY, FLen: Integer;
|
||||
protected
|
||||
function DebugString: String; override;
|
||||
public
|
||||
constructor Create(APosX, APosY, ALen: Integer);
|
||||
function PerformUndo(Caller: TObject): Boolean; override;
|
||||
@ -146,6 +152,8 @@ type
|
||||
private
|
||||
FPosX, FPosY: Integer;
|
||||
FText: String;
|
||||
protected
|
||||
function DebugString: String; override;
|
||||
public
|
||||
constructor Create(APosX, APosY: Integer; AText: String);
|
||||
function PerformUndo(Caller: TObject): Boolean; override;
|
||||
@ -157,6 +165,8 @@ type
|
||||
private
|
||||
FPosY: Integer;
|
||||
FText: String;
|
||||
protected
|
||||
function DebugString: String; override;
|
||||
public
|
||||
constructor Create(APosY: Integer; AText: String);
|
||||
function PerformUndo(Caller: TObject): Boolean; override;
|
||||
@ -164,6 +174,11 @@ type
|
||||
|
||||
{ TSynEditUndoTrimMoveTo }
|
||||
|
||||
function TSynEditUndoTrimMoveTo.DebugString: String;
|
||||
begin
|
||||
Result := 'FPosY='+IntToStr(FPosY)+' FLen='+IntToStr(FLen);
|
||||
end;
|
||||
|
||||
constructor TSynEditUndoTrimMoveTo.Create(APosY, ALen: Integer);
|
||||
begin
|
||||
FPosY := APosY;
|
||||
@ -183,6 +198,11 @@ end;
|
||||
|
||||
{ TSynEditUndoTrimMoveFrom }
|
||||
|
||||
function TSynEditUndoTrimMoveFrom.DebugString: String;
|
||||
begin
|
||||
Result := 'FPosY='+IntToStr(FPosY)+' FLen='+IntToStr(FLen);
|
||||
end;
|
||||
|
||||
constructor TSynEditUndoTrimMoveFrom.Create(APosY, ALen: Integer);
|
||||
begin
|
||||
FPosY := APosY;
|
||||
@ -202,6 +222,11 @@ end;
|
||||
|
||||
{ TSynEditUndoTrimInsert }
|
||||
|
||||
function TSynEditUndoTrimInsert.DebugString: String;
|
||||
begin
|
||||
Result := 'FPosY='+IntToStr(FPosY)+' FPosX='+IntToStr(FPosX)+' FLen='+IntToStr(FLen);
|
||||
end;
|
||||
|
||||
constructor TSynEditUndoTrimInsert.Create(APosX, APosY, ALen: Integer);
|
||||
begin
|
||||
FPosX := APosX;
|
||||
@ -224,6 +249,11 @@ end;
|
||||
|
||||
{ TSynEditUndoTrimDelete }
|
||||
|
||||
function TSynEditUndoTrimDelete.DebugString: String;
|
||||
begin
|
||||
Result := 'FPosY='+IntToStr(FPosY)+' FPosX='+IntToStr(FPosX)+' FText="'+FText+'"';
|
||||
end;
|
||||
|
||||
constructor TSynEditUndoTrimDelete.Create(APosX, APosY: Integer; AText: String);
|
||||
begin
|
||||
FPosX := APosX;
|
||||
@ -246,6 +276,11 @@ end;
|
||||
|
||||
{ TSynEditUndoTrimForget }
|
||||
|
||||
function TSynEditUndoTrimForget.DebugString: String;
|
||||
begin
|
||||
Result := 'FPosY='+IntToStr(FPosY)+' FText="'+FText+'"';
|
||||
end;
|
||||
|
||||
constructor TSynEditUndoTrimForget.Create(APosY: Integer; AText: String);
|
||||
begin
|
||||
FPosY := APosY;
|
||||
|
Loading…
Reference in New Issue
Block a user