Стартовый пул

This commit is contained in:
2024-04-02 08:46:59 +03:00
parent fd57fffd3a
commit 3bb34d000b
5591 changed files with 3291734 additions and 0 deletions

View File

@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="dtanalogdemo"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<BuildModes Count="3">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="dtanalogdemo"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Debug macOS 64">
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
</MacroValues>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="dtanalogdemo"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
<SharedMatrixOptions Count="1">
<Item1 ID="530731885381" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
</SharedMatrixOptions>
</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>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="dtanalogdemo.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="dtanalogdemo"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program dtanalogdemo;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,149 @@
object Form1: TForm1
Left = 424
Height = 351
Top = 168
Width = 1034
Caption = 'Analog Controls Demo'
ClientHeight = 351
ClientWidth = 1034
Color = clWhite
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '1.2.0.3'
object TrackBar1: TTrackBar
Left = 16
Height = 25
Top = 264
Width = 236
Frequency = 5
Max = 100
OnChange = TrackBar1Change
Position = 0
TabOrder = 0
end
object TrackBar2: TTrackBar
Left = 784
Height = 25
Top = 264
Width = 236
Frequency = 5
Max = 100
OnChange = TrackBar2Change
Position = 0
TabOrder = 1
end
object DTAnalogGauge1: TDTAnalogGauge
Left = 777
Height = 240
Top = 15
Width = 243
Position = 0
FaceSettings.FillStyle = fsGradient
FaceSettings.ColorFrame = 2302755
FaceSettings.ColorStart = 4144959
FaceSettings.ColorEnd = 6118749
ScaleSettings.TickColor = 8242399
ScaleSettings.TextColor = 13881484
ScaleSettings.TextSize = 15
ScaleSettings.TextFont = 'Calibri'
ScaleSettings.EnableMainTicks = True
ScaleSettings.EnableSubTicks = True
ScaleSettings.EnableScaleText = True
ScaleSettings.Maximum = 100
ScaleSettings.MainTickCount = 10
ScaleSettings.SubTickCount = 5
ScaleSettings.LengthMainTick = 15
ScaleSettings.LengthSubTick = 8
ScaleSettings.ThicknessMainTick = 3
ScaleSettings.ThicknessSubTick = 1
ScaleSettings.TextRadius = 0
ScaleSettings.Angle = 300
ScaleSettings.EnableRangeIndicator = True
NeedleSettings.NeedleColor = 5329407
NeedleSettings.NeedleLength = 100
NeedleSettings.CapRadius = 10
NeedleSettings.CapColor = 4144959
NeedleSettings.CapEdgeColor = 13425884
end
object DTThemedGauge1: TDTThemedGauge
Left = 14
Height = 238
Top = 16
Width = 233
FaceSettings.FillStyle = fsGradient
FaceSettings.ColorFrame = 2302755
FaceSettings.ColorStart = 4144959
FaceSettings.ColorEnd = 6118749
ScaleSettings.TickColor = 8242399
ScaleSettings.TextColor = 13881484
ScaleSettings.TextSize = 15
ScaleSettings.TextFont = 'Calibri'
ScaleSettings.EnableMainTicks = True
ScaleSettings.EnableSubTicks = True
ScaleSettings.EnableScaleText = True
ScaleSettings.Maximum = 100
ScaleSettings.MainTickCount = 10
ScaleSettings.SubTickCount = 5
ScaleSettings.LengthMainTick = 15
ScaleSettings.LengthSubTick = 8
ScaleSettings.ThicknessMainTick = 3
ScaleSettings.ThicknessSubTick = 1
ScaleSettings.TextRadius = 72
ScaleSettings.Angle = 300
ScaleSettings.EnableRangeIndicator = True
PointerSettings.Color = 5329407
PointerSettings.Length = 100
PointerSettings.Thickness = 3
PointerCapSettings.EdgeColor = 13425884
PointerCapSettings.FillColor = 4144959
PointerCapSettings.Radius = 10
PointerCapSettings.EdgeThickness = 1
Position = 0
end
object DTThemedClock1: TDTThemedClock
Left = 263
Height = 238
Top = 14
Width = 249
SecondsPointerSettings.Color = 5329407
SecondsPointerSettings.Length = 80
SecondsPointerSettings.Thickness = 3
MinutesPointerSettings.Color = 11388871
MinutesPointerSettings.Length = 80
MinutesPointerSettings.Thickness = 3
HoursPointerSettings.Color = 11388871
HoursPointerSettings.Length = 60
HoursPointerSettings.Thickness = 5
PointerCapSettings.EdgeColor = 13425884
PointerCapSettings.FillColor = 4144959
PointerCapSettings.Radius = 10
PointerCapSettings.EdgeThickness = 1
ScaleSettings.TickColor = 8242399
ScaleSettings.TextColor = 13881484
ScaleSettings.TextSize = 15
ScaleSettings.TextFont = 'Calibri'
ScaleSettings.EnableMainTicks = True
ScaleSettings.EnableSubTicks = True
ScaleSettings.EnableScaleText = True
ScaleSettings.Maximum = 100
ScaleSettings.MainTickCount = 10
ScaleSettings.SubTickCount = 5
ScaleSettings.LengthMainTick = 15
ScaleSettings.LengthSubTick = 8
ScaleSettings.ThicknessMainTick = 3
ScaleSettings.ThicknessSubTick = 1
ScaleSettings.TextRadius = 72
ScaleSettings.Angle = 300
ScaleSettings.EnableRangeIndicator = True
Position = 0
Enabled = True
end
object DTAnalogClock1: TDTAnalogClock
Left = 524
Height = 242
Top = 14
Width = 233
Enabled = True
end
end

View File

