Стартовый пул
This commit is contained in:
164
bgracontrols/test/test_mdbutton/test.lpi
Normal file
164
bgracontrols/test/test_mdbutton/test.lpi
Normal file
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="MDButton"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
</General>
|
||||
<BuildModes Count="3">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item2 Name="Release">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="bin\$(TargetCPU)-$(TargetOS)\test"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
<Item3 Name="Release Linux64">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="bin\$(TargetCPU)-$(TargetOS)\test"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<TargetCPU Value="x86_64"/>
|
||||
<TargetOS Value="linux"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</Item3>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="bgracontrols"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="test.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="project1"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="umain.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="frmMain"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="bin\debug\$(TargetCPU)-$(TargetOS)\test"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<IncludeAssertionCode Value="True"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<Checks>
|
||||
<IOChecks Value="True"/>
|
||||
<RangeChecks Value="True"/>
|
||||
<OverflowChecks Value="True"/>
|
||||
<StackChecks Value="True"/>
|
||||
</Checks>
|
||||
<VerifyObjMethodCallValidity Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
<UseHeaptrc Value="True"/>
|
||||
<TrashVariables Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
23
bgracontrols/test/test_mdbutton/test.lpr
Normal file
23
bgracontrols/test/test_mdbutton/test.lpr
Normal file
@@ -0,0 +1,23 @@
|
||||
program MDButton;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, umain
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Scaled:=True;
|
||||
Application.Title:='MDButton';
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TfrmMain, frmMain);
|
||||
Application.Run;
|
||||
end.
|
||||
|
780
bgracontrols/test/test_mdbutton/umain.lfm
Normal file
780
bgracontrols/test/test_mdbutton/umain.lfm
Normal file
@@ -0,0 +1,780 @@
|
||||
object frmMain: TfrmMain
|
||||
Left = 599
|
||||
Height = 610
|
||||
Top = 176
|
||||
Width = 522
|
||||
AutoSize = True
|
||||
Caption = 'BCMDButton'
|
||||
ChildSizing.LeftRightSpacing = 10
|
||||
ChildSizing.TopBottomSpacing = 10
|
||||
ChildSizing.VerticalSpacing = 10
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 610
|
||||
ClientWidth = 522
|
||||
Color = 16448250
|
||||
DesignTimePPI = 120
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
ShowHint = True
|
||||
LCLVersion = '1.8.4.0'
|
||||
object Label1: TLabel
|
||||
Cursor = crHelp
|
||||
Left = 10
|
||||
Height = 20
|
||||
Hint = 'Set "Kind" property to mdbkNormal'
|
||||
Top = 10
|
||||
Width = 502
|
||||
Caption = 'Basic Buttons'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object Panel13: TPanel
|
||||
Left = 10
|
||||
Height = 30
|
||||
Top = 40
|
||||
Width = 502
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.HorizontalSpacing = 20
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 4
|
||||
ClientHeight = 30
|
||||
ClientWidth = 502
|
||||
ParentFont = False
|
||||
TabOrder = 5
|
||||
object BCMDButton1: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 60
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Basic'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton2: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 80
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 76
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = 12276031
|
||||
StyleHover.Color = 15918563
|
||||
StyleHover.TextColor = 12276031
|
||||
StyleActive.Color = 15456211
|
||||
StyleActive.TextColor = 12276031
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Primary'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton5: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 176
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 85
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = 16448250
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Disabled'
|
||||
Enabled = False
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object Label3: TLabel
|
||||
Cursor = crHelp
|
||||
Left = 10
|
||||
Height = 20
|
||||
Hint = 'Set "Kind" property to mdbkToggleGroup'
|
||||
Top = 80
|
||||
Width = 502
|
||||
Caption = 'Toggle Group'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 10
|
||||
Height = 30
|
||||
Top = 110
|
||||
Width = 502
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.HorizontalSpacing = 20
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 30
|
||||
ClientWidth = 502
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
object BCMDButton9: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 36
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkToggleGroup
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'A'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton10: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 56
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 35
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkToggleGroup
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'B'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton11: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 111
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 35
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Checked = True
|
||||
Kind = mdbkToggleGroup
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'C'
|
||||
Enabled = False
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object Label5: TLabel
|
||||
Cursor = crHelp
|
||||
Left = 10
|
||||
Height = 20
|
||||
Hint = 'Set "Kind" property to mdbkToggle'
|
||||
Top = 150
|
||||
Width = 502
|
||||
Caption = 'Toggle'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object Panel12: TPanel
|
||||
Left = 10
|
||||
Height = 30
|
||||
Top = 180
|
||||
Width = 502
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.HorizontalSpacing = 20
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 4
|
||||
ClientHeight = 30
|
||||
ClientWidth = 502
|
||||
ParentFont = False
|
||||
TabOrder = 4
|
||||
object BCMDButton15: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 36
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkToggle
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'A'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton16: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 56
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 35
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkToggle
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'B'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton17: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 111
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 35
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Checked = True
|
||||
Kind = mdbkToggle
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'C'
|
||||
Enabled = False
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object Label7: TLabel
|
||||
Cursor = crHelp
|
||||
Left = 10
|
||||
Height = 20
|
||||
Hint = 'Set "Kind" property to mdbkCheckBox'
|
||||
Top = 220
|
||||
Width = 502
|
||||
Caption = 'Check Box'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object Panel11: TPanel
|
||||
Left = 10
|
||||
Height = 30
|
||||
Top = 250
|
||||
Width = 502
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.HorizontalSpacing = 20
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 4
|
||||
ClientHeight = 30
|
||||
ClientWidth = 502
|
||||
ParentFont = False
|
||||
TabOrder = 2
|
||||
object mdInvert: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 128
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Invert Selection'
|
||||
OnClick = mdInvertClick
|
||||
ParentFont = False
|
||||
end
|
||||
object mdUnselect: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 148
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 104
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Unselect All'
|
||||
OnClick = mdUnselectClick
|
||||
ParentFont = False
|
||||
end
|
||||
object mdSelect: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 272
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 88
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Select All'
|
||||
OnClick = mdSelectClick
|
||||
ParentFont = False
|
||||
end
|
||||
object mdGet: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 380
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 110
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Get Selected'
|
||||
OnClick = mdGetClick
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object Panel9: TPanel
|
||||
Left = 10
|
||||
Height = 30
|
||||
Top = 290
|
||||
Width = 502
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.HorizontalSpacing = 20
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 30
|
||||
ClientWidth = 502
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
object BCMDButton33: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 101
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkCheckBox
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 1'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton34: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 121
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 101
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkCheckBox
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 2'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton35: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 242
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 101
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Checked = True
|
||||
Kind = mdbkCheckBox
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 3'
|
||||
Enabled = False
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object Label9: TLabel
|
||||
Cursor = crHelp
|
||||
Left = 10
|
||||
Height = 20
|
||||
Hint = 'Set "Kind" property to mdbkRadioButton'
|
||||
Top = 330
|
||||
Width = 502
|
||||
Caption = 'Radio Button'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object Panel2: TPanel
|
||||
Left = 10
|
||||
Height = 70
|
||||
Top = 360
|
||||
Width = 502
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.VerticalSpacing = 10
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 70
|
||||
ClientWidth = 502
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
object mdGetRadio: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 353
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Get Selected'
|
||||
OnClick = mdGetRadioClick
|
||||
ParentFont = False
|
||||
end
|
||||
object Panel7: TPanel
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 40
|
||||
Width = 353
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.HorizontalSpacing = 20
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 30
|
||||
ClientWidth = 353
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
object BCMDButton27: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 105
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkRadioButton
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 1'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton28: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 125
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 105
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkRadioButton
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 2'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton29: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 250
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 103
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Checked = True
|
||||
Kind = mdbkRadioButton
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 3'
|
||||
Enabled = False
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
end
|
||||
object Label10: TLabel
|
||||
Cursor = crHelp
|
||||
Left = 10
|
||||
Height = 20
|
||||
Hint = 'Set "Kind" property to mdbkTab'
|
||||
Top = 440
|
||||
Width = 502
|
||||
Caption = 'Tab'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object Panel8: TPanel
|
||||
Left = 10
|
||||
Height = 30
|
||||
Top = 470
|
||||
Width = 502
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ChildSizing.HorizontalSpacing = 20
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 30
|
||||
ClientWidth = 502
|
||||
ParentFont = False
|
||||
TabOrder = 3
|
||||
object BCMDButton30: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 0
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 84
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Checked = True
|
||||
Kind = mdbkTab
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 1'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton31: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 104
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 84
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkTab
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 2'
|
||||
ParentFont = False
|
||||
end
|
||||
object BCMDButton32: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 208
|
||||
Height = 30
|
||||
Top = 0
|
||||
Width = 84
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Kind = mdbkTab
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Option 3'
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object Label2: TLabel
|
||||
Cursor = crHelp
|
||||
Left = 10
|
||||
Height = 20
|
||||
Hint = 'Set Animation property to True'
|
||||
Top = 510
|
||||
Width = 502
|
||||
Caption = 'Options'
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object mdAnimations: TBCMDButton
|
||||
Cursor = crHandPoint
|
||||
Left = 10
|
||||
Height = 30
|
||||
Top = 540
|
||||
Width = 502
|
||||
Animation = True
|
||||
StyleNormal.Color = 16448250
|
||||
StyleNormal.TextColor = clBlack
|
||||
StyleHover.Color = 14474460
|
||||
StyleHover.TextColor = clBlack
|
||||
StyleActive.Color = 13027014
|
||||
StyleActive.TextColor = clBlack
|
||||
StyleDisabled.Color = clWhite
|
||||
StyleDisabled.TextColor = 10724259
|
||||
Checked = True
|
||||
Kind = mdbkCheckBox
|
||||
TextAutoSize = True
|
||||
TextProportional = False
|
||||
TextProportionalRatio = 0.5
|
||||
AutoSize = True
|
||||
Caption = 'Enable Animations'
|
||||
OnClick = mdAnimationsClick
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
163
bgracontrols/test/test_mdbutton/umain.pas
Normal file
163
bgracontrols/test/test_mdbutton/umain.pas
Normal file
@@ -0,0 +1,163 @@
|
||||
unit umain;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls,
|
||||
BCMDButton;
|
||||
|
||||
type
|
||||
|
||||
{ TfrmMain }
|
||||
|
||||
TfrmMain = class(TForm)
|
||||
Label1: TLabel;
|
||||
Label10: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Label5: TLabel;
|
||||
Label7: TLabel;
|
||||
Label9: TLabel;
|
||||
BCMDButton1: TBCMDButton;
|
||||
BCMDButton10: TBCMDButton;
|
||||
BCMDButton11: TBCMDButton;
|
||||
BCMDButton15: TBCMDButton;
|
||||
BCMDButton16: TBCMDButton;
|
||||
BCMDButton17: TBCMDButton;
|
||||
BCMDButton2: TBCMDButton;
|
||||
BCMDButton27: TBCMDButton;
|
||||
BCMDButton28: TBCMDButton;
|
||||
BCMDButton29: TBCMDButton;
|
||||
BCMDButton30: TBCMDButton;
|
||||
BCMDButton31: TBCMDButton;
|
||||
BCMDButton32: TBCMDButton;
|
||||
BCMDButton5: TBCMDButton;
|
||||
mdGetRadio: TBCMDButton;
|
||||
mdSelect: TBCMDButton;
|
||||
mdUnselect: TBCMDButton;
|
||||
mdInvert: TBCMDButton;
|
||||
BCMDButton33: TBCMDButton;
|
||||
BCMDButton34: TBCMDButton;
|
||||
BCMDButton35: TBCMDButton;
|
||||
mdAnimations: TBCMDButton;
|
||||
mdGet: TBCMDButton;
|
||||
BCMDButton9: TBCMDButton;
|
||||
Panel1: TPanel;
|
||||
Panel11: TPanel;
|
||||
Panel12: TPanel;
|
||||
Panel13: TPanel;
|
||||
Panel2: TPanel;
|
||||
Panel7: TPanel;
|
||||
Panel8: TPanel;
|
||||
Panel9: TPanel;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure MDButton1Click(Sender: TObject);
|
||||
procedure mdSelectClick(Sender: TObject);
|
||||
procedure mdUnselectClick(Sender: TObject);
|
||||
procedure mdInvertClick(Sender: TObject);
|
||||
procedure mdAnimationsClick(Sender: TObject);
|
||||
procedure mdGetRadioClick(Sender: TObject);
|
||||
procedure mdGetClick(Sender: TObject);
|
||||
private
|
||||
procedure EnableAnimations(Control: TControl);
|
||||
procedure DoubleBuffering(Control: TControl);
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmMain: TfrmMain;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TfrmMain }
|
||||
|
||||
procedure TfrmMain.mdSelectClick(Sender: TObject);
|
||||
begin
|
||||
BCMDButton33.SelectAll;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.MDButton1Click(Sender: TObject);
|
||||
begin
|
||||
ShowMessage('Hello World');
|
||||
end;
|
||||
|
||||
procedure TfrmMain.FormCreate(Sender: TObject);
|
||||
begin
|
||||
{$ifdef windows}
|
||||
DoubleBuffering(Self);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure TfrmMain.mdUnselectClick(Sender: TObject);
|
||||
begin
|
||||
BCMDButton33.UnselectAll;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.mdInvertClick(Sender: TObject);
|
||||
begin
|
||||
BCMDButton33.InvertSelection;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.mdAnimationsClick(Sender: TObject);
|
||||
begin
|
||||
EnableAnimations(Self);
|
||||
// Refresh controls
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.mdGetRadioClick(Sender: TObject);
|
||||
begin
|
||||
with BCMDButton27.GetSelected do
|
||||
begin
|
||||
ShowMessage(Text);
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.mdGetClick(Sender: TObject);
|
||||
begin
|
||||
with BCMDButton33.GetSelected do
|
||||
begin
|
||||
ShowMessage(Text);
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.EnableAnimations(Control: TControl);
|
||||
var
|
||||
i: integer;
|
||||
wincontrol: TWinControl;
|
||||
begin
|
||||
if Control is TBCMDButton then
|
||||
TBCMDButton(Control).Animation := mdAnimations.Checked;
|
||||
if Control is TWinControl then
|
||||
begin
|
||||
wincontrol := TWinControl(Control);
|
||||
if wincontrol.ControlCount > 0 then
|
||||
for i := 0 to wincontrol.ControlCount - 1 do
|
||||
EnableAnimations(wincontrol.Controls[i]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.DoubleBuffering(Control: TControl);
|
||||
var
|
||||
i: integer;
|
||||
wincontrol: TWinControl;
|
||||
begin
|
||||
if Control is TWinControl then
|
||||
begin
|
||||
wincontrol := TWinControl(Control);
|
||||
wincontrol.DoubleBuffered := True;
|
||||
if wincontrol.ControlCount > 0 then
|
||||
for i := 0 to wincontrol.ControlCount - 1 do
|
||||
DoubleBuffering(wincontrol.Controls[i]);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user