fixed lcl tests

git-svn-id: trunk@8277 -
This commit is contained in:
mattias 2005-12-08 11:41:36 +00:00
parent dec932879f
commit b89096b887
15 changed files with 45 additions and 100 deletions

View File

@ -54,6 +54,7 @@ type
public public
constructor Create; constructor Create;
destructor Destroy; override; destructor Destroy; override;
procedure AppInit(var ScreenInfo: TScreenInfo); virtual; abstract; procedure AppInit(var ScreenInfo: TScreenInfo); virtual; abstract;
procedure AppRun(const ALoop: TApplicationMainLoop); virtual; procedure AppRun(const ALoop: TApplicationMainLoop); virtual;
procedure AppWaitMessage; virtual; abstract; procedure AppWaitMessage; virtual; abstract;
@ -61,10 +62,12 @@ type
procedure AppTerminate; virtual; abstract; procedure AppTerminate; virtual; abstract;
procedure AppMinimize; virtual; abstract; procedure AppMinimize; virtual; abstract;
procedure AppBringToFront; virtual; abstract; procedure AppBringToFront; virtual; abstract;
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; virtual; abstract; function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; virtual; abstract;
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); virtual; abstract; procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); virtual; abstract;
procedure DCRedraw(CanvasHandle: HDC); virtual; abstract; procedure DCRedraw(CanvasHandle: HDC); virtual; abstract;
procedure SetDesigning(AComponent: TComponent); virtual; abstract; procedure SetDesigning(AComponent: TComponent); virtual; abstract;
function InitHintFont(HintFont: TObject): Boolean; virtual; function InitHintFont(HintFont: TObject): Boolean; virtual;
// create and destroy // create and destroy

View File

@ -9,19 +9,20 @@
<SaveOnlyProjectUnits Value="True"/> <SaveOnlyProjectUnits Value="True"/>
</Flags> </Flags>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="test1_1simpleform1"/> <Title Value="test1_1simpleform1"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<LazDoc Paths=""/>
<Units Count="1"> <Units Count="1">
<Unit0> <Unit0>
<CursorPos X="15" Y="29"/> <CursorPos X="31" Y="232"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<Filename Value="test1_1simpleform1.lpr"/> <Filename Value="test1_1simpleform1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<TopLine Value="121"/> <TopLine Value="200"/>
<UnitName Value="Test1_1SimpleForm1"/> <UnitName Value="Test1_1SimpleForm1"/>
<UsageCount Value="33"/> <UsageCount Value="33"/>
</Unit0> </Unit0>
@ -45,7 +46,7 @@
</RequiredPackages> </RequiredPackages>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="4"/> <Version Value="5"/>
<CodeGeneration> <CodeGeneration>
<Checks> <Checks>
<IOChecks Value="True"/> <IOChecks Value="True"/>

View File

@ -62,7 +62,6 @@ type
procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean);
procedure Form1Show(Sender: TObject); procedure Form1Show(Sender: TObject);
procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
procedure Form1WindowStateChanged(Sender: TObject);
public public
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
end; end;
@ -222,12 +221,6 @@ begin
debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"');
end; end;
procedure TForm1.Form1WindowStateChanged(Sender: TObject);
begin
debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender),
' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState)));
end;
constructor TForm1.Create(TheOwner: TComponent); constructor TForm1.Create(TheOwner: TComponent);
begin begin
OnActivate:=@Form1Activate; OnActivate:=@Form1Activate;
@ -257,12 +250,11 @@ begin
OnShortcut:=@Form1Shortcut; OnShortcut:=@Form1Shortcut;
OnShow:=@Form1Show; OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress; OnUTF8KeyPress:=@Form1UTF8KeyPress;
OnWindowStateChanged:=@Form1WindowStateChanged;
inherited Create(TheOwner); inherited Create(TheOwner);
end; end;
var var
Form1: TForm1; Form1: TForm1 = nil;
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1,Form1); Application.CreateForm(TForm1,Form1);

View File

@ -9,19 +9,20 @@
<SaveOnlyProjectUnits Value="True"/> <SaveOnlyProjectUnits Value="True"/>
</Flags> </Flags>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="test1_2button"/> <Title Value="test1_2button"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<LazDoc Paths=""/>
<Units Count="1"> <Units Count="1">
<Unit0> <Unit0>
<CursorPos X="13" Y="21"/> <CursorPos X="28" Y="349"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<Filename Value="test1_2button.lpr"/> <Filename Value="test1_2button.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<TopLine Value="1"/> <TopLine Value="330"/>
<UnitName Value="test1_2button"/> <UnitName Value="test1_2button"/>
<UsageCount Value="41"/> <UsageCount Value="41"/>
</Unit0> </Unit0>
@ -45,10 +46,7 @@
</RequiredPackages> </RequiredPackages>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="4"/> <Version Value="5"/>
<SearchPaths>
<LCLWidgetType Value="gtk2"/>
</SearchPaths>
<CodeGeneration> <CodeGeneration>
<Checks> <Checks>
<IOChecks Value="True"/> <IOChecks Value="True"/>

