Industrial: Declare TLCLDisplay.Lines as TStrings rather than TStringList.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8781 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-03-29 14:27:26 +00:00
parent 0cd9c62629
commit e67b015e3f

View File

@ -95,7 +95,7 @@ type
FLenText: integer; FLenText: integer;
FDisplayLineCount: integer; FDisplayLineCount: integer;
FDisplayCharCount: integer; FDisplayCharCount: integer;
FLines: TStringList; FLines: TStrings;
FCharSpace: boolean; FCharSpace: boolean;
FColorScheme: TColorScheme; FColorScheme: TColorScheme;
FCountOn: integer; FCountOn: integer;
@ -123,7 +123,7 @@ type
function GetGlobalDotColsCount: longint; function GetGlobalDotColsCount: longint;
procedure SetDisplayLineCount(const Value: integer); procedure SetDisplayLineCount(const Value: integer);
procedure SetDisplayCharCount(const Value: integer); procedure SetDisplayCharCount(const Value: integer);
procedure SetLines(const Value: TStringList); procedure SetLines(const Value: TStrings);
procedure SetDotColorOff(const Value: TColor); procedure SetDotColorOff(const Value: TColor);
procedure SetDotColorOn(const Value: TColor); procedure SetDotColorOn(const Value: TColor);
procedure SetBoardColor(const Value: TColor); procedure SetBoardColor(const Value: TColor);
@ -217,7 +217,7 @@ type
// The text to display // The text to display
// It will be truncated according // It will be truncated according
// to ScreenRowCount and ScreenColCount // to ScreenRowCount and ScreenColCount
property Lines: TStringList read FLines write SetLines; property Lines: TStrings read FLines write SetLines;
// Insert one-dot space between chars // Insert one-dot space between chars
property CharSpace: boolean read FCharSpace write SetCharSpace default False; property CharSpace: boolean read FCharSpace write SetCharSpace default False;
// Pre-defined color schemes // Pre-defined color schemes
@ -623,6 +623,17 @@ begin
end; end;
{ TLCDDisplayStrings }
type
TLCDDisplayStrings = class(TStrings)
private
FOnChange: TNotifyEvent;
public
property OnChange: TNotifyEvent read FOnChange write FOnChange;
end;
{ TLCDDisplay} { TLCDDisplay}
constructor TLCDDisplay.Create(AOwner: TComponent); constructor TLCDDisplay.Create(AOwner: TComponent);
@ -655,7 +666,7 @@ begin
FCountOn := 255; FCountOn := 255;
FLines := TStringList.Create; FLines := TStringList.Create;
FLines.OnChange := @LinesChanged; TStringList(FLines).OnChange := @LinesChanged;
AutoSize := true; AutoSize := true;
end; end;
@ -1312,7 +1323,7 @@ begin
UpdateSize; UpdateSize;
end; end;
procedure TLCDDisplay.SetLines(const Value: TStringList); procedure TLCDDisplay.SetLines(const Value: TStrings);
var var
i: integer; i: integer;
begin begin