Стартовый пул
This commit is contained in:
194
bgracontrols/test/test_bccontrols/bctest.lpi
Normal file
194
bgracontrols/test/test_bccontrols/bctest.lpi
Normal 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>
|
22
bgracontrols/test/test_bccontrols/bctest.lpr
Normal file
22
bgracontrols/test/test_bccontrols/bctest.lpr
Normal 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.
|
||||
|
1714
bgracontrols/test/test_bccontrols/ubctest.lfm
Normal file
1714
bgracontrols/test/test_bccontrols/ubctest.lfm
Normal file
File diff suppressed because it is too large
Load Diff
180
bgracontrols/test/test_bccontrols/ubctest.pas
Normal file
180
bgracontrols/test/test_bccontrols/ubctest.pas
Normal 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.
|
Reference in New Issue
Block a user