|
From: Peter T. <pe...@us...> - 2003-08-23 23:20:33
|
Update of /cvsroot/jvcl/dev/JVCL3/examples/JvThumbnail
In directory sc8-pr-cvs1:/tmp/cvs-serv5637/JVCL3/examples/JvThumbnail
Added Files:
JvThumbnailChildFormU.dfm JvThumbnailChildFormU.pas
JvThumbnailDemo.dof JvThumbnailDemo.dpr JvThumbnailDemo.res
JvThumbnailMainFormU.dfm JvThumbnailMainFormU.pas
Log Message:
- Copied jvcl/devtools and jvcl/examples dev/JVCL3
- Copied JVCLConvert *.dat files to dev/JVCL3/converter
--- NEW FILE: JvThumbnailChildFormU.dfm ---
object JvThumbnailChildForm: TJvThumbnailChildForm
Left = 367
Top = 176
Width = 770
Height = 502
Caption = 'JvThumbNail Demo'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Splitter2: TSplitter
Left = 238
Top = 0
Height = 477
end
object Panel6: TPanel
Left = 0
Top = 0
Width = 238
Height = 477
Align = alLeft
TabOrder = 0
OnResize = Panel6Resize
object Splitter4: TSplitter
Left = 1
Top = 138
Width = 236
Height = 3
Cursor = crVSplit
Align = alTop
end
object DirectoryListBox2: TDirectoryListBox
Left = 1
Top = 22
Width = 236
Height = 116
Align = alTop
FileList = FileListBox1
ItemHeight = 16
TabOrder = 0
end
object FileListBox1: TFileListBox
Left = 1
Top = 164
Width = 236
Height = 99
Align = alClient
ItemHeight = 13
Mask = '*.ICO;*.BMP;*.EMF;*.WMF;*.JPG;*.JPEG;'
TabOrder = 1
OnChange = FileListBox1Change
end
object Panel8: TPanel
Left = 1
Top = 263
Width = 236
Height = 213
Align = alBottom
BevelOuter = bvNone
TabOrder = 2
OnResize = Panel8Resize
object Label6: TLabel
Left = 8
Top = 0
Width = 226
Height = 13
Alignment = taCenter
AutoSize = False
Caption = 'RED'
Color = clRed
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
end
object Label7: TLabel
Left = 8
Top = 45
Width = 226
Height = 14
Alignment = taCenter
AutoSize = False
Caption = 'GREEN'
Color = clLime
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
end
object Label8: TLabel
Left = 7
Top = 89
Width = 226
Height = 14
Alignment = taCenter
AutoSize = False
Caption = 'BLUE'
Color = clBlue
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
end
object Label9: TLabel
Left = 6
Top = 137
Width = 91
Height = 14
Alignment = taCenter
AutoSize = False
Caption = 'CONTRAST'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
Transparent = True
end
object Label1: TLabel
Left = 134
Top = 137
Width = 91
Height = 14
Alignment = taCenter
AutoSize = False
Caption = 'LIGHTNESS'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentColor = False
ParentFont = False
Transparent = True
end
object REDBar: TTrackBar
Left = 0
Top = 13
Width = 241
Height = 29
Max = 255
Min = -255
PageSize = 20
Frequency = 51
TabOrder = 0
TickStyle = tsNone
end
object GreenBar: TTrackBar
Left = 0
Top = 59
Width = 241
Height = 30
Max = 255
Min = -255
PageSize = 20
Frequency = 51
TabOrder = 1
TickStyle = tsNone
end
object BlueBar: TTrackBar
Left = -1
Top = 107
Width = 241
Height = 30
Max = 255
Min = -255
PageSize = 20
Frequency = 51
TabOrder = 2
TickStyle = tsNone
end
object contrastBar: TTrackBar
Left = -1
Top = 152
Width = 106
Height = 30
Max = 100
Min = -100
PageSize = 20
Frequency = 51
TabOrder = 3
TickStyle = tsNone
end
object Button2: TButton
Left = 8
Top = 184
Width = 225
Height = 25
Caption = 'APPLY'
TabOrder = 4
OnClick = Button2Click
end
object LightnessBar: TTrackBar
Left = 127
Top = 152
Width = 106
Height = 30
Max = 100
Min = -100
PageSize = 20
Frequency = 51
TabOrder = 5
TickStyle = tsNone
end
end
object Panel9: TPanel
Left = 1
Top = 1
Width = 236
Height = 21
Align = alTop
BevelOuter = bvNone
Caption = 'Panel9'
TabOrder = 3
object DriveComboBox2: TDriveComboBox
Left = 2
Top = 2
Width = 235
Height = 19
DirList = DirectoryListBox2
TabOrder = 0
end
end
object Panel10: TPanel
Left = 1
Top = 141
Width = 236
Height = 23
Align = alTop
BevelOuter = bvNone
Caption = 'Panel10'
TabOrder = 4
OnResize = Panel10Resize
object FilterComboBox1: TFilterComboBox
Left = 2
Top = 0
Width = 235
Height = 21
FileList = FileListBox1
Filter =
'All Known Formats|*.ICO;*.BMP;*.EMF;*.WMF;*.JPG;*.JPEG;|All File' +
's (*.*)|*.*|JPEG Files|*.JPG;*.JPEG;|BMP Files|*.BMP|WMF Files|*' +
'.WMF|EMF Files |*.EMF|ICONS |*.ICO'
TabOrder = 0
end
end
end
object Panel7: TPanel
Left = 241
Top = 0
Width = 521
Height = 477
Align = alClient
TabOrder = 1
object ThumbImage1: TJvThumbImage
Left = 1
Top = 144
Width = 518
Height = 330
AutoSize = True
IgnoreMouse = False
Angle = AT0
Zoom = 0
end
object Panel5: TPanel
Left = 1
Top = 1
Width = 519
Height = 144
Align = alTop
TabOrder = 0
object Label5: TLabel
Left = 161
Top = 100
Width = 193
Height = 13
Hint = 'You can set the thumbnails title to what ever you want it to be '
AutoSize = False
Caption = 'THumbnails Title'
end
object Bevel1: TBevel
Left = 156
Top = 3
Width = 232
Height = 137
end
object asbuttoncb: TCheckBox
Left = 161
Top = 7
Width = 97
Height = 17
Hint = 'This will give a button effect when the thumbnail is clicked '
Caption = 'AsButton'
Checked = True
State = cbChecked
TabOrder = 0
OnClick = asbuttoncbClick
end
object autoloadcb: TCheckBox
Left = 161
Top = 31
Width = 97
Height = 17
Hint =
'If AutoLoad = true when you pass a name to the filename it autom' +
'atically loads it else not(for Future reference where the will b' +
'e a thumblist file)'
Caption = 'Autoload'
Checked = True
ParentShowHint = False
ShowHint = True
State = cbChecked
TabOrder = 1
OnClick = autoloadcbClick
end
object minmemcb: TCheckBox
Left = 161
Top = 55
Width = 97
Height = 17
Hint =
'This will forse the thumbimage to convert all the thumbs in BMP ' +
'and reduce memory usage us much as possible'
Caption = 'MinimizeMemory'
Checked = True
ParentShowHint = False
ShowHint = True
State = cbChecked
TabOrder = 2
OnClick = minmemcbClick
end
object titleplacegr: TRadioGroup
Left = 265
Top = 9
Width = 113
Height = 65
Hint = 'The position of the thumbnail''s title'
Caption = ' Title Placement '
ItemIndex = 0
Items.Strings = (
'T_UP'
'T_Down')
ParentShowHint = False
ShowHint = True
TabOrder = 3
OnClick = titleplacegrClick
end
object Edit1: TEdit
Left = 161
Top = 116
Width = 224
Height = 21
Hint = 'You can set the thumbnails title to what ever you want it to be '
TabOrder = 4
Text = 'Edit1'
end
object GroupBox1: TGroupBox
Left = 390
Top = 8
Width = 121
Height = 75
Caption = 'THUMBIMAGE'
TabOrder = 5
object Button4: TButton
Left = 8
Top = 16
Width = 105
Height = 25
Caption = 'INVERT'
TabOrder = 0
OnClick = Button4Click
end
object Button5: TButton
Left = 8
Top = 48
Width = 105
Height = 25
Caption = 'GRAYSCALE'
TabOrder = 1
OnClick = Button5Click
end
end
object Button1: TButton
Left = 264
Top = 88
Width = 113
Height = 25
Caption = 'EXIT'
ModalResult = 1
TabOrder = 6
end
object AngleGr: TRadioGroup
Left = 390
Top = 81
Width = 123
Height = 60
Caption = ' ThumbImage Angle '
Columns = 2
Items.Strings = (
'0'
'90'
'180'
'270')
TabOrder = 7
OnClick = AngleGrClick
end
object ThumbNail1: TJvThumbnail
Left = 1
Top = 1
Width = 154
Height = 142
TabOrder = 8
OnClick = ThumbNail1Click
TitleColor = clBtnFace
TitleFont.Charset = DEFAULT_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -11
TitleFont.Name = 'MS Sans Serif'
TitleFont.Style = []
ClientWidth = 146
ClientHeight = 119
AsButton = False
MinimizeMemory = True
ShowTitle = False
AutoLoad = True
ShadowColor = clSilver
ShowShadow = False
end
end
end
end
--- NEW FILE: JvThumbnailChildFormU.pas ---
unit JvThumbnailChildFormU;
interface
uses
Classes, Controls, Forms, StdCtrls, ExtCtrls, FileCtrl, ComCtrls, JvThumbImage,
JvThumbNails, JvBaseThumbnail;
type
TJvThumbnailChildForm = class(TForm)
Splitter2: TSplitter;
Panel6: TPanel;
Splitter4: TSplitter;
DirectoryListBox2: TDirectoryListBox;
FileListBox1: TFileListBox;
Panel8: TPanel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
REDBar: TTrackBar;
GreenBar: TTrackBar;
BlueBar: TTrackBar;
contrastBar: TTrackBar;
Button2: TButton;
Panel9: TPanel;
DriveComboBox2: TDriveComboBox;
Panel10: TPanel;
FilterComboBox1: TFilterComboBox;
Panel7: TPanel;
Panel5: TPanel;
Label5: TLabel;
Bevel1: TBevel;
asbuttoncb: TCheckBox;
autoloadcb: TCheckBox;
minmemcb: TCheckBox;
titleplacegr: TRadioGroup;
Edit1: TEdit;
GroupBox1: TGroupBox;
Button4: TButton;
Button5: TButton;
Label1: TLabel;
LightnessBar: TTrackBar;
Button1: TButton;
AngleGr: TRadioGroup;
ThumbNail1: TJVThumbNail;
ThumbImage1: TJvThumbImage;
procedure Button2Click(Sender: TObject);
procedure Panel6Resize(Sender: TObject);
procedure FileListBox1Change(Sender: TObject);
procedure asbuttoncbClick(Sender: TObject);
procedure autoloadcbClick(Sender: TObject);
procedure minmemcbClick(Sender: TObject);
procedure titleplacegrClick(Sender: TObject);
procedure Panel8Resize(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure thumbnail1Click(Sender: TObject);
procedure Panel10Resize(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure AngleGrClick(Sender: TObject);
end;
var
JvThumbnailChildForm: TJvThumbnailChildForm;
implementation
{$R *.DFM}
procedure TJvThumbnailChildForm.Button2Click(Sender: TObject);
begin
thumbimage1.ChangeRGB(redbar.Position,greenbar.Position,bluebar.Position);
thumbimage1.Contrast(contrastbar.Position);
THumbImage1.Lightness(LightnessBar.Position);
redbar.Position:=0;
greenbar.Position :=0;
bluebar.Position:=0;
contrastbar.position:=0;
lightnessbar.Position:=0;
end;
procedure TJvThumbnailChildForm.Panel6Resize(Sender: TObject);
begin
DriveComboBox2.Height:= panel9.ClientHeight;
DriveComboBox2.Width := panel9.ClientWidth;
end;
procedure TJvThumbnailChildForm.FileListBox1Change(Sender: TObject);
begin
if filelistbox1.FileName<>'' then
thumbnail1.FileName := filelistbox1.FileName;
end;
procedure TJvThumbnailChildForm.asbuttoncbClick(Sender: TObject);
begin
THumbnail1.Asbutton := asbuttoncb.Checked;
end;
procedure TJvThumbnailChildForm.autoloadcbClick(Sender: TObject);
begin
thumbnail1.autoload := autoloadcb.Checked;
end;
procedure TJvThumbnailChildForm.minmemcbClick(Sender: TObject);
begin
thumbnail1.minimizememory:=minmemcb.Checked;
end;
procedure TJvThumbnailChildForm.titleplacegrClick(Sender: TObject);
begin
thumbnail1.TitlePlacement := ttitlepos(titleplacegr.ItemIndex);
end;
procedure TJvThumbnailChildForm.Panel8Resize(Sender: TObject);
begin
redbar.Width := panel8.ClientWidth;
end;
procedure TJvThumbnailChildForm.Button4Click(Sender: TObject);
begin
thumbimage1.invert;
end;
procedure TJvThumbnailChildForm.Button5Click(Sender: TObject);
begin
thumbimage1.grayscale;
end;
procedure TJvThumbnailChildForm.thumbnail1Click(Sender: TObject);
begin
if thumbnail1.FileName<>'' then
thumbimage1.Loadfromfile(thumbnail1.FileName);
end;
procedure TJvThumbnailChildForm.Panel10Resize(Sender: TObject);
begin
filtercombobox1.Width := panel10.ClientWidth;
filtercombobox1.Height:= panel10.ClientHeight;
end;
procedure TJvThumbnailChildForm.FormShow(Sender: TObject);
begin
//thumbimage1.Picture.Free;
TitlePlacegr.ItemIndex := integer(thumbnail1.titlePlacement);
Anglegr.ItemIndex := integer(thumbimage1.angle);
end;
procedure TJvThumbnailChildForm.AngleGrClick(Sender: TObject);
begin
thumbimage1.angle := TAngle(anglegr.ItemIndex)
end;
end.
--- NEW FILE: JvThumbnailDemo.dof ---
[Directories]
OutputDir=..\..\Bin
UnitOutputDir=..\..\Dcu
SearchPath=..\..\Source;..\..\Common
--- NEW FILE: JvThumbnailDemo.dpr ---
program JvThumbnailDemo;
uses
Forms,
JvThumbnailMainFormU in 'JvThumbnailMainFormU.pas' {JvThumbnailMainForm},
JvThumbnailChildFormU in 'JvThumbnailChildFormU.pas' {JvThumbnailChildForm};
{$R *.RES}
begin
Application.Initialize;
Application.CreateForm(TJvThumbnailMainForm, JvThumbnailMainForm);
Application.CreateForm(TJvThumbnailMainForm, JvThumbnailMainForm);
Application.CreateForm(TJvThumbnailChildForm, JvThumbnailChildForm);
Application.Run;
end.
--- NEW FILE: JvThumbnailDemo.res ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: JvThumbnailMainFormU.dfm ---
object JvThumbnailMainForm: TJvThumbnailMainForm
Left = 293
Top = 118
Width = 789
Height = 614
Caption = 'JvThumbView Demo'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object PageControl1: TPageControl
Left = 0
Top = 0
Width = 781
Height = 565
ActivePage = TabSheet1
Align = alClient
TabOrder = 0
object TabSheet1: TTabSheet
Caption = 'ThumbView Component'
object Splitter1: TSplitter
Left = 153
Top = 46
Height = 491
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 773
Height = 46
Align = alTop
TabOrder = 0
object Label1: TLabel
Left = 148
Top = 3
Width = 150
Height = 17
Alignment = taCenter
AutoSize = False
Caption = 'Thumbnail size'
end
object Label2: TLabel
Left = 2
Top = 5
Width = 145
Height = 15
Alignment = taCenter
AutoSize = False
Caption = 'Select Drive'
end
object Label3: TLabel
Left = 612
Top = 3
Width = 61
Height = 16
Hint = 'Change the thumbgup to change the space between the thumbnails '
Alignment = taCenter
AutoSize = False
Caption = 'Gap:'
ParentShowHint = False
ShowHint = True
end
object Label4: TLabel
Left = 677
Top = 4
Width = 61
Height = 16
Hint = 'Change the selected to select the Nth element in the list.'
Alignment = taCenter
AutoSize = False
Caption = 'Selected:'
ParentShowHint = False
ShowHint = True
end
object TrackBar1: TTrackBar
Left = 148
Top = 15
Width = 150
Height = 28
Hint =
'Change the size property to change the size of the thumbs it acc' +
'epts values for 10..100'
Max = 100
Min = 10
ParentShowHint = False
PageSize = 10
Frequency = 10
Position = 100
ShowHint = True
TabOrder = 0
TickMarks = tmTopLeft
TickStyle = tsNone
OnChange = TrackBar1Change
end
object DriveComboBox1: TDriveComboBox
Left = 2
Top = 22
Width = 145
Height = 19
DirList = DirectoryListBox1
TabOrder = 1
end
object CheckBox1: TCheckBox
Left = 304
Top = 2
Width = 103
Height = 17
Hint =
'Set AutoScrolling to true to let the Thumbview component scroll ' +
'the selected thumb into the screen automatically'
Caption = 'AutoScrolling'
Checked = True
ParentShowHint = False
ShowHint = True
State = cbChecked
TabOrder = 2
OnClick = CheckBox1Click
end
object CheckBox2: TCheckBox
Left = 304
Top = 24
Width = 103
Height = 17
Hint =
'Set AutoHandlekeyb to true to let the Thumbview Cupture the curs' +
'or key and navigate through the view using them'
Caption = 'AutoHandleKeyb'
Checked = True
ParentShowHint = False
ShowHint = True
State = cbChecked
TabOrder = 3
OnClick = CheckBox2Click
end
object SpinEdit1: TSpinEdit
Left = 611
Top = 21
Width = 64
Height = 22
Hint = 'Change the thumbgup to change the space between the thumbnails '
MaxLength = 3
MaxValue = 300
MinValue = 1
ParentShowHint = False
ShowHint = True
TabOrder = 4
Value = 1
OnChange = SpinEdit1Change
end
object SpinEdit2: TSpinEdit
Left = 676
Top = 20
Width = 64
Height = 22
Hint = 'Change the thumbgup to change the space between the thumbnails '
MaxValue = 0
MinValue = 0
ParentShowHint = False
ShowHint = True
TabOrder = 5
Value = 0
OnChange = SpinEdit2Change
end
object CheckBox3: TCheckBox
Left = 411
Top = 2
Width = 58
Height = 17
Hint =
'Set Sorted to true to sort the files found in the directory by n' +
'ame (other posibilities in the next version)'
Caption = 'Sorted'
Checked = True
ParentShowHint = False
ShowHint = True
State = cbChecked
TabOrder = 6
end
object CheckBox4: TCheckBox
Left = 411
Top = 24
Width = 103
Height = 17
Hint =
'Set Sorted to true to sort the files found in the directory by n' +
'ame (other posibilities in the next version)'
Caption = 'MinMemory'
Checked = True
ParentShowHint = False
ShowHint = True
State = cbChecked
TabOrder = 7
OnClick = CheckBox4Click
end
object Button1: TButton
Left = 489
Top = 3
Width = 117
Height = 20
Caption = 'Stop Loading'
Enabled = False
TabOrder = 8
OnClick = Button1Click
end
object Button2: TButton
Left = 489
Top = 24
Width = 117
Height = 20
Caption = 'Edit Selected Thumb'
TabOrder = 9
OnClick = Button2Click
end
end
object Panel2: TPanel
Left = 0
Top = 46
Width = 153
Height = 491
Align = alLeft
BevelOuter = bvNone
Caption = 'Panel2'
TabOrder = 1
object DirectoryListBox1: TDirectoryListBox
Left = 0
Top = 0
Width = 153
Height = 300
Hint =
'Set the directory property to the directory where your images lo' +
'cated and wach the thumbview creating this thumbs'
Align = alClient
ItemHeight = 16
TabOrder = 0
OnChange = DirectoryListBox1Change
end
object RadioGroup1: TRadioGroup
Left = 0
Top = 300
Width = 153
Height = 86
Hint =
'Change the AlignView property to either use the thumbGup (VTNorm' +
'al) autocalculate the empty space to equall parts(VTSPACEEQUAL) ' +
'or Cender the thumbs in the using the htumbgup between them.'
Align = alBottom
Caption = ' AlignView '
ItemIndex = 0
Items.Strings = (
'VTNormal'
'VTCenter'
'VTFitToScreen')
TabOrder = 1
OnClick = RadioGroup1Click
end
object RadioGroup2: TRadioGroup
Left = 0
Top = 386
Width = 153
Height = 105
Hint =
'Change the ScrollMode to change the direction the thumb are scro' +
'lling in the screen SMVertical You will see a vertical scrollbar' +
' SMHorizontal For A horizontal ScrollBar or SMBoth to create a s' +
'quare view '
Align = alBottom
Caption = ' ScrollMode '
ItemIndex = 2
Items.Strings = (
'SMHorizontal'
'SMVertical'
'SMBoth')
TabOrder = 2
OnClick = RadioGroup2Click
end
end
object Panel3: TPanel
Left = 156
Top = 46
Width = 617
Height = 491
Align = alClient
BevelOuter = bvNone
Caption = 'Panel3'
TabOrder = 2
object Panel4: TPanel
Left = 0
Top = 475
Width = 617
Height = 16
Hint =
'Read the selectedFile property to get the path+filename of the s' +
'elected thumb'
Align = alBottom
BevelOuter = bvLowered
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object THumbview1: TJvThumbView
Left = 0
Top = 0
Width = 617
Height = 475
HorzScrollBar.Tracking = True
VertScrollBar.Tracking = True
Align = alClient
TabOrder = 1
TabStop = True
OnDblClick = THumbview1DblClick
OnMouseUp = THumbview1MouseUp
AlignView = vtNormal
AutoScrolling = True
ThumbGap = 4
AutoHandleKeyb = True
MinMemory = True
MaxWidth = 200
MaxHeight = 200
Size = 100
ScrollMode = smHorizontal
Sorted = True
OnStartScanning = THumbview1StartScanning
OnStopScanning = THumbview1StopScanning
OnScanProgress = THumbview1ScanProgress
OnChange = THumbview1Change
OnKeyUp = THumbview1keyup
AsButtons = False
Filter =
'Portable Graphics Network (*.png)|*.png|PCX Image (*.pcx)|*.pcx|' +
'ANI Image (*.ani)|*.ani|JPEG Image File (*.jpg)|*.jpg|Bitmaps (*' +
'.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced Metafiles (*.emf)|*.emf' +
'|Metafiles (*.wmf)|*.wmf'
ThumbColor = clNone
ShowShadow = False
ShadowColor = clBlack
end
end
end
end
object Panel5: TPanel
Left = 0
Top = 565
Width = 781
Height = 24
Align = alBottom
BorderWidth = 2
TabOrder = 1
object Bevel1: TBevel
Left = 3
Top = 3
Width = 291
Height = 18
Align = alLeft
end
object JvSpecialProgress1: TJvSpecialProgress
Left = 5
Top = 5
Width = 284
Height = 13
EndColor = clNavy
HintColor = clBtnFace
Solid = True
Step = 0
end
end
end
--- NEW FILE: JvThumbnailMainFormU.pas ---
unit JvThumbnailMainFormU;
interface
uses
Classes, Controls, Forms, StdCtrls, ExtCtrls, FileCtrl, ComCtrls, Spin,
JvThumbNails, JvSpecialProgress, JvThumbViews, JvBaseThumbnail;
type
TJvThumbnailMainForm = class(TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
Splitter1: TSplitter;
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
TrackBar1: TTrackBar;
DriveComboBox1: TDriveComboBox;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
Panel2: TPanel;
DirectoryListBox1: TDirectoryListBox;
RadioGroup1: TRadioGroup;
RadioGroup2: TRadioGroup;
Panel3: TPanel;
Panel4: TPanel;
Button1: TButton;
Button2: TButton;
THumbview1: TJVTHumbview;
Panel5: TPanel;
JvSpecialProgress1: TJvSpecialProgress;
Bevel1: TBevel;
procedure THumbview1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure THumbview1keyup(Sender: TObject; var Key: Word; Shift: TShiftState);
procedure DirectoryListBox1Change(Sender: TObject);
procedure THumbview1ScanProgress(Sender: TObject; Position: Integer;
var Break: Boolean);
procedure THumbview1StartScanning(Sender: TObject; Max: Integer);
procedure THumbview1StopScanning(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure CheckBox4Click(Sender: TObject);
procedure SpinEdit1Change(Sender: TObject);
procedure SpinEdit2Change(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure RadioGroup2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TrackBar1Change(Sender: TObject);
procedure THumbview1DblClick(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure THumbview1Change(Sender: TObject);
public
NewDir: Boolean;
Scanning: Boolean;
end;
var
JvThumbnailMainForm: TJvThumbnailMainForm;
implementation
uses JvThumbnailChildFormU;
{$R *.DFM}
procedure TJvThumbnailMainForm.THumbview1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
// panel4.Caption:=thumbview1.SelectedFile;
end;
procedure TJvThumbnailMainForm.THumbview1keyup(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
// panel4.Caption:=thumbview1.SelectedFile;
end;
procedure TJvThumbnailMainForm.DirectoryListBox1Change(Sender: TObject);
begin
if not scanning then
repeat
thumbview1.Directory := directorylistbox1.Directory
until thumbview1.Directory = directorylistbox1.Directory
else
NewDir := True;
end;
procedure TJvThumbnailMainForm.THumbview1ScanProgress(Sender: TObject; Position: Integer;
var Break: Boolean);
begin
JvSpecialProgress1.Position := Position;
break := Newdir;
end;
procedure TJvThumbnailMainForm.THumbview1StartScanning(Sender: TObject; Max: Integer);
begin
Scanning := True;
// directorylistbox1.Enabled := False;
Button1.Enabled := True;
JvSpecialProgress1.Maximum := Max;
// JvSpecialProgress1.Visible := true;
end;
procedure TJvThumbnailMainForm.THumbview1StopScanning(Sender: TObject);
begin
Scanning := False;
// Directorylistbox1.Enabled := True;
Spinedit2.MaxValue := thumbview1.Count - 1;
newdir := False;
Button1.Enabled := False;
JvSpecialProgress1.Position := 0;
end;
procedure TJvThumbnailMainForm.Button1Click(Sender: TObject);
begin
NewDir := True;
end;
procedure TJvThumbnailMainForm.CheckBox1Click(Sender: TObject);
begin
THumbview1.AutoScrolling := checkbox1.Checked;
end;
procedure TJvThumbnailMainForm.CheckBox2Click(Sender: TObject);
begin
thumbview1.AutoHandleKeyb := checkbox2.Checked;
end;
procedure TJvThumbnailMainForm.CheckBox4Click(Sender: TObject);
begin
thumbview1.MinMemory := checkbox4.Checked;
end;
procedure TJvThumbnailMainForm.SpinEdit1Change(Sender: TObject);
begin
if spinedit1.Text <> '' then thumbview1.ThumbGap := spinedit1.Value;
end;
procedure TJvThumbnailMainForm.SpinEdit2Change(Sender: TObject);
begin
Thumbview1.Selected := spinedit2.Value;
end;
procedure TJvThumbnailMainForm.RadioGroup1Click(Sender: TObject);
begin
thumbview1.AlignView := TViewType(radiogroup1.ItemIndex);
end;
procedure TJvThumbnailMainForm.RadioGroup2Click(Sender: TObject);
begin
thumbview1.ScrollMode := TscrollMode(radiogroup2.ItemIndex);
end;
procedure TJvThumbnailMainForm.FormShow(Sender: TObject);
begin
checkbox1.Checked := thumbview1.AutoScrolling;
checkbox2.Checked := thumbview1.AutoHandleKeyb;
checkbox3.Checked := thumbview1.Sorted;
checkbox3.Checked := thumbview1.MinMemory;
spinedit1.Value := thumbview1.ThumbGap;
spinedit2.MaxValue := 0;
spinedit1.MinValue := 0;
radiogroup1.ItemIndex := integer(thumbview1.alignview);
radiogroup2.ItemIndex := integer(thumbview1.scrollMode);
Newdir := False;
Scanning := False;
end;
procedure TJvThumbnailMainForm.TrackBar1Change(Sender: TObject);
begin
thumbview1.Size := trackbar1.Position;
end;
procedure TJvThumbnailMainForm.THumbview1DblClick(Sender: TObject);
begin
JvThumbnailChildForm := TJvThumbnailChildForm.Create(Self);
JvThumbnailChildForm.DriveComboBox2.Drive := drivecombobox1.Drive;
JvThumbnailChildForm.DirectoryListBox2.Directory := directorylistbox1.directory;
if Sender is Tjvthumbview then
begin
JvThumbnailChildForm.FileListBox1.FileName := tjvThumbView(Sender).SelectedFile;
end;
if Sender is TjvTHumbnail then
begin
JvThumbnailChildForm.FileListBox1.FileName := tjvthumbnail(Sender).FileName;
end;
JvThumbnailChildForm.ShowModal;
JvThumbnailChildForm.Free;
end;
procedure TJvThumbnailMainForm.Button2Click(Sender: TObject);
begin
THumbview1DblClick(thumbview1);
end;
procedure TJvThumbnailMainForm.THumbview1Change(Sender: TObject);
begin
panel4.Caption := thumbview1.SelectedFile;
end;
end.
|