Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 140 additions & 0 deletions examples/gui/aboutdialog/aboutdialog.lpi
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<General>
<Flags>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
<MainUnitHasScaledStatement Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="aboutdialog"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes>
<Item Name="Debug" Default="True"/>
<Item Name="Release">
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="aboutdialog"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<Libraries Value="/usr/lib/gcc/x86_64-redhat-linux/9"/>
<OtherUnitFiles Value="/home/tagraa/Projects/Pascal/fpGUI/examples/gui/aboutdialog"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<TargetProcessor Value="ATHLON64"/>
<TargetCPU Value="x86_64"/>
<TargetOS Value="linux"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
</RunParams>
<RequiredPackages>
<Item>
<PackageName Value="fpgui_toolkit"/>
</Item>
</RequiredPackages>
<Units>
<Unit>
<Filename Value="aboutdialog.lpr"/>
<IsPartOfProject Value="True"/>
</Unit>
<Unit>
<Filename Value="fabout.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fAbout"/>
</Unit>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="aboutdialog"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<Libraries Value="/usr/lib/gcc/x86_64-redhat-linux/9"/>
<OtherUnitFiles Value="/home/tagraa/Projects/Pascal/fpGUI/examples/gui/aboutdialog"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
<StackChecks Value="True"/>
</Checks>
<VerifyObjMethodCallValidity Value="True"/>
<TargetProcessor Value="ATHLON64"/>
<TargetCPU Value="x86_64"/>
<TargetOS Value="linux"/>
</CodeGeneration>
<Linking>
<Debugging>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
<Other>
<Verbosity>
<ShoLineNum Value="True"/>
<ShowHintsForUnusedUnitsInMainSrc Value="True"/>
<ShowHintsForSenderNotUsed Value="True"/>
</Verbosity>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions>
<Item>
<Name Value="EAbort"/>
</Item>
<Item>
<Name Value="ECodetoolError"/>
</Item>
<Item>
<Name Value="EFOpenError"/>
</Item>
</Exceptions>
</Debugging>
</CONFIG>
114 changes: 114 additions & 0 deletions examples/gui/aboutdialog/aboutdialog.lpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
Demo app to show TfpgAbout
Written by Jonathan A. Foster <jon@jfpossibilities.com>
Started April 10th, 2019

This unit is part of the fpGUI Toolkit project.

Copyright (c) 2006 - 2019 by Graeme Geldenhuys.

See the file COPYING.modifiedLGPL, included in this distribution,
for details about redistributing fpGUI.

This program 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.

}
program aboutdialog;

{$mode objfpc}{$H+}

uses
SysUtils,
Classes,
fpg_constants,
fpg_base,
fpg_main,
fpg_form,
fpg_button,
fAbout;


{@VFD_NEWFORM_DECL}

{@VFD_NEWFORM_IMPL}



{*********************************************************************
* Main Form *
*********************************************************************}
type
TfrmMain = class(TfpgForm)
public
{@VFD_HEAD_BEGIN: frmMain}
click_me: TfpgButton;
{@VFD_HEAD_END: frmMain}

procedure AfterCreate; override;
procedure clicked(Sender: TObject);
end;



procedure TfrmMain.AfterCreate;
begin
inherited AfterCreate;
{@VFD_BODY_BEGIN: frmMain}
Name := 'frmMain';
SetPosition(0, 0, 100, 100);
WindowPosition := wpAuto;

click_me := TfpgButton.Create(self);
with click_me do
begin
Name := 'click_me';
SetPosition(0, 0, 100, 100);
anchors := [anLeft, anTop, anRight, anBottom];
Text := 'Click Me!';
OnClick := @clicked;
end;
{@VFD_BODY_END: frmMain}
end;



procedure TfrmMain.clicked(Sender: TObject);
begin
if AboutDlg = mrOk then
Close;
end;



{*********************************************************************
* Launch control *
*********************************************************************}
var
main: TfrmMain;
app: TfpgApplication;
begin

app := fpgApplication;
app.Initialize;
app.AppTitle := 'A Demo About Box';
app.AppVersion := FPGUI_VERSION;
app.AppAuthor := 'jon@jfpossibilties.com';
app.AppCopyright := '(c) 2019 the fpGUI project GPL2';
app.AppSiteName := 'fpgui.SF.net';
app.AppSiteURL := fpGUIWebsite;
app.AppIcon := 'stdimg.dlg.info';
{ set these for the about box to link to a help topic in your help file
when the license statement is clicked:
app.AppLicTopic := 0;
app.HelpFile := 'myhelp.inf'; }
app.HelpContext := 10;
main := TfrmMain.Create(nil);
try
main.Show;
app.run;
finally
main.Free;
end;
end.
2 changes: 1 addition & 1 deletion examples/gui/helloworld/helloworld.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ THelloWorldForm = class(TfpgForm)
procedure ButtonClick(Sender: TObject);
private
Button: TfpgButton;
protected
public
procedure AfterCreate; override;
end;

Expand Down
Loading