mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:59:06 +02:00
SynEdit: Clean-up, removed some ifdef
git-svn-id: trunk@22673 -
This commit is contained in:
parent
7404b6ed0b
commit
7c61fa681f
@ -136,9 +136,7 @@ type
|
|||||||
FUndoList: TSynEditUndoList;
|
FUndoList: TSynEditUndoList;
|
||||||
FIsUndoing, FIsRedoing: Boolean;
|
FIsUndoing, FIsRedoing: Boolean;
|
||||||
|
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
function GetFlags(Index: Integer): TSynEditStringFlags;
|
function GetFlags(Index: Integer): TSynEditStringFlags;
|
||||||
{$ENDIF}
|
|
||||||
procedure Grow;
|
procedure Grow;
|
||||||
procedure InsertItem(Index: integer; const S: string);
|
procedure InsertItem(Index: integer; const S: string);
|
||||||
function ClassIndexForAttribute(AttrIndex: TClass): Integer;
|
function ClassIndexForAttribute(AttrIndex: TClass): Integer;
|
||||||
@ -187,19 +185,14 @@ type
|
|||||||
procedure Clear; override;
|
procedure Clear; override;
|
||||||
procedure Delete(Index: integer); override;
|
procedure Delete(Index: integer); override;
|
||||||
procedure RegisterAttribute(const Index: TClass; const Size: Word); override;
|
procedure RegisterAttribute(const Index: TClass; const Size: Word); override;
|
||||||
procedure DeleteLines(Index, NumLines: integer); // DJLP 2000-11-01
|
procedure DeleteLines(Index, NumLines: integer); override;
|
||||||
{$IFDEF SYN_LAZARUS}override;{$ENDIF}
|
|
||||||
procedure Insert(Index: integer; const S: string); override;
|
procedure Insert(Index: integer; const S: string); override;
|
||||||
procedure InsertLines(Index, NumLines: integer); // DJLP 2000-11-01
|
procedure InsertLines(Index, NumLines: integer); override;
|
||||||
{$IFDEF SYN_LAZARUS}override;{$ENDIF}
|
procedure InsertStrings(Index: integer; NewStrings: TStrings); override;
|
||||||
procedure InsertStrings(Index: integer; NewStrings: TStrings); // DJLP 2000-11-01
|
|
||||||
{$IFDEF SYN_LAZARUS}override;{$ENDIF}
|
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
procedure MarkModified(AFirst, ALast: Integer);
|
procedure MarkModified(AFirst, ALast: Integer);
|
||||||
procedure MarkSaved;
|
procedure MarkSaved;
|
||||||
procedure SetDebugMarks(AFirst, ALast: Integer);
|
procedure SetDebugMarks(AFirst, ALast: Integer);
|
||||||
procedure ClearDebugMarks;
|
procedure ClearDebugMarks;
|
||||||
{$ENDIF}
|
|
||||||
procedure AddGenericHandler(AReason: TSynEditNotifyReason;
|
procedure AddGenericHandler(AReason: TSynEditNotifyReason;
|
||||||
AHandler: TMethod); override;
|
AHandler: TMethod); override;
|
||||||
procedure RemoveGenericHandler(AReason: TSynEditNotifyReason;
|
procedure RemoveGenericHandler(AReason: TSynEditNotifyReason;
|
||||||
@ -208,10 +201,8 @@ type
|
|||||||
public
|
public
|
||||||
property DosFileFormat: boolean read fDosFileFormat write fDosFileFormat;
|
property DosFileFormat: boolean read fDosFileFormat write fDosFileFormat;
|
||||||
property LengthOfLongestLine: integer read GetLengthOfLongestLine;
|
property LengthOfLongestLine: integer read GetLengthOfLongestLine;
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
property Flags[Index: Integer]: TSynEditStringFlags read GetFlags
|
property Flags[Index: Integer]: TSynEditStringFlags read GetFlags
|
||||||
write SetFlags;
|
write SetFlags;
|
||||||
{$ENDIF}
|
|
||||||
public
|
public
|
||||||
property UndoList: TSynEditUndoList read GetUndoList write fUndoList;
|
property UndoList: TSynEditUndoList read GetUndoList write fUndoList;
|
||||||
property RedoList: TSynEditUndoList read GetRedoList write fRedoList;
|
property RedoList: TSynEditUndoList read GetRedoList write fRedoList;
|
||||||
@ -505,7 +496,7 @@ begin
|
|||||||
FLineRangeNotificationList.CallRangeNotifyEvents(self, 0, -c);
|
FLineRangeNotificationList.CallRangeNotifyEvents(self, 0, -c);
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
fIndexOfLongestLine := -1; //mh 2000-10-19
|
fIndexOfLongestLine := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynEditStringList.Delete(Index: integer);
|
procedure TSynEditStringList.Delete(Index: integer);
|
||||||
@ -516,12 +507,11 @@ begin
|
|||||||
if Index < Count-1 then
|
if Index < Count-1 then
|
||||||
fList.Move(Index + 1, Index, Count-Index-1);
|
fList.Move(Index + 1, Index, Count-Index-1);
|
||||||
SetCount(Count - 1);
|
SetCount(Count - 1);
|
||||||
fIndexOfLongestLine := -1; //mh 2000-10-19
|
fIndexOfLongestLine := -1;
|
||||||
FLineRangeNotificationList.CallRangeNotifyEvents(self, Index, -1);
|
FLineRangeNotificationList.CallRangeNotifyEvents(self, Index, -1);
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{begin} // DJLP 2000-11-01
|
|
||||||
procedure TSynEditStringList.DeleteLines(Index, NumLines: Integer);
|
procedure TSynEditStringList.DeleteLines(Index, NumLines: Integer);
|
||||||
var
|
var
|
||||||
LinesAfter: integer;
|
LinesAfter: integer;
|
||||||
@ -544,9 +534,7 @@ begin
|
|||||||
FLineRangeNotificationList.CallRangeNotifyEvents(self, Index, -NumLines);
|
FLineRangeNotificationList.CallRangeNotifyEvents(self, Index, -NumLines);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{end} // DJLP 2000-11-01
|
|
||||||
|
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
function TSynEditStringList.GetFlags(Index: Integer): TSynEditStringFlags;
|
function TSynEditStringList.GetFlags(Index: Integer): TSynEditStringFlags;
|
||||||
begin
|
begin
|
||||||
if (Index >= 0) and (Index < Count) then
|
if (Index >= 0) and (Index < Count) then
|
||||||
@ -554,7 +542,6 @@ begin
|
|||||||
else
|
else
|
||||||
Result := [];
|
Result := [];
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
function TSynEditStringList.Get(Index: integer): string;
|
function TSynEditStringList.Get(Index: integer): string;
|
||||||
begin
|
begin
|
||||||
@ -701,17 +688,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynEditStringList.Insert(Index: integer; const S: string);
|
procedure TSynEditStringList.Insert(Index: integer; const S: string);
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
var
|
var
|
||||||
OldCnt : integer;
|
OldCnt : integer;
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
if (Index < 0) or (Index > Count) then
|
if (Index < 0) or (Index > Count) then
|
||||||
ListIndexOutOfBounds(Index);
|
ListIndexOutOfBounds(Index);
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
OldCnt:=Count;
|
OldCnt:=Count;
|
||||||
{$ENDIF}
|
|
||||||
InsertItem(Index, S);
|
InsertItem(Index, S);
|
||||||
FLineRangeNotificationList.CallRangeNotifyEvents(self, Index, Count - OldCnt);
|
FLineRangeNotificationList.CallRangeNotifyEvents(self, Index, Count - OldCnt);
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
@ -789,9 +772,7 @@ procedure TSynEditStringList.PutObject(Index: integer; AObject: TObject);
|
|||||||
begin
|
begin
|
||||||
if (Index < 0) or (Index >= Count) then
|
if (Index < 0) or (Index >= Count) then
|
||||||
ListIndexOutOfBounds(Index);
|
ListIndexOutOfBounds(Index);
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
if fList.Objects[Index] = AObject then exit;
|
if fList.Objects[Index] = AObject then exit;
|
||||||
{$ENDIF}
|
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
fList.Objects[Index]:= AObject;
|
fList.Objects[Index]:= AObject;
|
||||||
EndUpdate;
|
EndUpdate;
|
||||||
@ -870,7 +851,6 @@ begin
|
|||||||
SetAttribute(TSynEditFlagsClass, Index, Pointer(PtrUInt(Integer(AValue))));
|
SetAttribute(TSynEditFlagsClass, Index, Pointer(PtrUInt(Integer(AValue))));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF SYN_LAZARUS}
|
|
||||||
procedure TSynEditStringList.MarkModified(AFirst, ALast: Integer);
|
procedure TSynEditStringList.MarkModified(AFirst, ALast: Integer);
|
||||||
var
|
var
|
||||||
Index: Integer;
|
Index: Integer;
|
||||||
@ -932,8 +912,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
procedure TSynEditStringList.SetCapacity(NewCapacity: integer);
|
procedure TSynEditStringList.SetCapacity(NewCapacity: integer);
|
||||||
begin
|
begin
|
||||||
fList.SetCapacity(NewCapacity);
|
fList.SetCapacity(NewCapacity);
|
||||||
|
Loading…
Reference in New Issue
Block a user