From b89096b8873b32b20cc535c34bca79d0b1c2b5a5 Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 8 Dec 2005 11:41:36 +0000 Subject: [PATCH] fixed lcl tests git-svn-id: trunk@8277 - --- lcl/interfacebase.pp | 3 +++ lcl/tests/test1_1simpleform1.lpi | 9 +++++---- lcl/tests/test1_1simpleform1.lpr | 10 +--------- lcl/tests/test1_2button.lpi | 12 +++++------- lcl/tests/test1_2button.lpr | 10 +--------- lcl/tests/test1_3label.lpi | 12 +++++------- lcl/tests/test1_3label.lpr | 10 +--------- lcl/tests/test1_4edit.lpi | 12 +++++------- lcl/tests/test1_4edit.lpr | 10 +--------- lcl/tests/test1_5checkbox.lpi | 9 +++++---- lcl/tests/test1_5checkbox.lpr | 10 +--------- lcl/tests/test2_1buttonnavigation.lpi | 9 +++++---- lcl/tests/test2_1buttonnavigation.lpr | 10 +--------- lcl/tests/test2_2labelattributes.lpi | 9 +++++---- lcl/tests/test2_2labelattributes.lpr | 10 +--------- 15 files changed, 45 insertions(+), 100 deletions(-) diff --git a/lcl/interfacebase.pp b/lcl/interfacebase.pp index 9f15033ec0..bf618ec305 100644 --- a/lcl/interfacebase.pp +++ b/lcl/interfacebase.pp @@ -54,6 +54,7 @@ type public constructor Create; destructor Destroy; override; + procedure AppInit(var ScreenInfo: TScreenInfo); virtual; abstract; procedure AppRun(const ALoop: TApplicationMainLoop); virtual; procedure AppWaitMessage; virtual; abstract; @@ -61,10 +62,12 @@ type procedure AppTerminate; virtual; abstract; procedure AppMinimize; virtual; abstract; procedure AppBringToFront; virtual; abstract; + function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; virtual; abstract; procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); virtual; abstract; procedure DCRedraw(CanvasHandle: HDC); virtual; abstract; procedure SetDesigning(AComponent: TComponent); virtual; abstract; + function InitHintFont(HintFont: TObject): Boolean; virtual; // create and destroy diff --git a/lcl/tests/test1_1simpleform1.lpi b/lcl/tests/test1_1simpleform1.lpi index 36ef9570ab..b92dd49e2d 100644 --- a/lcl/tests/test1_1simpleform1.lpi +++ b/lcl/tests/test1_1simpleform1.lpi @@ -9,19 +9,20 @@ - + <ActiveEditorIndexAtStart Value="0"/> </General> + <LazDoc Paths=""/> <Units Count="1"> <Unit0> - <CursorPos X="15" Y="29"/> + <CursorPos X="31" Y="232"/> <EditorIndex Value="0"/> <Filename Value="test1_1simpleform1.lpr"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> - <TopLine Value="121"/> + <TopLine Value="200"/> <UnitName Value="Test1_1SimpleForm1"/> <UsageCount Value="33"/> </Unit0> @@ -45,7 +46,7 @@ </RequiredPackages> </ProjectOptions> <CompilerOptions> - <Version Value="4"/> + <Version Value="5"/> <CodeGeneration> <Checks> <IOChecks Value="True"/> diff --git a/lcl/tests/test1_1simpleform1.lpr b/lcl/tests/test1_1simpleform1.lpr index dc1d52e476..0f24dfc535 100644 --- a/lcl/tests/test1_1simpleform1.lpr +++ b/lcl/tests/test1_1simpleform1.lpr @@ -62,7 +62,6 @@ type procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Show(Sender: TObject); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); - procedure Form1WindowStateChanged(Sender: TObject); public constructor Create(TheOwner: TComponent); override; end; @@ -222,12 +221,6 @@ begin debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); end; -procedure TForm1.Form1WindowStateChanged(Sender: TObject); -begin - debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender), - ' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState))); -end; - constructor TForm1.Create(TheOwner: TComponent); begin OnActivate:=@Form1Activate; @@ -257,12 +250,11 @@ begin OnShortcut:=@Form1Shortcut; OnShow:=@Form1Show; OnUTF8KeyPress:=@Form1UTF8KeyPress; - OnWindowStateChanged:=@Form1WindowStateChanged; inherited Create(TheOwner); end; var - Form1: TForm1; + Form1: TForm1 = nil; begin Application.Initialize; Application.CreateForm(TForm1,Form1); diff --git a/lcl/tests/test1_2button.lpi b/lcl/tests/test1_2button.lpi index b75d229152..e728cf9526 100644 --- a/lcl/tests/test1_2button.lpi +++ b/lcl/tests/test1_2button.lpi @@ -9,19 +9,20 @@ <SaveOnlyProjectUnits Value="True"/> </Flags> <MainUnit Value="0"/> - <ActiveEditorIndexAtStart Value="0"/> <IconPath Value="./"/> <TargetFileExt Value=""/> <Title Value="test1_2button"/> + <ActiveEditorIndexAtStart Value="0"/> </General> + <LazDoc Paths=""/> <Units Count="1"> <Unit0> - <CursorPos X="13" Y="21"/> + <CursorPos X="28" Y="349"/> <EditorIndex Value="0"/> <Filename Value="test1_2button.lpr"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> - <TopLine Value="1"/> + <TopLine Value="330"/> <UnitName Value="test1_2button"/> <UsageCount Value="41"/> </Unit0> @@ -45,10 +46,7 @@ </RequiredPackages> </ProjectOptions> <CompilerOptions> - <Version Value="4"/> - <SearchPaths> - <LCLWidgetType Value="gtk2"/> - </SearchPaths> + <Version Value="5"/> <CodeGeneration> <Checks> <IOChecks Value="True"/> diff --git a/lcl/tests/test1_2button.lpr b/lcl/tests/test1_2button.lpr index 4e7effeae0..dd1ba8d626 100644 --- a/lcl/tests/test1_2button.lpr +++ b/lcl/tests/test1_2button.lpr @@ -80,7 +80,6 @@ type procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Show(Sender: TObject); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); - procedure Form1WindowStateChanged(Sender: TObject); public constructor Create(TheOwner: TComponent); override; end; @@ -336,12 +335,6 @@ begin debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); end; -procedure TForm1.Form1WindowStateChanged(Sender: TObject); -begin - debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender), - ' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState))); -end; - constructor TForm1.Create(TheOwner: TComponent); begin OnActivate:=@Form1Activate; @@ -371,12 +364,11 @@ begin OnShortcut:=@Form1Shortcut; OnShow:=@Form1Show; OnUTF8KeyPress:=@Form1UTF8KeyPress; - OnWindowStateChanged:=@Form1WindowStateChanged; inherited Create(TheOwner); end; var - Form1: TForm1; + Form1: TForm1 = nil; begin Application.Initialize; Application.CreateForm(TForm1,Form1); diff --git a/lcl/tests/test1_3label.lpi b/lcl/tests/test1_3label.lpi index 2ecc7d5366..cdd6afbd85 100644 --- a/lcl/tests/test1_3label.lpi +++ b/lcl/tests/test1_3label.lpi @@ -9,19 +9,20 @@ <SaveOnlyProjectUnits Value="True"/> </Flags> <MainUnit Value="0"/> - <ActiveEditorIndexAtStart Value="0"/> <IconPath Value="./"/> <TargetFileExt Value=""/> <Title Value="test1_3label"/> + <ActiveEditorIndexAtStart Value="0"/> </General> + <LazDoc Paths=""/> <Units Count="1"> <Unit0> - <CursorPos X="10" Y="48"/> + <CursorPos X="22" Y="361"/> <EditorIndex Value="0"/> <Filename Value="test1_3label.lpr"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> - <TopLine Value="21"/> + <TopLine Value="320"/> <UnitName Value="test1_3label"/> <UsageCount Value="34"/> </Unit0> @@ -45,10 +46,7 @@ </RequiredPackages> </ProjectOptions> <CompilerOptions> - <Version Value="4"/> - <SearchPaths> - <LCLWidgetType Value="gtk2"/> - </SearchPaths> + <Version Value="5"/> <CodeGeneration> <Checks> <IOChecks Value="True"/> diff --git a/lcl/tests/test1_3label.lpr b/lcl/tests/test1_3label.lpr index 1320aa0cb8..fa5d93cca6 100644 --- a/lcl/tests/test1_3label.lpr +++ b/lcl/tests/test1_3label.lpr @@ -78,7 +78,6 @@ type procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Show(Sender: TObject); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); - procedure Form1WindowStateChanged(Sender: TObject); public constructor Create(TheOwner: TComponent); override; end; @@ -326,12 +325,6 @@ begin debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); end; -procedure TForm1.Form1WindowStateChanged(Sender: TObject); -begin - debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender), - ' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState))); -end; - constructor TForm1.Create(TheOwner: TComponent); begin OnActivate:=@Form1Activate; @@ -361,12 +354,11 @@ begin OnShortcut:=@Form1Shortcut; OnShow:=@Form1Show; OnUTF8KeyPress:=@Form1UTF8KeyPress; - OnWindowStateChanged:=@Form1WindowStateChanged; inherited Create(TheOwner); end; var - Form1: TForm1; + Form1: TForm1 = nil; begin Application.Initialize; Application.CreateForm(TForm1,Form1); diff --git a/lcl/tests/test1_4edit.lpi b/lcl/tests/test1_4edit.lpi index 40e41cc8b7..5f2a548aaf 100644 --- a/lcl/tests/test1_4edit.lpi +++ b/lcl/tests/test1_4edit.lpi @@ -9,19 +9,20 @@ <SaveOnlyProjectUnits Value="True"/> </Flags> <MainUnit Value="0"/> - <ActiveEditorIndexAtStart Value="2"/> <IconPath Value="./"/> <TargetFileExt Value=""/> <Title Value="test1_4edit"/> + <ActiveEditorIndexAtStart Value="0"/> </General> + <LazDoc Paths=""/> <Units Count="1"> <Unit0> - <CursorPos X="11" Y="119"/> + <CursorPos X="1" Y="378"/> <EditorIndex Value="0"/> <Filename Value="test1_4edit.lpr"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> - <TopLine Value="101"/> + <TopLine Value="337"/> <UnitName Value="test1_4edit"/> <UsageCount Value="39"/> </Unit0> @@ -45,10 +46,7 @@ </RequiredPackages> </ProjectOptions> <CompilerOptions> - <Version Value="4"/> - <SearchPaths> - <LCLWidgetType Value="gtk2"/> - </SearchPaths> + <Version Value="5"/> <CodeGeneration> <Checks> <IOChecks Value="True"/> diff --git a/lcl/tests/test1_4edit.lpr b/lcl/tests/test1_4edit.lpr index e7baab2a5e..6e2ada9c1e 100644 --- a/lcl/tests/test1_4edit.lpr +++ b/lcl/tests/test1_4edit.lpr @@ -81,7 +81,6 @@ type procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Show(Sender: TObject); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); - procedure Form1WindowStateChanged(Sender: TObject); public constructor Create(TheOwner: TComponent); override; end; @@ -343,12 +342,6 @@ begin debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); end; -procedure TForm1.Form1WindowStateChanged(Sender: TObject); -begin - debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender), - ' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState))); -end; - constructor TForm1.Create(TheOwner: TComponent); begin OnActivate:=@Form1Activate; @@ -378,12 +371,11 @@ begin OnShortcut:=@Form1Shortcut; OnShow:=@Form1Show; OnUTF8KeyPress:=@Form1UTF8KeyPress; - OnWindowStateChanged:=@Form1WindowStateChanged; inherited Create(TheOwner); end; var - Form1: TForm1; + Form1: TForm1 = nil; begin Application.Initialize; Application.CreateForm(TForm1,Form1); diff --git a/lcl/tests/test1_5checkbox.lpi b/lcl/tests/test1_5checkbox.lpi index 1e5126a1e3..01d8b75d7e 100644 --- a/lcl/tests/test1_5checkbox.lpi +++ b/lcl/tests/test1_5checkbox.lpi @@ -9,19 +9,20 @@ <SaveOnlyProjectUnits Value="True"/> </Flags> <MainUnit Value="0"/> - <ActiveEditorIndexAtStart Value="0"/> <IconPath Value="./"/> <TargetFileExt Value=""/> <Title Value="test1_5checkbox"/> + <ActiveEditorIndexAtStart Value="0"/> </General> + <LazDoc Paths=""/> <Units Count="1"> <Unit0> - <CursorPos X="31" Y="107"/> + <CursorPos X="1" Y="401"/> <EditorIndex Value="0"/> <Filename Value="test1_5checkbox.lpr"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> - <TopLine Value="85"/> + <TopLine Value="393"/> <UnitName Value="test1_5checkbox"/> <UsageCount Value="48"/> </Unit0> @@ -45,7 +46,7 @@ </RequiredPackages> </ProjectOptions> <CompilerOptions> - <Version Value="4"/> + <Version Value="5"/> <SearchPaths> <LCLWidgetType Value="gtk2"/> </SearchPaths> diff --git a/lcl/tests/test1_5checkbox.lpr b/lcl/tests/test1_5checkbox.lpr index d6198a6acf..8c1f491733 100644 --- a/lcl/tests/test1_5checkbox.lpr +++ b/lcl/tests/test1_5checkbox.lpr @@ -87,7 +87,6 @@ type procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Show(Sender: TObject); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); - procedure Form1WindowStateChanged(Sender: TObject); public constructor Create(TheOwner: TComponent); override; end; @@ -399,12 +398,6 @@ begin debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); end; -procedure TForm1.Form1WindowStateChanged(Sender: TObject); -begin - debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender), - ' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState))); -end; - constructor TForm1.Create(TheOwner: TComponent); begin OnActivate:=@Form1Activate; @@ -434,12 +427,11 @@ begin OnShortcut:=@Form1Shortcut; OnShow:=@Form1Show; OnUTF8KeyPress:=@Form1UTF8KeyPress; - OnWindowStateChanged:=@Form1WindowStateChanged; inherited Create(TheOwner); end; var - Form1: TForm1; + Form1: TForm1 = nil; begin Application.Initialize; Application.CreateForm(TForm1,Form1); diff --git a/lcl/tests/test2_1buttonnavigation.lpi b/lcl/tests/test2_1buttonnavigation.lpi index 3b44918449..a408e56f15 100644 --- a/lcl/tests/test2_1buttonnavigation.lpi +++ b/lcl/tests/test2_1buttonnavigation.lpi @@ -9,19 +9,20 @@ <SaveOnlyProjectUnits Value="True"/> </Flags> <MainUnit Value="0"/> - <ActiveEditorIndexAtStart Value="2"/> <IconPath Value="./"/> <TargetFileExt Value=""/> <Title Value="test2_1buttonnavigation"/> + <ActiveEditorIndexAtStart Value="0"/> </General> + <LazDoc Paths=""/> <Units Count="1"> <Unit0> - <CursorPos X="13" Y="23"/> + <CursorPos X="1" Y="334"/> <EditorIndex Value="0"/> <Filename Value="test2_1buttonnavigation.lpr"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> - <TopLine Value="1"/> + <TopLine Value="323"/> <UnitName Value="test2_1buttonnavigation"/> <UsageCount Value="72"/> </Unit0> @@ -45,7 +46,7 @@ </RequiredPackages> </ProjectOptions> <CompilerOptions> - <Version Value="4"/> + <Version Value="5"/> <SearchPaths> <LCLWidgetType Value="gtk2"/> </SearchPaths> diff --git a/lcl/tests/test2_1buttonnavigation.lpr b/lcl/tests/test2_1buttonnavigation.lpr index 53a0a2e3cf..978942f5c1 100644 --- a/lcl/tests/test2_1buttonnavigation.lpr +++ b/lcl/tests/test2_1buttonnavigation.lpr @@ -75,7 +75,6 @@ type procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Show(Sender: TObject); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); - procedure Form1WindowStateChanged(Sender: TObject); public constructor Create(TheOwner: TComponent); override; end; @@ -332,12 +331,6 @@ begin debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); end; -procedure TForm1.Form1WindowStateChanged(Sender: TObject); -begin - debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender), - ' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState))); -end; - constructor TForm1.Create(TheOwner: TComponent); begin OnActivate:=@Form1Activate; @@ -364,12 +357,11 @@ begin OnShortcut:=@Form1Shortcut; OnShow:=@Form1Show; OnUTF8KeyPress:=@Form1UTF8KeyPress; - OnWindowStateChanged:=@Form1WindowStateChanged; inherited Create(TheOwner); end; var - Form1: TForm1; + Form1: TForm1 = nil; begin Application.Initialize; Application.CreateForm(TForm1,Form1); diff --git a/lcl/tests/test2_2labelattributes.lpi b/lcl/tests/test2_2labelattributes.lpi index ffcea5b454..a784d214a3 100644 --- a/lcl/tests/test2_2labelattributes.lpi +++ b/lcl/tests/test2_2labelattributes.lpi @@ -9,19 +9,20 @@ <SaveOnlyProjectUnits Value="True"/> </Flags> <MainUnit Value="0"/> - <ActiveEditorIndexAtStart Value="4"/> <IconPath Value="./"/> <TargetFileExt Value=""/> <Title Value="test2_2labelattributes"/> + <ActiveEditorIndexAtStart Value="0"/> </General> + <LazDoc Paths=""/> <Units Count="1"> <Unit0> - <CursorPos X="17" Y="205"/> + <CursorPos X="22" Y="405"/> <EditorIndex Value="0"/> <Filename Value="test2_2labelattributes.lpr"/> <IsPartOfProject Value="True"/> <Loaded Value="True"/> - <TopLine Value="174"/> + <TopLine Value="364"/> <UnitName Value="test2_2labelattributes"/> <UsageCount Value="40"/> </Unit0> @@ -45,7 +46,7 @@ </RequiredPackages> </ProjectOptions> <CompilerOptions> - <Version Value="4"/> + <Version Value="5"/> <SearchPaths> <LCLWidgetType Value="gtk2"/> </SearchPaths> diff --git a/lcl/tests/test2_2labelattributes.lpr b/lcl/tests/test2_2labelattributes.lpr index 79f7143614..9dd6a1e3cb 100644 --- a/lcl/tests/test2_2labelattributes.lpr +++ b/lcl/tests/test2_2labelattributes.lpr @@ -82,7 +82,6 @@ type procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Show(Sender: TObject); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); - procedure Form1WindowStateChanged(Sender: TObject); procedure WidthRadioGroupClick(Sender: TObject); public constructor Create(TheOwner: TComponent); override; @@ -361,12 +360,6 @@ begin debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); end; -procedure TForm1.Form1WindowStateChanged(Sender: TObject); -begin - debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender), - ' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState))); -end; - procedure TForm1.WidthRadioGroupClick(Sender: TObject); begin debugln('TForm1.WidthRadioGroupClick ',DbgSName(Sender),' WidthRadioGroup.ItemIndex=',dbgs(WidthRadioGroup.ItemIndex)); @@ -405,12 +398,11 @@ begin OnShortcut:=@Form1Shortcut; OnShow:=@Form1Show; OnUTF8KeyPress:=@Form1UTF8KeyPress; - OnWindowStateChanged:=@Form1WindowStateChanged; inherited Create(TheOwner); end; var - Form1: TForm1; + Form1: TForm1 = nil; begin Application.Initialize; Application.CreateForm(TForm1,Form1);