mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 01:57:16 +01:00
Editor-Options: Put fold/DividerDraw on separate pages
git-svn-id: trunk@19485 -
This commit is contained in:
parent
5b3f0c001a
commit
717098fbae
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -2652,6 +2652,9 @@ ide/frames/editor_color_options.pas svneol=native#text/pascal
|
||||
ide/frames/editor_display_options.lfm svneol=native#text/plain
|
||||
ide/frames/editor_display_options.lrs svneol=native#text/plain
|
||||
ide/frames/editor_display_options.pas svneol=native#text/pascal
|
||||
ide/frames/editor_dividerdraw_options.lfm svneol=native#text/pascal
|
||||
ide/frames/editor_dividerdraw_options.lrs svneol=native#text/pascal
|
||||
ide/frames/editor_dividerdraw_options.pas svneol=native#text/pascal
|
||||
ide/frames/editor_general_misc_options.lfm svneol=native#text/plain
|
||||
ide/frames/editor_general_misc_options.lrs svneol=native#text/pascal
|
||||
ide/frames/editor_general_misc_options.pas svneol=native#text/pascal
|
||||
|
||||
@ -663,6 +663,10 @@ type
|
||||
procedure ReadDefaultsForHighlighterFoldSettings(Syn: TSrcIDEHighlighter);
|
||||
procedure WriteHighlighterFoldSettings(Syn: TSrcIDEHighlighter);
|
||||
|
||||
procedure ReadHighlighterDivDrawSettings(Syn: TSrcIDEHighlighter);
|
||||
procedure ReadDefaultsForHighlighterDivDrawSettings(Syn: TSrcIDEHighlighter);
|
||||
procedure WriteHighlighterDivDrawSettings(Syn: TSrcIDEHighlighter);
|
||||
|
||||
function GetLineColors(Syn: TSrcIDEHighlighter;
|
||||
AddHilightAttr: TAdditionalHilightAttribute; {TODO: MFR maybe remove?}
|
||||
out FG, BG: TColor; out Styles, StylesMask: TFontStyles): Boolean;
|
||||
@ -2397,7 +2401,6 @@ end;
|
||||
|
||||
procedure TEditorOptions.ReadHighlighterFoldSettings(Syn: TSrcIDEHighlighter);
|
||||
var
|
||||
TheInfo: TEditorOptionsDividerRecord;
|
||||
Conf: TSynDividerDrawConfig;
|
||||
ConfName: String;
|
||||
Path: String;
|
||||
@ -2408,24 +2411,9 @@ begin
|
||||
if h < 0 then
|
||||
h := HighlighterList.FindByName(Syn.LanguageName);
|
||||
if h < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[h].TheType];
|
||||
|
||||
ReadDefaultsForHighlighterFoldSettings(Syn);
|
||||
|
||||
// read settings, that are different from the defaults
|
||||
for i := 0 to TheInfo.Count - 1 do begin
|
||||
Conf := Syn.DividerDrawConfig[i];
|
||||
ConfName := TheInfo.Info^[i].Xml;
|
||||
Path := 'EditorOptions/DividerDraw/Lang' + StrToValidXMLName(Syn.LanguageName) +
|
||||
'/Type' + ConfName + '/' ;
|
||||
Conf.MaxDrawDepth := XMLConfig.GetValue(Path + 'MaxDepth/Value',
|
||||
Conf.MaxDrawDepth);
|
||||
Conf.TopColor := XMLConfig.GetValue(Path + 'TopColor/Value',
|
||||
Conf.TopColor);
|
||||
Conf.NestColor := XMLConfig.GetValue(Path + 'NestColor/Value',
|
||||
Conf.NestColor);
|
||||
end;
|
||||
|
||||
if (syn is TSynCustomFoldHighlighter) then begin
|
||||
TheFoldInfo := EditorOptionsFoldDefaults[HighlighterList[h].TheType];
|
||||
for i := 0 to TheFoldInfo.Count - 1 do begin
|
||||
@ -2441,7 +2429,6 @@ end;
|
||||
|
||||
procedure TEditorOptions.ReadDefaultsForHighlighterFoldSettings(Syn: TSrcIDEHighlighter);
|
||||
var
|
||||
TheInfo: TEditorOptionsDividerRecord;
|
||||
i, h: Integer;
|
||||
TheFoldInfo: TEditorOptionsFoldRecord;
|
||||
begin
|
||||
@ -2449,12 +2436,6 @@ begin
|
||||
if h < 0 then
|
||||
h := HighlighterList.FindByName(Syn.LanguageName);
|
||||
if h < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[h].TheType];
|
||||
for i := 0 to TheInfo.Count - 1 do begin
|
||||
Syn.DividerDrawConfig[i].MaxDrawDepth := TheInfo.Info^[i].MaxLeveL;
|
||||
Syn.DividerDrawConfig[i].TopColor := clDefault;
|
||||
Syn.DividerDrawConfig[i].NestColor := clDefault;
|
||||
end;
|
||||
if (syn is TSynCustomFoldHighlighter) then begin
|
||||
TheFoldInfo := EditorOptionsFoldDefaults[HighlighterList[h].TheType];
|
||||
for i := 0 to TheFoldInfo.Count - 1 do begin
|
||||
@ -2470,7 +2451,6 @@ var
|
||||
i, h: Integer;
|
||||
Path: String;
|
||||
Conf, DefConf: TSynDividerDrawConfig;
|
||||
TheInfo: TEditorOptionsDividerRecord;
|
||||
ConfName: String;
|
||||
TheFoldInfo: TEditorOptionsFoldRecord;
|
||||
begin
|
||||
@ -2478,24 +2458,10 @@ begin
|
||||
if h < 0 then
|
||||
h := HighlighterList.FindByName(Syn.LanguageName);
|
||||
if h < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[h].TheType];
|
||||
|
||||
DefSyn := TCustomSynClass(Syn.ClassType).Create(Nil);
|
||||
try
|
||||
ReadDefaultsForHighlighterFoldSettings(DefSyn);
|
||||
for i := 0 to TheInfo.Count - 1 do begin
|
||||
Conf := Syn.DividerDrawConfig[i];
|
||||
DefConf := DefSyn.DividerDrawConfig[i]; // default value
|
||||
ConfName := TheInfo.Info^[i].Xml;
|
||||
Path := 'EditorOptions/DividerDraw/Lang' +
|
||||
StrToValidXMLName(Syn.LanguageName) + '/Type' + ConfName + '/' ;
|
||||
XMLConfig.SetDeleteValue(Path + 'MaxDepth/Value', Conf.MaxDrawDepth,
|
||||
DefConf.MaxDrawDepth);
|
||||
XMLConfig.SetDeleteValue(Path + 'TopColor/Value', Conf.TopColor,
|
||||
DefConf.TopColor);
|
||||
XMLConfig.SetDeleteValue(Path + 'NestColor/Value', Conf.NestColor,
|
||||
DefConf.NestColor);
|
||||
end;
|
||||
|
||||
if (syn is TSynCustomFoldHighlighter) then begin
|
||||
TheFoldInfo := EditorOptionsFoldDefaults[HighlighterList[h].TheType];
|
||||
@ -2514,11 +2480,97 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.ReadHighlighterDivDrawSettings(Syn: TSrcIDEHighlighter);
|
||||
var
|
||||
TheInfo: TEditorOptionsDividerRecord;
|
||||
Conf: TSynDividerDrawConfig;
|
||||
ConfName: String;
|
||||
Path: String;
|
||||
i, h: Integer;
|
||||
begin
|
||||
h := HighlighterList.FindByHighlighter(Syn);
|
||||
if h < 0 then
|
||||
h := HighlighterList.FindByName(Syn.LanguageName);
|
||||
if h < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[h].TheType];
|
||||
|
||||
ReadDefaultsForHighlighterDivDrawSettings(Syn);
|
||||
|
||||
// read settings, that are different from the defaults
|
||||
for i := 0 to TheInfo.Count - 1 do begin
|
||||
Conf := Syn.DividerDrawConfig[i];
|
||||
ConfName := TheInfo.Info^[i].Xml;
|
||||
Path := 'EditorOptions/DividerDraw/Lang' + StrToValidXMLName(Syn.LanguageName) +
|
||||
'/Type' + ConfName + '/' ;
|
||||
Conf.MaxDrawDepth := XMLConfig.GetValue(Path + 'MaxDepth/Value',
|
||||
Conf.MaxDrawDepth);
|
||||
Conf.TopColor := XMLConfig.GetValue(Path + 'TopColor/Value',
|
||||
Conf.TopColor);
|
||||
Conf.NestColor := XMLConfig.GetValue(Path + 'NestColor/Value',
|
||||
Conf.NestColor);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.ReadDefaultsForHighlighterDivDrawSettings(Syn: TSrcIDEHighlighter);
|
||||
var
|
||||
TheInfo: TEditorOptionsDividerRecord;
|
||||
i, h: Integer;
|
||||
begin
|
||||
h := HighlighterList.FindByHighlighter(Syn);
|
||||
if h < 0 then
|
||||
h := HighlighterList.FindByName(Syn.LanguageName);
|
||||
if h < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[h].TheType];
|
||||
for i := 0 to TheInfo.Count - 1 do begin
|
||||
Syn.DividerDrawConfig[i].MaxDrawDepth := TheInfo.Info^[i].MaxLeveL;
|
||||
Syn.DividerDrawConfig[i].TopColor := clDefault;
|
||||
Syn.DividerDrawConfig[i].NestColor := clDefault;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.WriteHighlighterDivDrawSettings(Syn: TSrcIDEHighlighter);
|
||||
var
|
||||
DefSyn: TSrcIDEHighlighter;
|
||||
i, h: Integer;
|
||||
Path: String;
|
||||
Conf, DefConf: TSynDividerDrawConfig;
|
||||
TheInfo: TEditorOptionsDividerRecord;
|
||||
ConfName: String;
|
||||
begin
|
||||
h := HighlighterList.FindByHighlighter(Syn);
|
||||
if h < 0 then
|
||||
h := HighlighterList.FindByName(Syn.LanguageName);
|
||||
if h < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[h].TheType];
|
||||
|
||||
DefSyn := TCustomSynClass(Syn.ClassType).Create(Nil);
|
||||
try
|
||||
ReadDefaultsForHighlighterDivDrawSettings(DefSyn);
|
||||
for i := 0 to TheInfo.Count - 1 do begin
|
||||
Conf := Syn.DividerDrawConfig[i];
|
||||
DefConf := DefSyn.DividerDrawConfig[i]; // default value
|
||||
ConfName := TheInfo.Info^[i].Xml;
|
||||
Path := 'EditorOptions/DividerDraw/Lang' +
|
||||
StrToValidXMLName(Syn.LanguageName) + '/Type' + ConfName + '/' ;
|
||||
XMLConfig.SetDeleteValue(Path + 'MaxDepth/Value', Conf.MaxDrawDepth,
|
||||
DefConf.MaxDrawDepth);
|
||||
XMLConfig.SetDeleteValue(Path + 'TopColor/Value', Conf.TopColor,
|
||||
DefConf.TopColor);
|
||||
XMLConfig.SetDeleteValue(Path + 'NestColor/Value', Conf.NestColor,
|
||||
DefConf.NestColor);
|
||||
end;
|
||||
|
||||
finally
|
||||
DefSyn.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.GetHighlighterSettings(Syn: TSrcIDEHighlighter);
|
||||
// read highlight settings from config file
|
||||
begin
|
||||
ReadHighlighterSettings(Syn, '');
|
||||
ReadHighlighterFoldSettings(Syn);
|
||||
ReadHighlighterDivDrawSettings(Syn);
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.SetHighlighterSettings(Syn: TSrcIDEHighlighter);
|
||||
@ -2526,6 +2578,7 @@ procedure TEditorOptions.SetHighlighterSettings(Syn: TSrcIDEHighlighter);
|
||||
begin
|
||||
WriteHighlighterSettings(Syn, '');
|
||||
WriteHighlighterFoldSettings(Syn);
|
||||
WriteHighlighterDivDrawSettings(Syn);
|
||||
end;
|
||||
|
||||
function TEditorOptions.GetLineColors(Syn: TSrcIDEHighlighter;
|
||||
|
||||
@ -5,8 +5,6 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
ClientHeight = 334
|
||||
ClientWidth = 521
|
||||
Visible = False
|
||||
DesignLeft = 69
|
||||
DesignTop = 69
|
||||
object Bevel1: TBevel[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = chkCodeFoldingEnabled
|
||||
@ -20,254 +18,18 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
end
|
||||
object DividerConfPanel: TPanel[1]
|
||||
AnchorSideLeft.Control = Owner
|
||||
object LanguageLabel: TLabel[1]
|
||||
AnchorSideLeft.Control = LanguageComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LanguageComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 276
|
||||
Top = 58
|
||||
Width = 521
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 276
|
||||
ClientWidth = 521
|
||||
TabOrder = 2
|
||||
object LanguageLabel: TLabel
|
||||
AnchorSideLeft.Control = LanguageComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LanguageComboBox
|
||||
Left = 206
|
||||
Height = 16
|
||||
Top = 31
|
||||
Width = 81
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'LanguageLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object DividerBoolPanel: TPanel
|
||||
AnchorSideLeft.Control = DividerConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = DividerSpinPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 23
|
||||
ClientWidth = 315
|
||||
TabOrder = 1
|
||||
Visible = False
|
||||
object DividerOnOffCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = DividerBoolPanel
|
||||
AnchorSideTop.Control = DividerBoolPanel
|
||||
AnchorSideRight.Control = DividerBoolPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Caption = 'DividerOnOffCheckBox'
|
||||
OnChange = DividerOnOffCheckBoxChange
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object DividerSpinPanel: TPanel
|
||||
AnchorSideLeft.Control = DividerConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 23
|
||||
ClientWidth = 315
|
||||
TabOrder = 0
|
||||
object DividerSpinLabel: TLabel
|
||||
AnchorSideLeft.Control = DividerSpinEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerSpinEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = DividerSpinPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 53
|
||||
Height = 16
|
||||
Top = 3
|
||||
Width = 262
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 3
|
||||
Caption = 'DividerSpinLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object DividerSpinEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = DividerSpinPanel
|
||||
AnchorSideTop.Control = DividerSpinPanel
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 50
|
||||
OnChange = DividerSpinEditChange
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object NestLvlPanel: TPanel
|
||||
AnchorSideLeft.Control = DividerConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TopLvlPanel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 44
|
||||
Top = 80
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 44
|
||||
ClientWidth = 315
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object NestLvlColorLabel: TLabel
|
||||
AnchorSideLeft.Control = NestLvlPanel
|
||||
AnchorSideTop.Control = NestLvlPanel
|
||||
Left = 0
|
||||
Height = 16
|
||||
Top = 0
|
||||
Width = 97
|
||||
Caption = 'NestLvlColorLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object NestLvlColorBox: TColorBox
|
||||
AnchorSideLeft.Control = NestLvlPanel
|
||||
AnchorSideTop.Control = NestLvlColorLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 22
|
||||
Width = 100
|
||||
DefaultColorColor = clWhite
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 16
|
||||
ItemWidth = 0
|
||||
OnChange = NestLvlColorBoxChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object NestLvlColorCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = NestLvlColorBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = NestLvlColorBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 106
|
||||
Height = 19
|
||||
Top = 24
|
||||
Width = 129
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'NestLvlColorCheckBox'
|
||||
OnChange = NestLvlColorCheckBoxChange
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object TopLvlPanel: TPanel
|
||||
AnchorSideLeft.Control = DividerConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 44
|
||||
Top = 30
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 30
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 44
|
||||
ClientWidth = 315
|
||||
TabOrder = 3
|
||||
object TopLvlColorLabel: TLabel
|
||||
AnchorSideLeft.Control = TopLvlPanel
|
||||
AnchorSideTop.Control = TopLvlPanel
|
||||
Left = 0
|
||||
Height = 16
|
||||
Top = 0
|
||||
Width = 94
|
||||
Caption = 'TopLvlColorLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object TopLvlColorBox: TColorBox
|
||||
AnchorSideLeft.Control = TopLvlPanel
|
||||
AnchorSideTop.Control = TopLvlColorLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 22
|
||||
Width = 100
|
||||
DefaultColorColor = clWhite
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 16
|
||||
ItemWidth = 0
|
||||
OnChange = TopLvlColorBoxChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object TopLvlColorCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = TopLvlColorBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TopLvlColorBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 106
|
||||
Height = 19
|
||||
Top = 24
|
||||
Width = 126
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'TopLvlColorCheckBox'
|
||||
OnChange = TopLvlColorCheckBoxChange
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object DividerConfigListBox: TListBox
|
||||
AnchorSideLeft.Control = DividerConfPanel
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = DividerConfPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 276
|
||||
Top = 0
|
||||
Width = 200
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
ItemHeight = 0
|
||||
OnClick = DividerConfigListBoxClick
|
||||
OnSelectionChange = DividerConfigListBoxSelectionChange
|
||||
TabOrder = 4
|
||||
end
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 206
|
||||
Height = 16
|
||||
Top = 33
|
||||
Width = 81
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'LanguageLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object chkCodeFoldingEnabled: TCheckBox[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
@ -313,7 +75,7 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 276
|
||||
ClientWidth = 521
|
||||
TabOrder = 3
|
||||
TabOrder = 2
|
||||
object FoldConfigCheckListBox: TCheckListBox
|
||||
AnchorSideLeft.Control = FoldConfPanel
|
||||
AnchorSideTop.Control = FoldConfPanel
|
||||
@ -332,46 +94,4 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object ToolBar1: TToolBar[5]
|
||||
AnchorSideLeft.Control = LanguageComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LanguageComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 26
|
||||
Top = 28
|
||||
Width = 315
|
||||
Align = alNone
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ToolBar1'
|
||||
EdgeBorders = []
|
||||
TabOrder = 4
|
||||
object DividerSpeedButton: TSpeedButton
|
||||
Tag = 1
|
||||
Left = 1
|
||||
Height = 22
|
||||
Top = 2
|
||||
Width = 70
|
||||
Caption = 'Divider'
|
||||
Color = clBtnFace
|
||||
Down = True
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DividerSpeedButtonClick
|
||||
end
|
||||
object FoldSpeedButton: TSpeedButton
|
||||
Tag = 1
|
||||
Left = 71
|
||||
Height = 22
|
||||
Top = 2
|
||||
Width = 70
|
||||
Caption = 'Fold'
|
||||
Color = clBtnFace
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = FoldSpeedButtonClick
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -3,140 +3,38 @@
|
||||
LazarusResources.Add('TEditorCodefoldingOptionsFrame','FORMDATA',[
|
||||
'TPF0'#241#30'TEditorCodefoldingOptionsFrame'#29'EditorCodefoldingOptionsFram'
|
||||
+'e'#6'Height'#3'N'#1#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#0#12'ClientHeight'
|
||||
+#3'N'#1#11'ClientWidth'#3#9#2#7'Visible'#8#10'DesignLeft'#2'E'#9'DesignTop'#2
|
||||
+'E'#0#242#2#0#6'TBevel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'A'
|
||||
+'nchorSideTop.Control'#7#21'chkCodeFoldingEnabled'#18'AnchorSideTop.Side'#7#9
|
||||
+'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7
|
||||
+#9'asrBottom'#4'Left'#2#0#6'Height'#2#2#3'Top'#2#25#5'Width'#3#9#2#7'Anchors'
|
||||
+#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#6#0#0#242#2#1#6
|
||||
+'TPanel'#16'DividerConfPanel'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Ancho'
|
||||
+'rSideTop.Control'#7#16'LanguageComboBox'#18'AnchorSideTop.Side'#7#9'asrBott'
|
||||
+'om'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asr'
|
||||
+'Bottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7
|
||||
+#9'asrBottom'#4'Left'#2#0#6'Height'#3#20#1#3'Top'#2':'#5'Width'#3#9#2#7'Anch'
|
||||
+'ors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17'BorderSpacing.Top'#2
|
||||
+#6#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3#20#1#11'ClientWidth'#3#9#2#8
|
||||
+'TabOrder'#2#2#0#6'TLabel'#13'LanguageLabel'#22'AnchorSideLeft.Control'#7#16
|
||||
+'LanguageComboBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.C'
|
||||
+'ontrol'#7#16'LanguageComboBox'#4'Left'#3#206#0#6'Height'#2#16#3'Top'#2#31#5
|
||||
+'Width'#2'Q'#18'BorderSpacing.Left'#2#6#19'BorderSpacing.Right'#2#6#7'Captio'
|
||||
+'n'#6#13'LanguageLabel'#11'ParentColor'#8#0#0#6'TPanel'#16'DividerBoolPanel'
|
||||
+#22'AnchorSideLeft.Control'#7#20'DividerConfigListBox'#19'AnchorSideLeft.Sid'
|
||||
+'e'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#16'DividerConfPanel'#23'Ancho'
|
||||
+'rSideRight.Control'#7#16'DividerConfPanel'#20'AnchorSideRight.Side'#7#9'asr'
|
||||
+'Bottom'#24'AnchorSideBottom.Control'#7#16'DividerSpinPanel'#21'AnchorSideBo'
|
||||
+'ttom.Side'#7#9'asrBottom'#4'Left'#3#206#0#6'Height'#2#23#3'Top'#2#0#5'Width'
|
||||
+#3';'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'AutoSize'
|
||||
+#9#18'BorderSpacing.Left'#2#6#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2
|
||||
+#23#11'ClientWidth'#3';'#1#8'TabOrder'#2#1#7'Visible'#8#0#9'TCheckBox'#20'Di'
|
||||
+'viderOnOffCheckBox'#22'AnchorSideLeft.Control'#7#16'DividerBoolPanel'#21'An'
|
||||
+'chorSideTop.Control'#7#16'DividerBoolPanel'#23'AnchorSideRight.Control'#7#16
|
||||
+'DividerBoolPanel'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#0#6'Hei'
|
||||
+'ght'#2#19#3'Top'#2#0#5'Width'#3';'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akR'
|
||||
+'ight'#0#7'Caption'#6#20'DividerOnOffCheckBox'#8'OnChange'#7#26'DividerOnOff'
|
||||
+'CheckBoxChange'#8'TabOrder'#2#0#0#0#0#6'TPanel'#16'DividerSpinPanel'#22'Anc'
|
||||
+'horSideLeft.Control'#7#20'DividerConfigListBox'#19'AnchorSideLeft.Side'#7#9
|
||||
+'asrBottom'#21'AnchorSideTop.Control'#7#16'DividerConfPanel'#23'AnchorSideRi'
|
||||
+'ght.Control'#7#16'DividerConfPanel'#20'AnchorSideRight.Side'#7#9'asrBottom'
|
||||
+#4'Left'#3#206#0#6'Height'#2#23#3'Top'#2#0#5'Width'#3';'#1#7'Anchors'#11#5'a'
|
||||
+'kTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#6#10'Be'
|
||||
+'velOuter'#7#6'bvNone'#12'ClientHeight'#2#23#11'ClientWidth'#3';'#1#8'TabOrd'
|
||||
+'er'#2#0#0#6'TLabel'#16'DividerSpinLabel'#22'AnchorSideLeft.Control'#7#15'Di'
|
||||
+'viderSpinEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Cont'
|
||||
+'rol'#7#15'DividerSpinEdit'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorS'
|
||||
+'ideRight.Control'#7#16'DividerSpinPanel'#20'AnchorSideRight.Side'#7#9'asrBo'
|
||||
+'ttom'#4'Left'#2'5'#6'Height'#2#16#3'Top'#2#3#5'Width'#3#6#1#7'Anchors'#11#5
|
||||
+'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#3#7'Caption'#6#16'Di'
|
||||
+'viderSpinLabel'#11'ParentColor'#8#0#0#9'TSpinEdit'#15'DividerSpinEdit'#22'A'
|
||||
+'nchorSideLeft.Control'#7#16'DividerSpinPanel'#21'AnchorSideTop.Control'#7#16
|
||||
+'DividerSpinPanel'#4'Left'#2#0#6'Height'#2#23#3'Top'#2#0#5'Width'#2'2'#8'OnC'
|
||||
+'hange'#7#21'DividerSpinEditChange'#8'TabOrder'#2#0#0#0#0#6'TPanel'#12'NestL'
|
||||
+'vlPanel'#22'AnchorSideLeft.Control'#7#20'DividerConfigListBox'#19'AnchorSid'
|
||||
+'eLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#11'TopLvlPanel'#18'A'
|
||||
+'nchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#16'DividerC'
|
||||
+'onfPanel'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#206#0#6'Height'
|
||||
+#2','#3'Top'#2'P'#5'Width'#3';'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
|
||||
+#0#8'AutoSize'#9#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#10'Bev'
|
||||
+'elOuter'#7#6'bvNone'#12'ClientHeight'#2','#11'ClientWidth'#3';'#1#8'TabOrde'
|
||||
+'r'#2#2#7'Visible'#8#0#6'TLabel'#17'NestLvlColorLabel'#22'AnchorSideLeft.Con'
|
||||
+'trol'#7#12'NestLvlPanel'#21'AnchorSideTop.Control'#7#12'NestLvlPanel'#4'Lef'
|
||||
+'t'#2#0#6'Height'#2#16#3'Top'#2#0#5'Width'#2'a'#7'Caption'#6#17'NestLvlColor'
|
||||
+'Label'#11'ParentColor'#8#0#0#9'TColorBox'#15'NestLvlColorBox'#22'AnchorSide'
|
||||
+'Left.Control'#7#12'NestLvlPanel'#21'AnchorSideTop.Control'#7#17'NestLvlColo'
|
||||
+'rLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2#22#3
|
||||
+'Top'#2#22#5'Width'#2'd'#17'DefaultColorColor'#7#7'clWhite'#5'Style'#11#16'c'
|
||||
,'bStandardColors'#16'cbExtendedColors'#14'cbSystemColors'#16'cbIncludeDefaul'
|
||||
+'t'#13'cbCustomColor'#13'cbPrettyNames'#0#12'AutoComplete'#8#17'BorderSpacin'
|
||||
+'g.Top'#2#6#10'ItemHeight'#2#16#9'ItemWidth'#2#0#8'OnChange'#7#21'NestLvlCol'
|
||||
+'orBoxChange'#8'TabOrder'#2#0#0#0#9'TCheckBox'#20'NestLvlColorCheckBox'#22'A'
|
||||
+'nchorSideLeft.Control'#7#15'NestLvlColorBox'#19'AnchorSideLeft.Side'#7#9'as'
|
||||
+'rBottom'#21'AnchorSideTop.Control'#7#15'NestLvlColorBox'#18'AnchorSideTop.S'
|
||||
+'ide'#7#9'asrCenter'#4'Left'#2'j'#6'Height'#2#19#3'Top'#2#24#5'Width'#3#129#0
|
||||
+#18'BorderSpacing.Left'#2#6#7'Caption'#6#20'NestLvlColorCheckBox'#8'OnChange'
|
||||
+#7#26'NestLvlColorCheckBoxChange'#8'TabOrder'#2#1#0#0#0#6'TPanel'#11'TopLvlP'
|
||||
+'anel'#22'AnchorSideLeft.Control'#7#20'DividerConfigListBox'#19'AnchorSideLe'
|
||||
+'ft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#16'DividerConfPanel'#23
|
||||
+'AnchorSideRight.Control'#7#16'DividerConfPanel'#20'AnchorSideRight.Side'#7#9
|
||||
+'asrBottom'#4'Left'#3#206#0#6'Height'#2','#3'Top'#2#30#5'Width'#3';'#1#7'Anc'
|
||||
+'hors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#18'BorderSpacing.Lef'
|
||||
+'t'#2#6#17'BorderSpacing.Top'#2#30#10'BevelOuter'#7#6'bvNone'#12'ClientHeigh'
|
||||
+'t'#2','#11'ClientWidth'#3';'#1#8'TabOrder'#2#3#0#6'TLabel'#16'TopLvlColorLa'
|
||||
+'bel'#22'AnchorSideLeft.Control'#7#11'TopLvlPanel'#21'AnchorSideTop.Control'
|
||||
+#7#11'TopLvlPanel'#4'Left'#2#0#6'Height'#2#16#3'Top'#2#0#5'Width'#2'^'#7'Cap'
|
||||
+'tion'#6#16'TopLvlColorLabel'#11'ParentColor'#8#0#0#9'TColorBox'#14'TopLvlCo'
|
||||
+'lorBox'#22'AnchorSideLeft.Control'#7#11'TopLvlPanel'#21'AnchorSideTop.Contr'
|
||||
+'ol'#7#16'TopLvlColorLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#0
|
||||
+#6'Height'#2#22#3'Top'#2#22#5'Width'#2'd'#17'DefaultColorColor'#7#7'clWhite'
|
||||
+#5'Style'#11#16'cbStandardColors'#16'cbExtendedColors'#14'cbSystemColors'#16
|
||||
+'cbIncludeDefault'#13'cbCustomColor'#13'cbPrettyNames'#0#12'AutoComplete'#8
|
||||
+#17'BorderSpacing.Top'#2#6#10'ItemHeight'#2#16#9'ItemWidth'#2#0#8'OnChange'#7
|
||||
+#20'TopLvlColorBoxChange'#8'TabOrder'#2#0#0#0#9'TCheckBox'#19'TopLvlColorChe'
|
||||
+'ckBox'#22'AnchorSideLeft.Control'#7#14'TopLvlColorBox'#19'AnchorSideLeft.Si'
|
||||
+'de'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#14'TopLvlColorBox'#18'Anchor'
|
||||
+'SideTop.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Height'#2#19#3'Top'#2#24#5'Widt'
|
||||
+'h'#2'~'#18'BorderSpacing.Left'#2#6#7'Caption'#6#19'TopLvlColorCheckBox'#8'O'
|
||||
+'nChange'#7#25'TopLvlColorCheckBoxChange'#8'TabOrder'#2#1#0#0#0#8'TListBox'
|
||||
+#20'DividerConfigListBox'#22'AnchorSideLeft.Control'#7#16'DividerConfPanel'
|
||||
+#21'AnchorSideTop.Control'#7#16'DividerConfPanel'#20'AnchorSideRight.Side'#7
|
||||
+#9'asrBottom'#24'AnchorSideBottom.Control'#7#16'DividerConfPanel'#21'AnchorS'
|
||||
+'ideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#3#20#1#3'Top'#2#0#5'Wi'
|
||||
+'dth'#3#200#0#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#10'ItemHeight'#2
|
||||
+#0#7'OnClick'#7#25'DividerConfigListBoxClick'#17'OnSelectionChange'#7'#Divid'
|
||||
+'erConfigListBoxSelectionChange'#8'TabOrder'#2#4#0#0#0#242#2#2#9'TCheckBox'
|
||||
+#21'chkCodeFoldingEnabled'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSi'
|
||||
+'deTop.Control'#7#5'Owner'#4'Left'#2#0#6'Height'#2#19#3'Top'#2#0#5'Width'#3
|
||||
+#136#0#7'Caption'#6#21'chkCodeFoldingEnabled'#8'TabOrder'#2#0#0#0#242#2#3#9
|
||||
+'TComboBox'#16'LanguageComboBox'#22'AnchorSideLeft.Control'#7#5'Owner'#21'An'
|
||||
+'chorSideTop.Control'#7#6'Bevel1'#4'Left'#2#0#6'Height'#2#21#3'Top'#2#31#5'W'
|
||||
+'idth'#3#200#0#12'AutoComplete'#8#17'BorderSpacing.Top'#2#6#10'ItemHeight'#2
|
||||
+#13#9'ItemWidth'#2#0#8'OnChange'#7#22'LanguageComboBoxChange'#6'OnExit'#7#20
|
||||
+'LanguageComboBoxExit'#9'OnKeyDown'#7#23'LanguageComboBoxKeyDown'#8'TabOrder'
|
||||
+#2#1#4'Text'#6#16'LanguageComboBox'#0#0#242#2#4#6'TPanel'#13'FoldConfPanel'
|
||||
+#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#16'Langua'
|
||||
+'geComboBox'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Contro'
|
||||
+'l'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.C'
|
||||
+'ontrol'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6'H'
|
||||
+'eight'#3#20#1#3'Top'#2':'#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#6'akLeft'#7
|
||||
+'akRight'#8'akBottom'#0#17'BorderSpacing.Top'#2#6#10'BevelOuter'#7#6'bvNone'
|
||||
+#12'ClientHeight'#3#20#1#11'ClientWidth'#3#9#2#8'TabOrder'#2#3#0#13'TCheckLi'
|
||||
+'stBox'#22'FoldConfigCheckListBox'#22'AnchorSideLeft.Control'#7#13'FoldConfP'
|
||||
+'anel'#21'AnchorSideTop.Control'#7#13'FoldConfPanel'#24'AnchorSideBottom.Con'
|
||||
+'trol'#7#13'FoldConfPanel'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2
|
||||
+#0#6'Height'#3#20#1#3'Top'#2#0#5'Width'#3#200#0#7'Anchors'#11#5'akTop'#6'akL'
|
||||
+'eft'#8'akBottom'#0#14'ExtendedSelect'#8#10'ItemHeight'#2#0#12'OnClickCheck'
|
||||
+#7' FoldConfigCheckListBoxClickCheck'#6'OnExit'#7' FoldConfigCheckListBoxCli'
|
||||
+'ckCheck'#7'OnKeyUp'#7#27'FoldConfigCheckListBoxKeyUp'#8'TabOrder'#2#0#0#0#0
|
||||
+#242#2#5#8'TToolBar'#8'ToolBar1'#22'AnchorSideLeft.Control'#7#16'LanguageCom'
|
||||
+'boBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#16
|
||||
+'LanguageComboBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#23'AnchorSideRight.'
|
||||
,'Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#206#0
|
||||
+#6'Height'#2#26#3'Top'#2#28#5'Width'#3';'#1#5'Align'#7#6'alNone'#18'BorderSp'
|
||||
+'acing.Left'#2#6#7'Caption'#6#8'ToolBar1'#11'EdgeBorders'#11#0#8'TabOrder'#2
|
||||
+#4#0#12'TSpeedButton'#18'DividerSpeedButton'#3'Tag'#2#1#4'Left'#2#1#6'Height'
|
||||
+#2#22#3'Top'#2#2#5'Width'#2'F'#7'Caption'#6#7'Divider'#5'Color'#7#9'clBtnFac'
|
||||
+'e'#4'Down'#9#10'GroupIndex'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#23'DividerSpe'
|
||||
+'edButtonClick'#0#0#12'TSpeedButton'#15'FoldSpeedButton'#3'Tag'#2#1#4'Left'#2
|
||||
+'G'#6'Height'#2#22#3'Top'#2#2#5'Width'#2'F'#7'Caption'#6#4'Fold'#5'Color'#7#9
|
||||
+'clBtnFace'#10'GroupIndex'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#20'FoldSpeedBut'
|
||||
+'tonClick'#0#0#0#0
|
||||
+#3'N'#1#11'ClientWidth'#3#9#2#7'Visible'#8#0#242#2#0#6'TBevel'#6'Bevel1'#22
|
||||
+'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#21'chkCodeFo'
|
||||
+'ldingEnabled'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Cont'
|
||||
+'rol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#0#6'Heigh'
|
||||
+'t'#2#2#3'Top'#2#25#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRigh'
|
||||
+'t'#0#17'BorderSpacing.Top'#2#6#0#0#242#2#1#6'TLabel'#13'LanguageLabel'#22'A'
|
||||
+'nchorSideLeft.Control'#7#16'LanguageComboBox'#19'AnchorSideLeft.Side'#7#9'a'
|
||||
+'srBottom'#21'AnchorSideTop.Control'#7#16'LanguageComboBox'#18'AnchorSideTop'
|
||||
+'.Side'#7#9'asrCenter'#4'Left'#3#206#0#6'Height'#2#16#3'Top'#2'!'#5'Width'#2
|
||||
+'Q'#18'BorderSpacing.Left'#2#6#7'Caption'#6#13'LanguageLabel'#11'ParentColor'
|
||||
+#8#0#0#242#2#2#9'TCheckBox'#21'chkCodeFoldingEnabled'#22'AnchorSideLeft.Cont'
|
||||
+'rol'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#0#6'Height'#2
|
||||
+#19#3'Top'#2#0#5'Width'#3#136#0#7'Caption'#6#21'chkCodeFoldingEnabled'#8'Tab'
|
||||
+'Order'#2#0#0#0#242#2#3#9'TComboBox'#16'LanguageComboBox'#22'AnchorSideLeft.'
|
||||
+'Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#6'Bevel1'#4'Left'#2#0#6'Hei'
|
||||
+'ght'#2#21#3'Top'#2#31#5'Width'#3#200#0#12'AutoComplete'#8#17'BorderSpacing.'
|
||||
+'Top'#2#6#10'ItemHeight'#2#13#9'ItemWidth'#2#0#8'OnChange'#7#22'LanguageComb'
|
||||
+'oBoxChange'#6'OnExit'#7#20'LanguageComboBoxExit'#9'OnKeyDown'#7#23'Language'
|
||||
+'ComboBoxKeyDown'#8'TabOrder'#2#1#4'Text'#6#16'LanguageComboBox'#0#0#242#2#4
|
||||
+#6'TPanel'#13'FoldConfPanel'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Anchor'
|
||||
+'SideTop.Control'#7#16'LanguageComboBox'#18'AnchorSideTop.Side'#7#9'asrBotto'
|
||||
+'m'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrB'
|
||||
+'ottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9
|
||||
+'asrBottom'#4'Left'#2#0#6'Height'#3#20#1#3'Top'#2':'#5'Width'#3#9#2#7'Anchor'
|
||||
+'s'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17'BorderSpacing.Top'#2#6
|
||||
+#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3#20#1#11'ClientWidth'#3#9#2#8
|
||||
+'TabOrder'#2#2#0#13'TCheckListBox'#22'FoldConfigCheckListBox'#22'AnchorSideL'
|
||||
+'eft.Control'#7#13'FoldConfPanel'#21'AnchorSideTop.Control'#7#13'FoldConfPan'
|
||||
+'el'#24'AnchorSideBottom.Control'#7#13'FoldConfPanel'#21'AnchorSideBottom.Si'
|
||||
+'de'#7#9'asrBottom'#4'Left'#2#0#6'Height'#3#20#1#3'Top'#2#0#5'Width'#3#200#0
|
||||
+#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#14'ExtendedSelect'#8#10'Item'
|
||||
+'Height'#2#0#12'OnClickCheck'#7' FoldConfigCheckListBoxClickCheck'#6'OnExit'
|
||||
+#7' FoldConfigCheckListBoxClickCheck'#7'OnKeyUp'#7#27'FoldConfigCheckListBox'
|
||||
+'KeyUp'#8'TabOrder'#2#0#0#0#0#0
|
||||
]);
|
||||
|
||||
@ -37,48 +37,18 @@ type
|
||||
Bevel1: TBevel;
|
||||
FoldConfigCheckListBox: TCheckListBox;
|
||||
FoldConfPanel: TPanel;
|
||||
DividerSpeedButton: TSpeedButton;
|
||||
FoldSpeedButton: TSpeedButton;
|
||||
ToolBar1: TToolBar;
|
||||
TopLvlPanel: TPanel;
|
||||
TopLvlColorCheckBox: TCheckBox;
|
||||
NestLvlColorCheckBox: TCheckBox;
|
||||
TopLvlColorBox: TColorBox;
|
||||
NestLvlColorBox: TColorBox;
|
||||
DividerOnOffCheckBox: TCheckBox;
|
||||
chkCodeFoldingEnabled: TCheckBox;
|
||||
DividerSpinLabel: TLabel;
|
||||
TopLvlColorLabel: TLabel;
|
||||
NestLvlColorLabel: TLabel;
|
||||
LanguageComboBox: TComboBox;
|
||||
LanguageLabel: TLabel;
|
||||
DividerConfigListBox: TListBox;
|
||||
DividerConfPanel: TPanel;
|
||||
DividerSpinPanel: TPanel;
|
||||
DividerBoolPanel: TPanel;
|
||||
DividerSpinEdit: TSpinEdit;
|
||||
NestLvlPanel: TPanel;
|
||||
procedure DividerOnOffCheckBoxChange(Sender: TObject);
|
||||
procedure DividerSpeedButtonClick(Sender: TObject);
|
||||
procedure DividerSpinEditChange(Sender: TObject);
|
||||
procedure DividerConfigListBoxClick(Sender: TObject);
|
||||
procedure DividerConfigListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
LanguageComboBox: TComboBox;
|
||||
procedure FoldConfigCheckListBoxClickCheck(Sender: TObject);
|
||||
procedure FoldConfigCheckListBoxKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure FoldSpeedButtonClick(Sender: TObject);
|
||||
procedure LanguageComboBoxChange(Sender: TObject);
|
||||
procedure LanguageComboBoxExit(Sender: TObject);
|
||||
procedure LanguageComboBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure NestLvlColorBoxChange(Sender: TObject);
|
||||
procedure NestLvlColorCheckBoxChange(Sender: TObject);
|
||||
procedure TopLvlColorBoxChange(Sender: TObject);
|
||||
procedure TopLvlColorCheckBoxChange(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
FHighlighters: array[TLazSyntaxHighlighter] of TSrcIDEHighlighter;
|
||||
FCurHighlighter: TSrcIDEHighlighter;
|
||||
FCurDividerConf: TSynDividerDrawConfig;
|
||||
FCurDivInfo: TEditorOptionsDividerRecord;
|
||||
FCurFoldInfo: TEditorOptionsFoldRecord;
|
||||
protected
|
||||
function GetHighlighter(SynType: TLazSyntaxHighlighter;
|
||||
@ -115,32 +85,13 @@ procedure TEditorCodefoldingOptionsFrame.LanguageComboBoxExit(Sender: TObject);
|
||||
var
|
||||
ComboBox: TComboBox absolute Sender;
|
||||
tp: TLazSyntaxHighlighter;
|
||||
i: Integer;
|
||||
begin
|
||||
tp := EditorOpts.HighlighterList
|
||||
[EditorOpts.HighlighterList.FindByName(ComboBox.Text)].TheType;
|
||||
FCurHighlighter := GetHighlighter(tp, True);
|
||||
FCurDivInfo := EditorOptionsDividerDefaults[tp];
|
||||
FCurFoldInfo := EditorOptionsFoldDefaults[tp];
|
||||
|
||||
DividerSpeedButton.Enabled := FCurDivInfo.Count > 0;
|
||||
FoldSpeedButton.Enabled := FCurFoldInfo.Count > 0;
|
||||
|
||||
if DividerSpeedButton.Enabled and
|
||||
(DividerSpeedButton.Down or not FoldSpeedButton.Enabled) then begin
|
||||
DividerSpeedButton.Down := true;
|
||||
DividerSpeedButtonClick(DividerSpeedButton)
|
||||
end else begin
|
||||
FoldSpeedButton.Down := true;
|
||||
FoldSpeedButtonClick(FoldSpeedButton);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.FoldSpeedButtonClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
FoldConfPanel.Visible := true;
|
||||
DividerConfPanel.Visible := False;
|
||||
FoldConfigCheckListBox.Clear;
|
||||
if not (assigned(FCurHighlighter) and
|
||||
(FCurHighlighter is TSynCustomFoldHighlighter)) then exit;
|
||||
@ -168,126 +119,6 @@ begin
|
||||
FoldConfigCheckListBoxClickCheck(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.DividerSpeedButtonClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
FoldConfPanel.Visible := False;
|
||||
DividerConfPanel.Visible := True;
|
||||
|
||||
DividerConfigListBox.Clear;
|
||||
for i := 0 to FCurDivInfo.Count - 1 do
|
||||
DividerConfigListBox.Items.add(FCurDivInfo.Info^[i].Name);
|
||||
DividerConfigListBox.ItemIndex := 0;
|
||||
DividerConfigListBoxSelectionChange(Sender, True);
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.DividerConfigListBoxClick(Sender: TObject);
|
||||
begin
|
||||
DividerConfigListBoxSelectionChange(Sender, True);
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.DividerConfigListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
var
|
||||
ListBox: TListBox absolute Sender;
|
||||
i: LongInt;
|
||||
NewDiv: TSynDividerDrawConfig;
|
||||
b: Boolean;
|
||||
begin
|
||||
if not assigned(FCurHighlighter) then exit;
|
||||
i := ListBox.ItemIndex;
|
||||
if (i < 0) or (i >= FCurDivInfo.Count) then exit;
|
||||
NewDiv := FCurHighlighter.DividerDrawConfig[i];
|
||||
FCurDividerConf := nil;
|
||||
|
||||
b := FCurDivInfo.Info^[i].BoolOpt;
|
||||
DividerBoolPanel.Visible := b;
|
||||
DividerSpinPanel.Visible := not b;
|
||||
NestLvlPanel.Visible := not b;
|
||||
DividerOnOffCheckBox.Checked := NewDiv.MaxDrawDepth > 0;
|
||||
DividerSpinEdit.Value := NewDiv.MaxDrawDepth;
|
||||
|
||||
TopLvlColorBox.Selected := NewDiv.TopColor;
|
||||
TopLvlColorBox.Tag := TopLvlColorBox.Selected;
|
||||
TopLvlColorCheckBox.Checked := NewDiv.TopColor = clDefault;
|
||||
TopLvlPanel.Enabled := NewDiv.MaxDrawDepth > 0;
|
||||
|
||||
NestLvlColorBox.Selected := NewDiv.NestColor;
|
||||
NestLvlColorBox.Tag := NestLvlColorBox.Selected;
|
||||
NestLvlColorCheckBox.Checked := NewDiv.NestColor = clDefault;
|
||||
NestLvlPanel.Enabled := NewDiv.MaxDrawDepth > 1;
|
||||
|
||||
FCurDividerConf := NewDiv;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.DividerOnOffCheckBoxChange(Sender: TObject);
|
||||
var
|
||||
Box: TCheckBox absolute Sender;
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
if Box.Checked then
|
||||
FCurDividerConf.MaxDrawDepth := 1
|
||||
else
|
||||
FCurDividerConf.MaxDrawDepth := 0;
|
||||
TopLvlPanel.Enabled := FCurDividerConf.MaxDrawDepth > 0;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.DividerSpinEditChange(Sender: TObject);
|
||||
var
|
||||
Spin: TSpinEdit absolute Sender;
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
FCurDividerConf.MaxDrawDepth := Spin.Value;
|
||||
TopLvlPanel.Enabled := FCurDividerConf.MaxDrawDepth > 0;
|
||||
NestLvlPanel.Enabled := FCurDividerConf.MaxDrawDepth > 1;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.NestLvlColorBoxChange(Sender: TObject);
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
FCurDividerConf.NestColor := NestLvlColorBox.Selected;
|
||||
if NestLvlColorBox.Selected <> clDefault then
|
||||
NestLvlColorBox.Tag := NestLvlColorBox.Selected;
|
||||
NestLvlColorCheckBox.Checked := NestLvlColorBox.Selected = clDefault;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.NestLvlColorCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
if NestLvlColorCheckBox.Checked then begin
|
||||
FCurDividerConf.NestColor := clDefault;
|
||||
if NestLvlColorBox.Selected <> clDefault then
|
||||
NestLvlColorBox.Selected := clDefault;
|
||||
end else begin
|
||||
FCurDividerConf.NestColor := NestLvlColorBox.Tag;
|
||||
if NestLvlColorBox.Selected <> NestLvlColorBox.Tag then
|
||||
NestLvlColorBox.Selected := NestLvlColorBox.Tag;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.TopLvlColorBoxChange(Sender: TObject);
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
FCurDividerConf.TopColor := TopLvlColorBox.Selected;
|
||||
if TopLvlColorBox.Selected <> clDefault then
|
||||
TopLvlColorBox.Tag := TopLvlColorBox.Selected;
|
||||
TopLvlColorCheckBox.Checked := TopLvlColorBox.Selected = clDefault;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.TopLvlColorCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
if TopLvlColorCheckBox.Checked then begin
|
||||
FCurDividerConf.TopColor := clDefault;
|
||||
if TopLvlColorBox.Selected <> clDefault then
|
||||
TopLvlColorBox.Selected := clDefault;
|
||||
end else begin
|
||||
FCurDividerConf.TopColor := TopLvlColorBox.Tag;
|
||||
if TopLvlColorBox.Selected <> TopLvlColorBox.Tag then
|
||||
TopLvlColorBox.Selected := TopLvlColorBox.Tag;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TEditorCodefoldingOptionsFrame.GetHighlighter(SynType: TLazSyntaxHighlighter;
|
||||
CreateIfNotExists: Boolean): TSrcIDEHighlighter;
|
||||
var
|
||||
@ -325,21 +156,12 @@ procedure TEditorCodefoldingOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDi
|
||||
begin
|
||||
chkCodeFoldingEnabled.Caption := dlgUseCodeFolding;
|
||||
LanguageLabel.Caption := dlgLang;
|
||||
DividerSpinLabel.Caption := dlgDividerDrawDepth;
|
||||
DividerOnOffCheckBox.Caption := dlgDividerOnOff;
|
||||
TopLvlColorLabel.Caption := dlgDividerTopColor;
|
||||
TopLvlColorCheckBox.Caption := dlgDividerTopColorDefault;
|
||||
NestLvlColorLabel.Caption := dlgDividerNestColor;
|
||||
NestLvlColorCheckBox.Caption := dlgDividerNestColorDefault;
|
||||
DividerSpeedButton.Caption := dlgDividerConf;
|
||||
FoldSpeedButton.Caption := dlgfoldConf;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.ReadSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
i: Integer;
|
||||
rd: TEditorOptionsDividerRecord;
|
||||
rf: TEditorOptionsFoldRecord;
|
||||
begin
|
||||
with AOptions as TEditorOptions do
|
||||
@ -349,9 +171,8 @@ begin
|
||||
with LanguageComboBox.Items do begin
|
||||
BeginUpdate;
|
||||
for i := 0 to EditorOpts.HighlighterList.Count - 1 do begin
|
||||
rd := EditorOptionsDividerDefaults[HighlighterList[i].TheType];
|
||||
rf := EditorOptionsFoldDefaults[HighlighterList[i].TheType];
|
||||
if (rd.Count > 0) or (rf.Count > 0) then
|
||||
if (rf.Count > 0) then
|
||||
Add(HighlighterList[i].SynClass.GetLanguageName);
|
||||
end;
|
||||
EndUpdate;
|
||||
|
||||
242
ide/frames/editor_dividerdraw_options.lfm
Normal file
242
ide/frames/editor_dividerdraw_options.lfm
Normal file
@ -0,0 +1,242 @@
|
||||
inherited EditorDividerDrawOptionsFrame: TEditorDividerDrawOptionsFrame
|
||||
Height = 334
|
||||
Width = 521
|
||||
Anchors = [akTop]
|
||||
ClientHeight = 334
|
||||
ClientWidth = 521
|
||||
Visible = False
|
||||
DesignLeft = 207
|
||||
DesignTop = 207
|
||||
object LanguageLabel: TLabel[0]
|
||||
AnchorSideLeft.Control = LanguageComboBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = LanguageComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 206
|
||||
Height = 16
|
||||
Top = 8
|
||||
Width = 81
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'LanguageLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object DividerConfPanel: TPanel[1]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = LanguageComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 301
|
||||
Top = 33
|
||||
Width = 521
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 301
|
||||
ClientWidth = 521
|
||||
TabOrder = 1
|
||||
object DividerSpinPanel: TPanel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 23
|
||||
ClientWidth = 315
|
||||
TabOrder = 1
|
||||
object DividerSpinLabel: TLabel
|
||||
AnchorSideLeft.Control = DividerSpinEdit
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerSpinEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = DividerSpinPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 53
|
||||
Height = 16
|
||||
Top = 3
|
||||
Width = 262
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 3
|
||||
Caption = 'DividerSpinLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object DividerSpinEdit: TSpinEdit
|
||||
AnchorSideLeft.Control = DividerSpinPanel
|
||||
AnchorSideTop.Control = DividerSpinPanel
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 50
|
||||
OnChange = DividerSpinEditChange
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object NestLvlPanel: TPanel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TopLvlPanel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 44
|
||||
Top = 79
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 44
|
||||
ClientWidth = 315
|
||||
TabOrder = 2
|
||||
Visible = False
|
||||
object NestLvlColorLabel: TLabel
|
||||
AnchorSideLeft.Control = NestLvlPanel
|
||||
AnchorSideTop.Control = NestLvlPanel
|
||||
Left = 0
|
||||
Height = 16
|
||||
Top = 0
|
||||
Width = 97
|
||||
Caption = 'NestLvlColorLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object NestLvlColorBox: TColorBox
|
||||
AnchorSideLeft.Control = NestLvlPanel
|
||||
AnchorSideTop.Control = NestLvlColorLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 22
|
||||
Width = 100
|
||||
DefaultColorColor = clWhite
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 16
|
||||
ItemWidth = 0
|
||||
OnChange = NestLvlColorBoxChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object NestLvlColorCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = NestLvlColorBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = NestLvlColorBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 106
|
||||
Height = 19
|
||||
Top = 24
|
||||
Width = 129
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'NestLvlColorCheckBox'
|
||||
OnChange = NestLvlColorCheckBoxChange
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object TopLvlPanel: TPanel
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerSpinPanel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 44
|
||||
Top = 29
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 44
|
||||
ClientWidth = 315
|
||||
TabOrder = 3
|
||||
object TopLvlColorLabel: TLabel
|
||||
AnchorSideLeft.Control = TopLvlPanel
|
||||
AnchorSideTop.Control = TopLvlPanel
|
||||
Left = 0
|
||||
Height = 16
|
||||
Top = 0
|
||||
Width = 94
|
||||
Caption = 'TopLvlColorLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object TopLvlColorBox: TColorBox
|
||||
AnchorSideLeft.Control = TopLvlPanel
|
||||
AnchorSideTop.Control = TopLvlColorLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 22
|
||||
Top = 22
|
||||
Width = 100
|
||||
DefaultColorColor = clWhite
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeDefault, cbCustomColor, cbPrettyNames]
|
||||
AutoComplete = False
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 16
|
||||
ItemWidth = 0
|
||||
OnChange = TopLvlColorBoxChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object TopLvlColorCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = TopLvlColorBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TopLvlColorBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 106
|
||||
Height = 19
|
||||
Top = 24
|
||||
Width = 126
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'TopLvlColorCheckBox'
|
||||
OnChange = TopLvlColorCheckBoxChange
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object DividerConfigListBox: TCheckListBox
|
||||
AnchorSideLeft.Control = DividerConfPanel
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = DividerConfPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 301
|
||||
Top = 0
|
||||
Width = 200
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
ExtendedSelect = False
|
||||
ItemHeight = 0
|
||||
OnClick = DividerConfigListBoxClick
|
||||
OnExit = DividerConfigListBoxClick
|
||||
OnKeyUp = DividerConfigListBoxKeyUp
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object LanguageComboBox: TComboBox[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 6
|
||||
Width = 200
|
||||
AutoComplete = False
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 13
|
||||
ItemWidth = 0
|
||||
OnChange = LanguageComboBoxChange
|
||||
OnExit = LanguageComboBoxExit
|
||||
OnKeyDown = LanguageComboBoxKeyDown
|
||||
TabOrder = 0
|
||||
Text = 'LanguageComboBox'
|
||||
end
|
||||
end
|
||||
93
ide/frames/editor_dividerdraw_options.lrs
Normal file
93
ide/frames/editor_dividerdraw_options.lrs
Normal file
@ -0,0 +1,93 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TEditorDividerDrawOptionsFrame','FORMDATA',[
|
||||
'TPF0'#241#30'TEditorDividerDrawOptionsFrame'#29'EditorDividerDrawOptionsFram'
|
||||
+'e'#6'Height'#3'N'#1#5'Width'#3#9#2#7'Anchors'#11#5'akTop'#0#12'ClientHeight'
|
||||
+#3'N'#1#11'ClientWidth'#3#9#2#7'Visible'#8#10'DesignLeft'#3#207#0#9'DesignTo'
|
||||
+'p'#3#207#0#0#242#2#0#6'TLabel'#13'LanguageLabel'#22'AnchorSideLeft.Control'
|
||||
+#7#16'LanguageComboBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSide'
|
||||
+'Top.Control'#7#16'LanguageComboBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4
|
||||
+'Left'#3#206#0#6'Height'#2#16#3'Top'#2#8#5'Width'#2'Q'#18'BorderSpacing.Left'
|
||||
+#2#6#19'BorderSpacing.Right'#2#6#7'Caption'#6#13'LanguageLabel'#11'ParentCol'
|
||||
+'or'#8#0#0#242#2#1#6'TPanel'#16'DividerConfPanel'#22'AnchorSideLeft.Control'
|
||||
+#7#5'Owner'#21'AnchorSideTop.Control'#7#16'LanguageComboBox'#18'AnchorSideTo'
|
||||
+'p.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSide'
|
||||
+'Right.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'Ancho'
|
||||
+'rSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#3'-'#1#3'Top'#2'!'#5
|
||||
+'Width'#3#9#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17'B'
|
||||
+'orderSpacing.Top'#2#6#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#3'-'#1#11
|
||||
+'ClientWidth'#3#9#2#8'TabOrder'#2#1#0#6'TPanel'#16'DividerSpinPanel'#19'Anch'
|
||||
+'orSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#16'DividerConfP'
|
||||
+'anel'#23'AnchorSideRight.Control'#7#16'DividerConfPanel'#20'AnchorSideRight'
|
||||
+'.Side'#7#9'asrBottom'#4'Left'#3#206#0#6'Height'#2#23#3'Top'#2#0#5'Width'#3
|
||||
+';'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#18'BorderS'
|
||||
+'pacing.Left'#2#6#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2#23#11'Client'
|
||||
+'Width'#3';'#1#8'TabOrder'#2#1#0#6'TLabel'#16'DividerSpinLabel'#22'AnchorSid'
|
||||
+'eLeft.Control'#7#15'DividerSpinEdit'#19'AnchorSideLeft.Side'#7#9'asrBottom'
|
||||
+#21'AnchorSideTop.Control'#7#15'DividerSpinEdit'#18'AnchorSideTop.Side'#7#9
|
||||
+'asrCenter'#23'AnchorSideRight.Control'#7#16'DividerSpinPanel'#20'AnchorSide'
|
||||
+'Right.Side'#7#9'asrBottom'#4'Left'#2'5'#6'Height'#2#16#3'Top'#2#3#5'Width'#3
|
||||
+#6#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#3
|
||||
+#7'Caption'#6#16'DividerSpinLabel'#11'ParentColor'#8#0#0#9'TSpinEdit'#15'Div'
|
||||
+'iderSpinEdit'#22'AnchorSideLeft.Control'#7#16'DividerSpinPanel'#21'AnchorSi'
|
||||
+'deTop.Control'#7#16'DividerSpinPanel'#4'Left'#2#0#6'Height'#2#23#3'Top'#2#0
|
||||
+#5'Width'#2'2'#8'OnChange'#7#21'DividerSpinEditChange'#8'TabOrder'#2#0#0#0#0
|
||||
+#6'TPanel'#12'NestLvlPanel'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'Anchor'
|
||||
+'SideTop.Control'#7#11'TopLvlPanel'#18'AnchorSideTop.Side'#7#9'asrBottom'#23
|
||||
+'AnchorSideRight.Control'#7#16'DividerConfPanel'#20'AnchorSideRight.Side'#7#9
|
||||
+'asrBottom'#4'Left'#3#206#0#6'Height'#2','#3'Top'#2'O'#5'Width'#3';'#1#7'Anc'
|
||||
+'hors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#18'BorderSpacing.Lef'
|
||||
+'t'#2#6#17'BorderSpacing.Top'#2#6#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'
|
||||
+#2','#11'ClientWidth'#3';'#1#8'TabOrder'#2#2#7'Visible'#8#0#6'TLabel'#17'Nes'
|
||||
+'tLvlColorLabel'#22'AnchorSideLeft.Control'#7#12'NestLvlPanel'#21'AnchorSide'
|
||||
+'Top.Control'#7#12'NestLvlPanel'#4'Left'#2#0#6'Height'#2#16#3'Top'#2#0#5'Wid'
|
||||
+'th'#2'a'#7'Caption'#6#17'NestLvlColorLabel'#11'ParentColor'#8#0#0#9'TColorB'
|
||||
+'ox'#15'NestLvlColorBox'#22'AnchorSideLeft.Control'#7#12'NestLvlPanel'#21'An'
|
||||
+'chorSideTop.Control'#7#17'NestLvlColorLabel'#18'AnchorSideTop.Side'#7#9'asr'
|
||||
+'Bottom'#4'Left'#2#0#6'Height'#2#22#3'Top'#2#22#5'Width'#2'd'#17'DefaultColo'
|
||||
+'rColor'#7#7'clWhite'#5'Style'#11#16'cbStandardColors'#16'cbExtendedColors'
|
||||
+#14'cbSystemColors'#16'cbIncludeDefault'#13'cbCustomColor'#13'cbPrettyNames'
|
||||
+#0#12'AutoComplete'#8#17'BorderSpacing.Top'#2#6#10'ItemHeight'#2#16#9'ItemWi'
|
||||
+'dth'#2#0#8'OnChange'#7#21'NestLvlColorBoxChange'#8'TabOrder'#2#0#0#0#9'TChe'
|
||||
+'ckBox'#20'NestLvlColorCheckBox'#22'AnchorSideLeft.Control'#7#15'NestLvlColo'
|
||||
+'rBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#15
|
||||
+'NestLvlColorBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Heigh'
|
||||
+'t'#2#19#3'Top'#2#24#5'Width'#3#129#0#18'BorderSpacing.Left'#2#6#7'Caption'#6
|
||||
+#20'NestLvlColorCheckBox'#8'OnChange'#7#26'NestLvlColorCheckBoxChange'#8'Tab'
|
||||
+'Order'#2#1#0#0#0#6'TPanel'#11'TopLvlPanel'#19'AnchorSideLeft.Side'#7#9'asrB'
|
||||
+'ottom'#21'AnchorSideTop.Control'#7#16'DividerSpinPanel'#18'AnchorSideTop.Si'
|
||||
+'de'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#16'DividerConfPanel'#20'An'
|
||||
+'chorSideRight.Side'#7#9'asrBottom'#4'Left'#3#206#0#6'Height'#2','#3'Top'#2
|
||||
+#29#5'Width'#3';'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'
|
||||
+#9#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#10'BevelOuter'#7#6'b'
|
||||
+'vNone'#12'ClientHeight'#2','#11'ClientWidth'#3';'#1#8'TabOrder'#2#3#0#6'TLa'
|
||||
+'bel'#16'TopLvlColorLabel'#22'AnchorSideLeft.Control'#7#11'TopLvlPanel'#21'A'
|
||||
+'nchorSideTop.Control'#7#11'TopLvlPanel'#4'Left'#2#0#6'Height'#2#16#3'Top'#2
|
||||
+#0#5'Width'#2'^'#7'Caption'#6#16'TopLvlColorLabel'#11'ParentColor'#8#0#0#9'T'
|
||||
+'ColorBox'#14'TopLvlColorBox'#22'AnchorSideLeft.Control'#7#11'TopLvlPanel'#21
|
||||
,'AnchorSideTop.Control'#7#16'TopLvlColorLabel'#18'AnchorSideTop.Side'#7#9'as'
|
||||
+'rBottom'#4'Left'#2#0#6'Height'#2#22#3'Top'#2#22#5'Width'#2'd'#17'DefaultCol'
|
||||
+'orColor'#7#7'clWhite'#5'Style'#11#16'cbStandardColors'#16'cbExtendedColors'
|
||||
+#14'cbSystemColors'#16'cbIncludeDefault'#13'cbCustomColor'#13'cbPrettyNames'
|
||||
+#0#12'AutoComplete'#8#17'BorderSpacing.Top'#2#6#10'ItemHeight'#2#16#9'ItemWi'
|
||||
+'dth'#2#0#8'OnChange'#7#20'TopLvlColorBoxChange'#8'TabOrder'#2#0#0#0#9'TChec'
|
||||
+'kBox'#19'TopLvlColorCheckBox'#22'AnchorSideLeft.Control'#7#14'TopLvlColorBo'
|
||||
+'x'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#14'To'
|
||||
+'pLvlColorBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Height'#2
|
||||
+#19#3'Top'#2#24#5'Width'#2'~'#18'BorderSpacing.Left'#2#6#7'Caption'#6#19'Top'
|
||||
+'LvlColorCheckBox'#8'OnChange'#7#25'TopLvlColorCheckBoxChange'#8'TabOrder'#2
|
||||
+#1#0#0#0#13'TCheckListBox'#20'DividerConfigListBox'#22'AnchorSideLeft.Contro'
|
||||
+'l'#7#16'DividerConfPanel'#21'AnchorSideTop.Control'#7#16'DividerConfPanel'
|
||||
+#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#16'D'
|
||||
+'ividerConfPanel'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6'Hei'
|
||||
+'ght'#3'-'#1#3'Top'#2#0#5'Width'#3#200#0#7'Anchors'#11#5'akTop'#6'akLeft'#8
|
||||
+'akBottom'#0#14'ExtendedSelect'#8#10'ItemHeight'#2#0#7'OnClick'#7#25'Divider'
|
||||
+'ConfigListBoxClick'#6'OnExit'#7#25'DividerConfigListBoxClick'#7'OnKeyUp'#7
|
||||
+#25'DividerConfigListBoxKeyUp'#8'TabOrder'#2#0#0#0#0#242#2#2#9'TComboBox'#16
|
||||
+'LanguageComboBox'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Co'
|
||||
+'ntrol'#7#5'Owner'#4'Left'#2#0#6'Height'#2#21#3'Top'#2#6#5'Width'#3#200#0#12
|
||||
+'AutoComplete'#8#17'BorderSpacing.Top'#2#6#10'ItemHeight'#2#13#9'ItemWidth'#2
|
||||
+#0#8'OnChange'#7#22'LanguageComboBoxChange'#6'OnExit'#7#20'LanguageComboBoxE'
|
||||
+'xit'#9'OnKeyDown'#7#23'LanguageComboBoxKeyDown'#8'TabOrder'#2#0#4'Text'#6#16
|
||||
+'LanguageComboBox'#0#0#0
|
||||
]);
|
||||
315
ide/frames/editor_dividerdraw_options.pas
Normal file
315
ide/frames/editor_dividerdraw_options.pas
Normal file
@ -0,0 +1,315 @@
|
||||
{
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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_dividerdraw_options;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, StdCtrls, ExtCtrls, Graphics,
|
||||
LCLType, EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, Controls,
|
||||
SynEditHighlighter, Spin, ComCtrls, ColorBox, CheckLst, Buttons;
|
||||
|
||||
type
|
||||
|
||||
{ TEditorDividerDrawOptionsFrame }
|
||||
|
||||
TEditorDividerDrawOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
DividerConfigListBox: TCheckListBox;
|
||||
LanguageLabel: TLabel;
|
||||
TopLvlPanel: TPanel;
|
||||
TopLvlColorCheckBox: TCheckBox;
|
||||
NestLvlColorCheckBox: TCheckBox;
|
||||
TopLvlColorBox: TColorBox;
|
||||
NestLvlColorBox: TColorBox;
|
||||
DividerSpinLabel: TLabel;
|
||||
TopLvlColorLabel: TLabel;
|
||||
NestLvlColorLabel: TLabel;
|
||||
LanguageComboBox: TComboBox;
|
||||
DividerConfPanel: TPanel;
|
||||
DividerSpinPanel: TPanel;
|
||||
DividerSpinEdit: TSpinEdit;
|
||||
NestLvlPanel: TPanel;
|
||||
procedure LanguageComboBoxChange(Sender: TObject);
|
||||
procedure LanguageComboBoxExit(Sender: TObject);
|
||||
procedure LanguageComboBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure DividerConfigListBoxKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure DividerConfigListBoxClick(Sender: TObject);
|
||||
procedure DividerSpinEditChange(Sender: TObject);
|
||||
procedure NestLvlColorBoxChange(Sender: TObject);
|
||||
procedure NestLvlColorCheckBoxChange(Sender: TObject);
|
||||
procedure TopLvlColorBoxChange(Sender: TObject);
|
||||
procedure TopLvlColorCheckBoxChange(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
FHighlighters: array[TLazSyntaxHighlighter] of TSrcIDEHighlighter;
|
||||
FCurHighlighter: TSrcIDEHighlighter;
|
||||
FCurDividerConf: TSynDividerDrawConfig;
|
||||
FCurDivInfo: TEditorOptionsDividerRecord;
|
||||
protected
|
||||
function GetHighlighter(SynType: TLazSyntaxHighlighter;
|
||||
CreateIfNotExists: Boolean): TSrcIDEHighlighter;
|
||||
procedure ClearHighlighters;
|
||||
public
|
||||
destructor Destroy; 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;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TEditorDividerDrawOptionsFrame }
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.LanguageComboBoxChange(Sender: TObject);
|
||||
var
|
||||
ComboBox: TComboBox absolute Sender;
|
||||
begin
|
||||
if ComboBox.Items.IndexOf(ComboBox.Text) >= 0 then
|
||||
LanguageComboBoxExit(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.LanguageComboBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
if (ssCtrl in Shift) and (Key = VK_S) then
|
||||
LanguageComboBoxExit(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.LanguageComboBoxExit(Sender: TObject);
|
||||
var
|
||||
ComboBox: TComboBox absolute Sender;
|
||||
tp: TLazSyntaxHighlighter;
|
||||
i: Integer;
|
||||
begin
|
||||
tp := EditorOpts.HighlighterList
|
||||
[EditorOpts.HighlighterList.FindByName(ComboBox.Text)].TheType;
|
||||
FCurHighlighter := GetHighlighter(tp, True);
|
||||
FCurDivInfo := EditorOptionsDividerDefaults[tp];
|
||||
|
||||
DividerConfigListBox.Clear;
|
||||
for i := 0 to FCurDivInfo.Count - 1 do begin
|
||||
DividerConfigListBox.Items.add(FCurDivInfo.Info^[i].Name);
|
||||
DividerConfigListBox.Checked[i] :=
|
||||
FCurHighlighter.DividerDrawConfig[i].MaxDrawDepth > 0;
|
||||
end;
|
||||
DividerConfigListBox.ItemIndex := 0;
|
||||
DividerConfigListBoxClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.DividerConfigListBoxKeyUp(Sender: TObject;
|
||||
var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
DividerConfigListBoxClick(Sender);
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.DividerConfigListBoxClick(Sender: TObject);
|
||||
var
|
||||
i: LongInt;
|
||||
NewDiv: TSynDividerDrawConfig;
|
||||
b: Boolean;
|
||||
begin
|
||||
if not assigned(FCurHighlighter) then exit;
|
||||
for i := 0 to FCurDivInfo.Count - 1 do begin
|
||||
if DividerConfigListBox.Checked[i] then begin
|
||||
if FCurHighlighter.DividerDrawConfig[i].MaxDrawDepth = 0 then begin
|
||||
if FCurDivInfo.Info^[i].MaxLevel > 0 then
|
||||
FCurHighlighter.DividerDrawConfig[i].MaxDrawDepth := FCurDivInfo.Info^[i].MaxLevel
|
||||
else
|
||||
FCurHighlighter.DividerDrawConfig[i].MaxDrawDepth := 1;
|
||||
end;
|
||||
end else begin
|
||||
if FCurHighlighter.DividerDrawConfig[i].MaxDrawDepth > 0 then
|
||||
FCurHighlighter.DividerDrawConfig[i].MaxDrawDepth := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
i := DividerConfigListBox.ItemIndex;
|
||||
if (i < 0) or (i >= FCurDivInfo.Count) then exit;
|
||||
NewDiv := FCurHighlighter.DividerDrawConfig[i];
|
||||
FCurDividerConf := nil;
|
||||
|
||||
b := FCurDivInfo.Info^[i].BoolOpt;
|
||||
DividerSpinPanel.Visible := not b;
|
||||
NestLvlPanel.Visible := not b;
|
||||
DividerSpinEdit.Value := NewDiv.MaxDrawDepth;
|
||||
|
||||
TopLvlColorBox.Selected := NewDiv.TopColor;
|
||||
TopLvlColorBox.Tag := TopLvlColorBox.Selected;
|
||||
TopLvlColorCheckBox.Checked := NewDiv.TopColor = clDefault;
|
||||
TopLvlPanel.Enabled := NewDiv.MaxDrawDepth > 0;
|
||||
|
||||
NestLvlColorBox.Selected := NewDiv.NestColor;
|
||||
NestLvlColorBox.Tag := NestLvlColorBox.Selected;
|
||||
NestLvlColorCheckBox.Checked := NewDiv.NestColor = clDefault;
|
||||
NestLvlPanel.Enabled := NewDiv.MaxDrawDepth > 1;
|
||||
|
||||
FCurDividerConf := NewDiv;
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.DividerSpinEditChange(Sender: TObject);
|
||||
var
|
||||
Spin: TSpinEdit absolute Sender;
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
FCurDividerConf.MaxDrawDepth := Spin.Value;
|
||||
TopLvlPanel.Enabled := FCurDividerConf.MaxDrawDepth > 0;
|
||||
NestLvlPanel.Enabled := FCurDividerConf.MaxDrawDepth > 1;
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.NestLvlColorBoxChange(Sender: TObject);
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
FCurDividerConf.NestColor := NestLvlColorBox.Selected;
|
||||
if NestLvlColorBox.Selected <> clDefault then
|
||||
NestLvlColorBox.Tag := NestLvlColorBox.Selected;
|
||||
NestLvlColorCheckBox.Checked := NestLvlColorBox.Selected = clDefault;
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.NestLvlColorCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
if NestLvlColorCheckBox.Checked then begin
|
||||
FCurDividerConf.NestColor := clDefault;
|
||||
if NestLvlColorBox.Selected <> clDefault then
|
||||
NestLvlColorBox.Selected := clDefault;
|
||||
end else begin
|
||||
FCurDividerConf.NestColor := NestLvlColorBox.Tag;
|
||||
if NestLvlColorBox.Selected <> NestLvlColorBox.Tag then
|
||||
NestLvlColorBox.Selected := NestLvlColorBox.Tag;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.TopLvlColorBoxChange(Sender: TObject);
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
FCurDividerConf.TopColor := TopLvlColorBox.Selected;
|
||||
if TopLvlColorBox.Selected <> clDefault then
|
||||
TopLvlColorBox.Tag := TopLvlColorBox.Selected;
|
||||
TopLvlColorCheckBox.Checked := TopLvlColorBox.Selected = clDefault;
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.TopLvlColorCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
if not assigned(FCurDividerConf) then exit;
|
||||
if TopLvlColorCheckBox.Checked then begin
|
||||
FCurDividerConf.TopColor := clDefault;
|
||||
if TopLvlColorBox.Selected <> clDefault then
|
||||
TopLvlColorBox.Selected := clDefault;
|
||||
end else begin
|
||||
FCurDividerConf.TopColor := TopLvlColorBox.Tag;
|
||||
if TopLvlColorBox.Selected <> TopLvlColorBox.Tag then
|
||||
TopLvlColorBox.Selected := TopLvlColorBox.Tag;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TEditorDividerDrawOptionsFrame.GetHighlighter(SynType: TLazSyntaxHighlighter;
|
||||
CreateIfNotExists: Boolean): TSrcIDEHighlighter;
|
||||
var
|
||||
SynClass: TCustomSynClass;
|
||||
begin
|
||||
Result := FHighlighters[SynType];
|
||||
if (Result <> nil) or not(CreateIfNotExists) then exit;
|
||||
|
||||
SynClass := LazSyntaxHighlighterClasses[SynType];
|
||||
Result := SynClass.Create(nil);
|
||||
FHighlighters[SynType] := Result;
|
||||
EditorOpts.ReadHighlighterDivDrawSettings(Result);
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.ClearHighlighters;
|
||||
var
|
||||
i: TLazSyntaxHighlighter;
|
||||
begin
|
||||
for i := low(TLazSyntaxHighlighter) to high(TLazSyntaxHighlighter) do
|
||||
FreeAndNil(FHighlighters[i]);
|
||||
end;
|
||||
|
||||
destructor TEditorDividerDrawOptionsFrame.Destroy;
|
||||
begin
|
||||
ClearHighlighters;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
function TEditorDividerDrawOptionsFrame.GetTitle: String;
|
||||
begin
|
||||
Result := dlgUseDividerDraw;
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||
begin
|
||||
LanguageLabel.Caption := dlgLang;
|
||||
DividerSpinLabel.Caption := dlgDividerDrawDepth;
|
||||
TopLvlColorLabel.Caption := dlgDividerTopColor;
|
||||
TopLvlColorCheckBox.Caption := dlgDividerTopColorDefault;
|
||||
NestLvlColorLabel.Caption := dlgDividerNestColor;
|
||||
NestLvlColorCheckBox.Caption := dlgDividerNestColorDefault;
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.ReadSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
i: Integer;
|
||||
rd: TEditorOptionsDividerRecord;
|
||||
begin
|
||||
with AOptions as TEditorOptions do
|
||||
begin
|
||||
with LanguageComboBox.Items do begin
|
||||
BeginUpdate;
|
||||
for i := 0 to EditorOpts.HighlighterList.Count - 1 do begin
|
||||
rd := EditorOptionsDividerDefaults[HighlighterList[i].TheType];
|
||||
if (rd.Count > 0) then
|
||||
Add(HighlighterList[i].SynClass.GetLanguageName);
|
||||
end;
|
||||
EndUpdate;
|
||||
end;
|
||||
LanguageComboBox.ItemIndex := 0;
|
||||
LanguageComboBoxExit(LanguageComboBox);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorDividerDrawOptionsFrame.WriteSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
i: TLazSyntaxHighlighter;
|
||||
begin
|
||||
with AOptions as TEditorOptions do
|
||||
begin
|
||||
for i := low(TLazSyntaxHighlighter) to high(TLazSyntaxHighlighter) do begin
|
||||
if assigned(FHighlighters[i]) then
|
||||
WriteHighlighterDivDrawSettings(FHighlighters[i]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TEditorDividerDrawOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||
begin
|
||||
Result := TEditorOptions;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I editor_dividerdraw_options.lrs}
|
||||
RegisterIDEOptionsEditor(GroupEditor, TEditorDividerDrawOptionsFrame,
|
||||
EdtOptionsDrawDivider);
|
||||
end.
|
||||
|
||||
@ -1147,6 +1147,7 @@ resourcestring
|
||||
dlgFindTextatCursor = 'Find text at cursor';
|
||||
dlgUseSyntaxHighlight = 'Use syntax highlight';
|
||||
dlgUseCodeFolding = 'Code folding';
|
||||
dlgUseDividerDraw = 'Divider drawing';
|
||||
dlgCopyWordAtCursorOnCopyNone = 'Copy word on copy none';
|
||||
dlgHomeKeyJumpsToNearestStart = 'Home key jumps to nearest start';
|
||||
dlgEndKeyJumpsToNearestStart = 'End key jumps to nearest end';
|
||||
@ -1225,8 +1226,6 @@ resourcestring
|
||||
dlgIndentCodeTo = 'Indent code to';
|
||||
//dlgCodeToolsTab = 'Code Tools';
|
||||
lisAutomaticFeatures = 'Automatic features';
|
||||
dlgDividerConf = 'Divider';
|
||||
dlgfoldConf = 'Folding';
|
||||
|
||||
dlgDividerOnOff = 'Draw divider';
|
||||
dlgDividerDrawDepth = 'Draw divider level';
|
||||
|
||||
@ -121,7 +121,7 @@ uses
|
||||
Backup_Options, naming_options, fpdoc_options,
|
||||
editor_display_options, editor_keymapping_options,
|
||||
editor_color_options, editor_codetools_options, editor_codefolding_options,
|
||||
editor_general_misc_options,
|
||||
editor_general_misc_options, editor_dividerdraw_options,
|
||||
codetools_general_options, codetools_codecreation_options, atom_checkboxes_options,
|
||||
codetools_wordpolicy_options, codetools_linesplitting_options,
|
||||
codetools_space_options, codetools_identifiercompletion_options,
|
||||
|
||||
@ -135,6 +135,7 @@ const
|
||||
EdtOptionsColors = 400;
|
||||
EdtOptionsCodetools = 500;
|
||||
EdtOptionsCodeFolding = 600;
|
||||
EdtOptionsDrawDivider = 700;
|
||||
|
||||
GroupCodetools = 300;
|
||||
CdtOptionsGeneral = 100;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user