android test: Adds a non-android project file for comparison

git-svn-id: trunk@33838 -
This commit is contained in:
sekelsenmat 2011-11-28 16:53:51 +00:00
parent ac80bdd2a9
commit 9063d804bf
5 changed files with 124 additions and 2 deletions

2
.gitattributes vendored
View File

@ -3361,6 +3361,8 @@ examples/androidlcl/androidlcltest.lpi svneol=native#text/plain
examples/androidlcl/androidlcltest.lpr svneol=native#text/pascal
examples/androidlcl/mainform.lfm svneol=native#text/plain
examples/androidlcl/mainform.pas svneol=native#text/pascal
examples/androidlcl/nonandroidtest.lpi svneol=native#text/plain
examples/androidlcl/nonandroidtest.lpr svneol=native#text/pascal
examples/autosize/childsizinglayout/childsizinglayout.lpi svneol=native#text/plain
examples/autosize/childsizinglayout/childsizinglayout.lpr svneol=native#text/plain
examples/autosize/childsizinglayout/mainunit.lfm svneol=native#text/plain

View File

@ -6,6 +6,7 @@ object Form1: TForm1
Caption = 'Form1'
OnClick = FormClick
OnCreate = FormCreate
OnMouseMove = FormMouseMove
OnPaint = FormPaint
LCLVersion = '0.9.31'
end

View File

@ -27,6 +27,7 @@ type
TForm1 = class(TForm)
procedure FormClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure FormPaint(Sender: TObject);
private
{ private declarations }
@ -72,7 +73,7 @@ end;
procedure TForm1.FormClick(Sender: TObject);
begin
DebugLn('Form click #%d', [ClickCounter]);
DebugLn(Format('Form click #%d', [ClickCounter]));
Inc(ClickCounter);
// Invalidate;
end;
@ -87,9 +88,17 @@ begin
SubControl.Parent := Self;
end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
DebugLn(Format('MouseMove x=%d y=%d', [x, y]));
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
Canvas.Brush.Color := RGBToColor(255-ClickCounter, 0, 0);
// Canvas.Brush.Color := clWhite;
// Canvas.Rectangle(0, 0, Width, Height);
Canvas.Brush.Color := clRed;//RGBToColor(255-ClickCounter, 0, 0);
Canvas.Rectangle(10, 10, 100, 100);
Canvas.Brush.Color := clGreen;
Canvas.Rectangle(100, 100, 200, 200);

View File

@ -0,0 +1,91 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="customdrawn"/>
</MacroValues>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="LCL"/>
</Item1>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="nonandroidtest.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="nonandroidtest"/>
</Unit0>
<Unit1>
<Filename Value="mainform.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="mainform"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="nonandroidtest"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,19 @@
program nonandroidtest;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, mainform;
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.