mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 09:39:11 +02:00
ide: allow to choose bracket highlight style in IDE
git-svn-id: trunk@17578 -
This commit is contained in:
parent
c248a2aa3e
commit
867203e6d9
@ -40,7 +40,7 @@ uses
|
||||
Controls, Graphics, LCLProc, FileUtil, LResources,
|
||||
// synedit
|
||||
SynEdit, SynEditAutoComplete, SynEditHighlighter, SynEditKeyCmds,
|
||||
SynEditStrConst,
|
||||
SynEditStrConst, SynEditMarkupBracket,
|
||||
SynHighlighterCPP, SynHighlighterHTML, SynHighlighterJava, SynHighlighterLFM,
|
||||
SynHighlighterPas, SynHighlighterPerl, SynHighlighterPHP, SynHighlighterSQL,
|
||||
SynHighlighterPython, SynHighlighterUNIXShellScript, SynHighlighterXML,
|
||||
@ -382,6 +382,7 @@ type
|
||||
fBlockIndent: Integer;
|
||||
fUndoLimit: Integer;
|
||||
fTabWidth: Integer;
|
||||
FBracketHighlightStyle: TSynEditBracketHighlightStyle;
|
||||
|
||||
// Display options
|
||||
fVisibleRightMargin: Boolean;
|
||||
@ -476,6 +477,7 @@ type
|
||||
read fBlockIndent write fBlockIndent default 2;
|
||||
property UndoLimit: Integer read fUndoLimit write fUndoLimit default 32767;
|
||||
property TabWidth: Integer read fTabWidth write fTabWidth default 8;
|
||||
property BracketHighlightStyle: TSynEditBracketHighlightStyle read FBracketHighlightStyle write FBracketHighlightStyle default sbhsBoth;
|
||||
|
||||
// Display options
|
||||
property VisibleRightMargin: Boolean
|
||||
@ -1300,6 +1302,7 @@ begin
|
||||
fBlockIndent := 2;
|
||||
fUndoLimit := 32767;
|
||||
fTabWidth := 8;
|
||||
FBracketHighlightStyle := sbhsBoth;
|
||||
|
||||
// Display options
|
||||
fEditorFont := SynDefaultFontName;
|
||||
@ -1410,6 +1413,8 @@ begin
|
||||
XMLConfig.GetValue('EditorOptions/General/Editor/UndoLimit', 32767);
|
||||
fTabWidth :=
|
||||
XMLConfig.GetValue('EditorOptions/General/Editor/TabWidth', 8);
|
||||
FBracketHighlightStyle :=
|
||||
TSynEditBracketHighlightStyle(XMLConfig.GetValue('EditorOptions/General/Editor/BracketHighlightStyle', 2));
|
||||
|
||||
// Display options
|
||||
fVisibleRightMargin :=
|
||||
@ -1555,6 +1560,8 @@ begin
|
||||
, fUndoLimit, 32767);
|
||||
XMLConfig.SetDeleteValue('EditorOptions/General/Editor/TabWidth'
|
||||
, fTabWidth, 8);
|
||||
XMLConfig.SetDeleteValue('EditorOptions/General/Editor/BracketHighlightStyle'
|
||||
, Ord(FBracketHighlightStyle), 2);
|
||||
|
||||
// Display options
|
||||
XMLConfig.SetDeleteValue('EditorOptions/Display/VisibleRightMargin'
|
||||
@ -2136,6 +2143,7 @@ begin
|
||||
ASynEdit.Options2 := fSynEditOptions2;
|
||||
ASynEdit.BlockIndent := fBlockIndent;
|
||||
ASynEdit.TabWidth := fTabWidth;
|
||||
ASynEdit.BracketHighlightStyle := FBracketHighlightStyle;
|
||||
|
||||
// Display options
|
||||
ASynEdit.Gutter.Visible := fVisibleGutter;
|
||||
@ -2184,6 +2192,7 @@ begin
|
||||
fSynEditOptions2 := ASynEdit.Options2;
|
||||
fBlockIndent := ASynEdit.BlockIndent;
|
||||
fTabWidth := ASynEdit.TabWidth;
|
||||
FBracketHighlightStyle := ASynEdit.BracketHighlightStyle;
|
||||
|
||||
// Display options
|
||||
fVisibleGutter := ASynEdit.Gutter.Visible;
|
||||
|
@ -3,10 +3,9 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Width = 454
|
||||
ClientHeight = 504
|
||||
ClientWidth = 454
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
DesignLeft = 132
|
||||
DesignTop = 174
|
||||
DesignLeft = 403
|
||||
DesignTop = 264
|
||||
object BlockIndentLabel: TLabel[0]
|
||||
AnchorSideLeft.Control = BlockIndentComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
@ -16,8 +15,15 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Height = 14
|
||||
Top = 435
|
||||
Width = 82
|
||||
HelpContext = 0
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'BlockIndentLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -30,8 +36,15 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Height = 14
|
||||
Top = 462
|
||||
Width = 72
|
||||
HelpContext = 0
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'UndoLimitLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -44,26 +57,65 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Height = 14
|
||||
Top = 486
|
||||
Width = 77
|
||||
HelpContext = 0
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'TabWidthsLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object EditorOptionsGroupBox: TCheckGroup[3]
|
||||
object BracketLabel: TLabel[3]
|
||||
AnchorSideLeft.Control = BracketCombo
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideBottom.Control = BracketCombo
|
||||
AnchorSideBottom.Side = asrCenter
|
||||
Left = 106
|
||||
Height = 14
|
||||
Top = 408
|
||||
Width = 62
|
||||
HelpContext = 0
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'BracketLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object EditorOptionsGroupBox: TCheckGroup[4]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = BlockIndentComboBox
|
||||
Height = 426
|
||||
AnchorSideBottom.Control = BracketCombo
|
||||
Left = 0
|
||||
Height = 399
|
||||
Top = 0
|
||||
Width = 454
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoFill = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'EditorOptionsGroupBox'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
@ -72,17 +124,28 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ColumnLayout = clVerticalThenHorizontal
|
||||
Columns = 2
|
||||
Ctl3D = False
|
||||
OnItemClick = EditorOptionsGroupBoxItemClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object BlockIndentComboBox: TComboBox[4]
|
||||
object BlockIndentComboBox: TComboBox[5]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideBottom.Control = UndoLimitComboBox
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 432
|
||||
Width = 100
|
||||
HelpContext = 0
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Ctl3D = False
|
||||
ItemHeight = 13
|
||||
Items.Strings = (
|
||||
'1'
|
||||
@ -90,40 +153,61 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
'4'
|
||||
'8'
|
||||
)
|
||||
ItemWidth = 0
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 1
|
||||
end
|
||||
object UndoLimitComboBox: TComboBox[5]
|
||||
object UndoLimitComboBox: TComboBox[6]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideBottom.Control = TabWidthsLabel
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 459
|
||||
Width = 100
|
||||
HelpContext = 0
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Ctl3D = False
|
||||
ItemHeight = 13
|
||||
Items.Strings = (
|
||||
'32767'
|
||||
'4096'
|
||||
'512'
|
||||
)
|
||||
ItemWidth = 0
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 2
|
||||
end
|
||||
object TabWidthsComboBox: TComboBox[6]
|
||||
object TabWidthsComboBox: TComboBox[7]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 483
|
||||
Width = 100
|
||||
HelpContext = 0
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Ctl3D = False
|
||||
ItemHeight = 13
|
||||
Items.Strings = (
|
||||
'1'
|
||||
@ -131,9 +215,36 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
'4'
|
||||
'8'
|
||||
)
|
||||
ItemWidth = 0
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 3
|
||||
end
|
||||
object BracketCombo: TComboBox[8]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideBottom.Control = BlockIndentComboBox
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 405
|
||||
Width = 100
|
||||
HelpContext = 0
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Ctl3D = False
|
||||
ItemHeight = 13
|
||||
ItemWidth = 0
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
Style = csDropDownList
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
|
@ -3,53 +3,94 @@
|
||||
LazarusResources.Add('TEditorGeneralOptionsFrame','FORMDATA',[
|
||||
'TPF0'#241#26'TEditorGeneralOptionsFrame'#25'EditorGeneralOptionsFrame'#6'Hei'
|
||||
+'ght'#3#248#1#5'Width'#3#198#1#12'ClientHeight'#3#248#1#11'ClientWidth'#3#198
|
||||
+#1#8'TabOrder'#2#0#7'Visible'#8#10'DesignLeft'#3#132#0#9'DesignTop'#3#174#0#0
|
||||
+#242#2#0#6'TLabel'#16'BlockIndentLabel'#22'AnchorSideLeft.Control'#7#19'Bloc'
|
||||
+'kIndentComboBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom'
|
||||
+'.Control'#7#19'BlockIndentComboBox'#21'AnchorSideBottom.Side'#7#9'asrCenter'
|
||||
+#4'Left'#2'j'#6'Height'#2#14#3'Top'#3#179#1#5'Width'#2'R'#7'Anchors'#11#6'ak'
|
||||
+'Left'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'BlockInden'
|
||||
+'tLabel'#11'ParentColor'#8#0#0#242#2#1#6'TLabel'#14'UndoLimitLabel'#22'Ancho'
|
||||
+'rSideLeft.Control'#7#17'UndoLimitComboBox'#19'AnchorSideLeft.Side'#7#9'asrB'
|
||||
+'ottom'#24'AnchorSideBottom.Control'#7#17'UndoLimitComboBox'#21'AnchorSideBo'
|
||||
+'ttom.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Height'#2#14#3'Top'#3#206#1#5'Widt'
|
||||
+'h'#2'H'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#7
|
||||
+'Caption'#6#14'UndoLimitLabel'#11'ParentColor'#8#0#0#242#2#2#6'TLabel'#14'Ta'
|
||||
+'bWidthsLabel'#22'AnchorSideLeft.Control'#7#17'TabWidthsComboBox'#19'AnchorS'
|
||||
+'ideLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#17'TabWidthsCom'
|
||||
+'boBox'#21'AnchorSideBottom.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Height'#2#14
|
||||
+#3'Top'#3#230#1#5'Width'#2'M'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20'Borde'
|
||||
+'rSpacing.Around'#2#6#7'Caption'#6#14'TabWidthsLabel'#11'ParentColor'#8#0#0
|
||||
+#242#2#3#11'TCheckGroup'#21'EditorOptionsGroupBox'#22'AnchorSideLeft.Control'
|
||||
+#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'
|
||||
+#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Cont'
|
||||
+'rol'#7#19'BlockIndentComboBox'#6'Height'#3#170#1#5'Width'#3#198#1#5'Align'#7
|
||||
+#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'AutoFi'
|
||||
+'ll'#9#20'BorderSpacing.Bottom'#2#6#7'Caption'#6#21'EditorOptionsGroupBox'#28
|
||||
+'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C'
|
||||
+'hildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing'
|
||||
+'.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHoriz'
|
||||
+'ontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChi'
|
||||
+'lds'#18'ChildSizing.Layout'#7#29'cclTopToBottomThenLeftToRight'#27'ChildSiz'
|
||||
+'ing.ControlsPerLine'#2#1#12'ColumnLayout'#7#24'clVerticalThenHorizontal'#7
|
||||
+'Columns'#2#2#11'OnItemClick'#7#30'EditorOptionsGroupBoxItemClick'#8'TabOrde'
|
||||
+'r'#2#0#0#0#242#2#4#9'TComboBox'#19'BlockIndentComboBox'#22'AnchorSideLeft.C'
|
||||
+'ontrol'#7#5'Owner'#24'AnchorSideBottom.Control'#7#17'UndoLimitComboBox'#6'H'
|
||||
+'eight'#2#21#3'Top'#3#176#1#5'Width'#2'd'#7'Anchors'#11#6'akLeft'#8'akBottom'
|
||||
+#0#20'BorderSpacing.Bottom'#2#6#10'ItemHeight'#2#13#13'Items.Strings'#1#6#1
|
||||
+'1'#6#1'2'#6#1'4'#6#1'8'#0#8'OnChange'#7#16'ComboboxOnChange'#6'OnExit'#7#14
|
||||
+'ComboBoxOnExit'#9'OnKeyDown'#7#17'ComboboxOnKeyDown'#8'TabOrder'#2#1#0#0#242
|
||||
+#2#5#9'TComboBox'#17'UndoLimitComboBox'#22'AnchorSideLeft.Control'#7#5'Owner'
|
||||
+#24'AnchorSideBottom.Control'#7#14'TabWidthsLabel'#6'Height'#2#21#3'Top'#3
|
||||
+#203#1#5'Width'#2'd'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#17'BorderSpacing.'
|
||||
+'Top'#2#6#20'BorderSpacing.Bottom'#2#6#10'ItemHeight'#2#13#13'Items.Strings'
|
||||
+#1#6#5'32767'#6#4'4096'#6#3'512'#0#8'OnChange'#7#16'ComboboxOnChange'#6'OnEx'
|
||||
+'it'#7#14'ComboBoxOnExit'#9'OnKeyDown'#7#17'ComboboxOnKeyDown'#8'TabOrder'#2
|
||||
+#2#0#0#242#2#6#9'TComboBox'#17'TabWidthsComboBox'#22'AnchorSideLeft.Control'
|
||||
+#7#5'Owner'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'
|
||||
+#7#9'asrBottom'#6'Height'#2#21#3'Top'#3#227#1#5'Width'#2'd'#7'Anchors'#11#6
|
||||
+'akLeft'#8'akBottom'#0#17'BorderSpacing.Top'#2#6#10'ItemHeight'#2#13#13'Item'
|
||||
+'s.Strings'#1#6#1'1'#6#1'2'#6#1'4'#6#1'8'#0#8'OnChange'#7#16'ComboboxOnChang'
|
||||
+'e'#6'OnExit'#7#14'ComboBoxOnExit'#9'OnKeyDown'#7#17'ComboboxOnKeyDown'#8'Ta'
|
||||
+'bOrder'#2#3#0#0#0
|
||||
+#1#7'Visible'#8#10'DesignLeft'#3#147#1#9'DesignTop'#3#8#1#0#242#2#0#6'TLabel'
|
||||
+#16'BlockIndentLabel'#22'AnchorSideLeft.Control'#7#19'BlockIndentComboBox'#19
|
||||
+'AnchorSideLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#19'Block'
|
||||
+'IndentComboBox'#21'AnchorSideBottom.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Hei'
|
||||
+'ght'#2#14#3'Top'#3#179#1#5'Width'#2'R'#11'HelpContext'#2#0#7'Anchors'#11#6
|
||||
+'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0
|
||||
+#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.A'
|
||||
+'round'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacin'
|
||||
+'g.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#16'BlockIndentLabel'#11'Pare'
|
||||
+'ntColor'#8#0#0#242#2#1#6'TLabel'#14'UndoLimitLabel'#22'AnchorSideLeft.Contr'
|
||||
+'ol'#7#17'UndoLimitComboBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#24'Ancho'
|
||||
+'rSideBottom.Control'#7#17'UndoLimitComboBox'#21'AnchorSideBottom.Side'#7#9
|
||||
+'asrCenter'#4'Left'#2'j'#6'Height'#2#14#3'Top'#3#206#1#5'Width'#2'H'#11'Help'
|
||||
+'Context'#2#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2
|
||||
+#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bo'
|
||||
+'ttom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7
|
||||
+#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#14
|
||||
+'UndoLimitLabel'#11'ParentColor'#8#0#0#242#2#2#6'TLabel'#14'TabWidthsLabel'
|
||||
+#22'AnchorSideLeft.Control'#7#17'TabWidthsComboBox'#19'AnchorSideLeft.Side'#7
|
||||
+#9'asrBottom'#24'AnchorSideBottom.Control'#7#17'TabWidthsComboBox'#21'Anchor'
|
||||
+'SideBottom.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Height'#2#14#3'Top'#3#230#1#5
|
||||
+'Width'#2'M'#11'HelpContext'#2#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#18'Bo'
|
||||
+'rderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0
|
||||
+#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.Ce'
|
||||
+'llAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'cca'
|
||||
+'Fill'#7'Caption'#6#14'TabWidthsLabel'#11'ParentColor'#8#0#0#242#2#3#6'TLabe'
|
||||
+'l'#12'BracketLabel'#22'AnchorSideLeft.Control'#7#12'BracketCombo'#19'Anchor'
|
||||
+'SideLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#12'BracketComb'
|
||||
+'o'#21'AnchorSideBottom.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Height'#2#14#3'T'
|
||||
+'op'#3#152#1#5'Width'#2'>'#11'HelpContext'#2#0#7'Anchors'#11#6'akLeft'#8'akB'
|
||||
+'ottom'#0#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpac'
|
||||
+'ing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!B'
|
||||
+'orderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVe'
|
||||
+'rtical'#7#7'ccaFill'#7'Caption'#6#12'BracketLabel'#11'ParentColor'#8#0#0#242
|
||||
+#2#4#11'TCheckGroup'#21'EditorOptionsGroupBox'#22'AnchorSideLeft.Control'#7#5
|
||||
+'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23'AnchorSideRight.Control'#7#5
|
||||
+'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'
|
||||
+#7#12'BracketCombo'#4'Left'#2#0#6'Height'#3#143#1#3'Top'#2#0#5'Width'#3#198#1
|
||||
+#11'HelpContext'#2#0#5'Align'#7#5'alTop'#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#8'akBottom'#0#8'AutoFill'#9#18'BorderSpacing.Left'#2#0#17'BorderSp'
|
||||
+'acing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#6#20
|
||||
+'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'
|
||||
+#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#21'EditorOpti'
|
||||
+'onsGroupBox'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomS'
|
||||
+'pacing'#2#6#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSp'
|
||||
+'acing'#2#0#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'
|
||||
+#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizi'
|
||||
+'ng.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7
|
||||
+#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclTopToBottomThenLeftToRigh'
|
||||
+'t'#27'ChildSizing.ControlsPerLine'#2#1#12'ColumnLayout'#7#24'clVerticalThen'
|
||||
+'Horizontal'#7'Columns'#2#2#5'Ctl3D'#8#11'OnItemClick'#7#30'EditorOptionsGro'
|
||||
+'upBoxItemClick'#8'TabOrder'#2#0#0#0#242#2#5#9'TComboBox'#19'BlockIndentComb'
|
||||
+'oBox'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBottom.Control'#7
|
||||
+#17'UndoLimitComboBox'#4'Left'#2#0#6'Height'#2#21#3'Top'#3#176#1#5'Width'#2
|
||||
+'d'#11'HelpContext'#2#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#12'AutoComplet'
|
||||
+'e'#8#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.'
|
||||
+'Right'#2#0#20'BorderSpacing.Bottom'#2#6#20'BorderSpacing.Around'#2#0'!Borde'
|
||||
+'rSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertic'
|
||||
+'al'#7#7'ccaFill'#5'Ctl3D'#8#10'ItemHeight'#2#13#13'Items.Strings'#1#6#1'1'#6
|
||||
+#1'2'#6#1'4'#6#1'8'#0#9'ItemWidth'#2#0#8'OnChange'#7#16'ComboboxOnChange'#6
|
||||
+'OnExit'#7#14'ComboBoxOnExit'#9'OnKeyDown'#7#17'ComboboxOnKeyDown'#8'TabOrde'
|
||||
+'r'#2#1#0#0#242#2#6#9'TComboBox'#17'UndoLimitComboBox'#22'AnchorSideLeft.Con'
|
||||
,'trol'#7#5'Owner'#24'AnchorSideBottom.Control'#7#14'TabWidthsLabel'#4'Left'#2
|
||||
+#0#6'Height'#2#21#3'Top'#3#203#1#5'Width'#2'd'#11'HelpContext'#2#0#7'Anchors'
|
||||
+#11#6'akLeft'#8'akBottom'#0#12'AutoComplete'#8#18'BorderSpacing.Left'#2#0#17
|
||||
+'BorderSpacing.Top'#2#6#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'
|
||||
+#2#6#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'cc'
|
||||
+'aFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#5'Ctl3D'#8#10'ItemH'
|
||||
+'eight'#2#13#13'Items.Strings'#1#6#5'32767'#6#4'4096'#6#3'512'#0#9'ItemWidth'
|
||||
+#2#0#8'OnChange'#7#16'ComboboxOnChange'#6'OnExit'#7#14'ComboBoxOnExit'#9'OnK'
|
||||
+'eyDown'#7#17'ComboboxOnKeyDown'#8'TabOrder'#2#2#0#0#242#2#7#9'TComboBox'#17
|
||||
+'TabWidthsComboBox'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBotto'
|
||||
+'m.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6
|
||||
+'Height'#2#21#3'Top'#3#227#1#5'Width'#2'd'#11'HelpContext'#2#0#7'Anchors'#11
|
||||
+#6'akLeft'#8'akBottom'#0#12'AutoComplete'#8#18'BorderSpacing.Left'#2#0#17'Bo'
|
||||
+'rderSpacing.Top'#2#6#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2
|
||||
+#0#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'ccaF'
|
||||
+'ill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#5'Ctl3D'#8#10'ItemHei'
|
||||
+'ght'#2#13#13'Items.Strings'#1#6#1'1'#6#1'2'#6#1'4'#6#1'8'#0#9'ItemWidth'#2#0
|
||||
+#8'OnChange'#7#16'ComboboxOnChange'#6'OnExit'#7#14'ComboBoxOnExit'#9'OnKeyDo'
|
||||
+'wn'#7#17'ComboboxOnKeyDown'#8'TabOrder'#2#3#0#0#242#2#8#9'TComboBox'#12'Bra'
|
||||
+'cketCombo'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBottom.Contro'
|
||||
+'l'#7#19'BlockIndentComboBox'#4'Left'#2#0#6'Height'#2#21#3'Top'#3#149#1#5'Wi'
|
||||
+'dth'#2'd'#11'HelpContext'#2#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#12'Auto'
|
||||
+'Complete'#8#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderS'
|
||||
+'pacing.Right'#2#0#20'BorderSpacing.Bottom'#2#6#20'BorderSpacing.Around'#2#0
|
||||
+'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlign'
|
||||
+'Vertical'#7#7'ccaFill'#5'Ctl3D'#8#10'ItemHeight'#2#13#9'ItemWidth'#2#0#8'On'
|
||||
+'Change'#7#16'ComboboxOnChange'#6'OnExit'#7#14'ComboBoxOnExit'#9'OnKeyDown'#7
|
||||
+#17'ComboboxOnKeyDown'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#4#0#0#0
|
||||
]);
|
||||
|
@ -26,7 +26,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Graphics, LCLProc, LCLType,
|
||||
StdCtrls, SynEdit, Controls, ExtCtrls,
|
||||
StdCtrls, SynEdit, SynEditMarkupBracket, Controls, ExtCtrls,
|
||||
EditorOptions, LazarusIDEStrConsts, IDEProcs, IDEOptionsIntf;
|
||||
|
||||
type
|
||||
@ -36,6 +36,8 @@ type
|
||||
TEditorGeneralOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
BlockIndentComboBox: TComboBox;
|
||||
BlockIndentLabel: TLabel;
|
||||
BracketLabel: TLabel;
|
||||
BracketCombo: TComboBox;
|
||||
EditorOptionsGroupBox: TCheckGroup;
|
||||
TabWidthsComboBox: TComboBox;
|
||||
TabWidthsLabel: TLabel;
|
||||
@ -77,7 +79,6 @@ begin
|
||||
Items.Add(dlgAltSetClMode);
|
||||
Items.Add(dlgAutoIdent);
|
||||
// visual effects
|
||||
Items.Add(dlgBracHighlight);
|
||||
Items.Add(dlgShowGutterHints);
|
||||
//Items.Add(dlgShowScrollHint);
|
||||
Items.Add(lisShowSpecialCharacters);
|
||||
@ -113,6 +114,13 @@ begin
|
||||
Items.Add(dlgFindTextatCursor);
|
||||
Items.Add(dlgCopyWordAtCursorOnCopyNone);
|
||||
end;
|
||||
|
||||
BracketCombo.Items.Add(dlgNoBracketHighlight);
|
||||
BracketCombo.Items.Add(dlgHighlightLeftOfCursor);
|
||||
BracketCombo.Items.Add(dlgHighlightRightOfCursor);
|
||||
BracketCombo.Items.Add(gldHighlightBothSidesOfCursor);
|
||||
|
||||
BracketLabel.Caption := dlgBracketHighlight;
|
||||
BlockIndentLabel.Caption := dlgBlockIndent;
|
||||
UndoLimitLabel.Caption := dlgUndoLimit;
|
||||
TabWidthsLabel.Caption := dlgTabWidths;
|
||||
@ -128,7 +136,6 @@ begin
|
||||
begin
|
||||
Checked[Items.IndexOf(dlgAltSetClMode)] := eoAltSetsColumnMode in SynEditOptions;
|
||||
Checked[Items.IndexOf(dlgAutoIdent)] := eoAutoIndent in SynEditOptions;
|
||||
Checked[Items.IndexOf(dlgBracHighlight)] := eoBracketHighlight in SynEditOptions;
|
||||
Checked[Items.IndexOf(dlgDragDropEd)] := eoDragDropEditing in SynEditOptions;
|
||||
Checked[Items.IndexOf(dlgDropFiles)] := eoDropFiles in SynEditOptions;
|
||||
Checked[Items.IndexOf(dlgGroupUndo)] := eoGroupUndo in SynEditOptions;
|
||||
@ -158,6 +165,11 @@ begin
|
||||
Checked[Items.IndexOf(dlgCopyWordAtCursorOnCopyNone)] := CopyWordAtCursorOnCopyNone;
|
||||
end;
|
||||
|
||||
if eoBracketHighlight in SynEditOptions then
|
||||
BracketCombo.ItemIndex := Ord(BracketHighlightStyle) + 1
|
||||
else
|
||||
BracketCombo.ItemIndex := 0;
|
||||
|
||||
SetComboBoxText(BlockIndentComboBox, IntToStr(BlockIndent));
|
||||
SetComboBoxText(UndoLimitComboBox, IntToStr(UndoLimit));
|
||||
SetComboBoxText(TabWidthsComboBox, IntToStr(TabWidth));
|
||||
@ -199,7 +211,6 @@ begin
|
||||
begin
|
||||
UpdateOption(dlgAltSetClMode, eoAltSetsColumnMode);
|
||||
UpdateOption(dlgAutoIdent, eoAutoIndent);
|
||||
UpdateOption(dlgBracHighlight,eoBracketHighlight);
|
||||
UpdateOption(dlgDoubleClickLine, eoDoubleClickSelectsLine);
|
||||
UpdateOption(dlgDragDropEd, eoDragDropEditing);
|
||||
UpdateOption(dlgDropFiles, eoDropFiles);
|
||||
@ -230,6 +241,20 @@ begin
|
||||
//UseSyntaxHighlight := CheckGroupItemChecked(EditorOptionsGroupBox, dlgUseSyntaxHighlight);
|
||||
CtrlMouseLinks := CheckGroupItemChecked(EditorOptionsGroupBox, dlgMouseLinks);
|
||||
|
||||
if BracketCombo.ItemIndex = 0 then
|
||||
TEditorOptions(AOptions).SynEditOptions := TEditorOptions(AOptions).SynEditOptions - [eoBracketHighlight]
|
||||
else
|
||||
begin
|
||||
TEditorOptions(AOptions).SynEditOptions := TEditorOptions(AOptions).SynEditOptions + [eoBracketHighlight];
|
||||
TEditorOptions(AOptions).BracketHighlightStyle := TSynEditBracketHighlightStyle(BracketCombo.ItemIndex - 1);
|
||||
end;
|
||||
|
||||
if eoBracketHighlight in SynEditOptions then
|
||||
BracketCombo.ItemIndex := Ord(BracketHighlightStyle) + 1
|
||||
else
|
||||
BracketCombo.ItemIndex := 0;
|
||||
|
||||
|
||||
i := StrToIntDef(UndoLimitComboBox.Text, 32767);
|
||||
if i < 1 then
|
||||
i := 1;
|
||||
@ -301,7 +326,6 @@ procedure TEditorGeneralOptionsFrame.EditorOptionsGroupBoxItemClick(
|
||||
begin
|
||||
SetOption(dlgAltSetClMode, eoAltSetsColumnMode);
|
||||
SetOption(dlgAutoIdent, eoAutoIndent);
|
||||
SetOption(dlgBracHighlight,eoBracketHighlight);
|
||||
SetOption(dlgDoubleClickLine, eoDoubleClickSelectsLine);
|
||||
SetOption(dlgDragDropEd, eoDragDropEditing);
|
||||
SetOption(dlgDropFiles, eoDropFiles);
|
||||
@ -361,6 +385,21 @@ begin
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a] <> nil then
|
||||
PreviewEdits[a].TabWidth := NewVal;
|
||||
end
|
||||
else
|
||||
if Sender = BracketCombo then
|
||||
begin
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a] <> nil then
|
||||
begin
|
||||
if BracketCombo.ItemIndex = 0 then
|
||||
PreviewEdits[a].Options := PreviewEdits[a].Options - [eoBracketHighlight]
|
||||
else
|
||||
begin
|
||||
PreviewEdits[a].Options := PreviewEdits[a].Options + [eoBracketHighlight];
|
||||
PreviewEdits[a].BracketHighlightStyle := TSynEditBracketHighlightStyle(BracketCombo.ItemIndex - 1);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -1101,7 +1101,6 @@ resourcestring
|
||||
dlgAltSetClMode = 'Alt-Key sets column mode';
|
||||
dlgAlwaysVisibleCursor = 'Always visible cursor';
|
||||
dlgAutoIdent = 'Auto indent';
|
||||
dlgBracHighlight = 'Bracket highlighting';
|
||||
dlgDragDropEd = 'Drag Drop editing';
|
||||
dlgDropFiles = 'Drop files';
|
||||
dlgGroupUndo = 'Group Undo';
|
||||
@ -1129,6 +1128,11 @@ resourcestring
|
||||
dlgUseCodeFolding = 'Code folding';
|
||||
dlgCopyWordAtCursorOnCopyNone = 'Copy word on copy none';
|
||||
dlgHomeKeyJumpsToNearestStart = 'Home key jumps to nearest start';
|
||||
dlgBracketHighlight = 'Bracket highlight style';
|
||||
dlgNoBracketHighlight = 'No Highlight';
|
||||
dlgHighlightLeftOfCursor = 'Left Of Cursor';
|
||||
dlgHighlightRightOfCursor = 'Right Of Cursor';
|
||||
gldHighlightBothSidesOfCursor = 'On Both Sides';
|
||||
dlgBlockIndent = 'Block indent';
|
||||
dlgUndoLimit = 'Undo limit';
|
||||
dlgTabWidths = 'Tab widths';
|
||||
|
Loading…
Reference in New Issue
Block a user