View File

@ -80,7 +80,6 @@ type
procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean);
procedure Form1Show(Sender: TObject); procedure Form1Show(Sender: TObject);
procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
procedure Form1WindowStateChanged(Sender: TObject);
public public
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
end; end;
@ -336,12 +335,6 @@ begin
debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"');
end; end;
procedure TForm1.Form1WindowStateChanged(Sender: TObject);
begin
debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender),
' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState)));
end;
constructor TForm1.Create(TheOwner: TComponent); constructor TForm1.Create(TheOwner: TComponent);
begin begin
OnActivate:=@Form1Activate; OnActivate:=@Form1Activate;
@ -371,12 +364,11 @@ begin
OnShortcut:=@Form1Shortcut; OnShortcut:=@Form1Shortcut;
OnShow:=@Form1Show; OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress; OnUTF8KeyPress:=@Form1UTF8KeyPress;
OnWindowStateChanged:=@Form1WindowStateChanged;
inherited Create(TheOwner); inherited Create(TheOwner);
end; end;
var var
Form1: TForm1; Form1: TForm1 = nil;
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1,Form1); Application.CreateForm(TForm1,Form1);

View File

@ -9,19 +9,20 @@
<SaveOnlyProjectUnits Value="True"/> <SaveOnlyProjectUnits Value="True"/>
</Flags> </Flags>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="test1_3label"/> <Title Value="test1_3label"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<LazDoc Paths=""/>
<Units Count="1"> <Units Count="1">
<Unit0> <Unit0>
<CursorPos X="10" Y="48"/> <CursorPos X="22" Y="361"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<Filename Value="test1_3label.lpr"/> <Filename Value="test1_3label.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<TopLine Value="21"/> <TopLine Value="320"/>
<UnitName Value="test1_3label"/> <UnitName Value="test1_3label"/>
<UsageCount Value="34"/> <UsageCount Value="34"/>
</Unit0> </Unit0>
@ -45,10 +46,7 @@
</RequiredPackages> </RequiredPackages>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="4"/> <Version Value="5"/>
<SearchPaths>
<LCLWidgetType Value="gtk2"/>
</SearchPaths>
<CodeGeneration> <CodeGeneration>
<Checks> <Checks>
<IOChecks Value="True"/> <IOChecks Value="True"/>

View File

@ -78,7 +78,6 @@ type
procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean);
procedure Form1Show(Sender: TObject); procedure Form1Show(Sender: TObject);
procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
procedure Form1WindowStateChanged(Sender: TObject);
public public
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
end; end;
@ -326,12 +325,6 @@ begin
debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"');
end; end;
procedure TForm1.Form1WindowStateChanged(Sender: TObject);
begin
debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender),
' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState)));
end;
constructor TForm1.Create(TheOwner: TComponent); constructor TForm1.Create(TheOwner: TComponent);
begin begin
OnActivate:=@Form1Activate; OnActivate:=@Form1Activate;
@ -361,12 +354,11 @@ begin
OnShortcut:=@Form1Shortcut; OnShortcut:=@Form1Shortcut;
OnShow:=@Form1Show; OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress; OnUTF8KeyPress:=@Form1UTF8KeyPress;
OnWindowStateChanged:=@Form1WindowStateChanged;
inherited Create(TheOwner); inherited Create(TheOwner);
end; end;
var var
Form1: TForm1; Form1: TForm1 = nil;
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1,Form1); Application.CreateForm(TForm1,Form1);

View File

@ -9,19 +9,20 @@
<SaveOnlyProjectUnits Value="True"/> <SaveOnlyProjectUnits Value="True"/>
</Flags> </Flags>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="2"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="test1_4edit"/> <Title Value="test1_4edit"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<LazDoc Paths=""/>
<Units Count="1"> <Units Count="1">
<Unit0> <Unit0>
<CursorPos X="11" Y="119"/> <CursorPos X="1" Y="378"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<Filename Value="test1_4edit.lpr"/> <Filename Value="test1_4edit.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<TopLine Value="101"/> <TopLine Value="337"/>
<UnitName Value="test1_4edit"/> <UnitName Value="test1_4edit"/>
<UsageCount Value="39"/> <UsageCount Value="39"/>
</Unit0> </Unit0>
@ -45,10 +46,7 @@
</RequiredPackages> </RequiredPackages>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="4"/> <Version Value="5"/>
<SearchPaths>
<LCLWidgetType Value="gtk2"/>
</SearchPaths>
<CodeGeneration> <CodeGeneration>
<Checks> <Checks>
<IOChecks Value="True"/> <IOChecks Value="True"/>

