mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 05:09:27 +02:00
Delete example "SpeedTest". Image penguin.xpm is missing and it makes no sense.
git-svn-id: trunk@56249 -
This commit is contained in:
parent
ad57283d64
commit
471d2ea156
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -6162,8 +6162,6 @@ examples/shapedcontrols/project1.lpi svneol=native#text/plain
|
||||
examples/shapedcontrols/project1.lpr -text svneol=native#test/pascal
|
||||
examples/shapedcontrols/unit1.lfm svneol=native#text/plain
|
||||
examples/shapedcontrols/unit1.pas -text svneol=native#test/pascal
|
||||
examples/speedtest.lpi svneol=native#text/plain
|
||||
examples/speedtest.pp svneol=native#text/pascal
|
||||
examples/sprites/playground.lfm svneol=native#text/plain
|
||||
examples/sprites/playground.pas svneol=native#text/pascal
|
||||
examples/sprites/spriteexample.lpi svneol=native#text/plain
|
||||
|
@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<SaveOnlyProjectUnits Value="True"/>
|
||||
<LRSInOutputDirectory Value="False"/>
|
||||
</Flags>
|
||||
<MainUnit Value="0"/>
|
||||
</General>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="speedtest.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="SpeedTest"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<CursorPos X="34" Y="23"/>
|
||||
<UsageCount Value="20"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit0>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
@ -1,176 +0,0 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* This source is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1335, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
program SpeedTest;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
Interfaces, Forms, SysUtils, Buttons, Classes, StdCtrls, LCLType,
|
||||
LCLIntf, Graphics, LazLogger;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
cmdOK: TButton;
|
||||
SpeedButton1 : TSpeedButton;
|
||||
SpeedButton2 : TSpeedButton;
|
||||
SpeedButton3 : TSpeedButton;
|
||||
SpeedButton4 : TSpeedButton;
|
||||
private
|
||||
FPicture: TPixmap;
|
||||
procedure ButtonClick(Sender: TObject);
|
||||
protected
|
||||
procedure Paint; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
constructor TForm1.Create(AOwner: TComponent);
|
||||
var
|
||||
S: TFileStream;
|
||||
begin
|
||||
inherited CreateNew(AOwner, 1);
|
||||
Width := 300;
|
||||
Height := 150;
|
||||
|
||||
cmdOK := TButton.Create(Self);
|
||||
with cmdOK do
|
||||
begin
|
||||
top := 0;
|
||||
left := 0;
|
||||
Height := 20;
|
||||
parent := Self;
|
||||
visible := true;
|
||||
onClick := @ButtonClick;
|
||||
end;
|
||||
|
||||
SpeedButton1 := TSpeedButton.Create(Self);
|
||||
with Speedbutton1 do
|
||||
begin
|
||||
Parent := self;
|
||||
Enabled := True;
|
||||
Top := 25;
|
||||
Visible := True;
|
||||
end;
|
||||
|
||||
SpeedButton2 := TSpeedButton.Create(Self);
|
||||
with Speedbutton2 do
|
||||
begin
|
||||
Parent := self;
|
||||
Enabled := True;
|
||||
Top := 25;
|
||||
Left := 25;
|
||||
Visible := True;
|
||||
end;
|
||||
|
||||
SpeedButton3 := TSpeedButton.Create(Self);
|
||||
with Speedbutton3 do
|
||||
begin
|
||||
Parent := self;
|
||||
Enabled := True;
|
||||
Top := 50;
|
||||
Visible := True;
|
||||
Flat := True;
|
||||
end;
|
||||
|
||||
SpeedButton4 := TSpeedButton.Create(Self);
|
||||
with Speedbutton4 do
|
||||
begin
|
||||
Parent := self;
|
||||
Enabled := True;
|
||||
Top := 50;
|
||||
Left := 25;
|
||||
Flat := True;
|
||||
Visible := True;
|
||||
end;
|
||||
|
||||
S := TFileStream.Create('../images/penguin.xpm', fmOpenRead);
|
||||
try
|
||||
FPicture := TPixmap.Create;
|
||||
FPicture.TransparentColor := clBtnFace;
|
||||
FPicture.LoadFromStream(S);
|
||||
finally
|
||||
S.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TForm1.Destroy;
|
||||
begin
|
||||
FPicture.Free;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TForm1.Paint;
|
||||
var
|
||||
r: TRect;
|
||||
begin
|
||||
inherited Paint;
|
||||
Canvas.Copyrect(Bounds(100,0,139,160), FPicture.Canvas, Rect(0,0,138,159));
|
||||
|
||||
with SpeedButton4 do
|
||||
begin
|
||||
Self.Canvas.MoveTo(Left + Width + 2, Top);
|
||||
Self.Canvas.LineTo(Left + Width + 12, Top);
|
||||
|
||||
Self.Canvas.MoveTo(Left + Width + 2, Top + Height);
|
||||
Self.Canvas.LineTo(Left + Width + 12, Top + Height);
|
||||
|
||||
Self.Canvas.MoveTo(Left, Top + Height + 2);
|
||||
Self.Canvas.LineTo(Left, Top + Height + 12);
|
||||
|
||||
Self.Canvas.MoveTo(Left + Width, Top + Height + 2);
|
||||
Self.Canvas.LineTo(Left + Width, Top + Height + 12);
|
||||
|
||||
R := Bounds(Left + Width + 13, Top, Width, Height);
|
||||
end;
|
||||
|
||||
DrawEdge(Canvas.Handle, R, BDR_RAISEDOUTER, BF_RECT);
|
||||
|
||||
with R do
|
||||
begin
|
||||
Canvas.MoveTo(Left, Bottom + 2);
|
||||
Canvas.LineTo(Left, Bottom + 12);
|
||||
|
||||
Canvas.MoveTo(Right, Bottom + 2);
|
||||
Canvas.LineTo(Right, Bottom + 12);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.ButtonClick(Sender: TObject);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
|
||||
begin
|
||||
debugln('------ INIT ------- ');
|
||||
Application.Initialize; { calls InitProcedure which starts up GTK }
|
||||
debugln('------ CREATE ------- ');
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
debugln('------ RUN ------- ');
|
||||
Application.Run;
|
||||
DebugLn('------ DONE ------- ');
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user