mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 09:16:07 +02:00
find in files: added filter for search results from Funky Beast
git-svn-id: trunk@9711 -
This commit is contained in:
parent
f0c29671f5
commit
d7443464a1
@ -1,41 +1,43 @@
|
|||||||
object LazFindInFilesDialog: TLazFindInFilesDialog
|
object LazFindInFilesDialog: TLazFindInFilesDialog
|
||||||
ActiveControl = TextToFindComboBox
|
|
||||||
Caption = 'Find in files'
|
|
||||||
ClientHeight = 423
|
|
||||||
ClientWidth = 385
|
|
||||||
Constraints.MinHeight = 400
|
|
||||||
Constraints.MinWidth = 260
|
|
||||||
OnCreate = FormCreate
|
|
||||||
PixelsPerInch = 112
|
|
||||||
Position = poScreenCenter
|
|
||||||
HorzScrollBar.Page = 384
|
|
||||||
VertScrollBar.Page = 422
|
|
||||||
Left = 391
|
Left = 391
|
||||||
Height = 423
|
Height = 423
|
||||||
Top = 158
|
Top = 158
|
||||||
Width = 385
|
Width = 385
|
||||||
|
HorzScrollBar.Page = 384
|
||||||
|
VertScrollBar.Page = 422
|
||||||
|
ActiveControl = TextToFindComboBox
|
||||||
|
Caption = 'Find in files'
|
||||||
|
Constraints.MinHeight = 400
|
||||||
|
Constraints.MinWidth = 260
|
||||||
|
OnCreate = FormCreate
|
||||||
|
Position = poScreenCenter
|
||||||
object TextToFindLabel: TLabel
|
object TextToFindLabel: TLabel
|
||||||
Caption = 'Text To Find:'
|
|
||||||
Color = clNone
|
|
||||||
ParentColor = False
|
|
||||||
AnchorSideTop.Control = TextToFindComboBox
|
AnchorSideTop.Control = TextToFindComboBox
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 10
|
Top = 10
|
||||||
Width = 74
|
Width = 74
|
||||||
|
Caption = 'Text To Find:'
|
||||||
|
Color = clNone
|
||||||
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object TextToFindComboBox: TComboBox
|
object TextToFindComboBox: TComboBox
|
||||||
Anchors = [akTop, akLeft, akRight]
|
|
||||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
|
||||||
MaxLength = 0
|
|
||||||
TabOrder = 0
|
|
||||||
Left = 102
|
Left = 102
|
||||||
Height = 21
|
Height = 21
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 277
|
Width = 277
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoComplete = True
|
||||||
|
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending]
|
||||||
|
MaxLength = 0
|
||||||
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object OptionsCheckGroupBox: TCheckGroup
|
object OptionsCheckGroupBox: TCheckGroup
|
||||||
|
Left = 6
|
||||||
|
Height = 86
|
||||||
|
Top = 65
|
||||||
|
Width = 373
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
BorderSpacing.InnerBorder = 6
|
BorderSpacing.InnerBorder = 6
|
||||||
@ -56,15 +58,15 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
|
|||||||
'Regular expressions'
|
'Regular expressions'
|
||||||
)
|
)
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Left = 6
|
|
||||||
Height = 86
|
|
||||||
Top = 65
|
|
||||||
Width = 373
|
|
||||||
Data = {
|
Data = {
|
||||||
03000000020202
|
03000000020202
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
object WhereRadioGroup: TRadioGroup
|
object WhereRadioGroup: TRadioGroup
|
||||||
|
Left = 6
|
||||||
|
Height = 82
|
||||||
|
Top = 155
|
||||||
|
Width = 373
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
Caption = 'Where'
|
Caption = 'Where'
|
||||||
@ -86,137 +88,130 @@ object LazFindInFilesDialog: TLazFindInFilesDialog
|
|||||||
)
|
)
|
||||||
OnClick = WhereRadioGroupClick
|
OnClick = WhereRadioGroupClick
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Left = 6
|
|
||||||
Height = 82
|
|
||||||
Top = 155
|
|
||||||
Width = 373
|
|
||||||
end
|
end
|
||||||
object DirectoryOptionsGroupBox: TGroupBox
|
object DirectoryOptionsGroupBox: TGroupBox
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
|
||||||
Caption = 'Directory Options'
|
|
||||||
ClientHeight = 120
|
|
||||||
ClientWidth = 369
|
|
||||||
Enabled = False
|
|
||||||
TabOrder = 3
|
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 137
|
Height = 137
|
||||||
Top = 240
|
Top = 240
|
||||||
Width = 373
|
Width = 373
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
Caption = 'Directory Options'
|
||||||
|
Enabled = False
|
||||||
|
TabOrder = 3
|
||||||
object DirectoryLabel: TLabel
|
object DirectoryLabel: TLabel
|
||||||
Caption = 'Directory:'
|
|
||||||
Color = clNone
|
|
||||||
ParentColor = False
|
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 55
|
Width = 55
|
||||||
end
|
Caption = 'Directory:'
|
||||||
object FileMaskLabel: TLabel
|
|
||||||
Caption = 'File mask (*;*.*;*.bak?):'
|
|
||||||
Color = clNone
|
Color = clNone
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
|
end
|
||||||
|
object FileMaskLabel: TLabel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 13
|
Height = 13
|
||||||
Top = 38
|
Top = 38
|
||||||
Width = 128
|
Width = 128
|
||||||
|
Caption = 'File mask (*;*.*;*.bak?):'
|
||||||
|
Color = clNone
|
||||||
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object DirectoryComboBox: TComboBox
|
object DirectoryComboBox: TComboBox
|
||||||
|
Left = 88
|
||||||
|
Height = 21
|
||||||
|
Top = 6
|
||||||
|
Width = 241
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Left = 88
|
|
||||||
Height = 21
|
|
||||||
Top = 6
|
|
||||||
Width = 245
|
|
||||||
end
|
end
|
||||||
object DirectoryBrowse: TBitBtn
|
object DirectoryBrowse: TBitBtn
|
||||||
|
Left = 335
|
||||||
|
Height = 21
|
||||||
|
Top = 6
|
||||||
|
Width = 21
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
|
|
||||||
Caption = '...'
|
Caption = '...'
|
||||||
Layout = blGlyphTop
|
Layout = blGlyphTop
|
||||||
NumGlyphs = 0
|
NumGlyphs = 0
|
||||||
OnClick = DirectoryBrowseClick
|
OnClick = DirectoryBrowseClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Left = 339
|
|
||||||
Height = 21
|
|
||||||
Top = 6
|
|
||||||
Width = 21
|
|
||||||
end
|
end
|
||||||
object FileMaskComboBox: TComboBox
|
object FileMaskComboBox: TComboBox
|
||||||
|
Left = 6
|
||||||
|
Height = 21
|
||||||
|
Top = 56
|
||||||
|
Width = 323
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
||||||
MaxLength = 0
|
MaxLength = 0
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Text = '*.pas;*.pp;*.inc'
|
Text = '*.pas;*.pp;*.inc'
|
||||||
Left = 6
|
|
||||||
Height = 21
|
|
||||||
Top = 56
|
|
||||||
Width = 327
|
|
||||||
end
|
end
|
||||||
object IncludeSubDirsCheckBox: TCheckBox
|
object IncludeSubDirsCheckBox: TCheckBox
|
||||||
Caption = 'Include sub directories'
|
|
||||||
TabOrder = 3
|
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 92
|
Top = 92
|
||||||
Width = 154
|
Width = 154
|
||||||
|
Caption = 'Include sub directories'
|
||||||
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object OKButton: TButton
|
object OKButton: TButton
|
||||||
Anchors = [akRight, akBottom]
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
|
|
||||||
Caption = 'OK'
|
|
||||||
Default = True
|
|
||||||
ModalResult = 1
|
|
||||||
TabOrder = 4
|
|
||||||
Left = 221
|
Left = 221
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 391
|
Top = 391
|
||||||
Width = 75
|
Width = 75
|
||||||
end
|
|
||||||
object CancelButton: TButton
|
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
|
BorderSpacing.InnerBorder = 4
|
||||||
Cancel = True
|
Caption = 'OK'
|
||||||
Caption = 'Cancel'
|
Default = True
|
||||||
ModalResult = 2
|
ModalResult = 1
|
||||||
TabOrder = 5
|
TabOrder = 4
|
||||||
|
end
|
||||||
|
object CancelButton: TButton
|
||||||
Left = 304
|
Left = 304
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 391
|
Top = 391
|
||||||
Width = 75
|
Width = 75
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
BorderSpacing.InnerBorder = 4
|
||||||
|
Cancel = True
|
||||||
|
Caption = 'Cancel'
|
||||||
|
ModalResult = 2
|
||||||
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object ReplaceTextComboBox: TComboBox
|
object ReplaceTextComboBox: TComboBox
|
||||||
Anchors = [akTop, akLeft, akRight]
|
|
||||||
AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending]
|
|
||||||
Enabled = False
|
|
||||||
MaxLength = 0
|
|
||||||
TabOrder = 6
|
|
||||||
Left = 102
|
Left = 102
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 33
|
Top = 33
|
||||||
Width = 277
|
Width = 277
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoComplete = True
|
||||||
|
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending]
|
||||||
|
Enabled = False
|
||||||
|
MaxLength = 0
|
||||||
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
object ReplaceCheckBox: TCheckBox
|
object ReplaceCheckBox: TCheckBox
|
||||||
|
AnchorSideTop.Control = ReplaceTextComboBox
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 5
|
||||||
|
Height = 20
|
||||||
|
Top = 35
|
||||||
|
Width = 73
|
||||||
Caption = 'Replace'
|
Caption = 'Replace'
|
||||||
Enabled = False
|
Enabled = False
|
||||||
OnChange = ReplaceCheckBoxChange
|
OnChange = ReplaceCheckBoxChange
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
AnchorSideTop.Control = ReplaceTextComboBox
|
|
||||||
AnchorSideTop.Side = asrCenter
|
|
||||||
Left = 5
|
|
||||||
Height = 24
|
|
||||||
Top = 33
|
|
||||||
Width = 73
|
|
||||||
end
|
end
|
||||||
object SelectDirectoryDialog: TSelectDirectoryDialog
|
object SelectDirectoryDialog: TSelectDirectoryDialog
|
||||||
Options = [ofFileMustExist, ofEnableSizing, ofViewDetail]
|
|
||||||
Title = 'Select Directory'
|
Title = 'Select Directory'
|
||||||
FilterIndex = 0
|
FilterIndex = 0
|
||||||
Title = 'Select Directory'
|
Options = [ofFileMustExist, ofEnableSizing, ofViewDetail]
|
||||||
left = 260
|
left = 260
|
||||||
top = 215
|
top = 215
|
||||||
end
|
end
|
||||||
|
@ -1,74 +1,77 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TLazFindInFilesDialog','FORMDATA',[
|
LazarusResources.Add('TLazFindInFilesDialog','FORMDATA',[
|
||||||
'TPF0'#21'TLazFindInFilesDialog'#20'LazFindInFilesDialog'#13'ActiveControl'#7
|
'TPF0'#21'TLazFindInFilesDialog'#20'LazFindInFilesDialog'#4'Left'#3#135#1#6'H'
|
||||||
+#18'TextToFindComboBox'#7'Caption'#6#13'Find in files'#12'ClientHeight'#3#167
|
+'eight'#3#167#1#3'Top'#3#158#0#5'Width'#3#129#1#18'HorzScrollBar.Page'#3#128
|
||||||
+#1#11'ClientWidth'#3#129#1#21'Constraints.MinHeight'#3#144#1#20'Constraints.'
|
+#1#18'VertScrollBar.Page'#3#166#1#13'ActiveControl'#7#18'TextToFindComboBox'
|
||||||
+'MinWidth'#3#4#1#8'OnCreate'#7#10'FormCreate'#13'PixelsPerInch'#2'p'#8'Posit'
|
+#7'Caption'#6#13'Find in files'#21'Constraints.MinHeight'#3#144#1#20'Constra'
|
||||||
+'ion'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#128#1#18'VertScrollBar.P'
|
+'ints.MinWidth'#3#4#1#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreen'
|
||||||
+'age'#3#166#1#4'Left'#3#135#1#6'Height'#3#167#1#3'Top'#3#158#0#5'Width'#3#129
|
+'Center'#0#6'TLabel'#15'TextToFindLabel'#21'AnchorSideTop.Control'#7#18'Text'
|
||||||
+#1#0#6'TLabel'#15'TextToFindLabel'#7'Caption'#6#13'Text To Find:'#5'Color'#7
|
+'ToFindComboBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'
|
||||||
+#6'clNone'#11'ParentColor'#8#21'AnchorSideTop.Control'#7#18'TextToFindComboB'
|
+#2#13#3'Top'#2#10#5'Width'#2'J'#7'Caption'#6#13'Text To Find:'#5'Color'#7#6
|
||||||
+'ox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#13#3'Top'
|
+'clNone'#11'ParentColor'#8#0#0#9'TComboBox'#18'TextToFindComboBox'#4'Left'#2
|
||||||
+#2#10#5'Width'#2'J'#0#0#9'TComboBox'#18'TextToFindComboBox'#7'Anchors'#11#5
|
+'f'#6'Height'#2#21#3'Top'#2#6#5'Width'#3#21#1#7'Anchors'#11#5'akTop'#6'akLef'
|
||||||
|
+'t'#7'akRight'#0#12'AutoComplete'#9#16'AutoCompleteText'#11#12'cbactEnabled'
|
||||||
|
+#22'cbactEndOfLineComplete'#21'cbactRetainPrefixCase'#20'cbactSearchAscendin'
|
||||||
|
+'g'#0#9'MaxLength'#2#0#8'TabOrder'#2#0#0#0#11'TCheckGroup'#20'OptionsCheckGr'
|
||||||
|
+'oupBox'#4'Left'#2#6#6'Height'#2'V'#3'Top'#2'A'#5'Width'#3'u'#1#7'Anchors'#11
|
||||||
|
+#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9#25'BorderSpacing.InnerBorder'
|
||||||
|
+#2#6#7'Caption'#6#7'Options'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSi'
|
||||||
|
+'zing.TopBottomSpacing'#2#6#29'ChildSizing.HorizontalSpacing'#2#6#27'ChildSi'
|
||||||
|
+'zing.VerticalSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogen'
|
||||||
|
+'ousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResi'
|
||||||
|
+'ze'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Sh'
|
||||||
|
+'rinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRig'
|
||||||
|
+'htThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#13'Items.Strings'#1#6
|
||||||
|
+#14'Case sensitive'#6#16'Whole words only'#6#19'Regular expressions'#0#8'Tab'
|
||||||
|
+'Order'#2#1#4'Data'#10#7#0#0#0#3#0#0#0#2#2#2#0#0#11'TRadioGroup'#15'WhereRad'
|
||||||
|
+'ioGroup'#4'Left'#2#6#6'Height'#2'R'#3'Top'#3#155#0#5'Width'#3'u'#1#7'Anchor'
|
||||||
|
+'s'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9#7'Caption'#6#5'Where'#28
|
||||||
|
+'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C'
|
||||||
|
+'hildSizing.HorizontalSpacing'#2#6#27'ChildSizing.VerticalSpacing'#2#6#29'Ch'
|
||||||
|
+'ildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.'
|
||||||
|
+'EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizo'
|
||||||
|
+'ntal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChil'
|
||||||
|
+'ds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizi'
|
||||||
|
+'ng.ControlsPerLine'#2#1#9'ItemIndex'#2#1#13'Items.Strings'#1#6#27'search al'
|
||||||
|
+'l files in project'#6#21'search all open files'#6#21'search in directories'
|
||||||
|
+#0#7'OnClick'#7#20'WhereRadioGroupClick'#8'TabOrder'#2#2#0#0#9'TGroupBox'#24
|
||||||
|
+'DirectoryOptionsGroupBox'#4'Left'#2#6#6'Height'#3#137#0#3'Top'#3#240#0#5'Wi'
|
||||||
|
+'dth'#3'u'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Cap'
|
||||||
|
+'tion'#6#17'Directory Options'#7'Enabled'#8#8'TabOrder'#2#3#0#6'TLabel'#14'D'
|
||||||
|
+'irectoryLabel'#4'Left'#2#6#6'Height'#2#13#3'Top'#2#8#5'Width'#2'7'#7'Captio'
|
||||||
|
+'n'#6#10'Directory:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#13
|
||||||
|
+'FileMaskLabel'#4'Left'#2#6#6'Height'#2#13#3'Top'#2'&'#5'Width'#3#128#0#7'Ca'
|
||||||
|
+'ption'#6#25'File mask (*;*.*;*.bak?):'#5'Color'#7#6'clNone'#11'ParentColor'
|
||||||
|
+#8#0#0#9'TComboBox'#17'DirectoryComboBox'#4'Left'#2'X'#6'Height'#2#21#3'Top'
|
||||||
|
+#2#6#5'Width'#3#241#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#16'AutoC'
|
||||||
|
+'ompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#9'Max'
|
||||||
|
+'Length'#2#0#8'TabOrder'#2#0#0#0#7'TBitBtn'#15'DirectoryBrowse'#4'Left'#3'O'
|
||||||
|
+#1#6'Height'#2#21#3'Top'#2#6#5'Width'#2#21#7'Anchors'#11#5'akTop'#7'akRight'
|
||||||
|
+#0#7'Caption'#6#3'...'#6'Layout'#7#10'blGlyphTop'#9'NumGlyphs'#2#0#7'OnClick'
|
||||||
|
+#7#20'DirectoryBrowseClick'#8'TabOrder'#2#1#0#0#9'TComboBox'#16'FileMaskComb'
|
||||||
|
+'oBox'#4'Left'#2#6#6'Height'#2#21#3'Top'#2'8'#5'Width'#3'C'#1#7'Anchors'#11#5
|
||||||
+'akTop'#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComp'
|
+'akTop'#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComp'
|
||||||
+'lete'#20'cbactSearchAscending'#0#9'MaxLength'#2#0#8'TabOrder'#2#0#4'Left'#2
|
+'lete'#20'cbactSearchAscending'#0#9'MaxLength'#2#0#8'TabOrder'#2#2#4'Text'#6
|
||||||
+'f'#6'Height'#2#21#3'Top'#2#6#5'Width'#3#21#1#0#0#11'TCheckGroup'#20'Options'
|
+#16'*.pas;*.pp;*.inc'#0#0#9'TCheckBox'#22'IncludeSubDirsCheckBox'#4'Left'#2#6
|
||||||
+'CheckGroupBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9
|
+#6'Height'#2#24#3'Top'#2'\'#5'Width'#3#154#0#7'Caption'#6#23'Include sub dir'
|
||||||
+#25'BorderSpacing.InnerBorder'#2#6#7'Caption'#6#7'Options'#28'ChildSizing.Le'
|
+'ectories'#8'TabOrder'#2#3#0#0#0#7'TButton'#8'OKButton'#4'Left'#3#221#0#6'He'
|
||||||
+'ftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.Hor'
|
+'ight'#2#25#3'Top'#3#135#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom'
|
||||||
+'izontalSpacing'#2#6#27'ChildSizing.VerticalSpacing'#2#6#29'ChildSizing.Enla'
|
+#0#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'
|
||||||
+'rgeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertica'
|
+#6#2'OK'#7'Default'#9#11'ModalResult'#2#1#8'TabOrder'#2#4#0#0#7'TButton'#12
|
||||||
+'l'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crs'
|
+'CancelButton'#4'Left'#3'0'#1#6'Height'#2#25#3'Top'#3#135#1#5'Width'#2'K'#7
|
||||||
+'ScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSi'
|
+'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#25'Border'
|
||||||
+'zing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPer'
|
+'Spacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'
|
||||||
+'Line'#2#1#13'Items.Strings'#1#6#14'Case sensitive'#6#16'Whole words only'#6
|
+#2#2#8'TabOrder'#2#5#0#0#9'TComboBox'#19'ReplaceTextComboBox'#4'Left'#2'f'#6
|
||||||
+#19'Regular expressions'#0#8'TabOrder'#2#1#4'Left'#2#6#6'Height'#2'V'#3'Top'
|
+'Height'#2#25#3'Top'#2'!'#5'Width'#3#21#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||||
+#2'A'#5'Width'#3'u'#1#4'Data'#10#7#0#0#0#3#0#0#0#2#2#2#0#0#11'TRadioGroup'#15
|
+'akRight'#0#12'AutoComplete'#9#16'AutoCompleteText'#11#12'cbactEnabled'#22'c'
|
||||||
+'WhereRadioGroup'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9
|
,'bactEndOfLineComplete'#21'cbactRetainPrefixCase'#20'cbactSearchAscending'#0
|
||||||
+#7'Caption'#6#5'Where'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.T'
|
+#7'Enabled'#8#9'MaxLength'#2#0#8'TabOrder'#2#6#0#0#9'TCheckBox'#15'ReplaceCh'
|
||||||
+'opBottomSpacing'#2#6#29'ChildSizing.HorizontalSpacing'#2#6#27'ChildSizing.V'
|
+'eckBox'#21'AnchorSideTop.Control'#7#19'ReplaceTextComboBox'#18'AnchorSideTo'
|
||||||
+'erticalSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChi'
|
+'p.Side'#7#9'asrCenter'#4'Left'#2#5#6'Height'#2#20#3'Top'#2'#'#5'Width'#2'I'
|
||||||
+'ldResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28
|
|
||||||
+'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer'
|
|
||||||
+'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT'
|
|
||||||
+'opToBottom'#27'ChildSizing.ControlsPerLine'#2#1#9'ItemIndex'#2#1#13'Items.S'
|
|
||||||
+'trings'#1#6#27'search all files in project'#6#21'search all open files'#6#21
|
|
||||||
+'search in directories'#0#7'OnClick'#7#20'WhereRadioGroupClick'#8'TabOrder'#2
|
|
||||||
+#2#4'Left'#2#6#6'Height'#2'R'#3'Top'#3#155#0#5'Width'#3'u'#1#0#0#9'TGroupBox'
|
|
||||||
+#24'DirectoryOptionsGroupBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8
|
|
||||||
+'akBottom'#0#7'Caption'#6#17'Directory Options'#12'ClientHeight'#2'x'#11'Cli'
|
|
||||||
+'entWidth'#3'q'#1#7'Enabled'#8#8'TabOrder'#2#3#4'Left'#2#6#6'Height'#3#137#0
|
|
||||||
+#3'Top'#3#240#0#5'Width'#3'u'#1#0#6'TLabel'#14'DirectoryLabel'#7'Caption'#6
|
|
||||||
+#10'Directory:'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6'Height'
|
|
||||||
+#2#13#3'Top'#2#8#5'Width'#2'7'#0#0#6'TLabel'#13'FileMaskLabel'#7'Caption'#6
|
|
||||||
+#25'File mask (*;*.*;*.bak?):'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'
|
|
||||||
+#2#6#6'Height'#2#13#3'Top'#2'&'#5'Width'#3#128#0#0#0#9'TComboBox'#17'Directo'
|
|
||||||
+'ryComboBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#16'AutoCompleteTe'
|
|
||||||
+'xt'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#9'MaxLength'#2
|
|
||||||
+#0#8'TabOrder'#2#0#4'Left'#2'X'#6'Height'#2#21#3'Top'#2#6#5'Width'#3#245#0#0
|
|
||||||
+#0#7'TBitBtn'#15'DirectoryBrowse'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Capt'
|
|
||||||
+'ion'#6#3'...'#6'Layout'#7#10'blGlyphTop'#9'NumGlyphs'#2#0#7'OnClick'#7#20'D'
|
|
||||||
+'irectoryBrowseClick'#8'TabOrder'#2#1#4'Left'#3'S'#1#6'Height'#2#21#3'Top'#2
|
|
||||||
+#6#5'Width'#2#21#0#0#9'TComboBox'#16'FileMaskComboBox'#7'Anchors'#11#5'akTop'
|
|
||||||
+#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20
|
|
||||||
+'cbactSearchAscending'#0#9'MaxLength'#2#0#8'TabOrder'#2#2#4'Text'#6#16'*.pas'
|
|
||||||
+';*.pp;*.inc'#4'Left'#2#6#6'Height'#2#21#3'Top'#2'8'#5'Width'#3'G'#1#0#0#9'T'
|
|
||||||
+'CheckBox'#22'IncludeSubDirsCheckBox'#7'Caption'#6#23'Include sub directorie'
|
|
||||||
+'s'#8'TabOrder'#2#3#4'Left'#2#6#6'Height'#2#24#3'Top'#2'\'#5'Width'#3#154#0#0
|
|
||||||
+#0#0#7'TButton'#8'OKButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'Border'
|
|
||||||
+'Spacing.Around'#2#6#7'Caption'#6#2'OK'#7'Default'#9#11'ModalResult'#2#1#8'T'
|
|
||||||
+'abOrder'#2#4#4'Left'#3#221#0#6'Height'#2#25#3'Top'#3#135#1#5'Width'#2'K'#0#0
|
|
||||||
+#7'TButton'#12'CancelButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'Borde'
|
|
||||||
+'rSpacing.Around'#2#6#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2
|
|
||||||
+#8'TabOrder'#2#5#4'Left'#3'0'#1#6'Height'#2#25#3'Top'#3#135#1#5'Width'#2'K'#0
|
|
||||||
+#0#9'TComboBox'#19'ReplaceTextComboBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'a'
|
|
||||||
+'kRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearch'
|
|
||||||
+'Ascending'#0#7'Enabled'#8#9'MaxLength'#2#0#8'TabOrder'#2#6#4'Left'#2'f'#6'H'
|
|
||||||
,'eight'#2#25#3'Top'#2'!'#5'Width'#3#21#1#0#0#9'TCheckBox'#15'ReplaceCheckBox'
|
|
||||||
+#7'Caption'#6#7'Replace'#7'Enabled'#8#8'OnChange'#7#21'ReplaceCheckBoxChange'
|
+#7'Caption'#6#7'Replace'#7'Enabled'#8#8'OnChange'#7#21'ReplaceCheckBoxChange'
|
||||||
+#8'TabOrder'#2#7#21'AnchorSideTop.Control'#7#19'ReplaceTextComboBox'#18'Anch'
|
+#8'TabOrder'#2#7#0#0#22'TSelectDirectoryDialog'#21'SelectDirectoryDialog'#5
|
||||||
+'orSideTop.Side'#7#9'asrCenter'#4'Left'#2#5#6'Height'#2#24#3'Top'#2'!'#5'Wid'
|
+'Title'#6#16'Select Directory'#11'FilterIndex'#2#0#7'Options'#11#15'ofFileMu'
|
||||||
+'th'#2'I'#0#0#22'TSelectDirectoryDialog'#21'SelectDirectoryDialog'#7'Options'
|
+'stExist'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#4#1#3'top'#3#215#0
|
||||||
+#11#15'ofFileMustExist'#14'ofEnableSizing'#12'ofViewDetail'#0#5'Title'#6#16
|
+#0#0#0
|
||||||
+'Select Directory'#11'FilterIndex'#2#0#5'Title'#6#16'Select Directory'#4'lef'
|
|
||||||
+'t'#3#4#1#3'top'#3#215#0#0#0#0
|
|
||||||
]);
|
]);
|
||||||
|
@ -103,7 +103,9 @@ end;
|
|||||||
procedure TLazFindInFilesDialog.DirectoryBrowseClick(Sender: TObject);
|
procedure TLazFindInFilesDialog.DirectoryBrowseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
InitIDEFileDialog(SelectDirectoryDialog);
|
InitIDEFileDialog(SelectDirectoryDialog);
|
||||||
SelectDirectoryDialog.InitialDir := GetCurrentDir;
|
if DirectoryExists(DirectoryComboBox.Text) then
|
||||||
|
SelectDirectoryDialog.InitialDir := DirectoryComboBox.Text else
|
||||||
|
SelectDirectoryDialog.InitialDir := GetCurrentDir;
|
||||||
if SelectDirectoryDialog.Execute then
|
if SelectDirectoryDialog.Execute then
|
||||||
DirectoryComboBox.Text := SelectDirectoryDialog.FileName;
|
DirectoryComboBox.Text := SelectDirectoryDialog.FileName;
|
||||||
StoreIDEFileDialog(SelectDirectoryDialog);
|
StoreIDEFileDialog(SelectDirectoryDialog);
|
||||||
|
@ -1,42 +1,89 @@
|
|||||||
object SearchResultsView: TSearchResultsView
|
object SearchResultsView: TSearchResultsView
|
||||||
ActiveControl = btnSearchAgain
|
Left = 217
|
||||||
Caption = 'SearchResultsView'
|
|
||||||
ClientHeight = 229
|
|
||||||
ClientWidth = 799
|
|
||||||
OnCreate = Form1Create
|
|
||||||
OnDestroy = SearchResultsViewDestroy
|
|
||||||
OnKeyDown = ListBoxKeyDown
|
|
||||||
PixelsPerInch = 112
|
|
||||||
Position = poScreenCenter
|
|
||||||
HorzScrollBar.Page = 798
|
|
||||||
VertScrollBar.Page = 228
|
|
||||||
Left = 267
|
|
||||||
Height = 229
|
Height = 229
|
||||||
Top = 482
|
Top = 482
|
||||||
Width = 799
|
Width = 799
|
||||||
|
HorzScrollBar.Page = 798
|
||||||
|
VertScrollBar.Page = 228
|
||||||
|
ActiveControl = btnSearchAgain
|
||||||
|
Caption = 'SearchResultsView'
|
||||||
|
OnCreate = Form1Create
|
||||||
|
OnDestroy = SearchResultsViewDestroy
|
||||||
|
OnKeyDown = ListBoxKeyDown
|
||||||
|
Position = poScreenCenter
|
||||||
object ResultsNoteBook: TNotebook
|
object ResultsNoteBook: TNotebook
|
||||||
Align = alBottom
|
|
||||||
Anchors = [akTop, akLeft]
|
|
||||||
OnCloseTabClicked = ResultsNoteBookClosetabclicked
|
|
||||||
Options = [nboShowCloseButtons, nboMultiLine]
|
|
||||||
AnchorSideTop.Control = btnSearchAgain
|
AnchorSideTop.Control = btnSearchAgain
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Height = 192
|
Height = 192
|
||||||
Top = 37
|
Top = 37
|
||||||
Width = 799
|
Width = 799
|
||||||
|
Align = alBottom
|
||||||
|
Anchors = [akTop, akLeft]
|
||||||
|
OnCloseTabClicked = ResultsNoteBookClosetabclicked
|
||||||
|
OnPageChanged = ResultsNoteBookPageChanged
|
||||||
|
Options = [nboShowCloseButtons, nboMultiLine]
|
||||||
end
|
end
|
||||||
object btnSearchAgain: TButton
|
object btnSearchAgain: TButton
|
||||||
BorderSpacing.Around = 6
|
|
||||||
|
|
||||||
Caption = 'Search Again'
|
|
||||||
OnClick = btnSearchAgainClick
|
|
||||||
OnKeyDown = ListBoxKeyDown
|
|
||||||
TabOrder = 1
|
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 115
|
Width = 115
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
BorderSpacing.InnerBorder = 4
|
||||||
|
Caption = 'Search Again'
|
||||||
|
OnClick = btnSearchAgainClick
|
||||||
|
OnKeyDown = ListBoxKeyDown
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object gbSearchPhraseInList: TGroupBox
|
||||||
|
Left = 237
|
||||||
|
Height = 37
|
||||||
|
Width = 562
|
||||||
|
Align = alRight
|
||||||
|
Caption = 'Search or Filter Phrases In List'
|
||||||
|
TabOrder = 2
|
||||||
|
object edSearchInList: TEdit
|
||||||
|
Height = 20
|
||||||
|
Hint = 'Enter one or more phrases that you want'#10'to Search or Filter in the list,'#10'seperated by space ( '' '' ), or comma ( , )'
|
||||||
|
Width = 263
|
||||||
|
Align = alClient
|
||||||
|
OnChange = edSearchInListChange
|
||||||
|
OnKeyDown = edSearchInListKeyDown
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
object bnForwardSearch: TButton
|
||||||
|
Left = 338
|
||||||
|
Height = 20
|
||||||
|
Width = 100
|
||||||
|
Align = alRight
|
||||||
|
BorderSpacing.InnerBorder = 4
|
||||||
|
Caption = 'Forward Search'
|
||||||
|
OnClick = bnForwardSearchClick
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object bnResetResults: TButton
|
||||||
|
Left = 438
|
||||||
|
Height = 20
|
||||||
|
Width = 120
|
||||||
|
Align = alRight
|
||||||
|
BorderSpacing.InnerBorder = 4
|
||||||
|
Caption = 'Reset Result List'
|
||||||
|
OnClick = bnResetResultsClick
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object bnFilter: TButton
|
||||||
|
Left = 263
|
||||||
|
Height = 20
|
||||||
|
Width = 75
|
||||||
|
Align = alRight
|
||||||
|
BorderSpacing.InnerBorder = 4
|
||||||
|
Caption = 'Filter'
|
||||||
|
OnClick = bnFilterClick
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,17 +1,35 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TSearchResultsView','FORMDATA',[
|
LazarusResources.Add('TSearchResultsView','FORMDATA',[
|
||||||
'TPF0'#18'TSearchResultsView'#17'SearchResultsView'#13'ActiveControl'#7#14'bt'
|
'TPF0'#18'TSearchResultsView'#17'SearchResultsView'#4'Left'#3#217#0#6'Height'
|
||||||
+'nSearchAgain'#7'Caption'#6#17'SearchResultsView'#12'ClientHeight'#3#229#0#11
|
+#3#229#0#3'Top'#3#226#1#5'Width'#3#31#3#18'HorzScrollBar.Page'#3#30#3#18'Ver'
|
||||||
+'ClientWidth'#3#31#3#8'OnCreate'#7#11'Form1Create'#9'OnDestroy'#7#24'SearchR'
|
+'tScrollBar.Page'#3#228#0#13'ActiveControl'#7#14'btnSearchAgain'#7'Caption'#6
|
||||||
+'esultsViewDestroy'#9'OnKeyDown'#7#14'ListBoxKeyDown'#13'PixelsPerInch'#2'p'
|
+#17'SearchResultsView'#8'OnCreate'#7#11'Form1Create'#9'OnDestroy'#7#24'Searc'
|
||||||
+#8'Position'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#30#3#18'VertScrol'
|
+'hResultsViewDestroy'#9'OnKeyDown'#7#14'ListBoxKeyDown'#8'Position'#7#14'poS'
|
||||||
+'lBar.Page'#3#228#0#4'Left'#3#11#1#6'Height'#3#229#0#3'Top'#3#226#1#5'Width'
|
+'creenCenter'#0#9'TNotebook'#15'ResultsNoteBook'#21'AnchorSideTop.Control'#7
|
||||||
+#3#31#3#0#9'TNotebook'#15'ResultsNoteBook'#5'Align'#7#8'alBottom'#7'Anchors'
|
+#14'btnSearchAgain'#18'AnchorSideTop.Side'#7#9'asrBottom'#6'Height'#3#192#0#3
|
||||||
+#11#5'akTop'#6'akLeft'#0#17'OnCloseTabClicked'#7#30'ResultsNoteBookClosetabc'
|
+'Top'#2'%'#5'Width'#3#31#3#5'Align'#7#8'alBottom'#7'Anchors'#11#5'akTop'#6'a'
|
||||||
+'licked'#7'Options'#11#19'nboShowCloseButtons'#12'nboMultiLine'#0#21'AnchorS'
|
+'kLeft'#0#17'OnCloseTabClicked'#7#30'ResultsNoteBookClosetabclicked'#13'OnPa'
|
||||||
+'ideTop.Control'#7#14'btnSearchAgain'#18'AnchorSideTop.Side'#7#9'asrBottom'#6
|
+'geChanged'#7#26'ResultsNoteBookPageChanged'#7'Options'#11#19'nboShowCloseBu'
|
||||||
+'Height'#3#192#0#3'Top'#2'%'#5'Width'#3#31#3#0#0#7'TButton'#14'btnSearchAgai'
|
+'ttons'#12'nboMultiLine'#0#0#0#7'TButton'#14'btnSearchAgain'#22'AnchorSideLe'
|
||||||
+'n'#20'BorderSpacing.Around'#2#6#7'Caption'#6#12'Search Again'#7'OnClick'#7
|
+'ft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#6#6'H'
|
||||||
+#19'btnSearchAgainClick'#9'OnKeyDown'#7#14'ListBoxKeyDown'#8'TabOrder'#2#1#22
|
+'eight'#2#25#3'Top'#2#6#5'Width'#2's'#20'BorderSpacing.Around'#2#6#25'Border'
|
||||||
+'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'L'
|
+'Spacing.InnerBorder'#2#4#7'Caption'#6#12'Search Again'#7'OnClick'#7#19'btnS'
|
||||||
+'eft'#2#6#6'Height'#2#25#3'Top'#2#6#5'Width'#2's'#0#0#0
|
+'earchAgainClick'#9'OnKeyDown'#7#14'ListBoxKeyDown'#8'TabOrder'#2#1#0#0#9'TG'
|
||||||
|
+'roupBox'#20'gbSearchPhraseInList'#4'Left'#3#237#0#6'Height'#2'%'#5'Width'#3
|
||||||
|
+'2'#2#5'Align'#7#7'alRight'#7'Caption'#6' Search or Filter Phrases In List'#8
|
||||||
|
+'TabOrder'#2#2#0#5'TEdit'#14'edSearchInList'#6'Height'#2#20#4'Hint'#6'sEnter'
|
||||||
|
+' one or more phrases that you want'#10'to Search or Filter in the list,'#10
|
||||||
|
+'seperated by space ( '' '' ), or comma ( , )'#5'Width'#3#7#1#5'Align'#7#8'a'
|
||||||
|
+'lClient'#8'OnChange'#7#20'edSearchInListChange'#9'OnKeyDown'#7#21'edSearchI'
|
||||||
|
+'nListKeyDown'#14'ParentShowHint'#8#8'ShowHint'#9#8'TabOrder'#2#0#0#0#7'TBut'
|
||||||
|
+'ton'#15'bnForwardSearch'#4'Left'#3'R'#1#6'Height'#2#20#5'Width'#2'd'#5'Alig'
|
||||||
|
+'n'#7#7'alRight'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#14'Forward S'
|
||||||
|
+'earch'#7'OnClick'#7#20'bnForwardSearchClick'#8'TabOrder'#2#1#0#0#7'TButton'
|
||||||
|
+#14'bnResetResults'#4'Left'#3#182#1#6'Height'#2#20#5'Width'#2'x'#5'Align'#7#7
|
||||||
|
+'alRight'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#17'Reset Result Lis'
|
||||||
|
+'t'#7'OnClick'#7#19'bnResetResultsClick'#8'TabOrder'#2#2#0#0#7'TButton'#8'bn'
|
||||||
|
+'Filter'#4'Left'#3#7#1#6'Height'#2#20#5'Width'#2'K'#5'Align'#7#7'alRight'#25
|
||||||
|
+'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6'Filter'#7'OnClick'#7#13'bnFil'
|
||||||
|
+'terClick'#8'TabOrder'#2#3#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -90,9 +90,12 @@ type
|
|||||||
fSearchObject: TLazSearch;
|
fSearchObject: TLazSearch;
|
||||||
FSkipped: integer;
|
FSkipped: integer;
|
||||||
fUpdateStrings: TStrings;
|
fUpdateStrings: TStrings;
|
||||||
|
fBackUpStrings: TStrings;
|
||||||
fUpdating: boolean;
|
fUpdating: boolean;
|
||||||
fUpdateCount: integer;
|
fUpdateCount: integer;
|
||||||
fShortenPathNeeded: boolean;
|
fShortenPathNeeded: boolean;
|
||||||
|
FSearchInListPhrases: string;
|
||||||
|
fFiltered: Boolean;
|
||||||
procedure SetSkipped(const AValue: integer);
|
procedure SetSkipped(const AValue: integer);
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
@ -101,6 +104,10 @@ type
|
|||||||
procedure BeginUpdate;
|
procedure BeginUpdate;
|
||||||
procedure EndUpdate;
|
procedure EndUpdate;
|
||||||
procedure ShortenPaths;
|
procedure ShortenPaths;
|
||||||
|
procedure FreeObjects(var slItems: TStrings);
|
||||||
|
property BackUpStrings: TStrings read fBackUpStrings write fBackUpStrings;
|
||||||
|
property Filtered: Boolean read fFiltered write fFiltered;
|
||||||
|
property SearchInListPhrases: string read FSearchInListPhrases write FSearchInListPhrases;
|
||||||
property UpdateItems: TStrings read fUpdateStrings write fUpdateStrings;
|
property UpdateItems: TStrings read fUpdateStrings write fUpdateStrings;
|
||||||
property UpdateState: boolean read fUpdating;
|
property UpdateState: boolean read fUpdating;
|
||||||
property Skipped: integer read FSkipped write SetSkipped;
|
property Skipped: integer read FSkipped write SetSkipped;
|
||||||
@ -112,6 +119,11 @@ type
|
|||||||
TSearchResultsView = class(TForm)
|
TSearchResultsView = class(TForm)
|
||||||
btnSearchAgain: TButton;
|
btnSearchAgain: TButton;
|
||||||
ResultsNoteBook: TNotebook;
|
ResultsNoteBook: TNotebook;
|
||||||
|
gbSearchPhraseInList: TGroupBox;
|
||||||
|
edSearchInList: TEdit;
|
||||||
|
bnForwardSearch: TButton;
|
||||||
|
bnResetResults: TButton;
|
||||||
|
bnFilter: TButton;
|
||||||
procedure Form1Create(Sender: TObject);
|
procedure Form1Create(Sender: TObject);
|
||||||
procedure ListBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
procedure ListBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
procedure ResultsNoteBookClosetabclicked(Sender: TObject);
|
procedure ResultsNoteBookClosetabclicked(Sender: TObject);
|
||||||
@ -124,6 +136,13 @@ type
|
|||||||
X, Y: Integer);
|
X, Y: Integer);
|
||||||
Procedure LazLBMouseWheel(Sender: TObject; Shift: TShiftState;
|
Procedure LazLBMouseWheel(Sender: TObject; Shift: TShiftState;
|
||||||
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
|
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
|
||||||
|
procedure edSearchInListChange (Sender: TObject );
|
||||||
|
procedure ResultsNoteBookPageChanged (Sender: TObject );
|
||||||
|
procedure bnForwardSearchClick (Sender: TObject );
|
||||||
|
procedure bnResetResultsClick (Sender: TObject );
|
||||||
|
procedure edSearchInListKeyDown (Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState );
|
||||||
|
procedure bnFilterClick (Sender: TObject );
|
||||||
private
|
private
|
||||||
FMaxItems: integer;
|
FMaxItems: integer;
|
||||||
function PageExists(const APageName: string): boolean;
|
function PageExists(const APageName: string): boolean;
|
||||||
@ -155,6 +174,7 @@ type
|
|||||||
const MatchStart: integer; const MatchLen: integer);
|
const MatchStart: integer; const MatchLen: integer);
|
||||||
procedure BeginUpdate(AIndex: integer);
|
procedure BeginUpdate(AIndex: integer);
|
||||||
procedure EndUpdate(AIndex: integer);
|
procedure EndUpdate(AIndex: integer);
|
||||||
|
procedure Parse_Search_Phrases(var slPhrases: TStrings);
|
||||||
property ListBoxFont: TFont read fListBoxFont write fListBoxFont;
|
property ListBoxFont: TFont read fListBoxFont write fListBoxFont;
|
||||||
property OnSelectionChanged: TNotifyEvent read fOnSelectionChanged
|
property OnSelectionChanged: TNotifyEvent read fOnSelectionChanged
|
||||||
write fOnSelectionChanged;
|
write fOnSelectionChanged;
|
||||||
@ -172,6 +192,19 @@ implementation
|
|||||||
const
|
const
|
||||||
SPACE = ' ';
|
SPACE = ' ';
|
||||||
|
|
||||||
|
function CopySearchMatchPos(var Src, Dest: TLazSearchMatchPos): Boolean;
|
||||||
|
begin
|
||||||
|
Result := False;
|
||||||
|
if ((Src = nil) or (Dest = nil)) then Exit;
|
||||||
|
Dest.MatchStart := Src.MatchStart;
|
||||||
|
Dest.MatchLen := Src.MatchLen;
|
||||||
|
Dest.Filename := Src.Filename;
|
||||||
|
Dest.FilePosition := Src.FilePosition;
|
||||||
|
Dest.TheText := Src.TheText;
|
||||||
|
Dest.ShownFilename := Dest.Filename;
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSearchResultsView.Form1Create(Sender: TObject);
|
procedure TSearchResultsView.Form1Create(Sender: TObject);
|
||||||
var
|
var
|
||||||
ALayout: TIDEWindowLayout;
|
ALayout: TIDEWindowLayout;
|
||||||
@ -230,6 +263,181 @@ begin
|
|||||||
Handled:= false;
|
Handled:= false;
|
||||||
end;//LazLBMouseWheel
|
end;//LazLBMouseWheel
|
||||||
|
|
||||||
|
procedure TSearchResultsView.edSearchInListChange (Sender: TObject );
|
||||||
|
var CurrentLB: TLazSearchResultLB;
|
||||||
|
begin
|
||||||
|
CurrentLB := GetListBox(ResultsNoteBook.PageIndex);
|
||||||
|
if Assigned(CurrentLB) then
|
||||||
|
CurrentLB.SearchInListPhrases := edSearchInList.Text;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSearchResultsView.ResultsNoteBookPageChanged (Sender: TObject );
|
||||||
|
var CurrentLB: TLazSearchResultLB;
|
||||||
|
begin
|
||||||
|
CurrentLB := GetListBox(ResultsNoteBook.PageIndex);
|
||||||
|
if Assigned(CurrentLB) then
|
||||||
|
edSearchInList.Text := CurrentLB.SearchInListPhrases;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSearchResultsView.bnForwardSearchClick (Sender: TObject );
|
||||||
|
var CurrentLB: TLazSearchResultLB;
|
||||||
|
slPhrases: TStrings;
|
||||||
|
i, j, iCurrentIndex: Integer;
|
||||||
|
S: string;
|
||||||
|
begin
|
||||||
|
CurrentLB := GetListBox(ResultsNoteBook.PageIndex);
|
||||||
|
if Assigned(CurrentLB) then
|
||||||
|
begin
|
||||||
|
if (Length(edSearchInList.Text) = 0) then Exit;//No Search Phrases specified.
|
||||||
|
if (CurrentLB.Items.Count <= 0) then Exit;
|
||||||
|
slPhrases := TStringList.Create;
|
||||||
|
try
|
||||||
|
iCurrentIndex := CurrentLB.ItemIndex + 1;
|
||||||
|
if (iCurrentIndex > CurrentLB.Items.Count) then iCurrentIndex := CurrentLB.Items.Count;
|
||||||
|
if (iCurrentIndex < 0) then iCurrentIndex := 0;//Set to 1st list-item if none are selected
|
||||||
|
//Parse Phrases
|
||||||
|
Parse_Search_Phrases(slPhrases);
|
||||||
|
if (slPhrases.Count > 0) then
|
||||||
|
begin
|
||||||
|
for i:=iCurrentIndex to CurrentLB.Items.Count-1 do
|
||||||
|
begin
|
||||||
|
S := UpperCase(CurrentLB.Items[i]);//for case-insensitive search
|
||||||
|
for j:=0 to slPhrases.Count-1 do
|
||||||
|
begin
|
||||||
|
if (Pos(slPhrases[j], S) <> 0) then
|
||||||
|
begin
|
||||||
|
CurrentLB.ItemIndex := i;//Set listbox's itemindex
|
||||||
|
CurrentLB.MakeCurrentVisible;
|
||||||
|
Exit;//Found what we looking for, exit
|
||||||
|
end;//End if (Pos(slPhrases[j], CurrentLB.Items[i]) <> 0)
|
||||||
|
end;//End for-loop j
|
||||||
|
end;//End for-loop i
|
||||||
|
end;//End if if (slPhrases.Count > 0)
|
||||||
|
finally
|
||||||
|
FreeAndNil(slPhrases);
|
||||||
|
edSearchInList.SetFocus;
|
||||||
|
end;//End try-finally
|
||||||
|
end;//End if Assigned(CurrentLB)
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSearchResultsView.bnResetResultsClick (Sender: TObject );
|
||||||
|
var i: Integer;
|
||||||
|
oObject: TObject;
|
||||||
|
CurrentLB: TLazSearchResultLB;
|
||||||
|
mpMatchPos, mpOrgMatchPos: TLazSearchMatchPos;
|
||||||
|
begin
|
||||||
|
CurrentLB := GetListBox(ResultsNoteBook.PageIndex);
|
||||||
|
try
|
||||||
|
if CurrentLB.Filtered then
|
||||||
|
begin
|
||||||
|
if (CurrentLB.Items.Count > 0) then
|
||||||
|
begin
|
||||||
|
CurrentLB.FreeObjects(CurrentLB.Items);//Free the objects
|
||||||
|
CurrentLB.Items.Clear;
|
||||||
|
end;//End if (CurrentLB.Items.Count > 0)
|
||||||
|
|
||||||
|
if (CurrentLB.BackUpStrings.Count > 0) then
|
||||||
|
begin
|
||||||
|
for i:=0 to CurrentLB.BackUpStrings.Count-1 do
|
||||||
|
begin
|
||||||
|
oObject := CurrentLB.BackUpStrings.Objects[i];
|
||||||
|
if not (oObject is TLazSearchMatchPos) then Continue;
|
||||||
|
mpOrgMatchPos := TLazSearchMatchPos(oObject);
|
||||||
|
if Assigned(mpOrgMatchPos) then
|
||||||
|
begin
|
||||||
|
mpMatchPos := TLazSearchMatchPos.Create;
|
||||||
|
if CopySearchMatchPos(mpOrgMatchPos, mpMatchPos) then
|
||||||
|
CurrentLB.Items.AddObject(CurrentLB.BackUpStrings[i], mpMatchPos);
|
||||||
|
end;//End if Assigned(mpOrgMatchPos)
|
||||||
|
end;//End for-loop i
|
||||||
|
end;//End if (CurrentLB.BackUpStrings.Count > 0)
|
||||||
|
CurrentLB.Filtered := False;
|
||||||
|
end;//End if CurrentLB.Filtered
|
||||||
|
finally
|
||||||
|
edSearchInList.SetFocus;
|
||||||
|
end;//End try-finally
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSearchResultsView.edSearchInListKeyDown (Sender: TObject;
|
||||||
|
var Key: Word; Shift: TShiftState );
|
||||||
|
begin
|
||||||
|
if (Key = VK_RETURN) then
|
||||||
|
bnForwardSearchClick(bnForwardSearch);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSearchResultsView.bnFilterClick (Sender: TObject );
|
||||||
|
var CurrentLB: TLazSearchResultLB;
|
||||||
|
mpMatchPos, mpOrgMatchPos: TLazSearchMatchPos;
|
||||||
|
slPhrases: TStrings;
|
||||||
|
i, j: Integer;
|
||||||
|
S: string;
|
||||||
|
oObject: TObject;
|
||||||
|
begin
|
||||||
|
CurrentLB := GetListBox(ResultsNoteBook.PageIndex);
|
||||||
|
if Assigned(CurrentLB) then
|
||||||
|
begin
|
||||||
|
if (Length(edSearchInList.Text) = 0) then Exit;//No Filter Phrases specified.
|
||||||
|
slPhrases := TStringList.Create;
|
||||||
|
try
|
||||||
|
//Parse Phrases
|
||||||
|
Parse_Search_Phrases(slPhrases);
|
||||||
|
//BackUp Result List
|
||||||
|
if not (CurrentLB.Filtered or (CurrentLB.BackUpStrings.Count > 0)) then
|
||||||
|
begin
|
||||||
|
if (CurrentLB.Items.Count <= 1) then Exit;
|
||||||
|
for i:=0 to CurrentLB.Items.Count-1 do
|
||||||
|
begin
|
||||||
|
oObject := CurrentLB.Items.Objects[i];
|
||||||
|
if not (oObject is TLazSearchMatchPos) then Continue;
|
||||||
|
mpOrgMatchPos := TLazSearchMatchPos(CurrentLB.Items.Objects[i]);
|
||||||
|
if Assigned(mpOrgMatchPos) then
|
||||||
|
begin
|
||||||
|
mpMatchPos := TLazSearchMatchPos.Create;
|
||||||
|
if CopySearchMatchPos(mpOrgMatchPos, mpMatchPos) then
|
||||||
|
CurrentLB.BackUpStrings.AddObject(CurrentLB.Items[i], mpMatchPos);
|
||||||
|
end;//End if Assigned(mpOrgMatchPos)
|
||||||
|
end;//End for-loop i
|
||||||
|
end;//End if not (CurrentLB.Filtered or (CurrentLB.BackUpStrings.Count > 0))
|
||||||
|
|
||||||
|
if (CurrentLB.BackUpStrings.Count <= 0) then Exit;//Empty list
|
||||||
|
|
||||||
|
if (CurrentLB.Items.Count > 0) then
|
||||||
|
begin
|
||||||
|
CurrentLB.FreeObjects(CurrentLB.Items);//Free the objects
|
||||||
|
CurrentLB.Items.Clear;//Clear the list
|
||||||
|
end;//End if (CurrentLB.Items.Count > 0)
|
||||||
|
if (slPhrases.Count > 0) then
|
||||||
|
begin
|
||||||
|
for i:=0 to CurrentLB.BackUpStrings.Count-1 do
|
||||||
|
begin
|
||||||
|
S := UpperCase(CurrentLB.BackUpStrings[i]);//for case-insensitive search
|
||||||
|
for j:=0 to slPhrases.Count-1 do
|
||||||
|
begin
|
||||||
|
if (Pos(slPhrases[j], S) <> 0) then
|
||||||
|
begin
|
||||||
|
oObject := CurrentLB.BackUpStrings.Objects[i];
|
||||||
|
if not (oObject is TLazSearchMatchPos) then Continue;
|
||||||
|
mpOrgMatchPos := TLazSearchMatchPos(CurrentLB.BackUpStrings.Objects[i]);
|
||||||
|
if Assigned(mpOrgMatchPos) then
|
||||||
|
begin
|
||||||
|
mpMatchPos := TLazSearchMatchPos.Create;
|
||||||
|
if CopySearchMatchPos(mpOrgMatchPos, mpMatchPos) then
|
||||||
|
CurrentLB.Items.AddObject(CurrentLB.BackUpStrings[i], mpMatchPos);
|
||||||
|
end;//End if Assigned(mpOrgMatchPos)
|
||||||
|
Break;
|
||||||
|
end;//End if (Pos(slPhrases[j], S) <> 0)
|
||||||
|
end;//End for-loop j
|
||||||
|
end;//End for-loop i
|
||||||
|
CurrentLB.Filtered := True;
|
||||||
|
end;//End if if (slPhrases.Count > 0)
|
||||||
|
finally
|
||||||
|
FreeAndNil(slPhrases);
|
||||||
|
edSearchInList.SetFocus;
|
||||||
|
if (CurrentLB.Items.Count > 0) then CurrentLB.ItemIndex := 0;//Goto first item
|
||||||
|
end;//End try-finally
|
||||||
|
end;//End if Assigned(CurrentLB)
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSearchResultsView.AddMatch(const AIndex: integer;
|
procedure TSearchResultsView.AddMatch(const AIndex: integer;
|
||||||
const Filename: string; const FilePosition: TPoint;
|
const Filename: string; const FilePosition: TPoint;
|
||||||
const TheText: string;
|
const TheText: string;
|
||||||
@ -301,6 +509,30 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TSearchResultsView.Parse_Search_Phrases(var slPhrases: TStrings);
|
||||||
|
var i, iLength: Integer;
|
||||||
|
sPhrases, sPhrase: string;
|
||||||
|
begin
|
||||||
|
//Parse Phrases
|
||||||
|
sPhrases := edSearchInList.Text;
|
||||||
|
iLength := Length(sPhrases);
|
||||||
|
for i:=1 to iLength do
|
||||||
|
begin
|
||||||
|
if ((sPhrases[i] = ' ') or (sPhrases[i] = ',') or (i = iLength)) then
|
||||||
|
begin
|
||||||
|
if not ((sPhrases[i] = ' ') or (sPhrases[i] = ',')) then
|
||||||
|
sPhrase := sPhrase + sPhrases[i];
|
||||||
|
if (sPhrase > ' ') then
|
||||||
|
slPhrases.Add(UpperCase(sPhrase));//End of phrase, add to phrase list
|
||||||
|
sPhrase := '';//Reset sPhrase
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
if (sPhrases[i] > ' ') then
|
||||||
|
sPhrase := sPhrase + sPhrases[i];
|
||||||
|
end;//End if ((sPhrases[i] = ' ') or (sPhrases[i] = ','))
|
||||||
|
end;//End for-loop i
|
||||||
|
end;
|
||||||
|
|
||||||
{Brings the results tab named APageName to front.
|
{Brings the results tab named APageName to front.
|
||||||
If APageName does not exist, does nothing}
|
If APageName does not exist, does nothing}
|
||||||
procedure TSearchResultsView.BringResultsToFront(const APageName: string);
|
procedure TSearchResultsView.BringResultsToFront(const APageName: string);
|
||||||
@ -476,6 +708,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
NewListBox.Skipped:=0;
|
NewListBox.Skipped:=0;
|
||||||
Result:= ResultsNoteBook.PageIndex;
|
Result:= ResultsNoteBook.PageIndex;
|
||||||
|
edSearchInList.Clear;
|
||||||
end;//if
|
end;//if
|
||||||
end;//AddResult
|
end;//AddResult
|
||||||
|
|
||||||
@ -731,24 +964,26 @@ begin
|
|||||||
fUpdating:= false;
|
fUpdating:= false;
|
||||||
fUpdateCount:= 0;
|
fUpdateCount:= 0;
|
||||||
fUpdateStrings:= TStringList.Create;
|
fUpdateStrings:= TStringList.Create;
|
||||||
|
fBackUpStrings := TStringList.Create;
|
||||||
|
FSearchInListPhrases := '';
|
||||||
|
fFiltered := False;
|
||||||
end;//Create
|
end;//Create
|
||||||
|
|
||||||
Destructor TLazSearchResultLB.Destroy;
|
Destructor TLazSearchResultLB.Destroy;
|
||||||
var
|
|
||||||
i: integer;
|
|
||||||
begin
|
begin
|
||||||
if Assigned(fSearchObject) then
|
if Assigned(fSearchObject) then
|
||||||
FreeAndNil(fSearchObject);
|
FreeAndNil(fSearchObject);
|
||||||
if Assigned(fUpdateStrings) then
|
if Assigned(fUpdateStrings) then
|
||||||
begin
|
begin
|
||||||
for i:= 0 to fUpdateStrings.Count -1 do
|
FreeObjects(fUpdateStrings);
|
||||||
begin
|
|
||||||
if Assigned(fUpdateStrings.Objects[i]) then
|
|
||||||
fUpdateStrings.Objects[i].free;
|
|
||||||
end;//for
|
|
||||||
FreeAndNil(fUpdateStrings);
|
FreeAndNil(fUpdateStrings);
|
||||||
end;//if
|
end;//if
|
||||||
|
if Assigned(fBackUpStrings) then
|
||||||
|
begin
|
||||||
|
FreeObjects(fBackUpStrings);
|
||||||
|
FreeAndNil(fBackUpStrings);
|
||||||
|
end;//End if Assigned(fBackUpStrings)
|
||||||
|
FreeObjects(Items);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;//Destroy
|
end;//Destroy
|
||||||
|
|
||||||
@ -847,6 +1082,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TLazSearchResultLB.FreeObjects(var slItems: TStrings);
|
||||||
|
var i: Integer;
|
||||||
|
begin
|
||||||
|
if (slItems.Count <= 0) then Exit;
|
||||||
|
for i:=0 to slItems.Count-1 do
|
||||||
|
begin
|
||||||
|
if Assigned(slItems.Objects[i]) then
|
||||||
|
slItems.Objects[i].Free;
|
||||||
|
end;//End for-loop
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
{$I searchresultview.lrs}
|
{$I searchresultview.lrs}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user