View File

@ -81,7 +81,6 @@ type
procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean);
procedure Form1Show(Sender: TObject); procedure Form1Show(Sender: TObject);
procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
procedure Form1WindowStateChanged(Sender: TObject);
public public
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
end; end;
@ -343,12 +342,6 @@ begin
debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"');
end; end;
procedure TForm1.Form1WindowStateChanged(Sender: TObject);
begin
debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender),
' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState)));
end;
constructor TForm1.Create(TheOwner: TComponent); constructor TForm1.Create(TheOwner: TComponent);
begin begin
OnActivate:=@Form1Activate; OnActivate:=@Form1Activate;
@ -378,12 +371,11 @@ begin
OnShortcut:=@Form1Shortcut; OnShortcut:=@Form1Shortcut;
OnShow:=@Form1Show; OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress; OnUTF8KeyPress:=@Form1UTF8KeyPress;
OnWindowStateChanged:=@Form1WindowStateChanged;
inherited Create(TheOwner); inherited Create(TheOwner);
end; end;
var var
Form1: TForm1; Form1: TForm1 = nil;
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1,Form1); Application.CreateForm(TForm1,Form1);

View File

@ -9,19 +9,20 @@
<SaveOnlyProjectUnits Value="True"/> <SaveOnlyProjectUnits Value="True"/>
</Flags> </Flags>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="test1_5checkbox"/> <Title Value="test1_5checkbox"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<LazDoc Paths=""/>
<Units Count="1"> <Units Count="1">
<Unit0> <Unit0>
<CursorPos X="31" Y="107"/> <CursorPos X="1" Y="401"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<Filename Value="test1_5checkbox.lpr"/> <Filename Value="test1_5checkbox.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<TopLine Value="85"/> <TopLine Value="393"/>
<UnitName Value="test1_5checkbox"/> <UnitName Value="test1_5checkbox"/>
<UsageCount Value="48"/> <UsageCount Value="48"/>
</Unit0> </Unit0>
@ -45,7 +46,7 @@
</RequiredPackages> </RequiredPackages>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="4"/> <Version Value="5"/>
<SearchPaths> <SearchPaths>
<LCLWidgetType Value="gtk2"/> <LCLWidgetType Value="gtk2"/>
</SearchPaths> </SearchPaths>

View File

@ -87,7 +87,6 @@ type
procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean);
procedure Form1Show(Sender: TObject); procedure Form1Show(Sender: TObject);
procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
procedure Form1WindowStateChanged(Sender: TObject);
public public
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
end; end;
@ -399,12 +398,6 @@ begin
debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"');
end; end;
procedure TForm1.Form1WindowStateChanged(Sender: TObject);
begin
debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender),
' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState)));
end;
constructor TForm1.Create(TheOwner: TComponent); constructor TForm1.Create(TheOwner: TComponent);
begin begin
OnActivate:=@Form1Activate; OnActivate:=@Form1Activate;
@ -434,12 +427,11 @@ begin
OnShortcut:=@Form1Shortcut; OnShortcut:=@Form1Shortcut;
OnShow:=@Form1Show; OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress; OnUTF8KeyPress:=@Form1UTF8KeyPress;
OnWindowStateChanged:=@Form1WindowStateChanged;
inherited Create(TheOwner); inherited Create(TheOwner);
end; end;
var var
Form1: TForm1; Form1: TForm1 = nil;
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1,Form1); Application.CreateForm(TForm1,Form1);

View File

@ -9,19 +9,20 @@
<SaveOnlyProjectUnits Value="True"/> <SaveOnlyProjectUnits Value="True"/>
</Flags> </Flags>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="2"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="test2_1buttonnavigation"/> <Title Value="test2_1buttonnavigation"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<LazDoc Paths=""/>
<Units Count="1"> <Units Count="1">
<Unit0> <Unit0>
<CursorPos X="13" Y="23"/> <CursorPos X="1" Y="334"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<Filename Value="test2_1buttonnavigation.lpr"/> <Filename Value="test2_1buttonnavigation.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<TopLine Value="1"/> <TopLine Value="323"/>
<UnitName Value="test2_1buttonnavigation"/> <UnitName Value="test2_1buttonnavigation"/>
<UsageCount Value="72"/> <UsageCount Value="72"/>
</Unit0> </Unit0>
@ -45,7 +46,7 @@
</RequiredPackages> </RequiredPackages>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="4"/> <Version Value="5"/>
<SearchPaths> <SearchPaths>
<LCLWidgetType Value="gtk2"/> <LCLWidgetType Value="gtk2"/>
</SearchPaths> </SearchPaths>

