mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 12:20:22 +02:00
IDE: Config for word-wrap indent and markup
This commit is contained in:
parent
43b194714e
commit
6f2525c144
@ -143,7 +143,8 @@ const
|
|||||||
'', '', '', // ahaIdentComplWindowEntryEnum, ahaIdentComplWindowEntryUnit, ahaIdentComplWindowEntryNameSpace,
|
'', '', '', // ahaIdentComplWindowEntryEnum, ahaIdentComplWindowEntryUnit, ahaIdentComplWindowEntryNameSpace,
|
||||||
'', '', '', // ahaIdentComplWindowEntryText, ahaIdentComplWindowEntryTempl, ahaIdentComplWindowEntryKeyword,
|
'', '', '', // ahaIdentComplWindowEntryText, ahaIdentComplWindowEntryTempl, ahaIdentComplWindowEntryKeyword,
|
||||||
'', // ahaIdentComplWindowEntryUnknown,
|
'', // ahaIdentComplWindowEntryUnknown,
|
||||||
'', '', '', '', '', '', '', '', '', '' // ahaOutlineLevel1Color..ahaOutlineLevel10Color
|
'', '', '', '', '', '', '', '', '', '', // ahaOutlineLevel1Color..ahaOutlineLevel10Color
|
||||||
|
'', '', '' // ahaWrapIndend, ahaWrapEol, ahaWrapSubLine
|
||||||
);
|
);
|
||||||
|
|
||||||
ahaGroupMap: array[TAdditionalHilightAttribute] of TAhaGroupName = (
|
ahaGroupMap: array[TAdditionalHilightAttribute] of TAhaGroupName = (
|
||||||
@ -222,7 +223,10 @@ const
|
|||||||
{ ahaOutlineLevel7Color } agnOutlineColors,
|
{ ahaOutlineLevel7Color } agnOutlineColors,
|
||||||
{ ahaOutlineLevel8Color } agnOutlineColors,
|
{ ahaOutlineLevel8Color } agnOutlineColors,
|
||||||
{ ahaOutlineLevel9Color } agnOutlineColors,
|
{ ahaOutlineLevel9Color } agnOutlineColors,
|
||||||
{ ahaOutlineLevel10Color } agnOutlineColors
|
{ ahaOutlineLevel10Color } agnOutlineColors,
|
||||||
|
{ ahaWrapIndend } agnWrap,
|
||||||
|
{ ahaWrapEol } agnWrap,
|
||||||
|
{ ahaWrapSubLine } agnWrap
|
||||||
|
|
||||||
);
|
);
|
||||||
ahaSupportedFeatures: array[TAdditionalHilightAttribute] of TColorSchemeAttributeFeatures =
|
ahaSupportedFeatures: array[TAdditionalHilightAttribute] of TColorSchemeAttributeFeatures =
|
||||||
@ -302,7 +306,10 @@ const
|
|||||||
{ ahaFoldLevel7Color } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask, hafMarkupFoldColor],
|
{ ahaFoldLevel7Color } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask, hafMarkupFoldColor],
|
||||||
{ ahaFoldLevel8Color } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask, hafMarkupFoldColor],
|
{ ahaFoldLevel8Color } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask, hafMarkupFoldColor],
|
||||||
{ ahaFoldLevel9Color } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask, hafMarkupFoldColor],
|
{ ahaFoldLevel9Color } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask, hafMarkupFoldColor],
|
||||||
{ ahaFoldLevel10Color } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask, hafMarkupFoldColor]
|
{ ahaFoldLevel10Color } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask, hafMarkupFoldColor],
|
||||||
|
{ ahaWrapIndend } [hafBackColor, hafFrameColor {, hafAlpha, hafPrior}],
|
||||||
|
{ ahaWrapEol } [hafBackColor {, hafAlpha, hafPrior}],
|
||||||
|
{ ahaWrapSubLine } [hafBackColor, hafForeColor, hafFrameColor, hafAlpha, hafPrior, hafFrameStyle, hafFrameEdges, hafStyle, hafStyleMask]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -1596,6 +1603,11 @@ type
|
|||||||
// Wordwrap
|
// Wordwrap
|
||||||
FWordWrapCaretWrapPos: TLazSynEditWrapCaretPos;
|
FWordWrapCaretWrapPos: TLazSynEditWrapCaretPos;
|
||||||
FWordWrapEnabled: Boolean;
|
FWordWrapEnabled: Boolean;
|
||||||
|
FWordWrapIndent: Integer;
|
||||||
|
FWordWrapIndentMax: Integer;
|
||||||
|
FWordWrapIndentMaxRel: Integer;
|
||||||
|
FWordWrapIndentMin: Integer;
|
||||||
|
FWordWrapIndentUseOffset: boolean;
|
||||||
FWordWrapMinWidth: Integer;
|
FWordWrapMinWidth: Integer;
|
||||||
|
|
||||||
fUseTabHistory: Boolean;
|
fUseTabHistory: Boolean;
|
||||||
@ -1682,6 +1694,12 @@ type
|
|||||||
property WordWrapCaretWrapPos: TLazSynEditWrapCaretPos read FWordWrapCaretWrapPos write FWordWrapCaretWrapPos;
|
property WordWrapCaretWrapPos: TLazSynEditWrapCaretPos read FWordWrapCaretWrapPos write FWordWrapCaretWrapPos;
|
||||||
property WordWrapMinWidth: Integer read FWordWrapMinWidth write FWordWrapMinWidth default 10;
|
property WordWrapMinWidth: Integer read FWordWrapMinWidth write FWordWrapMinWidth default 10;
|
||||||
|
|
||||||
|
property WordWrapIndent: Integer read FWordWrapIndent write FWordWrapIndent default 0;
|
||||||
|
property WordWrapIndentUseOffset: boolean read FWordWrapIndentUseOffset write FWordWrapIndentUseOffset default True;
|
||||||
|
property WordWrapIndentMin: Integer read FWordWrapIndentMin write FWordWrapIndentMin default 0;
|
||||||
|
property WordWrapIndentMax: Integer read FWordWrapIndentMax write FWordWrapIndentMax default 8;
|
||||||
|
property WordWrapIndentMaxRel: Integer read FWordWrapIndentMaxRel write FWordWrapIndentMaxRel default 0;
|
||||||
|
|
||||||
property UseTabHistory: Boolean read fUseTabHistory write fUseTabHistory;
|
property UseTabHistory: Boolean read fUseTabHistory write fUseTabHistory;
|
||||||
|
|
||||||
property MultiCaretOnColumnSelect: Boolean
|
property MultiCaretOnColumnSelect: Boolean
|
||||||
@ -3075,12 +3093,17 @@ begin
|
|||||||
AdditionalHighlightAttributes[ahaOutlineLevel10Color] := dlgAddHiAttrOutlineLevel10Color;
|
AdditionalHighlightAttributes[ahaOutlineLevel10Color] := dlgAddHiAttrOutlineLevel10Color;
|
||||||
AdditionalHighlightGroupNames[agnOutlineColors] := dlgAddHiAttrGroupOutlineColors;
|
AdditionalHighlightGroupNames[agnOutlineColors] := dlgAddHiAttrGroupOutlineColors;
|
||||||
|
|
||||||
|
AdditionalHighlightAttributes[ahaWrapIndend] := dlgAddHiAttrWrapIndent;
|
||||||
|
AdditionalHighlightAttributes[ahaWrapEol] := dlgAddHiAttrWrapEol;
|
||||||
|
AdditionalHighlightAttributes[ahaWrapSubLine] := dlgAddHiAttrWrapSupLine;
|
||||||
|
|
||||||
AdditionalHighlightGroupNames[agnDefault] := dlgAddHiAttrGroupDefault;
|
AdditionalHighlightGroupNames[agnDefault] := dlgAddHiAttrGroupDefault;
|
||||||
AdditionalHighlightGroupNames[agnText] := dlgAddHiAttrGroupText;
|
AdditionalHighlightGroupNames[agnText] := dlgAddHiAttrGroupText;
|
||||||
AdditionalHighlightGroupNames[agnLine] := dlgAddHiAttrGroupLine;
|
AdditionalHighlightGroupNames[agnLine] := dlgAddHiAttrGroupLine;
|
||||||
AdditionalHighlightGroupNames[agnTemplateMode] := dlgAddHiAttrGroupTemplateEdit;
|
AdditionalHighlightGroupNames[agnTemplateMode] := dlgAddHiAttrGroupTemplateEdit;
|
||||||
AdditionalHighlightGroupNames[agnSyncronMode] := dlgAddHiAttrGroupSyncroEdit;
|
AdditionalHighlightGroupNames[agnSyncronMode] := dlgAddHiAttrGroupSyncroEdit;
|
||||||
AdditionalHighlightGroupNames[agnGutter] := dlgAddHiAttrGroupGutter;
|
AdditionalHighlightGroupNames[agnGutter] := dlgAddHiAttrGroupGutter;
|
||||||
|
AdditionalHighlightGroupNames[agnWrap] := dlgAddHiAttrGroupWrap;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function StrToValidXMLName(const s: String): String;
|
function StrToValidXMLName(const s: String): String;
|
||||||
@ -5471,6 +5494,8 @@ begin
|
|||||||
fReverseFoldPopUpOrder := True;
|
fReverseFoldPopUpOrder := True;
|
||||||
// wordwrap
|
// wordwrap
|
||||||
FWordWrapMinWidth := 10;
|
FWordWrapMinWidth := 10;
|
||||||
|
FWordWrapIndentUseOffset := True;
|
||||||
|
FWordWrapIndentMax := 8;
|
||||||
// pas highlighter
|
// pas highlighter
|
||||||
fPasExtendedKeywordsMode := False;
|
fPasExtendedKeywordsMode := False;
|
||||||
fPasStringKeywordMode := spsmDefault;
|
fPasStringKeywordMode := spsmDefault;
|
||||||
@ -6819,6 +6844,11 @@ begin
|
|||||||
TIDESynEditor(ASynEdit).WordWrapEnabled := WordWrapEnabled;
|
TIDESynEditor(ASynEdit).WordWrapEnabled := WordWrapEnabled;
|
||||||
TIDESynEditor(ASynEdit).WordWrapCaretWrapPos := WordWrapCaretWrapPos;
|
TIDESynEditor(ASynEdit).WordWrapCaretWrapPos := WordWrapCaretWrapPos;
|
||||||
TIDESynEditor(ASynEdit).WordWrapMinWidth := WordWrapMinWidth;
|
TIDESynEditor(ASynEdit).WordWrapMinWidth := WordWrapMinWidth;
|
||||||
|
TIDESynEditor(ASynEdit).WordWrapIndent := WordWrapIndent;
|
||||||
|
TIDESynEditor(ASynEdit).WordWrapIndentUseOffset := WordWrapIndentUseOffset;
|
||||||
|
TIDESynEditor(ASynEdit).WordWrapIndentMin := WordWrapIndentMin;
|
||||||
|
TIDESynEditor(ASynEdit).WordWrapIndentMax := WordWrapIndentMax;
|
||||||
|
TIDESynEditor(ASynEdit).WordWrapIndentMaxRel := WordWrapIndentMaxRel;
|
||||||
if WordWrapEnabled then begin
|
if WordWrapEnabled then begin
|
||||||
ASynEdit.Options := ASynEdit.Options - [eoScrollPastEol];
|
ASynEdit.Options := ASynEdit.Options - [eoScrollPastEol];
|
||||||
ASynEdit.Options2 := ASynEdit.Options2 - [eoScrollPastEolAddPage, eoScrollPastEolAutoCaret];
|
ASynEdit.Options2 := ASynEdit.Options2 - [eoScrollPastEolAddPage, eoScrollPastEolAutoCaret];
|
||||||
@ -7670,6 +7700,12 @@ begin
|
|||||||
col := $606060;
|
col := $606060;
|
||||||
TIDESynEditor(aSynEdit).MultiCaret.Color := col;
|
TIDESynEditor(aSynEdit).MultiCaret.Color := col;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if TIDESynEditor(aSynEdit).WrapView <> nil then begin
|
||||||
|
SetMarkupColor(ahaWrapIndend, TIDESynEditor(aSynEdit).WrapView.MarkupInfoWrapIndent);
|
||||||
|
SetMarkupColor(ahaWrapEol, TIDESynEditor(aSynEdit).WrapView.MarkupInfoWrapEol);
|
||||||
|
SetMarkupColor(ahaWrapSubLine, TIDESynEditor(aSynEdit).WrapView.MarkupInfoWrapSubLine);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
SetMarkupColorByClass(ahaHighlightWord, TSynEditMarkupHighlightAllCaret);
|
SetMarkupColorByClass(ahaHighlightWord, TSynEditMarkupHighlightAllCaret);
|
||||||
SetMarkupColorByClass(ahaWordGroup, TSynEditMarkupWordGroup);
|
SetMarkupColorByClass(ahaWordGroup, TSynEditMarkupWordGroup);
|
||||||
|
@ -3,11 +3,13 @@ object EditorWordWrapOptionsFrame: TEditorWordWrapOptionsFrame
|
|||||||
Height = 380
|
Height = 380
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 428
|
Width = 428
|
||||||
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
|
ChildSizing.ControlsPerLine = 2
|
||||||
ClientHeight = 380
|
ClientHeight = 380
|
||||||
ClientWidth = 428
|
ClientWidth = 428
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
DesignLeft = 534
|
DesignLeft = 599
|
||||||
DesignTop = 48
|
DesignTop = 61
|
||||||
object cbEnableWordWrap: TCheckBox
|
object cbEnableWordWrap: TCheckBox
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
@ -47,30 +49,188 @@ object EditorWordWrapOptionsFrame: TEditorWordWrapOptionsFrame
|
|||||||
Columns = 2
|
Columns = 2
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object lbWinWordWrapWidth: TLabel
|
object Panel1: TPanel
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = edWinWordWrapWidth
|
AnchorSideTop.Control = Panel2
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideBottom.Control = Panel2
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 151
|
||||||
Top = 60
|
Top = 56
|
||||||
Width = 120
|
Width = 140
|
||||||
BorderSpacing.Around = 6
|
Anchors = [akTop, akLeft, akBottom]
|
||||||
Caption = 'lbWinWordWrapWidth'
|
AutoSize = True
|
||||||
|
BorderSpacing.Left = 6
|
||||||
|
BevelOuter = bvNone
|
||||||
|
ChildSizing.EnlargeVertical = crsSameSize
|
||||||
|
ChildSizing.ShrinkVertical = crsSameSize
|
||||||
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
|
ChildSizing.ControlsPerLine = 1
|
||||||
|
ClientHeight = 151
|
||||||
|
ClientWidth = 140
|
||||||
|
TabOrder = 2
|
||||||
|
object lbMinWordWrapWidth: TLabel
|
||||||
|
Left = 0
|
||||||
|
Height = 15
|
||||||
|
Top = 5
|
||||||
|
Width = 140
|
||||||
|
BorderSpacing.CellAlignVertical = ccaCenter
|
||||||
|
Caption = 'lbMinWordWrapWidth'
|
||||||
|
end
|
||||||
|
object lbWordWrapIndent: TLabel
|
||||||
|
Left = 0
|
||||||
|
Height = 15
|
||||||
|
Top = 30
|
||||||
|
Width = 140
|
||||||
|
BorderSpacing.CellAlignVertical = ccaCenter
|
||||||
|
Caption = 'lbWordWrapIndent'
|
||||||
|
end
|
||||||
|
object cbIndentIsOffset: TCheckBox
|
||||||
|
Left = 0
|
||||||
|
Height = 19
|
||||||
|
Top = 53
|
||||||
|
Width = 140
|
||||||
|
BorderSpacing.CellAlignVertical = ccaCenter
|
||||||
|
Caption = 'cbIndentIsOffset'
|
||||||
|
TabOrder = 0
|
||||||
|
OnChange = cbIndentIsOffsetChange
|
||||||
|
end
|
||||||
|
object lbWordWrapIndentMin: TLabel
|
||||||
|
Left = 0
|
||||||
|
Height = 15
|
||||||
|
Top = 81
|
||||||
|
Width = 140
|
||||||
|
BorderSpacing.CellAlignVertical = ccaCenter
|
||||||
|
Caption = 'lbWordWrapIndentMin'
|
||||||
|
end
|
||||||
|
object lbWordWrapIndentMax: TLabel
|
||||||
|
Left = 0
|
||||||
|
Height = 15
|
||||||
|
Top = 106
|
||||||
|
Width = 140
|
||||||
|
BorderSpacing.CellAlignVertical = ccaCenter
|
||||||
|
Caption = 'lbWordWrapIndentMax'
|
||||||
|
end
|
||||||
|
object lbWordWrapIndentMaxRel: TLabel
|
||||||
|
Left = 0
|
||||||
|
Height = 15
|
||||||
|
Top = 131
|
||||||
|
Width = 140
|
||||||
|
BorderSpacing.CellAlignVertical = ccaCenter
|
||||||
|
Caption = 'lbWordWrapIndentMaxRel'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object edWinWordWrapWidth: TSpinEdit
|
object Panel2: TPanel
|
||||||
AnchorSideLeft.Control = lbWinWordWrapWidth
|
AnchorSideLeft.Control = Panel1
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = rgCaretWrapPos
|
AnchorSideTop.Control = rgCaretWrapPos
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 132
|
Left = 152
|
||||||
Height = 23
|
Height = 151
|
||||||
Top = 56
|
Top = 56
|
||||||
Width = 124
|
Width = 60
|
||||||
BorderSpacing.Around = 6
|
AutoSize = True
|
||||||
MaxValue = 9999
|
BorderSpacing.Left = 6
|
||||||
MinValue = 1
|
BevelOuter = bvNone
|
||||||
TabOrder = 2
|
ClientHeight = 151
|
||||||
Value = 10
|
ClientWidth = 60
|
||||||
|
TabOrder = 3
|
||||||
|
object edMinWordWrapWidth: TSpinEdit
|
||||||
|
AnchorSideTop.Control = Panel2
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 23
|
||||||
|
Top = 3
|
||||||
|
Width = 60
|
||||||
|
Alignment = taRightJustify
|
||||||
|
BorderSpacing.Top = 3
|
||||||
|
BorderSpacing.Bottom = 3
|
||||||
|
Constraints.MaxWidth = 60
|
||||||
|
Constraints.MinWidth = 60
|
||||||
|
MaxValue = 9999
|
||||||
|
MinValue = 1
|
||||||
|
TabOrder = 0
|
||||||
|
Value = 10
|
||||||
|
end
|
||||||
|
object edWordWrapIndent: TSpinEdit
|
||||||
|
AnchorSideTop.Control = edMinWordWrapWidth
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 23
|
||||||
|
Top = 29
|
||||||
|
Width = 60
|
||||||
|
Alignment = taRightJustify
|
||||||
|
BorderSpacing.Top = 3
|
||||||
|
BorderSpacing.Bottom = 3
|
||||||
|
Constraints.MaxWidth = 60
|
||||||
|
Constraints.MinWidth = 60
|
||||||
|
MaxValue = 100
|
||||||
|
MinValue = -100
|
||||||
|
TabOrder = 1
|
||||||
|
Value = 10
|
||||||
|
end
|
||||||
|
object Label1: TLabel
|
||||||
|
AnchorSideTop.Control = edWordWrapIndent
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 15
|
||||||
|
Top = 55
|
||||||
|
Width = 3
|
||||||
|
BorderSpacing.Top = 3
|
||||||
|
BorderSpacing.Bottom = 3
|
||||||
|
Caption = ' '
|
||||||
|
end
|
||||||
|
object edWordWrapIndentMin: TSpinEdit
|
||||||
|
AnchorSideTop.Control = Label1
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 23
|
||||||
|
Top = 73
|
||||||
|
Width = 60
|
||||||
|
Alignment = taRightJustify
|
||||||
|
BorderSpacing.Top = 3
|
||||||
|
BorderSpacing.Bottom = 3
|
||||||
|
Constraints.MaxWidth = 60
|
||||||
|
Constraints.MinWidth = 60
|
||||||
|
MaxValue = 100
|
||||||
|
TabOrder = 2
|
||||||
|
Value = 10
|
||||||
|
end
|
||||||
|
object edWordWrapIndentMax: TSpinEdit
|
||||||
|
AnchorSideTop.Control = edWordWrapIndentMin
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 23
|
||||||
|
Top = 99
|
||||||
|
Width = 60
|
||||||
|
Alignment = taRightJustify
|
||||||
|
BorderSpacing.Top = 3
|
||||||
|
BorderSpacing.Bottom = 3
|
||||||
|
Constraints.MaxWidth = 60
|
||||||
|
Constraints.MinWidth = 60
|
||||||
|
MaxValue = 100
|
||||||
|
TabOrder = 3
|
||||||
|
Value = 10
|
||||||
|
end
|
||||||
|
object edWordWrapIndentMaxRel: TSpinEdit
|
||||||
|
AnchorSideTop.Control = edWordWrapIndentMax
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 0
|
||||||
|
Height = 23
|
||||||
|
Top = 125
|
||||||
|
Width = 60
|
||||||
|
Alignment = taRightJustify
|
||||||
|
BorderSpacing.Top = 3
|
||||||
|
BorderSpacing.Bottom = 3
|
||||||
|
Constraints.MaxWidth = 60
|
||||||
|
Constraints.MinWidth = 60
|
||||||
|
MaxValue = 100
|
||||||
|
TabOrder = 4
|
||||||
|
Value = 10
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -11,7 +11,7 @@ uses
|
|||||||
IDEOptEditorIntf, IDEOptionsIntf, SynEditWrappedView,
|
IDEOptEditorIntf, IDEOptionsIntf, SynEditWrappedView,
|
||||||
// IDE
|
// IDE
|
||||||
EditorOptions, LazarusIDEStrConsts
|
EditorOptions, LazarusIDEStrConsts
|
||||||
;
|
, Classes;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -19,9 +19,22 @@ type
|
|||||||
|
|
||||||
TEditorWordWrapOptionsFrame = class(TAbstractIDEOptionsEditor)
|
TEditorWordWrapOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||||
cbEnableWordWrap: TCheckBox;
|
cbEnableWordWrap: TCheckBox;
|
||||||
lbWinWordWrapWidth: TLabel;
|
cbIndentIsOffset: TCheckBox;
|
||||||
|
edMinWordWrapWidth: TSpinEdit;
|
||||||
|
edWordWrapIndentMax: TSpinEdit;
|
||||||
|
edWordWrapIndentMaxRel: TSpinEdit;
|
||||||
|
edWordWrapIndent: TSpinEdit;
|
||||||
|
edWordWrapIndentMin: TSpinEdit;
|
||||||
|
Label1: TLabel;
|
||||||
|
lbMinWordWrapWidth: TLabel;
|
||||||
|
lbWordWrapIndentMin: TLabel;
|
||||||
|
lbWordWrapIndent: TLabel;
|
||||||
|
lbWordWrapIndentMax: TLabel;
|
||||||
|
lbWordWrapIndentMaxRel: TLabel;
|
||||||
|
Panel1: TPanel;
|
||||||
|
Panel2: TPanel;
|
||||||
rgCaretWrapPos: TRadioGroup;
|
rgCaretWrapPos: TRadioGroup;
|
||||||
edWinWordWrapWidth: TSpinEdit;
|
procedure cbIndentIsOffsetChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
|
||||||
public
|
public
|
||||||
@ -38,6 +51,20 @@ implementation
|
|||||||
|
|
||||||
{ TEditorWordWrapOptionsFrame }
|
{ TEditorWordWrapOptionsFrame }
|
||||||
|
|
||||||
|
procedure TEditorWordWrapOptionsFrame.cbIndentIsOffsetChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if cbIndentIsOffset.Checked then begin
|
||||||
|
edWordWrapIndent.MinValue := -100;
|
||||||
|
edWordWrapIndentMin.Enabled := True;
|
||||||
|
edWordWrapIndentMax.Enabled := True;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
edWordWrapIndent.MinValue := 0;
|
||||||
|
edWordWrapIndentMin.Enabled := False;
|
||||||
|
edWordWrapIndentMax.Enabled := False;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TEditorWordWrapOptionsFrame.GetTitle: String;
|
function TEditorWordWrapOptionsFrame.GetTitle: String;
|
||||||
begin
|
begin
|
||||||
Result := dlgOptWordWrap;
|
Result := dlgOptWordWrap;
|
||||||
@ -49,7 +76,13 @@ begin
|
|||||||
rgCaretWrapPos.Caption := dlgOptWordWrapDisplayCaretAtWrapPositio;
|
rgCaretWrapPos.Caption := dlgOptWordWrapDisplayCaretAtWrapPositio;
|
||||||
rgCaretWrapPos.Items.Add(dlgOptWordWrapEndOfLine);
|
rgCaretWrapPos.Items.Add(dlgOptWordWrapEndOfLine);
|
||||||
rgCaretWrapPos.Items.Add(dlgOptWordWrapStartOfNextLine);
|
rgCaretWrapPos.Items.Add(dlgOptWordWrapStartOfNextLine);
|
||||||
lbWinWordWrapWidth.Caption := dlgOptWordWrapMinimumLineLength;
|
lbMinWordWrapWidth.Caption := dlgOptWordWrapMinimumLineLength;
|
||||||
|
|
||||||
|
lbWordWrapIndent.Caption := dlgOptWordWrapIndent;
|
||||||
|
cbEnableWordWrap.Caption := dlgOptWordWrapIndentIsOffest;
|
||||||
|
lbWordWrapIndentMin.Caption := dlgOptWordWrapIndentMin;
|
||||||
|
lbWordWrapIndentMax.Caption := dlgOptWordWrapIndentMax;
|
||||||
|
lbWordWrapIndentMaxRel.Caption := dlgOptWordWrapIndentMaxRel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditorWordWrapOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
procedure TEditorWordWrapOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
@ -59,7 +92,13 @@ begin
|
|||||||
wcpEOL: rgCaretWrapPos.ItemIndex := 0;
|
wcpEOL: rgCaretWrapPos.ItemIndex := 0;
|
||||||
wcpBOL: rgCaretWrapPos.ItemIndex := 1;
|
wcpBOL: rgCaretWrapPos.ItemIndex := 1;
|
||||||
end;
|
end;
|
||||||
edWinWordWrapWidth.Value := (AOptions as TEditorOptions).WordWrapMinWidth;
|
edMinWordWrapWidth.Value := (AOptions as TEditorOptions).WordWrapMinWidth;
|
||||||
|
|
||||||
|
edWordWrapIndent.Value := (AOptions as TEditorOptions).WordWrapIndent;
|
||||||
|
cbIndentIsOffset.Checked := (AOptions as TEditorOptions).WordWrapIndentUseOffset;
|
||||||
|
edWordWrapIndentMin.Value := (AOptions as TEditorOptions).WordWrapIndentMin;
|
||||||
|
edWordWrapIndentMax.Value := (AOptions as TEditorOptions).WordWrapIndentMax;
|
||||||
|
edWordWrapIndentMaxRel.Value := (AOptions as TEditorOptions).WordWrapIndentMaxRel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditorWordWrapOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TEditorWordWrapOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
@ -69,8 +108,13 @@ begin
|
|||||||
0: (AOptions as TEditorOptions).WordWrapCaretWrapPos := wcpEOL;
|
0: (AOptions as TEditorOptions).WordWrapCaretWrapPos := wcpEOL;
|
||||||
1: (AOptions as TEditorOptions).WordWrapCaretWrapPos := wcpBOL;
|
1: (AOptions as TEditorOptions).WordWrapCaretWrapPos := wcpBOL;
|
||||||
end;
|
end;
|
||||||
(AOptions as TEditorOptions).WordWrapMinWidth := edWinWordWrapWidth.Value;
|
(AOptions as TEditorOptions).WordWrapMinWidth := edMinWordWrapWidth.Value;
|
||||||
|
|
||||||
|
(AOptions as TEditorOptions).WordWrapIndent := edWordWrapIndent.Value;
|
||||||
|
(AOptions as TEditorOptions).WordWrapIndentUseOffset := cbIndentIsOffset.Checked;
|
||||||
|
(AOptions as TEditorOptions).WordWrapIndentMin := edWordWrapIndentMin.Value;
|
||||||
|
(AOptions as TEditorOptions).WordWrapIndentMax := edWordWrapIndentMax.Value;
|
||||||
|
(AOptions as TEditorOptions).WordWrapIndentMaxRel := edWordWrapIndentMaxRel.Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TEditorWordWrapOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
class function TEditorWordWrapOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
|
@ -1663,6 +1663,11 @@ resourcestring
|
|||||||
dlgOptWordWrapEndOfLine = 'end of line';
|
dlgOptWordWrapEndOfLine = 'end of line';
|
||||||
dlgOptWordWrapStartOfNextLine = 'start of next line';
|
dlgOptWordWrapStartOfNextLine = 'start of next line';
|
||||||
dlgOptWordWrapMinimumLineLength = 'Minimum line length';
|
dlgOptWordWrapMinimumLineLength = 'Minimum line length';
|
||||||
|
dlgOptWordWrapIndent = 'Indent width';
|
||||||
|
dlgOptWordWrapIndentIsOffest = 'Indent relative to text';
|
||||||
|
dlgOptWordWrapIndentMin = 'Minimum indent width';
|
||||||
|
dlgOptWordWrapIndentMax = 'Maximum indent width';
|
||||||
|
dlgOptWordWrapIndentMaxRel = 'Maximum indent width (percent)';
|
||||||
|
|
||||||
dlfMousePredefinedScheme = 'Use predefined scheme';
|
dlfMousePredefinedScheme = 'Use predefined scheme';
|
||||||
dlfNoPredefinedScheme = '< None >';
|
dlfNoPredefinedScheme = '< None >';
|
||||||
@ -2145,6 +2150,9 @@ resourcestring
|
|||||||
dlgAddHiAttrOutlineLevel8Color = 'Level 8';
|
dlgAddHiAttrOutlineLevel8Color = 'Level 8';
|
||||||
dlgAddHiAttrOutlineLevel9Color = 'Level 9';
|
dlgAddHiAttrOutlineLevel9Color = 'Level 9';
|
||||||
dlgAddHiAttrOutlineLevel10Color = 'Level 10';
|
dlgAddHiAttrOutlineLevel10Color = 'Level 10';
|
||||||
|
dlgAddHiAttrWrapIndent = 'Indent';
|
||||||
|
dlgAddHiAttrWrapEol = 'EOL';
|
||||||
|
dlgAddHiAttrWrapSupLine = 'Sub-line';
|
||||||
dlgAddHiSpecialVisibleChars = 'Visualized Special Chars';
|
dlgAddHiSpecialVisibleChars = 'Visualized Special Chars';
|
||||||
dlgTopInfoHint = 'Current Class/Proc Hint';
|
dlgTopInfoHint = 'Current Class/Proc Hint';
|
||||||
dlgCaretColor = 'Caret (Text-Cursor)';
|
dlgCaretColor = 'Caret (Text-Cursor)';
|
||||||
@ -2166,6 +2174,7 @@ resourcestring
|
|||||||
dlgAddHiAttrGroupText = 'Text';
|
dlgAddHiAttrGroupText = 'Text';
|
||||||
dlgAddHiAttrGroupLine = 'Line';
|
dlgAddHiAttrGroupLine = 'Line';
|
||||||
dlgAddHiAttrGroupGutter = 'Gutter';
|
dlgAddHiAttrGroupGutter = 'Gutter';
|
||||||
|
dlgAddHiAttrGroupWrap = 'Wrapping';
|
||||||
dlgAddHiAttrGroupSyncroEdit = 'Syncron Edit';
|
dlgAddHiAttrGroupSyncroEdit = 'Syncron Edit';
|
||||||
dlgAddHiAttrGroupTemplateEdit = 'Template Edit';
|
dlgAddHiAttrGroupTemplateEdit = 'Template Edit';
|
||||||
dlgAddHiAttrGroupIfDef = 'IfDef';
|
dlgAddHiAttrGroupIfDef = 'IfDef';
|
||||||
|
@ -74,11 +74,13 @@ type
|
|||||||
ahaIdentComplWindowEntryEnum, ahaIdentComplWindowEntryUnit, ahaIdentComplWindowEntryNameSpace,
|
ahaIdentComplWindowEntryEnum, ahaIdentComplWindowEntryUnit, ahaIdentComplWindowEntryNameSpace,
|
||||||
ahaIdentComplWindowEntryText, ahaIdentComplWindowEntryTempl, ahaIdentComplWindowEntryKeyword,
|
ahaIdentComplWindowEntryText, ahaIdentComplWindowEntryTempl, ahaIdentComplWindowEntryKeyword,
|
||||||
ahaIdentComplWindowEntryUnknown,
|
ahaIdentComplWindowEntryUnknown,
|
||||||
ahaOutlineLevel1Color, ahaOutlineLevel2Color, ahaOutlineLevel3Color, ahaOutlineLevel4Color, ahaOutlineLevel5Color, ahaOutlineLevel6Color, ahaOutlineLevel7Color, ahaOutlineLevel8Color, ahaOutlineLevel9Color, ahaOutlineLevel10Color
|
ahaOutlineLevel1Color, ahaOutlineLevel2Color, ahaOutlineLevel3Color, ahaOutlineLevel4Color, ahaOutlineLevel5Color, ahaOutlineLevel6Color, ahaOutlineLevel7Color, ahaOutlineLevel8Color, ahaOutlineLevel9Color, ahaOutlineLevel10Color,
|
||||||
|
ahaWrapIndend, ahaWrapEol, ahaWrapSubLine
|
||||||
);
|
);
|
||||||
|
|
||||||
TAhaGroupName = (
|
TAhaGroupName = (
|
||||||
agnDefault, agnLanguage, agnText, agnLine, agnGutter, agnTemplateMode, agnSyncronMode,
|
agnDefault, agnLanguage, agnText, agnLine, agnGutter, agnWrap,
|
||||||
|
agnTemplateMode, agnSyncronMode,
|
||||||
agnIfDef, agnIdentComplWindow, agnOutlineColors
|
agnIfDef, agnIdentComplWindow, agnOutlineColors
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -300,6 +300,11 @@ type
|
|||||||
procedure DoHighlightChanged(Sender: TSynEditStrings; {%H-}AIndex, {%H-}ACount : Integer);
|
procedure DoHighlightChanged(Sender: TSynEditStrings; {%H-}AIndex, {%H-}ACount : Integer);
|
||||||
procedure SetWordWrapCaretWrapPos(AValue: TLazSynEditWrapCaretPos);
|
procedure SetWordWrapCaretWrapPos(AValue: TLazSynEditWrapCaretPos);
|
||||||
procedure SetWordWrapEnabled(AValue: Boolean);
|
procedure SetWordWrapEnabled(AValue: Boolean);
|
||||||
|
procedure SetWordWrapIndent(AValue: Integer);
|
||||||
|
procedure SetWordWrapIndentMax(AValue: Integer);
|
||||||
|
procedure SetWordWrapIndentMaxRel(AValue: Integer);
|
||||||
|
procedure SetWordWrapIndentMin(AValue: Integer);
|
||||||
|
procedure SetWordWrapIndentUseOffset(AValue: boolean);
|
||||||
procedure SetWordWrapMinWidth(AValue: Integer);
|
procedure SetWordWrapMinWidth(AValue: Integer);
|
||||||
procedure SrcSynCaretChanged(Sender: TObject);
|
procedure SrcSynCaretChanged(Sender: TObject);
|
||||||
function GetHighlighter: TSynCustomFoldHighlighter;
|
function GetHighlighter: TSynCustomFoldHighlighter;
|
||||||
@ -346,9 +351,16 @@ type
|
|||||||
property CaretStamp: Int64 read FCaretStamp;
|
property CaretStamp: Int64 read FCaretStamp;
|
||||||
property CaretColor: TColor read FCaretColor write SetCaretColor;
|
property CaretColor: TColor read FCaretColor write SetCaretColor;
|
||||||
|
|
||||||
|
property WrapView: TLazSynSourceEditLineWrapPlugin read FWrapView;
|
||||||
property WordWrapEnabled: Boolean read GetWordWrapEnabled write SetWordWrapEnabled;
|
property WordWrapEnabled: Boolean read GetWordWrapEnabled write SetWordWrapEnabled;
|
||||||
property WordWrapCaretWrapPos: TLazSynEditWrapCaretPos write SetWordWrapCaretWrapPos;
|
property WordWrapCaretWrapPos: TLazSynEditWrapCaretPos write SetWordWrapCaretWrapPos;
|
||||||
property WordWrapMinWidth: Integer write SetWordWrapMinWidth;
|
property WordWrapMinWidth: Integer write SetWordWrapMinWidth;
|
||||||
|
|
||||||
|
property WordWrapIndent: Integer write SetWordWrapIndent;
|
||||||
|
property WordWrapIndentUseOffset: boolean write SetWordWrapIndentUseOffset;
|
||||||
|
property WordWrapIndentMin: Integer write SetWordWrapIndentMin;
|
||||||
|
property WordWrapIndentMax: Integer write SetWordWrapIndentMax;
|
||||||
|
property WordWrapIndentMaxRel: Integer write SetWordWrapIndentMaxRel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TIDESynHighlighterPasRangeList = class(TSynHighlighterPasRangeList)
|
TIDESynHighlighterPasRangeList = class(TSynHighlighterPasRangeList)
|
||||||
@ -1594,6 +1606,36 @@ begin
|
|||||||
RemoveLineWrapView;
|
RemoveLineWrapView;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TIDESynEditor.SetWordWrapIndent(AValue: Integer);
|
||||||
|
begin
|
||||||
|
if FWrapView <> nil then
|
||||||
|
FWrapView.WrapIndentWidth := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TIDESynEditor.SetWordWrapIndentMax(AValue: Integer);
|
||||||
|
begin
|
||||||
|
if FWrapView <> nil then
|
||||||
|
FWrapView.WrapIndentMaxAbs := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TIDESynEditor.SetWordWrapIndentMaxRel(AValue: Integer);
|
||||||
|
begin
|
||||||
|
if FWrapView <> nil then
|
||||||
|
FWrapView.WrapIndentMaxRel := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TIDESynEditor.SetWordWrapIndentMin(AValue: Integer);
|
||||||
|
begin
|
||||||
|
if FWrapView <> nil then
|
||||||
|
FWrapView.WrapIndentMinAbs := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TIDESynEditor.SetWordWrapIndentUseOffset(AValue: boolean);
|
||||||
|
begin
|
||||||
|
if FWrapView <> nil then
|
||||||
|
FWrapView.WrapIndentIsOffset := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TIDESynEditor.SetWordWrapMinWidth(AValue: Integer);
|
procedure TIDESynEditor.SetWordWrapMinWidth(AValue: Integer);
|
||||||
begin
|
begin
|
||||||
if FWrapView <> nil then
|
if FWrapView <> nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user