mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 10:47:58 +02:00
Tests: added BiDiMode and FlipChildren test by wp, bug #25408
git-svn-id: trunk@43577 -
This commit is contained in:
parent
3ffbdeb81a
commit
0b5223f09e
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -7139,6 +7139,10 @@ test/lcltests/testpen.pas svneol=native#text/plain
|
||||
test/lcltests/testpreferredsize.pas svneol=native#text/plain
|
||||
test/lcltests/testtextstrings.pas svneol=native#text/plain
|
||||
test/lcltests/testunicode.pas svneol=native#text/plain
|
||||
test/manual/bidimode_flipchildren/project1.lpi svneol=native#text/plain
|
||||
test/manual/bidimode_flipchildren/project1.lpr svneol=native#text/pascal
|
||||
test/manual/bidimode_flipchildren/unit1.lfm svneol=native#text/plain
|
||||
test/manual/bidimode_flipchildren/unit1.pas svneol=native#text/pascal
|
||||
test/manual/lcl/textextent/mainform.lfm svneol=native#text/plain
|
||||
test/manual/lcl/textextent/mainform.pas svneol=native#text/plain
|
||||
test/manual/lcl/textextent/textextent.ico -text
|
||||
|
120
test/manual/bidimode_flipchildren/project1.lpi
Normal file
120
test/manual/bidimode_flipchildren/project1.lpi
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="project1"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Release">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<StripSymbols Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
</Debugging>
|
||||
<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>
|
21
test/manual/bidimode_flipchildren/project1.lpr
Normal file
21
test/manual/bidimode_flipchildren/project1.lpr
Normal file
@ -0,0 +1,21 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
119
test/manual/bidimode_flipchildren/unit1.lfm
Normal file
119
test/manual/bidimode_flipchildren/unit1.lfm
Normal file
@ -0,0 +1,119 @@
|
||||
object Form1: TForm1
|
||||
Left = 338
|
||||
Height = 207
|
||||
Top = 153
|
||||
Width = 373
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 207
|
||||
ClientWidth = 373
|
||||
LCLVersion = '1.3'
|
||||
object Button1: TButton
|
||||
Left = 20
|
||||
Height = 25
|
||||
Top = 16
|
||||
Width = 75
|
||||
Caption = 'BiDiMode'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object RadioGroup1: TRadioGroup
|
||||
Left = 24
|
||||
Height = 105
|
||||
Top = 57
|
||||
Width = 113
|
||||
AutoFill = True
|
||||
Caption = 'RadioGroup1'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 87
|
||||
ClientWidth = 109
|
||||
Items.Strings = (
|
||||
'one'
|
||||
'two'
|
||||
'three'
|
||||
'four'
|
||||
)
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 120
|
||||
Height = 25
|
||||
Top = 16
|
||||
Width = 115
|
||||
Caption = 'Flip children'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 2
|
||||
end
|
||||
object CheckGroup1: TCheckGroup
|
||||
Left = 144
|
||||
Height = 105
|
||||
Top = 57
|
||||
Width = 99
|
||||
AutoFill = True
|
||||
Caption = 'CheckGroup1'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 87
|
||||
ClientWidth = 95
|
||||
Items.Strings = (
|
||||
'one'
|
||||
'two'
|
||||
'three'
|
||||
'four'
|
||||
)
|
||||
TabOrder = 3
|
||||
Data = {
|
||||
0400000002020202
|
||||
}
|
||||
end
|
||||
object CheckListBox1: TCheckListBox
|
||||
Left = 264
|
||||
Height = 78
|
||||
Top = 120
|
||||
Width = 100
|
||||
Items.Strings = (
|
||||
'one'
|
||||
'two'
|
||||
'three'
|
||||
'four'
|
||||
)
|
||||
ItemHeight = 17
|
||||
TabOrder = 4
|
||||
Data = {
|
||||
0400000000000000
|
||||
}
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 29
|
||||
Height = 15
|
||||
Top = 180
|
||||
Width = 39
|
||||
Caption = 'Lazarus'
|
||||
ParentColor = False
|
||||
end
|
||||
object ListBox1: TListBox
|
||||
Left = 264
|
||||
Height = 80
|
||||
Top = 18
|
||||
Width = 100
|
||||
Items.Strings = (
|
||||
'one'
|
||||
'two'
|
||||
'three'
|
||||
'four'
|
||||
)
|
||||
ItemHeight = 15
|
||||
TabOrder = 5
|
||||
end
|
||||
end
|
54
test/manual/bidimode_flipchildren/unit1.pas
Normal file
54
test/manual/bidimode_flipchildren/unit1.pas
Normal file
@ -0,0 +1,54 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ExtCtrls, CheckLst;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
CheckGroup1: TCheckGroup;
|
||||
CheckListBox1: TCheckListBox;
|
||||
Label1: TLabel;
|
||||
ListBox1: TListBox;
|
||||
RadioGroup1: TRadioGroup;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
if Application.BiDiMode = bdLeftToRight then
|
||||
Application.BiDiMode := bdRightToLeft
|
||||
else
|
||||
Application.BiDiMode := bdLeftToRight;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
begin
|
||||
FlipChildren(true);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user