diff --git a/README.md b/README.md index e77d2c5..d6e6d12 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@


- PraButtonStyle + PraButtonStyle in (Delphi, Lazarus)

-

Button with very attractive layout, standard bootstrap to Delphi VCL

+

Button with very attractive layout, standard bootstrap to Delphi/Lazarus VCL

@@ -37,6 +37,7 @@ ## Features - **Delphi-VCL** — Tested on the latest delphi. +- **Lazarus-VCL** — preparing and converting to lazarus. compiled delphi; developing lazarus. ## Documentation @@ -97,7 +98,6 @@ Add the folder directory to the Library path in Delphi inside the Tools->Options menu. The Options window will show up and there you have to click on Environment Options->Delphi Options->Library, select the right platform (32 or 64 bits) and add directory in Library path. - ## License This project is licensed under the MIT License - see the [LICENSE](https://opensource.org/licenses/MIT) page for details. diff --git a/packages/backup/fkprabuttonstyle.pas.bak b/packages/backup/fkprabuttonstyle.pas.bak new file mode 100644 index 0000000..3b96247 --- /dev/null +++ b/packages/backup/fkprabuttonstyle.pas.bak @@ -0,0 +1,48 @@ +unit fkPraButtonStyle; +{$warn 5023 off : no warning about unused units} +interface + +uses + PraButtonStyle, LazarusPackageIntf; + +implementation + +procedure Register; +begin + RegisterUnit('PraButtonStyle', @PraButtonStyle.Register); +end; + +initialization + RegisterPackage('fkPraButtonStyle', @Register); +end. + +(*{$mode ObjFPC}{$H+} + +interface + +uses + Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs; + +type + TPraButtonStyle = class(PraComponents) + private + + protected + + public + + published + + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('PraComponents',[TPraButtonStyle]); +end; + +end. +*) diff --git a/packages/backup/laz_pracomponents.lpk.bak b/packages/backup/laz_pracomponents.lpk.bak new file mode 100644 index 0000000..2f1fafe --- /dev/null +++ b/packages/backup/laz_pracomponents.lpk.bak @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/backup/newpackage.lpk.bak b/packages/backup/newpackage.lpk.bak new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/packages/backup/newpackage.lpk.bak @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/backup/prabuttonstyle.pas.bak b/packages/backup/prabuttonstyle.pas.bak new file mode 100644 index 0000000..60c6a89 --- /dev/null +++ b/packages/backup/prabuttonstyle.pas.bak @@ -0,0 +1,14 @@ +unit PraButtonStyle; +{$warn 5023 off : no warning about unused units} +interface +uses + LazarusPackageIntf; + +implementation + +procedure Register; +begin + RegisterComponents('PraComponents',[TPraButtonStyles]); +end; + +end. diff --git a/packages/backup/prabuttonstyle1.pas.bak b/packages/backup/prabuttonstyle1.pas.bak new file mode 100644 index 0000000..50d3d28 --- /dev/null +++ b/packages/backup/prabuttonstyle1.pas.bak @@ -0,0 +1,31 @@ +unit PraButtonStyle1; + +{$mode ObjFPC}{$H+} + +interface + +uses + Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs; + +type + TPraButtonStyle1 = class(tTPraButtonStyle) + private + + protected + + public + + published + + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('pracomponents',[TPraButtonStyle1]); +end; + +end. diff --git a/packages/backup/pracomponents.lpk.bak b/packages/backup/pracomponents.lpk.bak new file mode 100644 index 0000000..2d499af --- /dev/null +++ b/packages/backup/pracomponents.lpk.bak @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/lazpk/backup/newpackage.lpk.bak b/packages/lazpk/backup/newpackage.lpk.bak new file mode 100644 index 0000000..c3d3192 --- /dev/null +++ b/packages/lazpk/backup/newpackage.lpk.bak @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/lazpk/lib/x86_64-win64/NewPackage.compiled b/packages/lazpk/lib/x86_64-win64/NewPackage.compiled new file mode 100644 index 0000000..5d222fe --- /dev/null +++ b/packages/lazpk/lib/x86_64-win64/NewPackage.compiled @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/lazpk/lib/x86_64-win64/PraInterfaces.ppu b/packages/lazpk/lib/x86_64-win64/PraInterfaces.ppu new file mode 100644 index 0000000..919fac3 Binary files /dev/null and b/packages/lazpk/lib/x86_64-win64/PraInterfaces.ppu differ diff --git a/packages/lazpk/lib/x86_64-win64/pkprabuttonstyle.ppu b/packages/lazpk/lib/x86_64-win64/pkprabuttonstyle.ppu new file mode 100644 index 0000000..75336c0 Binary files /dev/null and b/packages/lazpk/lib/x86_64-win64/pkprabuttonstyle.ppu differ diff --git a/packages/lazpk/newpackage.lpk b/packages/lazpk/newpackage.lpk new file mode 100644 index 0000000..b096800 --- /dev/null +++ b/packages/lazpk/newpackage.lpk @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/lazpk/newpackage.pas b/packages/lazpk/newpackage.pas new file mode 100644 index 0000000..34ac248 --- /dev/null +++ b/packages/lazpk/newpackage.pas @@ -0,0 +1,32 @@ +{ This file was automatically created by Lazarus. Do not edit! + This source is only used to compile and install the package. + } + +unit NewPackage; + +{$warn 5023 off : no warning about unused units} +interface + +uses + pkPraButtonStyle, PraButtonStyle, PraButtonStyleBack, PraButtonStyleCancel, + PraButtonStyleClose, PraButtonStyleDelete, PraButtonStyleEdit, + PraButtonStyleEmail, PraButtonStyleGear, PraButtonStyleHeart, + PraButtonStyleInsert, PraButtonStyleMenu, PraButtonStylePrint, + PraButtonStyleReport, PraButtonStyleSave, PraButtonStyleTemplateDanger, + PraButtonStyleTemplateDark, PraButtonStyleTemplateGear, + PraButtonStyleTemplateHeart, PraButtonStyleTemplateInfo, + PraButtonStyleTemplateLight, PraButtonStyleTemplatePrimary, + PraButtonStyleTemplateSecondary, PraButtonStyleTemplateSuccess, + PraButtonStyleTemplateWarning, PraInterfaces, PraConsts, PraRegister, + PraUtils, PraAbout, LazarusPackageIntf; + +implementation + +procedure Register; +begin + RegisterUnit('pkPraButtonStyle', @pkPraButtonStyle.Register); +end; + +initialization + RegisterPackage('NewPackage', @Register); +end. diff --git a/packages/lazpk/pkprabuttonstyle.pas b/packages/lazpk/pkprabuttonstyle.pas new file mode 100644 index 0000000..5656509 --- /dev/null +++ b/packages/lazpk/pkprabuttonstyle.pas @@ -0,0 +1,32 @@ +unit pkPraButtonStyle; + +{$mode ObjFPC}{$H+} + +interface + +uses + Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls; + +type + TPraButtonStyle = class(TButton) + private + + protected + + public + + published + + end; + +procedure Register; + +implementation + +procedure Register; +begin + {$I pkprabuttonstyle_icon.lrs} + RegisterComponents('Pra Components',[TPraButtonStyle]); +end; + +end. diff --git a/packages/lazpk/pkprabuttonstyle_icon.lrs b/packages/lazpk/pkprabuttonstyle_icon.lrs new file mode 100644 index 0000000..36542af --- /dev/null +++ b/packages/lazpk/pkprabuttonstyle_icon.lrs @@ -0,0 +1,504 @@ +LazarusResources.Add('TPraButtonStyle','BMP',[ + 'BM'#138#16#0#0#0#0#0#0#138#0#0#0'|'#0#0#0' '#0#0#0' '#0#0#0#1#0' '#0#3#0#0#0 + +#0#16#0#0#18#11#0#0#18#11#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0#255#0#0#255#0#0#0#0 + +#0#0#255'BGRs'#143#194#245'(Q'#184#30#21#30#133#235#1'333'#19'fff&fff'#6#153 + +#153#153#9'='#10#215#3'(\'#143'2'#0#0#0#0#0#0#0#0#0#0#0#0#4#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#18#255#255#255#19#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'&' + +#255#255#255#170#255#255#255#132#255#255#255#132#255#255#255#187#255#255#255 + +'-'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#18#255#255#255#136#255 + +#255#255#249#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#251#255#255#255#153#255#255#255#22#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#5#255#255 + +#255'f'#255#255#255#235#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#243#255#255#255#128#255#255#255#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'D'#255#255#255#213#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#225#255#255#255'^'#255#255#255#1#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#255#255#255'1'#255#255#255#191#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#241#255#255#255'Q'#255#255#255'Q'#255#255#255#241#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#192#255#255#255'2'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#10#255#255#255#158#255#255 + +#255#253#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#250#255#255#255#147#255#255#255#27#255#255#255')' + +#255#255#255')'#255#255#255#27#255#255#255#147#255#255#255#250#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#253#255#255#255#158#255#255#255#10#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'<'#255#255#255'A'#255#255#255#209#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#172 + +#255#255#255'&'#255#255#255'W'#255#255#255#221#255#255#255#132#255#255#255 + +#132#255#255#255#221#255#255#255'W'#255#255#255'&'#255#255#255#172#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#209#255 + +#255#255'A'#255#255#255'<'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#255#255#255#255#255#255#255#179#255#255#255'"'#255#255#255'^' + +#255#255#255#233#255#255#255#201#255#255#255'>'#255#255#255'8'#255#255#255 + +#195#255#255#255#255#255#255#255#255#255#255#255#132#255#255#255#132#255#255 + +#255#255#255#255#255#255#255#255#255#203#255#255#255'@'#255#255#255'6'#255 + +#255#255#194#255#255#255#237#255#255#255'o'#255#255#255#30#255#255#255#162 + +#255#255#255#254#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#255#255#255#255#255#255#255#255#255#255#255#245#255#255#255'|'#255#255 + +#255#11#255#255#255''''#255#255#255#175#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#177#255#255#255 + +')'#255#255#255#11#255#255#255'|'#255#255#255#245#255#255#255#255#255#255#255 + +#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#241#255#255#255#22#255 + +#255#255#250#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + ,#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#251#255#255 + +#255#23#255#255#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27 + +#255#255#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255 + +#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#252#255#255 + +#255'a'#255#255#255'a'#255#255#255#252#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241 + +#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#192#255#255#255'0'#255#255#255'L' + +#255#255#255'L'#255#255#255'0'#255#255#255#192#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241#255#255 + +#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255#255#255#255#255 + +#227#255#255#255'^'#255#255#255''''#255#255#255#180#255#255#255#255#255#255 + +#255#255#255#255#255#188#255#255#255'-'#255#255#255'M'#255#255#255#222#255 + +#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241#255#255#255#255 + +#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#241#255#255#255#27#255#255#255#245#255#255#255#128#255#255#255#25#255 + +#255#255#136#255#255#255#249#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#251#255#255#255#153#255#255#255#27#255#255#255 + +'o'#255#255#255#242#255#255#255#27#255#255#255#241#255#255#255#255#255#255 + +#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#241 + +#255#255#255#10#255#255#255#31#255#255#255'k'#255#255#255#236#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#236#255#255#255'k'#255#255 + +#255#31#255#255#255#10#255#255#255#241#255#255#255#255#255#255#255#255#255 + +#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#255#255#255#255#255#255#255#255#255#255#255#208#255#255#255'A'#255#255#255 + +#17#255#255#255'<'#255#255#255#222#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#222#255#255#255'<' + +#255#255#255#18#255#255#255'A'#255#255#255#208#255#255#255#255#255#255#255 + +#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#236#255#255#255'o'#255#255#255' '#255#255#255#162#255#255#255#250#255 + +#255#255#153#255#255#255#29#255#255#255'f'#255#255#255#234#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#238#255#255#255'w'#255#255#255#27#255#255#255#136#255#255 + +#255#249#255#255#255#179#255#255#255'$'#255#255#255'^'#255#255#255#232#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#26#255 + +#255#255#133#255#255#255#247#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#241#255#255#255'y'#255#255#255#27#255#255#255#139#255#255#255 + +#248#255#255#255#255#255#255#255#255#255#255#255#248#255#255#255#139#255#255 + +#255#27#255#255#255'{'#255#255#255#242#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#247#255#255#255#134#255#255#255#26#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#30#255#255#255#169 + +#255#255#255#254#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + ,#255#255#255#255#255#255#255#255#227#255#255#255'`'#255#255#255'"'#255#255 + +#255#165#255#255#255#165#255#255#255'"'#255#255#255'a'#255#255#255#228#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#254#255#255#255#169#255#255#255#30#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255';'#255#255#255 + +#201#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#209#255#255#255'6'#255#255#255'6'#255 + +#255#255#209#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#201#255#255#255';'#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#255#255#255#1#255#255#255'U'#255#255#255#223#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#228#255#255#255'f'#255#255#255#2#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#9#255#255#255'w'#255 + +#255#255#242#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#132 + +#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#245#255#255#255#136#255#255#255#12#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#26#255#255#255#153#255 + +#255#255#252#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#254#255#255#255#170#255#255#255#31#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#255#255#255'2'#255#255#255#192#255#255#255#132#255#255#255#132#255 + +#255#255#199#255#255#255'9'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#255#255#255#25#255#255#255#25#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 +]); +LazarusResources.Add('TPraButtonStyle_150','BMP',[ + 'BM'#138#16#0#0#0#0#0#0#138#0#0#0'|'#0#0#0' '#0#0#0' '#0#0#0#1#0' '#0#3#0#0#0 + +#0#16#0#0#18#11#0#0#18#11#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0#255#0#0#255#0#0#0#0 + +#0#0#255'BGRs'#143#194#245'(Q'#184#30#21#30#133#235#1'333'#19'fff&fff'#6#153 + +#153#153#9'='#10#215#3'(\'#143'2'#0#0#0#0#0#0#0#0#0#0#0#0#4#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#18#255#255#255#19#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'&' + +#255#255#255#170#255#255#255#132#255#255#255#132#255#255#255#187#255#255#255 + +'-'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#18#255#255#255#136#255 + +#255#255#249#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#251#255#255#255#153#255#255#255#22#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#5#255#255 + +#255'f'#255#255#255#235#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#243#255#255#255#128#255#255#255#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'D'#255#255#255#213#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#225#255#255#255'^'#255#255#255#1#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#255#255#255'1'#255#255#255#191#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#241#255#255#255'Q'#255#255#255'Q'#255#255#255#241#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#192#255#255#255'2'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#10#255#255#255#158#255#255 + +#255#253#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#250#255#255#255#147#255#255#255#27#255#255#255')' + +#255#255#255')'#255#255#255#27#255#255#255#147#255#255#255#250#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#253#255#255#255#158#255#255#255#10#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'<'#255#255#255'A'#255#255#255#209#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#172 + +#255#255#255'&'#255#255#255'W'#255#255#255#221#255#255#255#132#255#255#255 + +#132#255#255#255#221#255#255#255'W'#255#255#255'&'#255#255#255#172#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#209#255 + +#255#255'A'#255#255#255'<'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#255#255#255#255#255#255#255#179#255#255#255'"'#255#255#255'^' + +#255#255#255#233#255#255#255#201#255#255#255'>'#255#255#255'8'#255#255#255 + +#195#255#255#255#255#255#255#255#255#255#255#255#132#255#255#255#132#255#255 + +#255#255#255#255#255#255#255#255#255#203#255#255#255'@'#255#255#255'6'#255 + +#255#255#194#255#255#255#237#255#255#255'o'#255#255#255#30#255#255#255#162 + +#255#255#255#254#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#255#255#255#255#255#255#255#255#255#255#255#245#255#255#255'|'#255#255 + +#255#11#255#255#255''''#255#255#255#175#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#177#255#255#255 + +')'#255#255#255#11#255#255#255'|'#255#255#255#245#255#255#255#255#255#255#255 + +#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#241#255#255#255#22#255 + +#255#255#250#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + ,#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#251#255#255 + +#255#23#255#255#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27 + +#255#255#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255 + +#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#252#255#255 + +#255'a'#255#255#255'a'#255#255#255#252#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241 + +#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#192#255#255#255'0'#255#255#255'L' + +#255#255#255'L'#255#255#255'0'#255#255#255#192#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241#255#255 + +#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255#255#255#255#255 + +#227#255#255#255'^'#255#255#255''''#255#255#255#180#255#255#255#255#255#255 + +#255#255#255#255#255#188#255#255#255'-'#255#255#255'M'#255#255#255#222#255 + +#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241#255#255#255#255 + +#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#241#255#255#255#27#255#255#255#245#255#255#255#128#255#255#255#25#255 + +#255#255#136#255#255#255#249#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#251#255#255#255#153#255#255#255#27#255#255#255 + +'o'#255#255#255#242#255#255#255#27#255#255#255#241#255#255#255#255#255#255 + +#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#241 + +#255#255#255#10#255#255#255#31#255#255#255'k'#255#255#255#236#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#236#255#255#255'k'#255#255 + +#255#31#255#255#255#10#255#255#255#241#255#255#255#255#255#255#255#255#255 + +#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#255#255#255#255#255#255#255#255#255#255#255#208#255#255#255'A'#255#255#255 + +#17#255#255#255'<'#255#255#255#222#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#222#255#255#255'<' + +#255#255#255#18#255#255#255'A'#255#255#255#208#255#255#255#255#255#255#255 + +#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#236#255#255#255'o'#255#255#255' '#255#255#255#162#255#255#255#250#255 + +#255#255#153#255#255#255#29#255#255#255'f'#255#255#255#234#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#238#255#255#255'w'#255#255#255#27#255#255#255#136#255#255 + +#255#249#255#255#255#179#255#255#255'$'#255#255#255'^'#255#255#255#232#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#26#255 + +#255#255#133#255#255#255#247#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#241#255#255#255'y'#255#255#255#27#255#255#255#139#255#255#255 + +#248#255#255#255#255#255#255#255#255#255#255#255#248#255#255#255#139#255#255 + +#255#27#255#255#255'{'#255#255#255#242#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#247#255#255#255#134#255#255#255#26#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#30#255#255#255#169 + +#255#255#255#254#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + ,#255#255#255#255#255#255#255#255#227#255#255#255'`'#255#255#255'"'#255#255 + +#255#165#255#255#255#165#255#255#255'"'#255#255#255'a'#255#255#255#228#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#254#255#255#255#169#255#255#255#30#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255';'#255#255#255 + +#201#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#209#255#255#255'6'#255#255#255'6'#255 + +#255#255#209#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#201#255#255#255';'#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#255#255#255#1#255#255#255'U'#255#255#255#223#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#228#255#255#255'f'#255#255#255#2#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#9#255#255#255'w'#255 + +#255#255#242#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#132 + +#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#245#255#255#255#136#255#255#255#12#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#26#255#255#255#153#255 + +#255#255#252#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#254#255#255#255#170#255#255#255#31#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#255#255#255'2'#255#255#255#192#255#255#255#132#255#255#255#132#255 + +#255#255#199#255#255#255'9'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#255#255#255#25#255#255#255#25#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 +]); +LazarusResources.Add('TPraButtonStyle_200','BMP',[ + 'BM'#138#16#0#0#0#0#0#0#138#0#0#0'|'#0#0#0' '#0#0#0' '#0#0#0#1#0' '#0#3#0#0#0 + +#0#16#0#0#18#11#0#0#18#11#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0#255#0#0#255#0#0#0#0 + +#0#0#255'BGRs'#143#194#245'(Q'#184#30#21#30#133#235#1'333'#19'fff&fff'#6#153 + +#153#153#9'='#10#215#3'(\'#143'2'#0#0#0#0#0#0#0#0#0#0#0#0#4#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#18#255#255#255#19#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'&' + +#255#255#255#170#255#255#255#132#255#255#255#132#255#255#255#187#255#255#255 + +'-'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#18#255#255#255#136#255 + +#255#255#249#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#251#255#255#255#153#255#255#255#22#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#5#255#255 + +#255'f'#255#255#255#235#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#243#255#255#255#128#255#255#255#8#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'D'#255#255#255#213#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#225#255#255#255'^'#255#255#255#1#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#255#255#255'1'#255#255#255#191#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#241#255#255#255'Q'#255#255#255'Q'#255#255#255#241#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#192#255#255#255'2'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#10#255#255#255#158#255#255 + +#255#253#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#250#255#255#255#147#255#255#255#27#255#255#255')' + +#255#255#255')'#255#255#255#27#255#255#255#147#255#255#255#250#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#253#255#255#255#158#255#255#255#10#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255'<'#255#255#255'A'#255#255#255#209#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#172 + +#255#255#255'&'#255#255#255'W'#255#255#255#221#255#255#255#132#255#255#255 + +#132#255#255#255#221#255#255#255'W'#255#255#255'&'#255#255#255#172#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#209#255 + +#255#255'A'#255#255#255'<'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#255#255#255#255#255#255#255#179#255#255#255'"'#255#255#255'^' + +#255#255#255#233#255#255#255#201#255#255#255'>'#255#255#255'8'#255#255#255 + +#195#255#255#255#255#255#255#255#255#255#255#255#132#255#255#255#132#255#255 + +#255#255#255#255#255#255#255#255#255#203#255#255#255'@'#255#255#255'6'#255 + +#255#255#194#255#255#255#237#255#255#255'o'#255#255#255#30#255#255#255#162 + +#255#255#255#254#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#255#255#255#255#255#255#255#255#255#255#255#245#255#255#255'|'#255#255 + +#255#11#255#255#255''''#255#255#255#175#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#177#255#255#255 + +')'#255#255#255#11#255#255#255'|'#255#255#255#245#255#255#255#255#255#255#255 + +#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#241#255#255#255#22#255 + +#255#255#250#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + ,#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#251#255#255 + +#255#23#255#255#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27 + +#255#255#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255 + +#255#241#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#252#255#255 + +#255'a'#255#255#255'a'#255#255#255#252#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241 + +#255#255#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#192#255#255#255'0'#255#255#255'L' + +#255#255#255'L'#255#255#255'0'#255#255#255#192#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241#255#255 + +#255#255#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#241#255#255#255#27#255#255#255#255#255#255#255#255#255#255#255 + +#227#255#255#255'^'#255#255#255''''#255#255#255#180#255#255#255#255#255#255 + +#255#255#255#255#255#188#255#255#255'-'#255#255#255'M'#255#255#255#222#255 + +#255#255#255#255#255#255#255#255#255#255#27#255#255#255#241#255#255#255#255 + +#255#255#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#241#255#255#255#27#255#255#255#245#255#255#255#128#255#255#255#25#255 + +#255#255#136#255#255#255#249#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#251#255#255#255#153#255#255#255#27#255#255#255 + +'o'#255#255#255#242#255#255#255#27#255#255#255#241#255#255#255#255#255#255 + +#255#255#255#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#241 + +#255#255#255#10#255#255#255#31#255#255#255'k'#255#255#255#236#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#236#255#255#255'k'#255#255 + +#255#31#255#255#255#10#255#255#255#241#255#255#255#255#255#255#255#255#255 + +#255#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#255#255#255#255#255#255#255#255#255#255#255#208#255#255#255'A'#255#255#255 + +#17#255#255#255'<'#255#255#255#222#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#222#255#255#255'<' + +#255#255#255#18#255#255#255'A'#255#255#255#208#255#255#255#255#255#255#255 + +#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255 + +#255#236#255#255#255'o'#255#255#255' '#255#255#255#162#255#255#255#250#255 + +#255#255#153#255#255#255#29#255#255#255'f'#255#255#255#234#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#238#255#255#255'w'#255#255#255#27#255#255#255#136#255#255 + +#255#249#255#255#255#179#255#255#255'$'#255#255#255'^'#255#255#255#232#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#26#255 + +#255#255#133#255#255#255#247#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#241#255#255#255'y'#255#255#255#27#255#255#255#139#255#255#255 + +#248#255#255#255#255#255#255#255#255#255#255#255#248#255#255#255#139#255#255 + +#255#27#255#255#255'{'#255#255#255#242#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#247#255#255#255#134#255#255#255#26#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#30#255#255#255#169 + +#255#255#255#254#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + ,#255#255#255#255#255#255#255#255#227#255#255#255'`'#255#255#255'"'#255#255 + +#255#165#255#255#255#165#255#255#255'"'#255#255#255'a'#255#255#255#228#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#254#255#255#255#169#255#255#255#30#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255';'#255#255#255 + +#201#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#209#255#255#255'6'#255#255#255'6'#255 + +#255#255#209#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#201#255#255#255';'#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#255#255#255#1#255#255#255'U'#255#255#255#223#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#132#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#255#255#255#255#255#255#255#255#255#228#255#255#255'f'#255#255#255#2#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#9#255#255#255'w'#255 + +#255#255#242#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255#132 + +#255#255#255#132#255#255#255#255#255#255#255#255#255#255#255#255#255#255#255 + +#245#255#255#255#136#255#255#255#12#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#255#255#26#255#255#255#153#255 + +#255#255#252#255#255#255#255#255#255#255#132#255#255#255#132#255#255#255#255 + +#255#255#255#254#255#255#255#170#255#255#255#31#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#255#255#255'2'#255#255#255#192#255#255#255#132#255#255#255#132#255 + +#255#255#199#255#255#255'9'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#255#255#255#25#255#255#255#25#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 +]); diff --git a/packages/lib/x86_64-win64/PraAbout.dfm b/packages/lib/x86_64-win64/PraAbout.dfm new file mode 100644 index 0000000..6b27e99 --- /dev/null +++ b/packages/lib/x86_64-win64/PraAbout.dfm @@ -0,0 +1,252 @@ +object FPraViewAbout: TFPraViewAbout + Left = 0 + Top = 0 + BorderStyle = bsNone + ClientHeight = 217 + ClientWidth = 291 + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + OldCreateOrder = False + Position = poScreenCenter + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object Bevel1: TBevel + Left = 0 + Top = 0 + Width = 291 + Height = 217 + Align = alClient + Shape = bsFrame + ExplicitTop = -1 + end + object lbVersion: TLabel + Left = 193 + Top = 49 + Width = 62 + Height = 13 + Alignment = taRightJustify + Caption = 'Version 1.0' + Font.Charset = DEFAULT_CHARSET + Font.Color = clBlack + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Label3: TLabel + Left = 44 + Top = 86 + Width = 204 + Height = 17 + Alignment = taCenter + AutoSize = False + Caption = '(c) 2020-2020 by Paulo Roberto Alves' + ShowAccelChar = False + WordWrap = True + end + object Label5: TLabel + Tag = 1 + Left = 26 + Top = 127 + Width = 250 + Height = 13 + Cursor = crHandPoint + Caption = 'https://github.com/pauloalvis/Delphi-PraButtonStyle' + Font.Charset = DEFAULT_CHARSET + Font.Color = clNavy + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [fsUnderline] + ParentFont = False + ShowAccelChar = False + WordWrap = True + OnClick = Label5Click + end + object Shape1: TShape + Left = 32 + Top = 104 + Width = 229 + Height = 1 + Pen.Color = clGray + end + object Label1: TLabel + Left = 81 + Top = 23 + Width = 177 + Height = 23 + Alignment = taRightJustify + Caption = 'Pra Components' + Font.Charset = DEFAULT_CHARSET + Font.Color = clBlack + Font.Height = -19 + Font.Name = 'Verdana' + Font.Style = [fsBold] + ParentFont = False + Transparent = True + end + object Image1: TImage + Left = 8 + Top = 2 + Width = 80 + Height = 80 + AutoSize = True + Picture.Data = { + 0954506E67496D61676589504E470D0A1A0A0000000D49484452000000500000 + 005008060000008E11F2AD0000000467414D410000B18F0BFC61050000000173 + 52474200AECE1CE900000006624B4744000000000000F943BB7F000000097048 + 597300000048000000480046C96B3E00000A9D4944415478DAED9C0B6C1C4719 + C767E6EEE2D87767A779D82975EB3B3B495128889242036D50510B42A8455529 + 0189974A0A8ECFF123699C776C277171DE0FC73EDBA550158A04A54420528468 + 78B5690B81A0202094D4F69D8B21758AD3FA1E4E62DFEEC7377B9ECBE67CB677 + 6FF71E71EF2F599ED9C7EC37BF9B9DE7374B494E8644336DC0F5AE1C4083CA01 + 34A81C4083CA0134A8AC0558D61DBEB1BFD27E3E3E9C6DCA3A8037B507E6CDA2 + B49150BADCE771DCC98FB9BD8153F8EF3562630DBE6F3806336DA35A590370E9 + B3306BE4AD7015A5B003A34540E0B4DF5378073FE7F206FE4C095D86E68629C0 + 7EB9C0B1DBFF08BD9C699BB9B202A0BB23F00096B8C3182C17C712038CE9DF04 + E8369FC7FE7DBC0F32697B46015678C3CB642A1F445A1F8F3F370D4061FE2906 + F2DADEEAC2573295878C002CED1CB9C9065223061FC53F96E81A6D00C72F25E4 + 39A0910DFEAA1BFCE9CE4B5A01DED80D057952B006616CC5A873AA6B7500141A + C16B8EDAF22E3DFEAF550B82E9CA537A0002507767E8610CECC3479669BA453F + 40A1FFE2BD3BFCF39DDF212BA994EAACA51CA0AB7DF84E4AD9217CD247F5DC67 + 0060346394FC4506B2CEEF71FE3E95F94B19C0F2EE915B408AB4E023BE9CCC73 + 8C025465F1B8C512A9EFA99CD39B8A7C9A0E7069C705C76592BF1E28D988D1D9 + C9A6631E4045639860278C469AFC6B6F78C7CCFC9A07B00998BB388CA50DF662 + AA2546933319A0D045AC8E77BA2ED83B7EB78346CCC8B629005D1DA14F130AFB + 31B1F799911EAA076458EF5F53F833257D6FE0413495A75F6146E2D8EFF90776 + C4D7FBAB1DBF349A9621803846BD1593D885C1CF9B828D97102CC1D688F3704F + 2DBDA23EB1AC1B6C4352F0111A7D5EB149CF3B4125BAAEAFC6F1B76413480AE0 + 92EEC0FC3199EEC09FF29B18B59A90914B08A68D58465BFB2AE70EF3038BDA86 + 0A23D6BC4D3C6C8D5CD9DD533B2FC0C3AE436FCFA179B62D588E6A88813A56A5 + 085278C2C6A0E95C65E1FF520A50290591B007879FCD189D6382F1CA284296A4 + 8DFD35737CB167F092867595AA2E9D50322B3A466E96A9B48D4C319AD1A9108E + AA0FE89DA8D005D0E50D7D8D12F062B0C004834F6085DE80F5D099284AA0E55D + A18700482BC6164F72CFEBD8BFDBDCB7DA714C4C22947785EF0059C60E3AB9C7 + 049B4680508FDFE3783A2500B9A2E3D8486BB2FD3BD43FF1AFC9E771FE581C70 + 770E7F8400DB8FC1151ACD3E456468F0AD71BE288E947B43F761293D80C10F24 + C78E1E073A56A3773CAD1980AB33F845FF6AC78F62BF7C47E06EC2E8112C311F + D2F8A4010AD0D837E87C9AECA0B29246D7F06290192F710FE9B1655CDC8E6394 + C958228B5EE707EE6902AB7F6168155AD88CD1851AD33943645217FB31F04D70 + 7585BEE0AF72FED054806E6F100D863F3120F5B1E9234D7D3F1AC687B4AB07F9 + 7CD6398FB1062C31F518CDD3092E5E63F8F714B1D146315B5DB2EF4D7BBEBD60 + CD3493164A9FD0BFC0DE2EC6CCCAF41A91F9BCE4DDF8866862A313A022A5E227 + B2155FA1FC7E7E4035FAD8A402322163A50721DF3A3B588B19DB8CD12283E0E2 + 15C2743B66C348CBD9EAE2103F70F3D1F07BAC16B90983ABF0CF327E1DEF407F + D76681ADA2D5555D176B90520950DC1AE62DE3158B63FFF94A3A12BD26702BBE + D207F135BFCC64D8DCB7A6F09C722996545771F0AB94611F0E48A9C9E0E27334 + 809DF0EDFE0BCEEF89AAA2A233781B00ECC51267952CA4FE8DD5CEB3FC78747A + 2DB41EC16FC072615727930680B104FE2313D8E91F743E290C566BBC72E7ADE4 + 07530A6EA25D67D1E066756315536C7A8DEEC5882BD1FD690378D528F22A80BC + D6BFA6E88FE2505947F0138C929F62B0309DF0540AC8401EECAF76FE561CD03A + BD967E8051F5E183AF19AF5E5DA624D5E46A3D946AF106EF1900B601FB996FC6 + E5834F6B954F9740C601627DB8C237E87C39560FA95AB814C33BC908ABEFF5D8 + 4F2B31DE532809DEE5F314BE749D010CBE84A38602ACBCEB85F1CA716509931D + C112E236931AAF8BB16ADBA25EEA2CEF087F18887C044F4A68D78AEB0E208995 + B66B7BF9AAEECCB48B4B1AA42C26A9BB2F09464B27AF738089339AA8FFA54313 + FAA353FC303302A07860C2574DA6F2613CF7316DE4E0341F11F555179E8CD937 + 75D5307300AA1E7D0A8854E7F714FD214A45F4CD089F54B865929BCE23BC6675 + 9FB3AC337C3BE38D5302EF86190E501142801FA8BDAEF838D65E606F885B941A + 45405D166974BB9858D5D93D9AB1008586F175DE953FCF7EF4EC4A3ACA0F941D + 7DC7CD2C967D0A65496A1013AEDC8BEBD250B8064BEC76A27D3C3DE3010AF169 + A9AD09875F243A2CC461E3E12416AFDE35008555BFC626B9BEB7CAF977055C7B + 60093076005FF7FB934AEF5D079098BE2E9C0398039803980398039803980398 + 03980398368001EE0FFD989E67A40C2090365FB5B32EFB010279010DFD94881A + F15B3105209057198386DEAAC29763F9E808FE0A73FDC96C0338044077A957F9 + D54AC66FC51840E827C01A13EE64E2D366DEF05708853D640AF78F74011C458B + DAA825D222FCFADCDF0E95903168A1945AD918DBDE535B30C08FEBF55B491220 + F734D839D7E2E83A5D49B9670459D436522ADBE45D00102136BA4D4C9B95775F + 2C02C9BA0D11D462745626009E9018A913ABFC2ADF4165B3600C30902EB573B7 + 46BF15BD00273868AADC4D3660347F3CBBCA664526395AAFFA190E2F9229FB16 + 89F3B24D25C07394C8EBFA3C45CF8B73FC15C52C1FC10B964E72FB0407C9456D + C10592856C430B3C248197AB46807C56FA27EA6D5E933868C6AB07FFB6A8A7CD + CADB43F70203BEEC7A5BAA00BE8D99DA5D30DF79484C7A0A5F187C5D3FA32D95 + 897593AB3BF05E2A6166E34A800680D73A6892D8AE4F5ED72E261A8406FC8649 + B45EF8482BD54C49F0EBF8ACC711E002530172BF68E1CD54FAE4F05CDB286BC6 + 601549C6473A41EB385E02788B7DFB3400CF104637F8563B5E10F7567406EE92 + 65BA4FEF6EA871716FADCEB15972F3C0A34517E3F36A1A402EFE0BF597842A31 + C8EBB97949181BC7911C8BF7E2722F0C7F095BCA1604F8561CC062658FF005FB + 333107CDF6C01299D1561A75D034AA216E41D9A0A35BCF1E127D9D5CEEBDE90D + ADC45776F7645E4D4988B7964F304A76F656392F28C09E82D97424743FF6299F + E371ECBB3D3C76C5F1FCC03A7A89C72B3A83C53210BE5D96EF12B0996306F463 + F636FA3D8E67F56CE24E6A9410BF3DDF9C0C4CF4648D976ABBAC890E9AD19679 + F48A638FF88174DD6DE4D1A9F0BC8AF91BAAB7AB2A0E42A1CF4DE5CF97849425 + D5441E5C690328547E34F47EB0C0410CDE6752E6B869C77D1EC7033CE4F6867E + 6E6041698278EB4B195D870DD15F0D5B695E866343B64364BC2F652C9329D96C + 38E5B26932327DBBABAA2F65684F9BC900791F764FA23D784695B20DD77C4F1B + CBB36D4A762B834900158F7C6CE1B78B16DE6CA57CCBFF6463CDE96402C01308 + 6EAD589C4F95D2F6D50E97777839258CD78FCBB55C9F344020AF510B7BAC6FB5 + FD17E9C8577ABF1BA3CD856D9C836E80CA9CA499BBD1B528231FDE517588F976 + 5547A26B740054A6CCA875AC514C65A55319FDF4D3545F30D2F8E9A7E31289D4 + BDE199D397A93C64C5C7C7127D436B2A80FC1C95B123ACDAEE9A2965054021F5 + 57DC260118FD2AD124DBCA32A1AC02C825262A0885CFFA3DCE7BF931B737F822 + 027C25DDDFC5D2A2AC0328C4B72C88D911BEBE21B646649BB216E0F5A21C4083 + CA0134A81C4083CA0134A81C4083FA3F0751CCABFD6E1A170000002574455874 + 646174653A63726561746500323032302D30342D32355431383A35323A33372B + 30303A3030B21751C80000002574455874646174653A6D6F6469667900323032 + 302D30342D32355431383A35323A33372B30303A3030C34AE974000000287445 + 58747376673A626173652D7572690066696C653A2F2F2F746D702F6D61676963 + 6B2D3732724D4C3242639FF112BC0000000049454E44AE426082} + end + object Label4: TLabel + Left = 32 + Top = 111 + Width = 229 + Height = 13 + Alignment = taCenter + AutoSize = False + Caption = 'Visit my github for more information:' + end + object Label8: TLabel + Left = 55 + Top = 151 + Width = 40 + Height = 13 + Caption = 'contact:' + end + object Label9: TLabel + Tag = 2 + Left = 103 + Top = 151 + Width = 137 + Height = 13 + Cursor = crDrag + Caption = 'pauloalvis@hotmail.com' + Font.Charset = DEFAULT_CHARSET + Font.Color = clBlack + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [fsBold, fsUnderline] + ParentFont = False + ShowAccelChar = False + WordWrap = True + end + object Label10: TLabel + Left = 240 + Top = 14 + Width = 3 + Height = 13 + Caption = ' ' + Font.Charset = DEFAULT_CHARSET + Font.Color = clBlack + Font.Height = -11 + Font.Name = 'Tahoma' + Font.Style = [] + ParentFont = False + Transparent = True + end + object Button1: TButton + Left = 106 + Top = 184 + Width = 75 + Height = 25 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 0 + end +end diff --git a/packages/lib/x86_64-win64/PraAbout.ppu b/packages/lib/x86_64-win64/PraAbout.ppu new file mode 100644 index 0000000..db8de3e Binary files /dev/null and b/packages/lib/x86_64-win64/PraAbout.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleBack.ppu b/packages/lib/x86_64-win64/PraButtonStyleBack.ppu new file mode 100644 index 0000000..4904472 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleBack.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleCancel.ppu b/packages/lib/x86_64-win64/PraButtonStyleCancel.ppu new file mode 100644 index 0000000..a9dcdc8 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleCancel.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleClose.ppu b/packages/lib/x86_64-win64/PraButtonStyleClose.ppu new file mode 100644 index 0000000..4c8ac68 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleClose.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleDelete.ppu b/packages/lib/x86_64-win64/PraButtonStyleDelete.ppu new file mode 100644 index 0000000..53a2802 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleDelete.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleEdit.ppu b/packages/lib/x86_64-win64/PraButtonStyleEdit.ppu new file mode 100644 index 0000000..7d4c425 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleEdit.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleEmail.ppu b/packages/lib/x86_64-win64/PraButtonStyleEmail.ppu new file mode 100644 index 0000000..aa798c8 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleEmail.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleGear.ppu b/packages/lib/x86_64-win64/PraButtonStyleGear.ppu new file mode 100644 index 0000000..3c7e47a Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleGear.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleHeart.ppu b/packages/lib/x86_64-win64/PraButtonStyleHeart.ppu new file mode 100644 index 0000000..6c8df51 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleHeart.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleInsert.ppu b/packages/lib/x86_64-win64/PraButtonStyleInsert.ppu new file mode 100644 index 0000000..0be53f0 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleInsert.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleMenu.ppu b/packages/lib/x86_64-win64/PraButtonStyleMenu.ppu new file mode 100644 index 0000000..1d3f04e Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleMenu.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStylePrint.ppu b/packages/lib/x86_64-win64/PraButtonStylePrint.ppu new file mode 100644 index 0000000..1dc62ff Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStylePrint.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleReport.ppu b/packages/lib/x86_64-win64/PraButtonStyleReport.ppu new file mode 100644 index 0000000..ca741a0 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleReport.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleSave.ppu b/packages/lib/x86_64-win64/PraButtonStyleSave.ppu new file mode 100644 index 0000000..80b92bc Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleSave.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateDanger.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateDanger.ppu new file mode 100644 index 0000000..79c27c6 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateDanger.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateDark.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateDark.ppu new file mode 100644 index 0000000..f2d4c72 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateDark.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateGear.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateGear.ppu new file mode 100644 index 0000000..d3e6b29 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateGear.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateHeart.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateHeart.ppu new file mode 100644 index 0000000..062568e Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateHeart.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateInfo.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateInfo.ppu new file mode 100644 index 0000000..6282832 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateInfo.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateLight.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateLight.ppu new file mode 100644 index 0000000..c3b9c06 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateLight.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplatePrimary.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplatePrimary.ppu new file mode 100644 index 0000000..a281a5e Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplatePrimary.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateSecondary.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateSecondary.ppu new file mode 100644 index 0000000..c56093f Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateSecondary.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateSuccess.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateSuccess.ppu new file mode 100644 index 0000000..55e4e69 Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateSuccess.ppu differ diff --git a/packages/lib/x86_64-win64/PraButtonStyleTemplateWarning.ppu b/packages/lib/x86_64-win64/PraButtonStyleTemplateWarning.ppu new file mode 100644 index 0000000..5e625cf Binary files /dev/null and b/packages/lib/x86_64-win64/PraButtonStyleTemplateWarning.ppu differ diff --git a/packages/lib/x86_64-win64/PraConsts.ppu b/packages/lib/x86_64-win64/PraConsts.ppu new file mode 100644 index 0000000..f9edc8e Binary files /dev/null and b/packages/lib/x86_64-win64/PraConsts.ppu differ diff --git a/packages/lib/x86_64-win64/PraInterfaces.ppu b/packages/lib/x86_64-win64/PraInterfaces.ppu new file mode 100644 index 0000000..919fac3 Binary files /dev/null and b/packages/lib/x86_64-win64/PraInterfaces.ppu differ diff --git a/packages/lib/x86_64-win64/PraUtils.ppu b/packages/lib/x86_64-win64/PraUtils.ppu new file mode 100644 index 0000000..8f45099 Binary files /dev/null and b/packages/lib/x86_64-win64/PraUtils.ppu differ diff --git a/packages/lib/x86_64-win64/button1.ppu b/packages/lib/x86_64-win64/button1.ppu new file mode 100644 index 0000000..42a619e Binary files /dev/null and b/packages/lib/x86_64-win64/button1.ppu differ diff --git a/packages/lib/x86_64-win64/fkprabuttonstyle.ppu b/packages/lib/x86_64-win64/fkprabuttonstyle.ppu new file mode 100644 index 0000000..8a12ad8 Binary files /dev/null and b/packages/lib/x86_64-win64/fkprabuttonstyle.ppu differ diff --git a/packages/lib/x86_64-win64/laz_pracomponents.compiled b/packages/lib/x86_64-win64/laz_pracomponents.compiled new file mode 100644 index 0000000..d5edadd --- /dev/null +++ b/packages/lib/x86_64-win64/laz_pracomponents.compiled @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/lib/x86_64-win64/prabuttonstyle.ppu b/packages/lib/x86_64-win64/prabuttonstyle.ppu new file mode 100644 index 0000000..50c8d7f Binary files /dev/null and b/packages/lib/x86_64-win64/prabuttonstyle.ppu differ diff --git a/packages/lib/x86_64-win64/pracomponents.compiled b/packages/lib/x86_64-win64/pracomponents.compiled new file mode 100644 index 0000000..97400e4 --- /dev/null +++ b/packages/lib/x86_64-win64/pracomponents.compiled @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/lib/x86_64-win64/pracomponents.ppu b/packages/lib/x86_64-win64/pracomponents.ppu new file mode 100644 index 0000000..02a59b9 Binary files /dev/null and b/packages/lib/x86_64-win64/pracomponents.ppu differ diff --git a/packages/pracomponents.dproj b/packages/pracomponents.dproj index c0c1f8c..2aa3516 100644 --- a/packages/pracomponents.dproj +++ b/packages/pracomponents.dproj @@ -2,7 +2,7 @@ {43D2776C-0763-4C18-B2B1-846ECC39F391} pracomponents.dpk - 18.8 + 19.2 VCL True Debug @@ -18,26 +18,6 @@ Base true - - true - Base - true - - - true - Base - true - - - true - Base - true - - - true - Base - true - true Base @@ -88,21 +68,7 @@ None android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services-ads-7.0.0.dex.jar;google-play-services-analytics-7.0.0.dex.jar;google-play-services-base-7.0.0.dex.jar;google-play-services-identity-7.0.0.dex.jar;google-play-services-maps-7.0.0.dex.jar;google-play-services-panorama-7.0.0.dex.jar;google-play-services-plus-7.0.0.dex.jar;google-play-services-wallet-7.0.0.dex.jar;google-play-services.dex.jar rtl;dbrtl;$(DCC_UsePackage) - - - None - rtl;dbrtl;$(DCC_UsePackage) - - - None - rtl;dbrtl;$(DCC_UsePackage) - - - None - rtl;dbrtl;$(DCC_UsePackage) - - - rtl;dbrtl;$(DCC_UsePackage) + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_192x192.png Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) @@ -404,7 +370,6 @@ 1 - Contents\MacOS 0 @@ -413,6 +378,10 @@ classes 1 + + classes + 1 + @@ -435,6 +404,10 @@ library\lib\armeabi 1 + + library\lib\armeabi + 1 + @@ -447,12 +420,20 @@ library\lib\mips 1 + + library\lib\mips + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + @@ -465,12 +446,20 @@ res\drawable 1 + + res\drawable + 1 + res\values 1 + + res\values + 1 + @@ -497,36 +486,70 @@ res\drawable 1 + + res\drawable + 1 + res\drawable-xxhdpi 1 + + res\drawable-xxhdpi + 1 + + + + + res\drawable-xxxhdpi + 1 + + + res\drawable-xxxhdpi + 1 + res\drawable-ldpi 1 + + res\drawable-ldpi + 1 + res\drawable-mdpi 1 + + res\drawable-mdpi + 1 + res\drawable-hdpi 1 + + res\drawable-hdpi + 1 + res\drawable-xhdpi 1 + + res\drawable-xhdpi + 1 + @@ -583,24 +606,40 @@ res\drawable-small 1 + + res\drawable-small + 1 + res\drawable-normal 1 + + res\drawable-normal + 1 + res\drawable-large 1 + + res\drawable-large + 1 + res\drawable-xlarge 1 + + res\drawable-xlarge + 1 + @@ -628,6 +667,10 @@ 1 .framework + + 1 + .framework + 0 @@ -637,6 +680,10 @@ 1 .dylib + + 1 + .dylib + 0 .dll;.bpl @@ -659,6 +706,10 @@ 1 .dylib + + 1 + .dylib + 0 .bpl @@ -668,6 +719,9 @@ 0 + + 0 + 0 @@ -680,10 +734,39 @@ 0 + + 0 + 0 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 @@ -816,6 +899,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -838,6 +931,66 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 @@ -937,6 +1090,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -948,6 +1111,16 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + 1 @@ -992,10 +1165,93 @@ 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 + + 1 + + 1 + @@ -1010,6 +1266,7 @@ + 1 @@ -1029,12 +1286,20 @@ Contents\Resources 1 + + Contents\Resources + 1 + library\lib\armeabi-v7a 1 + + library\lib\arm64-v8a + 1 + 1 @@ -1050,6 +1315,9 @@ 1 + + 1 + 0 @@ -1101,10 +1369,6 @@ False - False - False - False - False True False diff --git a/packages/pracomponents.lpk b/packages/pracomponents.lpk new file mode 100644 index 0000000..afee5e2 --- /dev/null +++ b/packages/pracomponents.lpk @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/PraButtonStyle.pas b/source/PraButtonStyle.pas index 8af83a7..cb0e795 100644 --- a/source/PraButtonStyle.pas +++ b/source/PraButtonStyle.pas @@ -2,6 +2,7 @@ // Delphi PraButtonStyle // // Copyright (c) 2020-2020 Paulo Roberto Alves +// convertido para Lazarus FCP 2023 Francisco Aurino // // https://github.com/pauloalvis/Delphi-PraButtonStyle // @@ -34,6 +35,21 @@ interface uses + + +{$IF DEFINED(FPC)} + Graphics, + buttons, + SysUtils, + Classes, + System.UITypes, +LCLStrConsts, LCLType, LCLProc, LMessages, LCLIntf, InterfaceBase, + Controls, + Messages, + Windows, + Math, + PraInterfaces +{$ELSE} // DEFINE DELPHI Vcl.Graphics, Vcl.buttons, System.SysUtils, @@ -43,7 +59,9 @@ interface Winapi.Messages, Winapi.Windows, System.Math, - PraInterfaces; + PraInterfaces +{$ENDIF} ; + type TPraAlignment = (paLeftJustify, paCenter); @@ -266,7 +284,6 @@ TPraButtonStyle = class(TGraphicControl) public property Focused: Boolean read GetFocused; property CanFocus: Boolean read GetCanFocus; - procedure SetFocus; procedure Click; override; procedure Assign(Source: TPersistent); override; @@ -286,20 +303,23 @@ TPraButtonStyle = class(TGraphicControl) property Constraints; property ParentShowHint; property ShowHint; - property Touch; + //property Touch ; + {$IF DEFINED(DELPHI)} property Touch , {$ENDIF} property Visible; property OnContextPopup; property OnDragDrop; property OnDragOver; property OnEndDock; property OnEndDrag; - property OnMouseActivate; + //property OnMouseActivate; + {$IF DEFINED(DELPHI)} property OnMouseActivate , {$ENDIF} property OnMouseDown; property OnMouseEnter; property OnMouseLeave; property OnMouseMove; property OnMouseUp; - property OnGesture; + // property OnGesture; + {$IF DEFINED(DELPHI)} property OnGesture , {$ENDIF} property OnStartDock; property OnStartDrag; property OnClick; @@ -353,7 +373,14 @@ TPraButtonStyle = class(TGraphicControl) implementation -uses Vcl.Forms, +uses + + {$IF DEFINED(FPC)} + Forms, + {$ELSE} // DEFINE DELPHI + Vcl.Forms, + {$ENDIF} + PraButtonStyleSave, PraButtonStyleEdit, PraButtonStyleGear, diff --git a/source/PraButtonStyleBack.pas b/source/PraButtonStyleBack.pas index 82f97de..df9c324 100644 --- a/source/PraButtonStyleBack.pas +++ b/source/PraButtonStyleBack.pas @@ -36,8 +36,11 @@ interface uses PraInterfaces, - Vcl.Graphics; - +{$IF DEFINED(FPC)} + Graphics +{$ELSE} // DEFINE DELPHI + Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleBack = class(TInterfacedObject, iPraButtonStyleTemplateType) private @@ -73,9 +76,17 @@ TPraButtonStyleBack = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses + +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; + constructor TPraButtonStyleBack.Create; begin diff --git a/source/PraButtonStyleCancel.pas b/source/PraButtonStyleCancel.pas index ee06386..7eaca7b 100644 --- a/source/PraButtonStyleCancel.pas +++ b/source/PraButtonStyleCancel.pas @@ -35,8 +35,14 @@ interface uses + +{$IF DEFINED(FPC)} + PraInterfaces, + Graphics +{$ELSE} // DEFINE DELPHI PraInterfaces, - Vcl.Graphics; + Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleCancel = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,9 +79,15 @@ TPraButtonStyleCancel = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleCancel.Create; begin diff --git a/source/PraButtonStyleClose.pas b/source/PraButtonStyleClose.pas index 2afefc5..35c032d 100644 --- a/source/PraButtonStyleClose.pas +++ b/source/PraButtonStyleClose.pas @@ -35,8 +35,14 @@ interface uses + +{$IF DEFINED(FPC)} + PraInterfaces, + Graphics +{$ELSE} // DEFINE DELPHI PraInterfaces, - Vcl.Graphics; + Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleClose = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,9 +79,15 @@ TPraButtonStyleClose = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleClose.Create; begin diff --git a/source/PraButtonStyleDelete.pas b/source/PraButtonStyleDelete.pas index 26e9355..cdb30e3 100644 --- a/source/PraButtonStyleDelete.pas +++ b/source/PraButtonStyleDelete.pas @@ -35,8 +35,13 @@ interface uses - PraInterfaces, - Vcl.Graphics; +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleDelete = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,9 +78,15 @@ TPraButtonStyleDelete = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleDelete.Create; begin diff --git a/source/PraButtonStyleEdit.pas b/source/PraButtonStyleEdit.pas index 5e8262c..27d7243 100644 --- a/source/PraButtonStyleEdit.pas +++ b/source/PraButtonStyleEdit.pas @@ -35,8 +35,14 @@ interface uses - PraInterfaces, - Vcl.Graphics; + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleEdit = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,9 +79,15 @@ TPraButtonStyleEdit = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleEdit.Create; begin diff --git a/source/PraButtonStyleEmail.pas b/source/PraButtonStyleEmail.pas index 24e4dc7..fd0e8d1 100644 --- a/source/PraButtonStyleEmail.pas +++ b/source/PraButtonStyleEmail.pas @@ -35,8 +35,14 @@ interface uses - PraInterfaces, - Vcl.Graphics; + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleEmail = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,9 +79,15 @@ TPraButtonStyleEmail = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleEmail.Create; begin diff --git a/source/PraButtonStyleGear.pas b/source/PraButtonStyleGear.pas index 72347f2..235a19b 100644 --- a/source/PraButtonStyleGear.pas +++ b/source/PraButtonStyleGear.pas @@ -35,8 +35,14 @@ interface uses - PraInterfaces, - Vcl.Graphics; + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleGear = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,9 +79,15 @@ TPraButtonStyleGear = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleGear.Create; begin diff --git a/source/PraButtonStyleHeart.pas b/source/PraButtonStyleHeart.pas index fee63a8..84811e6 100644 --- a/source/PraButtonStyleHeart.pas +++ b/source/PraButtonStyleHeart.pas @@ -35,8 +35,14 @@ interface uses - PraInterfaces, - vcl.Graphics; + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +vcl.Graphics +{$ENDIF} ; type TPraButtonStyleHeart = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,9 +79,15 @@ TPraButtonStyleHeart = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleHeart.Create; begin diff --git a/source/PraButtonStyleInsert.pas b/source/PraButtonStyleInsert.pas index 2a9da26..75e604a 100644 --- a/source/PraButtonStyleInsert.pas +++ b/source/PraButtonStyleInsert.pas @@ -35,8 +35,14 @@ interface uses - PraInterfaces, - Vcl.Graphics; + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleInsert = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,9 +79,15 @@ TPraButtonStyleInsert = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleInsert.Create; begin diff --git a/source/PraButtonStyleMenu.pas b/source/PraButtonStyleMenu.pas index fba8092..1550b1b 100644 --- a/source/PraButtonStyleMenu.pas +++ b/source/PraButtonStyleMenu.pas @@ -35,9 +35,14 @@ interface uses - PraInterfaces, - Vcl.Graphics; +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; type TPraButtonStyleMenu = class(TInterfacedObject, iPraButtonStyleTemplateType) private @@ -73,9 +78,15 @@ TPraButtonStyleMenu = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStyleMenu.Create; begin diff --git a/source/PraButtonStylePrint.pas b/source/PraButtonStylePrint.pas index f3f727f..fa098fd 100644 --- a/source/PraButtonStylePrint.pas +++ b/source/PraButtonStylePrint.pas @@ -35,9 +35,14 @@ interface uses - PraInterfaces, - Vcl.Graphics; +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; type TPraButtonStylePrint = class(TInterfacedObject, iPraButtonStyleTemplateType) private @@ -73,9 +78,15 @@ TPraButtonStylePrint = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts +{$ELSE} // DEFINE DELPHI PraUtils, System.SysUtils, - PraConsts; + PraConsts +{$ENDIF} ; constructor TPraButtonStylePrint.Create; begin diff --git a/source/PraButtonStyleReport.pas b/source/PraButtonStyleReport.pas index 20248e5..f481589 100644 --- a/source/PraButtonStyleReport.pas +++ b/source/PraButtonStyleReport.pas @@ -35,8 +35,13 @@ interface uses + {$IF DEFINED(FPC)} PraInterfaces, - Vcl.Graphics; + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraButtonStyleReport = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,10 +78,15 @@ TPraButtonStyleReport = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses - PraUtils, - System.SysUtils, - PraConsts; - + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraButtonStyleReport.Create; begin FPicture := TPicture.Create; diff --git a/source/PraButtonStyleSave.pas b/source/PraButtonStyleSave.pas index 63fffee..92ea25f 100644 --- a/source/PraButtonStyleSave.pas +++ b/source/PraButtonStyleSave.pas @@ -35,8 +35,13 @@ interface uses + {$IF DEFINED(FPC)} PraInterfaces, - vcl.Graphics; + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraButtonStyleSave = class(TInterfacedObject, iPraButtonStyleTemplateType) @@ -73,10 +78,15 @@ TPraButtonStyleSave = class(TInterfacedObject, iPraButtonStyleTemplateType) implementation uses - PraUtils, - System.SysUtils, - PraConsts; - + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraButtonStyleSave.Create; begin FPicture := TPicture.Create; diff --git a/source/PraButtonStyleTemplateDanger.pas b/source/PraButtonStyleTemplateDanger.pas index 194fcc9..7645ac6 100644 --- a/source/PraButtonStyleTemplateDanger.pas +++ b/source/PraButtonStyleTemplateDanger.pas @@ -35,8 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) @@ -110,8 +115,15 @@ TPraButtonStyleTemplateDanger = class(TInterfacedObject, iPraButtonStyleTempla implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraButtonStyleTemplateDark.pas b/source/PraButtonStyleTemplateDark.pas index 73dbf2d..c8ae93e 100644 --- a/source/PraButtonStyleTemplateDark.pas +++ b/source/PraButtonStyleTemplateDark.pas @@ -35,8 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; + {$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) @@ -110,8 +115,15 @@ TPraButtonStyleTemplateDark = class(TInterfacedObject, iPraButtonStyleTemplate implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraButtonStyleTemplateGear.pas b/source/PraButtonStyleTemplateGear.pas index 4d80dce..7637de5 100644 --- a/source/PraButtonStyleTemplateGear.pas +++ b/source/PraButtonStyleTemplateGear.pas @@ -35,9 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; - + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) private @@ -110,8 +114,15 @@ TPraButtonStyleTemplateGear = class(TInterfacedObject, iPraButtonStyleTemplate implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraButtonStyleTemplateHeart.pas b/source/PraButtonStyleTemplateHeart.pas index b7a2fcb..957a751 100644 --- a/source/PraButtonStyleTemplateHeart.pas +++ b/source/PraButtonStyleTemplateHeart.pas @@ -35,8 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) @@ -110,9 +115,15 @@ TPraButtonStyleTemplateHeart = class(TInterfacedObject, iPraButtonStyleTemplat implementation uses - System.SysUtils, - PraConsts; - + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin FFont := TFont.Create; diff --git a/source/PraButtonStyleTemplateInfo.pas b/source/PraButtonStyleTemplateInfo.pas index bc2ae36..75d16c6 100644 --- a/source/PraButtonStyleTemplateInfo.pas +++ b/source/PraButtonStyleTemplateInfo.pas @@ -35,8 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) @@ -110,8 +115,15 @@ TPraButtonStyleTemplateInfo = class(TInterfacedObject, iPraButtonStyleTemplate implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraButtonStyleTemplateLight.pas b/source/PraButtonStyleTemplateLight.pas index 8e88fb2..2c94dba 100644 --- a/source/PraButtonStyleTemplateLight.pas +++ b/source/PraButtonStyleTemplateLight.pas @@ -35,8 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) @@ -110,8 +115,15 @@ TPraButtonStyleTemplateLight = class(TInterfacedObject, iPraButtonStyleTemplat implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraButtonStyleTemplatePrimary.pas b/source/PraButtonStyleTemplatePrimary.pas index fb4bfe3..69add97 100644 --- a/source/PraButtonStyleTemplatePrimary.pas +++ b/source/PraButtonStyleTemplatePrimary.pas @@ -35,8 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) @@ -110,8 +115,15 @@ TPraButtonStyleTemplatePrimary = class(TInterfacedObject, iPraButtonStyleTempl implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraButtonStyleTemplateSecondary.pas b/source/PraButtonStyleTemplateSecondary.pas index 4af2fef..25e6c9f 100644 --- a/source/PraButtonStyleTemplateSecondary.pas +++ b/source/PraButtonStyleTemplateSecondary.pas @@ -35,8 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) @@ -110,8 +115,15 @@ TPraButtonStyleTemplateSecondary = class(TInterfacedObject, iPraButtonStyleTem implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraButtonStyleTemplateSuccess.pas b/source/PraButtonStyleTemplateSuccess.pas index 257d045..5794bbc 100644 --- a/source/PraButtonStyleTemplateSuccess.pas +++ b/source/PraButtonStyleTemplateSuccess.pas @@ -35,9 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; - + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) private @@ -110,8 +114,15 @@ TPraButtonStyleTemplateSuccess = class(TInterfacedObject, iPraButtonStyleTempl implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraButtonStyleTemplateWarning.pas b/source/PraButtonStyleTemplateWarning.pas index a829bc0..5665c4d 100644 --- a/source/PraButtonStyleTemplateWarning.pas +++ b/source/PraButtonStyleTemplateWarning.pas @@ -35,8 +35,13 @@ interface uses - Vcl.Graphics, - PraInterfaces; + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; type TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) @@ -110,8 +115,15 @@ TPraButtonStyleTemplateWarning = class(TInterfacedObject, iPraButtonStyleTempl implementation uses - System.SysUtils, - PraConsts; + {$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts + {$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts + {$ENDIF} ; constructor TPraFontConfiguration.Create; begin diff --git a/source/PraInterfaces.pas b/source/PraInterfaces.pas index 16ce271..ec9b77d 100644 --- a/source/PraInterfaces.pas +++ b/source/PraInterfaces.pas @@ -35,7 +35,16 @@ interface uses - Vcl.Graphics; + {$IF DEFINED(FPC)} + Graphics, + Classes, + SysUtils, + RegExpr, + Generics.Collections + {$ELSE} // DEFINE DELPHI + Vcl.Graphics + {$ENDIF} ; + type iPraPenConfigurationCommon = interface diff --git a/source/backup/PraButtonStyle.pas.bak b/source/backup/PraButtonStyle.pas.bak new file mode 100644 index 0000000..3e91d01 --- /dev/null +++ b/source/backup/PraButtonStyle.pas.bak @@ -0,0 +1,1725 @@ +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// convertido para Lazarus FCP 2023 Francisco Aurino +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** +unit PraButtonStyle; + +interface + +uses + + +{$IF DEFINED(FPC)} + Graphics, + buttons, + SysUtils, + Classes, + System.UITypes, +LCLStrConsts, LCLType, LCLProc, LMessages, LCLIntf, InterfaceBase, + Controls, + Messages, + Windows, + Math, + PraInterfaces +{$ELSE} // DEFINE DELPHI + Vcl.Graphics, + Vcl.buttons, + System.SysUtils, + System.Classes, + System.UITypes, + Vcl.Controls, + Winapi.Messages, + Winapi.Windows, + System.Math, + PraInterfaces +{$ENDIF} ; + + +type + TPraAlignment = (paLeftJustify, paCenter); + TPictureLayout = (plGraphicCenter, plGraphicBottom, plGraphicTop); + TPraButtonStyleType = (stRoundRect, stRectangle); + TPraButtonStyleStyle = (bsCustom, bsPrimary, bsSecondary, bsSuccess, bsDanger, bsWarning, bsInfo, bsLight, bsDark); + TTemplateStyle = (tsNone = 0, tsSave = 1, tsCancel = 2, tsEdit = 3, tsDelete = 4, tsPrint = 5, tsGear = 6, tsMenu = 7, tsHeart = 8, tsEmail = 9, tsInsert = 10, tsBack = 11, tsClose = 12, + tsReport = 13); + + TPraButtonStyle = class; + + TFocusControl = class(TWinControl) + private + FGraphicControl: TPraButtonStyle; + protected + procedure WndProc(var Message: TMessage); override; + procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN; + procedure WMKeyUp(var Message: TWMKeyDown); message WM_KEYUP; + public + constructor Create(AOwner: TComponent; AGraphicControl: TPraButtonStyle); reintroduce; + property TabStop default false; + property TabOrder; + end; + + TPraButtonChangeFont = procedure(const Value: Boolean) of Object; + + TPraButtonFont = class(TFont) + private + FCopyOfFont: Boolean; + FonChange: TPraButtonChangeFont; + + function IsCopyOfFont: Boolean; + procedure SetCopyOfFont(const Value: Boolean); + published + property CopyOfFont: Boolean read FCopyOfFont write SetCopyOfFont stored IsCopyOfFont default false; + public + property onChange: TPraButtonChangeFont read FonChange write FonChange; + end; + + TPraButtonStyle = class(TGraphicControl) + private + FPraButtonStyleTemplate: iPraButtonStyleTemplate; + FPraButtonStyleTemplateType: iPraButtonStyleTemplateType; + + FMouseEnter: Boolean; + FState: TButtonState; + FFocusControl: TFocusControl; + FControllerStyleTemplate: Boolean; + + FPen: TPen; + FPenDown: TPen; + FPenFocused: TPen; + FPenDisabled: TPen; + + FBrush: TBrush; + FBrushDown: TBrush; + FBrushFocused: TBrush; + FBrushDisabled: TBrush; + + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureDisabled: TPicture; + FPictureMarginLeft: SmallInt; + + FFontDown: TPraButtonFont; + FFontFocused: TPraButtonFont; + FFontDisabled: TPraButtonFont; + + FCaption: TCaption; + FShowCaption: Boolean; + + FRadius: SmallInt; + FSpacing: SmallInt; + + FClickOnEnter: Boolean; + FAlignment: TPraAlignment; + + FShape: TPraButtonStyleType; + FPictureCenter: Boolean; + FStyle: TPraButtonStyleStyle; + FStyleOutline: Boolean; + FAboutInfo: String; + FTemplateStyle: TTemplateStyle; + FPictureLayout: TPictureLayout; + + FImageList: TImageList; + FImageIndexPicture: Integer; + FImageIndexPictureFocused: Integer; + FImageIndexPictureDisabled: Integer; + + procedure SetPen(Value: TPen); + procedure SetPenDown(const Value: TPen); + procedure SetPenFocused(const Value: TPen); + procedure SetPenDisabled(const Value: TPen); + + procedure SetBrush(Value: TBrush); + procedure SetBrushDown(const Value: TBrush); + procedure SetBrushFocused(const Value: TBrush); + procedure SetBrushDisabled(const Value: TBrush); + + procedure SetPicture(const Value: TPicture); + procedure SetPictureFocused(const Value: TPicture); + procedure SetPictureDisabled(const Value: TPicture); + procedure SetPictureMarginLeft(const Value: SmallInt); + + procedure SetFontDown(const Value: TPraButtonFont); + procedure SetFontFocused(const Value: TPraButtonFont); + procedure SetFontDisabled(const Value: TPraButtonFont); + + function IsRadius: Boolean; + function IsSpacing: Boolean; + function IsShowCaption: Boolean; + function IsClickOnEnter: Boolean; + function IsStoredAlignment: Boolean; + function IsPictureMarginLeft: Boolean; + + function GetTabOrder: Integer; + procedure SetTabStop(const Value: Boolean); + + function GetTabStop: Boolean; + procedure SetTabOrder(const Value: Integer); + + function GetFocused: Boolean; + function GetCanFocus: Boolean; + + procedure SetRadius(const Value: SmallInt); + procedure SetCaption(const Value: TCaption); + procedure SetSpacing(const Value: SmallInt); + procedure SetShape(Value: TPraButtonStyleType); + procedure SetShowCaption(const Value: Boolean); + procedure SetAlignment(const Value: TPraAlignment); + + procedure DestroyFocusControl; + procedure SetClickOnEnter(const Value: Boolean); + procedure CreateFocusControl(AOwner: TComponent; AParent: TWinControl); + procedure WMEraseBkgnd(var Message: TWMEraseBkGnd); message WM_ERASEBKGND; + procedure DoMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + procedure DoMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + function isPictureCenter: Boolean; + procedure SetPictureCenter(const Value: Boolean); + function informedPicture: Boolean; + + function GetPictureMarginLeft: SmallInt; + function GetPictureWidth: SmallInt; + function GetPictureHeight: SmallInt; + function GetSpacing: SmallInt; + function IsStoredStyle: Boolean; + procedure SetStyle(const Value: TPraButtonStyleStyle); + function IsStyleOutline: Boolean; + procedure SetStyleOutline(const Value: Boolean); + function IsStoredTemplateStyle: Boolean; + procedure SetTemplateStyle(const Value: TTemplateStyle); + + procedure StyleChanged(Sender: TObject); + procedure StyleOutlineConfig; + + procedure FontDownCopyOfFont(const AValue: Boolean); + procedure FontFocusedCopyOfFont(const AValue: Boolean); + procedure FontDisabledCopyOfFont(const AValue: Boolean); + + procedure LoadingTemplateInfo; + procedure LoadingTemplateDark; + procedure LoadingTemplateLight; + procedure LoadingTemplateDanger; + procedure LoadingTemplateSuccess; + procedure LoadingTemplateWarning; + procedure LoadingTemplatePrimary; + procedure LoadingTemplateSecondary; + procedure LoadingTemplateHeart; + procedure ApplyTemplate; + + procedure CreateButtonInfo; + procedure CreateButtonDark; + procedure CreateButtonLight; + procedure CreateButtonDanger; + procedure CreateButtonSuccess; + procedure CreateButtonWarning; + procedure CreateButtonPrimary; + procedure CreateButtonSecondary; + + procedure CreateButtonPrint; + procedure CreateButtonSave; + procedure CreateButtonEdit; + procedure CreateButtonDelete; + procedure CreateButtonCancel; + procedure CreateButtonGear; + procedure CreateButtonMenu; + procedure CreateButtonHeart; + procedure CreateButtonEmail; + procedure CreateButtonInsert; + procedure CreateButtonBack; + procedure CreateButtonClose; + procedure CreateButtonReport; + + procedure SetPictureTemplate; + + procedure CreateButtonDefault; + procedure SetSize(const AHeight, AWidth: Integer); + function isTemplateStyle: Boolean; + function IsPictureLayout: Boolean; + procedure SetPictureLayout(const Value: TPictureLayout); + + procedure SetImageList(const Value: TImageList); + procedure SetImageIndexPicture(const Value: Integer); + procedure SetImageIndexPictureFocused(const Value: Integer); + procedure SetImageIndexPictureDisabled(const Value: Integer); + function IsImageIndexPicture: Boolean; + function IsImageIndexPictureDisabled: Boolean; + function IsImageIndexPictureFocused: Boolean; + protected + procedure DoKeyUp; + procedure Paint; override; + procedure SetParent(AParent: TWinControl); override; + procedure DoKeyDown(var Key: Word; Shift: TShiftState); + procedure CMEnter(var Message: TCMEnter); message CM_ENTER; + procedure ChangeScale(M, D: Integer; isDpiChange: Boolean); override; + procedure CMMouseEnter(var Message: TNotifyEvent); message CM_MOUSEENTER; + procedure CMMouseLeave(var Message: TNotifyEvent); message CM_MOUSELEAVE; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + public + property Focused: Boolean read GetFocused; + property CanFocus: Boolean read GetCanFocus; + procedure SetFocus; + procedure Click; override; + procedure Assign(Source: TPersistent); override; + procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Action; + property Align; + property Anchors; + property Cursor default crHandPoint; + property DragCursor; + property DragKind; + property DragMode; + property Enabled; + property Constraints; + property ParentShowHint; + property ShowHint; + //property Touch ; + {$IF DEFINED(DELPHI)} property Touch , {$ENDIF} + property Visible; + property OnContextPopup; + property OnDragDrop; + property OnDragOver; + property OnEndDock; + property OnEndDrag; + //property OnMouseActivate; + {$IF DEFINED(DELPHI)} property OnMouseActivate , {$ENDIF} + property OnMouseDown; + property OnMouseEnter; + property OnMouseLeave; + property OnMouseMove; + property OnMouseUp; + // property OnGesture; + {$IF DEFINED(DELPHI)} property OnGesture , {$ENDIF} + property OnStartDock; + property OnStartDrag; + property OnClick; + property Font; + property ParentFont default true; + + property Pen: TPen read FPen write SetPen; + property PenDown: TPen read FPenDown write SetPenDown; + property PenFocused: TPen read FPenFocused write SetPenFocused; + property PenDisabled: TPen read FPenDisabled write SetPenDisabled; + + property Brush: TBrush read FBrush write SetBrush; + property BrushDown: TBrush read FBrushDown write SetBrushDown; + property BrushFocused: TBrush read FBrushFocused write SetBrushFocused; + property BrushDisabled: TBrush read FBrushDisabled write SetBrushDisabled; + + property Picture: TPicture read FPicture write SetPicture; + property PictureFocused: TPicture read FPictureFocused write SetPictureFocused; + property PictureDisabled: TPicture read FPictureDisabled write SetPictureDisabled; + + property FontDown: TPraButtonFont read FFontDown Write SetFontDown; + property FontFocused: TPraButtonFont read FFontFocused Write SetFontFocused; + property FontDisabled: TPraButtonFont read FFontDisabled Write SetFontDisabled; + + property Caption: TCaption read FCaption write SetCaption; + property TabOrder: Integer read GetTabOrder write SetTabOrder; + property TabStop: Boolean read GetTabStop write SetTabStop default false; + property Radius: SmallInt read FRadius write SetRadius stored IsRadius default 4; + property Shape: TPraButtonStyleType read FShape write SetShape default stRoundRect; + property Spacing: SmallInt read FSpacing write SetSpacing stored IsSpacing default 3; + property ShowCaption: Boolean read FShowCaption write SetShowCaption stored IsShowCaption default true; + property ClickOnEnter: Boolean read FClickOnEnter write SetClickOnEnter stored IsClickOnEnter default true; + property Alignment: TPraAlignment read FAlignment write SetAlignment stored IsStoredAlignment default paCenter; + property PictureCenter: Boolean read FPictureCenter write SetPictureCenter stored isPictureCenter default false; + property PictureMarginLeft: SmallInt read FPictureMarginLeft write SetPictureMarginLeft stored IsPictureMarginLeft default 3; + + property Style: TPraButtonStyleStyle read FStyle write SetStyle stored IsStoredStyle default bsCustom; + property StyleOutline: Boolean read FStyleOutline write SetStyleOutline stored IsStyleOutline default false; + + property TemplateStyle: TTemplateStyle read FTemplateStyle write SetTemplateStyle stored IsStoredTemplateStyle default tsNone; + property PictureLayout: TPictureLayout read FPictureLayout write SetPictureLayout stored IsPictureLayout default plGraphicCenter; + + property ImageList: TImageList read FImageList write SetImageList; + + property ImageIndexPicture: Integer read FImageIndexPicture write SetImageIndexPicture stored IsImageIndexPicture default -1; + property ImageIndexPictureFocused: Integer read FImageIndexPictureFocused write SetImageIndexPictureFocused stored IsImageIndexPictureFocused default -1; + property ImageIndexPictureDisabled: Integer read FImageIndexPictureDisabled write SetImageIndexPictureDisabled stored IsImageIndexPictureDisabled default -1; + + property AboutInfo: String Read FAboutInfo Write FAboutInfo Stored false; + end; + +implementation + +uses + + {$IF DEFINED(FPC)} + Forms, + {$ELSE} // DEFINE DELPHI + Vcl.Forms, + {$ENDIF} + + PraButtonStyleSave, + PraButtonStyleEdit, + PraButtonStyleGear, + PraButtonStylePrint, + PraButtonStyleCancel, + PraButtonStyleDelete, + PraButtonStyleTemplateInfo, + PraButtonStyleTemplateDark, + PraButtonStyleTemplateLight, + PraButtonStyleTemplateDanger, + PraButtonStyleTemplatePrimary, + PraButtonStyleTemplateSuccess, + PraButtonStyleTemplateWarning, + PraButtonStyleTemplateSecondary, + PraButtonStyleMenu, + PraButtonStyleHeart, + PraButtonStyleTemplateHeart, + PraButtonStyleEmail, + PraButtonStyleInsert, + PraButtonStyleBack, + PraButtonStyleClose, + PraButtonStyleReport; + +procedure TPraButtonStyle.ApplyTemplate; +begin + Brush.Color := FPraButtonStyleTemplate.GetBrushColor; + BrushFocused.Color := FPraButtonStyleTemplate.GetBrushFocusedColor; + BrushDown.Color := FPraButtonStyleTemplate.GetBrushDownColor; + BrushDisabled.Color := FPraButtonStyleTemplate.GetBrushDisabledColor; + + PenDown.Color := FPraButtonStyleTemplate.GetPenDownColor; + + Pen.Style := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenStyle; + PenFocused.Style := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenFocusedStyle; + PenDisabled.Style := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenDisabledStyle; + PenDown.Style := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenDownStyle; + PenDown.Width := FPraButtonStyleTemplate.GetPenConfigurationCommon.GetPenDownWidth; + + Font.Assign(FPraButtonStyleTemplate.GetFontConfigurationCommon.GetFont); + FontDown.Assign(FPraButtonStyleTemplate.GetFontConfigurationCommon.GetFontDown); + FontDisabled.Assign(FPraButtonStyleTemplate.GetFontConfigurationCommon.GetFontDisabled); + FontFocused.Assign(FPraButtonStyleTemplate.GetFontConfigurationCommon.GetFontFocused); +end; + +procedure TPraButtonStyle.Assign(Source: TPersistent); +begin + if Source is TPraButtonStyle then + begin + Brush.Assign(TPraButtonStyle(Source).Brush); + BrushFocused.Assign(TPraButtonStyle(Source).BrushFocused); + Pen.Assign(TPraButtonStyle(Source).Pen); + PenFocused.Assign(TPraButtonStyle(Source).PenFocused); + Font.Assign(TPraButtonStyle(Source).Font); + FontFocused.Assign(TPraButtonStyle(Source).FontFocused); + FontDown.Assign(TPraButtonStyle(Source).FontDown); + Radius := TPraButtonStyle(Source).Radius; + end + else + inherited Assign(Source); +end; + +procedure TPraButtonStyle.ChangeScale(M, D: Integer; isDpiChange: Boolean); +var + Flags: TScalingFlags; +begin + FPen.Width := MulDiv(FPen.Width, M, D); + // Scaling of other Fonts as current Font + if csLoading in ComponentState then + Flags := ScalingFlags + else + Flags := DefaultScalingFlags; + if not ParentFont and (sfFont in Flags) then + begin + FFontDown.Height := MulDiv(FFontDown.Height, M, D); + FFontFocused.Height := MulDiv(FFontFocused.Height, M, D); + FFontDisabled.Height := MulDiv(FFontDisabled.Height, M, D); + end; + inherited; +end; + +procedure TPraButtonStyle.Click; +begin + inherited; +end; + +procedure TPraButtonStyle.CMEnter(var Message: TCMEnter); +begin + if not(Enabled) or (csDesigning in ComponentState) then + Exit; + + FMouseEnter := false; + invalidate; +end; + +procedure TPraButtonStyle.CMMouseEnter(var Message: TNotifyEvent); +begin + if not(Enabled) or (csDesigning in ComponentState) then + Exit; + + FMouseEnter := true; + invalidate; +end; + +procedure TPraButtonStyle.CMMouseLeave(var Message: TNotifyEvent); +begin + if not(Enabled) or (csDesigning in ComponentState) then + Exit; + + FMouseEnter := false; + invalidate; +end; + +procedure TPraButtonStyle.FontDisabledCopyOfFont(const AValue: Boolean); +begin + if AValue then + FFontDisabled.Assign(Font); +end; + +procedure TPraButtonStyle.FontDownCopyOfFont(const AValue: Boolean); +begin + if AValue then + FFontDown.Assign(Font); +end; + +procedure TPraButtonStyle.FontFocusedCopyOfFont(const AValue: Boolean); +begin + if AValue then + FFontFocused.Assign(Font); +end; + +constructor TPraButtonStyle.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + FFocusControl := nil; + CreateFocusControl(nil, TWinControl(AOwner)); + + Cursor := crHandPoint; + ControlStyle := ControlStyle + [csReplicatable]; + ParentFont := true; + + Width := 75; + Height := 25; + + // Pen + FPen := TPen.Create; + FPen.onChange := StyleChanged; + // PenDown + FPenDown := TPen.Create; + FPenDown.onChange := StyleChanged; + // PenFocused + FPenFocused := TPen.Create; + FPenFocused.onChange := StyleChanged; + // PenDisabled + FPenDisabled := TPen.Create; + FPenDisabled.onChange := StyleChanged; + + // Brush + FBrush := TBrush.Create; + FBrush.onChange := StyleChanged; + // BrushDown + FBrushDown := TBrush.Create; + FBrushDown.onChange := StyleChanged; + // BrushFocused + FBrushFocused := TBrush.Create; + FBrushFocused.onChange := StyleChanged; + // BrushDisabled + FBrushDisabled := TBrush.Create; + FBrushDisabled.onChange := StyleChanged; + + // Picture + FPicture := TPicture.Create; + FPicture.onChange := StyleChanged; + // PictureFocused + FPictureFocused := TPicture.Create; + FPictureFocused.onChange := StyleChanged; + // PictureDisabled + FPictureDisabled := TPicture.Create; + FPictureDisabled.onChange := StyleChanged; + + // FontDown + FFontDown := TPraButtonFont.Create; + FFontDown.onChange := FontDownCopyOfFont; + // FontFocused + FFontFocused := TPraButtonFont.Create; + FFontFocused.onChange := FontFocusedCopyOfFont; + // FontDisabled + FFontDisabled := TPraButtonFont.Create; + FFontDisabled.onChange := FontDisabledCopyOfFont; + + FMouseEnter := false; + FShowCaption := true; + + FClickOnEnter := true; + + TabStop := false; + + OnMouseDown := DoMouseDown; + OnMouseUp := DoMouseUp; + + FControllerStyleTemplate := false; + + FStyleOutline := false; + FPictureLayout := plGraphicCenter; + + ImageIndexPicture := -1; + ImageIndexPictureFocused := -1; + ImageIndexPictureDisabled := -1; + + CreateButtonDefault; +end; + +procedure TPraButtonStyle.CreateButtonBack; +begin + LoadingTemplateLight; + FPraButtonStyleTemplateType := TPraButtonStyleBack.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Back'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonCancel; +begin + LoadingTemplateSecondary; + FPraButtonStyleTemplateType := TPraButtonStyleCancel.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Cancel'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonClose; +begin + LoadingTemplateDanger; + FPraButtonStyleTemplateType := TPraButtonStyleClose.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Close'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonDanger; +begin + LoadingTemplateDanger; + + Height := FPraButtonStyleTemplate.GetSizeHeight; + Width := FPraButtonStyleTemplate.GetSizeWidth; +end; + +procedure TPraButtonStyle.CreateButtonDark; +begin + LoadingTemplateDark; + + Height := FPraButtonStyleTemplate.GetSizeHeight; + Width := FPraButtonStyleTemplate.GetSizeWidth; +end; + +procedure TPraButtonStyle.CreateButtonDefault; +begin + Font.Name := 'Tahoma'; + + FBrush.Color := clWhite; + FBrushDown.Color := clWhite; + FBrushFocused.Color := clWhite; + FBrushDisabled.Color := clWhite; + + FFontDown.Assign(Self.Font); + FFontFocused.Assign(Self.Font); + FFontDisabled.Assign(Self.Font); + + FRadius := 4; + FSpacing := 3; + FPictureMarginLeft := 3; + FAlignment := paCenter; + FStyle := bsCustom; + FTemplateStyle := tsNone; + + if Assigned(FPicture.Graphic) then + FPicture.Graphic := nil; + + if Assigned(FPictureFocused.Graphic) then + FPictureFocused.Graphic := nil; + + if Assigned(FPictureDisabled.Graphic) then + FPictureDisabled.Graphic := nil; +end; + +procedure TPraButtonStyle.CreateButtonDelete; +begin + LoadingTemplateDanger; + FPraButtonStyleTemplateType := TPraButtonStyleDelete.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Delete'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonEdit; +begin + LoadingTemplateWarning; + FPraButtonStyleTemplateType := TPraButtonStyleEdit.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Edit'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonEmail; +begin + LoadingTemplateLight; + FPraButtonStyleTemplateType := TPraButtonStyleEmail.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Email'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonGear; +begin + LoadingTemplatePrimary; + FPraButtonStyleTemplateType := TPraButtonStyleGear.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Gear'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonHeart; +begin + LoadingTemplateHeart; + FPraButtonStyleTemplateType := TPraButtonStyleHeart.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Heart'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonInfo; +begin + LoadingTemplateInfo; + + Height := FPraButtonStyleTemplate.GetSizeHeight; + Width := FPraButtonStyleTemplate.GetSizeWidth; +end; + +procedure TPraButtonStyle.CreateButtonInsert; +begin + LoadingTemplateSuccess; + FPraButtonStyleTemplateType := TPraButtonStyleInsert.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Insert'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonLight; +begin + LoadingTemplateLight; + + Height := FPraButtonStyleTemplate.GetSizeHeight; + Width := FPraButtonStyleTemplate.GetSizeWidth; +end; + +procedure TPraButtonStyle.CreateButtonMenu; +begin + LoadingTemplatePrimary; + FPraButtonStyleTemplateType := TPraButtonStyleMenu.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Menu'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonPrimary; +begin + LoadingTemplatePrimary; + + Height := FPraButtonStyleTemplate.GetSizeHeight; + Width := FPraButtonStyleTemplate.GetSizeWidth; +end; + +procedure TPraButtonStyle.CreateButtonPrint; +begin + LoadingTemplateInfo; + FPraButtonStyleTemplateType := TPraButtonStylePrint.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Print'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonReport; +begin + LoadingTemplatePrimary; + FPraButtonStyleTemplateType := TPraButtonStyleReport.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Report'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonSave; +begin + LoadingTemplateSuccess; + FPraButtonStyleTemplateType := TPraButtonStyleSave.New; + + Height := FPraButtonStyleTemplateType.GetSizeHeight; + Width := FPraButtonStyleTemplateType.GetSizeWidth; + + Self.Caption := 'Save'; + Self.Alignment := paLeftJustify; +end; + +procedure TPraButtonStyle.CreateButtonSecondary; +begin + LoadingTemplateSecondary; + + Height := FPraButtonStyleTemplate.GetSizeHeight; + Width := FPraButtonStyleTemplate.GetSizeWidth; +end; + +procedure TPraButtonStyle.CreateButtonSuccess; +begin + LoadingTemplateSuccess; + + Height := FPraButtonStyleTemplate.GetSizeHeight; + Width := FPraButtonStyleTemplate.GetSizeWidth; +end; + +procedure TPraButtonStyle.CreateButtonWarning; +begin + LoadingTemplateWarning; + + Height := FPraButtonStyleTemplate.GetSizeHeight; + Width := FPraButtonStyleTemplate.GetSizeWidth; +end; + +procedure TPraButtonStyle.CreateFocusControl(AOwner: TComponent; AParent: TWinControl); +begin + if not Assigned(FFocusControl) then + begin + FFocusControl := TFocusControl.Create(AOwner, Self); + try + FFocusControl.TabStop := true; + FFocusControl.SetBounds(0, 0, 0, 0); + except + raise; + end; + end; +end; + +destructor TPraButtonStyle.Destroy; +begin + FPen.Free; + FPenDown.Free; + FPenFocused.Free; + FPenDisabled.Free; + + FBrush.Free; + FBrushDown.Free; + FBrushFocused.Free; + FBrushDisabled.Free; + + FPicture.Free; + FPictureFocused.Free; + FPictureDisabled.Free; + + FFontDown.Free; + FFontFocused.Free; + FFontDisabled.Free; + + DestroyFocusControl; + + inherited Destroy; +end; + +procedure TPraButtonStyle.DestroyFocusControl; +begin + if Assigned(FFocusControl) then + begin + if Assigned(FFocusControl.Parent) then + FreeAndNil(FFocusControl); + end; +end; + +procedure TPraButtonStyle.DoKeyDown(var Key: Word; Shift: TShiftState); +begin + if ClickOnEnter and (Key = 13) then + begin + FState := bsDown; + invalidate; + + Self.Click; + end; +end; + +procedure TPraButtonStyle.DoKeyUp; +begin + FState := bsUp; + + invalidate; +end; + +procedure TPraButtonStyle.DoMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + FState := bsDown; + + invalidate; +end; + +procedure TPraButtonStyle.DoMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + FState := bsUp; + + invalidate; +end; + +function TPraButtonStyle.GetCanFocus: Boolean; +begin + if Assigned(FFocusControl) then + result := FFocusControl.CanFocus + else + result := false; +end; + +function TPraButtonStyle.GetFocused: Boolean; +begin + if Assigned(FFocusControl) then + result := FFocusControl.Focused + else + result := false; +end; + +function TPraButtonStyle.GetPictureHeight: SmallInt; +begin + result := 0; + if informedPicture then + result := MaxIntValue([FPicture.Height, FPictureFocused.Height, FPictureDisabled.Height]); +end; + +function TPraButtonStyle.GetPictureMarginLeft: SmallInt; +begin + result := 0; + if informedPicture then + result := FPictureMarginLeft; +end; + +function TPraButtonStyle.GetPictureWidth: SmallInt; +begin + result := 0; + if informedPicture then + result := MaxIntValue([FPicture.Width, FPictureFocused.Width, FPictureDisabled.Width]); +end; + +function TPraButtonStyle.GetSpacing: SmallInt; +begin + result := 0; + if informedPicture then + result := FSpacing; +end; + +function TPraButtonStyle.GetTabOrder: Integer; +begin + if Assigned(FFocusControl) then + result := FFocusControl.TabOrder + else + result := -1; +end; + +function TPraButtonStyle.GetTabStop: Boolean; +begin + if Assigned(FFocusControl) then + result := FFocusControl.TabStop + else + result := false; +end; + +function TPraButtonStyle.informedPicture: Boolean; +begin + result := Assigned(FPicture.Graphic) or Assigned(FPictureFocused.Graphic) or Assigned(FPictureDisabled.Graphic); +end; + +function TPraButtonStyle.IsClickOnEnter: Boolean; +begin + result := FClickOnEnter <> true; +end; + +function TPraButtonStyle.IsImageIndexPicture: Boolean; +begin + result := ImageIndexPicture <> -1; +end; + +function TPraButtonStyle.IsImageIndexPictureDisabled: Boolean; +begin + result := ImageIndexPictureDisabled <> -1; +end; + +function TPraButtonStyle.IsImageIndexPictureFocused: Boolean; +begin + result := ImageIndexPictureFocused <> -1; +end; + +function TPraButtonStyle.IsStyleOutline: Boolean; +begin + result := StyleOutline <> false; +end; + +function TPraButtonStyle.isPictureCenter: Boolean; +begin + result := PictureCenter <> false; +end; + +function TPraButtonStyle.IsPictureLayout: Boolean; +begin + result := PictureLayout <> plGraphicCenter; +end; + +function TPraButtonStyle.IsPictureMarginLeft: Boolean; +begin + result := PictureMarginLeft <> 3; +end; + +function TPraButtonStyle.IsRadius: Boolean; +begin + result := Radius <> 3; +end; + +function TPraButtonStyle.IsShowCaption: Boolean; +begin + result := ShowCaption <> true; +end; + +function TPraButtonStyle.IsSpacing: Boolean; +begin + result := Spacing <> 3; +end; + +function TPraButtonStyle.IsStoredAlignment: Boolean; +begin + result := Alignment <> paCenter; +end; + +function TPraButtonStyle.IsStoredStyle: Boolean; +begin + result := Style <> bsCustom; +end; + +function TPraButtonStyle.IsStoredTemplateStyle: Boolean; +begin + result := TemplateStyle <> tsNone; +end; + +procedure TPraButtonStyle.Paint; +var + ClientSize, X, Y, w, h: Integer; +begin + inherited; + + with Canvas do + begin + if not(Enabled) then + begin + Pen := FPenDisabled; + Brush := FBrushDisabled; + Font := FFontDisabled; + end + else if FState = bsDown then + begin + Pen := FPenDown; + Brush := FBrushDown; + Font := FFontDown; + end + else if FMouseEnter or Focused then + begin + Pen := FPenFocused; + Brush := FBrushFocused; + Font := FFontFocused; + end + else + begin + Pen := FPen; + Brush := FBrush; + Font := Self.Font; + end; + + if (FShape = stRoundRect) and (Pen.Width = 2) then + Pen.Width := 1; + + X := Pen.Width div 2; + + Y := X; + w := Width - Pen.Width + 1; + h := Height - Pen.Width + 1; + + if Pen.Width = 0 then + begin + Dec(w); + Dec(h); + end; + + case FShape of + stRectangle: + Rectangle(X, Y, X + w, Y + h); + stRoundRect: + RoundRect(X, Y, X + w, Y + h, Radius, Radius); + end; + + X := GetPictureMarginLeft; + if (FPictureCenter and (Caption = '') or (FPictureLayout <> plGraphicCenter)) then + X := (ClientWidth - GetPictureWidth) div 2; + + ClientSize := ClientHeight - GetPictureHeight; + case PictureLayout of + plGraphicCenter: + h := ClientSize div 2; + plGraphicBottom: + h := (ClientSize + Canvas.TextHeight(Caption)) div 2; + plGraphicTop: + h := (ClientSize - Canvas.TextHeight(Caption)) div 2; + end; + + if not(Enabled) then + begin + if Assigned(PictureDisabled.Graphic) then + Draw(X, h, PictureDisabled.Graphic) + else + Draw(X, h, Picture.Graphic); + end + else if FMouseEnter or Focused then + begin + if Assigned(PictureFocused.Graphic) then + Draw(X, h, PictureFocused.Graphic) + else + Draw(X, h, Picture.Graphic); + end + else + Draw(X, h, Picture.Graphic); + + if FShowCaption and (Trim(Caption) <> '') then + begin + if Alignment = paCenter then + begin + if (Assigned(Picture.Graphic) or (Assigned(PictureFocused.Graphic) and (FMouseEnter or Focused))) and (FPictureLayout = plGraphicCenter) then + X := (ClientWidth - (GetPictureWidth + PictureMarginLeft)) div 2 + else + X := (ClientWidth - Canvas.TextWidth(Caption)) div 2 + end + else + X := GetPictureWidth + PictureMarginLeft + GetSpacing; + + ClientSize := ClientHeight - Canvas.TextHeight(Caption); + case PictureLayout of + plGraphicCenter: + Y := ClientSize div 2; + plGraphicBottom: + Y := ((ClientSize - GetPictureHeight) div 2) - 2 + Spacing; + plGraphicTop: + Y := ((ClientSize + GetPictureHeight) div 2) - 2 + Spacing; + end; + + TextOut(X, Y, Caption); + end; + end; +end; + +procedure TPraButtonStyle.SetAlignment(const Value: TPraAlignment); +begin + if FAlignment <> Value then + begin + FAlignment := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); +begin + inherited; + Repaint; +end; + +procedure TPraButtonStyle.SetBrush(Value: TBrush); +begin + FBrush.Assign(Value); +end; + +procedure TPraButtonStyle.SetBrushDisabled(const Value: TBrush); +begin + FBrushDisabled.Assign(Value); +end; + +procedure TPraButtonStyle.SetBrushDown(const Value: TBrush); +begin + FBrushDown.Assign(Value); +end; + +procedure TPraButtonStyle.SetBrushFocused(const Value: TBrush); +begin + FBrushFocused.Assign(Value); +end; + +procedure TPraButtonStyle.SetCaption(const Value: TCaption); +begin + FCaption := Value; + invalidate; +end; + +procedure TPraButtonStyle.SetClickOnEnter(const Value: Boolean); +begin + if FClickOnEnter <> Value then + begin + FClickOnEnter := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetFocus; +begin + if Assigned(FFocusControl) then + if FFocusControl.CanFocus then + FFocusControl.SetFocus; +end; + +procedure TPraButtonStyle.SetFontDisabled(const Value: TPraButtonFont); +begin + FFontDisabled.Assign(Value); +end; + +procedure TPraButtonStyle.SetFontDown(const Value: TPraButtonFont); +begin + FFontDown.Assign(Value); +end; + +procedure TPraButtonStyle.SetFontFocused(const Value: TPraButtonFont); +begin + FFontFocused.Assign(Value); +end; + +procedure TPraButtonStyle.SetImageIndexPicture(const Value: Integer); +begin + if FImageIndexPicture <> Value then + begin + FImageIndexPicture := Value; + + if Assigned(ImageList) then + begin + FPicture.Graphic := nil; + ImageList.GetBitmap(Value, FPicture.bitmap); + + invalidate; + end; + end; +end; + +procedure TPraButtonStyle.SetImageIndexPictureDisabled(const Value: Integer); +begin + if FImageIndexPictureDisabled <> Value then + begin + FImageIndexPictureDisabled := Value; + + if Assigned(ImageList) then + begin + FPictureDisabled.Graphic := nil; + ImageList.GetBitmap(Value, FPictureDisabled.bitmap); + + invalidate; + end; + end; +end; + +procedure TPraButtonStyle.SetImageIndexPictureFocused(const Value: Integer); +begin + if FImageIndexPictureFocused <> Value then + begin + FImageIndexPictureFocused := Value; + + if Assigned(ImageList) then + begin + FPictureFocused.Graphic := nil; + ImageList.GetBitmap(Value, FPictureFocused.bitmap); + + invalidate; + end; + end; +end; + +procedure TPraButtonStyle.SetImageList(const Value: TImageList); +begin + if FImageList <> Value then + begin + FImageList := Value; + + invalidate; + end; +end; + +procedure TPraButtonStyle.SetStyleOutline(const Value: Boolean); +begin + if FStyleOutline <> Value then + begin + FStyleOutline := Value; + + if Style <> bsCustom then + SetStyle(FStyle) + else if isTemplateStyle then + SetTemplateStyle(FTemplateStyle); + end; +end; + +procedure TPraButtonStyle.SetParent(AParent: TWinControl); +begin + inherited; + if Assigned(Self.Parent) then + begin + FFocusControl.Parent := Self.Parent; + FFocusControl.Show; + end; +end; + +procedure TPraButtonStyle.SetPen(Value: TPen); +begin + FPen.Assign(Value); +end; + +procedure TPraButtonStyle.SetPenDisabled(const Value: TPen); +begin + FPenDisabled.Assign(Value); +end; + +procedure TPraButtonStyle.SetPenDown(const Value: TPen); +begin + FPenDown.Assign(Value); +end; + +procedure TPraButtonStyle.SetPenFocused(const Value: TPen); +begin + FPenFocused.Assign(Value); +end; + +procedure TPraButtonStyle.SetPicture(const Value: TPicture); +begin + FPicture.Assign(Value); +end; + +procedure TPraButtonStyle.SetPictureCenter(const Value: Boolean); +begin + if FPictureCenter <> Value then + begin + FPictureCenter := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetPictureDisabled(const Value: TPicture); +begin + FPictureDisabled.Assign(Value); +end; + +procedure TPraButtonStyle.SetPictureTemplate; +begin + if not Assigned((FPraButtonStyleTemplateType)) then + Exit; + + if StyleOutline then + begin + Picture.Assign(FPraButtonStyleTemplateType.GetPictureStyleOutline); + PictureFocused.Assign(FPraButtonStyleTemplateType.GetPictureFocusedStyleOutline); + end + else + begin + Picture.Assign(FPraButtonStyleTemplateType.GetPicture); + PictureFocused.Assign(FPraButtonStyleTemplateType.GetPictureFocused); + end; + + PictureDisabled.Assign(FPraButtonStyleTemplateType.GetPictureDisabled); +end; + +procedure TPraButtonStyle.SetPictureMarginLeft(const Value: SmallInt); +begin + if (FPictureMarginLeft >= 0) and (FPictureMarginLeft <> Value) then + begin + FPictureMarginLeft := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetPictureFocused(const Value: TPicture); +begin + FPictureFocused.Assign(Value); +end; + +procedure TPraButtonStyle.SetPictureLayout(const Value: TPictureLayout); +begin + if FPictureLayout <> Value then + begin + FPictureLayout := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetRadius(const Value: SmallInt); +begin + if FRadius <> Value then + begin + FRadius := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetShape(Value: TPraButtonStyleType); +begin + if FShape <> Value then + begin + FShape := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetShowCaption(const Value: Boolean); +begin + if FShowCaption <> Value then + begin + FShowCaption := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetSize(const AHeight, AWidth: Integer); +begin + Height := AHeight; + Width := AWidth; +end; + +procedure TPraButtonStyle.SetSpacing(const Value: SmallInt); +begin + if FSpacing <> Value then + begin + FSpacing := Value; + invalidate; + end; +end; + +procedure TPraButtonStyle.SetStyle(const Value: TPraButtonStyleStyle); +begin + if isTemplateStyle then + begin + FControllerStyleTemplate := true; + TemplateStyle := tsNone; + end; + + if FControllerStyleTemplate then + begin + CreateButtonDefault; + FControllerStyleTemplate := false; + Exit; + end; + + Self.FStyle := Value; + + case Self.FStyle of + bsPrimary: + CreateButtonPrimary; + bsSecondary: + CreateButtonSecondary; + bsSuccess: + CreateButtonSuccess; + bsDanger: + CreateButtonDanger; + bsWarning: + CreateButtonWarning; + bsInfo: + CreateButtonInfo; + bsLight: + CreateButtonLight; + bsDark: + CreateButtonDark; + end; + + if Value <> bsCustom then + begin + SetSize(32, 90); + + if StyleOutline then + StyleOutlineConfig; + end; +end; + +procedure TPraButtonStyle.SetTabOrder(const Value: Integer); +begin + if Assigned(FFocusControl) then + FFocusControl.TabOrder := Value; +end; + +procedure TPraButtonStyle.SetTabStop(const Value: Boolean); +begin + if Assigned(FFocusControl) then + FFocusControl.TabStop := Value; +end; + +procedure TPraButtonStyle.SetTemplateStyle(const Value: TTemplateStyle); +begin + if FControllerStyleTemplate then + begin + CreateButtonDefault; + FControllerStyleTemplate := false; + Exit; + end; + + if Style <> bsCustom then + begin + FControllerStyleTemplate := true; + Style := bsCustom; + end; + + Self.FTemplateStyle := Value; + + if not(csReading in ComponentState) then + begin + case Value of + tsSave: + CreateButtonSave; + tsEdit: + CreateButtonEdit; + tsCancel: + CreateButtonCancel; + tsDelete: + CreateButtonDelete; + tsPrint: + CreateButtonPrint; + tsGear: + CreateButtonGear; + tsMenu: + CreateButtonMenu; + tsHeart: + CreateButtonHeart; + tsEmail: + CreateButtonEmail; + tsInsert: + CreateButtonInsert; + tsBack: + CreateButtonBack; + tsClose: + CreateButtonClose; + tsReport: + CreateButtonReport; + end; + + SetPictureTemplate; + + if Value <> tsNone then + begin + if StyleOutline then + StyleOutlineConfig; + end; + end; +end; + +procedure TPraButtonStyle.StyleChanged(Sender: TObject); +begin + invalidate; +end; + +procedure TPraButtonStyle.StyleOutlineConfig; +var + lBrushColor: TColor; +begin + lBrushColor := Brush.Color; + Brush.Color := Font.Color; + + Font.Color := lBrushColor; + + Pen.Style := psSolid; + Pen.Color := lBrushColor; + Pen.Width := 1; +end; + +function TPraButtonStyle.isTemplateStyle: Boolean; +begin + result := TemplateStyle <> tsNone; +end; + +procedure TPraButtonStyle.LoadingTemplateDanger; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplateDanger.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.LoadingTemplateDark; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplateDark.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.LoadingTemplateHeart; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplateHeart.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.LoadingTemplateInfo; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplateInfo.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.LoadingTemplateLight; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplateLight.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.LoadingTemplatePrimary; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplatePrimary.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.LoadingTemplateSecondary; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplateSecondary.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.LoadingTemplateSuccess; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplateSuccess.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.LoadingTemplateWarning; +begin + FPraButtonStyleTemplate := TPraButtonStyleTemplateWarning.New; + + ApplyTemplate; +end; + +procedure TPraButtonStyle.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + + if Operation = opRemove then + begin + if AComponent = ImageList then + ImageList := nil; + end; +end; + +procedure TPraButtonStyle.WMEraseBkgnd(var Message: TWMEraseBkGnd); +begin + message.result := 1; +end; + +constructor TFocusControl.Create(AOwner: TComponent; AGraphicControl: TPraButtonStyle); +begin + inherited Create(AOwner); + + Assert(Assigned(AGraphicControl), 'Não é possível criar um FocusControl com GraphicControl não atribuído.'); + + FGraphicControl := AGraphicControl; + Self.TabStop := false; +end; + +procedure TFocusControl.WMKeyDown(var Message: TWMKeyDown); +var + Shift: TShiftState; +begin + if Assigned(FGraphicControl) then + begin + Shift := KeyDataToShiftState(Message.KeyData); + FGraphicControl.DoKeyDown(Message.CharCode, Shift); + end; + + inherited; +end; + +procedure TFocusControl.WMKeyUp(var Message: TWMKeyDown); +begin + if Assigned(FGraphicControl) then + FGraphicControl.DoKeyUp; + + inherited; +end; + +procedure TFocusControl.WndProc(var Message: TMessage); +begin + inherited; + + case Message.Msg of + WM_SETFOCUS, WM_KILLFOCUS: + begin + if Assigned(FGraphicControl) then + FGraphicControl.Repaint; + end; + end; +end; + +function TPraButtonFont.IsCopyOfFont: Boolean; +begin + result := CopyOfFont <> false; +end; + +procedure TPraButtonFont.SetCopyOfFont(const Value: Boolean); +begin + if FCopyOfFont <> Value then + begin + FCopyOfFont := Value; + onChange(Value); + end; +end; + +end. diff --git a/source/backup/PraButtonStyleBack.pas.bak b/source/backup/PraButtonStyleBack.pas.bak new file mode 100644 index 0000000..fb59796 --- /dev/null +++ b/source/backup/PraButtonStyleBack.pas.bak @@ -0,0 +1,161 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleBack; + +interface + +uses + PraInterfaces, +{$IF DEFINED(FPC)} + Graphics +{$ELSE} // DEFINE DELPHI + Vcl.Graphics +{$ENDIF} ; +type + TPraButtonStyleBack = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + +{$IF DEFINED(FPC)} + PraUtils, + SysUtils, + PraConsts; +{$ELSE} // DEFINE DELPHI + PraUtils, + System.SysUtils, + PraConsts; +{$ENDIF} ; + + +constructor TPraButtonStyleBack.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleBack.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleBack.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_BACK_BLACK')); + + result := FPicture; +end; + +function TPraButtonStyleBack.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_BACK_BLACK')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleBack.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_BACK_BLACK')); + + result := FPictureFocused; +end; + +function TPraButtonStyleBack.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_BACK_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleBack.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_BACK_WHITE')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleBack.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleBack.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleBack.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleCancel.pas.bak b/source/backup/PraButtonStyleCancel.pas.bak new file mode 100644 index 0000000..baab5f0 --- /dev/null +++ b/source/backup/PraButtonStyleCancel.pas.bak @@ -0,0 +1,156 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleCancel; + +interface + +uses + +{$IF DEFINED(FPC)} + PraInterfaces, + Graphics +{$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics; +{$ENDIF} ; + +type + TPraButtonStyleCancel = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleCancel.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleCancel.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleCancel.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_CANCEL_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleCancel.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_CANCEL_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleCancel.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_CANCEL_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleCancel.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_CANCEL_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleCancel.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_CANCEL_GRAY')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleCancel.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleCancel.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleCancel.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleClose.pas.bak b/source/backup/PraButtonStyleClose.pas.bak new file mode 100644 index 0000000..910112e --- /dev/null +++ b/source/backup/PraButtonStyleClose.pas.bak @@ -0,0 +1,156 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleClose; + +interface + +uses + +{$IF DEFINED(FPC)} + PraInterfaces, + Graphics +{$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics +{$ENDIF} ; + +type + TPraButtonStyleClose = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleClose.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleClose.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleClose.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_CLOSE_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleClose.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_CLOSE_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleClose.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_CLOSE_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleClose.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_CLOSE_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleClose.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_CLOSE_RED')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleClose.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleClose.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleClose.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleDelete.pas.bak b/source/backup/PraButtonStyleDelete.pas.bak new file mode 100644 index 0000000..48fa839 --- /dev/null +++ b/source/backup/PraButtonStyleDelete.pas.bak @@ -0,0 +1,155 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleDelete; + +interface + +uses +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; + +type + TPraButtonStyleDelete = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleDelete.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleDelete.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleDelete.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_DELETE_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleDelete.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_DELETE_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleDelete.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_DELETE_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleDelete.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_DELETE_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleDelete.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_DELETE_RED')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleDelete.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleDelete.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleDelete.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleEdit.pas.bak b/source/backup/PraButtonStyleEdit.pas.bak new file mode 100644 index 0000000..4aecb7c --- /dev/null +++ b/source/backup/PraButtonStyleEdit.pas.bak @@ -0,0 +1,156 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleEdit; + +interface + +uses + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; + +type + TPraButtonStyleEdit = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleEdit.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleEdit.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleEdit.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_EDIT_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleEdit.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_EDIT_DISABLED')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleEdit.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_EDIT_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleEdit.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_EDIT_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleEdit.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_EDIT_YELOOW')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleEdit.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleEdit.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleEdit.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleEmail.pas.bak b/source/backup/PraButtonStyleEmail.pas.bak new file mode 100644 index 0000000..55513b3 --- /dev/null +++ b/source/backup/PraButtonStyleEmail.pas.bak @@ -0,0 +1,156 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleEmail; + +interface + +uses + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; + +type + TPraButtonStyleEmail = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleEmail.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleEmail.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleEmail.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_EMAIL_GRAY')); + + result := FPicture; +end; + +function TPraButtonStyleEmail.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_EMAIL_GRAY')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleEmail.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_EMAIL_GRAY')); + + result := FPictureFocused; +end; + +function TPraButtonStyleEmail.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_EMAIL_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleEmail.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_EMAIL_WHITE')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleEmail.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleEmail.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleEmail.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleGear.pas.bak b/source/backup/PraButtonStyleGear.pas.bak new file mode 100644 index 0000000..49fd319 --- /dev/null +++ b/source/backup/PraButtonStyleGear.pas.bak @@ -0,0 +1,156 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleGear; + +interface + +uses + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; + +type + TPraButtonStyleGear = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleGear.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleGear.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleGear.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_GEAR_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleGear.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_GEAR_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleGear.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_GEAR_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleGear.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_GEAR_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleGear.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_GEAR_BLUE')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleGear.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleGear.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleGear.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleHeart.pas.bak b/source/backup/PraButtonStyleHeart.pas.bak new file mode 100644 index 0000000..4d3dff4 --- /dev/null +++ b/source/backup/PraButtonStyleHeart.pas.bak @@ -0,0 +1,156 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleHeart; + +interface + +uses + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +vcl.Graphics +{$ENDIF} ; + +type + TPraButtonStyleHeart = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleHeart.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleHeart.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleHeart.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_HEART_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleHeart.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_HEART_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleHeart.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_HEART_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleHeart.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_HEART_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleHeart.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_HEART_OUTLINE')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleHeart.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleHeart.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleHeart.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleInsert.pas.bak b/source/backup/PraButtonStyleInsert.pas.bak new file mode 100644 index 0000000..9b7155a --- /dev/null +++ b/source/backup/PraButtonStyleInsert.pas.bak @@ -0,0 +1,156 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleInsert; + +interface + +uses + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; + +type + TPraButtonStyleInsert = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleInsert.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleInsert.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleInsert.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_INSERT_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleInsert.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_INSERT_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleInsert.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_INSERT_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleInsert.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_INSERT_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleInsert.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_INSERT_GREEN')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleInsert.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleInsert.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleInsert.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleMenu.pas.bak b/source/backup/PraButtonStyleMenu.pas.bak new file mode 100644 index 0000000..270f054 --- /dev/null +++ b/source/backup/PraButtonStyleMenu.pas.bak @@ -0,0 +1,155 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleMenu; + +interface + +uses + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; +type + TPraButtonStyleMenu = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleMenu.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleMenu.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleMenu.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_MENU_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleMenu.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_MENU_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleMenu.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_MENU_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleMenu.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_MENU_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleMenu.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_MENU_BLUE')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleMenu.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleMenu.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleMenu.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStylePrint.pas.bak b/source/backup/PraButtonStylePrint.pas.bak new file mode 100644 index 0000000..46ae972 --- /dev/null +++ b/source/backup/PraButtonStylePrint.pas.bak @@ -0,0 +1,155 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStylePrint; + +interface + +uses + +{$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; +type + TPraButtonStylePrint = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStylePrint.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStylePrint.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStylePrint.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_PRINT_WHITE')); + + result := FPicture; +end; + +function TPraButtonStylePrint.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_PRINT_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStylePrint.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_PRINT_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStylePrint.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_PRINT_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStylePrint.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_PRINT_BLUE')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStylePrint.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStylePrint.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStylePrint.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleReport.pas.bak b/source/backup/PraButtonStyleReport.pas.bak new file mode 100644 index 0000000..1c790be --- /dev/null +++ b/source/backup/PraButtonStyleReport.pas.bak @@ -0,0 +1,155 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleReport; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraButtonStyleReport = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleReport.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleReport.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleReport.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_REPORT_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleReport.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_REPORT_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleReport.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_REPORT_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleReport.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_REPORT_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleReport.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_REPORT_BLUE')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleReport.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleReport.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleReport.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleSave.pas.bak b/source/backup/PraButtonStyleSave.pas.bak new file mode 100644 index 0000000..872adb5 --- /dev/null +++ b/source/backup/PraButtonStyleSave.pas.bak @@ -0,0 +1,155 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleSave; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraButtonStyleSave = class(TInterfacedObject, iPraButtonStyleTemplateType) + private + FPicture: TPicture; + FPictureFocused: TPicture; + FPictureStyleOutline: TPicture; + FPictureFocusedStyleOutline: TPicture; + + FPictureDisabled: TPicture; + + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + public + constructor Create; + destructor Destroy; override; + + property Picture: TPicture read GetPicture; + property PictureFocused: TPicture read GetPictureFocused; + property PictureStyleOutline: TPicture read GetPictureStyleOutline; + property PictureFocusedStyleOutline: TPicture read GetPictureFocusedStyleOutline; + property PictureDisabled: TPicture read GetPictureDisabled; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplateType; + end; + +implementation + +uses + PraUtils, + System.SysUtils, + PraConsts; + +constructor TPraButtonStyleSave.Create; +begin + FPicture := TPicture.Create; + FPictureFocused := TPicture.Create; + FPictureStyleOutline := TPicture.Create; + FPictureFocusedStyleOutline := TPicture.Create; + FPictureDisabled := TPicture.Create; +end; + +destructor TPraButtonStyleSave.Destroy; +begin + freeandNil(FPicture); + freeandNil(FPictureFocused); + freeandNil(FPictureStyleOutline); + freeandNil(FPictureFocusedStyleOutline); + freeandNil(FPictureDisabled); + + inherited; +end; + +function TPraButtonStyleSave.GetPicture: TPicture; +begin + FPicture.Assign(GetPictureOfResource('PICTURE_SAVE_WHITE')); + + result := FPicture; +end; + +function TPraButtonStyleSave.GetPictureDisabled: TPicture; +begin + FPictureDisabled.Assign(GetPictureOfResource('PICTURE_SAVE_WHITE')); + + result := FPictureDisabled; +end; + +function TPraButtonStyleSave.GetPictureFocused: TPicture; +begin + FPictureFocused.Assign(GetPictureOfResource('PICTURE_SAVE_WHITE')); + + result := FPictureFocused; +end; + +function TPraButtonStyleSave.GetPictureFocusedStyleOutline: TPicture; +begin + FPictureFocusedStyleOutline.Assign(GetPictureOfResource('PICTURE_SAVE_WHITE')); + + result := FPictureFocusedStyleOutline; +end; + +function TPraButtonStyleSave.GetPictureStyleOutline: TPicture; +begin + FPictureStyleOutline.Assign(GetPictureOfResource('PICTURE_SAVE_GREEN')); + + result := FPictureStyleOutline; +end; + +function TPraButtonStyleSave.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleSave.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleSave.New: iPraButtonStyleTemplateType; +begin + result := self.Create; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateDanger.pas.bak b/source/backup/PraButtonStyleTemplateDanger.pas.bak new file mode 100644 index 0000000..0abfd1f --- /dev/null +++ b/source/backup/PraButtonStyleTemplateDanger.pas.bak @@ -0,0 +1,269 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateDanger; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateDanger = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateDanger.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateDanger.GetBrushColor: TColor; +begin + result := $004737DA; +end; + +function TPraButtonStyleTemplateDanger.GetBrushDisabledColor: TColor; +begin + result := $00A9A2EE; +end; + +function TPraButtonStyleTemplateDanger.GetBrushDownColor: TColor; +begin + result := $003626C6; +end; + +function TPraButtonStyleTemplateDanger.GetBrushFocusedColor: TColor; +begin + result := $003626C6; +end; + +function TPraButtonStyleTemplateDanger.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateDanger.GetPenDownColor: TColor; +begin + result := $00A39BEC; +end; + +function TPraButtonStyleTemplateDanger.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateDanger.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateDanger.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateDanger.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateDark.pas.bak b/source/backup/PraButtonStyleTemplateDark.pas.bak new file mode 100644 index 0000000..bb5900b --- /dev/null +++ b/source/backup/PraButtonStyleTemplateDark.pas.bak @@ -0,0 +1,269 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateDark; + +interface + +uses + {$IF DEFINED(FPC)} +PraInterfaces, +Graphics +{$ELSE} // DEFINE DELPHI +PraInterfaces, +Vcl.Graphics +{$ENDIF} ; + +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateDark = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateDark.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateDark.GetBrushColor: TColor; +begin + result := $00403A34; +end; + +function TPraButtonStyleTemplateDark.GetBrushDisabledColor: TColor; +begin + result := $0094877A; +end; + +function TPraButtonStyleTemplateDark.GetBrushDownColor: TColor; +begin + result := $002B2723; +end; + +function TPraButtonStyleTemplateDark.GetBrushFocusedColor: TColor; +begin + result := $002B2723; +end; + +function TPraButtonStyleTemplateDark.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateDark.GetPenDownColor: TColor; +begin + result := $009F9C99; +end; + +function TPraButtonStyleTemplateDark.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateDark.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateDark.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateDark.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateGear.pas.bak b/source/backup/PraButtonStyleTemplateGear.pas.bak new file mode 100644 index 0000000..509ef90 --- /dev/null +++ b/source/backup/PraButtonStyleTemplateGear.pas.bak @@ -0,0 +1,268 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateGear; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateGear = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateGear.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateGear.GetBrushColor: TColor; +begin + result := $00B8A027; +end; + +function TPraButtonStyleTemplateGear.GetBrushDisabledColor: TColor; +begin + result := $00E2D07A; +end; + +function TPraButtonStyleTemplateGear.GetBrushDownColor: TColor; +begin + result := $00978420; +end; + +function TPraButtonStyleTemplateGear.GetBrushFocusedColor: TColor; +begin + result := $00978420; +end; + +function TPraButtonStyleTemplateGear.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateGear.GetPenDownColor: TColor; +begin + result := $00DBD093; +end; + +function TPraButtonStyleTemplateGear.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateGear.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateGear.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateGear.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateHeart.pas.bak b/source/backup/PraButtonStyleTemplateHeart.pas.bak new file mode 100644 index 0000000..cc34896 --- /dev/null +++ b/source/backup/PraButtonStyleTemplateHeart.pas.bak @@ -0,0 +1,269 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateHeart; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateHeart = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateHeart.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateHeart.GetBrushColor: TColor; +begin + result := $00B8A027; +end; + +function TPraButtonStyleTemplateHeart.GetBrushDisabledColor: TColor; +begin + result := $00E2D07A; +end; + +function TPraButtonStyleTemplateHeart.GetBrushDownColor: TColor; +begin + result := $00978420; +end; + +function TPraButtonStyleTemplateHeart.GetBrushFocusedColor: TColor; +begin + result := $00978420; +end; + +function TPraButtonStyleTemplateHeart.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateHeart.GetPenDownColor: TColor; +begin + result := $00DBD093; +end; + +function TPraButtonStyleTemplateHeart.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateHeart.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateHeart.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateHeart.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateInfo.pas.bak b/source/backup/PraButtonStyleTemplateInfo.pas.bak new file mode 100644 index 0000000..27d327c --- /dev/null +++ b/source/backup/PraButtonStyleTemplateInfo.pas.bak @@ -0,0 +1,269 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateInfo; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateInfo = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateInfo.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateInfo.GetBrushColor: TColor; +begin + result := $00B8A027; +end; + +function TPraButtonStyleTemplateInfo.GetBrushDisabledColor: TColor; +begin + result := $00E2D07A; +end; + +function TPraButtonStyleTemplateInfo.GetBrushDownColor: TColor; +begin + result := $00978420; +end; + +function TPraButtonStyleTemplateInfo.GetBrushFocusedColor: TColor; +begin + result := $00978420; +end; + +function TPraButtonStyleTemplateInfo.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateInfo.GetPenDownColor: TColor; +begin + result := $00DBD093; +end; + +function TPraButtonStyleTemplateInfo.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateInfo.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateInfo.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateInfo.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateLight.pas.bak b/source/backup/PraButtonStyleTemplateLight.pas.bak new file mode 100644 index 0000000..8eec3d4 --- /dev/null +++ b/source/backup/PraButtonStyleTemplateLight.pas.bak @@ -0,0 +1,269 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateLight; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateLight = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clBlack; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clBlack; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clBlack; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateLight.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateLight.GetBrushColor: TColor; +begin + result := $00FAF9F8; +end; + +function TPraButtonStyleTemplateLight.GetBrushDisabledColor: TColor; +begin + result := $00CEC5BB; +end; + +function TPraButtonStyleTemplateLight.GetBrushDownColor: TColor; +begin + result := $00E5E0DA; +end; + +function TPraButtonStyleTemplateLight.GetBrushFocusedColor: TColor; +begin + result := $00EAE6E2; +end; + +function TPraButtonStyleTemplateLight.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateLight.GetPenDownColor: TColor; +begin + result := $00E5E0DA; +end; + +function TPraButtonStyleTemplateLight.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateLight.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateLight.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateLight.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplatePrimary.pas.bak b/source/backup/PraButtonStyleTemplatePrimary.pas.bak new file mode 100644 index 0000000..f860c31 --- /dev/null +++ b/source/backup/PraButtonStyleTemplatePrimary.pas.bak @@ -0,0 +1,269 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplatePrimary; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplatePrimary = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplatePrimary.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplatePrimary.GetBrushColor: TColor; +begin + result := $00FE6F2C; +end; + +function TPraButtonStyleTemplatePrimary.GetBrushDisabledColor: TColor; +begin + result := $00FFA95A; +end; + +function TPraButtonStyleTemplatePrimary.GetBrushDownColor: TColor; +begin + result := $00D85F24; +end; + +function TPraButtonStyleTemplatePrimary.GetBrushFocusedColor: TColor; +begin + result := $00D85F24; +end; + +function TPraButtonStyleTemplatePrimary.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplatePrimary.GetPenDownColor: TColor; +begin + result := $00FFB795; +end; + +function TPraButtonStyleTemplatePrimary.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplatePrimary.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplatePrimary.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplatePrimary.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateSecondary.pas.bak b/source/backup/PraButtonStyleTemplateSecondary.pas.bak new file mode 100644 index 0000000..f26c0bb --- /dev/null +++ b/source/backup/PraButtonStyleTemplateSecondary.pas.bak @@ -0,0 +1,269 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateSecondary; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateSecondary = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateSecondary.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateSecondary.GetBrushColor: TColor; +begin + result := $007D756C; +end; + +function TPraButtonStyleTemplateSecondary.GetBrushDisabledColor: TColor; +begin + result := $00AEA8A2; +end; + +function TPraButtonStyleTemplateSecondary.GetBrushDownColor: TColor; +begin + result := $0068625A; +end; + +function TPraButtonStyleTemplateSecondary.GetBrushFocusedColor: TColor; +begin + result := $0068625A; +end; + +function TPraButtonStyleTemplateSecondary.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateSecondary.GetPenDownColor: TColor; +begin + result := $00BEB9B5; +end; + +function TPraButtonStyleTemplateSecondary.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateSecondary.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateSecondary.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateSecondary.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateSuccess.pas.bak b/source/backup/PraButtonStyleTemplateSuccess.pas.bak new file mode 100644 index 0000000..56cd640 --- /dev/null +++ b/source/backup/PraButtonStyleTemplateSuccess.pas.bak @@ -0,0 +1,268 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateSuccess; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateSuccess = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00FFF0E2; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateSuccess.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateSuccess.GetBrushColor: TColor; +begin + result := $0045AA29; +end; + +function TPraButtonStyleTemplateSuccess.GetBrushDisabledColor: TColor; +begin + result := $00FFF0E2; +end; + +function TPraButtonStyleTemplateSuccess.GetBrushDownColor: TColor; +begin + result := $00388A22; +end; + +function TPraButtonStyleTemplateSuccess.GetBrushFocusedColor: TColor; +begin + result := $00388A22; +end; + +function TPraButtonStyleTemplateSuccess.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateSuccess.GetPenDownColor: TColor; +begin + result := $00A2D494; +end; + +function TPraButtonStyleTemplateSuccess.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateSuccess.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateSuccess.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateSuccess.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraButtonStyleTemplateWarning.pas.bak b/source/backup/PraButtonStyleTemplateWarning.pas.bak new file mode 100644 index 0000000..a8eeaaa --- /dev/null +++ b/source/backup/PraButtonStyleTemplateWarning.pas.bak @@ -0,0 +1,269 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraButtonStyleTemplateWarning; + +interface + +uses + {$IF DEFINED(FPC)} + PraInterfaces, + Graphics + {$ELSE} // DEFINE DELPHI + PraInterfaces, + Vcl.Graphics + {$ENDIF} ; + +type + TPraFontConfiguration = class(TInterfacedObject, iPraFontConfigurationCommon) + private + FFont: TFont; + FFontDisabled: TFont; + FFontFocused: TFont; + FFontDown: TFont; + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + public + constructor Create; + destructor Destroy; override; + + property Font: TFont read GetFont; + property FontDown: TFont read GetFontDown; + property FontFocused: TFont read GetFontFocused; + property FontDisabled: TFont read GetFontDisabled; + + class function New: iPraFontConfigurationCommon; + end; + + TPraPenConfiguration = class(TInterfacedObject, iPraPenConfigurationCommon) + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + + public + class function New: iPraPenConfigurationCommon; + end; + + TPraButtonStyleTemplateWarning = class(TInterfacedObject, iPraButtonStyleTemplate) + private + FPenConfigurationCommon: iPraPenConfigurationCommon; + FFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + + function GetPenDownColor: TColor; + + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + + function GetBrushDisabledColor: TColor; + + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + + constructor Create; + public + property BrushColor: TColor read GetBrushColor; + property BrushFocusedColor: TColor read GetBrushFocusedColor; + property BrushDownColor: TColor read GetBrushDownColor; + property PenDownColor: TColor read GetPenDownColor; + property PenConfigurationCommon: iPraPenConfigurationCommon read GetPenConfigurationCommon; + property FontConfigurationCommon: iPraFontConfigurationCommon read GetFontConfigurationCommon; + property BrushDisabledColor: TColor read GetBrushDisabledColor; + property SizeWidth: Smallint read GetSizeWidth; + property SizeHeight: Smallint read GetSizeHeight; + + class function New: iPraButtonStyleTemplate; + end; + +implementation + +uses + System.SysUtils, + PraConsts; + +constructor TPraFontConfiguration.Create; +begin + FFont := TFont.Create; + Font.Color := clWhite; + Font.Name := 'Tahoma'; + Font.Style := [fsBold]; + Font.Size := 10; + + FFontDisabled := TFont.Create; + FontDisabled.Color := $00949494; + FontDisabled.Name := 'Tahoma'; + FontDisabled.Style := [fsBold]; + FontDisabled.Size := 10; + + FFontFocused := TFont.Create; + FontFocused.Color := clWhite; + FontFocused.Name := 'Tahoma'; + FontFocused.Style := [fsBold]; + FontFocused.Size := 10; + + FFontDown := TFont.Create; + FontDown.Color := clWhite; + FontDown.Name := 'Tahoma'; + FontDown.Style := [fsBold]; + FontDown.Size := 10; +end; + +destructor TPraFontConfiguration.Destroy; +begin + freeandNil(FFont); + freeandNil(FFontDisabled); + freeandNil(FFontFocused); + freeandNil(FFontDown); + + inherited Destroy; +end; + +function TPraFontConfiguration.GetFont: TFont; +begin + result := FFont; +end; + +function TPraFontConfiguration.GetFontDisabled: TFont; +begin + result := FFontDisabled; +end; + +function TPraFontConfiguration.GetFontDown: TFont; +begin + result := FFontDown; +end; + +function TPraFontConfiguration.GetFontFocused: TFont; +begin + result := FFontFocused; +end; + +class function TPraFontConfiguration.New: iPraFontConfigurationCommon; +begin + result := self.Create; +end; + +function TPraPenConfiguration.GetPenDisabledStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenDownStyle: TPenStyle; +begin + result := psSolid; +end; + +function TPraPenConfiguration.GetPenDownWidth: Smallint; +begin + result := 3; +end; + +function TPraPenConfiguration.GetPenFocusedStyle: TPenStyle; +begin + result := psClear; +end; + +function TPraPenConfiguration.GetPenStyle: TPenStyle; +begin + result := psClear; +end; + +class function TPraPenConfiguration.New: iPraPenConfigurationCommon; +begin + result := self.Create; +end; + +constructor TPraButtonStyleTemplateWarning.Create; +begin + FPenConfigurationCommon := TPraPenConfiguration.New; + FFontConfigurationCommon := TPraFontConfiguration.New; +end; + +function TPraButtonStyleTemplateWarning.GetBrushColor: TColor; +begin + result := $0016C5FC; +end; + +function TPraButtonStyleTemplateWarning.GetBrushDisabledColor: TColor; +begin + result := $0085E0FE; +end; + +function TPraButtonStyleTemplateWarning.GetBrushDownColor: TColor; +begin + result := $000FACDE; +end; + +function TPraButtonStyleTemplateWarning.GetBrushFocusedColor: TColor; +begin + result := $000FACDE; +end; + +function TPraButtonStyleTemplateWarning.GetFontConfigurationCommon: iPraFontConfigurationCommon; +begin + result := FFontConfigurationCommon; +end; + +function TPraButtonStyleTemplateWarning.GetPenDownColor: TColor; +begin + result := $008AE2FE; +end; + +function TPraButtonStyleTemplateWarning.GetSizeHeight: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_HEIGHT; +end; + +function TPraButtonStyleTemplateWarning.GetSizeWidth: Smallint; +begin + result := BUTTON_STYLE_TEMPLATE_SIZE_WIDTH; +end; + +class function TPraButtonStyleTemplateWarning.New: iPraButtonStyleTemplate; +begin + result := self.Create; +end; + +function TPraButtonStyleTemplateWarning.GetPenConfigurationCommon: iPraPenConfigurationCommon; +begin + result := FPenConfigurationCommon; +end; + +end. diff --git a/source/backup/PraInterfaces.pas.bak b/source/backup/PraInterfaces.pas.bak new file mode 100644 index 0000000..57810d9 --- /dev/null +++ b/source/backup/PraInterfaces.pas.bak @@ -0,0 +1,96 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraInterfaces; + +interface + +uses + {$IF DEFINED(FPC)} + Graphics, + Classes, + SysUtils, + RegExpr, + Generics.Collections, + {$ELSE} //DEFINE DELPHI + Vcl.Graphics + {$ENDIF} ; + + +type + iPraPenConfigurationCommon = interface + ['{445BF2CB-24A2-47FE-98CD-EB06D9844CEC}'] + + function GetPenStyle: TPenStyle; + function GetPenFocusedStyle: TPenStyle; + function GetPenDisabledStyle: TPenStyle; + function GetPenDownStyle: TPenStyle; + function GetPenDownWidth: Smallint; + end; + + iPraFontConfigurationCommon = interface + ['{BC383558-1635-48C5-80FF-F12C16D3A22B}'] + + function GetFont: TFont; + function GetFontDown: TFont; + function GetFontFocused: TFont; + function GetFontDisabled: TFont; + end; + + iPraButtonStyleTemplate = interface + ['{031E5FF4-2134-4E99-B3E1-7108533DC890}'] + + function GetBrushColor: TColor; + function GetBrushFocusedColor: TColor; + function GetBrushDownColor: TColor; + function GetPenDownColor: TColor; + function GetPenConfigurationCommon: iPraPenConfigurationCommon; + function GetFontConfigurationCommon: iPraFontConfigurationCommon; + function GetBrushDisabledColor: TColor; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + end; + + iPraButtonStyleTemplateType = interface + ['{97B300BD-3362-49C1-AE07-CC3A37C4987A}'] + function GetPicture: TPicture; + function GetPictureFocused: TPicture; + function GetPictureStyleOutline: TPicture; + function GetPictureFocusedStyleOutline: TPicture; + function GetPictureDisabled: TPicture; + function GetSizeWidth: Smallint; + function GetSizeHeight: Smallint; + end; + +implementation + +end. diff --git a/source/backup/newpackage.lpk.bak b/source/backup/newpackage.lpk.bak new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/source/backup/newpackage.lpk.bak @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/source/commom/PraRegister.pas b/source/commom/PraRegister.pas index fea85d7..45d60f5 100644 --- a/source/commom/PraRegister.pas +++ b/source/commom/PraRegister.pas @@ -35,6 +35,15 @@ interface uses + +{$IF DEFINED(FPC)} + ShellApi, + // ToolsAPI, + // DesignIntf, + // DesignEditors, + //Graphics, + Classes +{$ELSE} // DEFINE DELPHI ShellApi, ToolsAPI, DesignIntf, @@ -42,6 +51,8 @@ interface Vcl.Graphics, System.Classes; +{$ENDIF} + type TPraComponentProperty = class(TStringProperty) public diff --git a/source/commom/PraUtils.pas b/source/commom/PraUtils.pas index 1de3224..d4c3267 100644 --- a/source/commom/PraUtils.pas +++ b/source/commom/PraUtils.pas @@ -35,18 +35,35 @@ interface uses - Vcl.Imaging.pngimage; -function GetPictureOfResource(const AValue: String): TPngImage; + {$IF DEFINED(FPC)} + Graphics, + Classes, + SysUtils, + RegExpr, + Generics.Collections + + {$ELSE} // DEFINE DELPHI + Vcl.Imaging.pngimage + {$ENDIF} ; + + + +function GetPictureOfResource(const AValue: String): {$IF DEFINED(FPC)} TPortableNetworkGraphic {$ELSE} TPngImage {$ENDIF} ; implementation -function GetPictureOfResource(const AValue: String): TPngImage; +function GetPictureOfResource(const AValue: String): {$IF DEFINED(FPC)} TPortableNetworkGraphic {$ELSE} TPngImage {$ENDIF} ; var - lPNG: TPngImage; + lPNG: {$IF DEFINED(FPC)} TPortableNetworkGraphic {$ELSE} TPngImage {$ENDIF} ; begin - lPNG := TPngImage.Create; - lPNG.LoadFromResourceName(SysInit.HInstance, AValue); + lPNG := {$IF DEFINED(FPC)} TPortableNetworkGraphic.Create {$ELSE} TPngImage.Create {$ENDIF} ; + {$IF DEFINED(FPC)} + // lPNG.LoadFromResourceName(HInstance, avalue) + {$ELSE} + lPNG.LoadFromResourceName(SysInit.HInstance, AValue); + {$ENDIF} ; + result := lPNG; end; diff --git a/source/commom/backup/PraRegister.pas.bak b/source/commom/backup/PraRegister.pas.bak new file mode 100644 index 0000000..e2a268e --- /dev/null +++ b/source/commom/backup/PraRegister.pas.bak @@ -0,0 +1,121 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraRegister; + +interface + +uses + +{$IF DEFINED(FPC)} + ShellApi, + // ToolsAPI, + // DesignIntf, + // DesignEditors, + //Graphics, + Classes +{$ELSE} // DEFINE DELPHI + ShellApi, + ToolsAPI, + DesignIntf, + DesignEditors, + Vcl.Graphics, + System.Classes +{$ENDIF} ; + +{$IF DEFINED(FPC)} +{$ELSE} +type + TPraComponentProperty = class(TStringProperty) + public + function GetValue: string; override; + function GetAttributes: TPropertyAttributes; override; + procedure Edit; override; + end; +{$ENDIF} + + +procedure Register; + +implementation + +uses + PraConsts, + PraButtonStyle, + PraAbout; + +procedure Register; +begin + RegisterComponents('Pra Components', [TPraButtonStyle]); + RegisterPropertyEditor(TypeInfo(String), TPraButtonStyle, 'AboutInfo', TPraComponentProperty); +end; + +procedure AddSplash; +Var + bmp: TBitmap; +Begin + bmp := TBitmap.Create; + try + bmp.LoadFromResourceName(HInstance, 'TPraLogo'); + SplashScreenServices.AddPluginBitmap(PraTitleDialog, bmp.Handle, false, PraAboutlicenseStatus + ' ' + 'v' + Version, ''); + finally + bmp.Free; + end; +End; + +procedure TPraComponentProperty.Edit; +begin + with TFPraViewAbout.Create(nil) do + begin + try + ShowModal; + finally + Free; + end; + end; +end; + +function TPraComponentProperty.GetAttributes: TPropertyAttributes; +begin + Result := [paReadOnly, paDialog]; +end; + +function TPraComponentProperty.GetValue: string; +begin + Result := Version; +end; + +initialization + +AddSplash; + +end. diff --git a/source/commom/backup/PraUtils.pas.bak b/source/commom/backup/PraUtils.pas.bak new file mode 100644 index 0000000..39eafd5 --- /dev/null +++ b/source/commom/backup/PraUtils.pas.bak @@ -0,0 +1,70 @@ +// *************************************************************************** } +// +// Delphi PraButtonStyle +// +// Copyright (c) 2020-2020 Paulo Roberto Alves +// +// https://github.com/pauloalvis/Delphi-PraButtonStyle +// +// *************************************************************************** +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// +// *************************************************************************** + +unit PraUtils; + +interface + +uses + + {$IF DEFINED(FPC)} + Graphics, + Classes, + SysUtils, + RegExpr, + Generics.Collections + + {$ELSE} // DEFINE DELPHI + Vcl.Imaging.pngimage + {$ENDIF} ; + + + +function GetPictureOfResource(const AValue: String): {$IF DEFINED(FPC)} TPortableNetworkGraphic {$ELSE} TPngImage; {$ENDIF} ; + +implementation + +function GetPictureOfResource(const AValue: String): {$IF DEFINED(FPC)} TPortableNetworkGraphic {$ELSE} TPngImage; {$ENDIF} ; +var + lPNG: {$IF DEFINED(FPC)} TPortableNetworkGraphic {$ELSE} TPngImage; {$ENDIF} ; +begin + lPNG := {$IF DEFINED(FPC)} TPortableNetworkGraphic.Create; {$ELSE} TPngImage.Create; {$ENDIF} ; + {$IF DEFINED(FPC)} + lPNG.LoadFromResourceName(sysInit.HInstance, avalue) + {$ELSE} + lPNG.LoadFromResourceName(SysInit.HInstance, AValue); + {$ENDIF} ; + + result := lPNG; +end; + +end. diff --git a/source/commom/view/PraAbout.pas b/source/commom/view/PraAbout.pas index eaaf43a..2a80d6d 100644 --- a/source/commom/view/PraAbout.pas +++ b/source/commom/view/PraAbout.pas @@ -3,13 +3,27 @@ interface uses + + +{$IF DEFINED(FPC)} + Windows, + Classes, + Controls, + Forms, + ExtCtrls, + StdCtrls, + Graphics + //TPortableNetworkGraphic +{$ELSE} // DEFINE DELPHI Winapi.Windows, System.Classes, Vcl.Controls, Vcl.Forms, Vcl.ExtCtrls, Vcl.StdCtrls, - Vcl.Imaging.pngimage; + Vcl.Imaging.pngimage +{$ENDIF} ; + type TFPraViewAbout = class(TForm) @@ -35,8 +49,14 @@ TFPraViewAbout = class(TForm) implementation uses + +{$IF DEFINED(FPC)} + ShellAPI, + PraConsts +{$ELSE} // DEFINE DELPHI Winapi.ShellAPI, - PraConsts; + PraConsts +{$ENDIF} ; {$R *.dfm} diff --git a/source/commom/view/backup/PraAbout.pas.bak b/source/commom/view/backup/PraAbout.pas.bak new file mode 100644 index 0000000..80c0599 --- /dev/null +++ b/source/commom/view/backup/PraAbout.pas.bak @@ -0,0 +1,67 @@ +unit PraAbout; + +interface + +uses + + +{$IF DEFINED(FPC)} + Windows, + Classes, + Controls, + Forms, + ExtCtrls, + StdCtrls, + Graphics + //TPortableNetworkGraphic +{$ELSE} // DEFINE DELPHI + Winapi.Windows, + System.Classes, + Vcl.Controls, + Vcl.Forms, + Vcl.ExtCtrls, + Vcl.StdCtrls, + Vcl.Imaging.pngimage +{$ENDIF} ; + + +type + TFPraViewAbout = class(TForm) + Bevel1: TBevel; + lbVersion: TLabel; + Label3: TLabel; + Label5: TLabel; + Shape1: TShape; + Label1: TLabel; + Image1: TImage; + Label4: TLabel; + Label8: TLabel; + Label9: TLabel; + Label10: TLabel; + Button1: TButton; + procedure Label5Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + end; + +var + FPraViewAbout: TFPraViewAbout; + +implementation + +uses + Winapi.ShellAPI, + PraConsts; + +{$R *.dfm} + +procedure TFPraViewAbout.FormCreate(Sender: TObject); +begin + lbVersion.Caption := 'Version ' + version; +end; + +procedure TFPraViewAbout.Label5Click(Sender: TObject); +begin + ShellExecute(0, 'open', PChar('https://github.com/pauloalvis/Delphi-PraButtonStyle'), nil, nil, SW_SHOWNORMAL); +end; + +end. diff --git a/source/newpackage.lpk b/source/newpackage.lpk new file mode 100644 index 0000000..c3d3192 --- /dev/null +++ b/source/newpackage.lpk @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +