Add deprecated for old names. More fixes.

This commit is contained in:
Martin 2024-09-23 12:37:31 +02:00
parent e80478f432
commit 906384cc9d
8 changed files with 20 additions and 7 deletions

View File

@ -248,6 +248,7 @@ type
vmNeverMoveToVisible,
vmOnlyMoveOffScreenToVisible // Only make visible, if offscreen (with a threshold)
);
TLayoutMoveToVisbleMode = TLayoutMoveToVisibleMode deprecated 'Use "TLayoutMoveToVisibleMode" / Will be removed in 4.99';
TSimpleWindowLayoutList = class
private

View File

@ -507,6 +507,7 @@ type
procedure AddEditHandler(AHandler: TStringListLineEditEvent);
procedure RemoveEditHandler(AHandler: TStringListLineEditEvent);
procedure RemoveHanlders(AOwner: TObject); deprecated 'Use "RemoveHandlers" / Will be removed in 4.99';
procedure RemoveHandlers(AOwner: TObject);
//function GetPhysicalCharWidths(Line: PChar; LineLen, Index: Integer): TPhysicalCharWidths; override;
@ -1784,6 +1785,11 @@ begin
RemoveGenericHandler(senrEditAction, TMethod(AHandler));
end;
procedure TSynEditStringsLinked.RemoveHanlders(AOwner: TObject);
begin
RemoveHandlers(AOwner);
end;
procedure TSynEditStringsLinked.RemoveHandlers(AOwner: TObject);
begin
Manager.RemoveHandlers(AOwner);

View File

@ -804,7 +804,7 @@ begin
CommentStartsAtBOL := GetCommentStartCol = 1 + GetIndentForLine(nil, CurrentLines[ToIdx(GetFirstCommentLine)], False);
// Aply indent before prefix
// Apply indent before prefix
if Matching or (FCommentMode[FoldTyp] = sccPrefixAlways) or (sciApplyIndentForNoMatch in FIndentMode[FoldTyp])
then begin
IndentTypeBackup := IndentType;

View File

@ -2050,7 +2050,7 @@ end;
function TCustomSynEdit.RowToScreenRow(PhysicalRow: integer): integer;
// returns -1 for lines above visible screen (<TopLine)
// 0 for the first line
// 0 to LinesInWindow for visible lines (incl last partial visble line)
// 0 to LinesInWindow for visible lines (incl last partial visible line)
// and returns LinesInWindow+1 for lines below visible screen
begin
Result := ToPos(FTheLinesView.TextToViewIndex(ToIdx(PhysicalRow))) - TopView;

View File

@ -3642,7 +3642,7 @@ begin
if not assigned(hl) then
exit(0);
// AStartIndex is 0-based
// FoldTree is 1-based AND first line remains visble
// FoldTree is 1-based AND first line remains visible
c := hl.FoldNodeInfo[AStartIndex].CountEx([sfaOpen, sfaFold]);
if c = 0 then
exit(-1);
@ -4001,7 +4001,7 @@ begin
top := TopTextIndex;
// AStartIndex is 0-based
// FoldTree is 1-based AND first line remains visble
// FoldTree is 1-based AND first line remains visible
NodeCount := FoldProvider.FoldOpenCount(AStartIndex);
if ColCount = 0 then
ColCount := NodeCount;
@ -4170,7 +4170,7 @@ begin
c := hl.FoldBlockOpeningCount(i) -1;
fldinf := FoldProvider.InfoForFoldAtTextIndex(i, c);
// i is 0-based
// FoldTree is 1-based AND first line remains visble
// FoldTree is 1-based AND first line remains visible
fFoldTree.InsertNewFold(i+2, c, fldinf.Column, fldinf.ColumnLen, fldinf.LineCount, 1,
fldinf.Classification, fldinf.FoldTypeCompatible); // TODO: hide too? currently VisibleLines=1
if IgnoreNested then

View File

@ -241,6 +241,7 @@ type
procedure DetachSynEdit(AEdit: TSynEditBase);
function AttachedSynEditCount: Integer;
property AttachedSynEdits[Index: Integer]: TSynEditBase read GetAttachedSynEdits;
procedure CopyHanlders(OtherLines: TSynEditStringList; AOwner: TObject = nil); deprecated 'Use "CopyHandlers" / Will be removed in 4.99';
procedure CopyHandlers(OtherLines: TSynEditStringList; AOwner: TObject = nil);
procedure SendCachedNotify; // ToDO: review caching versus changes to topline and other values
public
@ -1047,6 +1048,11 @@ begin
Result := FAttachedSynEditList.Count;
end;
procedure TSynEditStringList.CopyHanlders(OtherLines: TSynEditStringList; AOwner: TObject);
begin
CopyHandlers(OtherLines, AOwner);
end;
function TSynEditStringList.GetObject(Index: integer): TObject;
begin
if (Index >= 0) and (Index < Count) then

View File

@ -4521,7 +4521,7 @@ begin
FPageLabel:= TGtkLabel.new(PChar(Params.Caption));
FPageLabel^.set_use_underline(true);
Self.FHasPaint:=true;
// ref it to save it in case TabVisble is set to false
// ref it to save it in case TabVisible is set to false
FPageLabel^.ref;
Result := TGtkHBox.new(GTK_ORIENTATION_HORIZONTAL, 0);
FCentralWidget := TGtkFixed.new;

View File

@ -820,7 +820,7 @@ begin
s3.TabVisible := False;
Application.ProcessMessages;
// TabRect takes an indek into VISBLE-only tabs
// TabRect takes an indek into VISIBLE-only tabs
T2Recta := PageControl.TabRect(2); // the old tab 2, since tab3 is hidden
T2RectaScr.TopLeft := PageControl.ClientToScreen(T2Recta.TopLeft);
T2RectaScr.BottomRight := PageControl.ClientToScreen(T2Recta.BottomRight);