Skip to content

Commit

Permalink
Merge pull request #159 from bgrabitmap/dev-bgracontrols
Browse files Browse the repository at this point in the history
Dev bgracontrols
  • Loading branch information
lainz authored Nov 29, 2023
2 parents 6e5ca31 + c7cadf3 commit a1220e6
Show file tree
Hide file tree
Showing 11 changed files with 1,243 additions and 163 deletions.
796 changes: 796 additions & 0 deletions bccheckcombobox.pas

Large diffs are not rendered by default.

285 changes: 145 additions & 140 deletions bgracontrols.lpk

Large diffs are not rendered by default.

39 changes: 20 additions & 19 deletions bgracontrols.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
interface

uses
atshapelinebgra, BCButton, BCButtonFocus, BCComboBox, BCEffect, bcfilters,
BCGameGrid, BCGradientButton, BCImageButton, BCLabel, BCListBox,
BCMaterialDesignButton, BCMDButton, BCMDButtonFocus, BCPanel,
BCRadialProgressBar, BCRoundedImage, BCRTTI, BCSamples, BCStylesForm,
BCSVGButton, BCSVGViewer, BCToolBar, BCTrackbarUpdown, BGRAColorTheme,
bgracontrolsinfo, BGRACustomDrawn, BGRADrawerFlashProgressBar,
BGRAFlashProgressBar, BGRAGraphicControl, BGRAImageList,
BGRAImageManipulation, BGRAImageTheme, BGRAKnob, BGRAResizeSpeedButton,
BGRAShape, BGRASpeedButton, BGRASpriteAnimation, BGRATheme, BGRAThemeButton,
atshapelinebgra, BCButton, BCButtonFocus, BCCheckComboBox, BCComboBox,
BCEffect, bcfilters, BCGameGrid, BCGradientButton, BCImageButton, BCLabel,
BCListBox, BCListBoxEx, BCMaterialDesignButton, BCMaterialEdit,
BCMaterialFloatSpinEdit, BCMaterialProgressBarMarquee, BCMaterialSpinEdit,
BCMDButton, BCMDButtonFocus, BCPanel, BCRadialProgressBar, BCRoundedImage,
BCRTTI, BCSamples, BCStylesForm, BCSVGButton, BCSVGViewer, BCToolBar,
BCTrackbarUpdown, BGRAColorTheme, bgracontrolsinfo, BGRACustomDrawn,
BGRADrawerFlashProgressBar, BGRAFlashProgressBar, BGRAGraphicControl,
BGRAImageList, BGRAImageManipulation, BGRAImageTheme, BGRAKnob,
BGRAResizeSpeedButton, BGRAShape, BGRASpeedButton, BGRASpriteAnimation,
BGRASVGImageList, BGRASVGTheme, BGRATheme, BGRAThemeButton,
BGRAThemeCheckBox, BGRAThemeRadioButton, BGRAVirtualScreen,
ColorSpeedButton, DTAnalogClock, DTAnalogCommon, DTAnalogGauge,
dtthemedclock, dtthemedgauge, MaterialColors, BCListBoxEx, BGRASVGTheme,
BGRASVGImageList, bgrasvgimagelistform, BCMaterialEdit,
BCMaterialFloatSpinEdit, BCMaterialSpinEdit, BCMaterialProgressBarMarquee,
dtthemedclock, dtthemedgauge, MaterialColors, bgrasvgimagelistform,
LazarusPackageIntf;

