mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 09:28:07 +02:00
IDE, EditorOptions: Rearranged tab and indent options
git-svn-id: trunk@39589 -
This commit is contained in:
parent
2f0a0ecdc6
commit
9c8b6ead71
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -4761,6 +4761,8 @@ ide/frames/editor_general_misc_options.lfm svneol=native#text/plain
|
||||
ide/frames/editor_general_misc_options.pas svneol=native#text/pascal
|
||||
ide/frames/editor_general_options.lfm svneol=native#text/plain
|
||||
ide/frames/editor_general_options.pas svneol=native#text/pascal
|
||||
ide/frames/editor_indent_options.lfm svneol=native#text/pascal
|
||||
ide/frames/editor_indent_options.pas svneol=native#text/pascal
|
||||
ide/frames/editor_keymapping_options.lfm svneol=native#text/plain
|
||||
ide/frames/editor_keymapping_options.pas svneol=native#text/pascal
|
||||
ide/frames/editor_markup_options.lfm svneol=native#text/plain
|
||||
|
@ -1,111 +1,28 @@
|
||||
inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
object EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Left = 0
|
||||
Height = 442
|
||||
Top = 0
|
||||
Width = 434
|
||||
ClientHeight = 442
|
||||
ClientWidth = 434
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
DesignLeft = 295
|
||||
DesignTop = 212
|
||||
object BlockIndentLabel: TLabel[0]
|
||||
AnchorSideLeft.Control = BlockIndentComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BlockIndentComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 112
|
||||
Height = 16
|
||||
Top = 252
|
||||
Width = 92
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'BlockIndentLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object TabWidthsLabel: TLabel[1]
|
||||
AnchorSideLeft.Control = TabWidthsComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TabWidthsComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 324
|
||||
Height = 16
|
||||
Top = 154
|
||||
Width = 86
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'TabWidthsLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object UndoLimitLabel: TLabel[2]
|
||||
object UndoLimitLabel: TLabel
|
||||
AnchorSideLeft.Control = UndoLimitComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = UndoLimitComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 324
|
||||
Height = 16
|
||||
Top = 24
|
||||
Width = 85
|
||||
Height = 15
|
||||
Top = 25
|
||||
Width = 84
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'UndoLimitLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object BlockIndentTypeLabel: TLabel[3]
|
||||
AnchorSideLeft.Control = BlockIndentTypeComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BlockIndentTypeComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 324
|
||||
Height = 16
|
||||
Top = 192
|
||||
Width = 118
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'BlockIndentTypeLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object BlockIndentComboBox: TComboBox[4]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TabIndentBlocksCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = TabWidthsComboBox
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 249
|
||||
Width = 100
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'0'
|
||||
'1'
|
||||
'2'
|
||||
'4'
|
||||
'8'
|
||||
)
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 0
|
||||
end
|
||||
object TabWidthsComboBox: TComboBox[5]
|
||||
AnchorSideLeft.Control = UndoLimitComboBox
|
||||
AnchorSideTop.Control = IndentsTabsGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 218
|
||||
Height = 23
|
||||
Top = 151
|
||||
Width = 100
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'1'
|
||||
'2'
|
||||
'4'
|
||||
'8'
|
||||
)
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 1
|
||||
end
|
||||
object UndoLimitComboBox: TComboBox[6]
|
||||
object UndoLimitComboBox: TComboBox
|
||||
AnchorSideLeft.Control = CenterLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = UndoGroupDivider
|
||||
@ -121,12 +38,9 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
'4096'
|
||||
'512'
|
||||
)
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 2
|
||||
TabOrder = 0
|
||||
end
|
||||
object GroupUndoCheckBox: TCheckBox[7]
|
||||
object GroupUndoCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = UndoAfterSaveCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -137,9 +51,9 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'GroupUndoCheckBox'
|
||||
OnChange = GroupUndoCheckBoxChange
|
||||
TabOrder = 3
|
||||
TabOrder = 1
|
||||
end
|
||||
object UndoAfterSaveCheckBox: TCheckBox[8]
|
||||
object UndoAfterSaveCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = UndoGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -150,9 +64,9 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'UndoAfterSaveCheckBox'
|
||||
TabOrder = 4
|
||||
TabOrder = 2
|
||||
end
|
||||
object ScrollPastEndFileCheckBox: TCheckBox[9]
|
||||
object ScrollPastEndFileCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ScrollGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -164,22 +78,22 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'ScrollPastEndFileCheckBox'
|
||||
OnChange = ScrollPastEndFileCheckBoxChange
|
||||
TabOrder = 5
|
||||
TabOrder = 3
|
||||
end
|
||||
object ScrollPastEndLineCheckBox: TCheckBox[10]
|
||||
object ScrollPastEndLineCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = AlwaysVisibleCursorCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 356
|
||||
Top = 208
|
||||
Width = 165
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ScrollPastEndLineCheckBox'
|
||||
OnChange = ScrollPastEndLineCheckBoxChange
|
||||
TabOrder = 6
|
||||
TabOrder = 4
|
||||
end
|
||||
object ScrollByOneLessCheckBox: TCheckBox[11]
|
||||
object ScrollByOneLessCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = UndoLimitComboBox
|
||||
AnchorSideTop.Control = ScrollGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -190,9 +104,9 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'ScrollByOneLessCheckBox'
|
||||
OnChange = ScrollByOneLessCheckBoxChange
|
||||
TabOrder = 7
|
||||
TabOrder = 5
|
||||
end
|
||||
object HalfPageScrollCheckBox: TCheckBox[12]
|
||||
object HalfPageScrollCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ScrollPastEndFileCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -203,210 +117,122 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'HalfPageScrollCheckBox'
|
||||
OnChange = HalfPageScrollCheckBoxChange
|
||||
TabOrder = 8
|
||||
TabOrder = 6
|
||||
end
|
||||
object AutoIndentCheckBox: TCheckBox[13]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = SmartTabsCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 189
|
||||
Width = 132
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AutoIndentCheckBox'
|
||||
OnChange = AutoIndentCheckBoxChange
|
||||
TabOrder = 9
|
||||
end
|
||||
object TabIndentBlocksCheckBox: TCheckBox[14]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = AutoIndentLink
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 227
|
||||
Width = 160
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'TabIndentBlocksCheckBox'
|
||||
OnChange = TabIndentBlocksCheckBoxChange
|
||||
TabOrder = 10
|
||||
end
|
||||
object SmartTabsCheckBox: TCheckBox[15]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TabsToSpacesCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 170
|
||||
Width = 128
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'SmartTabsCheckBox'
|
||||
OnChange = SmartTabsCheckBoxChange
|
||||
TabOrder = 11
|
||||
end
|
||||
object TabsToSpacesCheckBox: TCheckBox[16]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = IndentsTabsGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 151
|
||||
Width = 147
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'TabsToSpacesCheckBox'
|
||||
OnChange = TabsToSpacesCheckBoxChange
|
||||
TabOrder = 12
|
||||
end
|
||||
object KeepCursorXCheckBox: TCheckBox[17]
|
||||
object KeepCursorXCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = CaretGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 299
|
||||
Top = 151
|
||||
Width = 140
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'KeepCursorXCheckBox'
|
||||
OnChange = KeepCursorXCheckBoxChange
|
||||
TabOrder = 13
|
||||
TabOrder = 7
|
||||
end
|
||||
object PersistentCursorCheckBox: TCheckBox[18]
|
||||
object PersistentCursorCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = KeepCursorXCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 318
|
||||
Top = 170
|
||||
Width = 158
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'PersistentCursorCheckBox'
|
||||
OnChange = PersistentCursorCheckBoxChange
|
||||
TabOrder = 14
|
||||
TabOrder = 8
|
||||
end
|
||||
object AlwaysVisibleCursorCheckBox: TCheckBox[19]
|
||||
object AlwaysVisibleCursorCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = PersistentCursorCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 337
|
||||
Top = 189
|
||||
Width = 178
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AlwaysVisibleCursorCheckBox'
|
||||
OnChange = AlwaysVisibleCursorCheckBoxChange
|
||||
TabOrder = 15
|
||||
TabOrder = 9
|
||||
end
|
||||
object CursorSkipsSelectionCheckBox: TCheckBox[20]
|
||||
object CursorSkipsSelectionCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = UndoLimitComboBox
|
||||
AnchorSideTop.Control = CaretGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 218
|
||||
Height = 19
|
||||
Top = 299
|
||||
Top = 151
|
||||
Width = 182
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'CursorSkipsSelectionCheckBox'
|
||||
OnChange = CursorSkipsSelectionCheckBoxChange
|
||||
TabOrder = 16
|
||||
TabOrder = 10
|
||||
end
|
||||
object HomeKeyJumpsToNearestStartCheckBox: TCheckBox[21]
|
||||
object HomeKeyJumpsToNearestStartCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = CursorSkipsSelectionCheckBox
|
||||
AnchorSideTop.Control = AlwaysVisibleCursorCheckBox
|
||||
Left = 218
|
||||
Height = 19
|
||||
Top = 337
|
||||
Top = 189
|
||||
Width = 236
|
||||
Caption = 'HomeKeyJumpsToNearestStartCheckBox'
|
||||
OnChange = HomeKeyJumpsToNearestStartCheckBoxChange
|
||||
TabOrder = 17
|
||||
TabOrder = 11
|
||||
end
|
||||
object EndKeyJumpsToNearestStartCheckBox: TCheckBox[22]
|
||||
object EndKeyJumpsToNearestStartCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = HomeKeyJumpsToNearestStartCheckBox
|
||||
AnchorSideTop.Control = ScrollPastEndLineCheckBox
|
||||
Left = 218
|
||||
Height = 19
|
||||
Top = 356
|
||||
Top = 208
|
||||
Width = 223
|
||||
Caption = 'EndKeyJumpsToNearestStartCheckBox'
|
||||
OnChange = EndKeyJumpsToNearestStartCheckBoxChange
|
||||
TabOrder = 18
|
||||
TabOrder = 12
|
||||
end
|
||||
object BlockIndentTypeComboBox: TComboBox[23]
|
||||
AnchorSideLeft.Control = UndoLimitComboBox
|
||||
AnchorSideTop.Control = AutoIndentCheckBox
|
||||
AnchorSideBottom.Control = TabWidthsComboBox
|
||||
Left = 218
|
||||
Height = 23
|
||||
Top = 189
|
||||
Width = 100
|
||||
ItemHeight = 15
|
||||
ItemWidth = 200
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
Style = csDropDownList
|
||||
TabOrder = 19
|
||||
end
|
||||
object PersistentBlockCheckBox: TCheckBox[24]
|
||||
object PersistentBlockCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = BlockGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 402
|
||||
Top = 254
|
||||
Width = 152
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'PersistentBlockCheckBox'
|
||||
OnChange = PersistentBlockCheckBoxChange
|
||||
TabOrder = 20
|
||||
TabOrder = 13
|
||||
end
|
||||
object OverwriteBlockCheckBox: TCheckBox[25]
|
||||
object OverwriteBlockCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = UndoLimitComboBox
|
||||
AnchorSideTop.Control = BlockGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 218
|
||||
Height = 19
|
||||
Top = 402
|
||||
Top = 254
|
||||
Width = 152
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'OverwriteBlockCheckBox'
|
||||
OnChange = OverwriteBlockCheckBoxChange
|
||||
TabOrder = 21
|
||||
TabOrder = 14
|
||||
end
|
||||
object CursorSkipsTabCheckBox: TCheckBox[26]
|
||||
object CursorSkipsTabCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = CursorSkipsSelectionCheckBox
|
||||
AnchorSideTop.Control = PersistentCursorCheckBox
|
||||
Left = 218
|
||||
Height = 19
|
||||
Top = 318
|
||||
Top = 170
|
||||
Width = 154
|
||||
Caption = 'CursorSkipsTabCheckBox'
|
||||
OnChange = CursorSkipsTabCheckBoxChange
|
||||
TabOrder = 22
|
||||
TabOrder = 15
|
||||
end
|
||||
object AutoIndentLink: TLabel[27]
|
||||
AnchorSideLeft.Control = AutoIndentCheckBox
|
||||
AnchorSideTop.Control = AutoIndentCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Cursor = crHandPoint
|
||||
Left = 24
|
||||
Height = 16
|
||||
Top = 208
|
||||
Width = 83
|
||||
BorderSpacing.Left = 18
|
||||
Caption = 'AutoIndentLink'
|
||||
Font.Color = clBlue
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnClick = AutoIndentLinkClick
|
||||
OnMouseEnter = AutoIndentLinkMouseEnter
|
||||
OnMouseLeave = AutoIndentLinkMouseLeave
|
||||
end
|
||||
object CenterLabel: TLabel[28]
|
||||
object CenterLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
Left = 217
|
||||
@ -415,7 +241,7 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Width = 1
|
||||
ParentColor = False
|
||||
end
|
||||
object UndoGroupDivider: TDividerBevel[29]
|
||||
object UndoGroupDivider: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
@ -430,7 +256,7 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object ScrollGroupDivider: TDividerBevel[30]
|
||||
object ScrollGroupDivider: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = GroupUndoCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -447,7 +273,7 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object IndentsTabsGroupDivider: TDividerBevel[31]
|
||||
object CaretGroupDivider: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = HalfPageScrollCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -457,23 +283,6 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Height = 15
|
||||
Top = 130
|
||||
Width = 434
|
||||
Caption = 'IndentsTabsGroupDivider'
|
||||
Autosize = True
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object CaretGroupDivider: TDividerBevel[32]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = BlockIndentComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 278
|
||||
Width = 434
|
||||
Caption = 'CaretGroupDivider'
|
||||
Autosize = True
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -481,7 +290,7 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BlockGroupDivider: TDividerBevel[33]
|
||||
object BlockGroupDivider: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ScrollPastEndLineCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -489,7 +298,7 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 381
|
||||
Top = 233
|
||||
Width = 434
|
||||
Caption = 'BlockGroupDivider'
|
||||
Autosize = True
|
||||
@ -498,7 +307,7 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object chkScrollHint: TCheckBox[34]
|
||||
object chkScrollHint: TCheckBox
|
||||
AnchorSideLeft.Control = ScrollByOneLessCheckBox
|
||||
AnchorSideTop.Control = ScrollByOneLessCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -507,40 +316,6 @@ inherited EditorGeneralOptionsFrame: TEditorGeneralOptionsFrame
|
||||
Top = 105
|
||||
Width = 75
|
||||
Caption = 'Scroll Hint'
|
||||
TabOrder = 23
|
||||
end
|
||||
object BlockTabIndentComboBox: TComboBox[35]
|
||||
AnchorSideLeft.Control = UndoLimitComboBox
|
||||
AnchorSideTop.Control = TabIndentBlocksCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = TabWidthsComboBox
|
||||
Left = 218
|
||||
Height = 23
|
||||
Top = 249
|
||||
Width = 100
|
||||
BorderSpacing.Top = 3
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'0'
|
||||
'1'
|
||||
'2'
|
||||
)
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 24
|
||||
end
|
||||
object BlockTabIndentLabel: TLabel[36]
|
||||
AnchorSideLeft.Control = BlockTabIndentComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BlockIndentComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 324
|
||||
Height = 16
|
||||
Top = 252
|
||||
Width = 92
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'BlockIndentLabel'
|
||||
ParentColor = False
|
||||
TabOrder = 16
|
||||
end
|
||||
end
|
||||
|
@ -34,22 +34,13 @@ type
|
||||
{ TEditorGeneralOptionsFrame }
|
||||
|
||||
TEditorGeneralOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
BlockIndentComboBox: TComboBox;
|
||||
BlockTabIndentComboBox: TComboBox;
|
||||
BlockTabIndentLabel: TLabel;
|
||||
BlockIndentTypeComboBox: TComboBox;
|
||||
BlockIndentLabel: TLabel;
|
||||
AutoIndentCheckBox: TCheckBox;
|
||||
BlockIndentTypeLabel: TLabel;
|
||||
CursorSkipsTabCheckBox: TCheckBox;
|
||||
CaretGroupDivider: TDividerBevel;
|
||||
BlockGroupDivider: TDividerBevel;
|
||||
IndentsTabsGroupDivider: TDividerBevel;
|
||||
ScrollGroupDivider: TDividerBevel;
|
||||
UndoGroupDivider: TDividerBevel;
|
||||
EndKeyJumpsToNearestStartCheckBox: TCheckBox;
|
||||
KeepCursorXCheckBox: TCheckBox;
|
||||
AutoIndentLink: TLabel;
|
||||
CenterLabel:TLabel;
|
||||
OverwriteBlockCheckBox: TCheckBox;
|
||||
PersistentCursorCheckBox: TCheckBox;
|
||||
@ -57,30 +48,17 @@ type
|
||||
CursorSkipsSelectionCheckBox: TCheckBox;
|
||||
HomeKeyJumpsToNearestStartCheckBox: TCheckBox;
|
||||
PersistentBlockCheckBox: TCheckBox;
|
||||
TabIndentBlocksCheckBox: TCheckBox;
|
||||
SmartTabsCheckBox: TCheckBox;
|
||||
TabsToSpacesCheckBox: TCheckBox;
|
||||
HalfPageScrollCheckBox: TCheckBox;
|
||||
ScrollPastEndFileCheckBox: TCheckBox;
|
||||
ScrollPastEndLineCheckBox: TCheckBox;
|
||||
ScrollByOneLessCheckBox: TCheckBox;
|
||||
UndoAfterSaveCheckBox: TCheckBox;
|
||||
GroupUndoCheckBox: TCheckBox;
|
||||
TabWidthsComboBox: TComboBox;
|
||||
TabWidthsLabel: TLabel;
|
||||
UndoLimitComboBox: TComboBox;
|
||||
UndoLimitLabel: TLabel;
|
||||
chkScrollHint: TCheckBox;
|
||||
procedure AlwaysVisibleCursorCheckBoxChange(Sender: TObject);
|
||||
procedure AutoIndentCheckBoxChange(Sender: TObject);
|
||||
procedure AutoIndentLinkClick(Sender: TObject);
|
||||
procedure AutoIndentLinkMouseEnter(Sender: TObject);
|
||||
procedure AutoIndentLinkMouseLeave(Sender: TObject);
|
||||
procedure ComboboxOnChange(Sender: TObject);
|
||||
procedure ComboboxOnKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure CursorSkipsSelectionCheckBoxChange(Sender: TObject);
|
||||
procedure ComboBoxOnExit(Sender: TObject);
|
||||
procedure CursorSkipsTabCheckBoxChange(Sender: TObject);
|
||||
procedure EndKeyJumpsToNearestStartCheckBoxChange(Sender: TObject);
|
||||
procedure GroupUndoCheckBoxChange(Sender: TObject);
|
||||
@ -93,9 +71,6 @@ type
|
||||
procedure ScrollByOneLessCheckBoxChange(Sender: TObject);
|
||||
procedure ScrollPastEndFileCheckBoxChange(Sender: TObject);
|
||||
procedure ScrollPastEndLineCheckBoxChange(Sender: TObject);
|
||||
procedure SmartTabsCheckBoxChange(Sender: TObject);
|
||||
procedure TabIndentBlocksCheckBoxChange(Sender: TObject);
|
||||
procedure TabsToSpacesCheckBoxChange(Sender: TObject);
|
||||
private
|
||||
FDefaultBookmarkImages: TImageList;
|
||||
FDialog: TAbstractOptionsEditorDialog;
|
||||
@ -139,14 +114,6 @@ procedure TEditorGeneralOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog
|
||||
begin
|
||||
FDialog := ADialog;
|
||||
|
||||
BlockIndentLabel.Caption := dlgBlockIndent;
|
||||
BlockTabIndentLabel.Caption := dlgBlockTabIndent;
|
||||
BlockIndentTypeLabel.Caption := dlgAutoIndentType;
|
||||
BlockIndentTypeComboBox.Items.Add(dlgBlockIndentTypeSpace);
|
||||
BlockIndentTypeComboBox.Items.Add(dlgBlockIndentTypeCopy);
|
||||
BlockIndentTypeComboBox.Items.Add(dlgBlockIndentTypePos);
|
||||
TabWidthsLabel.Caption := dlgTabWidths;
|
||||
|
||||
// undo
|
||||
UndoGroupDivider.Caption := dlgUndoGroupOptions;
|
||||
UndoAfterSaveCheckBox.Caption := dlgUndoAfterSave;
|
||||
@ -161,13 +128,6 @@ begin
|
||||
ScrollPastEndLineCheckBox.Caption := dlgScrollPastEndLine;
|
||||
chkScrollHint.Caption := dlgScrollHint;
|
||||
|
||||
// indents, tabs
|
||||
IndentsTabsGroupDivider.Caption := dlgIndentsTabsGroupOptions;
|
||||
AutoIndentCheckBox.Caption := dlgAutoIndent;
|
||||
TabIndentBlocksCheckBox.Caption := dlgTabIndent;
|
||||
SmartTabsCheckBox.Caption := dlgSmartTabs;
|
||||
TabsToSpacesCheckBox.Caption := dlgTabsToSpaces;
|
||||
AutoIndentLink.Caption := dlgAutoIndentLink;
|
||||
|
||||
// caret + key navigation
|
||||
CaretGroupDivider.Caption := dlgCursorGroupOptions;
|
||||
@ -191,11 +151,6 @@ var
|
||||
begin
|
||||
with AOptions as TEditorOptions do
|
||||
begin
|
||||
SetComboBoxText(BlockIndentComboBox, IntToStr(BlockIndent), cstCaseInsensitive);
|
||||
SetComboBoxText(BlockTabIndentComboBox, IntToStr(BlockTabIndent), cstCaseInsensitive);
|
||||
SetComboBoxText(TabWidthsComboBox, IntToStr(TabWidth), cstCaseInsensitive);
|
||||
BlockIndentTypeComboBox.ItemIndex := ord(BlockIndentType);
|
||||
|
||||
// undo
|
||||
UndoAfterSaveCheckBox.Checked := UndoAfterSave;
|
||||
GroupUndoCheckBox.Checked := eoGroupUndo in SynEditOptions;
|
||||
@ -208,12 +163,6 @@ begin
|
||||
ScrollPastEndLineCheckBox.Checked := eoScrollPastEoL in SynEditOptions;
|
||||
chkScrollHint.Checked := eoShowScrollHint in SynEditOptions;
|
||||
|
||||
// tabs, indents
|
||||
AutoIndentCheckBox.Checked := eoAutoIndent in SynEditOptions;
|
||||
TabIndentBlocksCheckBox.Checked := eoTabIndent in SynEditOptions;
|
||||
SmartTabsCheckBox.Checked := eoSmartTabs in SynEditOptions;
|
||||
TabsToSpacesCheckBox.Checked := eoTabsToSpaces in SynEditOptions;
|
||||
|
||||
// cursor
|
||||
KeepCursorXCheckBox.Checked := eoKeepCaretX in SynEditOptions;
|
||||
PersistentCursorCheckBox.Checked := eoPersistentCaret in SynEditOptions;
|
||||
@ -273,35 +222,6 @@ begin
|
||||
UpdateOptionFromBool(ScrollPastEndLineCheckBox.Checked, eoScrollPastEoL);
|
||||
UpdateOptionFromBool(chkScrollHint.Checked, eoShowScrollHint);
|
||||
|
||||
// tabs, indents
|
||||
UpdateOptionFromBool(AutoIndentCheckBox.Checked, eoAutoIndent);
|
||||
UpdateOptionFromBool(TabIndentBlocksCheckBox.Checked, eoTabIndent);
|
||||
UpdateOptionFromBool(SmartTabsCheckBox.Checked, eoSmartTabs);
|
||||
UpdateOptionFromBool(TabsToSpacesCheckBox.Checked, eoTabsToSpaces);
|
||||
|
||||
i := StrToIntDef(TabWidthsComboBox.Text, 2);
|
||||
if i < 1 then
|
||||
i := 1;
|
||||
if i > 20 then
|
||||
i := 20;
|
||||
TabWidth := i;
|
||||
|
||||
i := StrToIntDef(BlockIndentComboBox.Text, 2);
|
||||
if i < 0 then
|
||||
i := 0;
|
||||
if i > 20 then
|
||||
i := 20;
|
||||
BlockIndent := i;
|
||||
|
||||
i := StrToIntDef(BlockTabIndentComboBox.Text, 0);
|
||||
if i < 0 then
|
||||
i := 0;
|
||||
if i > 20 then
|
||||
i := 20;
|
||||
BlockTabIndent := i;
|
||||
|
||||
BlockIndentType := TSynBeautifierIndentType(BlockIndentTypeComboBox.ItemIndex);
|
||||
|
||||
// cursor
|
||||
UpdateOptionFromBool(KeepCursorXCheckBox.Checked, eoKeepCaretX);
|
||||
UpdateOptionFromBool(PersistentCursorCheckBox.Checked, eoPersistentCaret);
|
||||
@ -361,89 +281,18 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.ComboboxOnChange(Sender: TObject);
|
||||
var
|
||||
ComboBox: TComboBox absolute Sender;
|
||||
begin
|
||||
if ComboBox.Items.IndexOf(ComboBox.Text) >= 0 then
|
||||
ComboBoxOnExit(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.AutoIndentCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(AutoIndentCheckBox.Checked, eoAutoIndent);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.AutoIndentLinkClick(Sender: TObject);
|
||||
begin
|
||||
FDialog.OpenEditor(GroupCodetools,CdtOptionsGeneral);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.AutoIndentLinkMouseEnter(Sender: TObject);
|
||||
begin
|
||||
(Sender as TLabel).Font.Underline := True;
|
||||
(Sender as TLabel).Font.Color := clRed;
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.AutoIndentLinkMouseLeave(Sender: TObject);
|
||||
begin
|
||||
(Sender as TLabel).Font.Underline := False;
|
||||
(Sender as TLabel).Font.Color := clBlue;
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.AlwaysVisibleCursorCheckBoxChange(
|
||||
Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(AlwaysVisibleCursorCheckBox.Checked, eoAlwaysVisibleCaret);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.ComboboxOnKeyDown(
|
||||
Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if (ssCtrl in Shift) and (Key = VK_S) then
|
||||
ComboBoxOnExit(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.CursorSkipsSelectionCheckBoxChange(
|
||||
Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(CursorSkipsSelectionCheckBox.Checked, eoCaretSkipsSelection);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.ComboBoxOnExit(Sender: TObject);
|
||||
var
|
||||
NewVal, a: Integer;
|
||||
begin
|
||||
if Sender = BlockIndentComboBox then
|
||||
begin
|
||||
NewVal := StrToIntDef(BlockIndentComboBox.Text, PreviewEdits[1].BlockIndent);
|
||||
// Todo: min/max
|
||||
SetComboBoxText(BlockIndentComboBox, IntToStr(NewVal), cstCaseInsensitive);
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a] <> nil then
|
||||
PreviewEdits[a].BlockIndent := NewVal;
|
||||
end
|
||||
else
|
||||
if Sender = BlockTabIndentComboBox then
|
||||
begin
|
||||
NewVal := StrToIntDef(BlockTabIndentComboBox.Text, PreviewEdits[1].BlockTabIndent);
|
||||
// Todo: min/max
|
||||
SetComboBoxText(BlockTabIndentComboBox, IntToStr(NewVal), cstCaseInsensitive);
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a] <> nil then
|
||||
PreviewEdits[a].BlockTabIndent := NewVal;
|
||||
end
|
||||
else
|
||||
if Sender = TabWidthsComboBox then
|
||||
begin
|
||||
NewVal := StrToIntDef(TabWidthsComboBox.Text, PreviewEdits[1].TabWidth);
|
||||
SetComboBoxText(TabWidthsComboBox, IntToStr(NewVal), cstCaseInsensitive);
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a] <> nil then
|
||||
PreviewEdits[a].TabWidth := NewVal;
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.CursorSkipsTabCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(CursorSkipsTabCheckBox.Checked, eoCaretSkipTab);
|
||||
@ -511,22 +360,6 @@ begin
|
||||
SetPreviewOption(ScrollPastEndLineCheckBox.Checked, eoScrollPastEoL);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.SmartTabsCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(SmartTabsCheckBox.Checked, eoSmartTabs);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.TabIndentBlocksCheckBoxChange(
|
||||
Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(TabIndentBlocksCheckBox.Checked, eoTabIndent);
|
||||
end;
|
||||
|
||||
procedure TEditorGeneralOptionsFrame.TabsToSpacesCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(TabsToSpacesCheckBox.Checked, eoTabsToSpaces);
|
||||
end;
|
||||
|
||||
function TEditorGeneralOptionsFrame.DefaultBookmarkImages: TImageList;
|
||||
var
|
||||
i: integer;
|
||||
|
301
ide/frames/editor_indent_options.lfm
Normal file
301
ide/frames/editor_indent_options.lfm
Normal file
@ -0,0 +1,301 @@
|
||||
object EditorIndentOptionsFrame: TEditorIndentOptionsFrame
|
||||
Left = 0
|
||||
Height = 442
|
||||
Top = 0
|
||||
Width = 434
|
||||
ClientHeight = 442
|
||||
ClientWidth = 434
|
||||
TabOrder = 0
|
||||
Visible = False
|
||||
DesignLeft = 664
|
||||
DesignTop = 211
|
||||
object BlockIndentLabel: TLabel
|
||||
AnchorSideLeft.Control = BlockIndentComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BlockIndentComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 324
|
||||
Height = 15
|
||||
Top = 137
|
||||
Width = 91
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'BlockIndentLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object TabWidthsLabel: TLabel
|
||||
AnchorSideLeft.Control = TabWidthsComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TabWidthsComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 324
|
||||
Height = 15
|
||||
Top = 31
|
||||
Width = 85
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'TabWidthsLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object AutoIndentTypeLabel: TLabel
|
||||
AnchorSideLeft.Control = BlockIndentTypeComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BlockIndentTypeComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 324
|
||||
Height = 15
|
||||
Top = 90
|
||||
Width = 114
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'AutoIndentTypeLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object BlockIndentComboBox: TComboBox
|
||||
AnchorSideTop.Control = lblBlockIndentKeys
|
||||
AnchorSideBottom.Control = TabWidthsComboBox
|
||||
Left = 218
|
||||
Height = 23
|
||||
Top = 133
|
||||
Width = 100
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'0'
|
||||
'1'
|
||||
'2'
|
||||
'4'
|
||||
'8'
|
||||
)
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 0
|
||||
end
|
||||
object TabWidthsComboBox: TComboBox
|
||||
AnchorSideTop.Control = TabsGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 218
|
||||
Height = 23
|
||||
Top = 27
|
||||
Width = 100
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'1'
|
||||
'2'
|
||||
'4'
|
||||
'8'
|
||||
)
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 1
|
||||
end
|
||||
object AutoIndentCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = IndentsGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 86
|
||||
Width = 132
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'AutoIndentCheckBox'
|
||||
OnChange = AutoIndentCheckBoxChange
|
||||
TabOrder = 2
|
||||
end
|
||||
object TabIndentBlocksCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = lblBlockIndentShortcut
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 166
|
||||
Width = 160
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'TabIndentBlocksCheckBox'
|
||||
OnChange = TabIndentBlocksCheckBoxChange
|
||||
TabOrder = 3
|
||||
end
|
||||
object SmartTabsCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TabsToSpacesCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 46
|
||||
Width = 128
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'SmartTabsCheckBox'
|
||||
OnChange = SmartTabsCheckBoxChange
|
||||
TabOrder = 4
|
||||
end
|
||||
object TabsToSpacesCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TabsGroupDivider
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 27
|
||||
Width = 147
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'TabsToSpacesCheckBox'
|
||||
OnChange = TabsToSpacesCheckBoxChange
|
||||
TabOrder = 5
|
||||
end
|
||||
object BlockIndentTypeComboBox: TComboBox
|
||||
AnchorSideTop.Control = AutoIndentCheckBox
|
||||
AnchorSideBottom.Control = TabWidthsComboBox
|
||||
Left = 218
|
||||
Height = 23
|
||||
Top = 86
|
||||
Width = 100
|
||||
ItemHeight = 15
|
||||
ItemWidth = 200
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
Style = csDropDownList
|
||||
TabOrder = 6
|
||||
end
|
||||
object AutoIndentLink: TLabel
|
||||
AnchorSideLeft.Control = AutoIndentCheckBox
|
||||
AnchorSideTop.Control = AutoIndentCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Cursor = crHandPoint
|
||||
Left = 24
|
||||
Height = 15
|
||||
Top = 105
|
||||
Width = 82
|
||||
BorderSpacing.Left = 18
|
||||
Caption = 'AutoIndentLink'
|
||||
Font.Color = clBlue
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnClick = AutoIndentLinkClick
|
||||
OnMouseEnter = AutoIndentLinkMouseEnter
|
||||
OnMouseLeave = AutoIndentLinkMouseLeave
|
||||
end
|
||||
object CenterLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideLeft.Side = asrCenter
|
||||
Left = 217
|
||||
Height = 1
|
||||
Top = -513
|
||||
Width = 1
|
||||
ParentColor = False
|
||||
end
|
||||
object TabsGroupDivider: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 6
|
||||
Width = 434
|
||||
Caption = 'TabsGroupDivider'
|
||||
Autosize = True
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object BlockTabIndentComboBox: TComboBox
|
||||
AnchorSideTop.Control = BlockIndentComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = TabWidthsComboBox
|
||||
Left = 218
|
||||
Height = 23
|
||||
Top = 159
|
||||
Width = 100
|
||||
BorderSpacing.Top = 3
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'0'
|
||||
'1'
|
||||
'2'
|
||||
)
|
||||
OnChange = ComboboxOnChange
|
||||
OnExit = ComboBoxOnExit
|
||||
OnKeyDown = ComboboxOnKeyDown
|
||||
TabOrder = 7
|
||||
end
|
||||
object BlockTabIndentLabel: TLabel
|
||||
AnchorSideLeft.Control = BlockTabIndentComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BlockTabIndentComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 324
|
||||
Height = 15
|
||||
Top = 163
|
||||
Width = 91
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'BlockIndentLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object BlockIndentLink: TLabel
|
||||
AnchorSideLeft.Control = lblBlockIndentKeys
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = lblBlockIndentKeys
|
||||
Cursor = crHandPoint
|
||||
Left = 112
|
||||
Height = 15
|
||||
Top = 130
|
||||
Width = 85
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'BlockIndentLink'
|
||||
Font.Color = clBlue
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnClick = BlockIndentLinkClick
|
||||
OnMouseEnter = AutoIndentLinkMouseEnter
|
||||
OnMouseLeave = AutoIndentLinkMouseLeave
|
||||
end
|
||||
object lblBlockIndentKeys: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = AutoIndentLink
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 130
|
||||
Width = 100
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 10
|
||||
Caption = 'lblBlockIndentKeys'
|
||||
ParentColor = False
|
||||
end
|
||||
object IndentsGroupDivider: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = SmartTabsCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 15
|
||||
Top = 71
|
||||
Width = 434
|
||||
Caption = 'IndentsGroupDivider'
|
||||
Autosize = True
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object lblBlockIndentShortcut: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = lblBlockIndentKeys
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 148
|
||||
Width = 121
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'lblBlockIndentShortcut'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
416
ide/frames/editor_indent_options.pas
Normal file
416
ide/frames/editor_indent_options.pas
Normal file
@ -0,0 +1,416 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* This source is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This code is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* General Public License for more details. *
|
||||
* *
|
||||
* A copy of the GNU General Public License is available on the World *
|
||||
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||
* obtain it by writing to the Free Software Foundation, *
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
* *
|
||||
***************************************************************************
|
||||
}
|
||||
unit editor_indent_options;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, LCLType, StdCtrls, Controls, ExtCtrls, Graphics, Forms,
|
||||
EditorOptions, LazarusIDEStrConsts, IDEProcs, KeyMapping, editor_keymapping_options,
|
||||
IDEOptionsIntf, SynEdit, SynBeautifier, SynHighlighterPas, SynEditKeyCmds, DividerBevel;
|
||||
|
||||
type
|
||||
TPreviewEditor = TSynEdit;
|
||||
{ TEditorIndentOptionsFrame }
|
||||
|
||||
TEditorIndentOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
BlockIndentLink: TLabel;
|
||||
BlockIndentComboBox: TComboBox;
|
||||
BlockTabIndentComboBox: TComboBox;
|
||||
BlockTabIndentLabel: TLabel;
|
||||
BlockIndentTypeComboBox: TComboBox;
|
||||
BlockIndentLabel: TLabel;
|
||||
AutoIndentCheckBox: TCheckBox;
|
||||
AutoIndentTypeLabel: TLabel;
|
||||
lblBlockIndentShortcut: TLabel;
|
||||
TabsGroupDivider: TDividerBevel;
|
||||
AutoIndentLink: TLabel;
|
||||
CenterLabel:TLabel;
|
||||
IndentsGroupDivider: TDividerBevel;
|
||||
lblBlockIndentKeys: TLabel;
|
||||
TabIndentBlocksCheckBox: TCheckBox;
|
||||
SmartTabsCheckBox: TCheckBox;
|
||||
TabsToSpacesCheckBox: TCheckBox;
|
||||
TabWidthsComboBox: TComboBox;
|
||||
TabWidthsLabel: TLabel;
|
||||
procedure AutoIndentCheckBoxChange(Sender: TObject);
|
||||
procedure AutoIndentLinkClick(Sender: TObject);
|
||||
procedure AutoIndentLinkMouseEnter(Sender: TObject);
|
||||
procedure AutoIndentLinkMouseLeave(Sender: TObject);
|
||||
procedure BlockIndentLinkClick(Sender: TObject);
|
||||
procedure ComboboxOnChange(Sender: TObject);
|
||||
procedure ComboboxOnKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure ComboBoxOnExit(Sender: TObject);
|
||||
procedure SmartTabsCheckBoxChange(Sender: TObject);
|
||||
procedure TabIndentBlocksCheckBoxChange(Sender: TObject);
|
||||
procedure TabsToSpacesCheckBoxChange(Sender: TObject);
|
||||
private
|
||||
FDefaultBookmarkImages: TImageList;
|
||||
FDialog: TAbstractOptionsEditorDialog;
|
||||
FPasExtendedKeywordsMode: Boolean;
|
||||
FPasStringKeywordMode: TSynPasStringMode;
|
||||
function DefaultBookmarkImages: TImageList;
|
||||
procedure SetExtendedKeywordsMode(const AValue: Boolean);
|
||||
procedure SetStringKeywordMode(const AValue: TSynPasStringMode);
|
||||
public
|
||||
PreviewEdits: array of TPreviewEditor;
|
||||
procedure AddPreviewEdit(AEditor: TPreviewEditor);
|
||||
procedure SetPreviewOption(AValue: Boolean; AnOption: TSynEditorOption); overload;
|
||||
procedure SetPreviewOption(AValue: Boolean; AnOption: TSynEditorOption2); overload;
|
||||
procedure UpdatePrevieEdits;
|
||||
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
function GetTitle: String; override;
|
||||
procedure Setup(ADialog: TAbstractOptionsEditorDialog); override;
|
||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
||||
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
|
||||
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
|
||||
// current previewmode
|
||||
property PasExtendedKeywordsMode: Boolean
|
||||
read FPasExtendedKeywordsMode write SetExtendedKeywordsMode default False;
|
||||
property PasStringKeywordMode: TSynPasStringMode
|
||||
read FPasStringKeywordMode write SetStringKeywordMode default spsmDefault;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TEditorIndentOptionsFrame }
|
||||
|
||||
function TEditorIndentOptionsFrame.GetTitle: String;
|
||||
begin
|
||||
Result := dlgEdTabIndent;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||
begin
|
||||
FDialog := ADialog;
|
||||
|
||||
// tabs
|
||||
TabsGroupDivider.Caption := dlgIndentsTabsGroupOptions;
|
||||
TabsToSpacesCheckBox.Caption := dlgTabsToSpaces;
|
||||
TabWidthsLabel.Caption := dlgTabWidths;
|
||||
SmartTabsCheckBox.Caption := dlgSmartTabs;
|
||||
|
||||
// indents
|
||||
IndentsGroupDivider.Caption := dlgIndentsIndentGroupOptions;
|
||||
AutoIndentCheckBox.Caption := dlgAutoIndent;
|
||||
AutoIndentTypeLabel.Caption := dlgAutoIndentType;
|
||||
|
||||
lblBlockIndentKeys.Caption := dlgBlockIndentKeys;
|
||||
lblBlockIndentShortcut.Caption := '';
|
||||
BlockIndentLink.Caption := dlgBlockIndentLink;
|
||||
BlockIndentLabel.Caption := dlgBlockIndent;
|
||||
BlockTabIndentLabel.Caption := dlgBlockTabIndent;
|
||||
|
||||
BlockIndentTypeComboBox.Items.Add(dlgBlockIndentTypeSpace);
|
||||
BlockIndentTypeComboBox.Items.Add(dlgBlockIndentTypeCopy);
|
||||
BlockIndentTypeComboBox.Items.Add(dlgBlockIndentTypePos);
|
||||
|
||||
TabIndentBlocksCheckBox.Caption := dlgTabIndent;
|
||||
AutoIndentLink.Caption := dlgAutoIndentLink;
|
||||
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
i: integer;
|
||||
K: TKeyCommandRelation;
|
||||
begin
|
||||
with AOptions as TEditorOptions do
|
||||
begin
|
||||
SetComboBoxText(BlockIndentComboBox, IntToStr(BlockIndent), cstCaseInsensitive);
|
||||
SetComboBoxText(BlockTabIndentComboBox, IntToStr(BlockTabIndent), cstCaseInsensitive);
|
||||
SetComboBoxText(TabWidthsComboBox, IntToStr(TabWidth), cstCaseInsensitive);
|
||||
BlockIndentTypeComboBox.ItemIndex := ord(BlockIndentType);
|
||||
|
||||
// tabs, indents
|
||||
AutoIndentCheckBox.Checked := eoAutoIndent in SynEditOptions;
|
||||
TabIndentBlocksCheckBox.Checked := eoTabIndent in SynEditOptions;
|
||||
SmartTabsCheckBox.Checked := eoSmartTabs in SynEditOptions;
|
||||
TabsToSpacesCheckBox.Checked := eoTabsToSpaces in SynEditOptions;
|
||||
|
||||
for i := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[i] <> nil then
|
||||
GetSynEditPreviewSettings(PreviewEdits[i]);
|
||||
|
||||
lblBlockIndentShortcut.Caption := '';
|
||||
K := KeyMap.FindByCommand(ecBlockIndent);
|
||||
if k <> nil then
|
||||
lblBlockIndentShortcut.Caption := lblBlockIndentShortcut.Caption +
|
||||
KeyAndShiftStateToEditorKeyString(k.ShortcutA)+ ' / ';
|
||||
K := KeyMap.FindByCommand(ecBlockUnindent);
|
||||
if k <> nil then
|
||||
lblBlockIndentShortcut.Caption := lblBlockIndentShortcut.Caption +
|
||||
KeyAndShiftStateToEditorKeyString(k.ShortcutA);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
|
||||
procedure UpdateOptionFromBool(AValue: Boolean; AnOption: TSynEditorOption); overload;
|
||||
begin
|
||||
if AValue then
|
||||
TEditorOptions(AOptions).SynEditOptions := TEditorOptions(AOptions).SynEditOptions + [AnOption]
|
||||
else
|
||||
TEditorOptions(AOptions).SynEditOptions := TEditorOptions(AOptions).SynEditOptions - [AnOption];
|
||||
end;
|
||||
|
||||
procedure UpdateOptionFromBool(AValue: Boolean; AnOption: TSynEditorOption2); overload;
|
||||
begin
|
||||
if AValue then
|
||||
TEditorOptions(AOptions).SynEditOptions2 := TEditorOptions(AOptions).SynEditOptions2 + [AnOption]
|
||||
else
|
||||
TEditorOptions(AOptions).SynEditOptions2 := TEditorOptions(AOptions).SynEditOptions2 - [AnOption];
|
||||
end;
|
||||
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
with AOptions as TEditorOptions do
|
||||
begin
|
||||
// tabs, indents
|
||||
UpdateOptionFromBool(AutoIndentCheckBox.Checked, eoAutoIndent);
|
||||
UpdateOptionFromBool(TabIndentBlocksCheckBox.Checked, eoTabIndent);
|
||||
UpdateOptionFromBool(SmartTabsCheckBox.Checked, eoSmartTabs);
|
||||
UpdateOptionFromBool(TabsToSpacesCheckBox.Checked, eoTabsToSpaces);
|
||||
|
||||
i := StrToIntDef(TabWidthsComboBox.Text, 2);
|
||||
if i < 1 then
|
||||
i := 1;
|
||||
if i > 20 then
|
||||
i := 20;
|
||||
TabWidth := i;
|
||||
|
||||
i := StrToIntDef(BlockIndentComboBox.Text, 2);
|
||||
if i < 0 then
|
||||
i := 0;
|
||||
if i > 20 then
|
||||
i := 20;
|
||||
BlockIndent := i;
|
||||
|
||||
i := StrToIntDef(BlockTabIndentComboBox.Text, 0);
|
||||
if i < 0 then
|
||||
i := 0;
|
||||
if i > 20 then
|
||||
i := 20;
|
||||
BlockTabIndent := i;
|
||||
|
||||
BlockIndentType := TSynBeautifierIndentType(BlockIndentTypeComboBox.ItemIndex);
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TEditorIndentOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TEditorOptions;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.SetPreviewOption(AValue: Boolean; AnOption: TSynEditorOption);
|
||||
var
|
||||
a: Integer;
|
||||
begin
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
begin
|
||||
if PreviewEdits[a] <> nil then
|
||||
if AValue then
|
||||
PreviewEdits[a].Options := PreviewEdits[a].Options + [AnOption]
|
||||
else
|
||||
PreviewEdits[a].Options := PreviewEdits[a].Options - [AnOption];
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.SetPreviewOption(AValue: Boolean; AnOption: TSynEditorOption2);
|
||||
var
|
||||
a: Integer;
|
||||
begin
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
begin
|
||||
if PreviewEdits[a] <> nil then
|
||||
if AValue then
|
||||
PreviewEdits[a].Options2 := PreviewEdits[a].Options2 + [AnOption]
|
||||
else
|
||||
PreviewEdits[a].Options2 := PreviewEdits[a].Options2 - [AnOption];
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.UpdatePrevieEdits;
|
||||
var
|
||||
a: Integer;
|
||||
begin
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a].Highlighter is TSynPasSyn then begin
|
||||
TSynPasSyn(PreviewEdits[a].Highlighter).ExtendedKeywordsMode := PasExtendedKeywordsMode;
|
||||
TSynPasSyn(PreviewEdits[a].Highlighter).StringKeywordMode := PasStringKeywordMode;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.ComboboxOnChange(Sender: TObject);
|
||||
var
|
||||
ComboBox: TComboBox absolute Sender;
|
||||
begin
|
||||
if ComboBox.Items.IndexOf(ComboBox.Text) >= 0 then
|
||||
ComboBoxOnExit(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.AutoIndentCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(AutoIndentCheckBox.Checked, eoAutoIndent);
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.AutoIndentLinkClick(Sender: TObject);
|
||||
begin
|
||||
FDialog.OpenEditor(GroupCodetools,CdtOptionsGeneral);
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.AutoIndentLinkMouseEnter(Sender: TObject);
|
||||
begin
|
||||
(Sender as TLabel).Font.Underline := True;
|
||||
(Sender as TLabel).Font.Color := clRed;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.AutoIndentLinkMouseLeave(Sender: TObject);
|
||||
begin
|
||||
(Sender as TLabel).Font.Underline := False;
|
||||
(Sender as TLabel).Font.Color := clBlue;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.BlockIndentLinkClick(Sender: TObject);
|
||||
var
|
||||
col: TEditorKeymappingOptionsFrame;
|
||||
begin
|
||||
col := TEditorKeymappingOptionsFrame(FDialog.FindEditor(TEditorKeymappingOptionsFrame));
|
||||
if col = nil then exit;
|
||||
FDialog.OpenEditor(TEditorKeymappingOptionsFrame);
|
||||
col.SelectByIdeCommand(ecBlockIndent);
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.ComboboxOnKeyDown(
|
||||
Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if (ssCtrl in Shift) and (Key = VK_S) then
|
||||
ComboBoxOnExit(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.ComboBoxOnExit(Sender: TObject);
|
||||
var
|
||||
NewVal, a: Integer;
|
||||
begin
|
||||
if Sender = BlockIndentComboBox then
|
||||
begin
|
||||
NewVal := StrToIntDef(BlockIndentComboBox.Text, PreviewEdits[1].BlockIndent);
|
||||
// Todo: min/max
|
||||
SetComboBoxText(BlockIndentComboBox, IntToStr(NewVal), cstCaseInsensitive);
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a] <> nil then
|
||||
PreviewEdits[a].BlockIndent := NewVal;
|
||||
end
|
||||
else
|
||||
if Sender = BlockTabIndentComboBox then
|
||||
begin
|
||||
NewVal := StrToIntDef(BlockTabIndentComboBox.Text, PreviewEdits[1].BlockTabIndent);
|
||||
// Todo: min/max
|
||||
SetComboBoxText(BlockTabIndentComboBox, IntToStr(NewVal), cstCaseInsensitive);
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a] <> nil then
|
||||
PreviewEdits[a].BlockTabIndent := NewVal;
|
||||
end
|
||||
else
|
||||
if Sender = TabWidthsComboBox then
|
||||
begin
|
||||
NewVal := StrToIntDef(TabWidthsComboBox.Text, PreviewEdits[1].TabWidth);
|
||||
SetComboBoxText(TabWidthsComboBox, IntToStr(NewVal), cstCaseInsensitive);
|
||||
for a := Low(PreviewEdits) to High(PreviewEdits) do
|
||||
if PreviewEdits[a] <> nil then
|
||||
PreviewEdits[a].TabWidth := NewVal;
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.SmartTabsCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(SmartTabsCheckBox.Checked, eoSmartTabs);
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.TabIndentBlocksCheckBoxChange(
|
||||
Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(TabIndentBlocksCheckBox.Checked, eoTabIndent);
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.TabsToSpacesCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
SetPreviewOption(TabsToSpacesCheckBox.Checked, eoTabsToSpaces);
|
||||
end;
|
||||
|
||||
function TEditorIndentOptionsFrame.DefaultBookmarkImages: TImageList;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
if FDefaultBookmarkImages = nil then
|
||||
begin
|
||||
FDefaultBookmarkImages := TImageList.Create(Self);
|
||||
FDefaultBookmarkImages.Width := 11;
|
||||
FDefaultBookmarkImages.Height := 11;
|
||||
for i := 0 to 9 do
|
||||
FDefaultBookmarkImages.AddLazarusResource('bookmark' + IntToStr(i));
|
||||
end;
|
||||
Result := FDefaultBookmarkImages;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.SetExtendedKeywordsMode(const AValue: Boolean);
|
||||
begin
|
||||
if FPasExtendedKeywordsMode = AValue then exit;
|
||||
FPasExtendedKeywordsMode := AValue;
|
||||
UpdatePrevieEdits;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.SetStringKeywordMode(const AValue: TSynPasStringMode);
|
||||
begin
|
||||
if FPasStringKeywordMode = AValue then exit;
|
||||
FPasStringKeywordMode := AValue;
|
||||
UpdatePrevieEdits;
|
||||
end;
|
||||
|
||||
procedure TEditorIndentOptionsFrame.AddPreviewEdit(AEditor: TPreviewEditor);
|
||||
begin
|
||||
SetLength(PreviewEdits, Length(PreviewEdits) + 1);
|
||||
PreviewEdits[Length(PreviewEdits)-1] := AEditor;
|
||||
if AEditor.BookMarkOptions.BookmarkImages = nil then
|
||||
AEditor.BookMarkOptions.BookmarkImages := DefaultBookmarkImages;
|
||||
end;
|
||||
|
||||
constructor TEditorIndentOptionsFrame.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
PreviewEdits := nil;
|
||||
if EditorOpts <> nil then begin
|
||||
FPasExtendedKeywordsMode := EditorOpts.PasExtendedKeywordsMode;
|
||||
FPasStringKeywordMode := EditorOpts.PasStringKeywordMode;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterIDEOptionsEditor(GroupEditor, TEditorIndentOptionsFrame, EdtOptionsIndent, EdtOptionsGeneral);
|
||||
end.
|
||||
|
@ -16,12 +16,12 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 417
|
||||
Top = 33
|
||||
Height = 418
|
||||
Top = 32
|
||||
Width = 461
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 3
|
||||
DefaultItemHeight = 16
|
||||
DefaultItemHeight = 18
|
||||
PopupMenu = PopupMenu1
|
||||
ReadOnly = True
|
||||
RightClickSelect = True
|
||||
@ -38,12 +38,12 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = FindKeyButton
|
||||
Left = 0
|
||||
Height = 24
|
||||
Height = 23
|
||||
Top = 6
|
||||
Width = 266
|
||||
Width = 250
|
||||
OnFilterItem = FilterEditFilterItem
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 0
|
||||
NumGlyphs = 1
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
MaxLength = 0
|
||||
@ -54,10 +54,10 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
end
|
||||
object ClearButton: TBitBtn
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 386
|
||||
Left = 372
|
||||
Height = 25
|
||||
Top = 455
|
||||
Width = 75
|
||||
Width = 89
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Bottom = 6
|
||||
@ -71,10 +71,10 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideTop.Control = FilterEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = ResetKeyFilterBtn
|
||||
Left = 336
|
||||
Left = 320
|
||||
Height = 25
|
||||
Top = 6
|
||||
Width = 88
|
||||
Top = 5
|
||||
Width = 104
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 70
|
||||
@ -88,10 +88,10 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 323
|
||||
Left = 302
|
||||
Height = 25
|
||||
Top = 485
|
||||
Width = 138
|
||||
Width = 159
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
Caption = 'ConsistencyCheckButton'
|
||||
@ -105,7 +105,7 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
Left = 0
|
||||
Height = 25
|
||||
Top = 485
|
||||
Width = 123
|
||||
Width = 144
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
Caption = 'ChooseSchemeButton'
|
||||
@ -117,10 +117,10 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = ChooseSchemeButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 129
|
||||
Left = 150
|
||||
Height = 15
|
||||
Top = 490
|
||||
Width = 67
|
||||
Width = 70
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'SchemeLabel'
|
||||
ParentColor = False
|
||||
@ -129,10 +129,10 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideTop.Control = ClearButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = ClearButton
|
||||
Left = 311
|
||||
Left = 284
|
||||
Height = 25
|
||||
Top = 455
|
||||
Width = 69
|
||||
Width = 82
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Right = 6
|
||||
@ -145,10 +145,10 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideTop.Control = EditButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = EditButton
|
||||
Left = 227
|
||||
Left = 193
|
||||
Height = 15
|
||||
Top = 460
|
||||
Width = 78
|
||||
Width = 85
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'CommandLabel'
|
||||
@ -161,11 +161,10 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 426
|
||||
Height = 22
|
||||
Top = 7
|
||||
Top = 6
|
||||
Width = 29
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 6
|
||||
NumGlyphs = 0
|
||||
OnClick = ResetKeyFilterBtnClick
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
|
@ -85,6 +85,7 @@ type
|
||||
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
|
||||
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
|
||||
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
|
||||
procedure SelectByIdeCommand(ACmd: word);
|
||||
end;
|
||||
|
||||
implementation
|
||||
@ -500,6 +501,24 @@ begin
|
||||
SchemeLabel.Caption:=s;
|
||||
end;
|
||||
|
||||
procedure TEditorKeymappingOptionsFrame.SelectByIdeCommand(ACmd: word);
|
||||
var
|
||||
Node: TTreeNode;
|
||||
begin
|
||||
Node := TreeView.Items.GetFirstNode;
|
||||
while node <> nil do begin
|
||||
if (node.Data <> nil) and (TObject(Node.Data) is TKeyCommandRelation) and
|
||||
(TKeyCommandRelation(Node.Data).Command = ACmd)
|
||||
then
|
||||
break;
|
||||
node := Node.GetNext;
|
||||
end;
|
||||
if node <> nil then begin
|
||||
Node.MakeVisible;
|
||||
Node.Selected := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorKeymappingOptionsFrame.EditCommandMapping(ANode: TTreeNode);
|
||||
var
|
||||
i: integer;
|
||||
|
@ -1,6 +1,10 @@
|
||||
inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
object EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
Left = 0
|
||||
Height = 492
|
||||
Top = 0
|
||||
Width = 634
|
||||
HorzScrollBar.Page = 634
|
||||
VertScrollBar.Page = 492
|
||||
AutoScroll = True
|
||||
ClientHeight = 492
|
||||
ClientWidth = 634
|
||||
@ -8,17 +12,17 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
Visible = False
|
||||
DesignLeft = 263
|
||||
DesignTop = 222
|
||||
object MarkupWordDelayLabel: TLabel[0]
|
||||
object MarkupWordDelayLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = MarkupWordTimeTrackBar
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = MarkupWordTimeTrackBar
|
||||
Left = 514
|
||||
Height = 14
|
||||
Top = 99
|
||||
Width = 114
|
||||
Left = 501
|
||||
Height = 15
|
||||
Top = 106
|
||||
Width = 127
|
||||
Anchors = [akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 2
|
||||
@ -26,42 +30,42 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
Caption = 'MarkupWordDelayLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object MarkupWordFullLenLabel: TLabel[1]
|
||||
object MarkupWordFullLenLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = MarkupWordFullLenSpin
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = MarkupWordFullLenSpin
|
||||
Left = 6
|
||||
Height = 14
|
||||
Top = 95
|
||||
Width = 120
|
||||
Height = 15
|
||||
Top = 102
|
||||
Width = 136
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'MarkupWordFullLenLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object BracketLabel: TLabel[2]
|
||||
object BracketLabel: TLabel
|
||||
AnchorSideLeft.Control = BracketCombo
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BracketCombo
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 232
|
||||
Height = 14
|
||||
Top = 175
|
||||
Width = 62
|
||||
Height = 15
|
||||
Top = 184
|
||||
Width = 67
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'BracketLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object BracketLink: TLabel[3]
|
||||
object BracketLink: TLabel
|
||||
AnchorSideLeft.Control = BracketLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BracketLabel
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Cursor = crHandPoint
|
||||
Left = 300
|
||||
Height = 14
|
||||
Top = 175
|
||||
Width = 55
|
||||
Left = 305
|
||||
Height = 15
|
||||
Top = 184
|
||||
Width = 61
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'BracketLink'
|
||||
Font.Color = clBlue
|
||||
@ -71,18 +75,18 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
OnMouseEnter = BracketLinkMouseEnter
|
||||
OnMouseLeave = BracketLinkMouseLeave
|
||||
end
|
||||
object MarkupColorLink: TLabel[4]
|
||||
object MarkupColorLink: TLabel
|
||||
AnchorSideLeft.Control = MarkupWordNoTimerCheckBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = MarkupWordNoTimerCheckBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Cursor = crHandPoint
|
||||
Left = 177
|
||||
Height = 14
|
||||
Top = 24
|
||||
Width = 55
|
||||
Left = 201
|
||||
Height = 15
|
||||
Top = 25
|
||||
Width = 92
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'BracketLink'
|
||||
Caption = 'MarkupColorLink'
|
||||
Font.Color = clBlue
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
@ -90,7 +94,7 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
OnMouseEnter = BracketLinkMouseEnter
|
||||
OnMouseLeave = BracketLinkMouseLeave
|
||||
end
|
||||
object MarkupWordTimeTrackBar: TTrackBar[5]
|
||||
object MarkupWordTimeTrackBar: TTrackBar
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = MarkupWordFullLenSpin
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -98,7 +102,7 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 30
|
||||
Top = 119
|
||||
Top = 127
|
||||
Width = 622
|
||||
Frequency = 250
|
||||
Max = 4000
|
||||
@ -112,80 +116,80 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
BorderSpacing.Right = 6
|
||||
TabOrder = 0
|
||||
end
|
||||
object MarkupWordNoKeyword: TCheckBox[6]
|
||||
object MarkupWordNoKeyword: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = MarkupWordNoTimerCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 46
|
||||
Width = 134
|
||||
Height = 19
|
||||
Top = 48
|
||||
Width = 152
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'MarkupWordNoKeyword'
|
||||
TabOrder = 1
|
||||
end
|
||||
object MarkupWordFullLenSpin: TSpinEdit[7]
|
||||
object MarkupWordFullLenSpin: TSpinEdit
|
||||
AnchorSideLeft.Control = MarkupWordFullLenLabel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = MarkupWordTrim
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 132
|
||||
Height = 21
|
||||
Top = 92
|
||||
Left = 148
|
||||
Height = 23
|
||||
Top = 98
|
||||
Width = 48
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
TabOrder = 2
|
||||
end
|
||||
object MarkupWordNoTimerCheckBox: TCheckBox[8]
|
||||
object MarkupWordNoTimerCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = divWordGroup
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Height = 19
|
||||
Top = 23
|
||||
Width = 165
|
||||
Width = 189
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'MarkupWordNoTimerCheckBox'
|
||||
TabOrder = 3
|
||||
end
|
||||
object MarkupWordTrim: TCheckBox[9]
|
||||
object MarkupWordTrim: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = MarkupWordNoKeyword
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 69
|
||||
Width = 99
|
||||
Height = 19
|
||||
Top = 73
|
||||
Width = 115
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'MarkupWordTrim'
|
||||
TabOrder = 4
|
||||
end
|
||||
object BracketCombo: TComboBox[10]
|
||||
object BracketCombo: TComboBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = divMatchingBrackets
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 21
|
||||
Top = 172
|
||||
Height = 23
|
||||
Top = 180
|
||||
Width = 220
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 13
|
||||
ItemHeight = 15
|
||||
OnChange = BracketComboChange
|
||||
OnExit = BracketComboExit
|
||||
OnKeyDown = BracketComboKeyDown
|
||||
Style = csDropDownList
|
||||
TabOrder = 5
|
||||
end
|
||||
object divWordGroup: TDividerBevel[11]
|
||||
object divWordGroup: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
AnchorSideRight.Control = Owner
|
||||
@ -199,21 +203,21 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object divMatchingBrackets: TDividerBevel[12]
|
||||
object divMatchingBrackets: TDividerBevel
|
||||
AnchorSideTop.Control = MarkupWordTimeTrackBar
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = -721
|
||||
Height = 17
|
||||
Top = 149
|
||||
Top = 157
|
||||
Width = 1355
|
||||
Caption = 'divMatchingBrackets'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object divKeywords: TDividerBevel[13]
|
||||
object divKeywords: TDividerBevel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = BracketCombo
|
||||
AnchorSideTop.Side = asrBottom
|
||||
@ -221,7 +225,7 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 17
|
||||
Top = 199
|
||||
Top = 209
|
||||
Width = 634
|
||||
Caption = 'divKeywords'
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -229,46 +233,63 @@ inherited EditorMarkupOptionsFrame: TEditorMarkupOptionsFrame
|
||||
Font.Style = [fsBold]
|
||||
ParentFont = False
|
||||
end
|
||||
object chkExtPasKeywords: TCheckBox[14]
|
||||
object chkExtPasKeywords: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = divKeywords
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 222
|
||||
Width = 114
|
||||
Height = 19
|
||||
Top = 232
|
||||
Width = 123
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'chkExtPasKeywords'
|
||||
OnChange = chkExtPasKeywordsChange
|
||||
TabOrder = 6
|
||||
end
|
||||
object lblPasStringKeywords: TLabel[15]
|
||||
object lblPasStringKeywords: TLabel
|
||||
AnchorSideLeft.Control = dropPasStringKeywords
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = dropPasStringKeywords
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 232
|
||||
Height = 14
|
||||
Top = 248
|
||||
Width = 103
|
||||
Height = 15
|
||||
Top = 261
|
||||
Width = 113
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'lblPasStringKeywords'
|
||||
ParentColor = False
|
||||
end
|
||||
object dropPasStringKeywords: TComboBox[16]
|
||||
object dropPasStringKeywords: TComboBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = chkExtPasKeywords
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 21
|
||||
Top = 245
|
||||
Height = 23
|
||||
Top = 257
|
||||
Width = 220
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 13
|
||||
ItemHeight = 15
|
||||
OnChange = dropPasStringKeywordsChange
|
||||
Style = csDropDownList
|
||||
TabOrder = 7
|
||||
end
|
||||
object MarkupKeyLink: TLabel
|
||||
AnchorSideLeft.Control = MarkupColorLink
|
||||
AnchorSideTop.Control = MarkupWordNoKeyword
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Cursor = crHandPoint
|
||||
Left = 201
|
||||
Height = 15
|
||||
Top = 50
|
||||
Width = 82
|
||||
Caption = 'MarkupKeyLink'
|
||||
Font.Color = clBlue
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
OnClick = MarkupKeyLinkClick
|
||||
OnMouseEnter = BracketLinkMouseEnter
|
||||
OnMouseLeave = BracketLinkMouseLeave
|
||||
end
|
||||
end
|
||||
|
@ -25,10 +25,10 @@ unit editor_markup_options;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, StdCtrls, ComCtrls, Graphics, sysutils,
|
||||
EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, Spin, ExtCtrls,
|
||||
SynEditMarkupBracket, editor_color_options, editor_general_options,
|
||||
SynEdit, SynCompletion, SynHighlighterPas, DividerBevel, LCLType;
|
||||
Classes, StdCtrls, ComCtrls, Graphics, sysutils, EditorOptions, LazarusIDEStrConsts,
|
||||
IDEOptionsIntf, Spin, ExtCtrls, SynEditMarkupBracket, editor_color_options,
|
||||
editor_general_options, editor_keymapping_options, SynEdit, SynCompletion, SynHighlighterPas,
|
||||
SynEditKeyCmds, DividerBevel, LCLType;
|
||||
|
||||
type
|
||||
{ TEditorMarkupOptionsFrame }
|
||||
@ -44,6 +44,7 @@ type
|
||||
divWordGroup: TDividerBevel;
|
||||
lblPasStringKeywords: TLabel;
|
||||
MarkupColorLink: TLabel;
|
||||
MarkupKeyLink: TLabel;
|
||||
MarkupWordDelayLabel: TLabel;
|
||||
MarkupWordNoTimerCheckBox: TCheckBox;
|
||||
MarkupWordFullLenSpin: TSpinEdit;
|
||||
@ -62,6 +63,7 @@ type
|
||||
procedure dropPasStringKeywordsChange(Sender: TObject);
|
||||
function GeneralPage: TEditorGeneralOptionsFrame; inline;
|
||||
procedure MarkupColorLinkClick(Sender: TObject);
|
||||
procedure MarkupKeyLinkClick(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
FDialog: TAbstractOptionsEditorDialog;
|
||||
@ -165,6 +167,16 @@ begin
|
||||
col.SelectAhaColor(ahaHighlightWord);
|
||||
end;
|
||||
|
||||
procedure TEditorMarkupOptionsFrame.MarkupKeyLinkClick(Sender: TObject);
|
||||
var
|
||||
col: TEditorKeymappingOptionsFrame;
|
||||
begin
|
||||
col := TEditorKeymappingOptionsFrame(FDialog.FindEditor(TEditorKeymappingOptionsFrame));
|
||||
if col = nil then exit;
|
||||
FDialog.OpenEditor(TEditorKeymappingOptionsFrame);
|
||||
col.SelectByIdeCommand(EcToggleMarkupWord);
|
||||
end;
|
||||
|
||||
function TEditorMarkupOptionsFrame.GetTitle: String;
|
||||
begin
|
||||
Result := lisAutoMarkup;
|
||||
@ -180,6 +192,7 @@ begin
|
||||
MarkupWordTrim.Caption := dlgMarkupWordTrim;
|
||||
MarkupWordNoTimerCheckBox.Caption := dlgMarkupWordNoTimer;
|
||||
MarkupColorLink.Caption := dlgColorLink;
|
||||
MarkupKeyLink.Caption := dlgKeyLink;
|
||||
|
||||
divMatchingBrackets.Caption := dlgBracketMatchGroup;
|
||||
BracketLabel.Caption := dlgBracketHighlight;
|
||||
|
@ -1311,6 +1311,7 @@ resourcestring
|
||||
|
||||
// editor options
|
||||
dlgEdMisc = 'Misc';
|
||||
dlgEdTabIndent = 'Tab and Indent';
|
||||
dlgEdDisplay = 'Display';
|
||||
lisEOTabWidths = 'Tab widths';
|
||||
dlgKeyMapping = 'Key Mappings';
|
||||
@ -1342,7 +1343,8 @@ resourcestring
|
||||
|
||||
dlgUndoGroupOptions = 'Undo / Redo';
|
||||
dlgScrollGroupOptions = 'Scrolling';
|
||||
dlgIndentsTabsGroupOptions = 'Indent and Tabs';
|
||||
dlgIndentsTabsGroupOptions = 'Tabs';
|
||||
dlgIndentsIndentGroupOptions = 'Indent';
|
||||
dlgMouseGroupOptions = 'Mouse:';
|
||||
dlgCursorGroupOptions = 'Cursor';
|
||||
dlgBlockGroupOptions = 'Selection';
|
||||
@ -1540,11 +1542,14 @@ resourcestring
|
||||
dlgHomeKeyJumpsToNearestStart = 'Home key jumps to nearest start';
|
||||
dlgEndKeyJumpsToNearestStart = 'End key jumps to nearest end';
|
||||
dlgColorLink = '(Edit Color)';
|
||||
dlgKeyLink = '(Edit Key)';
|
||||
dlgBracketHighlight = 'Bracket highlight';
|
||||
dlgNoBracketHighlight = 'No Highlight';
|
||||
dlgHighlightLeftOfCursor = 'Left Of Cursor';
|
||||
dlgHighlightRightOfCursor = 'Right Of Cursor';
|
||||
gldHighlightBothSidesOfCursor = 'On Both Sides';
|
||||
dlgBlockIndentKeys = 'Block indent';
|
||||
dlgBlockIndentLink = '(edit keys)';
|
||||
dlgBlockIndent = 'Block indent (spaces)';
|
||||
dlgBlockTabIndent = 'Block indent (tabs)';
|
||||
dlgAutoIndentType = 'Auto indent';
|
||||
|
@ -113,7 +113,7 @@ uses
|
||||
editor_mouseaction_options_advanced, editor_color_options, editor_markup_options,
|
||||
editor_codetools_options, editor_codefolding_options,
|
||||
editor_general_misc_options, editor_dividerdraw_options,
|
||||
editor_multiwindow_options,
|
||||
editor_multiwindow_options, editor_indent_options,
|
||||
codetools_general_options, codetools_codecreation_options,
|
||||
codetools_classcompletion_options, atom_checkboxes_options,
|
||||
codetools_wordpolicy_options, codetools_linesplitting_options,
|
||||
|
@ -234,7 +234,8 @@ const
|
||||
|
||||
GroupEditor = 200;
|
||||
EdtOptionsGeneral = 100;
|
||||
EdtOptionsGeneralMisc = 101;
|
||||
EdtOptionsIndent = 110;
|
||||
EdtOptionsGeneralMisc = 120;
|
||||
EdtOptionsDisplay = 200;
|
||||
EdtOptionsColors = 500;
|
||||
EdtOptionsMarkup = 502;
|
||||
|
Loading…
Reference in New Issue
Block a user