mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 22:19:17 +02:00
+ converted findreplacedialog to lfm
patch by: Darius git-svn-id: trunk@9556 -
This commit is contained in:
parent
2b7bb69fe4
commit
d61a9821fb
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1178,6 +1178,8 @@ ide/findpalettecomp.pas svneol=native#text/plain
|
|||||||
ide/findrenameidentifier.lfm svneol=native#text/plain
|
ide/findrenameidentifier.lfm svneol=native#text/plain
|
||||||
ide/findrenameidentifier.lrs svneol=native#text/pascal
|
ide/findrenameidentifier.lrs svneol=native#text/pascal
|
||||||
ide/findrenameidentifier.pas svneol=native#text/pascal
|
ide/findrenameidentifier.pas svneol=native#text/pascal
|
||||||
|
ide/findreplacedialog.lfm svneol=native#text/plain
|
||||||
|
ide/findreplacedialog.lrs svneol=native#text/plain
|
||||||
ide/findreplacedialog.pp svneol=native#text/pascal
|
ide/findreplacedialog.pp svneol=native#text/pascal
|
||||||
ide/formeditor.pp svneol=native#text/pascal
|
ide/formeditor.pp svneol=native#text/pascal
|
||||||
ide/frmsearch.lfm svneol=native#text/plain
|
ide/frmsearch.lfm svneol=native#text/plain
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@ components/turbopower_ipro/units
|
|||||||
designer/jitform/units
|
designer/jitform/units
|
||||||
designer/units
|
designer/units
|
||||||
examples/units
|
examples/units
|
||||||
|
ide/*.bak
|
||||||
ide/revision.inc
|
ide/revision.inc
|
||||||
ide/units
|
ide/units
|
||||||
ideintf/units
|
ideintf/units
|
||||||
|
340
ide/findreplacedialog.lfm
Normal file
340
ide/findreplacedialog.lfm
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||||
|
ActiveControl = TextToFindComboBox
|
||||||
|
BorderIcons = [biSystemMenu]
|
||||||
|
Caption = 'LazFindReplaceDialog'
|
||||||
|
ClientHeight = 331
|
||||||
|
ClientWidth = 416
|
||||||
|
Constraints.MinHeight = 312
|
||||||
|
OnResize = FormResize
|
||||||
|
PixelsPerInch = 96
|
||||||
|
Position = poScreenCenter
|
||||||
|
HorzScrollBar.Page = 415
|
||||||
|
VertScrollBar.Page = 330
|
||||||
|
Left = 311
|
||||||
|
Height = 331
|
||||||
|
Top = 426
|
||||||
|
Width = 416
|
||||||
|
object TextToFindLabel: TLabel
|
||||||
|
Alignment = taRightJustify
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'TextToFindLabel'
|
||||||
|
Color = clNone
|
||||||
|
FocusControl = TextToFindComboBox
|
||||||
|
ParentColor = False
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
Left = 6
|
||||||
|
Height = 14
|
||||||
|
Top = 16
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object ReplaceWithLabel: TLabel
|
||||||
|
Alignment = taRightJustify
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'ReplaceWithLabel'
|
||||||
|
Color = clNone
|
||||||
|
FocusControl = ReplaceTextComboBox
|
||||||
|
ParentColor = False
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
Left = 6
|
||||||
|
Height = 14
|
||||||
|
Top = 40
|
||||||
|
Width = 86
|
||||||
|
end
|
||||||
|
object TextToFindComboBox: TComboBox
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoComplete = True
|
||||||
|
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending]
|
||||||
|
BorderSpacing.Left = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
MaxLength = 0
|
||||||
|
OnKeyDown = TextToFindComboboxKeyDown
|
||||||
|
TabOrder = 0
|
||||||
|
Text = 'TextToFindComboBox'
|
||||||
|
AnchorSideLeft.Control = TextToFindLabel
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Owner
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 98
|
||||||
|
Height = 21
|
||||||
|
Top = 12
|
||||||
|
Width = 312
|
||||||
|
end
|
||||||
|
object ReplaceTextComboBox: TComboBox
|
||||||
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
AutoComplete = True
|
||||||
|
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending]
|
||||||
|
BorderSpacing.Left = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
MaxLength = 0
|
||||||
|
OnKeyDown = TextToFindComboboxKeyDown
|
||||||
|
TabOrder = 1
|
||||||
|
Text = 'ReplaceTextComboBox'
|
||||||
|
AnchorSideLeft.Control = ReplaceWithLabel
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = Owner
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 104
|
||||||
|
Height = 21
|
||||||
|
Top = 39
|
||||||
|
Width = 306
|
||||||
|
end
|
||||||
|
object CancelButton: TBitBtn
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
BorderSpacing.InnerBorder = 2
|
||||||
|
Cancel = True
|
||||||
|
Caption = 'Cancel'
|
||||||
|
Constraints.MaxHeight = 33
|
||||||
|
Kind = bkCancel
|
||||||
|
ModalResult = 2
|
||||||
|
NumGlyphs = 0
|
||||||
|
OnClick = CancelButtonClick
|
||||||
|
TabOrder = 2
|
||||||
|
AnchorSideRight.Control = ReplaceAllButton
|
||||||
|
AnchorSideBottom.Control = Owner
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 194
|
||||||
|
Height = 33
|
||||||
|
Top = 292
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
object OKButton: TBitBtn
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
BorderSpacing.InnerBorder = 2
|
||||||
|
Caption = '&OK'
|
||||||
|
Constraints.MaxHeight = 33
|
||||||
|
Default = True
|
||||||
|
Kind = bkOK
|
||||||
|
ModalResult = 1
|
||||||
|
NumGlyphs = 0
|
||||||
|
OnClick = OkButtonClick
|
||||||
|
TabOrder = 3
|
||||||
|
AnchorSideRight.Control = Owner
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = Owner
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 348
|
||||||
|
Height = 33
|
||||||
|
Top = 292
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
object OptionsGroupBox: TGroupBox
|
||||||
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
|
BorderSpacing.Left = 6
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Bottom = 6
|
||||||
|
Caption = 'OptionsGroupBox'
|
||||||
|
ClientHeight = 202
|
||||||
|
ClientWidth = 195
|
||||||
|
TabOrder = 4
|
||||||
|
AnchorSideLeft.Control = Owner
|
||||||
|
AnchorSideTop.Control = ReplaceTextComboBox
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = CancelButton
|
||||||
|
Left = 6
|
||||||
|
Height = 220
|
||||||
|
Top = 66
|
||||||
|
Width = 199
|
||||||
|
object PromptOnReplaceCheckBox: TCheckBox
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'PromptOnReplaceCheckBox'
|
||||||
|
Checked = True
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 0
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 112
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
object MultiLineCheckBox: TCheckBox
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'MultiLineCheckBox'
|
||||||
|
Enabled = False
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 87
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
object RegularExpressionsCheckBox: TCheckBox
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'RegularExpressionsCheckBox'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 2
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 62
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
object WholeWordsOnlyCheckBox: TCheckBox
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'WholeWordsOnlyCheckBox'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 3
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 37
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
object CaseSensitiveCheckBox: TCheckBox
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'CaseSensitiveCheckBox'
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
|
TabOrder = 4
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 12
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ScopeGroupBox: TGroupBox
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'ScopeGroupBox'
|
||||||
|
ClientHeight = 51
|
||||||
|
ClientWidth = 195
|
||||||
|
TabOrder = 5
|
||||||
|
AnchorSideLeft.Control = OptionsGroupBox
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = OriginGroupBox
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 211
|
||||||
|
Height = 69
|
||||||
|
Top = 141
|
||||||
|
Width = 199
|
||||||
|
object SelectedRadioButton: TRadioButton
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'SelectedRadioButton'
|
||||||
|
TabOrder = 0
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 31
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
object GlobalRadioButton: TRadioButton
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'GlobalRadioButton'
|
||||||
|
TabOrder = 1
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 6
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object DirectionGroupBox: TGroupBox
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'DirectionGroupBox'
|
||||||
|
ClientHeight = 51
|
||||||
|
ClientWidth = 195
|
||||||
|
TabOrder = 6
|
||||||
|
AnchorSideLeft.Control = OptionsGroupBox
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = ScopeGroupBox
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 211
|
||||||
|
Height = 69
|
||||||
|
Top = 216
|
||||||
|
Width = 199
|
||||||
|
object BackwardRadioButton: TRadioButton
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Top = 6
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'BackwardRadioButton'
|
||||||
|
TabOrder = 0
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 31
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
object ForwardRadioButton: TRadioButton
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'ForwardRadioButton'
|
||||||
|
TabOrder = 1
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 6
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object OriginGroupBox: TGroupBox
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'OriginGroupBox'
|
||||||
|
ClientHeight = 51
|
||||||
|
ClientWidth = 195
|
||||||
|
TabOrder = 7
|
||||||
|
AnchorSideLeft.Control = OptionsGroupBox
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = ReplaceTextComboBox
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 211
|
||||||
|
Height = 69
|
||||||
|
Top = 66
|
||||||
|
Width = 199
|
||||||
|
object FromCursorRadioButton: TRadioButton
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'FromCursorRadioButton'
|
||||||
|
TabOrder = 0
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 6
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
object EntireScopeRadioButton: TRadioButton
|
||||||
|
Align = alTop
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = 'EntireScopeRadioButton'
|
||||||
|
TabOrder = 1
|
||||||
|
Left = 6
|
||||||
|
Height = 13
|
||||||
|
Top = 25
|
||||||
|
Width = 183
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ReplaceAllButton: TBitBtn
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Around = 6
|
||||||
|
Caption = '&All'
|
||||||
|
Constraints.MaxHeight = 33
|
||||||
|
Kind = bkAll
|
||||||
|
ModalResult = 8
|
||||||
|
NumGlyphs = 0
|
||||||
|
TabOrder = 8
|
||||||
|
AnchorSideRight.Control = OKButton
|
||||||
|
AnchorSideBottom.Control = Owner
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
|
Left = 280
|
||||||
|
Height = 33
|
||||||
|
Top = 292
|
||||||
|
Width = 62
|
||||||
|
end
|
||||||
|
end
|
115
ide/findreplacedialog.lrs
Normal file
115
ide/findreplacedialog.lrs
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
|
LazarusResources.Add('TLazFindReplaceDialog','FORMDATA',[
|
||||||
|
'TPF0'#21'TLazFindReplaceDialog'#20'LazFindReplaceDialog'#13'ActiveControl'#7
|
||||||
|
+#18'TextToFindComboBox'#11'BorderIcons'#11#12'biSystemMenu'#0#7'Caption'#6#20
|
||||||
|
+'LazFindReplaceDialog'#12'ClientHeight'#3'K'#1#11'ClientWidth'#3#160#1#21'Co'
|
||||||
|
+'nstraints.MinHeight'#3'8'#1#8'OnResize'#7#10'FormResize'#13'PixelsPerInch'#2
|
||||||
|
+'`'#8'Position'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#159#1#18'VertS'
|
||||||
|
+'crollBar.Page'#3'J'#1#4'Left'#3'7'#1#6'Height'#3'K'#1#3'Top'#3#170#1#5'Widt'
|
||||||
|
+'h'#3#160#1#0#6'TLabel'#15'TextToFindLabel'#9'Alignment'#7#14'taRightJustify'
|
||||||
|
+#20'BorderSpacing.Around'#2#6#7'Caption'#6#15'TextToFindLabel'#5'Color'#7#6
|
||||||
|
+'clNone'#12'FocusControl'#7#18'TextToFindComboBox'#11'ParentColor'#8#22'Anch'
|
||||||
|
+'orSideLeft.Control'#7#5'Owner'#4'Left'#2#6#6'Height'#2#14#3'Top'#2#16#5'Wid'
|
||||||
|
+'th'#2'P'#0#0#6'TLabel'#16'ReplaceWithLabel'#9'Alignment'#7#14'taRightJustif'
|
||||||
|
+'y'#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'ReplaceWithLabel'#5'Color'#7
|
||||||
|
+#6'clNone'#12'FocusControl'#7#19'ReplaceTextComboBox'#11'ParentColor'#8#22'A'
|
||||||
|
+'nchorSideLeft.Control'#7#5'Owner'#4'Left'#2#6#6'Height'#2#14#3'Top'#2'('#5
|
||||||
|
+'Width'#2'V'#0#0#9'TComboBox'#18'TextToFindComboBox'#7'Anchors'#11#5'akTop'#6
|
||||||
|
+'akLeft'#7'akRight'#0#12'AutoComplete'#9#16'AutoCompleteText'#11#12'cbactEna'
|
||||||
|
+'bled'#22'cbactEndOfLineComplete'#21'cbactRetainPrefixCase'#20'cbactSearchAs'
|
||||||
|
+'cending'#0#18'BorderSpacing.Left'#2#6#20'BorderSpacing.Around'#2#6#9'MaxLen'
|
||||||
|
+'gth'#2#0#9'OnKeyDown'#7#25'TextToFindComboboxKeyDown'#8'TabOrder'#2#0#4'Tex'
|
||||||
|
+'t'#6#18'TextToFindComboBox'#22'AnchorSideLeft.Control'#7#15'TextToFindLabel'
|
||||||
|
+#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owne'
|
||||||
|
+'r'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2'b'#6'Height'#2#21#3'To'
|
||||||
|
+'p'#2#12#5'Width'#3'8'#1#0#0#9'TComboBox'#19'ReplaceTextComboBox'#7'Anchors'
|
||||||
|
+#11#5'akTop'#6'akLeft'#7'akRight'#0#12'AutoComplete'#9#16'AutoCompleteText'
|
||||||
|
+#11#12'cbactEnabled'#22'cbactEndOfLineComplete'#21'cbactRetainPrefixCase'#20
|
||||||
|
+'cbactSearchAscending'#0#18'BorderSpacing.Left'#2#6#20'BorderSpacing.Around'
|
||||||
|
+#2#6#9'MaxLength'#2#0#9'OnKeyDown'#7#25'TextToFindComboboxKeyDown'#8'TabOrde'
|
||||||
|
+'r'#2#1#4'Text'#6#19'ReplaceTextComboBox'#22'AnchorSideLeft.Control'#7#16'Re'
|
||||||
|
+'placeWithLabel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.C'
|
||||||
|
+'ontrol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2'h'#6'H'
|
||||||
|
+'eight'#2#21#3'Top'#2''''#5'Width'#3'2'#1#0#0#7'TBitBtn'#12'CancelButton'#7
|
||||||
|
+'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'
|
||||||
|
+#2#6#25'BorderSpacing.InnerBorder'#2#2#6'Cancel'#9#7'Caption'#6#6'Cancel'#21
|
||||||
|
+'Constraints.MaxHeight'#2'!'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'Num'
|
||||||
|
+'Glyphs'#2#0#7'OnClick'#7#17'CancelButtonClick'#8'TabOrder'#2#2#23'AnchorSid'
|
||||||
|
+'eRight.Control'#7#16'ReplaceAllButton'#24'AnchorSideBottom.Control'#7#5'Own'
|
||||||
|
+'er'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#194#0#6'Height'#2'!'
|
||||||
|
+#3'Top'#3'$'#1#5'Width'#2'P'#0#0#7'TBitBtn'#8'OKButton'#7'Anchors'#11#7'akRi'
|
||||||
|
+'ght'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#25'BorderSpac'
|
||||||
|
+'ing.InnerBorder'#2#2#7'Caption'#6#3'&OK'#21'Constraints.MaxHeight'#2'!'#7'D'
|
||||||
|
+'efault'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#7'OnClick'
|
||||||
|
+#7#13'OkButtonClick'#8'TabOrder'#2#3#23'AnchorSideRight.Control'#7#5'Owner'
|
||||||
|
+#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Ow'
|
||||||
|
+'ner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3'\'#1#6'Height'#2'!'
|
||||||
|
+#3'Top'#3'$'#1#5'Width'#2'>'#0#0#9'TGroupBox'#15'OptionsGroupBox'#7'Anchors'
|
||||||
|
+#11#5'akTop'#6'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#17'BorderSpa'
|
||||||
|
+'cing.Top'#2#6#20'BorderSpacing.Bottom'#2#6#7'Caption'#6#15'OptionsGroupBox'
|
||||||
|
+#12'ClientHeight'#3#202#0#11'ClientWidth'#3#195#0#8'TabOrder'#2#4#22'AnchorS'
|
||||||
|
+'ideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#19'ReplaceTextCombo'
|
||||||
|
+'Box'#18'AnchorSideTop.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#12
|
||||||
|
+'CancelButton'#4'Left'#2#6#6'Height'#3#220#0#3'Top'#2'B'#5'Width'#3#199#0#0#9
|
||||||
|
+'TCheckBox'#23'PromptOnReplaceCheckBox'#5'Align'#7#5'alTop'#17'BorderSpacing'
|
||||||
|
+'.Top'#2#6#20'BorderSpacing.Around'#2#6#7'Caption'#6#23'PromptOnReplaceCheck'
|
||||||
|
+'Box'#7'Checked'#9#14'ParentShowHint'#8#8'ShowHint'#9#5'State'#7#9'cbChecked'
|
||||||
|
+#8'TabOrder'#2#0#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'
|
||||||
|
+#2#13#3'Top'#2'p'#5'Width'#3#183#0#0#0#9'TCheckBox'#17'MultiLineCheckBox'#5
|
||||||
|
+'Align'#7#5'alTop'#17'BorderSpacing.Top'#2#6#20'BorderSpacing.Around'#2#6#7
|
||||||
|
+'Caption'#6#17'MultiLineCheckBox'#7'Enabled'#8#14'ParentShowHint'#8#8'ShowHi'
|
||||||
|
+'nt'#9#8'TabOrder'#2#1#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'H'
|
||||||
|
+'eight'#2#13#3'Top'#2'W'#5'Width'#3#183#0#0#0#9'TCheckBox'#26'RegularExpress'
|
||||||
|
+'ionsCheckBox'#5'Align'#7#5'alTop'#17'BorderSpacing.Top'#2#6#20'BorderSpacin'
|
||||||
|
+'g.Around'#2#6#7'Caption'#6#26'RegularExpressionsCheckBox'#14'ParentShowHint'
|
||||||
|
+#8#8'ShowHint'#9#8'TabOrder'#2#2#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Lef'
|
||||||
|
+'t'#2#6#6'Height'#2#13#3'Top'#2'>'#5'Width'#3#183#0#0#0#9'TCheckBox'#22'Whol'
|
||||||
|
,'eWordsOnlyCheckBox'#5'Align'#7#5'alTop'#17'BorderSpacing.Top'#2#6#20'Border'
|
||||||
|
+'Spacing.Around'#2#6#7'Caption'#6#22'WholeWordsOnlyCheckBox'#14'ParentShowHi'
|
||||||
|
+'nt'#8#8'ShowHint'#9#8'TabOrder'#2#3#18'AnchorSideTop.Side'#7#9'asrBottom'#4
|
||||||
|
+'Left'#2#6#6'Height'#2#13#3'Top'#2'%'#5'Width'#3#183#0#0#0#9'TCheckBox'#21'C'
|
||||||
|
+'aseSensitiveCheckBox'#5'Align'#7#5'alTop'#17'BorderSpacing.Top'#2#6#20'Bord'
|
||||||
|
+'erSpacing.Around'#2#6#7'Caption'#6#21'CaseSensitiveCheckBox'#14'ParentShowH'
|
||||||
|
+'int'#8#8'ShowHint'#9#8'TabOrder'#2#4#18'AnchorSideTop.Side'#7#9'asrBottom'#4
|
||||||
|
+'Left'#2#6#6'Height'#2#13#3'Top'#2#12#5'Width'#3#183#0#0#0#0#9'TGroupBox'#13
|
||||||
|
+'ScopeGroupBox'#20'BorderSpacing.Around'#2#6#7'Caption'#6#13'ScopeGroupBox'
|
||||||
|
+#12'ClientHeight'#2'3'#11'ClientWidth'#3#195#0#8'TabOrder'#2#5#22'AnchorSide'
|
||||||
|
+'Left.Control'#7#15'OptionsGroupBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'
|
||||||
|
+#21'AnchorSideTop.Control'#7#14'OriginGroupBox'#18'AnchorSideTop.Side'#7#9'a'
|
||||||
|
+'srBottom'#4'Left'#3#211#0#6'Height'#2'E'#3'Top'#3#141#0#5'Width'#3#199#0#0
|
||||||
|
+#12'TRadioButton'#19'SelectedRadioButton'#5'Align'#7#5'alTop'#17'BorderSpaci'
|
||||||
|
+'ng.Top'#2#6#20'BorderSpacing.Around'#2#6#7'Caption'#6#19'SelectedRadioButto'
|
||||||
|
+'n'#8'TabOrder'#2#0#4'Left'#2#6#6'Height'#2#13#3'Top'#2#31#5'Width'#3#183#0#0
|
||||||
|
+#0#12'TRadioButton'#17'GlobalRadioButton'#5'Align'#7#5'alTop'#20'BorderSpaci'
|
||||||
|
+'ng.Around'#2#6#7'Caption'#6#17'GlobalRadioButton'#8'TabOrder'#2#1#4'Left'#2
|
||||||
|
+#6#6'Height'#2#13#3'Top'#2#6#5'Width'#3#183#0#0#0#0#9'TGroupBox'#17'Directio'
|
||||||
|
+'nGroupBox'#20'BorderSpacing.Around'#2#6#7'Caption'#6#17'DirectionGroupBox'
|
||||||
|
+#12'ClientHeight'#2'3'#11'ClientWidth'#3#195#0#8'TabOrder'#2#6#22'AnchorSide'
|
||||||
|
+'Left.Control'#7#15'OptionsGroupBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'
|
||||||
|
+#21'AnchorSideTop.Control'#7#13'ScopeGroupBox'#18'AnchorSideTop.Side'#7#9'as'
|
||||||
|
+'rBottom'#4'Left'#3#211#0#6'Height'#2'E'#3'Top'#3#216#0#5'Width'#3#199#0#0#12
|
||||||
|
+'TRadioButton'#19'BackwardRadioButton'#5'Align'#7#5'alTop'#17'BorderSpacing.'
|
||||||
|
+'Top'#2#6#20'BorderSpacing.Around'#2#6#7'Caption'#6#19'BackwardRadioButton'#8
|
||||||
|
+'TabOrder'#2#0#4'Left'#2#6#6'Height'#2#13#3'Top'#2#31#5'Width'#3#183#0#0#0#12
|
||||||
|
+'TRadioButton'#18'ForwardRadioButton'#5'Align'#7#5'alTop'#20'BorderSpacing.A'
|
||||||
|
+'round'#2#6#7'Caption'#6#18'ForwardRadioButton'#8'TabOrder'#2#1#4'Left'#2#6#6
|
||||||
|
+'Height'#2#13#3'Top'#2#6#5'Width'#3#183#0#0#0#0#9'TGroupBox'#14'OriginGroupB'
|
||||||
|
+'ox'#20'BorderSpacing.Around'#2#6#7'Caption'#6#14'OriginGroupBox'#12'ClientH'
|
||||||
|
+'eight'#2'3'#11'ClientWidth'#3#195#0#8'TabOrder'#2#7#22'AnchorSideLeft.Contr'
|
||||||
|
+'ol'#7#15'OptionsGroupBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorS'
|
||||||
|
+'ideTop.Control'#7#19'ReplaceTextComboBox'#18'AnchorSideTop.Side'#7#9'asrBot'
|
||||||
|
+'tom'#4'Left'#3#211#0#6'Height'#2'E'#3'Top'#2'B'#5'Width'#3#199#0#0#12'TRadi'
|
||||||
|
+'oButton'#21'FromCursorRadioButton'#5'Align'#7#5'alTop'#20'BorderSpacing.Aro'
|
||||||
|
+'und'#2#6#7'Caption'#6#21'FromCursorRadioButton'#8'TabOrder'#2#0#4'Left'#2#6
|
||||||
|
+#6'Height'#2#13#3'Top'#2#6#5'Width'#3#183#0#0#0#12'TRadioButton'#22'EntireSc'
|
||||||
|
+'opeRadioButton'#5'Align'#7#5'alTop'#20'BorderSpacing.Around'#2#6#7'Caption'
|
||||||
|
+#6#22'EntireScopeRadioButton'#8'TabOrder'#2#1#4'Left'#2#6#6'Height'#2#13#3'T'
|
||||||
|
+'op'#2#25#5'Width'#3#183#0#0#0#0#7'TBitBtn'#16'ReplaceAllButton'#7'Anchors'
|
||||||
|
+#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Ca'
|
||||||
|
+'ption'#6#4'&All'#21'Constraints.MaxHeight'#2'!'#4'Kind'#7#5'bkAll'#11'Modal'
|
||||||
|
+'Result'#2#8#9'NumGlyphs'#2#0#8'TabOrder'#2#8#23'AnchorSideRight.Control'#7#8
|
||||||
|
+'OKButton'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'
|
||||||
|
+#7#9'asrBottom'#4'Left'#3#24#1#6'Height'#2'!'#3'Top'#3'$'#1#5'Width'#2'>'#0#0
|
||||||
|
+#0
|
||||||
|
]);
|
@ -40,32 +40,39 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, LCLType, Controls, StdCtrls, Forms, Buttons,
|
Classes, SysUtils, LCLProc, LCLType, Controls, StdCtrls, Forms, Buttons,
|
||||||
ExtCtrls, LResources, Dialogs, SynEditTypes, SynRegExpr, SynEdit,
|
ExtCtrls, LResources, Dialogs, SynEditTypes, SynRegExpr, SynEdit,
|
||||||
LazarusIdeStrConsts;
|
LazarusIdeStrConsts, Math;
|
||||||
|
|
||||||
type
|
type
|
||||||
TFindDlgComponent = (fdcText, fdcReplace);
|
TFindDlgComponent = (fdcText, fdcReplace);
|
||||||
TOnFindDlgKey = procedure(Sender: TObject; var Key: Word; Shift:TShiftState;
|
TOnFindDlgKey = procedure(Sender: TObject; var Key: Word; Shift:TShiftState;
|
||||||
FindDlgComponent: TFindDlgComponent) of Object;
|
FindDlgComponent: TFindDlgComponent) of Object;
|
||||||
|
|
||||||
|
{ TLazFindReplaceDialog }
|
||||||
|
|
||||||
TLazFindReplaceDialog = class(TForm)
|
TLazFindReplaceDialog = class(TForm)
|
||||||
|
BackwardRadioButton: TRadioButton;
|
||||||
|
ReplaceAllButton: TBitBtn;
|
||||||
|
CaseSensitiveCheckBox: TCheckBox;
|
||||||
|
EntireScopeRadioButton: TRadioButton;
|
||||||
|
ForwardRadioButton: TRadioButton;
|
||||||
|
FromCursorRadioButton: TRadioButton;
|
||||||
|
GlobalRadioButton: TRadioButton;
|
||||||
|
DirectionGroupBox: TGroupBox;
|
||||||
|
OriginGroupBox: TGroupBox;
|
||||||
|
ScopeGroupBox: TGroupBox;
|
||||||
|
OptionsGroupBox: TGroupBox;
|
||||||
|
MultiLineCheckBox: TCheckBox;
|
||||||
|
OKButton: TBitBtn;
|
||||||
|
PromptOnReplaceCheckBox: TCheckBox;
|
||||||
|
RegularExpressionsCheckBox: TCheckBox;
|
||||||
|
SelectedRadioButton: TRadioButton;
|
||||||
TextToFindLabel: TLabel;
|
TextToFindLabel: TLabel;
|
||||||
ReplaceWithLabel: TLabel;
|
ReplaceWithLabel: TLabel;
|
||||||
TextToFindComboBox: TComboBox;
|
TextToFindComboBox: TComboBox;
|
||||||
ReplaceTextComboBox: TComboBox;
|
ReplaceTextComboBox: TComboBox;
|
||||||
OptionsGroupBox: TGroupBox;
|
CancelButton: TBitBtn;
|
||||||
CaseSensitiveCheckBox: TCheckBox;
|
|
||||||
WholeWordsOnlyCheckBox: TCheckBox;
|
WholeWordsOnlyCheckBox: TCheckBox;
|
||||||
RegularExpressionsCheckBox: TCheckBox;
|
procedure FormResize(Sender: TObject);
|
||||||
MultiLineCheckBox: TCheckBox;
|
|
||||||
PromptOnReplaceCheckBox: TCheckBox;
|
|
||||||
DirectionRadioGroup: TRadioGroup;
|
|
||||||
ScopeRadioGroup: TRadioGroup;
|
|
||||||
OriginRadioGroup: TRadioGroup;
|
|
||||||
OkButton: TButton;
|
|
||||||
ReplaceAllButton: TButton;
|
|
||||||
CancelButton: TButton;
|
|
||||||
procedure LazFindReplaceDialogResize(Sender: TObject);
|
|
||||||
procedure OptionsGroupBoxResize(Sender: TObject);
|
|
||||||
procedure TextToFindComboboxKeyDown(Sender: TObject; var Key: Word;
|
procedure TextToFindComboboxKeyDown(Sender: TObject; var Key: Word;
|
||||||
Shift: TShiftState);
|
Shift: TShiftState);
|
||||||
procedure OkButtonClick(Sender: TObject);
|
procedure OkButtonClick(Sender: TObject);
|
||||||
@ -107,232 +114,59 @@ implementation
|
|||||||
{ TLazFindReplaceDialog }
|
{ TLazFindReplaceDialog }
|
||||||
|
|
||||||
constructor TLazFindReplaceDialog.Create(TheOwner:TComponent);
|
constructor TLazFindReplaceDialog.Create(TheOwner:TComponent);
|
||||||
var
|
|
||||||
x: Integer;
|
|
||||||
y: Integer;
|
|
||||||
ComboX: Integer;
|
|
||||||
OptionW: Integer;
|
|
||||||
OptionsGrpW: Integer;
|
|
||||||
OptionY: Integer;
|
|
||||||
OptionH: Integer;
|
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
Name:='LazFindReplaceDialog';
|
|
||||||
Caption:='';
|
Caption:='';
|
||||||
Width:=400;
|
|
||||||
Height:=300;
|
|
||||||
BorderStyle:= bsDialog;
|
|
||||||
Position:=poDesigned;
|
|
||||||
OnResize:=@LazFindReplaceDialogResize;
|
|
||||||
|
|
||||||
x:=4;
|
TextToFindComboBox.Text:='';
|
||||||
y:=4;
|
TextToFindLabel.Caption:=dlgTextToFing;
|
||||||
ComboX:=x+90;
|
ReplaceTextComboBox.Text:='';
|
||||||
TextToFindComboBox:=TComboBox.Create(Self);
|
ReplaceWithLabel.Caption:=dlgReplaceWith;
|
||||||
with TextToFindComboBox do begin
|
|
||||||
Name:='TextToFindComboBox';
|
|
||||||
SetBounds(ComboX,y,Self.ClientWidth-ComboX-x,Height);
|
|
||||||
Anchors:= [akLeft, akTop, akRight];
|
|
||||||
Text:='';
|
|
||||||
AutoCompleteText := [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending];
|
|
||||||
OnKeyDown:=@TextToFindComboBoxKeyDown;
|
|
||||||
Parent:=Self;
|
|
||||||
TabOrder:=0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
TextToFindLabel:=TLabel.Create(Self);
|
OptionsGroupBox.Caption:=dlgFROpts;
|
||||||
with TextToFindLabel do begin
|
|
||||||
Name:='TextToFindLabel';
|
|
||||||
SetBounds(x,y+3,ComboX-x,Height);
|
|
||||||
Caption:=dlgTextToFing;
|
|
||||||
FocusControl:= TextToFindComboBox;
|
|
||||||
Parent:=Self;
|
|
||||||
end;
|
|
||||||
inc(y,TextToFindComboBox.Height+1);
|
|
||||||
|
|
||||||
ReplaceTextComboBox:=TComboBox.Create(Self);
|
|
||||||
with ReplaceTextComboBox do begin
|
|
||||||
Name:='ReplaceTextComboBox';
|
|
||||||
SetBounds(ComboX,y,Self.ClientWidth-ComboX-x,Height);
|
|
||||||
Anchors:= [akLeft, akTop, akRight];
|
|
||||||
Text:='';
|
|
||||||
AutoCompleteText := [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending];
|
|
||||||
OnKeyDown:=@TextToFindComboBoxKeyDown;
|
|
||||||
Parent:=Self;
|
|
||||||
TabOrder:=1;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ReplaceWithLabel:=TLabel.Create(Self);
|
|
||||||
with ReplaceWithLabel do begin
|
|
||||||
Name:='ReplaceWithLabel';
|
|
||||||
SetBounds(x,y+3,ComboX-x,Height);
|
|
||||||
Caption:=dlgReplaceWith;
|
|
||||||
FocusControl:= ReplaceTextComboBox;
|
|
||||||
Parent:=Self;
|
|
||||||
end;
|
|
||||||
inc(y,ReplaceTextComboBox.Height+1);
|
|
||||||
|
|
||||||
OptionsGrpW:=(ClientWidth-15) div 2;
|
|
||||||
x:=5;
|
|
||||||
OptionsGroupBox:=TGroupBox.Create(Self);
|
|
||||||
with OptionsGroupBox do begin
|
|
||||||
Name:='OptionsGroupBox';
|
|
||||||
SetBounds(x,y,OptionsGrpW,160);
|
|
||||||
Caption:=dlgFROpts;
|
|
||||||
OnResize:=@OptionsGroupBoxResize;
|
|
||||||
Parent:=Self;
|
|
||||||
end;
|
|
||||||
|
|
||||||
OptionH:=OptionsGroupBox.ClientHeight div 5;
|
|
||||||
OptionW:=OptionsGroupBox.ClientWidth-12;
|
|
||||||
OptionY:=2;
|
|
||||||
|
|
||||||
CaseSensitiveCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with CaseSensitiveCheckBox do begin
|
with CaseSensitiveCheckBox do begin
|
||||||
Name:='CaseSensitiveCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := True;
|
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
Caption:=dlgCaseSensitive;
|
Caption:=dlgCaseSensitive;
|
||||||
Hint:=lisDistinguishBigAndSmallLettersEGAAndA;
|
Hint:=lisDistinguishBigAndSmallLettersEGAAndA;
|
||||||
ShowHint:=true;
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
WholeWordsOnlyCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with WholeWordsOnlyCheckBox do begin
|
with WholeWordsOnlyCheckBox do begin
|
||||||
Name:='WholeWordsOnlyCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := False;
|
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
Caption:=dlgWholeWordsOnly;
|
Caption:=dlgWholeWordsOnly;
|
||||||
Hint:=lisOnlySearchForWholeWords;
|
Hint:=lisOnlySearchForWholeWords;
|
||||||
ShowHint:=true;
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
RegularExpressionsCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with RegularExpressionsCheckBox do begin
|
with RegularExpressionsCheckBox do begin
|
||||||
Name:='RegularExpressionsCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := False;
|
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
Caption:=dlgRegularExpressions;
|
Caption:=dlgRegularExpressions;
|
||||||
Hint:=lisActivateRegularExpressionSyntaxForTextAndReplaceme;
|
Hint:=lisActivateRegularExpressionSyntaxForTextAndReplaceme;
|
||||||
ShowHint:=true;
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
MultiLineCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with MultiLineCheckBox do begin
|
with MultiLineCheckBox do begin
|
||||||
Name:='MultiLineCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := False;
|
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
Caption:=dlgMultiLine;
|
Caption:=dlgMultiLine;
|
||||||
Enabled:=false;
|
|
||||||
Hint:=lisAllowSearchingForMultipleLines;
|
Hint:=lisAllowSearchingForMultipleLines;
|
||||||
ShowHint:=true;
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
PromptOnReplaceCheckBox:=TCheckBox.Create(Self);
|
|
||||||
with PromptOnReplaceCheckBox do begin
|
with PromptOnReplaceCheckBox do begin
|
||||||
Name:='PromptOnReplaceCheckBox';
|
|
||||||
Parent:=OptionsGroupBox;
|
|
||||||
AutoSize := False;
|
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
Caption:=dlgPromptOnReplace;
|
Caption:=dlgPromptOnReplace;
|
||||||
Checked:=true;
|
|
||||||
Hint:=lisAskBeforeReplacingEachFoundText;
|
Hint:=lisAskBeforeReplacingEachFoundText;
|
||||||
ShowHint:=true;
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OriginRadioGroup:=TRadioGroup.Create(Self);
|
OriginGroupBox.Caption:=dlgSROrigin;
|
||||||
with OriginRadioGroup do begin
|
FromCursorRadioButton.Caption := dlgFromCursor;
|
||||||
Name:='OriginRadioGroup';
|
EntireScopeRadioButton.Caption := dlgEntireScope;
|
||||||
Parent:= Self;
|
|
||||||
SetBounds(x+OptionsGrpW+x,OptionsGroupBox.Top,OptionsGrpW,65);
|
|
||||||
Caption:=dlgSROrigin;
|
|
||||||
with Items do begin
|
|
||||||
BeginUpdate;
|
|
||||||
Clear;
|
|
||||||
Add(dlgFromCursor);
|
|
||||||
Add(dlgEntireScope);
|
|
||||||
EndUpdate;
|
|
||||||
end;
|
|
||||||
ItemIndex:=0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ScopeRadioGroup:=TRadioGroup.Create(Self);
|
ScopeGroupBox.Caption:=dlgScope;
|
||||||
with ScopeRadioGroup do begin
|
GlobalRadioButton.Caption := dlgGlobal;
|
||||||
Name:='ScopeRadioGroup';
|
SelectedRadioButton.Caption := dlgSelectedText;
|
||||||
Parent:=Self;
|
|
||||||
SetBounds(OriginRadioGroup.Left,
|
|
||||||
OriginRadioGroup.Top+OriginRadioGroup.Height+5,
|
|
||||||
OriginRadioGroup.Width,65);
|
|
||||||
Caption:=dlgScope;
|
|
||||||
with Items do begin
|
|
||||||
BeginUpdate;
|
|
||||||
Clear;
|
|
||||||
Add(dlgGlobal);
|
|
||||||
Add(dlgSelectedText);
|
|
||||||
EndUpdate;
|
|
||||||
end;
|
|
||||||
ItemIndex:=0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
DirectionRadioGroup:=TRadioGroup.Create(Self);
|
DirectionGroupBox.Caption:=dlgDirection;
|
||||||
with DirectionRadioGroup do begin
|
ForwardRadioButton.Caption := lisFRForwardSearch;
|
||||||
Name:='DirectionRadioGroup';
|
BackwardRadioButton.Caption := lisFRBackwardSearch;
|
||||||
Parent:=Self;
|
|
||||||
SetBounds(OriginRadioGroup.Left,
|
|
||||||
ScopeRadioGroup.Top+ScopeRadioGroup.Height+5,
|
|
||||||
OriginRadioGroup.Width,65);
|
|
||||||
Caption:=dlgDirection;
|
|
||||||
with Items do begin
|
|
||||||
BeginUpdate;
|
|
||||||
Clear;
|
|
||||||
Add(lisFRForwardSearch);
|
|
||||||
Add(lisFRBackwardSearch);
|
|
||||||
EndUpdate;
|
|
||||||
end;
|
|
||||||
ItemIndex:=0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
OkButton:=TButton.Create(Self);
|
ReplaceAllButton.Caption:=dlgReplaceAll;
|
||||||
with OkButton do begin
|
CancelButton.Caption:=dlgCancel;
|
||||||
Name:='OkButton';
|
|
||||||
Parent:= Self;
|
|
||||||
Default:=true;
|
|
||||||
SetBounds(Parent.ClientWidth-350,Parent.ClientHeight-32,120,Height);
|
|
||||||
Caption:='O&k';
|
|
||||||
OnClick:=@OkButtonClick;
|
|
||||||
end;
|
|
||||||
|
|
||||||
ReplaceAllButton:=TButton.Create(Self);
|
|
||||||
with ReplaceAllButton do begin
|
|
||||||
Name:='ReplaceAllButton';
|
|
||||||
Parent:= Self;
|
|
||||||
SetBounds(OkButton.Left+OkButton.Width+10,OkButton.Top,120,Height);
|
|
||||||
Caption:=dlgReplaceAll;
|
|
||||||
OnClick:=@ReplaceAllButtonClick;
|
|
||||||
end;
|
|
||||||
|
|
||||||
CancelButton:=TButton.Create(Self);
|
|
||||||
with CancelButton do begin
|
|
||||||
Name:='CancelButton';
|
|
||||||
Parent:= Self;
|
|
||||||
Cancel:=true;
|
|
||||||
SetBounds(ReplaceAllButton.Left+ReplaceAllButton.Width+10,OkButton.Top,
|
|
||||||
80,Height);
|
|
||||||
Caption:=dlgCancel;
|
|
||||||
OnClick:=@CancelButtonClick;
|
|
||||||
end;
|
|
||||||
|
|
||||||
fReplaceAllClickedLast:=false;
|
fReplaceAllClickedLast:=false;
|
||||||
ActiveControl:=TextToFindComboBox;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TLazFindReplaceDialog.Destroy;
|
destructor TLazFindReplaceDialog.Destroy;
|
||||||
@ -361,104 +195,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazFindReplaceDialog.OptionsGroupBoxResize(Sender: TObject);
|
procedure TLazFindReplaceDialog.FormResize(Sender: TObject);
|
||||||
var
|
var
|
||||||
OptionH: Integer;
|
w: integer;
|
||||||
OptionW: Integer;
|
h: integer;
|
||||||
OptionY: Integer;
|
|
||||||
begin
|
begin
|
||||||
OptionH:=OptionsGroupBox.ClientHeight div 5;
|
w := (Width - 18) div 2;
|
||||||
OptionW:=OptionsGroupBox.ClientWidth-12;
|
OptionsGroupBox.Width := w;
|
||||||
OptionY:=2;
|
OriginGroupBox.Width := w;
|
||||||
|
ScopeGroupBox.Width := w;
|
||||||
with CaseSensitiveCheckBox do begin
|
DirectionGroupBox.Width := w;
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
inc(OptionY,OptionH);
|
h := (OptionsGroupBox.Height - 12) div 3;
|
||||||
end;
|
OriginGroupBox.Height := h;
|
||||||
|
ScopeGroupBox.Height := h;
|
||||||
with WholeWordsOnlyCheckBox do begin
|
DirectionGroupBox.Height := h;
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with RegularExpressionsCheckBox do begin
|
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with MultiLineCheckBox do begin
|
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with PromptOnReplaceCheckBox do begin
|
|
||||||
SetBounds(8,OptionY,OptionW,Height);
|
|
||||||
inc(OptionY,OptionH);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TLazFindReplaceDialog.LazFindReplaceDialogResize(Sender: TObject);
|
|
||||||
var
|
|
||||||
x: Integer;
|
|
||||||
y: Integer;
|
|
||||||
ComboX: Integer;
|
|
||||||
OptionsGrpW: Integer;
|
|
||||||
begin
|
|
||||||
x:=4;
|
|
||||||
y:=4;
|
|
||||||
ComboX:=x+90;
|
|
||||||
with TextToFindComboBox do begin
|
|
||||||
SetBounds(ComboX,y,Parent.ClientWidth-ComboX-x,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with TextToFindLabel do begin
|
|
||||||
SetBounds(x,y+3,ComboX-x,Height);
|
|
||||||
end;
|
|
||||||
inc(y,TextToFindComboBox.Height+1);
|
|
||||||
|
|
||||||
with ReplaceTextComboBox do begin
|
|
||||||
SetBounds(ComboX,y,Parent.ClientWidth-ComboX-x,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with ReplaceWithLabel do begin
|
|
||||||
SetBounds(x,y+3,ComboX-x,Height);
|
|
||||||
end;
|
|
||||||
inc(y,ReplaceTextComboBox.Height+1);
|
|
||||||
|
|
||||||
OptionsGrpW:=(ClientWidth-15) div 2;
|
|
||||||
x:=5;
|
|
||||||
with OptionsGroupBox do begin
|
|
||||||
SetBounds(x,y,OptionsGrpW,160);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with OriginRadioGroup do begin
|
|
||||||
SetBounds(x+OptionsGrpW+x,OptionsGroupBox.Top,OptionsGrpW,65);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with ScopeRadioGroup do begin
|
|
||||||
SetBounds(OriginRadioGroup.Left,
|
|
||||||
OriginRadioGroup.Top+OriginRadioGroup.Height+5,
|
|
||||||
OriginRadioGroup.Width,65);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with DirectionRadioGroup do begin
|
|
||||||
SetBounds(OriginRadioGroup.Left,
|
|
||||||
ScopeRadioGroup.Top+ScopeRadioGroup.Height+5,
|
|
||||||
OriginRadioGroup.Width,65);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with OkButton do begin
|
|
||||||
SetBounds(Parent.ClientWidth-350,Parent.ClientHeight-32,120,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with ReplaceAllButton do begin
|
|
||||||
SetBounds(OkButton.Left+OkButton.Width+10,OkButton.Top,120,Height);
|
|
||||||
end;
|
|
||||||
|
|
||||||
with CancelButton do begin
|
|
||||||
SetBounds(ReplaceAllButton.Left+ReplaceAllButton.Width+10,OkButton.Top,
|
|
||||||
80,Height);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazFindReplaceDialog.OkButtonClick(Sender:TObject);
|
procedure TLazFindReplaceDialog.OkButtonClick(Sender:TObject);
|
||||||
@ -466,7 +217,6 @@ begin
|
|||||||
if not CheckInput then exit;
|
if not CheckInput then exit;
|
||||||
fReplaceAllClickedLast:=false;
|
fReplaceAllClickedLast:=false;
|
||||||
ActiveControl:=TextToFindComboBox;
|
ActiveControl:=TextToFindComboBox;
|
||||||
ModalResult:=mrOk;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazFindReplaceDialog.ReplaceAllButtonClick(Sender:TObject);
|
procedure TLazFindReplaceDialog.ReplaceAllButtonClick(Sender:TObject);
|
||||||
@ -474,13 +224,11 @@ begin
|
|||||||
if not CheckInput then exit;
|
if not CheckInput then exit;
|
||||||
fReplaceAllClickedLast:=true;
|
fReplaceAllClickedLast:=true;
|
||||||
ActiveControl:=TextToFindComboBox;
|
ActiveControl:=TextToFindComboBox;
|
||||||
ModalResult:=mrAll;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazFindReplaceDialog.CancelButtonClick(Sender:TObject);
|
procedure TLazFindReplaceDialog.CancelButtonClick(Sender:TObject);
|
||||||
begin
|
begin
|
||||||
ActiveControl:=TextToFindComboBox;
|
ActiveControl:=TextToFindComboBox;
|
||||||
ModalResult:=mrCancel;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLazFindReplaceDialog.CheckInput: boolean;
|
function TLazFindReplaceDialog.CheckInput: boolean;
|
||||||
@ -544,28 +292,30 @@ begin
|
|||||||
RegularExpressionsCheckBox.Checked:=ssoRegExpr in NewOptions;
|
RegularExpressionsCheckBox.Checked:=ssoRegExpr in NewOptions;
|
||||||
MultiLineCheckBox.Checked:=ssoRegExprMultiLine in NewOptions;
|
MultiLineCheckBox.Checked:=ssoRegExprMultiLine in NewOptions;
|
||||||
PromptOnReplaceCheckBox.Checked:=ssoPrompt in NewOptions;
|
PromptOnReplaceCheckBox.Checked:=ssoPrompt in NewOptions;
|
||||||
|
|
||||||
if ssoEntireScope in NewOptions
|
if ssoEntireScope in NewOptions
|
||||||
then OriginRadioGroup.ItemIndex:=1
|
then EntireScopeRadioButton.Checked:=True
|
||||||
else OriginRadioGroup.ItemIndex:=0;
|
else FromCursorRadioButton.Checked:=True;
|
||||||
if ssoSelectedOnly in NewOptions
|
if ssoSelectedOnly in NewOptions
|
||||||
then ScopeRadioGroup.ItemIndex:=1
|
then SelectedRadioButton.Checked:=True
|
||||||
else ScopeRadioGroup.ItemIndex:=0;
|
else GlobalRadioButton.Checked:=True;
|
||||||
if ssoBackwards in NewOptions
|
if ssoBackwards in NewOptions
|
||||||
then DirectionRadioGroup.ItemIndex:=1
|
then BackwardRadioButton.Checked:=True
|
||||||
else DirectionRadioGroup.ItemIndex:=0;
|
else ForwardRadioButton.Checked:=True;
|
||||||
if ssoSelectedOnly in NewOptions then
|
|
||||||
ScopeRadioGroup.ItemIndex := 1 else
|
ReplaceAllButton.Visible:=ssoReplace in NewOptions;
|
||||||
ScopeRadioGroup.ItemIndex := 0;
|
ReplaceTextComboBox.Enabled:=ReplaceAllButton.Visible;
|
||||||
ReplaceAllButton.Enabled:=ssoReplace in NewOptions;
|
ReplaceWithLabel.Enabled:=ReplaceAllButton.Visible;
|
||||||
ReplaceTextComboBox.Enabled:=ReplaceAllButton.Enabled;
|
PromptOnReplaceCheckBox.Enabled:=ReplaceAllButton.Visible;
|
||||||
ReplaceWithLabel.Enabled:=ReplaceAllButton.Enabled;
|
|
||||||
PromptOnReplaceCheckBox.Enabled:=ReplaceAllButton.Enabled;
|
|
||||||
if ssoReplace in NewOptions then begin
|
if ssoReplace in NewOptions then begin
|
||||||
Caption:=lisMenuReplace;
|
Caption:=lisMenuReplace;
|
||||||
OkButton.Caption:=lisMenuReplace;
|
OkButton.Caption:=lisMenuReplace;
|
||||||
|
CancelButton.AnchorSideRight.Control := ReplaceAllButton
|
||||||
end else begin
|
end else begin
|
||||||
Caption:=lisMenuFind ;
|
Caption:=lisMenuFind ;
|
||||||
OkButton.Caption:=lisMenuFind ;
|
OkButton.Caption:=lisMenuFind ;
|
||||||
|
CancelButton.AnchorSideRight.Control := OKButton;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -577,10 +327,11 @@ begin
|
|||||||
if RegularExpressionsCheckBox.Checked then Include(Result,ssoRegExpr);
|
if RegularExpressionsCheckBox.Checked then Include(Result,ssoRegExpr);
|
||||||
if MultiLineCheckBox.Checked then Include(Result,ssoRegExprMultiLine);
|
if MultiLineCheckBox.Checked then Include(Result,ssoRegExprMultiLine);
|
||||||
if PromptOnReplaceCheckBox.Checked then Include(Result,ssoPrompt);
|
if PromptOnReplaceCheckBox.Checked then Include(Result,ssoPrompt);
|
||||||
if OriginRadioGroup.ItemIndex=1 then Include(Result,ssoEntireScope);
|
|
||||||
if ScopeRadioGroup.ItemIndex=1 then include(Result,ssoSelectedOnly);
|
if EntireScopeRadioButton.Checked then Include(Result,ssoEntireScope);
|
||||||
if DirectionRadioGroup.ItemIndex=1 then include(Result,ssoBackwards);
|
if SelectedRadioButton.Checked then include(Result,ssoSelectedOnly);
|
||||||
if ReplaceAllButton.Enabled then include(Result,ssoReplace);
|
if BackwardRadioButton.Checked then include(Result,ssoBackwards);
|
||||||
|
if ReplaceAllButton.Visible then include(Result,ssoReplace);
|
||||||
if fReplaceAllClickedLast then include(Result,ssoReplaceAll);
|
if fReplaceAllClickedLast then include(Result,ssoReplaceAll);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -621,4 +372,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
initialization
|
||||||
|
{$I findreplacedialog.lrs}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user