implementation
Expand All @@ -31,13 +31,19 @@ procedure Register;
RegisterUnit('atshapelinebgra', @atshapelinebgra.Register);
RegisterUnit('BCButton', @BCButton.Register);
RegisterUnit('BCButtonFocus', @BCButtonFocus.Register);
RegisterUnit('BCCheckComboBox', @BCCheckComboBox.Register);
RegisterUnit('BCComboBox', @BCComboBox.Register);
RegisterUnit('BCGameGrid', @BCGameGrid.Register);
RegisterUnit('BCGradientButton', @BCGradientButton.Register);
RegisterUnit('BCImageButton', @BCImageButton.Register);
RegisterUnit('BCLabel', @BCLabel.Register);
RegisterUnit('BCListBox', @BCListBox.Register);
RegisterUnit('BCMaterialDesignButton', @BCMaterialDesignButton.Register);
RegisterUnit('BCMaterialEdit', @BCMaterialEdit.Register);
RegisterUnit('BCMaterialFloatSpinEdit', @BCMaterialFloatSpinEdit.Register);
RegisterUnit('BCMaterialProgressBarMarquee',
@BCMaterialProgressBarMarquee.Register);
RegisterUnit('BCMaterialSpinEdit', @BCMaterialSpinEdit.Register);
RegisterUnit('BCMDButton', @BCMDButton.Register);
RegisterUnit('BCMDButtonFocus', @BCMDButtonFocus.Register);
RegisterUnit('BCPanel', @BCPanel.Register);
Expand All @@ -58,6 +64,8 @@ procedure Register;
RegisterUnit('BGRAShape', @BGRAShape.Register);
RegisterUnit('BGRASpeedButton', @BGRASpeedButton.Register);
RegisterUnit('BGRASpriteAnimation', @BGRASpriteAnimation.Register);
RegisterUnit('BGRASVGImageList', @BGRASVGImageList.Register);
RegisterUnit('BGRASVGTheme', @BGRASVGTheme.Register);
RegisterUnit('BGRATheme', @BGRATheme.Register);
RegisterUnit('BGRAThemeButton', @BGRAThemeButton.Register);
RegisterUnit('BGRAThemeCheckBox', @BGRAThemeCheckBox.Register);
Expand All @@ -68,13 +76,6 @@ procedure Register;
RegisterUnit('DTAnalogGauge', @DTAnalogGauge.Register);
RegisterUnit('dtthemedclock', @dtthemedclock.Register);
RegisterUnit('dtthemedgauge', @dtthemedgauge.Register);
RegisterUnit('BGRASVGTheme', @BGRASVGTheme.Register);
RegisterUnit('BGRASVGImageList', @BGRASVGImageList.Register);
RegisterUnit('BCMaterialEdit', @BCMaterialEdit.Register);
RegisterUnit('BCMaterialFloatSpinEdit', @BCMaterialFloatSpinEdit.Register);
RegisterUnit('BCMaterialSpinEdit', @BCMaterialSpinEdit.Register);
RegisterUnit('BCMaterialProgressBarMarquee',
@BCMaterialProgressBarMarquee.Register);
end;

initialization
Expand Down
2 changes: 1 addition & 1 deletion bgracontrolsinfo.pas
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface
Classes, SysUtils;

const
BGRAControlsVersion = 7070000;
BGRAControlsVersion = 8000000;

function BGRAControlsVersionStr: string;

Expand Down
2 changes: 1 addition & 1 deletion bgrapascalscriptcomponent.lpk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
</CompilerOptions>
<Version Major="7" Minor="7"/>
<Version Major="8"/>
<Files Count="3">
<Item1>
<Filename Value="bgrapascalscript.pas"/>
Expand Down
Binary file added test/test_bccheckcombobox/project1.ico
Binary file not shown.
81 changes: 81 additions & 0 deletions test/test_bccheckcombobox/project1.lpi
Original file line number Diff line number Diff line change
@@ -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>
25 changes: 25 additions & 0 deletions test/test_bccheckcombobox/project1.lpr
Original file line number Diff line number Diff line change
@@ -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.

115 changes: 115 additions & 0 deletions test/test_bccheckcombobox/unit1.lfm
Original file line number Diff line number Diff line change
@@ -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
57 changes: 57 additions & 0 deletions test/test_bccheckcombobox/unit1.pas
Original file line number Diff line number Diff line change
@@ -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.

4 changes: 2 additions & 2 deletions update_bgracontrols_force.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"ForceNotify" : true,
"InternalVersion" : 25,
"Name" : "bgracontrols.lpk",
"Version" : "7.7.0.0"
"Version" : "8.0.0.0"
},
{
"ForceNotify" : false,
"InternalVersion" : 1,
"Name" : "bgrapascalscriptcomponent.lpk",
"Version" : "7.7.0.0"
"Version" : "8.0.0.0"
}
]
}

0 comments on commit a1220e6

Please sign in to comment.