summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prototypes/textedit/fpg_textedit.pas26
1 files changed, 13 insertions, 13 deletions
diff --git a/prototypes/textedit/fpg_textedit.pas b/prototypes/textedit/fpg_textedit.pas
index 6ccd2e2c..1d1370a9 100644
--- a/prototypes/textedit/fpg_textedit.pas
+++ b/prototypes/textedit/fpg_textedit.pas
@@ -136,8 +136,8 @@ type
procedure HandleKeyChar(var AText: TfpgChar; var shiftstate: TShiftState; var consumed: boolean); override;
{ -- local widget functions -- }
procedure DrawVisible; virtual;
- procedure DrawLine(const I, Y: Integer); virtual;
- procedure FormatLine(const I, X, Y: Integer);
+ procedure DrawLine(const ALineIndex, Y: Integer); virtual;
+ procedure FormatLine(const ALineIndex, X, Y: Integer);
procedure DrawCaret(const X, Y: Integer); virtual;
{ -- to be published --}
property FontDesc: string read GetFontDesc write SetFontDesc;
@@ -1391,7 +1391,7 @@ begin
end;
end;
-procedure TfpgBaseTextEdit.DrawLine(const I, Y: Integer);
+procedure TfpgBaseTextEdit.DrawLine(const ALineIndex, Y: Integer);
var
X: Integer;
GSz: Integer;
@@ -1408,14 +1408,14 @@ begin
else
GSz := GetClientRect.Left + 1; // gutter size if no gutter panel
- if I < FLines.Count then
+ if ALineIndex < FLines.Count then
begin
X := -(HPos * FChrW) + GSz;
- FormatLine(I, X, Y);
+ FormatLine(ALineIndex, X, Y);
end;
end;
-procedure TfpgBaseTextEdit.FormatLine(const I, X, Y: Integer);
+procedure TfpgBaseTextEdit.FormatLine(const ALineIndex, X, Y: Integer);
var
S, CorrectS, SS: TfpgString;
TI, Si, Ei, T: Integer;
@@ -1424,9 +1424,9 @@ var
begin
if FLines.Count = 0 then
Exit; //==>
- if (I < 0) or (I > FLines.Count-1) then
+ if (ALineIndex < 0) or (ALineIndex > FLines.Count-1) then
Exit; //==>
- S := FLines[I];
+ S := FLines[ALineIndex];
if Pos(#9, S) > 0 then
begin
CorrectS := '';
@@ -1448,14 +1448,14 @@ begin
AllowDraw := True;
{ end-user can hook in here to do syntax highlighting and other custom drawing }
if Assigned(FOnDrawLine) then
- FOnDrawLine(self, S, I, Canvas, R, AllowDraw);
+ FOnDrawLine(self, S, ALineIndex, Canvas, R, AllowDraw);
{ Draw simple text line... }
if AllowDraw then
begin
Canvas.DrawText(R, S);
if FSelected then
begin
- if (I > StartNo) and (I < EndNo) then // whole line is selected
+ if (ALineIndex > StartNo) and (ALineIndex < EndNo) then // whole line is selected
begin
R.SetRect(X, Y, UTF8Length(S) * FChrW, FChrH);
Canvas.XORFillRectangle(fpgColorToRGB(clSelection) xor $FFFFFF, R);
@@ -1464,7 +1464,7 @@ begin
begin
Ei := EndOffs;
Si := StartOffs;
- if (I = StartNo) and (I = EndNo) then // start/end selection on same line
+ if (ALineIndex = StartNo) and (ALineIndex = EndNo) then // start/end selection on same line
begin
SS := UTF8Copy(S, Si + 1, UTF8Length(S) - Si);
if Ei > UTF8Length(S) then
@@ -1476,7 +1476,7 @@ begin
end
else
begin
- if (I = StartNo) and (I < EndNo) then
+ if (ALineIndex = StartNo) and (ALineIndex < EndNo) then
begin
SS := UTF8Copy(S, Si + 1, UTF8Length(S) - Si);
R.SetRect(X+(Si * FChrW), Y, (UTF8Length(SS) * FChrW), FChrH);
@@ -1484,7 +1484,7 @@ begin
end
else
begin
- if (I > StartNo) and (I = EndNo) then
+ if (ALineIndex > StartNo) and (ALineIndex = EndNo) then
begin
if Ei > UTF8Length(S) then
Ei := UTF8Length(S);