mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 17:17:52 +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,
|
||||
'', '', '', // ahaIdentComplWindowEntryText, ahaIdentComplWindowEntryTempl, ahaIdentComplWindowEntryKeyword,
|
||||
'', // ahaIdentComplWindowEntryUnknown,
|
||||
'', '', '', '', '', '', '', '', '', '' // ahaOutlineLevel1Color..ahaOutlineLevel10Color
|
||||
'', '', '', '', '', '', '', '', '', '', // ahaOutlineLevel1Color..ahaOutlineLevel10Color
|
||||
'', '', '' // ahaWrapIndend, ahaWrapEol, ahaWrapSubLine
|
||||
);
|
||||
|
||||
ahaGroupMap: array[TAdditionalHilightAttribute] of TAhaGroupName = (
|
||||
@ -222,7 +223,10 @@ const
|
||||
{ ahaOutlineLevel7Color } agnOutlineColors,
|
||||
{ ahaOutlineLevel8Color } agnOutlineColors,
|
||||
{ ahaOutlineLevel9Color } agnOutlineColors,
|
||||
{ ahaOutlineLevel10Color } agnOutlineColors
|
||||
{ ahaOutlineLevel10Color } agnOutlineColors,
|
||||
{ ahaWrapIndend } agnWrap,
|
||||
{ ahaWrapEol } agnWrap,
|
||||
{ ahaWrapSubLine } agnWrap
|
||||
|
||||
);
|
||||
ahaSupportedFeatures: array[TAdditionalHilightAttribute] of TColorSchemeAttributeFeatures =
|
||||
@ -302,7 +306,10 @@ const
|
||||
{ ahaFoldLevel7Color } [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],
|
||||
{ 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
|
||||
FWordWrapCaretWrapPos: TLazSynEditWrapCaretPos;
|
||||
FWordWrapEnabled: Boolean;
|
||||
FWordWrapIndent: Integer;
|
||||
FWordWrapIndentMax: Integer;
|
||||
FWordWrapIndentMaxRel: Integer;
|
||||
FWordWrapIndentMin: Integer;
|
||||
FWordWrapIndentUseOffset: boolean;
|
||||
FWordWrapMinWidth: Integer;
|
||||
|
||||
fUseTabHistory: Boolean;
|
||||
@ -1682,6 +1694,12 @@ type
|
||||
property WordWrapCaretWrapPos: TLazSynEditWrapCaretPos read FWordWrapCaretWrapPos write FWordWrapCaretWrapPos;
|
||||
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 MultiCaretOnColumnSelect: Boolean
|
||||
@ -3075,12 +3093,17 @@ begin
|
||||
AdditionalHighlightAttributes[ahaOutlineLevel10Color] := dlgAddHiAttrOutlineLevel10Color;
|
||||
AdditionalHighlightGroupNames[agnOutlineColors] := dlgAddHiAttrGroupOutlineColors;
|
||||
|
||||
AdditionalHighlightAttributes[ahaWrapIndend] := dlgAddHiAttrWrapIndent;
|
||||
AdditionalHighlightAttributes[ahaWrapEol] := dlgAddHiAttrWrapEol;
|
||||
AdditionalHighlightAttributes[ahaWrapSubLine] := dlgAddHiAttrWrapSupLine;
|
||||
|
||||
AdditionalHighlightGroupNames[agnDefault] := dlgAddHiAttrGroupDefault;
|
||||
AdditionalHighlightGroupNames[agnText] := dlgAddHiAttrGroupText;
|
||||
AdditionalHighlightGroupNames[agnLine] := dlgAddHiAttrGroupLine;
|
||||
AdditionalHighlightGroupNames[agnTemplateMode] := dlgAddHiAttrGroupTemplateEdit;
|
||||
AdditionalHighlightGroupNames[agnSyncronMode] := dlgAddHiAttrGroupSyncroEdit;
|
||||
AdditionalHighlightGroupNames[agnGutter] := dlgAddHiAttrGroupGutter;
|
||||
AdditionalHighlightGroupNames[agnWrap] := dlgAddHiAttrGroupWrap;
|
||||
end;
|
||||
|
||||
function StrToValidXMLName(const s: String): String;
|
||||
@ -5471,6 +5494,8 @@ begin
|
||||
fReverseFoldPopUpOrder := True;
|
||||
// wordwrap
|
||||
FWordWrapMinWidth := 10;
|
||||
FWordWrapIndentUseOffset := True;
|
||||
FWordWrapIndentMax := 8;
|
||||
// pas highlighter
|
||||
fPasExtendedKeywordsMode := False;
|
||||
fPasStringKeywordMode := spsmDefault;
|
||||
@ -6819,6 +6844,11 @@ begin
|
||||
TIDESynEditor(ASynEdit).WordWrapEnabled := WordWrapEnabled;
|
||||
TIDESynEditor(ASynEdit).WordWrapCaretWrapPos := WordWrapCaretWrapPos;
|
||||
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
|
||||
ASynEdit.Options := ASynEdit.Options - [eoScrollPastEol];
|
||||
ASynEdit.Options2 := ASynEdit.Options2 - [eoScrollPastEolAddPage, eoScrollPastEolAutoCaret];
|
||||
@ -7670,6 +7700,12 @@ begin
|
||||
col := $606060;
|
||||
TIDESynEditor(aSynEdit).MultiCaret.Color := col;
|
||||
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;
|
||||
SetMarkupColorByClass(ahaHighlightWord, TSynEditMarkupHighlightAllCaret);
|
||||
SetMarkupColorByClass(ahaWordGroup, TSynEditMarkupWordGroup);
|
||||
|
@ -3,11 +3,13 @@ object EditorWordWrapOptionsFrame: TEditorWordWrapOptionsFrame
|
||||
Height = 380
|
||||
Top = 0
|
||||
Width = 428
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 2
|
||||
ClientHeight = 380
|
||||
ClientWidth = 428
|
||||
TabOrder = 0
|
||||
DesignLeft = 534
|
||||
DesignTop = 48
|
||||
DesignLeft = 599
|
||||
DesignTop = 61
|
||||
object cbEnableWordWrap: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
@ -47,30 +49,188 @@ object EditorWordWrapOptionsFrame: TEditorWordWrapOptionsFrame
|
||||
Columns = 2
|
||||
TabOrder = 1
|
||||
end
|
||||
object lbWinWordWrapWidth: TLabel
|
||||
object Panel1: TPanel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = edWinWordWrapWidth
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideTop.Control = Panel2
|
||||
AnchorSideBottom.Control = Panel2
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 60
|
||||
Width = 120
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'lbWinWordWrapWidth'
|
||||
Height = 151
|
||||
Top = 56
|
||||
Width = 140
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
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
|
||||
object edWinWordWrapWidth: TSpinEdit
|
||||
AnchorSideLeft.Control = lbWinWordWrapWidth
|
||||
object Panel2: TPanel
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = rgCaretWrapPos
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 132
|
||||
Height = 23
|
||||
Left = 152
|
||||
Height = 151
|
||||
Top = 56
|
||||
Width = 124
|
||||
BorderSpacing.Around = 6
|
||||
MaxValue = 9999
|
||||
MinValue = 1
|
||||
TabOrder = 2
|
||||
Value = 10
|
||||
Width = 60
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 151
|
||||
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
|
||||
|
@ -11,7 +11,7 @@ uses
|
||||
IDEOptEditorIntf, IDEOptionsIntf, SynEditWrappedView,
|
||||
// IDE
|
||||
EditorOptions, LazarusIDEStrConsts
|
||||
;
|
||||
, Classes;
|
||||
|
||||
type
|
||||
|
||||
@ -19,9 +19,22 @@ type
|
||||
|
||||
TEditorWordWrapOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
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;
|
||||
edWinWordWrapWidth: TSpinEdit;
|
||||
procedure cbIndentIsOffsetChange(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
@ -38,6 +51,20 @@ implementation
|
||||
|
||||
{ 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;
|
||||
begin
|
||||
Result := dlgOptWordWrap;
|
||||
@ -49,7 +76,13 @@ begin
|
||||
rgCaretWrapPos.Caption := dlgOptWordWrapDisplayCaretAtWrapPositio;
|
||||
rgCaretWrapPos.Items.Add(dlgOptWordWrapEndOfLine);
|
||||
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;
|
||||
|
||||
procedure TEditorWordWrapOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||
@ -59,7 +92,13 @@ begin
|
||||
wcpEOL: rgCaretWrapPos.ItemIndex := 0;
|
||||
wcpBOL: rgCaretWrapPos.ItemIndex := 1;
|
||||
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;
|
||||
|
||||
procedure TEditorWordWrapOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||
@ -69,8 +108,13 @@ begin
|
||||
0: (AOptions as TEditorOptions).WordWrapCaretWrapPos := wcpEOL;
|
||||
1: (AOptions as TEditorOptions).WordWrapCaretWrapPos := wcpBOL;
|
||||
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;
|
||||
|
||||
class function TEditorWordWrapOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
|
@ -1663,6 +1663,11 @@ resourcestring
|
||||
dlgOptWordWrapEndOfLine = 'end of line';
|
||||
dlgOptWordWrapStartOfNextLine = 'start of next line';
|
||||
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';
|
||||
dlfNoPredefinedScheme = '< None >';
|
||||
@ -2145,6 +2150,9 @@ resourcestring
|
||||
dlgAddHiAttrOutlineLevel8Color = 'Level 8';
|
||||
dlgAddHiAttrOutlineLevel9Color = 'Level 9';
|
||||
dlgAddHiAttrOutlineLevel10Color = 'Level 10';
|
||||
dlgAddHiAttrWrapIndent = 'Indent';
|
||||
dlgAddHiAttrWrapEol = 'EOL';
|
||||
dlgAddHiAttrWrapSupLine = 'Sub-line';
|
||||
dlgAddHiSpecialVisibleChars = 'Visualized Special Chars';
|
||||
dlgTopInfoHint = 'Current Class/Proc Hint';
|
||||
dlgCaretColor = 'Caret (Text-Cursor)';
|
||||
@ -2166,6 +2174,7 @@ resourcestring
|
||||
dlgAddHiAttrGroupText = 'Text';
|
||||
dlgAddHiAttrGroupLine = 'Line';
|
||||
dlgAddHiAttrGroupGutter = 'Gutter';
|
||||
dlgAddHiAttrGroupWrap = 'Wrapping';
|
||||
dlgAddHiAttrGroupSyncroEdit = 'Syncron Edit';
|
||||
dlgAddHiAttrGroupTemplateEdit = 'Template Edit';
|
||||
dlgAddHiAttrGroupIfDef = 'IfDef';
|
||||
|
@ -74,11 +74,13 @@ type
|
||||
ahaIdentComplWindowEntryEnum, ahaIdentComplWindowEntryUnit, ahaIdentComplWindowEntryNameSpace,
|
||||
ahaIdentComplWindowEntryText, ahaIdentComplWindowEntryTempl, ahaIdentComplWindowEntryKeyword,
|
||||
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 = (
|
||||
agnDefault, agnLanguage, agnText, agnLine, agnGutter, agnTemplateMode, agnSyncronMode,
|
||||
agnDefault, agnLanguage, agnText, agnLine, agnGutter, agnWrap,
|
||||
agnTemplateMode, agnSyncronMode,
|
||||
agnIfDef, agnIdentComplWindow, agnOutlineColors
|
||||
);
|
||||
|
||||
|
@ -300,6 +300,11 @@ type
|
||||
procedure DoHighlightChanged(Sender: TSynEditStrings; {%H-}AIndex, {%H-}ACount : Integer);
|
||||
procedure SetWordWrapCaretWrapPos(AValue: TLazSynEditWrapCaretPos);
|
||||
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 SrcSynCaretChanged(Sender: TObject);
|
||||
function GetHighlighter: TSynCustomFoldHighlighter;
|
||||
@ -346,9 +351,16 @@ type
|
||||
property CaretStamp: Int64 read FCaretStamp;
|
||||
property CaretColor: TColor read FCaretColor write SetCaretColor;
|
||||
|
||||
property WrapView: TLazSynSourceEditLineWrapPlugin read FWrapView;
|
||||
property WordWrapEnabled: Boolean read GetWordWrapEnabled write SetWordWrapEnabled;
|
||||
property WordWrapCaretWrapPos: TLazSynEditWrapCaretPos write SetWordWrapCaretWrapPos;
|
||||
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;
|
||||
|
||||
TIDESynHighlighterPasRangeList = class(TSynHighlighterPasRangeList)
|
||||
@ -1594,6 +1606,36 @@ begin
|
||||
RemoveLineWrapView;
|
||||
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);
|
||||
begin
|
||||
if FWrapView <> nil then
|
||||
|
Loading…
Reference in New Issue
Block a user