LazBarcodes: In demo, move PDF417 to new node "Stacked".

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8211 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-03-16 16:48:51 +00:00
parent bcf7b347c4
commit 5e5e918dd5
2 changed files with 43 additions and 34 deletions

View File

@ -7,6 +7,7 @@ object MainForm: TMainForm
ClientHeight = 484 ClientHeight = 484
ClientWidth = 811 ClientWidth = 811
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '2.3.0.0'
object BarcodesTree: TTreeView object BarcodesTree: TTreeView
Left = 6 Left = 6
Height = 472 Height = 472
@ -56,6 +57,7 @@ object MainForm: TMainForm
Top = 4 Top = 4
Width = 21 Width = 21
Caption = 'Text' Caption = 'Text'
ParentColor = False
end end
object edText: TEdit object edText: TEdit
AnchorSideLeft.Control = lblText AnchorSideLeft.Control = lblText
@ -80,12 +82,12 @@ object MainForm: TMainForm
Left = 0 Left = 0
Height = 173 Height = 173
Top = 35 Top = 35
Width = 191 Width = 189
AutoSize = True AutoSize = True
BorderSpacing.Top = 12 BorderSpacing.Top = 12
Caption = 'Geometry' Caption = 'Geometry'
ClientHeight = 153 ClientHeight = 153
ClientWidth = 187 ClientWidth = 185
TabOrder = 1 TabOrder = 1
object lblScale: TLabel object lblScale: TLabel
AnchorSideLeft.Control = gbGeometry AnchorSideLeft.Control = gbGeometry
@ -98,6 +100,7 @@ object MainForm: TMainForm
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Scale' Caption = 'Scale'
Enabled = False Enabled = False
ParentColor = False
end end
object seScale: TSpinEdit object seScale: TSpinEdit
AnchorSideLeft.Control = seWhiteSpaceWidth AnchorSideLeft.Control = seWhiteSpaceWidth
@ -108,7 +111,7 @@ object MainForm: TMainForm
Left = 105 Left = 105
Height = 23 Height = 23
Top = 46 Top = 46
Width = 76 Width = 74
Alignment = taRightJustify Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 8 BorderSpacing.Top = 8
@ -126,7 +129,7 @@ object MainForm: TMainForm
Left = 105 Left = 105
Height = 23 Height = 23
Top = 72 Top = 72
Width = 76 Width = 74
Alignment = taRightJustify Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3 BorderSpacing.Top = 3
@ -147,6 +150,7 @@ object MainForm: TMainForm
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Margin' Caption = 'Margin'
Enabled = False Enabled = False
ParentColor = False
end end
object lblWhiteSpaceWidth: TLabel object lblWhiteSpaceWidth: TLabel
AnchorSideLeft.Control = gbGeometry AnchorSideLeft.Control = gbGeometry
@ -159,6 +163,7 @@ object MainForm: TMainForm
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'White space' Caption = 'White space'
Enabled = False Enabled = False
ParentColor = False
end end
object seWhiteSpaceWidth: TSpinEdit object seWhiteSpaceWidth: TSpinEdit
AnchorSideLeft.Control = seSymbolHeight AnchorSideLeft.Control = seSymbolHeight
@ -169,7 +174,7 @@ object MainForm: TMainForm
Left = 105 Left = 105
Height = 23 Height = 23
Top = 98 Top = 98
Width = 76 Width = 74
Alignment = taRightJustify Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3 BorderSpacing.Top = 3
@ -190,6 +195,7 @@ object MainForm: TMainForm
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Symbol height' Caption = 'Symbol height'
Enabled = False Enabled = False
ParentColor = False
end end
object seSymbolHeight: TSpinEdit object seSymbolHeight: TSpinEdit
AnchorSideLeft.Control = lblSymbolHeight AnchorSideLeft.Control = lblSymbolHeight
@ -201,7 +207,7 @@ object MainForm: TMainForm
Left = 105 Left = 105
Height = 23 Height = 23
Top = 124 Top = 124
Width = 76 Width = 74
Alignment = taRightJustify Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12 BorderSpacing.Left = 12
@ -219,7 +225,7 @@ object MainForm: TMainForm
Left = 16 Left = 16
Height = 19 Height = 19
Top = 19 Top = 19
Width = 165 Width = 163
BorderSpacing.Left = 16 BorderSpacing.Left = 16
BorderSpacing.Right = 6 BorderSpacing.Right = 6
Caption = 'Recommended symbol size' Caption = 'Recommended symbol size'
@ -234,7 +240,7 @@ object MainForm: TMainForm
Left = 16 Left = 16
Height = 19 Height = 19
Top = 0 Top = 0
Width = 68 Width = 66
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Auto size' Caption = 'Auto size'
OnChange = cbAutoSizeChange OnChange = cbAutoSizeChange
@ -245,15 +251,15 @@ object MainForm: TMainForm
AnchorSideLeft.Control = gbGeometry AnchorSideLeft.Control = gbGeometry
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = gbGeometry AnchorSideTop.Control = gbGeometry
Left = 207 Left = 205
Height = 74 Height = 74
Top = 35 Top = 35
Width = 215 Width = 213
AutoSize = True AutoSize = True
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Show...' Caption = 'Show...'
ClientHeight = 54 ClientHeight = 54
ClientWidth = 211 ClientWidth = 209
TabOrder = 2 TabOrder = 2
object cbHumanReadableText: TCheckBox object cbHumanReadableText: TCheckBox
AnchorSideLeft.Control = gbShow AnchorSideLeft.Control = gbShow
@ -261,7 +267,7 @@ object MainForm: TMainForm
Left = 16 Left = 16
Height = 19 Height = 19
Top = 0 Top = 0
Width = 133 Width = 131
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Human-readable text' Caption = 'Human-readable text'
Checked = True Checked = True
@ -278,7 +284,7 @@ object MainForm: TMainForm
Left = 16 Left = 16
Height = 23 Height = 23
Top = 25 Top = 25
Width = 189 Width = 187
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 16 BorderSpacing.Left = 16
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -301,7 +307,7 @@ object MainForm: TMainForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbHumanReadableText AnchorSideTop.Control = cbHumanReadableText
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 155 Left = 153
Height = 25 Height = 25
Top = -3 Top = -3
Width = 50 Width = 50
@ -319,16 +325,16 @@ object MainForm: TMainForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = gbShow AnchorSideRight.Control = gbShow
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 207 Left = 205
Height = 68 Height = 68
Top = 121 Top = 121
Width = 215 Width = 213
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 12 BorderSpacing.Top = 12
Caption = 'Checksum' Caption = 'Checksum'
ClientHeight = 48 ClientHeight = 48
ClientWidth = 211 ClientWidth = 209
TabOrder = 6 TabOrder = 6
object cbAddChecksum: TCheckBox object cbAddChecksum: TCheckBox
AnchorSideLeft.Control = gbChecksum AnchorSideLeft.Control = gbChecksum
@ -336,7 +342,7 @@ object MainForm: TMainForm
Left = 16 Left = 16
Height = 19 Height = 19
Top = 0 Top = 0
Width = 99 Width = 97
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Add checksum' Caption = 'Add checksum'
Checked = True Checked = True
@ -351,7 +357,7 @@ object MainForm: TMainForm
Left = 16 Left = 16
Height = 19 Height = 19
Top = 23 Top = 23
Width = 115 Width = 113
BorderSpacing.Top = 4 BorderSpacing.Top = 4
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
Caption = 'Display checksum' Caption = 'Display checksum'
@ -368,13 +374,13 @@ object MainForm: TMainForm
Left = 0 Left = 0
Height = 109 Height = 109
Top = 224 Top = 224
Width = 191 Width = 189
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 16 BorderSpacing.Top = 16
Caption = 'Colors' Caption = 'Colors'
ClientHeight = 89 ClientHeight = 89
ClientWidth = 187 ClientWidth = 185
TabOrder = 3 TabOrder = 3
object clbBackground: TColorButton object clbBackground: TColorButton
AnchorSideLeft.Control = gbColors AnchorSideLeft.Control = gbColors
@ -430,9 +436,7 @@ object MainForm: TMainForm
end end
end end
object btnSaveToFile: TBitBtn object btnSaveToFile: TBitBtn
AnchorSideLeft.Control = btnCopyToClipboard
AnchorSideTop.Control = gbColors AnchorSideTop.Control = gbColors
AnchorSideRight.Control = btnCopyToClipboard
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 205 Left = 205
Height = 25 Height = 25
@ -446,14 +450,16 @@ object MainForm: TMainForm
TabOrder = 4 TabOrder = 4
end end
object btnCopyToClipboard: TBitBtn object btnCopyToClipboard: TBitBtn
AnchorSideLeft.Control = gbChecksum AnchorSideLeft.Control = btnSaveToFile
AnchorSideTop.Control = btnSaveToFile AnchorSideTop.Control = btnSaveToFile
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = btnSaveToFile
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 205 Left = 205
Height = 25 Height = 25
Top = 264 Top = 264
Width = 128 Width = 128
Anchors = [akTop, akLeft, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'Copy to clipboard' Caption = 'Copy to clipboard'
@ -478,7 +484,7 @@ object MainForm: TMainForm
AnchorSideLeft.Control = gbShow AnchorSideLeft.Control = gbShow
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = gbGeometry AnchorSideTop.Control = gbGeometry
Left = 438 Left = 434
Height = 293 Height = 293
Top = 35 Top = 35
Width = 152 Width = 152
@ -531,8 +537,8 @@ object MainForm: TMainForm
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 104 ClientHeight = 84
ClientWidth = 152 ClientWidth = 148
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'mod-10' 'mod-10'
@ -573,6 +579,7 @@ object MainForm: TMainForm
Caption = 'lblError' Caption = 'lblError'
Font.Color = clRed Font.Color = clRed
Font.Style = [fsBold] Font.Style = [fsBold]
ParentColor = False
ParentFont = False ParentFont = False
Visible = False Visible = False
WordWrap = True WordWrap = True

View File

@ -344,7 +344,7 @@ begin
try try
Items.Clear; Items.Clear;
node := Items.AddChild(nil, '1-dimensional barcodes'); node := Items.AddChild(nil, '1-DIMENSIONAL');
child := Items.AddChildObject(node, 'Code 11', PChar('TBarcodeC11')); child := Items.AddChildObject(node, 'Code 11', PChar('TBarcodeC11'));
child := Items.AddChildObject(node, 'Code 128 and related', PChar('TBarcodeC128')); child := Items.AddChildObject(node, 'Code 128 and related', PChar('TBarcodeC128'));
Items.AddChildObject(child, 'Code-128', Pointer(PtrInt(bctCode128))); Items.AddChildObject(child, 'Code-128', Pointer(PtrInt(bctCode128)));
@ -398,16 +398,18 @@ begin
Items.AddChildObject(child, 'PostNet', Pointer(PtrInt(bctPostNet))); Items.AddChildObject(child, 'PostNet', Pointer(PtrInt(bctPostNet)));
Items.AddChildObject(child, 'Royal Mail RM4SCC', Pointer(PtrInt(bctRM4SCC))); Items.AddChildObject(child, 'Royal Mail RM4SCC', Pointer(PtrInt(bctRM4SCC)));
node := Items.AddChild(nil, '2-dimensional barcodes'); node := Items.AddChild(nil, 'STACKED');
child := Items.AddChildObject(node, 'PDF417 variants', PChar('TBarcodePDF417'));
Items.AddChildObject(child, 'PDF417', Pointer(PtrInt(bctPDF417)));
Items.AddChildObject(child, 'Compact PDF417', Pointer(PtrInt(bctPDF417trunc)));
Items.AddChildObject(child, 'MicroPDF417 (ISO 24728)', Pointer(PtrInt(bctMicroPDF417)));
node := Items.AddChild(nil, '2-DIMENSIONAL');
child := Items.AddChildObject(node, 'QR Code', PChar('TBarcodeQR')); child := Items.AddChildObject(node, 'QR Code', PChar('TBarcodeQR'));
child := Items.AddChildObject(node, 'Micro QR', PChar('TBarcodeMicroQR')); child := Items.AddChildObject(node, 'Micro QR', PChar('TBarcodeMicroQR'));
child := Items.AddChildObject(node, 'Aztec', PChar('TBarcodeAztec')); child := Items.AddChildObject(node, 'Aztec', PChar('TBarcodeAztec'));
child := Items.AddChildObject(node, 'Aztec Rune', PChar('TBarcodeAztecRune')); child := Items.AddChildObject(node, 'Aztec Rune', PChar('TBarcodeAztecRune'));
child := Items.AddChildObject(node, 'Data Matrix', PChar('TBarcodeDataMatrix')); child := Items.AddChildObject(node, 'Data Matrix', PChar('TBarcodeDataMatrix'));
child := Items.AddChildObject(node, 'PDF417 variants', PChar('TBarcodePDF417'));
Items.AddChildObject(child, 'PDF417', Pointer(PtrInt(bctPDF417)));
Items.AddChildObject(child, 'Compact PDF417', Pointer(PtrInt(bctPDF417trunc)));
Items.AddChildObject(child, 'MicroPDF417 (ISO 24728)', Pointer(PtrInt(bctMicroPDF417)));
FullExpand; FullExpand;
finally finally