You've already forked lazarus-ccr
jvcllaz: Activate file info in JvThumbnail. Update demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6333 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -43,7 +43,7 @@ object JvThumbnailChildForm: TJvThumbnailChildForm
|
|||||||
Align = alTop
|
Align = alTop
|
||||||
BackgroundColor = clDefault
|
BackgroundColor = clDefault
|
||||||
Color = clDefault
|
Color = clDefault
|
||||||
FileSortType = fstNone
|
FileSortType = fstAlphabet
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
Images = DataModule1.ImageList1
|
Images = DataModule1.ImageList1
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
@ -63,6 +63,7 @@ object JvThumbnailChildForm: TJvThumbnailChildForm
|
|||||||
HideSelection = False
|
HideSelection = False
|
||||||
Mask = '*.ICO;*.BMP;*.EMF;*.WMF;*.JPG;*.JPEG;'
|
Mask = '*.ICO;*.BMP;*.EMF;*.WMF;*.JPG;*.JPEG;'
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
|
SortType = stText
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
OnChange = ShellListViewChange
|
OnChange = ShellListViewChange
|
||||||
ObjectTypes = [otNonFolders]
|
ObjectTypes = [otNonFolders]
|
||||||
@ -431,9 +432,9 @@ object JvThumbnailChildForm: TJvThumbnailChildForm
|
|||||||
Constraints.MinWidth = 152
|
Constraints.MinWidth = 152
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
OnClick = ThumbNailClick
|
OnClick = ThumbNailClick
|
||||||
|
ShadowColor = clSilver
|
||||||
TitleColor = clBtnFace
|
TitleColor = clBtnFace
|
||||||
TitleFont.Color = clWindowText
|
TitleFont.Color = clWindowText
|
||||||
ShadowColor = clSilver
|
|
||||||
end
|
end
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
AnchorSideLeft.Control = ThumbNail
|
AnchorSideLeft.Control = ThumbNail
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
<XPManifest>
|
<XPManifest>
|
||||||
<DpiAware Value="True"/>
|
<DpiAware Value="True"/>
|
||||||
</XPManifest>
|
</XPManifest>
|
||||||
<Icon Value="0"/>
|
|
||||||
</General>
|
</General>
|
||||||
<BuildModes Count="1">
|
<BuildModes Count="1">
|
||||||
<Item1 Name="Default" Default="True"/>
|
<Item1 Name="Default" Default="True"/>
|
||||||
@ -58,7 +57,6 @@
|
|||||||
<ComponentName Value="DataModule1"/>
|
<ComponentName Value="DataModule1"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="DataModule"/>
|
<ResourceBaseClass Value="DataModule"/>
|
||||||
<UnitName Value="JvThumbnailDatamodule"/>
|
|
||||||
</Unit3>
|
</Unit3>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
object JvThumbnailMainForm: TJvThumbnailMainForm
|
object JvThumbnailMainForm: TJvThumbnailMainForm
|
||||||
Left = 296
|
Left = 296
|
||||||
Height = 656
|
Height = 748
|
||||||
Top = 126
|
Top = 126
|
||||||
Width = 931
|
Width = 931
|
||||||
Caption = 'JvThumbView Demo'
|
Caption = 'JvThumbView Demo'
|
||||||
ClientHeight = 656
|
ClientHeight = 748
|
||||||
ClientWidth = 931
|
ClientWidth = 931
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Constraints.MinHeight = 430
|
Constraints.MinHeight = 430
|
||||||
@ -17,7 +17,7 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
Scaled = False
|
Scaled = False
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 632
|
Height = 724
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 931
|
Width = 931
|
||||||
ActivePage = TabSheet1
|
ActivePage = TabSheet1
|
||||||
@ -26,11 +26,11 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Caption = 'ThumbView Component'
|
Caption = 'ThumbView Component'
|
||||||
ClientHeight = 604
|
ClientHeight = 696
|
||||||
ClientWidth = 923
|
ClientWidth = 923
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 205
|
Left = 205
|
||||||
Height = 544
|
Height = 636
|
||||||
Top = 60
|
Top = 60
|
||||||
Width = 3
|
Width = 3
|
||||||
end
|
end
|
||||||
@ -61,9 +61,9 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object Label3: TLabel
|
object Label3: TLabel
|
||||||
AnchorSideLeft.Control = SpinEdit1
|
AnchorSideLeft.Control = EdGap
|
||||||
AnchorSideTop.Control = Panel1
|
AnchorSideTop.Control = Panel1
|
||||||
AnchorSideRight.Control = SpinEdit1
|
AnchorSideRight.Control = EdGap
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 600
|
Left = 600
|
||||||
Height = 16
|
Height = 16
|
||||||
@ -80,9 +80,9 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
ShowHint = True
|
ShowHint = True
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
object Label4: TLabel
|
||||||
AnchorSideLeft.Control = SpinEdit2
|
AnchorSideLeft.Control = EdSelected
|
||||||
AnchorSideTop.Control = Label3
|
AnchorSideTop.Control = Label3
|
||||||
AnchorSideRight.Control = SpinEdit2
|
AnchorSideRight.Control = EdSelected
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 680
|
Left = 680
|
||||||
Height = 16
|
Height = 16
|
||||||
@ -159,7 +159,7 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
State = cbChecked
|
State = cbChecked
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object SpinEdit1: TSpinEdit
|
object EdGap: TSpinEdit
|
||||||
AnchorSideLeft.Control = BtnEditSelThumb
|
AnchorSideLeft.Control = BtnEditSelThumb
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = Label3
|
AnchorSideTop.Control = Label3
|
||||||
@ -173,16 +173,16 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
BorderSpacing.Top = 3
|
BorderSpacing.Top = 3
|
||||||
MaxValue = 300
|
MaxValue = 300
|
||||||
MinValue = 1
|
MinValue = 1
|
||||||
OnChange = SpinEdit1Change
|
OnChange = EdGapChange
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Value = 1
|
Value = 1
|
||||||
end
|
end
|
||||||
object SpinEdit2: TSpinEdit
|
object EdSelected: TSpinEdit
|
||||||
AnchorSideLeft.Control = SpinEdit1
|
AnchorSideLeft.Control = EdGap
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = SpinEdit1
|
AnchorSideTop.Control = EdGap
|
||||||
Left = 680
|
Left = 680
|
||||||
Height = 23
|
Height = 23
|
||||||
Hint = 'Selects the thumbnail with this index'
|
Hint = 'Selects the thumbnail with this index'
|
||||||
@ -190,7 +190,7 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
Width = 64
|
Width = 64
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Left = 16
|
||||||
MaxValue = 0
|
MaxValue = 0
|
||||||
OnChange = SpinEdit2Change
|
OnChange = EdSelectedChange
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
@ -264,23 +264,23 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
end
|
end
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 544
|
Height = 636
|
||||||
Top = 60
|
Top = 60
|
||||||
Width = 205
|
Width = 205
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'Panel2'
|
Caption = 'Panel2'
|
||||||
ClientHeight = 544
|
ClientHeight = 636
|
||||||
ClientWidth = 205
|
ClientWidth = 205
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object ShellTreeView: TShellTreeView
|
object ShellTreeView: TShellTreeView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 374
|
Height = 438
|
||||||
Hint = 'Set directory where your images are located and watch the thumbview creating the thumbs'
|
Hint = 'Set directory where your images are located and watch the thumbview creating the thumbs'
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 205
|
Width = 205
|
||||||
Align = alClient
|
Align = alClient
|
||||||
FileSortType = fstNone
|
FileSortType = fstAlphabet
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
Images = DataModule1.ImageList1
|
Images = DataModule1.ImageList1
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
@ -290,102 +290,173 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
|
Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
|
||||||
ObjectTypes = [otFolders]
|
ObjectTypes = [otFolders]
|
||||||
end
|
end
|
||||||
object RadioGroup1: TRadioGroup
|
object GroupBox4: TGroupBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 77
|
Height = 190
|
||||||
Hint = 'Change the AlignView property to either use the thumbGup (VTNormal) autocalculate the empty space to equall parts(VTSPACEEQUAL) or Cender the thumbs in the using the htumbgup between them.'
|
Top = 446
|
||||||
Top = 382
|
|
||||||
Width = 205
|
Width = 205
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoFill = True
|
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = ' AlignView '
|
Caption = 'File info'
|
||||||
ChildSizing.LeftRightSpacing = 6
|
ClientHeight = 170
|
||||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
|
||||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
|
||||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
|
||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
|
||||||
ChildSizing.ControlsPerLine = 1
|
|
||||||
ClientHeight = 57
|
|
||||||
ClientWidth = 201
|
ClientWidth = 201
|
||||||
ItemIndex = 0
|
|
||||||
Items.Strings = (
|
|
||||||
'VTNormal'
|
|
||||||
'VTCenter'
|
|
||||||
'VTFitToScreen'
|
|
||||||
)
|
|
||||||
OnClick = RadioGroup1Click
|
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
object LblFileSize: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = InfoFileName
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 12
|
||||||
|
Height = 15
|
||||||
|
Top = 34
|
||||||
|
Width = 23
|
||||||
|
BorderSpacing.Left = 12
|
||||||
|
Caption = 'Size:'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object InfoFileSize: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = LblFileSize
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 20
|
||||||
|
Height = 15
|
||||||
|
Top = 49
|
||||||
|
Width = 5
|
||||||
|
BorderSpacing.Left = 20
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
|
Caption = '-'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object LblDateCreated: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = InfoFileSize
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 12
|
||||||
|
Height = 15
|
||||||
|
Top = 68
|
||||||
|
Width = 69
|
||||||
|
BorderSpacing.Left = 12
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
Caption = 'Date created:'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object InfoDateCreated: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = LblDateCreated
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 20
|
||||||
|
Height = 15
|
||||||
|
Top = 83
|
||||||
|
Width = 5
|
||||||
|
BorderSpacing.Left = 20
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
|
Caption = '-'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object LblDateModified: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = InfoDateCreated
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 12
|
||||||
|
Height = 15
|
||||||
|
Top = 102
|
||||||
|
Width = 75
|
||||||
|
BorderSpacing.Left = 12
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
Caption = 'Date modified'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object InfoDateModified: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = LblDateModified
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 20
|
||||||
|
Height = 15
|
||||||
|
Top = 117
|
||||||
|
Width = 5
|
||||||
|
BorderSpacing.Left = 20
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
|
Caption = '-'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object LblDateAccessed: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = InfoDateModified
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 12
|
||||||
|
Height = 15
|
||||||
|
Top = 136
|
||||||
|
Width = 77
|
||||||
|
BorderSpacing.Left = 12
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
Caption = 'Date accessed:'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object InfoDateAccessed: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = LblDateAccessed
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 20
|
||||||
|
Height = 15
|
||||||
|
Top = 151
|
||||||
|
Width = 5
|
||||||
|
BorderSpacing.Left = 20
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
|
Caption = '-'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object LblFilename: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = GroupBox4
|
||||||
|
Left = 12
|
||||||
|
Height = 15
|
||||||
|
Top = 0
|
||||||
|
Width = 54
|
||||||
|
BorderSpacing.Left = 12
|
||||||
|
Caption = 'File name:'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object InfoFileName: TLabel
|
||||||
|
AnchorSideLeft.Control = GroupBox4
|
||||||
|
AnchorSideTop.Control = LblFilename
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 20
|
||||||
|
Height = 15
|
||||||
|
Top = 15
|
||||||
|
Width = 5
|
||||||
|
BorderSpacing.Left = 20
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
|
Caption = '-'
|
||||||
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object RadioGroup2: TRadioGroup
|
|
||||||
Left = 0
|
|
||||||
Height = 77
|
|
||||||
Hint = 'Change the ScrollMode to change the direction the thumb are scrolling in the screen SMVertical You will see a vertical scrollbar SMHorizontal For A horizontal ScrollBar or SMBoth to create a square view '
|
|
||||||
Top = 467
|
|
||||||
Width = 205
|
|
||||||
Align = alBottom
|
|
||||||
AutoFill = True
|
|
||||||
AutoSize = True
|
|
||||||
BorderSpacing.Top = 8
|
|
||||||
Caption = ' ScrollMode '
|
|
||||||
ChildSizing.LeftRightSpacing = 6
|
|
||||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
|
||||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
|
||||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
|
||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
|
||||||
ChildSizing.ControlsPerLine = 1
|
|
||||||
ClientHeight = 57
|
|
||||||
ClientWidth = 201
|
|
||||||
ItemIndex = 2
|
|
||||||
Items.Strings = (
|
|
||||||
'SMHorizontal'
|
|
||||||
'SMVertical'
|
|
||||||
'SMBoth'
|
|
||||||
)
|
|
||||||
OnClick = RadioGroup2Click
|
|
||||||
TabOrder = 2
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel3: TPanel
|
object Panel3: TPanel
|
||||||
Left = 208
|
Left = 208
|
||||||
Height = 544
|
Height = 636
|
||||||
Top = 60
|
Top = 60
|
||||||
Width = 715
|
Width = 715
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'Panel3'
|
Caption = 'Panel3'
|
||||||
ClientHeight = 544
|
ClientHeight = 636
|
||||||
ClientWidth = 715
|
ClientWidth = 715
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object DirInfoPanel: TPanel
|
|
||||||
Left = 0
|
|
||||||
Height = 16
|
|
||||||
Hint = 'Read the selectedFile property to get the path+filename of the selected thumb'
|
|
||||||
Top = 528
|
|
||||||
Width = 715
|
|
||||||
Align = alBottom
|
|
||||||
BevelOuter = bvLowered
|
|
||||||
ParentShowHint = False
|
|
||||||
ShowHint = True
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object ThumbView: TJvThumbView
|
object ThumbView: TJvThumbView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 528
|
Height = 636
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 553
|
Width = 553
|
||||||
HorzScrollBar.Page = 1
|
HorzScrollBar.Page = 5
|
||||||
HorzScrollBar.Tracking = True
|
HorzScrollBar.Tracking = True
|
||||||
VertScrollBar.Page = 1
|
VertScrollBar.Page = 50
|
||||||
VertScrollBar.Tracking = True
|
VertScrollBar.Tracking = True
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 1
|
ClientHeight = 632
|
||||||
|
ClientWidth = 549
|
||||||
|
TabOrder = 0
|
||||||
TabStop = True
|
TabStop = True
|
||||||
OnDblClick = ThumbViewDblClick
|
OnDblClick = ThumbViewDblClick
|
||||||
OnMouseUp = ThumbViewMouseUp
|
|
||||||
AlignView = vtNormal
|
AlignView = vtNormal
|
||||||
AsButtons = False
|
AsButtons = False
|
||||||
AutoHandleKeyb = True
|
AutoHandleKeyb = True
|
||||||
@ -401,23 +472,28 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
Sorted = True
|
Sorted = True
|
||||||
ThumbColor = clNone
|
ThumbColor = clNone
|
||||||
OnChange = ThumbViewChange
|
OnChange = ThumbViewChange
|
||||||
OnKeyUp = ThumbViewKeyUp
|
|
||||||
OnScanProgress = ThumbViewScanProgress
|
OnScanProgress = ThumbViewScanProgress
|
||||||
OnStartScanning = ThumbViewStartScanning
|
OnStartScanning = ThumbViewStartScanning
|
||||||
OnStopScanning = ThumbViewStopScanning
|
OnStopScanning = ThumbViewStopScanning
|
||||||
|
object Splitter2: TSplitter
|
||||||
|
Left = 0
|
||||||
|
Height = 632
|
||||||
|
Top = 0
|
||||||
|
Width = 5
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object Panel4: TPanel
|
object Panel4: TPanel
|
||||||
Left = 561
|
Left = 561
|
||||||
Height = 528
|
Height = 636
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 146
|
Width = 146
|
||||||
Align = alRight
|
Align = alRight
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 528
|
ClientHeight = 636
|
||||||
ClientWidth = 146
|
ClientWidth = 146
|
||||||
TabOrder = 2
|
TabOrder = 1
|
||||||
object GroupBox1: TGroupBox
|
object GroupBox1: TGroupBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 80
|
Height = 80
|
||||||
@ -730,6 +806,64 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
Text = 'bsNone'
|
Text = 'bsNone'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object RgAlignView: TRadioGroup
|
||||||
|
Left = 0
|
||||||
|
Height = 93
|
||||||
|
Hint = 'Change the AlignView property to either use the thumbGup (VTNormal) autocalculate the empty space to equall parts(VTSPACEEQUAL) or Cender the thumbs in the using the htumbgup between them.'
|
||||||
|
Top = 432
|
||||||
|
Width = 146
|
||||||
|
Align = alTop
|
||||||
|
AutoFill = False
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Top = 8
|
||||||
|
BorderSpacing.InnerBorder = 4
|
||||||
|
Caption = ' AlignView '
|
||||||
|
ChildSizing.LeftRightSpacing = 16
|
||||||
|
ChildSizing.VerticalSpacing = 4
|
||||||
|
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||||
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
|
ChildSizing.ControlsPerLine = 1
|
||||||
|
ClientHeight = 73
|
||||||
|
ClientWidth = 142
|
||||||
|
ItemIndex = 0
|
||||||
|
Items.Strings = (
|
||||||
|
'VTNormal'
|
||||||
|
'VTCenter'
|
||||||
|
'VTFitToScreen'
|
||||||
|
)
|
||||||
|
OnClick = RgAlignViewClick
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
|
object RgScrollMode: TRadioGroup
|
||||||
|
Left = 0
|
||||||
|
Height = 93
|
||||||
|
Hint = 'Change the ScrollMode to change the direction the thumb are scrolling in the screen SMVertical You will see a vertical scrollbar SMHorizontal For A horizontal ScrollBar or SMBoth to create a square view '
|
||||||
|
Top = 533
|
||||||
|
Width = 146
|
||||||
|
Align = alTop
|
||||||
|
AutoFill = False
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Top = 8
|
||||||
|
BorderSpacing.InnerBorder = 4
|
||||||
|
Caption = ' ScrollMode '
|
||||||
|
ChildSizing.LeftRightSpacing = 16
|
||||||
|
ChildSizing.VerticalSpacing = 4
|
||||||
|
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||||
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
|
ChildSizing.ControlsPerLine = 1
|
||||||
|
ClientHeight = 73
|
||||||
|
ClientWidth = 142
|
||||||
|
ItemIndex = 2
|
||||||
|
Items.Strings = (
|
||||||
|
'SMHorizontal'
|
||||||
|
'SMVertical'
|
||||||
|
'SMBoth'
|
||||||
|
)
|
||||||
|
OnClick = RgScrollModeClick
|
||||||
|
TabOrder = 4
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -737,7 +871,7 @@ object JvThumbnailMainForm: TJvThumbnailMainForm
|
|||||||
object Panel5: TPanel
|
object Panel5: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 632
|
Top = 724
|
||||||
Width = 931
|
Width = 931
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BorderWidth = 2
|
BorderWidth = 2
|
||||||
|
@ -31,8 +31,8 @@ unit JvThumbnailMainFormU;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, Controls, Graphics, Forms, StdCtrls, ExtCtrls, ComCtrls, Dialogs,
|
SysUtils, Classes, Controls, Graphics, Forms, Spin,
|
||||||
Spin, ShellCtrls,
|
StdCtrls, ExtCtrls, ComCtrls, Dialogs, ShellCtrls,
|
||||||
JvThumbnails, JvThumbViews, {%H-}JvThumbnailDatamodule;
|
JvThumbnails, JvThumbViews, {%H-}JvThumbnailDatamodule;
|
||||||
|
|
||||||
{JvSpecialProgress,
|
{JvSpecialProgress,
|
||||||
@ -55,16 +55,28 @@ type
|
|||||||
GroupBox1: TGroupBox;
|
GroupBox1: TGroupBox;
|
||||||
GroupBox2: TGroupBox;
|
GroupBox2: TGroupBox;
|
||||||
GroupBox3: TGroupBox;
|
GroupBox3: TGroupBox;
|
||||||
|
GroupBox4: TGroupBox;
|
||||||
|
InfoDateAccessed: TLabel;
|
||||||
|
InfoFileName: TLabel;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
Label10: TLabel;
|
Label10: TLabel;
|
||||||
|
LblDateAccessed: TLabel;
|
||||||
|
LblFileSize: TLabel;
|
||||||
|
InfoFileSize: TLabel;
|
||||||
|
LblDateCreated: TLabel;
|
||||||
|
InfoDateCreated: TLabel;
|
||||||
|
LblDateModified: TLabel;
|
||||||
|
InfoDateModified: TLabel;
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
Label5: TLabel;
|
Label5: TLabel;
|
||||||
Label6: TLabel;
|
Label6: TLabel;
|
||||||
Label7: TLabel;
|
Label7: TLabel;
|
||||||
Label8: TLabel;
|
Label8: TLabel;
|
||||||
Label9: TLabel;
|
Label9: TLabel;
|
||||||
|
LblFilename: TLabel;
|
||||||
PageControl1: TPageControl;
|
PageControl1: TPageControl;
|
||||||
Panel4: TPanel;
|
Panel4: TPanel;
|
||||||
|
Splitter2: TSplitter;
|
||||||
TabSheet1: TTabSheet;
|
TabSheet1: TTabSheet;
|
||||||
Splitter1: TSplitter;
|
Splitter1: TSplitter;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
@ -74,22 +86,28 @@ type
|
|||||||
TbThumbSize: TTrackBar;
|
TbThumbSize: TTrackBar;
|
||||||
CbAutoScrolling: TCheckBox;
|
CbAutoScrolling: TCheckBox;
|
||||||
CbAutoHandleKeyboard: TCheckBox;
|
CbAutoHandleKeyboard: TCheckBox;
|
||||||
SpinEdit1: TSpinEdit;
|
EdGap: TSpinEdit;
|
||||||
SpinEdit2: TSpinEdit;
|
EdSelected: TSpinEdit;
|
||||||
CbSorted: TCheckBox;
|
CbSorted: TCheckBox;
|
||||||
CbMinMemory: TCheckBox;
|
CbMinMemory: TCheckBox;
|
||||||
Panel2: TPanel;
|
Panel2: TPanel;
|
||||||
ShellTreeView: TShellTreeView;
|
ShellTreeView: TShellTreeView;
|
||||||
RadioGroup1: TRadioGroup;
|
RgAlignView: TRadioGroup;
|
||||||
RadioGroup2: TRadioGroup;
|
RgScrollMode: TRadioGroup;
|
||||||
Panel3: TPanel;
|
Panel3: TPanel;
|
||||||
DirInfoPanel: TPanel;
|
|
||||||
BtnStopLoading: TButton;
|
BtnStopLoading: TButton;
|
||||||
BtnEditSelThumb: TButton;
|
BtnEditSelThumb: TButton;
|
||||||
ThumbView: TJVTHumbview;
|
ThumbView: TJVThumbview;
|
||||||
Panel5: TPanel;
|
Panel5: TPanel;
|
||||||
ProgressBar: TProgressBar;
|
ProgressBar: TProgressBar;
|
||||||
Bevel1: TBevel;
|
Bevel1: TBevel;
|
||||||
|
|
||||||
|
procedure BtnEditSelThumbClick(Sender: TObject);
|
||||||
|
procedure BtnStopLoadingClick(Sender: TObject);
|
||||||
|
|
||||||
|
procedure CbAutoHandleKeyboardClick(Sender: TObject);
|
||||||
|
procedure CbAutoScrollingClick(Sender: TObject);
|
||||||
|
procedure CbMinMemoryClick(Sender: TObject);
|
||||||
procedure CbThumbBevelInnerChange(Sender: TObject);
|
procedure CbThumbBevelInnerChange(Sender: TObject);
|
||||||
procedure CbThumbBevelOuterChange(Sender: TObject);
|
procedure CbThumbBevelOuterChange(Sender: TObject);
|
||||||
procedure CbThumbBorderStyleChange(Sender: TObject);
|
procedure CbThumbBorderStyleChange(Sender: TObject);
|
||||||
@ -98,28 +116,23 @@ type
|
|||||||
procedure CbThumbTitleBevelOuterChange(Sender: TObject);
|
procedure CbThumbTitleBevelOuterChange(Sender: TObject);
|
||||||
procedure CbThumbTitleBorderStyleChange(Sender: TObject);
|
procedure CbThumbTitleBorderStyleChange(Sender: TObject);
|
||||||
procedure CbTitleColorColorChanged(Sender: TObject);
|
procedure CbTitleColorColorChanged(Sender: TObject);
|
||||||
|
procedure EdGapChange(Sender: TObject);
|
||||||
|
procedure EdSelectedChange(Sender: TObject);
|
||||||
|
|
||||||
|
procedure FormShow(Sender: TObject);
|
||||||
|
|
||||||
|
procedure RgAlignViewClick(Sender: TObject);
|
||||||
|
procedure RgScrollModeClick(Sender: TObject);
|
||||||
procedure ShellTreeViewChange(Sender: TObject; Node: TTreeNode);
|
procedure ShellTreeViewChange(Sender: TObject; Node: TTreeNode);
|
||||||
procedure ShellTreeViewGetImageIndex(Sender: TObject; Node: TTreeNode);
|
procedure ShellTreeViewGetImageIndex(Sender: TObject; Node: TTreeNode);
|
||||||
procedure ThumbViewKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure TbThumbSizeChange(Sender: TObject);
|
||||||
procedure ThumbViewMouseUp(Sender: TObject; Button: TMouseButton;
|
procedure ThumbViewChange(Sender: TObject);
|
||||||
Shift: TShiftState; X, Y: Integer);
|
procedure ThumbViewDblClick(Sender: TObject);
|
||||||
procedure ThumbViewScanProgress(Sender: TObject; APosition: Integer;
|
procedure ThumbViewScanProgress(Sender: TObject; APosition: Integer;
|
||||||
var Break: Boolean);
|
var Break: Boolean);
|
||||||
procedure ThumbViewStartScanning(Sender: TObject; AMax: Integer);
|
procedure ThumbViewStartScanning(Sender: TObject; AMax: Integer);
|
||||||
procedure ThumbViewStopScanning(Sender: TObject);
|
procedure ThumbViewStopScanning(Sender: TObject);
|
||||||
procedure BtnStopLoadingClick(Sender: TObject);
|
|
||||||
procedure CbAutoScrollingClick(Sender: TObject);
|
|
||||||
procedure CbAutoHandleKeyboardClick(Sender: TObject);
|
|
||||||
procedure CbMinMemoryClick(Sender: TObject);
|
|
||||||
procedure SpinEdit1Change(Sender: TObject);
|
|
||||||
procedure SpinEdit2Change(Sender: TObject);
|
|
||||||
procedure RadioGroup1Click(Sender: TObject);
|
|
||||||
procedure RadioGroup2Click(Sender: TObject);
|
|
||||||
procedure FormShow(Sender: TObject);
|
|
||||||
procedure TbThumbSizeChange(Sender: TObject);
|
|
||||||
procedure ThumbViewDblClick(Sender: TObject);
|
|
||||||
procedure BtnEditSelThumbClick(Sender: TObject);
|
|
||||||
procedure ThumbViewChange(Sender: TObject);
|
|
||||||
public
|
public
|
||||||
NewDir: Boolean;
|
NewDir: Boolean;
|
||||||
Scanning: Boolean;
|
Scanning: Boolean;
|
||||||
@ -130,22 +143,12 @@ var
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses JvThumbnailChildFormU;
|
uses
|
||||||
|
StrUtils,
|
||||||
|
JvThumbnailChildFormU;
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.ThumbViewMouseUp(Sender: TObject; Button: TMouseButton;
|
|
||||||
Shift: TShiftState; X, Y: Integer);
|
|
||||||
begin
|
|
||||||
DirInfoPanel.Caption := ThumbView.SelectedFile;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.ThumbViewKeyUp(Sender: TObject; var Key: Word;
|
|
||||||
Shift: TShiftState);
|
|
||||||
begin
|
|
||||||
DirInfoPanel.Caption := ThumbView.SelectedFile;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.ThumbViewScanProgress(Sender: TObject;
|
procedure TJvThumbnailMainForm.ThumbViewScanProgress(Sender: TObject;
|
||||||
APosition: Integer;
|
APosition: Integer;
|
||||||
var Break: Boolean);
|
var Break: Boolean);
|
||||||
@ -167,11 +170,12 @@ procedure TJvThumbnailMainForm.ThumbViewStopScanning(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
Scanning := False;
|
Scanning := False;
|
||||||
// ShellTreeView.Enabled := True;
|
// ShellTreeView.Enabled := True;
|
||||||
Spinedit2.MaxValue := ThumbView.Count - 1;
|
EdSelected.MaxValue := ThumbView.Count - 1;
|
||||||
newdir := False;
|
newdir := False;
|
||||||
BtnStopLoading.Enabled := False;
|
BtnStopLoading.Enabled := False;
|
||||||
ProgressBar.Position := 0;
|
ProgressBar.Position := 0;
|
||||||
ProgressBar.Visible := false;
|
ProgressBar.Visible := false;
|
||||||
|
ThumbViewChange(nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.BtnStopLoadingClick(Sender: TObject);
|
procedure TJvThumbnailMainForm.BtnStopLoadingClick(Sender: TObject);
|
||||||
@ -234,24 +238,24 @@ begin
|
|||||||
ThumbView.ThumbTitleColor := CbTitleColor.ButtonColor;
|
ThumbView.ThumbTitleColor := CbTitleColor.ButtonColor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.SpinEdit1Change(Sender: TObject);
|
procedure TJvThumbnailMainForm.EdGapChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if spinedit1.Text <> '' then ThumbView.ThumbGap := spinedit1.Value;
|
if EdGap.Text <> '' then ThumbView.ThumbGap := EdGap.Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.SpinEdit2Change(Sender: TObject);
|
procedure TJvThumbnailMainForm.EdSelectedChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ThumbView.Selected := spinedit2.Value;
|
ThumbView.Selected := EdSelected.Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.RadioGroup1Click(Sender: TObject);
|
procedure TJvThumbnailMainForm.RgAlignViewClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ThumbView.AlignView := TViewType(radiogroup1.ItemIndex);
|
ThumbView.AlignView := TViewType(RgAlignView.ItemIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.RadioGroup2Click(Sender: TObject);
|
procedure TJvThumbnailMainForm.RgScrollModeClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ThumbView.ScrollMode := TscrollMode(radiogroup2.ItemIndex);
|
ThumbView.ScrollMode := TscrollMode(RgScrollMode.ItemIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.ShellTreeViewChange(Sender: TObject;
|
procedure TJvThumbnailMainForm.ShellTreeViewChange(Sender: TObject;
|
||||||
@ -283,11 +287,11 @@ begin
|
|||||||
CbAutoHandleKeyboard.Checked := ThumbView.AutoHandleKeyb;
|
CbAutoHandleKeyboard.Checked := ThumbView.AutoHandleKeyb;
|
||||||
CbSorted.Checked := ThumbView.Sorted;
|
CbSorted.Checked := ThumbView.Sorted;
|
||||||
CbSorted.Checked := ThumbView.MinMemory;
|
CbSorted.Checked := ThumbView.MinMemory;
|
||||||
spinedit1.Value := ThumbView.ThumbGap;
|
EdGap.Value := ThumbView.ThumbGap;
|
||||||
spinedit2.MaxValue := 0;
|
EdSelected.MaxValue := 0;
|
||||||
spinedit1.MinValue := 0;
|
EdGap.MinValue := 0;
|
||||||
radiogroup1.ItemIndex := integer(ThumbView.alignview);
|
RgAlignView.ItemIndex := integer(ThumbView.alignview);
|
||||||
radiogroup2.ItemIndex := integer(ThumbView.scrollMode);
|
RgScrollMode.ItemIndex := integer(ThumbView.scrollMode);
|
||||||
Newdir := False;
|
Newdir := False;
|
||||||
Scanning := False;
|
Scanning := False;
|
||||||
end;
|
end;
|
||||||
@ -305,15 +309,9 @@ begin
|
|||||||
try
|
try
|
||||||
F.ShelLTreeView.Path := ShellTreeView.Path;
|
F.ShelLTreeView.Path := ShellTreeView.Path;
|
||||||
if Sender is TJvThumbView then
|
if Sender is TJvThumbView then
|
||||||
begin
|
|
||||||
F.SetFileName(TJvThumbView(Sender).SelectedFile);
|
F.SetFileName(TJvThumbView(Sender).SelectedFile);
|
||||||
// F.FileListBox1.FileName := tjvThumbView(Sender).SelectedFile;
|
|
||||||
end;
|
|
||||||
if Sender is TJvThumbnail then
|
if Sender is TJvThumbnail then
|
||||||
begin
|
|
||||||
F.SetFileName(TJvThumbnail(Sender).FileName);
|
F.SetFileName(TJvThumbnail(Sender).FileName);
|
||||||
// F.FileListBox1.FileName := tjvthumbnail(Sender).FileName;
|
|
||||||
end;
|
|
||||||
F.ShowModal;
|
F.ShowModal;
|
||||||
finally
|
finally
|
||||||
F.Free;
|
F.Free;
|
||||||
@ -326,8 +324,27 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJvThumbnailMainForm.ThumbViewChange(Sender: TObject);
|
procedure TJvThumbnailMainForm.ThumbViewChange(Sender: TObject);
|
||||||
|
var
|
||||||
|
thumbnail: TJvThumbnail;
|
||||||
begin
|
begin
|
||||||
DirInfoPanel.Caption := ThumbView.SelectedFile;
|
Caption := 'JvThumbView Demo - ' + ThumbView.SelectedFile;
|
||||||
|
if ThumbView.Selected > -1 then begin
|
||||||
|
thumbnail := ThumbView.ThumbList[ThumbView.Selected];
|
||||||
|
InfoFilename.Caption := ExtractfileName(thumbnail.FileName);
|
||||||
|
InfoFileSize.Caption := Format('%.1n kB', [thumbnail.FileSize/1024]);
|
||||||
|
InfoDateCreated.Caption := IfThen(thumbnail.FileCreated = 0, '-',
|
||||||
|
DateTimeToStr(thumbnail.FileCreated));
|
||||||
|
InfoDateAccessed.Caption := IfThen(thumbnail.FileAccessed = 0, '-',
|
||||||
|
DateTimeToStr(thumbnail.FileAccessed));
|
||||||
|
InfoDateModified.Caption := IfThen(thumbnail.FileChanged = 0, '-',
|
||||||
|
DateTimeToStr(thumbnail.FileChanged));
|
||||||
|
end else begin
|
||||||
|
InfoFileSize.Caption := '-';
|
||||||
|
InfoDateCreated.Caption := '-';
|
||||||
|
InfoDateAccessed.Caption := '-';
|
||||||
|
InfoDateModified.Caption := '-';
|
||||||
|
end;
|
||||||
|
EdSelected.Value := ThumbView.Selected;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -64,6 +64,9 @@ type
|
|||||||
02) SaveToStream(AStream: TStream; APos: Integer); Save the FileName to AStream
|
02) SaveToStream(AStream: TStream; APos: Integer); Save the FileName to AStream
|
||||||
if APos > -1 then AStream.Seek(APos, 0);
|
if APos > -1 then AStream.Seek(APos, 0);
|
||||||
SaveData;
|
SaveData;
|
||||||
|
|
||||||
|
wp: removed LongName and ShortName - seem to be old DOS-style filenames not
|
||||||
|
useful in Linux, are not used anywhere.
|
||||||
}
|
}
|
||||||
TProgressNotify = procedure(Sender: TObject; Position: Integer; var Stop: Boolean) of object;
|
TProgressNotify = procedure(Sender: TObject; Position: Integer; var Stop: Boolean) of object;
|
||||||
TInvalidImageEvent = procedure(Sender: TObject; const AFileName: string) of object;
|
TInvalidImageEvent = procedure(Sender: TObject; const AFileName: string) of object;
|
||||||
@ -74,13 +77,17 @@ type
|
|||||||
{$M+}
|
{$M+}
|
||||||
TJvFileName = class(TObject) // was: TFileName, renamed to TJvFileName to avoid conflict with existing type
|
TJvFileName = class(TObject) // was: TFileName, renamed to TJvFileName to avoid conflict with existing type
|
||||||
private
|
private
|
||||||
|
{ wp: removed -- not used anywhere
|
||||||
FLongName: string;
|
FLongName: string;
|
||||||
FShortName: string;
|
FShortName: string;
|
||||||
|
}
|
||||||
FFileName: string;
|
FFileName: string;
|
||||||
|
{ wp: not used anywhere
|
||||||
FCreated: TDateTime;
|
FCreated: TDateTime;
|
||||||
FAccessed: TDateTime;
|
FAccessed: TDateTime;
|
||||||
FModified: TDateTime;
|
FModified: TDateTime;
|
||||||
FFileSize: Longint;
|
FFileSize: Longint;
|
||||||
|
}
|
||||||
protected
|
protected
|
||||||
procedure SetName(NewName: string); virtual;
|
procedure SetName(NewName: string); virtual;
|
||||||
function GetLength: Integer;
|
function GetLength: Integer;
|
||||||
@ -91,12 +98,14 @@ type
|
|||||||
// both of this routines are inserting extract data to the stream its self
|
// both of this routines are inserting extract data to the stream its self
|
||||||
// like a header and data end string;
|
// like a header and data end string;
|
||||||
procedure SaveToStream(AStream: TStream; APos: Integer); // Save to a Stream
|
procedure SaveToStream(AStream: TStream; APos: Integer); // Save to a Stream
|
||||||
|
{ wp -- not used anywhere
|
||||||
// (rom) moved to public
|
// (rom) moved to public
|
||||||
property LongName: string read FLongName; // The LongName of this filename
|
property LongName: string read FLongName; // The LongName of this filename
|
||||||
property ShortName: string read FShortName; // shortname of this filename
|
property ShortName: string read FShortName; // shortname of this filename
|
||||||
|
}
|
||||||
published
|
published
|
||||||
property FileName: string read FFileName write SetName; // The FileName as given by the user
|
property FileName: string read FFileName write SetName; // The FileName as given by the user
|
||||||
property Length: Integer read GetLength write SetLength;
|
//property Length: Integer read GetLength write SetLength;
|
||||||
end;
|
end;
|
||||||
{$M-}
|
{$M-}
|
||||||
|
|
||||||
@ -185,8 +194,14 @@ function InRange(Min, Max, Value: Integer; WithBorder: Boolean = false): Boolean
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
SysUtils, Types,
|
{$IFDEF WINDOWS}
|
||||||
JvJCLUtils, JvThemes;
|
Windows,
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
baseunix,
|
||||||
|
{$ENDIF}
|
||||||
|
SysUtils, Types, DateUtils,
|
||||||
|
JvThemes;
|
||||||
|
|
||||||
function ReplaceAllStr(const Str, SearchFor, ReplaceWith: string;
|
function ReplaceAllStr(const Str, SearchFor, ReplaceWith: string;
|
||||||
CaseSensitive: Boolean): string;
|
CaseSensitive: Boolean): string;
|
||||||
@ -627,55 +642,74 @@ begin
|
|||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//=== { TJvFileName } ==========================================================
|
//=== { TJvFileName } ==========================================================
|
||||||
|
|
||||||
procedure TJvFileName.SetName(NewName: string);
|
procedure TJvFileName.SetName(NewName: string);
|
||||||
begin
|
begin
|
||||||
|
if FFileName = NewName then exit;
|
||||||
FFileName := NewName;
|
FFileName := NewName;
|
||||||
{$IFDEF WINDOWS}
|
|
||||||
if (NewName <> LongName) and (NewName <> ShortName) then
|
|
||||||
{$ENDIF}
|
|
||||||
Init;
|
Init;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
|
function FileTimeToDateTime(FileTime: TFileTime): TDateTime;
|
||||||
|
var
|
||||||
|
LocalTime: TFileTime;
|
||||||
|
DOSTime: Integer;
|
||||||
|
begin
|
||||||
|
FileTimeToLocalFileTime(FileTime, LocalTime);
|
||||||
|
FileTimeToDosDateTime(LocalTime, LongRec(DOSTime).Hi, LongRec(DOSTime).Lo);
|
||||||
|
Result := FileDateToDateTime(DOSTime);
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
procedure TJvFileName.Init;
|
procedure TJvFileName.Init;
|
||||||
var
|
var
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
Dft: DWORD;
|
Dft: DWORD;
|
||||||
Lft: TFileTime;
|
Lft: TFileTime;
|
||||||
sr: TSearchRec;
|
sr: TSearchRec;
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
info: stat;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
|
(* wp: not used anywhere...
|
||||||
|
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
if FindFirst(FFileName, faAnyFile or faDirectory, sr) = 0 then
|
if FindFirst(FFileName, faAnyFile or faDirectory, sr) = 0 then
|
||||||
begin
|
begin
|
||||||
FindClose(sr);
|
FindClose(sr);
|
||||||
|
|
||||||
{$IFDEF WINDOWS}
|
|
||||||
FLongName := sr.FindData.cFileName;
|
|
||||||
FShortName := sr.FindData.cAlternateFileName;
|
|
||||||
if FLongName = '' then
|
|
||||||
FLongName := FShortName;
|
|
||||||
if FShortName = '' then
|
|
||||||
FShortName := FLongName;
|
|
||||||
|
|
||||||
// FIX ME !!!
|
|
||||||
|
|
||||||
(**************** NOT CONVERTED ***
|
|
||||||
//fdFileAccessed
|
//fdFileAccessed
|
||||||
FileTimeToLocalFileTime(sr.FindData.ftLastAccessTime, Lft);
|
FileTimeToLocalFileTime(sr.FindData.ftLastAccessTime, Lft);
|
||||||
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
||||||
FAccessed := Dft;
|
FAccessed := Dft;
|
||||||
|
|
||||||
//fdFilechanged
|
//fdFilechanged
|
||||||
FileTimeToLocalFileTime(sr.FindData.ftLastwriteTime, Lft);
|
FileTimeToLocalFileTime(sr.FindData.ftLastwriteTime, Lft);
|
||||||
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
||||||
FModified := Dft;
|
FModified := Dft;
|
||||||
|
|
||||||
//fdFilecreated
|
//fdFilecreated
|
||||||
FileTimeToLocalFileTime(sr.FindData.ftCreationTime, Lft);
|
FileTimeToLocalFileTime(sr.FindData.ftCreationTime, Lft);
|
||||||
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
||||||
FCreated := Dft;
|
FCreated := Dft;
|
||||||
**************)
|
|
||||||
FFileSize := (sr.FindData.nFileSizeHigh * MAXDWORD) + sr.FindData.nFileSizeLow;
|
FFileSize := (sr.FindData.nFileSizeHigh * MAXDWORD) + sr.FindData.nFileSizeLow;
|
||||||
//FFileName:=NewName;
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
if fpstat(FFileName, info) = 0 then begin
|
||||||
|
FAccessed := UnixToDateTime(info.st_atime);
|
||||||
|
FModified := UnixToDateTime(info.st_mtime);
|
||||||
|
FCreated := UnixToDateTime(info.st_ctime);
|
||||||
|
FFileSize := info.Size;
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
*)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJvFileName.LoadFromStream(AStream: TStream; APos: Integer);
|
procedure TJvFileName.LoadFromStream(AStream: TStream; APos: Integer);
|
||||||
|
@ -829,6 +829,7 @@ begin
|
|||||||
// setfocus;
|
// setfocus;
|
||||||
if Count > 0 then begin
|
if Count > 0 then begin
|
||||||
SelNo := -1;
|
SelNo := -1;
|
||||||
|
No := -1;
|
||||||
case ScrollMode of
|
case ScrollMode of
|
||||||
smVertical, smBoth:
|
smVertical, smBoth:
|
||||||
begin
|
begin
|
||||||
@ -837,12 +838,6 @@ begin
|
|||||||
if TempX >= FMaxX then TempX := FMaxX - 1;
|
if TempX >= FMaxX then TempX := FMaxX - 1;
|
||||||
if TempY < 0 then TempY := 0;
|
if TempY < 0 then TempY := 0;
|
||||||
No := TempY * FMaxX + TempX;
|
No := TempY * FMaxX + TempX;
|
||||||
if No < Count then begin
|
|
||||||
thumb := FThumbList.Thumbnail[No];
|
|
||||||
if thumb <> nil then
|
|
||||||
if InRange(thumb.Left, thumb.Left + thumb.Width, X) and
|
|
||||||
InRange(thumb.Top, thumb.Top + thumb.Height, Y) then SelNo := No;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
smHorizontal:
|
smHorizontal:
|
||||||
begin
|
begin
|
||||||
@ -851,13 +846,15 @@ begin
|
|||||||
if TempY >= FMaxX then TempY := FMaxX - 1;
|
if TempY >= FMaxX then TempY := FMaxX - 1;
|
||||||
if TempX < 0 then TempX := 0;
|
if TempX < 0 then TempX := 0;
|
||||||
No := TempX * FMaxX + TempY;
|
No := TempX * FMaxX + TempY;
|
||||||
if No < Count then begin
|
end;
|
||||||
thumb := TJvThumbnail(FThumbList.Objects[No]);
|
end;
|
||||||
|
if (No > -1) and (No < Count) then begin
|
||||||
|
thumb := FThumblist.Thumbnail[No];
|
||||||
if thumb <> nil then
|
if thumb <> nil then
|
||||||
if InRange(thumb.Left, thumb.Left + thumb.Width, X) and
|
if InRange(thumb.Left, thumb.Left + thumb.Width, X) and
|
||||||
InRange(thumb.Top, thumb.Top + thumb.Height, Y) then SelNo := No;
|
InRange(thumb.Top, thumb.Top + thumb.Height, Y)
|
||||||
end;
|
then
|
||||||
end;
|
SelNo := No;
|
||||||
end;
|
end;
|
||||||
SetSelected(SelNo);
|
SetSelected(SelNo);
|
||||||
end;
|
end;
|
||||||
@ -1132,6 +1129,7 @@ end;
|
|||||||
procedure TJvThumbView.SetSelected(Number: Longint);
|
procedure TJvThumbView.SetSelected(Number: Longint);
|
||||||
var
|
var
|
||||||
TN: TJvThumbnail;
|
TN: TJvThumbnail;
|
||||||
|
scrolled: Boolean = false;
|
||||||
begin
|
begin
|
||||||
if (Number < 0) or (Number >= FThumbList.Count) then
|
if (Number < 0) or (Number >= FThumbList.Count) then
|
||||||
Number := -1;
|
Number := -1;
|
||||||
@ -1151,19 +1149,21 @@ begin
|
|||||||
TN.TitleFont.Color := clHighlightText;
|
TN.TitleFont.Color := clHighlightText;
|
||||||
if AutoScrolling then
|
if AutoScrolling then
|
||||||
begin
|
begin
|
||||||
if (TN.Top + TN.Height > Height) or (TN.Top < 0) then
|
if (TN.Top + TN.Height > Height) or (TN.Top < 0) then begin
|
||||||
ScrollTo(Number);
|
ScrollTo(Number);
|
||||||
if (TN.Left + TN.Width > Width) or (TN.Left < 0) then
|
scrolled := true;
|
||||||
|
end;
|
||||||
|
if (TN.Left + TN.Width > Width) or (TN.Left < 0) then begin
|
||||||
ScrollTo(Number);
|
ScrollTo(Number);
|
||||||
|
scrolled := true;
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
if FSelected <> Number then
|
if (FSelected <> Number) or scrolled then
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnChanging) then
|
if Assigned(FOnChanging) then
|
||||||
FOnChanging(Self);
|
FOnChanging(Self);
|
||||||
|
|
||||||
FSelected := Number;
|
FSelected := Number;
|
||||||
|
|
||||||
if Assigned(FOnChange) then
|
if Assigned(FOnChange) then
|
||||||
FOnChange(Self);
|
FOnChange(Self);
|
||||||
end;
|
end;
|
||||||
|
@ -50,7 +50,13 @@ unit JvThumbnails;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
LCLIntf, LCLType, LMessages,
|
{$IFDEF WINDOWS}
|
||||||
|
Windows,
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
baseunix,
|
||||||
|
{$ENDIF}
|
||||||
|
LCLIntf, LCLType, LMessages, Types,
|
||||||
Classes, Controls, ExtCtrls, SysUtils, Graphics, Forms,
|
Classes, Controls, ExtCtrls, SysUtils, Graphics, Forms,
|
||||||
JvThumbImage, JvBaseThumbnail, Dialogs;
|
JvThumbImage, JvBaseThumbnail, Dialogs;
|
||||||
|
|
||||||
@ -71,9 +77,9 @@ type
|
|||||||
FTitleColor: TColor;
|
FTitleColor: TColor;
|
||||||
FTitleFont: TFont;
|
FTitleFont: TFont;
|
||||||
FStreamFileKind: TGRFKind;
|
FStreamFileKind: TGRFKind;
|
||||||
FDFileCreated: string;
|
FDFileCreated: TDateTime;
|
||||||
FDFileChanged: string;
|
FDFileChanged: TDateTime;
|
||||||
FDFileAccessed: string;
|
FDFileAccessed: TDateTime;
|
||||||
FShowTitle: Boolean;
|
FShowTitle: Boolean;
|
||||||
FDFileSize: Longint;
|
FDFileSize: Longint;
|
||||||
FStream: TStream;
|
FStream: TStream;
|
||||||
@ -172,17 +178,17 @@ type
|
|||||||
property TitlePlacement: TTitlePos read FTitlePlacement write SetTitlePlacement default tpUp;
|
property TitlePlacement: TTitlePos read FTitlePlacement write SetTitlePlacement default tpUp;
|
||||||
property OnGetTitle: TTitleNotify read FOnGetTitle write FOnGetTitle;
|
property OnGetTitle: TTitleNotify read FOnGetTitle write FOnGetTitle;
|
||||||
{ Do not store dummies }
|
{ Do not store dummies }
|
||||||
property FileSize: Longint read FDFileSize write SetDummyCard stored False;
|
property FileSize: Longint read FDFileSize stored false; // write SetDummyCard stored False;
|
||||||
property FileAccessed: string read FDFileAccessed write SetDummyStr stored False;
|
property FileAccessed: TDateTime read FDFileAccessed stored false; // write SetDummyStr stored False;
|
||||||
property FileCreated: string read FDFileCreated write SetDummyStr stored False;
|
property FileCreated: TDateTime read FDFileCreated stored false; // write SetDummyStr stored False;
|
||||||
property FileChanged: string read FDFileChanged write SetDummyStr stored False;
|
property FileChanged: TDateTime read FDFileChanged stored false; // write SetDummyStr stored False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
FileUtil,
|
FileUtil, DateUtils,
|
||||||
JvThumbViews, JvResources;
|
JvThumbViews, JvResources;
|
||||||
|
|
||||||
constructor TJvThumbnail.Create(AOwner: TComponent);
|
constructor TJvThumbnail.Create(AOwner: TComponent);
|
||||||
@ -321,50 +327,60 @@ end;
|
|||||||
|
|
||||||
procedure TJvThumbnail.GetFileInfo(AName: String);
|
procedure TJvThumbnail.GetFileInfo(AName: String);
|
||||||
var
|
var
|
||||||
FileInfo: TSearchRec;
|
{$IFDEF WINDOWS}
|
||||||
begin
|
info: TWin32FindDataW;
|
||||||
if FileExists(AName) then begin
|
dft: DWORD;
|
||||||
FDFilesize := FileUtil.FileSize(AName);
|
lft: TFileTime;
|
||||||
// Other fields not supported
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
{ wp ----------- partly replaced by above
|
|
||||||
procedure TJvThumbnail.GetFileInfo(AName: string);
|
|
||||||
var
|
|
||||||
FileInfo: TWin32FindData;
|
|
||||||
H: THandle;
|
H: THandle;
|
||||||
Dft: DWORD;
|
ws: WideString;
|
||||||
Lft: TFileTime;
|
{$ENDIF}
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
info: stat;
|
||||||
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
H := Windows.FindFirstFile(PChar(AName), FileInfo);
|
{$IFDEF WINDOWS}
|
||||||
|
ws := UTF8Decode(AName);
|
||||||
|
H := Windows.FindFirstFileW(PWideChar(ws), info);
|
||||||
if H <> INVALID_HANDLE_VALUE then
|
if H <> INVALID_HANDLE_VALUE then
|
||||||
begin
|
begin
|
||||||
Windows.FindClose(H);
|
Windows.FindClose(H);
|
||||||
FileTimeToLocalFileTime(FileInfo.ftLastAccessTime, Lft);
|
//fdFileAccessed
|
||||||
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
FileTimeToLocalFileTime(info.ftLastAccessTime, lft);
|
||||||
|
FileTimeToDosDateTime(lft, LongRec(dft).Hi, LongRec(dft).Lo);
|
||||||
try
|
try
|
||||||
FDFileAccessed := DateTimeToStr(FileDateToDateTime(Dft));
|
FDFileAccessed := FileDateToDateTime(dft);
|
||||||
except
|
except
|
||||||
FDFileAccessed := RsUnknown;
|
FDFileAccessed := 0;
|
||||||
end;
|
end;
|
||||||
FileTimeToLocalFileTime(FileInfo.ftLastwriteTime, Lft);
|
//fdFilechanged
|
||||||
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
FileTimeToLocalFileTime(info.ftLastwriteTime, lft);
|
||||||
|
FileTimeToDosDateTime(lft, LongRec(dft).Hi, LongRec(dft).Lo);
|
||||||
try
|
try
|
||||||
FDFileChanged := DateTimeToStr(FileDateToDateTime(Dft));
|
FDFileChanged := FileDateToDateTime(dft);
|
||||||
except
|
except
|
||||||
FDFileChanged := RsUnknown;
|
FDFileChanged := 0;
|
||||||
end;
|
end;
|
||||||
FileTimeToLocalFileTime(FileInfo.ftCreationTime, Lft);
|
//fdFileCreated
|
||||||
FileTimeToDosDateTime(Lft, LongRec(Dft).Hi, LongRec(Dft).Lo);
|
FileTimeToLocalFileTime(info.ftCreationTime, lft);
|
||||||
|
FileTimeToDosDateTime(lft, LongRec(dft).Hi, LongRec(dft).Lo);
|
||||||
try
|
try
|
||||||
FDFileCreated := DateTimeToStr(FileDateToDateTime(Dft));
|
FDFileCreated := FileDateToDateTime(dft);
|
||||||
except
|
except
|
||||||
FDFileCreated := RsUnknown;
|
FDFileCreated := 0;
|
||||||
end;
|
end;
|
||||||
FDFileSize := (FileInfo.nFileSizeHigh * MAXDWORD) + FileInfo.nFileSizeLow;
|
FDFileSize := info.nFileSizeHigh * MAXDWORD + info.nFileSizeLow;
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF UNIX}
|
||||||
|
if fpstat(AName, info) = 0 then begin
|
||||||
|
FDFileAccessed := UnixToDateTime(info.st_atime);
|
||||||
|
FDFileChanged := UnixToDateTime(info.st_mtime);
|
||||||
|
FDFileCreated := UnixToDateTime(info.st_ctime);
|
||||||
|
FDFileSize := info.Size;
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
---------------- }
|
|
||||||
|
|
||||||
function TJvThumbnail.GetFileName: string;
|
function TJvThumbnail.GetFileName: string;
|
||||||
begin
|
begin
|
||||||
@ -731,3 +747,4 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user