@@ -0,0 +1,72 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
ComCtrls, ExtCtrls,
// DT Controls
dtthemedgauge, dtthemedclock, DTAnalogClock, DTAnalogGauge;
type
{ TForm1 }
TForm1 = class(TForm)
DTAnalogClock1: TDTAnalogClock;
DTAnalogGauge1: TDTAnalogGauge;
DTClock1: TDTThemedClock;
DTThemedClock1: TDTThemedClock;
DTThemedGauge1: TDTThemedGauge;
TrackBar1: TTrackBar;
TrackBar2: TTrackBar;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure TrackBar1Change(Sender: TObject);
procedure TrackBar2Change(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
DTThemedGauge1.Position := TrackBar1.Position;
end;
procedure TForm1.TrackBar2Change(Sender: TObject);
begin
DTAnalogGauge1.Position := TrackBar2.Position;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
end;
procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
end.

View File

@@ -0,0 +1,563 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<Title Value="test_bcExpandPanel"/>
<UseXPManifest Value="True"/>
</General>
<VersionInfo>
<Language Value=""/>
<CharSet Value=""/>
</VersionInfo>
<BuildModes Count="2" Active="Debug">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
<RunWithoutDebug Value="True"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default">
<local>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T &apos;Lazarus Run Output&apos; -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</Mode0>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="44">
<Unit0>
<Filename Value="test_bcExpandPanel.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="-1"/>
<CursorPos X="24" Y="6"/>
<UsageCount Value="86"/>
</Unit0>
<Unit1>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="bcExpandPanelForm1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="test_bcExpandPanel_unit1"/>
<IsVisibleTab Value="True"/>
<TopLine Value="90"/>
<CursorPos X="17" Y="92"/>
<UsageCount Value="86"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../../../expandpanels/expandpanels.pas"/>
<UnitName Value="ExpandPanels"/>
<EditorIndex Value="-1"/>
<TopLine Value="1158"/>
<CursorPos X="45" Y="1171"/>
<UsageCount Value="86"/>
</Unit2>
<Unit3>
<Filename Value="/LinuxPrograms/lazarus/lcl/controls.pp"/>
<UnitName Value="Controls"/>
<TopLine Value="96"/>
<CursorPos X="31" Y="119"/>
<UsageCount Value="6"/>
</Unit3>
<Unit4>
<Filename Value="/usr/share/fpcsrc/2.4.0/rtl/objpas/classes/classesh.inc"/>
<TopLine Value="1765"/>
<CursorPos X="10" Y="1788"/>
<UsageCount Value="6"/>
</Unit4>
<Unit5>
<Filename Value="/LinuxPrograms/lazarus/lcl/extctrls.pp"/>
<UnitName Value="ExtCtrls"/>
<TopLine Value="38"/>
<CursorPos X="35" Y="38"/>
<UsageCount Value="6"/>
</Unit5>
<Unit6>
<Filename Value="/LinuxPrograms/lazarus/lcl/lclclasses.pp"/>
<UnitName Value="LCLClasses"/>
<TopLine Value="15"/>
<CursorPos X="3" Y="38"/>
<UsageCount Value="6"/>
</Unit6>
<Unit7>
<Filename Value="/LinuxPrograms/lazarus/lcl/calendar.pp"/>
<UnitName Value="Calendar"/>
<TopLine Value="90"/>
<CursorPos X="17" Y="113"/>
<UsageCount Value="6"/>
</Unit7>
<Unit8>
<Filename Value="/LinuxPrograms/lazarus/lcl/include/control.inc"/>
<TopLine Value="30"/>
<CursorPos X="24" Y="61"/>
<UsageCount Value="6"/>
</Unit8>
<Unit9>
<Filename Value="/LinuxPrograms/lazarus/lcl/lclproc.pas"/>
<UnitName Value="LCLProc"/>
<TopLine Value="1520"/>
<CursorPos X="56" Y="1549"/>
<UsageCount Value="6"/>
</Unit9>
<Unit10>
<Filename Value="../../../expandpanels/pexpandpanels.pas"/>
<UnitName Value="Pexpandpanels"/>
<EditorIndex Value="-1"/>
<CursorPos X="15" Y="19"/>
<UsageCount Value="6"/>
</Unit10>
<Unit11>
<Filename Value="../../../expandpanels/icons.lrs"/>
<EditorIndex Value="-1"/>
<CursorPos X="17"/>
<UsageCount Value="6"/>
</Unit11>
<Unit12>
<Filename Value="../../../../Projects/test/effects_panel/effects_panel_main.pas"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="-1"/>
<CursorPos X="11" Y="7"/>
<UsageCount Value="6"/>
</Unit12>
<Unit13>
<Filename Value="../../../expandpanels/developement test project/effects_panel/effects_panel_main.pas"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="-1"/>
<TopLine Value="93"/>
<CursorPos Y="96"/>
<UsageCount Value="6"/>
</Unit13>
<Unit14>
<Filename Value="../../../expandpanels/expandpanels_o.pas"/>
<UnitName Value="ExpandPanels"/>
<EditorIndex Value="-1"/>
<TopLine Value="2008"/>
<CursorPos Y="2025"/>
<UsageCount Value="7"/>
</Unit14>
<Unit15>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/extctrls.pp"/>
<UnitName Value="ExtCtrls"/>
<EditorIndex Value="-1"/>
<TopLine Value="1016"/>
<CursorPos X="29" Y="1018"/>
<UsageCount Value="31"/>
</Unit15>
<Unit16>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/controls.pp"/>
<UnitName Value="Controls"/>
<EditorIndex Value="-1"/>
<TopLine Value="2275"/>
<CursorPos X="20" Y="2285"/>
<UsageCount Value="10"/>
</Unit16>
<Unit17>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/wincontrol.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="7744"/>
<CursorPos X="3" Y="7689"/>
<UsageCount Value="6"/>
</Unit17>
<Unit18>
<Filename Value="../../../expandpanels/to-do.txt"/>
<EditorIndex Value="2"/>
<CursorPos X="81" Y="23"/>
<UsageCount Value="35"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Text"/>
</Unit18>
<Unit19>
<Filename Value="../../BCExpandPanels.txt"/>
<EditorIndex Value="1"/>
<CursorPos X="31"/>
<UsageCount Value="76"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Text"/>
</Unit19>
<Unit20>
<Filename Value="../../../expandpanels/expandpanels_subpanel.pas"/>
<UnitName Value="ExpandPanels"/>
<EditorIndex Value="-1"/>
<TopLine Value="22"/>
<CursorPos Y="34"/>
<UsageCount Value="6"/>
</Unit20>
<Unit21>
<Filename Value="../../../expandpanels/_subpanel/expandpanels_subpanel.pas"/>
<UnitName Value="ExpandPanels"/>
<EditorIndex Value="-1"/>
<TopLine Value="2329"/>
<CursorPos X="12" Y="2308"/>
<UsageCount Value="8"/>
</Unit21>
<Unit22>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/custompanel.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="89"/>
<CursorPos X="3" Y="94"/>
<UsageCount Value="22"/>
</Unit22>
<Unit23>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/graphics.pp"/>
<UnitName Value="Graphics"/>
<EditorIndex Value="-1"/>
<TopLine Value="1162"/>
<CursorPos X="15" Y="1171"/>
<UsageCount Value="6"/>
</Unit23>
<Unit24>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/canvas.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="1034"/>
<CursorPos X="15" Y="1045"/>
<UsageCount Value="6"/>
</Unit24>
<Unit25>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/lclintfh.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="56"/>
<CursorPos X="10" Y="67"/>
<UsageCount Value="6"/>
</Unit25>
<Unit26>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/intfbaselcl.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="341"/>
<CursorPos X="3" Y="344"/>
<UsageCount Value="6"/>
</Unit26>
<Unit27>
<Filename Value="../../../expandpanels/developement test project/unit1.pas"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<EditorIndex Value="-1"/>
<TopLine Value="44"/>
<CursorPos Y="55"/>
<UsageCount Value="10"/>
</Unit27>
<Unit28>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/buttons.pp"/>
<UnitName Value="Buttons"/>
<EditorIndex Value="-1"/>
<TopLine Value="318"/>
<CursorPos X="17" Y="326"/>
<UsageCount Value="18"/>
</Unit28>
<Unit29>
<Filename Value="../../../expandpanels/developement test project/unit1_onepanel.lfm"/>
<EditorIndex Value="-1"/>
<TopLine Value="202"/>
<UsageCount Value="8"/>
<DefaultSyntaxHighlighter Value="LFM"/>
</Unit29>
<Unit30>
<Filename Value="../../../../../../Development/FreePascal/fpc/rtl/objpas/types.pp"/>
<UnitName Value="Types"/>
<EditorIndex Value="-1"/>
<TopLine Value="451"/>
<CursorPos X="3" Y="453"/>
<UsageCount Value="9"/>
</Unit30>
<Unit31>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/rasterimage.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="814"/>
<CursorPos Y="829"/>
<UsageCount Value="12"/>
</Unit31>
<Unit32>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/custombitmap.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="484"/>
<CursorPos Y="504"/>
<UsageCount Value="11"/>
</Unit32>
<Unit33>
<Filename Value="../../../../../../Development/FreePascal/fpc/rtl/objpas/math.pp"/>
<EditorIndex Value="-1"/>
<TopLine Value="2072"/>
<CursorPos X="3" Y="2075"/>
<UsageCount Value="11"/>
</Unit33>
<Unit34>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/stdctrls.pp"/>
<UnitName Value="StdCtrls"/>
<EditorIndex Value="-1"/>
<TopLine Value="1122"/>
<CursorPos X="3" Y="1127"/>
<UsageCount Value="10"/>
</Unit34>
<Unit35>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/customcontrol.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="89"/>
<CursorPos X="15" Y="92"/>
<UsageCount Value="10"/>
</Unit35>
<Unit36>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/widgetset/wscontrols.pp"/>
<UnitName Value="WSControls"/>
<EditorIndex Value="-1"/>
<TopLine Value="470"/>
<CursorPos X="10" Y="486"/>
<UsageCount Value="10"/>
</Unit36>
<Unit37>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/widgetset/wsfactory.pas"/>
<UnitName Value="WSFactory"/>
<EditorIndex Value="-1"/>
<TopLine Value="30"/>
<CursorPos X="10" Y="41"/>
<UsageCount Value="10"/>
</Unit37>
<Unit38>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/speedbutton.inc"/>
<EditorIndex Value="-1"/>
<TopLine Value="854"/>
<CursorPos X="3" Y="856"/>
<UsageCount Value="10"/>
</Unit38>
<Unit39>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/dialogs.pp"/>
<UnitName Value="Dialogs"/>
<EditorIndex Value="-1"/>
<TopLine Value="255"/>
<CursorPos X="31" Y="257"/>
<UsageCount Value="10"/>
</Unit39>
<Unit40>
<Filename Value="../../../../../../Development/FreePascal/lazarus/lcl/include/colorbutton.inc"/>
<EditorIndex Value="-1"/>
<CursorPos X="35" Y="127"/>
<UsageCount Value="10"/>
</Unit40>
<Unit41>
<Filename Value="../../../expandpanels/expandpanels_glyphs.lrs"/>
<EditorIndex Value="-1"/>
<UsageCount Value="10"/>
</Unit41>
<Unit42>
<Filename Value="../../BCExpandPanels.pas"/>
<EditorIndex Value="3"/>
<TopLine Value="593"/>
<CursorPos X="3" Y="597"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
<DefaultSyntaxHighlighter Value="Delphi"/>
</Unit42>
<Unit43>
<Filename Value="../../../../Projects/DigIt/DigIt_Twain32Comm.lpr"/>
<EditorIndex Value="4"/>
<TopLine Value="76"/>
<CursorPos X="16" Y="92"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit43>
</Units>
<JumpHistory Count="16" HistoryIndex="15">
<Position1>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Line="130" TopLine="116"/>
</Position1>
<Position2>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Line="129" TopLine="115"/>
</Position2>
<Position3>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Line="128" TopLine="114"/>
</Position3>
<Position4>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Line="127" TopLine="113"/>
</Position4>
<Position5>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Line="130" TopLine="116"/>
</Position5>
<Position6>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Line="9" Column="38"/>
</Position6>
<Position7>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Line="129" Column="23" TopLine="117"/>
</Position7>
<Position8>
<Filename Value="../../BCExpandPanels.pas"/>
<Caret Line="18" Column="36" TopLine="10"/>
</Position8>
<Position9>
<Filename Value="../../BCExpandPanels.pas"/>
<Caret Line="20" Column="21"/>
</Position9>
<Position10>
<Filename Value="../../BCExpandPanels.pas"/>
<Caret Line="2177" Column="10" TopLine="2163"/>
</Position10>
<Position11>
<Filename Value="../../BCExpandPanels.pas"/>
<Caret Line="2439" Column="10" TopLine="2426"/>
</Position11>
<Position12>
<Filename Value="../../BCExpandPanels.pas"/>
<Caret Line="2460" Column="11" TopLine="2447"/>
</Position12>
<Position13>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Column="24" TopLine="46"/>
</Position13>
<Position14>
<Filename Value="test_bcexpandpanel_unit1.pas"/>
<Caret Line="92" Column="17" TopLine="90"/>
</Position14>
<Position15>
<Filename Value="../../BCExpandPanels.pas"/>
<Caret Line="139" Column="59" TopLine="129"/>
</Position15>
<Position16>
<Filename Value="../../BCExpandPanels.pas"/>
<Caret Line="79" Column="20" TopLine="68"/>
</Position16>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<IncludeAssertionCode Value="True"/>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<CodeGeneration>
<Checks>
<IOChecks Value="True"/>
<RangeChecks Value="True"/>
<OverflowChecks Value="True"/>
<StackChecks Value="True"/>
</Checks>
<VerifyObjMethodCallValidity Value="True"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf3"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<BreakPoints Count="5">
<Item1>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../../expandpanels/expandpanels.pas"/>
<Line Value="3362"/>
</Item1>
<Item2>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../../expandpanels/expandpanels.pas"/>
<Line Value="3379"/>
</Item2>
<Item3>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../../expandpanels/expandpanels.pas"/>
<Line Value="2964"/>
</Item3>
<Item4>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../../expandpanels/expandpanels.pas"/>
<Line Value="3383"/>
</Item4>
<Item5>
<Kind Value="bpkSource"/>
<WatchScope Value="wpsLocal"/>
<WatchKind Value="wpkWrite"/>
<Source Value="../../../expandpanels/expandpanels.pas"/>
<Line Value="2973"/>
</Item5>
</BreakPoints>
<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,16 @@
program test_bcExpandPanel;
{$mode objfpc}{$H+}
uses {$IFDEF UNIX} {$IFDEF UseCThreads}
cthreads, {$ENDIF} {$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms,
test_bcExpandPanel_unit1,
LResources { you can add units after this };
begin
Application.Initialize;
Application.CreateForm(TbcExpandPanelForm1, bcExpandPanelForm1);
Application.Run;
end.

View File

@@ -0,0 +1,349 @@
object bcExpandPanelForm1: TbcExpandPanelForm1
Left = 355
Height = 623
Top = 15
Width = 549
Caption = 'bcExpandPanelForm1'
ClientHeight = 623
ClientWidth = 549
LCLVersion = '3.99.0.0'
OnShow = FormShow
object RColl: TRadioGroup
Left = 17
Height = 107
Top = 323
Width = 169
AutoFill = True
Caption = 'Collapse To'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 87
ClientWidth = 165
Columns = 2
ItemIndex = 0
Items.Strings = (
'top'
'left'
'right'
'bottom'
)
TabOrder = 0
OnClick = RCollClick
end
object RButt: TRadioGroup
Left = 17
Height = 86
Top = 427
Width = 169
AutoFill = True
Caption = 'Button Position'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 66
ClientWidth = 165
Columns = 2
ItemIndex = 0
Items.Strings = (
'top'
'left'
'right'
'bottom'
)
TabOrder = 1
OnClick = RButtClick
end
object RGlyph: TRadioGroup
Left = 17
Height = 80
Top = 536
Width = 169
AutoFill = True
Caption = 'Glyph Position'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 60
ClientWidth = 165
Columns = 2
ItemIndex = 1
Items.Strings = (
'Left'
'Right'
'None'
)
TabOrder = 2
OnClick = RGlyphClick
end
object GroupBox1: TGroupBox
Left = 193
Height = 152
Top = 323
Width = 169
Caption = 'Caption'
ClientHeight = 132
ClientWidth = 165
TabOrder = 3
object Edit1: TEdit
Left = 0
Height = 23
Top = 0
Width = 161
TabOrder = 0
Text = 'Click me to Collapse/Expand'
OnChange = Edit1Change
end
object SpeedButton1: TSpeedButton
Left = 0
Height = 22
Top = 24
Width = 161
Caption = 'Long Caption...'
OnClick = SpeedButton1Click
end
object RCapt: TRadioGroup
Left = 0
Height = 80
Top = 50
Width = 161
AutoFill = True
Caption = 'Caption Position'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 60
ClientWidth = 157
Columns = 2
ItemIndex = 0
Items.Strings = (
'Left'
'Right'
'Center'
'None'
)
TabOrder = 1
OnClick = RCaptClick
end
end
object edTabWidth: TSpinEdit
Left = 384
Height = 23
Top = 395
Width = 103
MaxValue = 380
MinValue = -90
TabOrder = 4
Value = -50
OnChange = edTabWidthChange
end
object Label1: TLabel
Left = 384
Height = 15
Top = 376
Width = 135
Caption = 'Tab Width (Negative is %)'
ParentColor = False
end
object cbRounded: TCheckBox
Left = 368
Height = 19
Top = 426
Width = 109
Caption = 'Rounded Borders'
Checked = True
State = cbChecked
TabOrder = 5
OnClick = cbRoundedClick
end
object cbFlat: TCheckBox
Left = 142
Height = 19
Top = 512
Width = 37
Caption = 'Flat'
TabOrder = 6
OnClick = cbFlatClick
end
object cbBorders: TComboBox
Left = 384
Height = 23
Top = 453
Width = 121
ItemHeight = 15
ItemIndex = 2
Items.Strings = (
'None'
'Lowered'
'Raised'
'Space'
)
Style = csDropDownList
TabOrder = 7
Text = 'Raised'
OnChange = cbBordersChange
end
object edButtonSize: TSpinEdit
Left = 72
Height = 23
Top = 509
Width = 70
TabOrder = 8
OnChange = edButtonSizeChange
end
object Label3: TLabel
Left = 40
Height = 15
Top = 512
Width = 23
Caption = 'Size:'
ParentColor = False
end
object RGlyphKind: TRadioGroup
Left = 193
Height = 80
Top = 536
Width = 169
AutoFill = True
Caption = 'Glyph Kind'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 60
ClientWidth = 165
Columns = 2
ItemIndex = 0
Items.Strings = (
'Arrows'
'Close'
'Min/Max'
)
TabOrder = 9
OnClick = RGlyphKindClick
end
object RStyle: TComboBox
Left = 368
Height = 23
Top = 346
Width = 176
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'Button'
'Tab'
'Line'
'Line Double'
'Line Top'
'Line Bottom'
'Line Double Top'
'Line Double Bottom'
)
Style = csDropDownList
TabOrder = 10
Text = 'Button'
OnChange = RStyleChange
end
object Label4: TLabel
Left = 369
Height = 15
Top = 327
Width = 31
Caption = 'Style :'
ParentColor = False
end
object p1: TBCExpandPanel
Left = 8
Height = 312
Top = 8
Width = 400
Background.Color = clBtnFace
Background.Gradient1.StartColor = clWhite
Background.Gradient1.EndColor = clBlack
Background.Gradient1.GradientType = gtLinear
Background.Gradient1.Point1XPercent = 0
Background.Gradient1.Point1YPercent = 0
Background.Gradient1.Point2XPercent = 0
Background.Gradient1.Point2YPercent = 100
Background.Gradient2.StartColor = clWhite
Background.Gradient2.EndColor = clBlack
Background.Gradient2.GradientType = gtLinear
Background.Gradient2.Point1XPercent = 0
Background.Gradient2.Point1YPercent = 0
Background.Gradient2.Point2XPercent = 0
Background.Gradient2.Point2YPercent = 100
Background.Gradient1EndPercent = 35
Background.Style = bbsColor
BevelInner = bvNone
BevelOuter = bvRaised
BevelWidth = 1
Border.Style = bboNone
Caption = 'Expand Panel 1'
Enabled = True
FontEx.Color = clDefault
FontEx.FontQuality = fqSystemClearType
FontEx.Shadow = False
FontEx.ShadowRadius = 5
FontEx.ShadowOffsetX = 5
FontEx.ShadowOffsetY = 5
FontEx.Style = []
ParentBackground = False
Rounding.RoundX = 1
Rounding.RoundY = 1
TabOrder = 11
TextAlignment = taCenter
CollapseKind = akTop
ExpandedSize = 312
ButtonPosition = akTop
ButtonSize = 27
Button.Left = 0
Button.Height = 27
Button.Top = 0
Button.Width = 400
Button.Caption = 'Click me to Collapse/Expand'
Button.Color = clSkyBlue
Button.ColorExpanded = 16287767
Button.GlyphLayout = glRight
AnimationSpeed = 20
object Edit2: TEdit
Left = 47
Height = 23
Top = 41
Width = 80
TabOrder = 0
Text = 'Edit2'
end
object Label2: TLabel
Left = 136
Height = 15
Top = 47
Width = 34
Caption = 'Label2'
ParentColor = False
end
end
end

View File

@@ -0,0 +1,144 @@
unit test_bcExpandPanel_unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics,
ExtCtrls, StdCtrls, Buttons, Spin, BCExpandPanels, StrUtils;
type
{ TbcExpandPanelForm1 }
TbcExpandPanelForm1 = class(TForm)
cbRounded: TCheckBox;
cbFlat: TCheckBox;
cbBorders: TComboBox;
Edit1: TEdit;
Edit2: TEdit;
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
p1: TBCExpandPanel;
RGlyph: TRadioGroup;
RCapt: TRadioGroup;
RColl: TRadioGroup;
RButt: TRadioGroup;
RGlyphKind: TRadioGroup;
RStyle: TComboBox;
SpeedButton1: TSpeedButton;
edTabWidth: TSpinEdit;
edButtonSize: TSpinEdit;
procedure cbFlatClick(Sender: TObject);
procedure cbRoundedClick(Sender: TObject);
procedure cbBordersChange(Sender: TObject);
procedure edButtonSizeChange(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure edTabWidthChange(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure RGlyphClick(Sender: TObject);
procedure RCaptClick(Sender: TObject);
procedure RButtClick(Sender: TObject);
procedure RCollClick(Sender: TObject);
procedure RGlyphKindClick(Sender: TObject);
procedure RStyleChange(Sender: TObject);
procedure RDirectionClick(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
bcExpandPanelForm1: TbcExpandPanelForm1;
implementation
{ TbcExpandPanelForm1 }
procedure TbcExpandPanelForm1.Edit1Change(Sender: TObject);
begin
p1.Button.Caption := Edit1.Text;
end;
procedure TbcExpandPanelForm1.cbRoundedClick(Sender: TObject);
begin
p1.BevelRounded:=cbRounded.Checked;
end;
procedure TbcExpandPanelForm1.cbBordersChange(Sender: TObject);
begin
p1.BevelOuter:=TBevelcut(cbBorders.ItemIndex);
end;
procedure TbcExpandPanelForm1.edButtonSizeChange(Sender: TObject);
begin
p1.ButtonSize:=edButtonSize.Value;
end;
procedure TbcExpandPanelForm1.cbFlatClick(Sender: TObject);
begin
p1.Button.Flat:=cbFlat.Checked;
end;
procedure TbcExpandPanelForm1.edTabWidthChange(Sender: TObject);
begin
p1.Button.TabWidth:=edTabWidth.Value;
end;
procedure TbcExpandPanelForm1.FormShow(Sender: TObject);
begin
edButtonSize.Value:=p1.ButtonSize;
edTabWidth.Value:=p1.Button.TabWidth;
end;
procedure TbcExpandPanelForm1.RGlyphClick(Sender: TObject);
begin
p1.Button.GlyphLayout:=TGlyphLayout(RGlyph.ItemIndex);
end;
procedure TbcExpandPanelForm1.RCaptClick(Sender: TObject);
begin
p1.Button.TextLayout:=TTextLayout(RCapt.ItemIndex);
end;
procedure TbcExpandPanelForm1.RButtClick(Sender: TObject);
begin
p1.ButtonPosition := TAnchorKind(RButt.ItemIndex);
end;
procedure TbcExpandPanelForm1.RCollClick(Sender: TObject);
begin
p1.CollapseKind := TAnchorKind(RColl.ItemIndex);
end;
procedure TbcExpandPanelForm1.RGlyphKindClick(Sender: TObject);
begin
p1.Button.GlyphKind:=TGlyphKind(RGlyphKind.ItemIndex);
end;
procedure TbcExpandPanelForm1.RStyleChange(Sender: TObject);
begin
p1.Button.Style:=TBCBoundButtonStyle(RStyle.ItemIndex);
end;
procedure TbcExpandPanelForm1.RDirectionClick(Sender: TObject);
begin
end;
procedure TbcExpandPanelForm1.SpeedButton1Click(Sender: TObject);
begin
p1.Button.Caption := DupeString(Edit1.Caption, 10);
end;
initialization
{$I test_bcexpandpanel_unit1.lrs}
end.

View File

@@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="bcsample"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<BuildModes Count="3">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="bcsample"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Debug macOS 64">
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
</MacroValues>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="bcsample"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
<TargetCPU Value="x86_64"/>
<TargetOS Value="darwin"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
<SharedMatrixOptions Count="1">
<Item1 ID="130639678305" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
</SharedMatrixOptions>
</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>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="bcsample.lpr"/>
<IsPartOfProject Value="True"/>
</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="\"/>
<Target>
<Filename Value="bcsample"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program bcsample;
{$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.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,85 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ActnList,
Menus, StdCtrls, ExtCtrls, BCButton, BCPanel;
type
{ TForm1 }
TForm1 = class(TForm)
Action1: TAction;
Action2: TAction;
Action3: TAction;
ActionList1: TActionList;
BCButton1: TBCButton;
BCButton10: TBCButton;
BCButton11: TBCButton;
BCButton12: TBCButton;
BCButton13: TBCButton;
BCButton14: TBCButton;
BCButton15: TBCButton;
BCButton16: TBCButton;
BCButton17: TBCButton;
BCButton18: TBCButton;
BCButton19: TBCButton;
BCButton2: TBCButton;
BCButton20: TBCButton;
BCButton21: TBCButton;
BCButton3: TBCButton;
BCButton4: TBCButton;
BCButton5: TBCButton;
BCButton6: TBCButton;
BCButton7: TBCButton;
BCButton8: TBCButton;
BCButton9: TBCButton;
BCPanel1: TBCPanel;
BCPanel2: TBCPanel;
Bevel1: TBevel;
Bevel2: TBevel;
CheckBox1: TCheckBox;
ImageList1: TImageList;
MenuItem1: TMenuItem;
MenuItem10: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
MenuItem5: TMenuItem;
MenuItem6: TMenuItem;
MenuItem7: TMenuItem;
MenuItem8: TMenuItem;
MenuItem9: TMenuItem;
PopupMenu1: TPopupMenu;
PopupMenu2: TPopupMenu;
PopupMenu3: TPopupMenu;
Shape1: TShape;
Shape2: TShape;
procedure CheckBox1Change(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.CheckBox1Change(Sender: TObject);
begin
BCButton1.ShowCaption := CheckBox1.Checked;
BCButton7.ShowCaption := CheckBox1.Checked;
end;
end.

View File

@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="test"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes Count="3">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Debug macOS 64">
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
</MacroValues>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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"/>
<TargetCPU Value="x86_64"/>
<TargetOS Value="darwin"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
<SharedMatrixOptions Count="1">
<Item1 ID="500993870451" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
</SharedMatrixOptions>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="3">
<Unit0>
<Filename Value="test.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="aForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
<Unit2>
<Filename Value="ubrightandcontrast.pas"/>
<IsPartOfProject Value="True"/>
</Unit2>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program test;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TaForm, aForm);
Application.Run;
end.

View File

@@ -0,0 +1,180 @@
object aForm: TaForm
Left = 462
Height = 240
Top = 146
Width = 320
Caption = 'Bright and Contrast'
ClientHeight = 240
ClientWidth = 320
OnCreate = FormCreate
LCLVersion = '1.7'
object BCButtonFocus1: TBCButtonFocus
Left = 8
Height = 34
Top = 8
Width = 147
StateClicked.Background.Color = 16245964
StateClicked.Background.ColorOpacity = 255
StateClicked.Background.Gradient1.StartColor = 16577765
StateClicked.Background.Gradient1.StartColorOpacity = 255
StateClicked.Background.Gradient1.DrawMode = dmSet
StateClicked.Background.Gradient1.EndColor = 16180676
StateClicked.Background.Gradient1.EndColorOpacity = 255
StateClicked.Background.Gradient1.ColorCorrection = True
StateClicked.Background.Gradient1.GradientType = gtLinear
StateClicked.Background.Gradient1.Point1XPercent = 0
StateClicked.Background.Gradient1.Point1YPercent = 0
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 100
StateClicked.Background.Gradient1.Sinus = False
StateClicked.Background.Gradient2.StartColor = 15716760
StateClicked.Background.Gradient2.StartColorOpacity = 255
StateClicked.Background.Gradient2.DrawMode = dmSet
StateClicked.Background.Gradient2.EndColor = 14398312
StateClicked.Background.Gradient2.EndColorOpacity = 255
StateClicked.Background.Gradient2.ColorCorrection = True
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient2.Sinus = False
StateClicked.Background.Gradient1EndPercent = 55
StateClicked.Background.Style = bbsColor
StateClicked.Border.Color = 10048512
StateClicked.Border.ColorOpacity = 255
StateClicked.Border.LightColor = clBlack
StateClicked.Border.LightOpacity = 100
StateClicked.Border.LightWidth = 0
StateClicked.Border.Style = bboSolid
StateClicked.Border.Width = 1
StateClicked.FontEx.Color = clBlack
StateClicked.FontEx.EndEllipsis = False
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Height = 0
StateClicked.FontEx.SingleLine = True
StateClicked.FontEx.Shadow = False
StateClicked.FontEx.ShadowColor = clBlack
StateClicked.FontEx.ShadowColorOpacity = 255
StateClicked.FontEx.ShadowRadius = 5
StateClicked.FontEx.ShadowOffsetX = 5
StateClicked.FontEx.ShadowOffsetY = 5
StateClicked.FontEx.Style = []
StateClicked.FontEx.TextAlignment = bcaCenter
StateClicked.FontEx.WordBreak = False
StateHover.Background.Color = 16511461
StateHover.Background.ColorOpacity = 255
StateHover.Background.Gradient1.StartColor = 16643818
StateHover.Background.Gradient1.StartColorOpacity = 255
StateHover.Background.Gradient1.DrawMode = dmSet
StateHover.Background.Gradient1.EndColor = 16576729
StateHover.Background.Gradient1.EndColorOpacity = 255
StateHover.Background.Gradient1.ColorCorrection = True
StateHover.Background.Gradient1.GradientType = gtLinear
StateHover.Background.Gradient1.Point1XPercent = 0
StateHover.Background.Gradient1.Point1YPercent = 0
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 100
StateHover.Background.Gradient1.Sinus = False
StateHover.Background.Gradient2.StartColor = 16639678
StateHover.Background.Gradient2.StartColorOpacity = 255
StateHover.Background.Gradient2.DrawMode = dmSet
StateHover.Background.Gradient2.EndColor = 16112039
StateHover.Background.Gradient2.EndColorOpacity = 255
StateHover.Background.Gradient2.ColorCorrection = True
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient2.Sinus = False
StateHover.Background.Gradient1EndPercent = 50
StateHover.Background.Style = bbsColor
StateHover.Border.Color = 14120960
StateHover.Border.ColorOpacity = 255
StateHover.Border.LightColor = clWhite
StateHover.Border.LightOpacity = 200
StateHover.Border.LightWidth = 0
StateHover.Border.Style = bboSolid
StateHover.Border.Width = 1
StateHover.FontEx.Color = clBlack
StateHover.FontEx.EndEllipsis = False
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Height = 0
StateHover.FontEx.SingleLine = True
StateHover.FontEx.Shadow = False
StateHover.FontEx.ShadowColor = clBlack
StateHover.FontEx.ShadowColorOpacity = 255
StateHover.FontEx.ShadowRadius = 5
StateHover.FontEx.ShadowOffsetX = 5
StateHover.FontEx.ShadowOffsetY = 5
StateHover.FontEx.Style = []
StateHover.FontEx.TextAlignment = bcaCenter
StateHover.FontEx.WordBreak = False
StateNormal.Background.Color = 14803425
StateNormal.Background.ColorOpacity = 255
StateNormal.Background.Gradient1.StartColor = 15921906
StateNormal.Background.Gradient1.StartColorOpacity = 255
StateNormal.Background.Gradient1.DrawMode = dmSet
StateNormal.Background.Gradient1.EndColor = 15461355
StateNormal.Background.Gradient1.EndColorOpacity = 255
StateNormal.Background.Gradient1.ColorCorrection = True
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient1.Sinus = False
StateNormal.Background.Gradient2.StartColor = 14540253
StateNormal.Background.Gradient2.StartColorOpacity = 255
StateNormal.Background.Gradient2.DrawMode = dmSet
StateNormal.Background.Gradient2.EndColor = 13619151
StateNormal.Background.Gradient2.EndColorOpacity = 255
StateNormal.Background.Gradient2.ColorCorrection = True
StateNormal.Background.Gradient2.GradientType = gtLinear
StateNormal.Background.Gradient2.Point1XPercent = 0
StateNormal.Background.Gradient2.Point1YPercent = 0
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 100
StateNormal.Background.Gradient2.Sinus = False
StateNormal.Background.Gradient1EndPercent = 50
StateNormal.Background.Style = bbsColor
StateNormal.Border.Color = 11382189
StateNormal.Border.ColorOpacity = 255
StateNormal.Border.LightColor = clWhite
StateNormal.Border.LightOpacity = 200
StateNormal.Border.LightWidth = 0
StateNormal.Border.Style = bboSolid
StateNormal.Border.Width = 1
StateNormal.FontEx.Color = clBlack
StateNormal.FontEx.EndEllipsis = False
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Height = 0
StateNormal.FontEx.SingleLine = True
StateNormal.FontEx.Shadow = False
StateNormal.FontEx.ShadowColor = clBlack
StateNormal.FontEx.ShadowColorOpacity = 255
StateNormal.FontEx.ShadowRadius = 5
StateNormal.FontEx.ShadowOffsetX = 5
StateNormal.FontEx.ShadowOffsetY = 5
StateNormal.FontEx.Style = []
StateNormal.FontEx.TextAlignment = bcaCenter
StateNormal.FontEx.WordBreak = False
Caption = 'BCButtonFocus1'
Color = clNone
DropDownWidth = 16
DropDownArrowSize = 8
GlobalOpacity = 255
InnerMargin = 0
ParentColor = False
Rounding.RoundX = 0
Rounding.RoundY = 0
Rounding.RoundOptions = []
RoundingDropDown.RoundX = 1
RoundingDropDown.RoundY = 1
RoundingDropDown.RoundOptions = []
TextApplyGlobalOpacity = False
MemoryUsage = bmuHighF
TabStop = True
end
end

View File

@@ -0,0 +1,98 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
BCButtonFocus, BCTypes;
type
{ TaForm }
TaForm = class(TForm)
BCButtonFocus1: TBCButtonFocus;
procedure FormCreate(Sender: TObject);
private
public
end;
var
aForm: TaForm;
implementation
uses
bcbrightandcontrast;
{$R *.lfm}
{ TaForm }
procedure BCButtonWindows8(AButton: TBCButtonFocus; cl1, cl2: TColor);
begin
AButton.Rounding.RoundX := 1;
AButton.Rounding.RoundY := 1;
AButton.RoundingDropDown.Assign(AButton.Rounding);
with AButton.StateNormal do
begin
Background.Style := bbsColor;
Background.Color := cl1;
Border.Style := bboSolid;
Border.Width := 1;
Border.Color := cl1;
Border.LightWidth := 0;
Border.LightOpacity := 255;
Border.Style := bboSolid;
// This will be automatically set with the GetContrastColor function
//FontEx.Color := clWhite;
FontEx.Shadow := False;
FontEx.Style := [];
end;
AButton.StateHover.Assign(AButton.StateNormal);
AButton.StateClicked.Assign(AButton.StateNormal);
with AButton.StateHover do
begin
Background.Color := cl2;
Border.Color := cl2;
end;
with AButton.StateClicked do
begin
Background.Color := cl2;
Border.Color := cl2;
end;
end;
procedure TaForm.FormCreate(Sender: TObject);
var
i: integer;
begin
for i := 0 to aForm.ComponentCount - 1 do
begin
if aForm.Components[i] is TBCButtonFocus then
begin
{ Default style, color for normal and pressed }
BCButtonWindows8(TBCButtonFocus(aForm.Components[i]), clNavy, clGray);
{ Hover color based on normal color }
TBCButtonFocus(aForm.Components[i]).StateHover.Background.Color :=
Bright(TBCButtonFocus(aForm.Components[i]).StateNormal.Background.Color, 20);
{ Font color based on normal color }
TBCButtonFocus(aForm.Components[i]).StateNormal.FontEx.Color :=
GetContrastColor(TBCButtonFocus(aForm.Components[i]).StateNormal.Background.Color);
TBCButtonFocus(aForm.Components[i]).StateHover.FontEx.Color :=
GetContrastColor(TBCButtonFocus(aForm.Components[i]).StateNormal.Background.Color);
TBCButtonFocus(aForm.Components[i]).StateClicked.FontEx.Color :=
GetContrastColor(TBCButtonFocus(aForm.Components[i]).StateNormal.Background.Color);
end;
end;
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="test_bcbuttonmacos_style"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_bcbuttonmacos_style.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcbuttonmacos_style"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,22 @@
program test_bcbuttonmacos_style;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
Application.Scaled:=True;
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
BCButtonFocus, BCButton, BCPanel, BGRASpriteAnimation;
type
{ TForm1 }
TForm1 = class(TForm)
BCButton1: TBCButton;
BCButton2: TBCButton;
BCButton3: TBCButton;
BCButton4: TBCButton;
BCButton5: TBCButton;
BCButton6: TBCButton;
BCButton7: TBCButton;
BCPanel1: TBCPanel;
BGRASpriteAnimation1: TBGRASpriteAnimation;
procedure BCButton5Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.BCButton5Click(Sender: TObject);
begin
BCButton5.Down := False;
BCButton6.Down := False;
BCButton7.Down := False;
TBCButton(Sender).Down := True;
end;
end.

View File

@@ -0,0 +1,179 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="test"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes Count="3">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Debug macOS 64">
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
</MacroValues>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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"/>
<TargetCPU Value="x86_64"/>
<TargetOS Value="darwin"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
<SharedMatrixOptions Count="1">
<Item1 ID="652384755329" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
</SharedMatrixOptions>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program test;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,411 @@
object Form1: TForm1
Left = 461
Height = 300
Top = 145
Width = 400
Caption = 'BC Button Focus'
ClientHeight = 300
ClientWidth = 400
DesignTimePPI = 120
LCLVersion = '2.0.2.0'
object BCButtonFocus1: TBCButtonFocus
Left = 10
Height = 43
Top = 10
Width = 183
StateClicked.Background.Gradient1.StartColor = 7726591
StateClicked.Background.Gradient1.EndColor = 7067903
StateClicked.Background.Gradient1.GradientType = gtLinear
StateClicked.Background.Gradient1.Point1XPercent = 50
StateClicked.Background.Gradient1.Point1YPercent = 100
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 100
StateClicked.Background.Gradient2.StartColor = 7067903
StateClicked.Background.Gradient2.EndColor = 8515583
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient1EndPercent = 50
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Color = 4170178
StateClicked.Border.LightColor = clGray
StateClicked.Border.LightOpacity = 100
StateClicked.Border.LightWidth = 1
StateClicked.Border.Style = bboSolid
StateClicked.FontEx.Color = clBlack
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Shadow = False
StateClicked.FontEx.ShadowRadius = 5
StateClicked.FontEx.ShadowOffsetX = 5
StateClicked.FontEx.ShadowOffsetY = 5
StateClicked.FontEx.Style = []
StateClicked.FontEx.PaddingLeft = 6
StateClicked.FontEx.PaddingRight = 6
StateHover.Background.Gradient1.StartColor = 12448254
StateHover.Background.Gradient1.EndColor = 8840446
StateHover.Background.Gradient1.GradientType = gtLinear
StateHover.Background.Gradient1.Point1XPercent = 50
StateHover.Background.Gradient1.Point1YPercent = 100
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 100
StateHover.Background.Gradient2.StartColor = 8840446
StateHover.Background.Gradient2.EndColor = 12908798
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient1EndPercent = 50
StateHover.Background.Style = bbsGradient
StateHover.Border.Color = 5362420
StateHover.Border.LightOpacity = 200
StateHover.Border.LightWidth = 1
StateHover.Border.Style = bboSolid
StateHover.FontEx.Color = clBlack
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Shadow = False
StateHover.FontEx.ShadowRadius = 5
StateHover.FontEx.ShadowOffsetX = 5
StateHover.FontEx.ShadowOffsetY = 5
StateHover.FontEx.Style = []
StateHover.FontEx.PaddingLeft = 6
StateHover.FontEx.PaddingRight = 6
StateNormal.Background.Gradient1.StartColor = clWhite
StateNormal.Background.Gradient1.EndColor = 15855597
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient2.StartColor = 13137169
StateNormal.Background.Gradient2.EndColor = 15722194
StateNormal.Background.Gradient2.GradientType = gtLinear
StateNormal.Background.Gradient2.Point1XPercent = 50
StateNormal.Background.Gradient2.Point1YPercent = 100
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 100
StateNormal.Background.Gradient1EndPercent = 100
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Color = 13816015
StateNormal.Border.LightWidth = 1
StateNormal.Border.Style = bboSolid
StateNormal.FontEx.Color = clBlack
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Shadow = False
StateNormal.FontEx.ShadowRadius = 5
StateNormal.FontEx.ShadowOffsetX = 5
StateNormal.FontEx.ShadowOffsetY = 5
StateNormal.FontEx.Style = []
StateNormal.FontEx.PaddingLeft = 6
StateNormal.FontEx.PaddingRight = 6
Caption = 'BCButtonFocus1'
Color = clNone
DropDownWidth = 16
DropDownArrowSize = 8
GlobalOpacity = 255
GlyphOldPlacement = False
InnerMargin = 0
ParentColor = False
Rounding.RoundX = 3
Rounding.RoundY = 3
RoundingDropDown.RoundX = 1
RoundingDropDown.RoundY = 1
TextApplyGlobalOpacity = False
MemoryUsage = bmuHighF
TabStop = True
OnPaintButton = BCButtonFocus1PaintButton
end
object BCButtonFocus2: TBCButtonFocus
Left = 10
Height = 43
Top = 60
Width = 183
StateClicked.Background.Gradient1.StartColor = 7726591
StateClicked.Background.Gradient1.EndColor = 7067903
StateClicked.Background.Gradient1.GradientType = gtLinear
StateClicked.Background.Gradient1.Point1XPercent = 50
StateClicked.Background.Gradient1.Point1YPercent = 100
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 100
StateClicked.Background.Gradient2.StartColor = 7067903
StateClicked.Background.Gradient2.EndColor = 8515583
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient1EndPercent = 50
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Color = 4170178
StateClicked.Border.LightColor = clGray
StateClicked.Border.LightOpacity = 100
StateClicked.Border.LightWidth = 1
StateClicked.Border.Style = bboSolid
StateClicked.FontEx.Color = clBlack
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Shadow = False
StateClicked.FontEx.ShadowRadius = 5
StateClicked.FontEx.ShadowOffsetX = 5
StateClicked.FontEx.ShadowOffsetY = 5
StateClicked.FontEx.Style = []
StateClicked.FontEx.PaddingLeft = 6
StateClicked.FontEx.PaddingRight = 6
StateHover.Background.Gradient1.StartColor = 12448254
StateHover.Background.Gradient1.EndColor = 8840446
StateHover.Background.Gradient1.GradientType = gtLinear
StateHover.Background.Gradient1.Point1XPercent = 50
StateHover.Background.Gradient1.Point1YPercent = 100
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 100
StateHover.Background.Gradient2.StartColor = 8840446
StateHover.Background.Gradient2.EndColor = 12908798
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient1EndPercent = 50
StateHover.Background.Style = bbsGradient
StateHover.Border.Color = 5362420
StateHover.Border.LightOpacity = 200
StateHover.Border.LightWidth = 1
StateHover.Border.Style = bboSolid
StateHover.FontEx.Color = clBlack
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Shadow = False
StateHover.FontEx.ShadowRadius = 5
StateHover.FontEx.ShadowOffsetX = 5
StateHover.FontEx.ShadowOffsetY = 5
StateHover.FontEx.Style = []
StateHover.FontEx.PaddingLeft = 6
StateHover.FontEx.PaddingRight = 6
StateNormal.Background.Gradient1.StartColor = clWhite
StateNormal.Background.Gradient1.EndColor = 15855597
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient2.StartColor = 13137169
StateNormal.Background.Gradient2.EndColor = 15722194
StateNormal.Background.Gradient2.GradientType = gtLinear
StateNormal.Background.Gradient2.Point1XPercent = 50
StateNormal.Background.Gradient2.Point1YPercent = 100
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 100
StateNormal.Background.Gradient1EndPercent = 100
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Color = 13816015
StateNormal.Border.LightWidth = 1
StateNormal.Border.Style = bboSolid
StateNormal.FontEx.Color = clBlack
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Shadow = False
StateNormal.FontEx.ShadowRadius = 5
StateNormal.FontEx.ShadowOffsetX = 5
StateNormal.FontEx.ShadowOffsetY = 5
StateNormal.FontEx.Style = []
StateNormal.FontEx.PaddingLeft = 6
StateNormal.FontEx.PaddingRight = 6
Caption = 'BCButtonFocus2'
Color = clNone
DropDownWidth = 16
DropDownArrowSize = 8
GlobalOpacity = 255
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0000000000000000000000000007001C0D1E00381A3E003A1C46003A1C460038
1A3E001C0D1E0000000700000000000000000000000000000000000000000000
0000000000020027131C0062366903834FB10A9963E00D9E68EA0D9E68EA0A99
63E003834FB1006236690027131C000000020000000000000000000000000000
00010041212B01804BA912A774F523C393FF24D09FFF24D4A2FF24D4A2FF24D0
9FFF23C393FF12A773F501804BA90041212B000000010000000000FFFB00003E
1F22028751B31BB684FE24D2A2FF0CD69EFF02D599FF00D496FF00D496FF02D5
99FF0CD69EFF24D2A1FF1BB684FE028751B3003E1F2200FFFB000000000A007B
468518B07EFC22D3A3FF03D49AFF00D398FF0AD49BFF67E3BFFF67E3BFFF0AD4
9BFF00D398FF03D49AFF22D3A2FF18B07EFC007B46850000000A00552B31099C
66DB26CD9FFF06D39BFF00D199FF00D198FF1BD49FFFE3FAF3FFE3FAF3FF1BD4
9FFF00D198FF00D199FF06D39BFF26CD9EFF099C66DB00552C310079437419B1
7FF718D2A1FF00D098FF00CF96FF00CE94FF1CD19CFFE5F9F3FFE5F9F3FF1CD1
9CFF00CE94FF00CF96FF00D098FF18D2A1FF19B17FF70079437400874C9824BE
90FF0DD19EFF09CF9BFF66E0BEFF80E5C8FF8DE7CCFFF2FCF9FFF2FCF9FF8DE7
CCFF80E5C8FF66E0BEFF09CF9BFF0CD19EFF22BD8DFF00874C9800894E992DC5
98FF0CD09EFF1AD09FFFDFF8F1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFDFF8F1FF1AD09FFF0ACF9DFF24BE8FFF00884D99068B519638CA
A0FF0FD0A0FF09CC9AFF66DEBEFF80E3C8FF8DE5CCFFF2FCF9FFF2FCF9FF8DE5
CCFF80E3C8FF66DEBEFF09CC9BFF0CCE9EFF22BC8DFF00894D9606884E6A3BC5
9AF623D5AAFF00C997FF00C996FF00C894FF1CCB9CFFE5F9F3FFE5F9F3FF1CCB
9CFF00C894FF00C996FF00CA98FF18CEA1FF19B27FF60085496A006F332432B3
84D64AE0BCFF06CA9BFF00C898FF00C898FF1BCC9FFFE3F8F3FFE3F8F3FF1BCC
9FFF00C898FF00C899FF06CA9BFF26CA9EFF0AA068D600743B24000000011495
5C745AD3AFFB3CDFB9FF03C798FF00C698FF0AC89BFF67DCBFFF67DCBFFF0AC8
9BFF00C798FF03C89AFF22CDA3FF18B17EFB008C50740000000103834500006F
2D1133AA78A271E1C2FE4AE3C0FF0ECBA0FF01C598FF00C294FF00C394FF02C6
99FF0CC99EFF24CBA2FF1BB684FE029559A2007A3E1100854800000000000F88
49000078351532A774936AD5B3EF68E6C6FF47DFBCFF3BDAB6FF36D7B2FF32D2
ACFF2BC69BFF13AB77EF01935693008142150088490000000000000000000000
000000732D0000661C0A1691555434AD7BAE42BB8EF13EBB8EFF30B585FF1FAB
77F1099A60AE008B4B54007C3C0A008040000000000000000000
}
GlyphOldPlacement = False
InnerMargin = 0
ParentColor = False
Rounding.RoundX = 3
Rounding.RoundY = 3
RoundingDropDown.RoundX = 1
RoundingDropDown.RoundY = 1
TextApplyGlobalOpacity = False
MemoryUsage = bmuHighF
TabStop = True
OnPaintButton = BCButtonFocus1PaintButton
end
object BCButtonFocus3: TBCButtonFocus
Left = 8
Height = 30
Top = 112
Width = 125
AutoSize = True
StateClicked.Background.Gradient1.StartColor = 7726591
StateClicked.Background.Gradient1.EndColor = 7067903
StateClicked.Background.Gradient1.GradientType = gtLinear
StateClicked.Background.Gradient1.Point1XPercent = 50
StateClicked.Background.Gradient1.Point1YPercent = 100
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 100
StateClicked.Background.Gradient2.StartColor = 7067903
StateClicked.Background.Gradient2.EndColor = 8515583
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient1EndPercent = 50
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Color = 4170178
StateClicked.Border.LightColor = clGray
StateClicked.Border.LightOpacity = 100
StateClicked.Border.LightWidth = 1
StateClicked.Border.Style = bboSolid
StateClicked.FontEx.Color = clBlack
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Shadow = False
StateClicked.FontEx.ShadowRadius = 5
StateClicked.FontEx.ShadowOffsetX = 5
StateClicked.FontEx.ShadowOffsetY = 5
StateClicked.FontEx.Style = []
StateClicked.FontEx.PaddingLeft = 6
StateClicked.FontEx.PaddingRight = 6
StateHover.Background.Gradient1.StartColor = 12448254
StateHover.Background.Gradient1.EndColor = 8840446
StateHover.Background.Gradient1.GradientType = gtLinear
StateHover.Background.Gradient1.Point1XPercent = 50
StateHover.Background.Gradient1.Point1YPercent = 100
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 100
StateHover.Background.Gradient2.StartColor = 8840446
StateHover.Background.Gradient2.EndColor = 12908798
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient1EndPercent = 50
StateHover.Background.Style = bbsGradient
StateHover.Border.Color = 5362420
StateHover.Border.LightOpacity = 200
StateHover.Border.LightWidth = 1
StateHover.Border.Style = bboSolid
StateHover.FontEx.Color = clBlack
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Shadow = False
StateHover.FontEx.ShadowRadius = 5
StateHover.FontEx.ShadowOffsetX = 5
StateHover.FontEx.ShadowOffsetY = 5
StateHover.FontEx.Style = []
StateHover.FontEx.PaddingLeft = 6
StateHover.FontEx.PaddingRight = 6
StateNormal.Background.Gradient1.StartColor = clWhite
StateNormal.Background.Gradient1.EndColor = 15855597
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient2.StartColor = 13137169
StateNormal.Background.Gradient2.EndColor = 15722194
StateNormal.Background.Gradient2.GradientType = gtLinear
StateNormal.Background.Gradient2.Point1XPercent = 50
StateNormal.Background.Gradient2.Point1YPercent = 100
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 100
StateNormal.Background.Gradient1EndPercent = 100
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Color = 13816015
StateNormal.Border.LightWidth = 1
StateNormal.Border.Style = bboSolid
StateNormal.FontEx.Color = clBlack
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Shadow = False
StateNormal.FontEx.ShadowRadius = 5
StateNormal.FontEx.ShadowOffsetX = 5
StateNormal.FontEx.ShadowOffsetY = 5
StateNormal.FontEx.Style = []
StateNormal.FontEx.PaddingLeft = 6
StateNormal.FontEx.PaddingRight = 6
Caption = 'Autosized'
Color = clNone
DropDownWidth = 16
DropDownArrowSize = 8
GlobalOpacity = 255
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000000000000000
0000000000000000000000000007001C0D1E00381A3E003A1C46003A1C460038
1A3E001C0D1E0000000700000000000000000000000000000000000000000000
0000000000020027131C0062366903834FB10A9963E00D9E68EA0D9E68EA0A99
63E003834FB1006236690027131C000000020000000000000000000000000000
00010041212B01804BA912A774F523C393FF24D09FFF24D4A2FF24D4A2FF24D0
9FFF23C393FF12A773F501804BA90041212B000000010000000000FFFB00003E
1F22028751B31BB684FE24D2A2FF0CD69EFF02D599FF00D496FF00D496FF02D5
99FF0CD69EFF24D2A1FF1BB684FE028751B3003E1F2200FFFB000000000A007B
468518B07EFC22D3A3FF03D49AFF00D398FF0AD49BFF67E3BFFF67E3BFFF0AD4
9BFF00D398FF03D49AFF22D3A2FF18B07EFC007B46850000000A00552B31099C
66DB26CD9FFF06D39BFF00D199FF00D198FF1BD49FFFE3FAF3FFE3FAF3FF1BD4
9FFF00D198FF00D199FF06D39BFF26CD9EFF099C66DB00552C310079437419B1
7FF718D2A1FF00D098FF00CF96FF00CE94FF1CD19CFFE5F9F3FFE5F9F3FF1CD1
9CFF00CE94FF00CF96FF00D098FF18D2A1FF19B17FF70079437400874C9824BE
90FF0DD19EFF09CF9BFF66E0BEFF80E5C8FF8DE7CCFFF2FCF9FFF2FCF9FF8DE7
CCFF80E5C8FF66E0BEFF09CF9BFF0CD19EFF22BD8DFF00874C9800894E992DC5
98FF0CD09EFF1AD09FFFDFF8F1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFDFF8F1FF1AD09FFF0ACF9DFF24BE8FFF00884D99068B519638CA
A0FF0FD0A0FF09CC9AFF66DEBEFF80E3C8FF8DE5CCFFF2FCF9FFF2FCF9FF8DE5
CCFF80E3C8FF66DEBEFF09CC9BFF0CCE9EFF22BC8DFF00894D9606884E6A3BC5
9AF623D5AAFF00C997FF00C996FF00C894FF1CCB9CFFE5F9F3FFE5F9F3FF1CCB
9CFF00C894FF00C996FF00CA98FF18CEA1FF19B27FF60085496A006F332432B3
84D64AE0BCFF06CA9BFF00C898FF00C898FF1BCC9FFFE3F8F3FFE3F8F3FF1BCC
9FFF00C898FF00C899FF06CA9BFF26CA9EFF0AA068D600743B24000000011495
5C745AD3AFFB3CDFB9FF03C798FF00C698FF0AC89BFF67DCBFFF67DCBFFF0AC8
9BFF00C798FF03C89AFF22CDA3FF18B17EFB008C50740000000103834500006F
2D1133AA78A271E1C2FE4AE3C0FF0ECBA0FF01C598FF00C294FF00C394FF02C6
99FF0CC99EFF24CBA2FF1BB684FE029559A2007A3E1100854800000000000F88
49000078351532A774936AD5B3EF68E6C6FF47DFBCFF3BDAB6FF36D7B2FF32D2
ACFF2BC69BFF13AB77EF01935693008142150088490000000000000000000000
000000732D0000661C0A1691555434AD7BAE42BB8EF13EBB8EFF30B585FF1FAB
77F1099A60AE008B4B54007C3C0A008040000000000000000000
}
GlyphOldPlacement = False
InnerMargin = 0
ParentColor = False
Rounding.RoundX = 3
Rounding.RoundY = 3
RoundingDropDown.RoundX = 1
RoundingDropDown.RoundY = 1
TextApplyGlobalOpacity = False
MemoryUsage = bmuHighF
TabStop = True
OnPaintButton = BCButtonFocus1PaintButton
end
end

View File

@@ -0,0 +1,47 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
BCButtonFocus;
type
{ TForm1 }
TForm1 = class(TForm)
BCButtonFocus1: TBCButtonFocus;
BCButtonFocus2: TBCButtonFocus;
BCButtonFocus3: TBCButtonFocus;
procedure BCButtonFocus1PaintButton(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.BCButtonFocus1PaintButton(Sender: TObject);
var
button: TBCButtonFocus;
begin
button := TBCButtonFocus(Sender);
button.Canvas.Brush.Style := bsClear;
button.Canvas.Pen.Color := clRed;
if button.Focused then
button.Canvas.Rectangle(3, 3, button.Width-3, button.Height-3);
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<Title Value="project1"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes>
<Item Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
</RunParams>
<RequiredPackages>
<Item>
<PackageName Value="bgracontrols"/>
</Item>
<Item>
<PackageName Value="LCL"/>
</Item>
</RequiredPackages>
<Units>
<Unit>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
</Unit>
<Unit>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
</Unit>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions>
<Item>
<Name Value="EAbort"/>
</Item>
<Item>
<Name Value="ECodetoolError"/>
</Item>
<Item>
<Name Value="EFOpenError"/>
</Item>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,25 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
{$IFDEF HASAMIGA}
athreads,
{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,115 @@
object Form1: TForm1
Left = 285
Height = 240
Top = 31
Width = 320
Caption = 'Form1'
ClientHeight = 240
ClientWidth = 320
OnCreate = FormCreate
LCLVersion = '2.2.6.0'
object BCCheckComboBox1: TBCCheckComboBox
Left = 8
Height = 53
Top = 8
Width = 181
Caption = 'Channel Select'
Items.Strings = (
'Red'
'Green'
'Blue'
'Alpha'
)
ItemIndex = -1
ArrowSize = 8
ArrowWidth = 16
FocusBorderOpacity = 0
GlobalOpacity = 255
MemoryUsage = bmuHigh
Rounding.RoundX = 12
Rounding.RoundY = 12
StateClicked.Background.Gradient1.StartColor = 8404992
StateClicked.Background.Gradient1.EndColor = 4194304
StateClicked.Background.Gradient1.GradientType = gtRadial
StateClicked.Background.Gradient1.Point1XPercent = 50
StateClicked.Background.Gradient1.Point1YPercent = 100
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 0
StateClicked.Background.Gradient2.StartColor = clWhite
StateClicked.Background.Gradient2.EndColor = clBlack
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient1EndPercent = 100
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Style = bboNone
StateClicked.FontEx.Color = 16770790
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Shadow = True
StateClicked.FontEx.ShadowRadius = 2
StateClicked.FontEx.ShadowOffsetX = 1
StateClicked.FontEx.ShadowOffsetY = 1
StateClicked.FontEx.Style = [fsBold]
StateHover.Background.Gradient1.StartColor = 16744448
StateHover.Background.Gradient1.EndColor = 8404992
StateHover.Background.Gradient1.GradientType = gtRadial
StateHover.Background.Gradient1.Point1XPercent = 50
StateHover.Background.Gradient1.Point1YPercent = 100
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 0
StateHover.Background.Gradient2.StartColor = clWhite
StateHover.Background.Gradient2.EndColor = clBlack
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient1EndPercent = 100
StateHover.Background.Style = bbsGradient
StateHover.Border.Style = bboNone
StateHover.FontEx.Color = clWhite
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Shadow = True
StateHover.FontEx.ShadowRadius = 2
StateHover.FontEx.ShadowOffsetX = 1
StateHover.FontEx.ShadowOffsetY = 1
StateHover.FontEx.Style = [fsBold]
StateNormal.Background.Gradient1.StartColor = 4194304
StateNormal.Background.Gradient1.EndColor = 8405056
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient2.StartColor = 8405056
StateNormal.Background.Gradient2.EndColor = 4194304
StateNormal.Background.Gradient2.GradientType = gtRadial
StateNormal.Background.Gradient2.Point1XPercent = 50
StateNormal.Background.Gradient2.Point1YPercent = 100
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 0
StateNormal.Background.Gradient1EndPercent = 60
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Style = bboNone
StateNormal.FontEx.Color = 16770790
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Shadow = True
StateNormal.FontEx.ShadowRadius = 2
StateNormal.FontEx.ShadowOffsetX = 1
StateNormal.FontEx.ShadowOffsetY = 1
StateNormal.FontEx.Style = [fsBold]
StaticButton = False
TabOrder = 0
end
object Button1: TButton
Left = 200
Height = 25
Top = 8
Width = 75
Caption = 'Show'
OnClick = Button1Click
TabOrder = 1
end
end

View File

@@ -0,0 +1,57 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, CheckLst, StdCtrls,
BCCheckComboBox;
type
{ TForm1 }
TForm1 = class(TForm)
BCCheckComboBox1: TBCCheckComboBox;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
end;
procedure TForm1.Button1Click(Sender: TObject);
var
s: String = '';
i: integer;
begin
for i:=0 to BCCheckComboBox1.Items.Count-1 do
begin
if (BCCheckComboBox1.ListBox.Checked[i]) then
s += BCCheckComBoBox1.Items[i] + LineEnding;
end;
if (s = '') then
ShowMessage('No one is checked')
else
ShowMessage('Checked items: ' + LineEnding + s);
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="test_bccombobox"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_bccombobox.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bccombobox"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,22 @@
program test_bccombobox;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,180 @@
object Form1: TForm1
Left = 433
Height = 218
Top = 119
Width = 400
Caption = 'Form1'
ClientHeight = 218
ClientWidth = 400
DesignTimePPI = 120
OnCreate = FormCreate
LCLVersion = '2.0.2.0'
object BCComboBox1: TBCComboBox
Left = 10
Height = 49
Top = 10
Width = 184
Items.Strings = (
'One'
'Two'
'Three'
)
ItemIndex = 0
ArrowSize = 8
ArrowWidth = 16
DropDownBorderColor = 4194304
DropDownColor = 8405056
DropDownFontColor = 16770790
DropDownHighlight = 16744448
DropDownFontHighlight = clWhite
GlobalOpacity = 255
MemoryUsage = bmuHigh
Rounding.RoundX = 12
Rounding.RoundY = 12
StateClicked.Background.Gradient1.StartColor = 8404992
StateClicked.Background.Gradient1.EndColor = 4194304
StateClicked.Background.Gradient1.GradientType = gtRadial
StateClicked.Background.Gradient1.Point1XPercent = 50
StateClicked.Background.Gradient1.Point1YPercent = 100
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 0
StateClicked.Background.Gradient2.StartColor = clWhite
StateClicked.Background.Gradient2.EndColor = clBlack
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient1EndPercent = 100
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Style = bboNone
StateClicked.FontEx.Color = 16770790
StateClicked.FontEx.FontQuality = fqFineAntialiasing
StateClicked.FontEx.Height = 16
StateClicked.FontEx.Shadow = True
StateClicked.FontEx.ShadowRadius = 2
StateClicked.FontEx.ShadowOffsetX = 1
StateClicked.FontEx.ShadowOffsetY = 1
StateClicked.FontEx.Style = [fsBold]
StateHover.Background.Gradient1.StartColor = 16744448
StateHover.Background.Gradient1.EndColor = 8404992
StateHover.Background.Gradient1.GradientType = gtRadial
StateHover.Background.Gradient1.Point1XPercent = 50
StateHover.Background.Gradient1.Point1YPercent = 100
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 0
StateHover.Background.Gradient2.StartColor = clWhite
StateHover.Background.Gradient2.EndColor = clBlack
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient1EndPercent = 100
StateHover.Background.Style = bbsGradient
StateHover.Border.Style = bboNone
StateHover.FontEx.Color = clWhite
StateHover.FontEx.FontQuality = fqFineAntialiasing
StateHover.FontEx.Height = 16
StateHover.FontEx.Shadow = True
StateHover.FontEx.ShadowRadius = 2
StateHover.FontEx.ShadowOffsetX = 1
StateHover.FontEx.ShadowOffsetY = 1
StateHover.FontEx.Style = [fsBold]
StateNormal.Background.Gradient1.StartColor = 4194304
StateNormal.Background.Gradient1.EndColor = 8405056
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient2.StartColor = 8405056
StateNormal.Background.Gradient2.EndColor = 4194304
StateNormal.Background.Gradient2.GradientType = gtRadial
StateNormal.Background.Gradient2.Point1XPercent = 50
StateNormal.Background.Gradient2.Point1YPercent = 100
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 0
StateNormal.Background.Gradient1EndPercent = 60
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Style = bboNone
StateNormal.FontEx.Color = 16770790
StateNormal.FontEx.FontQuality = fqFineAntialiasing
StateNormal.FontEx.Height = 16
StateNormal.FontEx.Shadow = True
StateNormal.FontEx.ShadowRadius = 2
StateNormal.FontEx.ShadowOffsetX = 1
StateNormal.FontEx.ShadowOffsetY = 1
StateNormal.FontEx.Style = [fsBold]
StaticButton = False
OnChange = BCComboBox1Change
end
object Label1: TLabel
Left = 208
Height = 22
Top = 24
Width = 53
Caption = 'Waiting'
ParentColor = False
ParentFont = False
end
object Label2: TLabel
Left = 12
Height = 22
Top = 82
Width = 41
Caption = 'Style :'
ParentColor = False
ParentFont = False
end
object RadioFlash: TBGRAThemeRadioButton
Left = 8
Height = 22
Top = 152
Width = 69
Caption = 'Flash'
Checked = False
Theme = BGRAColorTheme1
OnChange = RadioButtonChange
end
object RadioWin7: TBGRAThemeRadioButton
Left = 8
Height = 22
Top = 128
Width = 66
Caption = 'Win7'
Checked = False
Theme = BGRAColorTheme1
OnChange = RadioButtonChange
end
object RadioCustom: TBGRAThemeRadioButton
Left = 8
Height = 22
Top = 176
Width = 86
Caption = 'Custom'
Checked = False
Theme = BGRAColorTheme1
OnChange = RadioButtonChange
end
object RadioDefault: TBGRAThemeRadioButton
Left = 8
Height = 22
Top = 104
Width = 86
Caption = 'Default'
Checked = True
Theme = BGRAColorTheme1
OnChange = RadioButtonChange
end
object BGRAColorTheme1: TBGRAColorTheme
ColorNormal = clBlack
ColorHover = 24576
ColorActive = clGreen
ColorDisabled = clGray
ColorFocused = clMoneyGreen
ColorText = clBlack
left = 240
top = 90
end
end

View File

@@ -0,0 +1,179 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, BCComboBox,
BCListBox, LCLType, BCSamples, BGRAThemeRadioButton, BGRAColorTheme, Types;
type
{ TForm1 }
TForm1 = class(TForm)
BCComboBox1: TBCComboBox;
BGRAColorTheme1: TBGRAColorTheme;
Label1: TLabel;
Label2: TLabel;
RadioCustom: TBGRAThemeRadioButton;
RadioFlash: TBGRAThemeRadioButton;
RadioWin7: TBGRAThemeRadioButton;
RadioDefault: TBGRAThemeRadioButton;
procedure BCComboBox1Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure RadioButtonChange(Sender: TObject);
private
procedure OnBCComboBoxDrawItem(Control: TWinControl; Index: integer;
ARect: TRect; State: TOwnerDrawState);
public
procedure ApplyFlashStyle;
procedure ApplyWin7Style;
procedure ApplyCustomStyle;
procedure ApplyDefaultStyle;
procedure UpdateStyle;
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
// Style drop down
//UpdateStyle;
end;
procedure TForm1.RadioButtonChange(Sender: TObject);
begin
UpdateStyle;
end;
procedure TForm1.BCComboBox1Change(Sender: TObject);
begin
Label1.Caption := 'Changed to '+BCComboBox1.Text;
end;
procedure TForm1.OnBCComboBoxDrawItem(Control: TWinControl; Index: integer;
ARect: TRect; State: TOwnerDrawState);
var
aCanvas: TCanvas;
s: String;
begin
aCanvas := BCComboBox1.Canvas;
s := BCComboBox1.Items[Index];
// selected item
if odChecked in State then s := '√ '+s;
if odSelected in State then
aCanvas.Brush.Color := clBlack
else
if odChecked in State then
aCanvas.Brush.Color := $505050
else
aCanvas.Brush.Color := clGray;
aCanvas.Font.Color := clWhite;
aCanvas.FillRect(ARect);
// mouse over
if odSelected in State then
begin
aCanvas.Pen.Style := psSolid;
aCanvas.Pen.Color := clRed;
aCanvas.Rectangle(ARect);
end;
// vertically centered text
aCanvas.TextRect(ARect, 15, ARect.Top +
(ARect.Height - aCanvas.GetTextHeight(s)) div 2, s);
end;
procedure TForm1.ApplyFlashStyle;
var
prevFontHeight: Integer;
begin
prevFontHeight := BCCombobox1.StateNormal.FontEx.Height;
StyleButtonsSample(BCComboBox1.Button, TBCSampleStyle.ssFlashPlayer);
BCCombobox1.StateNormal.FontEx.Height := prevFontHeight;
BCCombobox1.StateHover.FontEx.Height := prevFontHeight;
BCCombobox1.StateClicked.FontEx.Height := prevFontHeight;
BCComboBox1.DropDownColor := $606060;
BCComboBox1.DropDownFontColor := $c0c0c0;
BCComboBox1.DropDownBorderSize:= 2;
BCComboBox1.DropDownBorderColor:= $404040;
BCComboBox1.DropDownHighlight := $FC992E;
BCComboBox1.DropDownFontHighlight := clWhite;
BCComboBox1.OnDrawItem := nil;
end;
procedure TForm1.ApplyWin7Style;
var
prevFontHeight: Integer;
begin
prevFontHeight := BCCombobox1.StateNormal.FontEx.Height;
StyleButtonsSample(BCComboBox1.Button, TBCSampleStyle.ssWindows7);
BCCombobox1.StateNormal.FontEx.Height := prevFontHeight;
BCCombobox1.StateHover.FontEx.Height := prevFontHeight;
BCCombobox1.StateClicked.FontEx.Height := prevFontHeight;
BCComboBox1.DropDownColor := clWhite;
BCComboBox1.DropDownFontColor := clBlack;
BCComboBox1.DropDownBorderSize:= 1;
BCComboBox1.DropDownBorderColor:= clBlack;
BCComboBox1.DropDownHighlight := $FC992E;
BCComboBox1.DropDownFontHighlight := clWhite;
BCComboBox1.OnDrawItem := nil;
end;
procedure TForm1.ApplyCustomStyle;
var
prevFontHeight: Integer;
begin
prevFontHeight := BCCombobox1.StateNormal.FontEx.Height;
StyleButtonsSample(BCComboBox1.Button, TBCSampleStyle.ssMacOSXLion);
BCCombobox1.StateNormal.FontEx.Height := prevFontHeight;
BCCombobox1.StateHover.FontEx.Height := prevFontHeight;
BCCombobox1.StateClicked.FontEx.Height := prevFontHeight;
BCComboBox1.DropDownColor := clGray;
BCComboBox1.DropDownBorderSize:= 3;
BCComboBox1.DropDownBorderColor:= clGreen;
BCComboBox1.OnDrawItem := @OnBCComboBoxDrawItem;
Canvas.Font.Height := BCComboBox1.StateNormal.FontEx.Height;
BCComboBox1.ItemHeight := 2*Canvas.GetTextHeight('aq');
end;
procedure TForm1.ApplyDefaultStyle;
var
prevFontHeight: Integer;
begin
prevFontHeight := BCCombobox1.StateNormal.FontEx.Height;
StyleButtonsSample(BCComboBox1.Button, TBCSampleStyle.ssDefault);
BCCombobox1.StateNormal.FontEx.Height := prevFontHeight;
BCCombobox1.StateHover.FontEx.Height := prevFontHeight;
BCCombobox1.StateClicked.FontEx.Height := prevFontHeight;
BCComboBox1.DropDownBorderColor := $00400000;
BCComboBox1.DropDownBorderSize:= 1;
BCComboBox1.DropDownColor := $00804040;
BCComboBox1.DropDownFontColor := $00FFE6E6;
BCComboBox1.DropDownFontHighlight := clWhite;
BCComboBox1.DropDownHighlight := $00FF8000;
BCComboBox1.OnDrawItem := nil;
end;
procedure TForm1.UpdateStyle;
begin
if RadioWin7.Checked then ApplyWin7Style
else if RadioFlash.Checked then ApplyFlashStyle
else if RadioCustom.Checked then ApplyCustomStyle
else ApplyDefaultStyle;
end;
end.

View File

@@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="BGRA Controls Test"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<BuildModes Count="3">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="bctest"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
<StripSymbols Value="True"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Debug macOS 64">
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
</MacroValues>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="bctest"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
<TargetCPU Value="x86_64"/>
<TargetOS Value="darwin"/>
<Optimizations>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<StripSymbols Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
<SharedMatrixOptions Count="1">
<Item1 ID="568997487647" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
</SharedMatrixOptions>
</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>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="3">
<Unit0>
<Filename Value="bctest.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="ubctest.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
<Unit2>
<Filename Value="bcsamples.pas"/>
<IsPartOfProject Value="True"/>
</Unit2>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="bctest"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
<Optimizations>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<StripSymbols Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,22 @@
program bctest;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, ubctest, bcsamples
{ you can add units after this };
{$R *.res}
begin
Application.Title:='BGRA Controls Test';
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,180 @@
unit ubctest;
{$mode objfpc}{$H+}
interface
uses
Classes, Forms, Controls,
StdCtrls, types, LCLType, ExtCtrls,
BCButton, BCLabel, BCPanel, BGRAShape, BCSamples;
type
{ TForm1 }
TForm1 = class(TForm)
BCButton1: TBCButton;
BCButton2: TBCButton;
BCButton3: TBCButton;
BCButton4: TBCButton;
BCLabel1: TBCLabel;
BCPanel1: TBCPanel;
ComboBox1: TComboBox;
ListBox1: TListBox;
Shape1: TBGRAShape;
Shape10: TBGRAShape;
Shape11: TBGRAShape;
Shape12: TBGRAShape;
Shape13: TBGRAShape;
Shape14: TBGRAShape;
Shape15: TBGRAShape;
Shape16: TBGRAShape;
Shape17: TBGRAShape;
Shape18: TBGRAShape;
Shape19: TBGRAShape;
Shape2: TBGRAShape;
Shape20: TBGRAShape;
Shape21: TBGRAShape;
Shape22: TBGRAShape;
Shape23: TBGRAShape;
Shape24: TBGRAShape;
Shape25: TBGRAShape;
Shape26: TBGRAShape;
Shape3: TBGRAShape;
Shape4: TBGRAShape;
Shape5: TBGRAShape;
Shape6: TBGRAShape;
Shape7: TBGRAShape;
Shape8: TBGRAShape;
Shape9: TBGRAShape;
procedure FormCreate(Sender: TObject);
procedure ListDrawItem(Control: TWinControl; Index: integer;
ARect: TRect; State: TOwnerDrawState);
procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
procedure Shape23MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Shape2MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
Shape1.FillColor := clScheme1_Background;
Shape1.BorderColor := clScheme1_Selection;
Shape2.FillColor := clScheme2_Background;
Shape2.BorderColor := clScheme2_Selection;
Shape3.FillColor := clScheme3_Background;
Shape3.BorderColor := clScheme3_Selection;
Shape4.FillColor := clScheme4_Background;
Shape4.BorderColor := clScheme4_Selection;
Shape5.FillColor := clScheme5_Background;
Shape5.BorderColor := clScheme5_Selection;
Shape6.FillColor := clScheme6_Background;
Shape6.BorderColor := clScheme6_Selection;
Shape7.FillColor := clScheme7_Background;
Shape7.BorderColor := clScheme7_Selection;
Shape8.FillColor := clScheme8_Background;
Shape8.BorderColor := clScheme8_Selection;
Shape9.FillColor := clScheme9_Background;
Shape9.BorderColor := clScheme9_Selection;
Shape10.FillColor := clScheme10_Background;
Shape10.BorderColor := clScheme10_Selection;
Shape11.FillColor := clScheme11_Background;
Shape11.BorderColor := clScheme11_Selection;
Shape12.FillColor := clScheme12_Background;
Shape12.BorderColor := clScheme12_Selection;
Shape13.FillColor := clScheme13_Background;
Shape13.BorderColor := clScheme13_Selection;
Shape14.FillColor := clScheme14_Background;
Shape14.BorderColor := clScheme14_Selection;
Shape15.FillColor := clScheme15_Background;
Shape15.BorderColor := clScheme15_Selection;
Shape16.FillColor := clScheme16_Background;
Shape16.BorderColor := clScheme16_Selection;
Shape17.FillColor := clScheme17_Background;
Shape17.BorderColor := clScheme17_Selection;
Shape18.FillColor := clScheme18_Background;
Shape18.BorderColor := clScheme18_Selection;
Shape19.FillColor := clScheme19_Background;
Shape19.BorderColor := clScheme19_Selection;
Shape20.FillColor := clScheme20_Background;
Shape20.BorderColor := clScheme20_Selection;
Shape21.FillColor := clScheme21_Background;
Shape21.BorderColor := clScheme21_Selection;
Shape22.FillColor := clScheme22_Background;
Shape22.BorderColor := clScheme22_Selection;
Shape23.FillColor := clScheme23_Background;
Shape23.BorderColor := clScheme23_Selection;
Shape24.FillColor := clScheme24_Background;
Shape24.BorderColor := clScheme24_Selection;
Shape25.FillColor := clScheme25_Background;
Shape25.BorderColor := clScheme25_Selection;
BCSampleStyleStrList(ListBox1.Items);
BCSampleDrawingStrList(ComboBox1.Items);
end;
procedure TForm1.ListDrawItem(Control: TWinControl; Index: integer;
ARect: TRect; State: TOwnerDrawState);
begin
DrawItem(Control, Index, ARect, State, StrToTBCSampleDrawing(ComboBox1.Caption));
end;
procedure TForm1.ListBox1SelectionChange(Sender: TObject; User: boolean);
begin
StyleButtonsSample(Self, StrToTBCSampleStyle(ListBox1.GetSelectedText));
end;
procedure TForm1.Shape23MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
end;
procedure TForm1.Shape2MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
BCPanel1.Background.Color := TBGRAShape(Sender).FillColor;
Shape26.FillColor := TBGRAShape(Sender).BorderColor;
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="test_bcfilters"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<BuildModes Count="3">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcfilters"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Debug macOS 64">
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
</MacroValues>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcfilters"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
<TargetCPU Value="x86_64"/>
<TargetOS Value="darwin"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
<SharedMatrixOptions Count="1">
<Item1 ID="292867745768" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
</SharedMatrixOptions>
</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>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_bcfilters.lpr"/>
<IsPartOfProject Value="True"/>
</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="\"/>
<Target>
<Filename Value="test_bcfilters"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program test_bcfilters;
{$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.

View File

@@ -0,0 +1,150 @@
object Form1: TForm1
Left = 203
Height = 431
Top = 139
Width = 763
Caption = 'BCFilters'
ClientHeight = 431
ClientWidth = 763
DesignTimePPI = 72
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnDestroy = FormDestroy
LCLVersion = '1.9.0.0'
object vs1: TBGRAVirtualScreen
Left = 6
Height = 240
Top = 6
Width = 240
OnRedraw = vs1Redraw
Alignment = taLeftJustify
Color = clWhite
ParentColor = False
ParentFont = False
TabOrder = 0
end
object ListBox1: TListBox
Left = 258
Height = 240
Top = 6
Width = 120
ExtendedSelect = False
ItemHeight = 0
OnSelectionChange = ListBox1SelectionChange
ParentFont = False
TabOrder = 1
end
object ListBox2: TListBox
Left = 384
Height = 240
Top = 6
Width = 120
ExtendedSelect = False
ItemHeight = 0
OnSelectionChange = ListBox1SelectionChange
ParentFont = False
TabOrder = 2
end
object ListBox3: TListBox
Left = 510
Height = 240
Top = 6
Width = 120
ExtendedSelect = False
ItemHeight = 0
OnSelectionChange = ListBox1SelectionChange
ParentFont = False
TabOrder = 3
end
object ListBox4: TListBox
Left = 636
Height = 240
Top = 6
Width = 120
ExtendedSelect = False
ItemHeight = 0
OnSelectionChange = ListBox1SelectionChange
ParentFont = False
TabOrder = 4
end
object fs1: TFloatSpinEdit
Left = 6
Height = 24
Top = 252
Width = 242
DecimalPlaces = 5
Increment = 0.0001
MaxValue = 1
OnChange = fs1Change
ParentFont = False
TabOrder = 5
Value = 1
end
object fs2: TFloatSpinEdit
Left = 6
Height = 24
Top = 276
Width = 242
DecimalPlaces = 5
Increment = 0.0001
MaxValue = 1
OnChange = fs1Change
ParentFont = False
TabOrder = 6
Value = 0.98
end
object TrackBar1: TTrackBar
Left = 258
Height = 36
Top = 258
Width = 294
Max = 100
Min = 1
OnChange = fs1Change
Position = 100
ParentFont = False
ParentShowHint = False
TabOrder = 7
end
object TrackBar2: TTrackBar
Left = 258
Height = 36
Top = 306
Width = 294
Max = 100
Min = 1
OnChange = fs1Change
Position = 100
ParentFont = False
TabOrder = 8
end
object TrackBar3: TTrackBar
Left = 258
Height = 36
Top = 348
Width = 294
Max = 100
Min = 1
OnChange = fs1Change
Position = 100
ParentFont = False
TabOrder = 9
end
object TrackBar4: TTrackBar
Left = 258
Height = 36
Top = 384
Width = 294
Max = 255
OnChange = fs1Change
Position = 255
ParentFont = False
TabOrder = 10
end
object Timer1: TTimer
Interval = 100
OnTimer = Timer1Timer
Left = 198
Top = 54
end
end

View File

@@ -0,0 +1,128 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
ComCtrls, Spin, ExtCtrls, BCFilters, BGRAVirtualScreen, BGRABitmap,
BGRABitmapTypes, BCTypes, BGRATextFX, Math, BCEffect;
type
{ TForm1 }
TForm1 = class(TForm)
fs1: TFloatSpinEdit;
fs2: TFloatSpinEdit;
ListBox1: TListBox;
ListBox2: TListBox;
ListBox3: TListBox;
ListBox4: TListBox;
Timer1: TTimer;
TrackBar1: TTrackBar;
TrackBar2: TTrackBar;
TrackBar3: TTrackBar;
TrackBar4: TTrackBar;
vs1: TBGRAVirtualScreen;
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure fs1Change(Sender: TObject);
procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
procedure Timer1Timer(Sender: TObject);
procedure vs1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
private
{ private declarations }
public
{ public declarations }
Fade: TFading;
Image: TBGRABitmap;
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
Image := TBGRABitmap.Create(Application.Location + 'Penguins.jpg');
BCSimpleFilterStrList(ListBox1.Items);
BCSimpleFilterStrList(ListBox2.Items);
BCSimpleFilterStrList(ListBox3.Items);
BCSimpleFilterStrList(ListBox4.Items);
ListBox1.Selected[20] := True;
ListBox2.Selected[21] := True;
ListBox3.Selected[5] := True;
ListBox4.Selected[0] := True;
Fade.Mode := fmFadeOut;
Fade.Step := 15;
Fade.Reset;
end;
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
Timer1.Enabled := False;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
Image.Free;
end;
procedure TForm1.fs1Change(Sender: TObject);
begin
vs1.RedrawBitmap;
end;
procedure TForm1.ListBox1SelectionChange(Sender: TObject; User: boolean);
begin
vs1.RedrawBitmap;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
//fs1.Value := fs1.Value + 0.0002;
fs2.Value := fs2.Value + 0.0002;
if (fs2.Value = 1) {and (fs1.Value = 1)} then
Timer1.Enabled:=False;
end;
procedure TForm1.vs1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
var
tmp: TBGRABitmap;
begin
Bitmap.BlendImageOver(0, 0, Image, boTransparent, TrackBar4.Position);
tmp := TextShadow(vs1.Width, vs1.Height, 'Penguin TELEPORT project', 20, BGRA(255,255,255,200), BGRABlack, 1, 1, 2) as TBGRABitmap;
Bitmap.BlendImage(RandomRange(0,1), RandomRange(vs1.Height div 2 - 40,vs1.Height div 2 - 38), tmp, boLinearBlend);
tmp.Free;
{ Apply filter 1 }
SimpleFilter(Bitmap, StrToTBCSimpleFilter(ListBox1.GetSelectedText));
{ Apply filter 2 }
SimpleFilter(Bitmap, StrToTBCSimpleFilter(ListBox2.GetSelectedText));
{ Apply filter 3 }
SimpleFilter(Bitmap, StrToTBCSimpleFilter(ListBox3.GetSelectedText));
{ Apply filter 4 }
SimpleFilter(Bitmap, StrToTBCSimpleFilter(ListBox4.GetSelectedText));
// Fade Out the black rectangle
Bitmap.FillRect(0, 0, vs1.Width, vs1.Height, BGRA(0, 0, 0, Fade.Execute), dmFastBlend);
FilterRGB(Bitmap, TrackBar1.Position, TrackBar2.Position, TrackBar3.Position);
{ Weird thing }
Zoomy(Bitmap,fs1.Value,fs2.Value);
end;
end.

View File

@@ -0,0 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="test_bcgamegrid"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<BuildModes Count="3">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcgamegrid"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
<StripSymbols Value="True"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Debug macOS 64">
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
</MacroValues>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcgamegrid"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
<TargetCPU Value="x86_64"/>
<TargetOS Value="darwin"/>
<Optimizations>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<StripSymbols Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
<SharedMatrixOptions Count="1">
<Item1 ID="347006526914" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
</SharedMatrixOptions>
</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>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_bcgamegrid.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcgamegrid"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
<Optimizations>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<StripSymbols Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program test_bcgamegrid;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,39 @@
object Form1: TForm1
Left = 348
Height = 516
Top = 49
Width = 614
Caption = 'Form1'
ClientHeight = 516
ClientWidth = 614
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnKeyDown = FormKeyDown
LCLVersion = '1.1'
object BCGameGrid2: TBCGameGrid
Left = 6
Height = 508
Top = 8
Width = 608
GridWidth = 6
GridHeight = 6
BlockWidth = 60
BlockHeight = 50
OnRenderControl = BCGameGrid2RenderControl
OnClickControl = BCGameGrid2ClickControl
OnMouseDown = BCGameGrid2MouseDown
OnMouseMove = BCGameGrid2MouseMove
OnMouseUp = BCGameGrid2MouseUp
OnMouseEnter = BCGameGrid2MouseEnter
OnMouseLeave = BCGameGrid2MouseLeave
OnMouseWheel = BCGameGrid2MouseWheel
OnMouseWheelDown = BCGameGrid2MouseWheelDown
OnMouseWheelUp = BCGameGrid2MouseWheelUp
end
object Timer1: TTimer
Interval = 33
OnTimer = Timer1Timer
left = 40
top = 24
end
end

View File

@@ -0,0 +1,213 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, Forms, Graphics, SysUtils, BCGameGrid, BGRABitmap,
BGRABitmapTypes, types, Controls, Dialogs, ExtCtrls, LCLType, BCEffect;
type
{ TForm1 }
TForm1 = class(TForm)
BCGameGrid2: TBCGameGrid;
Timer1: TTimer;
procedure BCGameGrid2ClickControl(Sender: TObject; n, x, y: integer);
procedure BCGameGrid2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
procedure BCGameGrid2MouseEnter(Sender: TObject);
procedure BCGameGrid2MouseLeave(Sender: TObject);
procedure BCGameGrid2MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: integer);
procedure BCGameGrid2MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
procedure BCGameGrid2MouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: integer; MousePos: TPoint; var Handled: boolean);
procedure BCGameGrid2MouseWheelDown(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: boolean);
procedure BCGameGrid2MouseWheelUp(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: boolean);
procedure BCGameGrid2RenderControl(Sender: TObject; Bitmap: TBGRABitmap;
r: TRect; n, x, y: integer);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormCreate(Sender: TObject);
procedure FormHide(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: word; Shift: TShiftState);
procedure Timer1Timer(Sender: TObject);
private
procedure SetFSelected(AValue: integer);
{ private declarations }
public
{ public declarations }
FSelected: integer;
Fade: TFading;
property Selected: integer read FSelected write SetFSelected;
end;
var
Form1: TForm1;
const
L1 = VK_LEFT;
R1 = VK_RIGHT;
U1 = VK_UP;
D1 = VK_DOWN;
L2 = VK_A;
R2 = VK_D;
U2 = VK_W;
D2 = VK_S;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.BCGameGrid2RenderControl(Sender: TObject; Bitmap: TBGRABitmap;
r: TRect; n, x, y: integer);
var
cr, cg, cb, ca: byte;
bmp: TBGRABitmap;
begin
cr := Random(100);
cg := Random(100);
cb := Random(255);
ca := Random(100);
// selected
if Selected = n then
begin
ca := 255;
Bitmap.FillRect(r, BGRA(0, 0, 255, Fade.Execute), dmSet);
end
// colors
else
begin
Bitmap.FillRect(r, BGRA(cr, cg, cb, ca), dmSet);
Bitmap.Rectangle(r, BGRA(100, 100, 100, ca), dmDrawWithTransparency);
end;
// text
Bitmap.TextRect(r, concat('n', IntToStr(n), ',x', IntToStr(x), ',y', IntToStr(y)),
taCenter, tlCenter, BGRA(0, 0, 0, ca));
// crazy effect
if n = BCGameGrid2.GridWidth * BCGameGrid2.GridHeight -1 then { remove this if you want to see the original thing... }
if Odd(n) then { this is for improve speed... }
begin
bmp := Bitmap.FilterBlurRadial(1, rbFast) as TBGRABitmap;
Bitmap.BlendImage(Random(4), Random(4), bmp, boLinearBlend);
bmp.Free;
end;
end;
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: boolean);
begin
Timer1.Enabled := False;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Fade.Mode := fmFadeInOut;
Fade.Step := 17;
Fade.Reset;
end;
procedure TForm1.FormHide(Sender: TObject);
begin
end;
procedure TForm1.FormKeyDown(Sender: TObject; var Key: word; Shift: TShiftState);
begin
if (Key = L1) or (Key = L2) then
Selected := Selected - 1
else if (Key = R1) or (Key = R2) then
Selected := Selected + 1
else if (Key = U1) or (Key = U2) then
Selected := Selected - BCGameGrid2.GridWidth
else if (Key = D1) or (Key = D2) then
Selected := Selected + BCGameGrid2.GridWidth;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
BCGameGrid2.RenderAndDrawControl;
end;
procedure TForm1.SetFSelected(AValue: integer);
begin
if FSelected = AValue then
Exit;
FSelected := AValue;
end;
procedure TForm1.BCGameGrid2ClickControl(Sender: TObject; n, x, y: integer);
begin
Selected := n;
end;
procedure TForm1.BCGameGrid2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
begin
{if Button = mbLeft then
...}
end;
procedure TForm1.BCGameGrid2MouseEnter(Sender: TObject);
begin
//ShowMessage('Enter');
end;
procedure TForm1.BCGameGrid2MouseLeave(Sender: TObject);
begin
//ShowMessage('Leave');
end;
procedure TForm1.BCGameGrid2MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: integer);
begin
{if ssLeft in Shift then
...}
end;
procedure TForm1.BCGameGrid2MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
begin
{if ssLeft in Shift then
...}
end;
procedure TForm1.BCGameGrid2MouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: integer; MousePos: TPoint; var Handled: boolean);
begin
//ShowMessage('Wheeeeel!');
end;
procedure TForm1.BCGameGrid2MouseWheelDown(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: boolean);
begin
{ Decrease grid }
BCGameGrid2.GridWidth := BCGameGrid2.GridWidth - 1;
BCGameGrid2.GridHeight := BCGameGrid2.GridHeight - 1;
end;
procedure TForm1.BCGameGrid2MouseWheelUp(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: boolean);
begin
{ Increase grid }
BCGameGrid2.GridWidth := BCGameGrid2.GridWidth + 1;
BCGameGrid2.GridHeight := BCGameGrid2.GridHeight + 1;
end;
end.

View File

@@ -0,0 +1,16 @@
object BCImageButton5: TBCImageButton
Left = 32
Height = 55
Top = 269
Width = 275
Anchors = [akTop, akLeft, akRight]
BitmapFile = 'D:\repositorios\bgracontrols\test\test_bcimagebutton\sample_5.png'
BitmapOptions.AutoDetectRepeat = True
BitmapOptions.MarginTop = 4
BitmapOptions.MarginRight = 4
BitmapOptions.MarginBottom = 4
BitmapOptions.MarginLeft = 4
BitmapOptions.Direction = sdVertical
Caption = 'BCImageButton5'
ParentFont = False
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,188 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="test"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<BuildModes Count="3">
<Item1 Name="Debug" Default="True"/>
<Item2 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
<StripSymbols Value="True"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Debug macOS 64">
<MacroValues Count="1">
<Macro1 Name="LCLWidgetType" Value="cocoa"/>
</MacroValues>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
<TargetCPU Value="x86_64"/>
<TargetOS Value="darwin"/>
<Optimizations>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<StripSymbols Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
<SharedMatrixOptions Count="1">
<Item1 ID="565344327308" Modes="Debug macOS 64" Type="IDEMacro" MacroName="LCLWidgetType" Value="cocoa"/>
</SharedMatrixOptions>
</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>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test.lpr"/>
<IsPartOfProject Value="True"/>
</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="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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>
<Optimizations>
<VariablesInRegisters Value="True"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<StripSymbols Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program test;
{$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.

View File

@@ -0,0 +1,106 @@
object Form1: TForm1
Left = 214
Height = 403
Top = 122
Width = 331
Caption = 'Form1'
ClientHeight = 403
ClientWidth = 331
Color = clWhite
OnCreate = FormCreate
LCLVersion = '2.0.4.0'
object BCImageButton1: TBCImageButton
Left = 32
Height = 55
Top = 16
Width = 275
AlphaTest = False
Anchors = [akTop, akLeft, akRight]
Animation = False
BitmapFile = 'sample_1.png'
BitmapOptions.AutoDetectRepeat = True
BitmapOptions.MarginTop = 4
BitmapOptions.MarginRight = 4
BitmapOptions.MarginBottom = 2
BitmapOptions.MarginLeft = 2
BitmapOptions.Direction = sdVertical
Caption = 'BCImageButton1'
OnClick = BCImageButton1Click
ParentFont = False
end
object BCImageButton2: TBCImageButton
Left = 32
Height = 55
Top = 79
Width = 275
AlphaTest = False
Anchors = [akTop, akLeft, akRight]
BitmapFile = 'sample_2.png'
BitmapOptions.Direction = sdVertical
BitmapOptions.Proportional = True
ParentFont = False
end
object BCImageButton3: TBCImageButton
Left = 32
Height = 55
Top = 143
Width = 275
Anchors = [akTop, akLeft, akRight]
BitmapFile = 'sample_3.png'
BitmapOptions.AutoDetectRepeat = True
BitmapOptions.RepeatMiddleHorizontal = True
BitmapOptions.RepeatMiddleVertical = True
BitmapOptions.MarginTop = 2
BitmapOptions.MarginRight = 2
BitmapOptions.MarginBottom = 2
BitmapOptions.MarginLeft = 2
BitmapOptions.Direction = sdVertical
BitmapOptions.ResampleMode = rmSimpleStretch
Caption = 'BCImageButton3'
ParentFont = False
end
object BCImageButton4: TBCImageButton
Left = 32
Height = 55
Top = 205
Width = 275
Anchors = [akTop, akLeft, akRight]
BitmapFile = 'sample_4.png'
BitmapOptions.AutoDetectRepeat = True
BitmapOptions.MarginTop = 5
BitmapOptions.MarginRight = 5
BitmapOptions.MarginBottom = 5
BitmapOptions.MarginLeft = 5
BitmapOptions.Direction = sdVertical
BitmapOptions.ResampleMode = rmSimpleStretch
Caption = 'BCImageButton4'
ParentFont = False
end
object BCImageButton5: TBCImageButton
Left = 32
Height = 55
Top = 269
Width = 275
Anchors = [akTop, akLeft, akRight]
BitmapFile = 'sample_5.png'
BitmapOptions.AutoDetectRepeat = True
BitmapOptions.MarginTop = 4
BitmapOptions.MarginRight = 4
BitmapOptions.MarginBottom = 4
BitmapOptions.MarginLeft = 4
BitmapOptions.Direction = sdVertical
Caption = 'BCImageButton5'
ParentFont = False
end
object BCImageButton6: TBCImageButton
Left = 32
Height = 55
Top = 333
Width = 275
Anchors = [akTop, akLeft, akRight]
Animation = False
BitmapOptions.Direction = sdVertical
Caption = 'BCImageButton6'
ParentFont = False
end
end

View File

@@ -0,0 +1,68 @@
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Forms, Graphics,
BCImageButton, BGRABitmap,
BCFilters, BCButton, Classes;
type
{ TForm1 }
TForm1 = class(TForm)
BCImageButton1: TBCImageButton;
BCImageButton2: TBCImageButton;
BCImageButton3: TBCImageButton;
BCImageButton4: TBCImageButton;
BCImageButton5: TBCImageButton;
BCImageButton6: TBCImageButton;
procedure BCImageButton1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
BCImageButton1.BitmapFile := Application.Location + BCImageButton1.BitmapFile;
BCImageButton2.BitmapFile := Application.Location + BCImageButton2.BitmapFile;
BCImageButton3.BitmapFile := Application.Location + BCImageButton3.BitmapFile;
BCImageButton4.BitmapFile := Application.Location + BCImageButton4.BitmapFile;
BCImageButton5.BitmapFile := Application.Location + BCImageButton5.BitmapFile;
BCImageButton6.BitmapFile := Application.Location + BCImageButton6.BitmapFile;
BCImageButton1.LoadFromBitmapFile;
BCImageButton2.LoadFromBitmapFile;
BCImageButton2.TextVisible := False;
BCImageButton3.LoadFromBitmapFile;
BCImageButton4.LoadFromBitmapFile;
BCImageButton5.LoadFromBitmapFile;
GrayScale(BCImageButton1.BitmapOptions.Bitmap);
BCImageButton5.SaveToFile('button.bcimagebutton');
BCImageButton6.AssignFromFile('button.bcimagebutton');
end;
procedure TForm1.BCImageButton1Click(Sender: TObject);
begin
BCImageButton1.Assign(BCImageButton2);
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="test_drawing"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Resources Count="1">
<Resource_0 FileName="boton3d.png" Type="RCDATA" ResourceName="BOTON3D"/>
</Resources>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_drawing.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="frmMain"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_drawing"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program test_drawing;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TfrmMain, frmMain);
Application.Run;
end.

View File

@@ -0,0 +1,45 @@
object frmMain: TfrmMain
Left = 354
Height = 353
Top = 146
Width = 491
Caption = 'Test Drawing'
ClientHeight = 353
ClientWidth = 491
Color = clSilver
DesignTimePPI = 120
OnCreate = FormCreate
LCLVersion = '1.8.4.0'
object BCImageButton1: TBCImageButton
Left = 8
Height = 137
Top = 8
Width = 188
BitmapOptions.MarginTop = 9
BitmapOptions.MarginRight = 13
BitmapOptions.MarginBottom = 15
BitmapOptions.MarginLeft = 13
BitmapOptions.Direction = sdVertical
Caption = 'Button'
Font.Height = 30
ParentFont = False
ParentShowHint = False
end
object BCImageButton2: TBCImageButton
Left = 208
Height = 137
Top = 8
Width = 188
BitmapOptions.MarginTop = 9
BitmapOptions.MarginRight = 13
BitmapOptions.MarginBottom = 15
BitmapOptions.MarginLeft = 13
BitmapOptions.Direction = sdVertical
Caption = 'Toggle Button'
Font.Height = 30
ParentFont = False
ParentShowHint = False
Toggle = True
Pressed = True
end
end

View File

@@ -0,0 +1,41 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
BCImageButton;
type
{ TfrmMain }
TfrmMain = class(TForm)
BCImageButton1: TBCImageButton;
BCImageButton2: TBCImageButton;
procedure FormCreate(Sender: TObject);
private
public
end;
var
frmMain: TfrmMain;
implementation
{$R *.lfm}
{ TfrmMain }
procedure TfrmMain.FormCreate(Sender: TObject);
begin
BCImageButton1.LoadFromBitmapResource('boton3d');
BCImageButton2.LoadFromBitmapResource('boton3d');
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="test"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Resources Count="3">
<Resource_0 FileName="button.png" Type="RCDATA" ResourceName="BUTTON"/>
<Resource_1 FileName="button2.png" Type="RCDATA" ResourceName="BUTTON2"/>
<Resource_2 FileName="title_bath3.gif" Type="RCDATA" ResourceName="TITLE_BATH3"/>
</Resources>
</General>
<BuildModes Count="3">
<Item1 Name="Default" Default="True"/>
<Item2 Name="Debug">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,22 @@
program test;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

View File

@@ -0,0 +1 @@
https://polycount.com/discussion/comment/1966572/#Comment_1966572

View File

@@ -0,0 +1,66 @@
object Form1: TForm1
Left = 397
Height = 240
Top = 119
Width = 320
Caption = 'My Epic Game Title Screen'
ClientHeight = 240
ClientWidth = 320
OnCreate = FormCreate
LCLVersion = '2.1.0.0'
object BGRASpriteAnimation1: TBGRASpriteAnimation
Left = 0
Height = 240
Top = 0
Width = 320
AnimInvert = False
AnimPosition = 1
AnimRepeat = 0
AnimRepeatLap = 0
AnimSpeed = 1000
AnimStatic = False
AutoSize = False
Center = True
Proportional = True
SpriteCount = 1
SpriteFillOpacity = 255
SpriteFlipMode = flNone
SpriteKeyColor = clNone
SpriteResampleFilter = rfLinear
SpriteResampleMode = rmSimpleStretch
SpriteRotation = rtNone
Stretch = True
Tile = False
Align = alClient
Caption = 'BGRASpriteAnimation1'
end
object BCImageButton1: TBCImageButton
Left = 184
Height = 128
Top = 104
Width = 128
Anchors = [akRight, akBottom]
Animation = False
BitmapFile = 'BUTTON'
BitmapOptions.Direction = sdVertical
Caption = 'Start'
Font.Color = clWhite
Font.Height = 30
OnMouseMove = BCImageButton1MouseMove
ParentFont = False
end
object BCImageButton2: TBCImageButton
Left = 48
Height = 128
Top = 8
Width = 128
AlphaTestValue = 100
Animation = False
BitmapFile = 'BUTTON2'
BitmapOptions.Direction = sdVertical
Font.Color = clWhite
Font.Height = 30
OnMouseMove = BCImageButton1MouseMove
ParentFont = False
end
end

View File

@@ -0,0 +1,51 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
BCImageButton, BGRASpriteAnimation;
type
{ TForm1 }
TForm1 = class(TForm)
BCImageButton1: TBCImageButton;
BCImageButton2: TBCImageButton;
BGRASpriteAnimation1: TBGRASpriteAnimation;
procedure BCImageButton1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure FormCreate(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
BCImageButton1.LoadFromBitmapResource(BCImageButton1.BitmapFile);
BCImageButton2.LoadFromBitmapResource(BCImageButton2.BitmapFile);
BGRASpriteAnimation1.LoadFromBitmapResource('TITLE_BATH3');
end;
procedure TForm1.BCImageButton1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="test"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
<Resources Count="1">
<Resource_0 FileName="toggle.png" Type="RCDATA" ResourceName="TOGGLE"/>
</Resources>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,22 @@
program test;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,33 @@
object Form1: TForm1
Left = 374
Height = 240
Top = 149
Width = 320
Caption = 'Toggle'
ClientHeight = 240
ClientWidth = 320
OnCreate = FormCreate
LCLVersion = '2.1.0.0'
object BCImageButton1: TBCImageButton
Cursor = crHandPoint
Left = 15
Height = 28
Top = 15
Width = 57
AlphaTest = False
BitmapFile = 'TOGGLE'
BitmapOptions.Direction = sdVertical
Toggle = True
end
object BCImageButton2: TBCImageButton
Cursor = crHandPoint
Left = 15
Height = 52
Top = 56
Width = 100
AlphaTest = False
BitmapFile = 'TOGGLE'
BitmapOptions.Direction = sdVertical
Toggle = True
end
end

View File

@@ -0,0 +1,40 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, BCImageButton;
type
{ TForm1 }
TForm1 = class(TForm)
BCImageButton1: TBCImageButton;
BCImageButton2: TBCImageButton;
procedure FormCreate(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
BCImageButton1.LoadFromBitmapResource(BCImageButton1.BitmapFile);
BCImageButton2.LoadFromBitmapResource(BCImageButton2.BitmapFile);
end;
end.

View File

@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="test_bckeyboard"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes Count="3">
<Item1 Name="Default" Default="True"/>
<Item2 Name="Debug">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bckeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bckeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_bckeyboard.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bckeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,21 @@
program test_bckeyboard;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,42 @@
object Form1: TForm1
Left = 462
Height = 240
Top = 146
Width = 320
Caption = 'BC Keyboard'
ClientHeight = 240
ClientWidth = 320
OnShow = FormShow
LCLVersion = '1.7'
object BCDPanel1: TBCDPanel
Left = 0
Height = 240
Top = 0
Width = 320
Align = alClient
Alignment = taLeftJustify
Caption = 'BCDPanel1'
ClientHeight = 240
ClientWidth = 320
TabOrder = 0
object Edit1: TBCDEdit
Left = 1
Height = 28
Top = 1
Width = 318
Align = alTop
DrawStyle = dsDefault
end
end
object BCKeyboard1: TBCKeyboard
ThemeManager = BCDefaultThemeManager1
left = 40
top = 16
end
object BCDefaultThemeManager1: TBCDefaultThemeManager
BCStyle = ssFlashPlayer
CDStyle = dsDefault
left = 127
top = 96
end
end

View File

@@ -0,0 +1,46 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Forms, BCKeyboard, BCDefaultThemeManager, BGRACustomDrawn;
type
{ TForm1 }
TForm1 = class(TForm)
BCDefaultThemeManager1: TBCDefaultThemeManager;
BCDPanel1: TBCDPanel;
BCKeyboard1: TBCKeyboard;
Edit1: TBCDEdit;
procedure FormShow(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormShow(Sender: TObject);
begin
BCDefaultThemeManager1.Apply();
BCKeyboard1.PanelsColor := $00535353;
BCKeyboard1.Panel.Left := 0;
BCKeyboard1.Panel.Top := Edit1.Height + 2;
BCKeyboard1.Show();
Form1.Width := BCKeyboard1.Panel.Width;
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<Title Value="test_bclistboxex"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<BuildModes>
<Item Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
</RunParams>
<RequiredPackages>
<Item>
<PackageName Value="bgracontrols"/>
</Item>
<Item>
<PackageName Value="LCL"/>
</Item>
</RequiredPackages>
<Units>
<Unit>
<Filename Value="test_bclistboxex.lpr"/>
<IsPartOfProject Value="True"/>
</Unit>
<Unit>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bclistboxex"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions>
<Item>
<Name Value="EAbort"/>
</Item>
<Item>
<Name Value="ECodetoolError"/>
</Item>
<Item>
<Name Value="EFOpenError"/>
</Item>
</Exceptions>
</Debugging>
</CONFIG>

View File

@@ -0,0 +1,25 @@
program test_bclistboxex;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
{$IFDEF HASAMIGA}
athreads,
{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,18 @@
object Form1: TForm1
Left = 368
Height = 694
Top = 119
Width = 807
Caption = 'Form1'
ClientHeight = 694
ClientWidth = 807
OnCreate = FormCreate
LCLVersion = '2.1.0.0'
object BCListBoxEx1: TBCListBoxEx
Left = 0
Height = 694
Top = 0
Width = 807
Align = alClient
end
end

View File

@@ -0,0 +1,49 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, BCListBoxEx,
BCTrackbarupdown;
type
{ TForm1 }
TForm1 = class(TForm)
BCListBoxEx1: TBCListBoxEx;
procedure FormCreate(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
with BCListBoxEx1 do
begin
items.Add('Argentina');
items.Add('Brasil');
items.Add('Paraguay');
items.Add('Uruguay');
items.Add('Chile');
items.Add('Bolivia');
items.Add('Peru');
items.Add('Ecuador');
end;
end;
end.

View File

@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="BC Numeric Keyboard"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes Count="3">
<Item1 Name="Default" Default="True"/>
<Item2 Name="Debug">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_bcnumerickeyboard.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,22 @@
program test_bcnumerickeyboard;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
Application.Title:='BC Numeric Keyboard';
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,439 @@
object Form1: TForm1
Left = 442
Height = 240
Top = 143
Width = 516
Caption = 'BC Numeric Keyboard'
ClientHeight = 240
ClientWidth = 516
OnCreate = FormCreate
LCLVersion = '1.7'
object BCPanel1: TBCPanel
Left = 0
Height = 240
Top = 0
Width = 516
Align = alClient
Background.Color = clBtnFace
Background.ColorOpacity = 255
Background.Gradient1.StartColor = clWhite
Background.Gradient1.StartColorOpacity = 255
Background.Gradient1.DrawMode = dmSet
Background.Gradient1.EndColor = 16119285
Background.Gradient1.EndColorOpacity = 255
Background.Gradient1.ColorCorrection = True
Background.Gradient1.GradientType = gtLinear
Background.Gradient1.Point1XPercent = 0
Background.Gradient1.Point1YPercent = 0
Background.Gradient1.Point2XPercent = 0
Background.Gradient1.Point2YPercent = 100
Background.Gradient1.Sinus = False
Background.Gradient2.StartColor = 15722194
Background.Gradient2.StartColorOpacity = 255
Background.Gradient2.DrawMode = dmSet
Background.Gradient2.EndColor = 13137169
Background.Gradient2.EndColorOpacity = 255
Background.Gradient2.ColorCorrection = True
Background.Gradient2.GradientType = gtLinear
Background.Gradient2.Point1XPercent = 0
Background.Gradient2.Point1YPercent = 0
Background.Gradient2.Point2XPercent = 0
Background.Gradient2.Point2YPercent = 100
Background.Gradient2.Sinus = False
Background.Gradient1EndPercent = 100
Background.Style = bbsGradient
BevelInner = bvNone
BevelOuter = bvNone
BevelWidth = 1
Border.Color = clBlack
Border.ColorOpacity = 255
Border.LightColor = clWhite
Border.LightOpacity = 255
Border.LightWidth = 0
Border.Style = bboNone
Border.Width = 1
BorderBCStyle = bpsBorder
FontEx.Color = clDefault
FontEx.EndEllipsis = False
FontEx.FontQuality = fqSystemClearType
FontEx.Height = 0
FontEx.SingleLine = True
FontEx.Shadow = False
FontEx.ShadowColor = clBlack
FontEx.ShadowColorOpacity = 255
FontEx.ShadowRadius = 5
FontEx.ShadowOffsetX = 5
FontEx.ShadowOffsetY = 5
FontEx.Style = []
FontEx.TextAlignment = bcaCenter
FontEx.WordBreak = False
Rounding.RoundX = 1
Rounding.RoundY = 1
Rounding.RoundOptions = []
TabOrder = 0
OnClick = FormClick
object Button1: TBCButton
Left = 8
Height = 28
Top = 8
Width = 63
StateClicked.Background.Color = clBlack
StateClicked.Background.ColorOpacity = 255
StateClicked.Background.Gradient1.StartColor = 7726591
StateClicked.Background.Gradient1.StartColorOpacity = 255
StateClicked.Background.Gradient1.DrawMode = dmSet
StateClicked.Background.Gradient1.EndColor = 7067903
StateClicked.Background.Gradient1.EndColorOpacity = 255
StateClicked.Background.Gradient1.ColorCorrection = True
StateClicked.Background.Gradient1.GradientType = gtLinear
StateClicked.Background.Gradient1.Point1XPercent = 0
StateClicked.Background.Gradient1.Point1YPercent = 0
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 100
StateClicked.Background.Gradient1.Sinus = False
StateClicked.Background.Gradient2.StartColor = 7067903
StateClicked.Background.Gradient2.StartColorOpacity = 255
StateClicked.Background.Gradient2.DrawMode = dmSet
StateClicked.Background.Gradient2.EndColor = 8515583
StateClicked.Background.Gradient2.EndColorOpacity = 255
StateClicked.Background.Gradient2.ColorCorrection = True
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient2.Sinus = False
StateClicked.Background.Gradient1EndPercent = 50
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Color = 4170178
StateClicked.Border.ColorOpacity = 255
StateClicked.Border.LightColor = clGray
StateClicked.Border.LightOpacity = 100
StateClicked.Border.LightWidth = 1
StateClicked.Border.Style = bboSolid
StateClicked.Border.Width = 1
StateClicked.FontEx.Color = clBlack
StateClicked.FontEx.EndEllipsis = False
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Height = 0
StateClicked.FontEx.SingleLine = True
StateClicked.FontEx.Shadow = False
StateClicked.FontEx.ShadowColor = clBlack
StateClicked.FontEx.ShadowColorOpacity = 255
StateClicked.FontEx.ShadowRadius = 5
StateClicked.FontEx.ShadowOffsetX = 5
StateClicked.FontEx.ShadowOffsetY = 5
StateClicked.FontEx.Style = []
StateClicked.FontEx.TextAlignment = bcaCenter
StateClicked.FontEx.WordBreak = False
StateHover.Background.Color = clBlack
StateHover.Background.ColorOpacity = 255
StateHover.Background.Gradient1.StartColor = 12448254
StateHover.Background.Gradient1.StartColorOpacity = 255
StateHover.Background.Gradient1.DrawMode = dmSet
StateHover.Background.Gradient1.EndColor = 8840446
StateHover.Background.Gradient1.EndColorOpacity = 255
StateHover.Background.Gradient1.ColorCorrection = True
StateHover.Background.Gradient1.GradientType = gtLinear
StateHover.Background.Gradient1.Point1XPercent = 0
StateHover.Background.Gradient1.Point1YPercent = 0
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 100
StateHover.Background.Gradient1.Sinus = False
StateHover.Background.Gradient2.StartColor = 8840446
StateHover.Background.Gradient2.StartColorOpacity = 255
StateHover.Background.Gradient2.DrawMode = dmSet
StateHover.Background.Gradient2.EndColor = 12908798
StateHover.Background.Gradient2.EndColorOpacity = 255
StateHover.Background.Gradient2.ColorCorrection = True
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient2.Sinus = False
StateHover.Background.Gradient1EndPercent = 50
StateHover.Background.Style = bbsGradient
StateHover.Border.Color = 5362420
StateHover.Border.ColorOpacity = 255
StateHover.Border.LightColor = clWhite
StateHover.Border.LightOpacity = 200
StateHover.Border.LightWidth = 1
StateHover.Border.Style = bboSolid
StateHover.Border.Width = 1
StateHover.FontEx.Color = clBlack
StateHover.FontEx.EndEllipsis = False
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Height = 0
StateHover.FontEx.SingleLine = True
StateHover.FontEx.Shadow = False
StateHover.FontEx.ShadowColor = clBlack
StateHover.FontEx.ShadowColorOpacity = 255
StateHover.FontEx.ShadowRadius = 5
StateHover.FontEx.ShadowOffsetX = 5
StateHover.FontEx.ShadowOffsetY = 5
StateHover.FontEx.Style = []
StateHover.FontEx.TextAlignment = bcaCenter
StateHover.FontEx.WordBreak = False
StateNormal.Background.Color = clBlack
StateNormal.Background.ColorOpacity = 255
StateNormal.Background.Gradient1.StartColor = clWhite
StateNormal.Background.Gradient1.StartColorOpacity = 255
StateNormal.Background.Gradient1.DrawMode = dmSet
StateNormal.Background.Gradient1.EndColor = 15855597
StateNormal.Background.Gradient1.EndColorOpacity = 255
StateNormal.Background.Gradient1.ColorCorrection = True
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient1.Sinus = False
StateNormal.Background.Gradient2.StartColor = 13137169
StateNormal.Background.Gradient2.StartColorOpacity = 255
StateNormal.Background.Gradient2.DrawMode = dmSet
StateNormal.Background.Gradient2.EndColor = 15722194
StateNormal.Background.Gradient2.EndColorOpacity = 255
StateNormal.Background.Gradient2.ColorCorrection = True
StateNormal.Background.Gradient2.GradientType = gtLinear
StateNormal.Background.Gradient2.Point1XPercent = 0
StateNormal.Background.Gradient2.Point1YPercent = 0
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 100
StateNormal.Background.Gradient2.Sinus = False
StateNormal.Background.Gradient1EndPercent = 100
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Color = 13816015
StateNormal.Border.ColorOpacity = 255
StateNormal.Border.LightColor = clWhite
StateNormal.Border.LightOpacity = 255
StateNormal.Border.LightWidth = 1
StateNormal.Border.Style = bboSolid
StateNormal.Border.Width = 1
StateNormal.FontEx.Color = clBlack
StateNormal.FontEx.EndEllipsis = False
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Height = 0
StateNormal.FontEx.SingleLine = True
StateNormal.FontEx.Shadow = False
StateNormal.FontEx.ShadowColor = clBlack
StateNormal.FontEx.ShadowColorOpacity = 255
StateNormal.FontEx.ShadowRadius = 5
StateNormal.FontEx.ShadowOffsetX = 5
StateNormal.FontEx.ShadowOffsetY = 5
StateNormal.FontEx.Style = []
StateNormal.FontEx.TextAlignment = bcaCenter
StateNormal.FontEx.WordBreak = False
Caption = '$ 0,00'
Color = clNone
DropDownWidth = 16
DropDownArrowSize = 8
GlobalOpacity = 255
InnerMargin = 0
OnClick = Button1Click
ParentColor = False
Rounding.RoundX = 3
Rounding.RoundY = 3
Rounding.RoundOptions = []
RoundingDropDown.RoundX = 1
RoundingDropDown.RoundY = 1
RoundingDropDown.RoundOptions = []
TextApplyGlobalOpacity = False
MemoryUsage = bmuHigh
end
object Button2: TBCButton
Left = 80
Height = 28
Top = 8
Width = 63
StateClicked.Background.Color = clBlack
StateClicked.Background.ColorOpacity = 255
StateClicked.Background.Gradient1.StartColor = 7726591
StateClicked.Background.Gradient1.StartColorOpacity = 255
StateClicked.Background.Gradient1.DrawMode = dmSet
StateClicked.Background.Gradient1.EndColor = 7067903
StateClicked.Background.Gradient1.EndColorOpacity = 255
StateClicked.Background.Gradient1.ColorCorrection = True
StateClicked.Background.Gradient1.GradientType = gtLinear
StateClicked.Background.Gradient1.Point1XPercent = 0
StateClicked.Background.Gradient1.Point1YPercent = 0
StateClicked.Background.Gradient1.Point2XPercent = 0
StateClicked.Background.Gradient1.Point2YPercent = 100
StateClicked.Background.Gradient1.Sinus = False
StateClicked.Background.Gradient2.StartColor = 7067903
StateClicked.Background.Gradient2.StartColorOpacity = 255
StateClicked.Background.Gradient2.DrawMode = dmSet
StateClicked.Background.Gradient2.EndColor = 8515583
StateClicked.Background.Gradient2.EndColorOpacity = 255
StateClicked.Background.Gradient2.ColorCorrection = True
StateClicked.Background.Gradient2.GradientType = gtLinear
StateClicked.Background.Gradient2.Point1XPercent = 0
StateClicked.Background.Gradient2.Point1YPercent = 0
StateClicked.Background.Gradient2.Point2XPercent = 0
StateClicked.Background.Gradient2.Point2YPercent = 100
StateClicked.Background.Gradient2.Sinus = False
StateClicked.Background.Gradient1EndPercent = 50
StateClicked.Background.Style = bbsGradient
StateClicked.Border.Color = 4170178
StateClicked.Border.ColorOpacity = 255
StateClicked.Border.LightColor = clGray
StateClicked.Border.LightOpacity = 100
StateClicked.Border.LightWidth = 1
StateClicked.Border.Style = bboSolid
StateClicked.Border.Width = 1
StateClicked.FontEx.Color = clBlack
StateClicked.FontEx.EndEllipsis = False
StateClicked.FontEx.FontQuality = fqSystemClearType
StateClicked.FontEx.Height = 0
StateClicked.FontEx.SingleLine = True
StateClicked.FontEx.Shadow = False
StateClicked.FontEx.ShadowColor = clBlack
StateClicked.FontEx.ShadowColorOpacity = 255
StateClicked.FontEx.ShadowRadius = 5
StateClicked.FontEx.ShadowOffsetX = 5
StateClicked.FontEx.ShadowOffsetY = 5
StateClicked.FontEx.Style = []
StateClicked.FontEx.TextAlignment = bcaCenter
StateClicked.FontEx.WordBreak = False
StateHover.Background.Color = clBlack
StateHover.Background.ColorOpacity = 255
StateHover.Background.Gradient1.StartColor = 12448254
StateHover.Background.Gradient1.StartColorOpacity = 255
StateHover.Background.Gradient1.DrawMode = dmSet
StateHover.Background.Gradient1.EndColor = 8840446
StateHover.Background.Gradient1.EndColorOpacity = 255
StateHover.Background.Gradient1.ColorCorrection = True
StateHover.Background.Gradient1.GradientType = gtLinear
StateHover.Background.Gradient1.Point1XPercent = 0
StateHover.Background.Gradient1.Point1YPercent = 0
StateHover.Background.Gradient1.Point2XPercent = 0
StateHover.Background.Gradient1.Point2YPercent = 100
StateHover.Background.Gradient1.Sinus = False
StateHover.Background.Gradient2.StartColor = 8840446
StateHover.Background.Gradient2.StartColorOpacity = 255
StateHover.Background.Gradient2.DrawMode = dmSet
StateHover.Background.Gradient2.EndColor = 12908798
StateHover.Background.Gradient2.EndColorOpacity = 255
StateHover.Background.Gradient2.ColorCorrection = True
StateHover.Background.Gradient2.GradientType = gtLinear
StateHover.Background.Gradient2.Point1XPercent = 0
StateHover.Background.Gradient2.Point1YPercent = 0
StateHover.Background.Gradient2.Point2XPercent = 0
StateHover.Background.Gradient2.Point2YPercent = 100
StateHover.Background.Gradient2.Sinus = False
StateHover.Background.Gradient1EndPercent = 50
StateHover.Background.Style = bbsGradient
StateHover.Border.Color = 5362420
StateHover.Border.ColorOpacity = 255
StateHover.Border.LightColor = clWhite
StateHover.Border.LightOpacity = 200
StateHover.Border.LightWidth = 1
StateHover.Border.Style = bboSolid
StateHover.Border.Width = 1
StateHover.FontEx.Color = clBlack
StateHover.FontEx.EndEllipsis = False
StateHover.FontEx.FontQuality = fqSystemClearType
StateHover.FontEx.Height = 0
StateHover.FontEx.SingleLine = True
StateHover.FontEx.Shadow = False
StateHover.FontEx.ShadowColor = clBlack
StateHover.FontEx.ShadowColorOpacity = 255
StateHover.FontEx.ShadowRadius = 5
StateHover.FontEx.ShadowOffsetX = 5
StateHover.FontEx.ShadowOffsetY = 5
StateHover.FontEx.Style = []
StateHover.FontEx.TextAlignment = bcaCenter
StateHover.FontEx.WordBreak = False
StateNormal.Background.Color = clBlack
StateNormal.Background.ColorOpacity = 255
StateNormal.Background.Gradient1.StartColor = clWhite
StateNormal.Background.Gradient1.StartColorOpacity = 255
StateNormal.Background.Gradient1.DrawMode = dmSet
StateNormal.Background.Gradient1.EndColor = 15855597
StateNormal.Background.Gradient1.EndColorOpacity = 255
StateNormal.Background.Gradient1.ColorCorrection = True
StateNormal.Background.Gradient1.GradientType = gtLinear
StateNormal.Background.Gradient1.Point1XPercent = 0
StateNormal.Background.Gradient1.Point1YPercent = 0
StateNormal.Background.Gradient1.Point2XPercent = 0
StateNormal.Background.Gradient1.Point2YPercent = 100
StateNormal.Background.Gradient1.Sinus = False
StateNormal.Background.Gradient2.StartColor = 13137169
StateNormal.Background.Gradient2.StartColorOpacity = 255
StateNormal.Background.Gradient2.DrawMode = dmSet
StateNormal.Background.Gradient2.EndColor = 15722194
StateNormal.Background.Gradient2.EndColorOpacity = 255
StateNormal.Background.Gradient2.ColorCorrection = True
StateNormal.Background.Gradient2.GradientType = gtLinear
StateNormal.Background.Gradient2.Point1XPercent = 0
StateNormal.Background.Gradient2.Point1YPercent = 0
StateNormal.Background.Gradient2.Point2XPercent = 0
StateNormal.Background.Gradient2.Point2YPercent = 100
StateNormal.Background.Gradient2.Sinus = False
StateNormal.Background.Gradient1EndPercent = 100
StateNormal.Background.Style = bbsGradient
StateNormal.Border.Color = 13816015
StateNormal.Border.ColorOpacity = 255
StateNormal.Border.LightColor = clWhite
StateNormal.Border.LightOpacity = 255
StateNormal.Border.LightWidth = 1
StateNormal.Border.Style = bboSolid
StateNormal.Border.Width = 1
StateNormal.FontEx.Color = clBlack
StateNormal.FontEx.EndEllipsis = False
StateNormal.FontEx.FontQuality = fqSystemClearType
StateNormal.FontEx.Height = 0
StateNormal.FontEx.SingleLine = True
StateNormal.FontEx.Shadow = False
StateNormal.FontEx.ShadowColor = clBlack
StateNormal.FontEx.ShadowColorOpacity = 255
StateNormal.FontEx.ShadowRadius = 5
StateNormal.FontEx.ShadowOffsetX = 5
StateNormal.FontEx.ShadowOffsetY = 5
StateNormal.FontEx.Style = []
StateNormal.FontEx.TextAlignment = bcaCenter
StateNormal.FontEx.WordBreak = False
Caption = '$ 0,00'
Color = clNone
DropDownWidth = 16
DropDownArrowSize = 8
GlobalOpacity = 255
InnerMargin = 0
OnClick = Button1Click
ParentColor = False
Rounding.RoundX = 3
Rounding.RoundY = 3
Rounding.RoundOptions = []
RoundingDropDown.RoundX = 1
RoundingDropDown.RoundY = 1
RoundingDropDown.RoundOptions = []
TextApplyGlobalOpacity = False
MemoryUsage = bmuHigh
end
object FloatSpinEdit1: TFloatSpinEdit
Left = 152
Height = 28
Top = 8
Width = 76
Increment = 1
MaxValue = 100000
MinValue = 0
OnClick = Button1Click
TabOrder = 0
Value = 0
end
object Edit1: TEdit
Left = 232
Height = 28
Top = 8
Width = 80
OnClick = Button1Click
TabOrder = 1
end
end
object BCNumericKeyboard1: TBCNumericKeyboard
OnUserChange = BCNumericKeyboard1Change
left = 96
top = 136
end
end

View File

@@ -0,0 +1,165 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
Spin, BCNumericKeyboard, BCButton, BCTypes, BCPanel, BGRABitmapTypes;
type
{ TForm1 }
TForm1 = class(TForm)
BCNumericKeyboard1: TBCNumericKeyboard;
BCPanel1: TBCPanel;
Button1: TBCButton;
Button2: TBCButton;
Edit1: TEdit;
FloatSpinEdit1: TFloatSpinEdit;
procedure BCNumericKeyboard1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
NumericSender: TControl;
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
{ Button style }
procedure BCButtonWindows8(AButton: TBCButton; cl1, cl2: TColor);
begin
AButton.Rounding.RoundX := 1;
AButton.Rounding.RoundY := 1;
AButton.RoundingDropDown.Assign(AButton.Rounding);
with AButton.StateNormal do
begin
Background.Style := bbsColor;
Background.Color := cl1;
Border.Style := bboSolid;
Border.Width := 1;
Border.Color := cl1;
Border.LightWidth := 0;
Border.LightOpacity := 255;
Border.Style := bboSolid;
FontEx.Color := clWhite;
FontEx.Shadow := False;
FontEx.Style := [];
end;
AButton.StateHover.Assign(AButton.StateNormal);
AButton.StateClicked.Assign(AButton.StateNormal);
with AButton.StateHover do
begin
Background.Color := cl2;
Border.Color := cl2;
end;
with AButton.StateClicked do
begin
Background.Color := cl2;
Border.Color := cl2;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if (NumericSender <> nil) and (NumericSender.Name = TControl(Sender).Name) and
(BCNumericKeyboard1.Visible) then
begin
BCNumericKeyboard1.Hide();
// Remove unnecessary comma for button caption
if Sender is TBCButton or Sender is TEdit then
if Pos(DefaultFormatSettings.DecimalSeparator, NumericSender.Caption) =
Length(NumericSender.Caption) then
NumericSender.Caption :=
LeftStr(NumericSender.Caption, Length(NumericSender.Caption) - 1);
end
else
begin
NumericSender := Sender as TControl;
BCNumericKeyboard1.Value := '';
BCNumericKeyboard1.Panel.Left := NumericSender.Left;
BCNumericKeyboard1.Panel.Top := NumericSender.Top + NumericSender.Height;
BCNumericKeyboard1.Show();
end;
end;
procedure TForm1.FormClick(Sender: TObject);
begin
if NumericSender <> nil then
Button1Click(NumericSender);
end;
procedure TForm1.BCNumericKeyboard1Change(Sender: TObject);
var
d: double;
begin
// For buttons
if NumericSender is TBCButton or NumericSender is TEdit then
begin
if BCNumericKeyboard1.Value <> '' then
NumericSender.Caption :=
DefaultFormatSettings.CurrencyString + ' ' + BCNumericKeyboard1.Value
else
NumericSender.Caption :=
DefaultFormatSettings.CurrencyString + ' 0' +
DefaultFormatSettings.DecimalSeparator + '00';
end;
// For spin edit
if NumericSender is TFloatSpinEdit then
begin
TryStrToFloat(BCNumericKeyboard1.Value, d);
TFloatSpinEdit(NumericSender).Value := d;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// Assign custom format settings
DefaultFormatSettings.CurrencyString := '$';
// DefaultFormatSettings.DecimalSeparator := '.';
// Assign a style
BCButtonWindows8(BCNumericKeyBoard1.ButtonStyle, clGray, clSkyBlue);
// Custom extra size inside the button
BCNumericKeyBoard1.ButtonStyle.SetSizeVariables(0, 0, 15, 25);
// Apply the style
BCNumericKeyboard1.UpdateButtonStyle;
with BCNumericKeyboard1.Panel do
begin
BevelInner := bvNone;
BevelOuter := bvNone;
Background.Gradient1.StartColor := clNavy;
Background.Gradient1.EndColor := clPurple;
Background.Gradient1.Point1XPercent := 0;
Background.Gradient1.Point1YPercent := 0;
Background.Gradient1.Point2XPercent := 0;
Background.Gradient1.Point2YPercent := 100;
Background.Gradient1EndPercent := 100;
Background.Style := bbsGradient;
// Spacing around
ChildSizing.TopBottomSpacing := 5;
ChildSizing.LeftRightSpacing := 5;
// Spacing between buttons
ChildSizing.VerticalSpacing := 10;
ChildSizing.HorizontalSpacing := 10;
end;
end;
end.

View File

@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="BC Numeric Keyboard"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
</General>
<BuildModes Count="3">
<Item1 Name="Default" Default="True"/>
<Item2 Name="Debug">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<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"/>
</CodeGeneration>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
<UseHeaptrc Value="True"/>
<TrashVariables Value="True"/>
<UseExternalDbgSyms Value="True"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item2>
<Item3 Name="Release">
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<SmartLinkUnit Value="True"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
</Item3>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_bcnumerickeyboard.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_bcnumerickeyboard"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<LinkerOptions Value="\"/>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</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,22 @@
program test_bcnumerickeyboard;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, umain
{ you can add units after this };
{$R *.res}
begin
Application.Title:='BC Numeric Keyboard';
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.

View File

@@ -0,0 +1,100 @@
object Form1: TForm1
Left = 442
Height = 240
Top = 143
Width = 516
Caption = 'BC Real Numeric Keyboard'
ClientHeight = 240
ClientWidth = 516
OnCreate = FormCreate
LCLVersion = '1.7'
object BCPanel1: TBCPanel
Left = 0
Height = 240
Top = 0
Width = 516
Align = alClient
Background.Color = clBtnFace
Background.ColorOpacity = 255
Background.Gradient1.StartColor = clWhite
Background.Gradient1.StartColorOpacity = 255
Background.Gradient1.DrawMode = dmSet
Background.Gradient1.EndColor = 16119285
Background.Gradient1.EndColorOpacity = 255
Background.Gradient1.ColorCorrection = True
Background.Gradient1.GradientType = gtLinear
Background.Gradient1.Point1XPercent = 0
Background.Gradient1.Point1YPercent = 0
Background.Gradient1.Point2XPercent = 0
Background.Gradient1.Point2YPercent = 100
Background.Gradient1.Sinus = False
Background.Gradient2.StartColor = 15722194
Background.Gradient2.StartColorOpacity = 255
Background.Gradient2.DrawMode = dmSet
Background.Gradient2.EndColor = 13137169
Background.Gradient2.EndColorOpacity = 255
Background.Gradient2.ColorCorrection = True
Background.Gradient2.GradientType = gtLinear
Background.Gradient2.Point1XPercent = 0
Background.Gradient2.Point1YPercent = 0
Background.Gradient2.Point2XPercent = 0
Background.Gradient2.Point2YPercent = 100
Background.Gradient2.Sinus = False
Background.Gradient1EndPercent = 100
Background.Style = bbsGradient
BevelInner = bvNone
BevelOuter = bvNone
BevelWidth = 1
Border.Color = clBlack
Border.ColorOpacity = 255
Border.LightColor = clWhite
Border.LightOpacity = 255
Border.LightWidth = 0
Border.Style = bboNone
Border.Width = 1
BorderBCStyle = bpsBorder
FontEx.Color = clDefault
FontEx.EndEllipsis = False
FontEx.FontQuality = fqSystemClearType
FontEx.Height = 0
FontEx.SingleLine = True
FontEx.Shadow = False
FontEx.ShadowColor = clBlack
FontEx.ShadowColorOpacity = 255
FontEx.ShadowRadius = 5
FontEx.ShadowOffsetX = 5
FontEx.ShadowOffsetY = 5
FontEx.Style = []
FontEx.TextAlignment = bcaCenter
FontEx.WordBreak = False
Rounding.RoundX = 1
Rounding.RoundY = 1
Rounding.RoundOptions = []
TabOrder = 0
OnClick = FormClick
object FloatSpinEdit1: TFloatSpinEdit
Left = 8
Height = 28
Top = 8
Width = 76
Increment = 1
MaxValue = 100000
MinValue = 0
OnClick = Button1Click
TabOrder = 0
Value = 0
end
object Edit1: TEdit
Left = 96
Height = 28
Top = 8
Width = 80
OnClick = Button1Click
TabOrder = 1
end
end
object BCRealNumericKeyboard1: TBCRealNumericKeyboard
left = 128
top = 136
end
end

View File

@@ -0,0 +1,132 @@
unit umain;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
Spin, BCNumericKeyboard, BCButton, BCTypes, BCPanel, BGRABitmapTypes;
type
{ TForm1 }
TForm1 = class(TForm)
BCPanel1: TBCPanel;
BCRealNumericKeyboard1: TBCRealNumericKeyboard;
Edit1: TEdit;
FloatSpinEdit1: TFloatSpinEdit;
procedure Button1Click(Sender: TObject);
procedure FormClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
NumericSender: TControl;
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
{ Button style }
procedure BCButtonWindows8(AButton: TBCButton; cl1, cl2: TColor);
begin
AButton.Rounding.RoundX := 1;
AButton.Rounding.RoundY := 1;
AButton.RoundingDropDown.Assign(AButton.Rounding);
with AButton.StateNormal do
begin
Background.Style := bbsColor;
Background.Color := cl1;
Border.Style := bboSolid;
Border.Width := 1;
Border.Color := cl1;
Border.LightWidth := 0;
Border.LightOpacity := 255;
Border.Style := bboSolid;
FontEx.Color := clWhite;
FontEx.Shadow := False;
FontEx.Style := [];
end;
AButton.StateHover.Assign(AButton.StateNormal);
AButton.StateClicked.Assign(AButton.StateNormal);
with AButton.StateHover do
begin
Background.Color := cl2;
Border.Color := cl2;
end;
with AButton.StateClicked do
begin
Background.Color := cl2;
Border.Color := cl2;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
if (NumericSender <> nil) and (NumericSender.Name = TControl(Sender).Name) and
(BCRealNumericKeyboard1.Visible) then
begin
BCRealNumericKeyboard1.Hide();
end
else
begin
NumericSender := Sender as TControl;
BCRealNumericKeyboard1.Panel.Left := NumericSender.Left;
BCRealNumericKeyboard1.Panel.Top := NumericSender.Top + NumericSender.Height;
BCRealNumericKeyboard1.Show();
end;
end;
procedure TForm1.FormClick(Sender: TObject);
begin
if NumericSender <> nil then
Button1Click(NumericSender);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
// Assign custom format settings
DefaultFormatSettings.CurrencyString := '$';
// DefaultFormatSettings.DecimalSeparator := '.';
// Assign a style
BCButtonWindows8(BCRealNumericKeyboard1.ButtonStyle, clGray, clSkyBlue);
// Custom extra size inside the button
BCRealNumericKeyboard1.ButtonStyle.SetSizeVariables(0, 0, 15, 25);
// Apply the style
BCRealNumericKeyboard1.UpdateButtonStyle;
with BCRealNumericKeyboard1.Panel do
begin
BevelInner := bvNone;
BevelOuter := bvNone;
Background.Gradient1.StartColor := clNavy;
Background.Gradient1.EndColor := clPurple;
Background.Gradient1.Point1XPercent := 0;
Background.Gradient1.Point1YPercent := 0;
Background.Gradient1.Point2XPercent := 0;
Background.Gradient1.Point2YPercent := 100;
Background.Gradient1EndPercent := 100;
Background.Style := bbsGradient;
// Spacing around
ChildSizing.TopBottomSpacing := 5;
ChildSizing.LeftRightSpacing := 5;
// Spacing between buttons
ChildSizing.VerticalSpacing := 10;
ChildSizing.HorizontalSpacing := 10;
end;
end;
end.

View File

@@ -0,0 +1,3 @@
<svg height="100" width="100">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>

After

Width:  |  Height:  |  Size: 117 B

View File

@@ -0,0 +1,48 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 300 300">
<title>SVG Logo</title>
<desc>Designed for the SVG Logo Contest in 2006 by Harvey Rayner, and adopted by W3C in 2009. It is available under the Creative Commons license for those who have an SVG product or who are using SVG on their site.</desc>
<metadata id="license">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/">
<cc:Work rdf:about="">
<dc:title>SVG Logo</dc:title>
<dc:date>14-08-2009</dc:date>
<dc:creator>
<cc:Agent><dc:title>W3C</dc:title></cc:Agent>
<cc:Agent><dc:title>Harvey Rayner, designer</dc:title></cc:Agent>
</dc:creator>
<dc:description>See document description</dc:description>
<cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/2.5/"/>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/by-nc-sa/2.5/">
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
<cc:requires rdf:resource="http://web.resource.org/cc/Notice"/>
<cc:requires rdf:resource="http://web.resource.org/cc/Attribution"/>
<cc:prohibits rdf:resource="http://web.resource.org/cc/CommercialUse"/>
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
<cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike"/>
</cc:License>
</rdf:RDF>
</metadata>
<defs>
<g id="SVG" fill="#fff" transform="scale(2) translate(20,79)">
<path id="S" d="M 5.482,31.319 C2.163,28.001 0.109,23.419 0.109,18.358 C0.109,8.232 8.322,0.024 18.443,0.024 C28.569,0.024 36.782,8.232 36.782,18.358 L26.042,18.358 C26.042,14.164 22.638,10.765 18.443,10.765 C14.249,10.765 10.850,14.164 10.850,18.358 C10.850,20.453 11.701,22.351 13.070,23.721 L13.075,23.721 C14.450,25.101 15.595,25.500 18.443,25.952 L18.443,25.952 C23.509,26.479 28.091,28.006 31.409,31.324 L31.409,31.324 C34.728,34.643 36.782,39.225 36.782,44.286 C36.782,54.412 28.569,62.625 18.443,62.625 C8.322,62.625 0.109,54.412 0.109,44.286 L10.850,44.286 C10.850,48.480 14.249,51.884 18.443,51.884 C22.638,51.884 26.042,48.480 26.042,44.286 C26.042,42.191 25.191,40.298 23.821,38.923 L23.816,38.923 C22.441,37.548 20.468,37.074 18.443,36.697 L18.443,36.692 C13.533,35.939 8.800,34.638 5.482,31.319 L5.482,31.319 L5.482,31.319 Z"/>
<path id="V" d="M 73.452,0.024 L60.482,62.625 L49.742,62.625 L36.782,0.024 L47.522,0.024 L55.122,36.687 L62.712,0.024 L73.452,0.024 Z"/>
<path id="G" d="M 91.792,25.952 L110.126,25.952 L110.126,44.286 L110.131,44.286 C110.131,54.413 101.918,62.626 91.792,62.626 C81.665,62.626 73.458,54.413 73.458,44.286 L73.458,44.286 L73.458,18.359 L73.453,18.359 C73.453,8.233 81.665,0.025 91.792,0.025 C101.913,0.025 110.126,8.233 110.126,18.359 L99.385,18.359 C99.385,14.169 95.981,10.765 91.792,10.765 C87.597,10.765 84.198,14.169 84.198,18.359 L84.198,44.286 L84.198,44.286 C84.198,48.481 87.597,51.880 91.792,51.880 C95.981,51.880 99.380,48.481 99.385,44.291 L99.385,44.286 L99.385,36.698 L91.792,36.698 L91.792,25.952 L91.792,25.952 Z"/>
</g>
</defs>
<path id="base" fill="#000" d="M8.5,150 H291.5 V250 C291.5,273.5 273.5,291.5 250,291.5 H50 C26.5,291.5 8.5,273.5 8.5,250 Z"/>
<g stroke-width="38" stroke="#000">
<g id="svgstar" transform="translate(150, 150)">
<path id="svgbar" fill="#ffb13b" d="M-84.1487,-15.8513 a22.4171,22.4171 0 1 0 0,31.7026 h168.2974 a22.4171,22.4171 0 1 0 0,-31.7026 Z"/>
<use xlink:href="#svgbar" transform="rotate(45)"/>
<use xlink:href="#svgbar" transform="rotate(90)"/>
<use xlink:href="#svgbar" transform="rotate(135)"/>
</g>
</g>
<use xlink:href="#svgstar"/>
<use xlink:href="#base" opacity="0.85"/>
<use xlink:href="#SVG"/>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="12"/>
<PathDelim Value="\"/>
<General>
<Flags>
<CompatibilityMode Value="True"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<Title Value="test_svg"/>
<Scaled Value="True"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True/PM"/>
</XPManifest>
<Icon Value="0"/>
<Resources Count="1">
<Resource_0 FileName="01 circle.svg" Type="RCDATA" ResourceName="01 CIRCLE"/>
</Resources>
</General>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default"/>
</Modes>
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="bgracontrols"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="test_svg.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="umain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<Target>
<Filename Value="test_svg"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Debugging>
<DebugInfoType Value="dsDwarf2Set"/>
</Debugging>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

Some files were not shown because too many files have changed in this diff Show More