jvcllaz: Fix compilation of thumbnail and simscope demos with Laz 1.6.4

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6324 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-04-20 11:17:15 +00:00
parent b6e1a4c495
commit a78e0acf2f
6 changed files with 43 additions and 9 deletions

View File

@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<Version Value="10"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="SimpleTLTest1"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
@ -21,10 +20,9 @@
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="3">
<Item1>

View File

@ -3,14 +3,16 @@
{$mode objfpc}{$H+}
uses
Forms, datetimectrls, Interfaces,
Forms, datetimectrls, Interfaces, LCLVersion,
frmMemoEdit in 'frmMemoEdit.pas' {MemoEditFrm},
TMTimeLineMainFormU in 'TMTimeLineMainFormU.pas' {TMTimeLineMainForm};
{$R *.res}
begin
{$IF LCL_FULLVERSION >= 1080000}
Application.Scaled := True;
{$ENDIF}
Application.Initialize;
Application.CreateForm(TTMTimeLineMainForm, TMTimeLineMainForm);
Application.Run;

View File

@ -69,6 +69,11 @@ const
BOM_LSB_FIRST = WideChar($FEFF);
BOM_MSB_FIRST = WideChar($FFFE);
{$IF FPC_FullVersion < 30000}
type
TSysCharSet = set of AnsiChar;
{$ENDIF}
(******************** NOT CONVERTED
{$IFDEF UNIX}
type
@ -199,7 +204,13 @@ function CurrencyToStr(const Cur: Currency): string;
function HasChar(const Ch: Char; const S: string): Boolean;
function HasCharW(const Ch: WideChar; const S: WideString): Boolean; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE}
function HasAnyChar(const Chars: string; const S: string): Boolean;
********************)
{$IF FPC_FullVersion < 30000}
function CharInSet(const Ch: Char; const SetOfChar: TSysCharSet): Boolean; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE}
{$ENDIF}
(*********************
function CharInSetW(const Ch: WideChar; const SetOfChar: TSysCharSet): Boolean; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE}
function CountOfChar(const Ch: Char; const S: string): Integer;
function DefStr(const S: string; Default: string): string; {$IFDEF SUPPORTS_INLINE} inline; {$ENDIF SUPPORTS_INLINE}
@ -2738,12 +2749,16 @@ function FileNewExt(const FileName, NewExt: TFileName): TFileName;
begin
Result := Copy(FileName, 1, Length(FileName) - Length(ExtractFileExt(FileName))) + NewExt;
end;
*****************************)
{$IF FPC_FULLVERSION < 30000}
function CharInSet(const Ch: Char; const SetOfChar: TSysCharSet): Boolean;
begin
Result := Ch in SetOfChar;
end;
{$ENDIF}
(*****************************
function CharInSetW(const Ch: WideChar; const SetOfChar: TSysCharSet): Boolean;
begin
if Word(Ch) > 255 then

View File

@ -38,7 +38,7 @@ uses
Windows, // before Types!
{$ENDIF}
Classes, Graphics, Controls, ImgList,
LCLType, LCLProc, LMessages, Types,
LCLType, LCLProc, LCLVersion, LMessages, Types,
JvTypes;
(******************** NOT CONVERTED
@ -852,6 +852,10 @@ function ReplaceComponentReference(This, NewReference: TComponent; var VarRefere
function ReplaceImageListReference(This: TComponent; NewReference: TCustomImageList;
var VarReference: TCustomImageList; ChangeLink: TChangeLink): Boolean;
{$IF LCL_FullVersion < 3000000}
function Scale96ToForm(ASize: Integer): Integer;
{$ENDIF}
implementation
uses
@ -7842,6 +7846,14 @@ begin
end;
end;
{$IF LCL_FullVersion < 3000000}
function Scale96ToForm(ASize: Integer): Integer;
begin
Result := MulDiv(ASize, ScreenInfo.PixelsPerInchX, 96);
end;
{$ENDIF}
(************
initialization

View File

@ -31,7 +31,7 @@ unit JvThumbViews;
interface
uses
LCLType, LMessages, Types,
LCLIntf, LCLType, LMessages, Types,
Classes, Controls, Forms, ExtCtrls,
SysUtils, Graphics,
JvThumbnails, JvBaseThumbnail, JvExControls;

View File

@ -166,6 +166,7 @@ type
procedure DrawTimerTimer(Sender: TObject);
function GetLinePixelPosition(Line: TJvScopeLine; Position: Integer): Integer;
procedure Loaded; override;
procedure Resize; override;
public
procedure Paint; override;
constructor Create(AOwner: TComponent); override;
@ -497,6 +498,12 @@ begin
FAllowed := True;
end;
procedure TJvSimScope.Resize;
begin
inherited;
SetBounds(Left, Top, Width, Height);
end;
procedure TJvSimScope.Clear;
var
A: Double;