View File

@ -75,7 +75,6 @@ type
procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean);
procedure Form1Show(Sender: TObject); procedure Form1Show(Sender: TObject);
procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
procedure Form1WindowStateChanged(Sender: TObject);
public public
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
end; end;
@ -332,12 +331,6 @@ begin
debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"');
end; end;
procedure TForm1.Form1WindowStateChanged(Sender: TObject);
begin
debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender),
' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState)));
end;
constructor TForm1.Create(TheOwner: TComponent); constructor TForm1.Create(TheOwner: TComponent);
begin begin
OnActivate:=@Form1Activate; OnActivate:=@Form1Activate;
@ -364,12 +357,11 @@ begin
OnShortcut:=@Form1Shortcut; OnShortcut:=@Form1Shortcut;
OnShow:=@Form1Show; OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress; OnUTF8KeyPress:=@Form1UTF8KeyPress;
OnWindowStateChanged:=@Form1WindowStateChanged;
inherited Create(TheOwner); inherited Create(TheOwner);
end; end;
var var
Form1: TForm1; Form1: TForm1 = nil;
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1,Form1); Application.CreateForm(TForm1,Form1);

View File

@ -9,19 +9,20 @@
<SaveOnlyProjectUnits Value="True"/> <SaveOnlyProjectUnits Value="True"/>
</Flags> </Flags>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="4"/>
<IconPath Value="./"/> <IconPath Value="./"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="test2_2labelattributes"/> <Title Value="test2_2labelattributes"/>
<ActiveEditorIndexAtStart Value="0"/>
</General> </General>
<LazDoc Paths=""/>
<Units Count="1"> <Units Count="1">
<Unit0> <Unit0>
<CursorPos X="17" Y="205"/> <CursorPos X="22" Y="405"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<Filename Value="test2_2labelattributes.lpr"/> <Filename Value="test2_2labelattributes.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<Loaded Value="True"/> <Loaded Value="True"/>
<TopLine Value="174"/> <TopLine Value="364"/>
<UnitName Value="test2_2labelattributes"/> <UnitName Value="test2_2labelattributes"/>
<UsageCount Value="40"/> <UsageCount Value="40"/>
</Unit0> </Unit0>
@ -45,7 +46,7 @@
</RequiredPackages> </RequiredPackages>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="4"/> <Version Value="5"/>
<SearchPaths> <SearchPaths>
<LCLWidgetType Value="gtk2"/> <LCLWidgetType Value="gtk2"/>
</SearchPaths> </SearchPaths>

View File

@ -82,7 +82,6 @@ type
procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean); procedure Form1Shortcut(var Msg: TLMKey; var Handled: Boolean);
procedure Form1Show(Sender: TObject); procedure Form1Show(Sender: TObject);
procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char); procedure Form1UTF8KeyPress(Sender: TObject; var UTF8Key: TUTF8Char);
procedure Form1WindowStateChanged(Sender: TObject);
procedure WidthRadioGroupClick(Sender: TObject); procedure WidthRadioGroupClick(Sender: TObject);
public public
constructor Create(TheOwner: TComponent); override; constructor Create(TheOwner: TComponent); override;
@ -361,12 +360,6 @@ begin
debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"'); debugln('TForm1.Form1UTF8KeyPress ',DbgSName(Sender),' UTF8Key="',DbgStr(UTF8Key),'"');
end; end;
procedure TForm1.Form1WindowStateChanged(Sender: TObject);
begin
debugln('TForm1.Form1WindowStateChanged ',DbgSName(Sender),
' State=',GetEnumName(TypeInfo(TWindowState),ord(WindowState)));
end;
procedure TForm1.WidthRadioGroupClick(Sender: TObject); procedure TForm1.WidthRadioGroupClick(Sender: TObject);
begin begin
debugln('TForm1.WidthRadioGroupClick ',DbgSName(Sender),' WidthRadioGroup.ItemIndex=',dbgs(WidthRadioGroup.ItemIndex)); debugln('TForm1.WidthRadioGroupClick ',DbgSName(Sender),' WidthRadioGroup.ItemIndex=',dbgs(WidthRadioGroup.ItemIndex));
@ -405,12 +398,11 @@ begin
OnShortcut:=@Form1Shortcut; OnShortcut:=@Form1Shortcut;
OnShow:=@Form1Show; OnShow:=@Form1Show;
OnUTF8KeyPress:=@Form1UTF8KeyPress; OnUTF8KeyPress:=@Form1UTF8KeyPress;
OnWindowStateChanged:=@Form1WindowStateChanged;
inherited Create(TheOwner); inherited Create(TheOwner);
end; end;
var var
Form1: TForm1; Form1: TForm1 = nil;
begin begin
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1,Form1); Application.CreateForm(TForm1,Form1);