mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-05 23:59:28 +01:00
SynEdit: Allow configuration for folding
git-svn-id: trunk@19234 -
This commit is contained in:
parent
7f608f7cb4
commit
d683c26988
@ -7552,10 +7552,15 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomSynEdit.HighlighterAttrChanged(Sender: TObject);
|
||||
var
|
||||
t: integer;
|
||||
begin
|
||||
RecalcCharExtent;
|
||||
SizeOrFontChanged(TRUE); //jr 2000-10-01
|
||||
Invalidate;
|
||||
t := 0;
|
||||
if fHighlighter.AttributeChangeNeedScan then
|
||||
ScanFrom(t, FLines.Count - 1);
|
||||
end;
|
||||
|
||||
procedure TCustomSynEdit.StatusChanged(AChanges: TSynStatusChanges);
|
||||
|
||||
@ -211,6 +211,7 @@ type
|
||||
procedure SetDrawDividerLevel(const AValue: Integer);
|
||||
procedure SetEnabled(const Value: boolean); //DDH 2001-10-23
|
||||
protected
|
||||
FAttributeChangeNeedScan: Boolean;
|
||||
fDefaultFilter: string;
|
||||
fUpdateChange: boolean; //mh 2001-09-13
|
||||
procedure AddAttribute(AAttrib: TSynHighlighterAttributes);
|
||||
@ -237,6 +238,7 @@ type
|
||||
function GetDividerDrawConfigCount: Integer; virtual;
|
||||
public
|
||||
procedure DefHighlightChange(Sender: TObject);
|
||||
property AttributeChangeNeedScan: Boolean read FAttributeChangeNeedScan;
|
||||
{$IFNDEF SYN_CPPB_1} class {$ENDIF}
|
||||
function GetCapabilities: TSynHighlighterCapabilities; virtual;
|
||||
{$IFNDEF SYN_CPPB_1} class {$ENDIF}
|
||||
@ -1042,8 +1044,10 @@ procedure TSynCustomHighlighter.DefHighlightChange(Sender: TObject);
|
||||
begin
|
||||
if fUpdateCount > 0 then
|
||||
fUpdateChange := TRUE
|
||||
else
|
||||
else begin
|
||||
fAttrChangeHooks.Fire;
|
||||
FAttributeChangeNeedScan := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSynCustomHighlighter.GetAttribCount: integer;
|
||||
|
||||
@ -120,6 +120,10 @@ type
|
||||
fRanges: TSynCustomHighlighterRanges;
|
||||
FRootCodeFoldBlock: TSynCustomCodeFoldBlock;
|
||||
protected
|
||||
function GetFoldConfig(Index: Integer): Boolean; virtual;
|
||||
function GetFoldConfigCount: Integer; virtual;
|
||||
procedure SetFoldConfig(Index: Integer; const AValue: Boolean); virtual;
|
||||
|
||||
function GetFoldNodeInfo(Line, Index: Integer): TSynFoldNodeInfo; virtual;
|
||||
function GetFoldNodeInfoCount(Line: Integer): Integer; virtual;
|
||||
property CodeFoldRange: TSynCustomHighlighterRange read FCodeFoldRange;
|
||||
@ -159,6 +163,11 @@ type
|
||||
procedure SetLine({$IFDEF FPC}const {$ENDIF}NewValue: String;
|
||||
LineNumber:Integer // 0 based
|
||||
); override;
|
||||
public
|
||||
property FoldConfig[Index: Integer]: Boolean
|
||||
read GetFoldConfig write SetFoldConfig;
|
||||
property FoldConfigCount: Integer read GetFoldConfigCount;
|
||||
|
||||
end;
|
||||
|
||||
{ TSynCustomHighlighterRanges }
|
||||
@ -316,6 +325,20 @@ begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
function TSynCustomFoldHighlighter.GetFoldConfig(Index: Integer): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TSynCustomFoldHighlighter.GetFoldConfigCount: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure TSynCustomFoldHighlighter.SetFoldConfig(Index: Integer; const AValue: Boolean);
|
||||
begin
|
||||
end;
|
||||
|
||||
function TSynCustomFoldHighlighter.GetFoldNodeInfo(Line, Index: Integer): TSynFoldNodeInfo;
|
||||
begin
|
||||
Result.FoldAction := [sfaInvalid];
|
||||
|
||||
@ -91,11 +91,13 @@ type
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
TPascalCodeFoldBlockType = (
|
||||
cfbtNone,
|
||||
cfbtBeginEnd,
|
||||
cfbtBeginEnd, // Nested
|
||||
cfbtTopBeginEnd, // Begin of Procedure
|
||||
cfbtNestedComment,
|
||||
cfbtProcedure,
|
||||
cfbtUses,
|
||||
cfbtVarType,
|
||||
cfbtLocalVarType,
|
||||
cfbtClass,
|
||||
cfbtClassSection,
|
||||
cfbtUnitSection,
|
||||
@ -104,7 +106,9 @@ type
|
||||
cfbtRecord,
|
||||
cfbtTry,
|
||||
cfbtExcept,
|
||||
cfbtRepeat
|
||||
cfbtRepeat,
|
||||
cfbtAsm,
|
||||
cfbtCase
|
||||
);
|
||||
TPascalCodeFoldBlockTypes = set of TPascalCodeFoldBlockType;
|
||||
|
||||
@ -115,8 +119,8 @@ const
|
||||
cfbtAll: TPascalCodeFoldBlockTypes =
|
||||
[low(TPascalCodeFoldBlockType)..high(TPascalCodeFoldBlockType)];
|
||||
PascalWordTrippletRanges: TPascalCodeFoldBlockTypes =
|
||||
[cfbtBeginEnd, cfbtProcedure, cfbtClass, cfbtProgram, cfbtRecord,
|
||||
cfbtTry, cfbtExcept, cfbtRepeat
|
||||
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtProcedure, cfbtClass, cfbtProgram, cfbtRecord,
|
||||
cfbtTry, cfbtExcept, cfbtRepeat, cfbtAsm, cfbtCase
|
||||
];
|
||||
|
||||
type
|
||||
@ -237,6 +241,7 @@ type
|
||||
FNodeInfoLine, FNodeInfoCount: Integer;
|
||||
FNodeInfoList: Array of TSynFoldNodeInfo;
|
||||
FDividerDrawConfig: Array [TSynPasDividerDrawLocation] of TSynDividerDrawConfig;
|
||||
FFoldConfig: Array [TPascalCodeFoldBlockType] of Boolean;
|
||||
procedure GrowNodeInfoList;
|
||||
function GetPasCodeFoldRange: TSynPasSynRange;
|
||||
procedure SetCompilerMode(const AValue: TPascalCompilerMode);
|
||||
@ -369,7 +374,12 @@ type
|
||||
ABlockType: TPascalCodeFoldBlockType);
|
||||
procedure CreateDividerDrawConfig;
|
||||
procedure DestroyDividerDrawConfig;
|
||||
procedure InitFoldConfig;
|
||||
protected
|
||||
function GetFoldConfig(Index: Integer): Boolean; override;
|
||||
function GetFoldConfigCount: Integer; override;
|
||||
procedure SetFoldConfig(Index: Integer; const AValue: Boolean); override;
|
||||
|
||||
function GetFoldNodeInfo(Line, Index: Integer): TSynFoldNodeInfo; override;
|
||||
function GetFoldNodeInfoCount(Line: Integer): Integer; override;
|
||||
|
||||
@ -377,8 +387,8 @@ type
|
||||
function IsFilterStored: boolean; override; //mh 2000-10-08
|
||||
|
||||
procedure CreateRootCodeFoldBlock; override;
|
||||
function StartPascalCodeFoldBlock(ABlockType: TPascalCodeFoldBlockType;
|
||||
SubBlock: boolean = false): TSynCustomCodeFoldBlock;
|
||||
function StartPascalCodeFoldBlock(ABlockType: TPascalCodeFoldBlockType):
|
||||
TSynCustomCodeFoldBlock;
|
||||
procedure EndCodeFoldBlock(DecreaseLevel: Boolean = True); override;
|
||||
procedure CloseBeginEndBlocks;
|
||||
procedure EndCodeFoldBlockLastLine;
|
||||
@ -871,14 +881,15 @@ begin
|
||||
EndCodeFoldBlock;
|
||||
end else if TopPascalCodeFoldBlockType = cfbtTry then begin
|
||||
EndCodeFoldBlock;
|
||||
end else if TopPascalCodeFoldBlockType = cfbtBeginEnd then begin
|
||||
end else if TopPascalCodeFoldBlockType in [cfbtTopBeginEnd, cfbtAsm] then begin
|
||||
EndCodeFoldBlock;
|
||||
if TopPascalCodeFoldBlockType = cfbtProcedure then
|
||||
EndCodeFoldBlock;
|
||||
if TopPascalCodeFoldBlockType = cfbtProgram then
|
||||
EndCodeFoldBlock;
|
||||
end
|
||||
else if TopPascalCodeFoldBlockType = cfbtUnitSection then begin
|
||||
end else if TopPascalCodeFoldBlockType in [cfbtBeginEnd, cfbtCase] then begin
|
||||
EndCodeFoldBlock;
|
||||
end else if TopPascalCodeFoldBlockType = cfbtUnitSection then begin
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType = cfbtUnit then // "Unit".."end."
|
||||
EndCodeFoldBlock;
|
||||
@ -915,8 +926,8 @@ begin
|
||||
end else
|
||||
if KeyComp('Case') then begin
|
||||
if TopPascalCodeFoldBlockType in
|
||||
[cfbtBeginEnd, cfbtTry, cfbtExcept, cfbtRepeat] then
|
||||
StartPascalCodeFoldBlock(cfbtBeginEnd,true);
|
||||
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtCase, cfbtTry, cfbtExcept, cfbtRepeat] then
|
||||
StartPascalCodeFoldBlock(cfbtCase);
|
||||
Result := tkKey;
|
||||
end else Result := tkIdentifier;
|
||||
end;
|
||||
@ -944,7 +955,7 @@ begin
|
||||
fRange := fRange + [rsAsm];
|
||||
fAsmStart := True;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
StartPascalCodeFoldBlock(cfbtBeginEnd);
|
||||
StartPascalCodeFoldBlock(cfbtAsm);
|
||||
//debugln('TSynPasSyn.Func37 BEGIN ',dbgs(ord(TopPascalCodeFoldBlockType)),' LineNumber=',dbgs(fLineNumber),' ',dbgs(MinimumCodeFoldBlockLevel),' ',dbgs(CurrentCodeFoldBlockLevel));
|
||||
{$ENDIF}
|
||||
end else Result := tkIdentifier;
|
||||
@ -964,12 +975,13 @@ begin
|
||||
if (fRange * [rsImplementation, rsInterface] = []) then
|
||||
Include(fRange, rsImplementation);
|
||||
PasCodeFoldRange.BracketNestLevel := 0; // Reset in case of partial code
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
Result := tkKey;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
StartPascalCodeFoldBlock(cfbtBeginEnd);
|
||||
if TopPascalCodeFoldBlockType in [cfbtProcedure]
|
||||
then StartPascalCodeFoldBlock(cfbtTopBeginEnd)
|
||||
else StartPascalCodeFoldBlock(cfbtBeginEnd);
|
||||
//debugln('TSynPasSyn.Func37 BEGIN ',dbgs(ord(TopPascalCodeFoldBlockType)),' LineNumber=',dbgs(fLineNumber),' ',dbgs(MinimumCodeFoldBlockLevel),' ',dbgs(CurrentCodeFoldBlockLevel));
|
||||
{$ENDIF}
|
||||
end else
|
||||
Result := tkIdentifier;
|
||||
end;
|
||||
@ -997,9 +1009,13 @@ begin
|
||||
else if KeyComp('Var') then begin
|
||||
if (PasCodeFoldRange.BracketNestLevel = 0) and
|
||||
(TopPascalCodeFoldBlockType in
|
||||
[cfbtVarType, cfbtNone, cfbtProcedure, cfbtProgram, cfbtUnit, cfbtUnitSection]) then begin
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
StartPascalCodeFoldBlock(cfbtVarType);
|
||||
[cfbtVarType, cfbtLocalVarType, cfbtNone, cfbtProcedure, cfbtProgram,
|
||||
cfbtUnit, cfbtUnitSection]) then begin
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtProcedure]
|
||||
then StartPascalCodeFoldBlock(cfbtLocalVarType)
|
||||
else StartPascalCodeFoldBlock(cfbtVarType);
|
||||
end;
|
||||
Result := tkKey;
|
||||
end
|
||||
@ -1115,8 +1131,8 @@ begin
|
||||
else if KeyComp('Try') then
|
||||
begin
|
||||
if TopPascalCodeFoldBlockType in
|
||||
[cfbtBeginEnd, cfbtTry, cfbtExcept, cfbtRepeat] then
|
||||
StartPascalCodeFoldBlock(cfbtTry,true);
|
||||
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtCase, cfbtTry, cfbtExcept, cfbtRepeat] then
|
||||
StartPascalCodeFoldBlock(cfbtTry);
|
||||
Result := tkKey;
|
||||
end
|
||||
else if KeyComp('Inline') then Result := tkKey else Result := tkIdentifier;
|
||||
@ -1131,7 +1147,6 @@ begin
|
||||
else if KeyComp('Uses') then begin
|
||||
if (TopPascalCodeFoldBlockType in
|
||||
[cfbtNone, cfbtProgram, cfbtUnit, cfbtUnitSection]) then begin
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
StartPascalCodeFoldBlock(cfbtUses);
|
||||
end;
|
||||
Result := tkKey;
|
||||
@ -1143,7 +1158,7 @@ function TSynPasSyn.Func65: TtkTokenKind;
|
||||
begin
|
||||
if KeyComp('Repeat') then begin
|
||||
Result := tkKey;
|
||||
StartPascalCodeFoldBlock(cfbtRepeat, True);
|
||||
StartPascalCodeFoldBlock(cfbtRepeat);
|
||||
end
|
||||
else Result := tkIdentifier;
|
||||
end;
|
||||
@ -1153,11 +1168,14 @@ begin
|
||||
if KeyComp('Type') then begin
|
||||
if (PasCodeFoldRange.BracketNestLevel = 0)
|
||||
and (TopPascalCodeFoldBlockType in
|
||||
[cfbtVarType, cfbtNone, cfbtProcedure, cfbtProgram, cfbtUnit, cfbtUnitSection])
|
||||
and not(rsAfterEqual in fRange)
|
||||
[cfbtVarType, cfbtLocalVarType, cfbtNone, cfbtProcedure, cfbtProgram,
|
||||
cfbtUnit, cfbtUnitSection]) and not(rsAfterEqual in fRange)
|
||||
then begin
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
StartPascalCodeFoldBlock(cfbtVarType);
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtProcedure]
|
||||
then StartPascalCodeFoldBlock(cfbtLocalVarType)
|
||||
else StartPascalCodeFoldBlock(cfbtVarType);
|
||||
end;
|
||||
Result := tkKey;
|
||||
end
|
||||
@ -1178,9 +1196,13 @@ begin
|
||||
else if KeyComp('Const') then begin
|
||||
if (PasCodeFoldRange.BracketNestLevel = 0) and
|
||||
(TopPascalCodeFoldBlockType in
|
||||
[cfbtVarType, cfbtNone, cfbtProcedure, cfbtProgram, cfbtUnit, cfbtUnitSection]) then begin
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
StartPascalCodeFoldBlock(cfbtVarType);
|
||||
[cfbtVarType, cfbtLocalVarType, cfbtNone, cfbtProcedure, cfbtProgram,
|
||||
cfbtUnit, cfbtUnitSection]) then begin
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtProcedure]
|
||||
then StartPascalCodeFoldBlock(cfbtLocalVarType)
|
||||
else StartPascalCodeFoldBlock(cfbtVarType);
|
||||
end;
|
||||
Result := tkKey;
|
||||
end
|
||||
@ -1197,7 +1219,7 @@ begin
|
||||
if KeyComp('Except') then begin
|
||||
Result := tkKey;
|
||||
if TopPascalCodeFoldBlockType = cfbtTry then
|
||||
StartPascalCodeFoldBlock(cfbtExcept, True);
|
||||
StartPascalCodeFoldBlock(cfbtExcept);
|
||||
end
|
||||
else Result := tkIdentifier;
|
||||
end;
|
||||
@ -1224,7 +1246,7 @@ begin
|
||||
if KeyComp('Finally') then begin
|
||||
Result := tkKey;
|
||||
if TopPascalCodeFoldBlockType = cfbtTry then
|
||||
StartPascalCodeFoldBlock(cfbtExcept, True);
|
||||
StartPascalCodeFoldBlock(cfbtExcept);
|
||||
end
|
||||
else Result := tkIdentifier;
|
||||
end;
|
||||
@ -1240,7 +1262,8 @@ begin
|
||||
(fRange * [rsInterface, rsImplementation] = []) then
|
||||
begin
|
||||
CloseBeginEndBlocks;
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType=cfbtUnitSection then EndCodeFoldBlockLastLine;
|
||||
StartPascalCodeFoldBlock(cfbtUnitSection);
|
||||
fRange := fRange + [rsInterface];
|
||||
@ -1378,7 +1401,8 @@ begin
|
||||
if not(rsAfterEqual in fRange) then begin
|
||||
PasCodeFoldRange.BracketNestLevel := 0; // Reset in case of partial code
|
||||
CloseBeginEndBlocks;
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if ((rsImplementation in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection]))
|
||||
then
|
||||
@ -1400,7 +1424,8 @@ begin
|
||||
if not(rsAfterEqual in fRange) then begin
|
||||
PasCodeFoldRange.BracketNestLevel := 0; // Reset in case of partial code
|
||||
CloseBeginEndBlocks;
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if ((rsImplementation in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection]))
|
||||
then
|
||||
@ -1499,7 +1524,8 @@ begin
|
||||
if KeyComp('Finalization') then begin
|
||||
PasCodeFoldRange.BracketNestLevel := 0; // Reset in case of partial code
|
||||
CloseBeginEndBlocks;
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType=cfbtUnitSection then EndCodeFoldBlockLastLine;
|
||||
StartPascalCodeFoldBlock(cfbtUnitSection);
|
||||
fRange := fRange - [rsInterface] + [rsImplementation];
|
||||
@ -1524,7 +1550,8 @@ begin
|
||||
begin
|
||||
PasCodeFoldRange.BracketNestLevel := 0; // Reset in case of partial code
|
||||
CloseBeginEndBlocks;
|
||||
if TopPascalCodeFoldBlockType = cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if ((rsImplementation in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection]))
|
||||
then
|
||||
@ -1544,7 +1571,8 @@ begin
|
||||
if not(rsAfterEqual in fRange) then begin
|
||||
PasCodeFoldRange.BracketNestLevel := 0; // Reset in case of partial code
|
||||
CloseBeginEndBlocks;
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if ((rsImplementation in fRange) and
|
||||
not(TopPascalCodeFoldBlockType in [cfbtClass, cfbtClassSection]))
|
||||
then
|
||||
@ -1555,7 +1583,8 @@ begin
|
||||
if KeyComp('Implementation') then begin
|
||||
PasCodeFoldRange.BracketNestLevel := 0; // Reset in case of partial code
|
||||
CloseBeginEndBlocks;
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType=cfbtUnitSection then EndCodeFoldBlockLastLine;
|
||||
StartPascalCodeFoldBlock(cfbtUnitSection);
|
||||
fRange := fRange - [rsInterface] + [rsImplementation];
|
||||
@ -1575,7 +1604,8 @@ begin
|
||||
if KeyComp('Initialization') then begin
|
||||
PasCodeFoldRange.BracketNestLevel := 0; // Reset in case of partial code
|
||||
CloseBeginEndBlocks;
|
||||
if TopPascalCodeFoldBlockType=cfbtVarType then EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType in [cfbtVarType, cfbtLocalVarType] then
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType=cfbtUnitSection then EndCodeFoldBlockLastLine;
|
||||
StartPascalCodeFoldBlock(cfbtUnitSection);
|
||||
fRange := fRange - [rsInterface] + [rsImplementation];
|
||||
@ -1703,6 +1733,7 @@ constructor TSynPasSyn.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
CreateDividerDrawConfig;
|
||||
InitFoldConfig;
|
||||
fD4syntax := true;
|
||||
fAsmAttri := TSynHighlighterAttributes.Create(SYNS_AttrAssembler);
|
||||
AddAttribute(fAsmAttri);
|
||||
@ -2478,11 +2509,12 @@ begin
|
||||
end;
|
||||
|
||||
function TSynPasSyn.StartPascalCodeFoldBlock(
|
||||
ABlockType: TPascalCodeFoldBlockType;
|
||||
SubBlock: boolean): TSynCustomCodeFoldBlock;
|
||||
ABlockType: TPascalCodeFoldBlockType): TSynCustomCodeFoldBlock;
|
||||
var
|
||||
p: PtrInt;
|
||||
FoldBlock: Boolean;
|
||||
begin
|
||||
FoldBlock := FFoldConfig[ABlockType];
|
||||
p := 0;
|
||||
if FCatchNodeInfo then begin // exclude subblocks, because they do not increase the foldlevel yet
|
||||
GrowNodeInfoList;
|
||||
@ -2491,10 +2523,10 @@ begin
|
||||
include(FNodeInfoList[FNodeInfoCount].FoldAction, sfaOpen);
|
||||
inc(FNodeInfoCount);
|
||||
end;
|
||||
if SubBlock then
|
||||
if not FoldBlock then
|
||||
p := PtrInt(CountPascalCodeFoldBlockOffset);
|
||||
Result:=TSynCustomCodeFoldBlock(
|
||||
inherited StartCodeFoldBlock(p+Pointer(PtrInt(ABlockType)), not SubBlock));
|
||||
inherited StartCodeFoldBlock(p+Pointer(PtrInt(ABlockType)), FoldBlock));
|
||||
end;
|
||||
|
||||
procedure TSynPasSyn.EndCodeFoldBlock(DecreaseLevel: Boolean);
|
||||
@ -2513,10 +2545,12 @@ end;
|
||||
procedure TSynPasSyn.CloseBeginEndBlocks;
|
||||
begin
|
||||
if not(TopPascalCodeFoldBlockType in
|
||||
[cfbtBeginEnd, cfbtExcept, cfbtTry, cfbtRepeat]) then
|
||||
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtCase, cfbtAsm, cfbtExcept, cfbtTry,
|
||||
cfbtRepeat]) then
|
||||
exit;
|
||||
while TopPascalCodeFoldBlockType in
|
||||
[cfbtBeginEnd, cfbtExcept, cfbtTry, cfbtRepeat] do
|
||||
[cfbtBeginEnd, cfbtTopBeginEnd, cfbtCase, cfbtAsm, cfbtExcept, cfbtTry,
|
||||
cfbtRepeat] do
|
||||
EndCodeFoldBlockLastLine;
|
||||
if TopPascalCodeFoldBlockType = cfbtProcedure then
|
||||
EndCodeFoldBlockLastLine; // This procedure did have a begin/end block, so it must end too
|
||||
@ -2615,27 +2649,25 @@ begin
|
||||
cfbtUses:
|
||||
if FDividerDrawConfig[pddlUses].MaxDrawDepth > 0 then
|
||||
exit(FDividerDrawConfig[pddlUses].TopSetting);
|
||||
cfbtVarType:
|
||||
if nxt = cfbtProcedure then begin
|
||||
cfbtLocalVarType:
|
||||
if CheckFoldNestLevel(FDividerDrawConfig[pddlVarLocal].MaxDrawDepth - 1,
|
||||
i + 2, [cfbtProcedure], cfbtAll, c) then begin
|
||||
if c = 0
|
||||
then exit(FDividerDrawConfig[pddlVarLocal].TopSetting)
|
||||
else exit(FDividerDrawConfig[pddlVarLocal].NestSetting);
|
||||
end;
|
||||
end
|
||||
else // global var
|
||||
cfbtVarType:
|
||||
if FDividerDrawConfig[pddlVarGlobal].MaxDrawDepth > 0 then
|
||||
exit(FDividerDrawConfig[pddlVarGlobal].TopSetting);
|
||||
cfbtClass, cfbtRecord:
|
||||
begin
|
||||
if CheckFoldNestLevel(0, i + 1, [cfbtProcedure],
|
||||
cfbtAll - [cfbtVarType], c)
|
||||
cfbtAll - [cfbtVarType, cfbtLocalVarType], c)
|
||||
then t := pddlStructGlobal
|
||||
else t := pddlStructLocal;
|
||||
if CheckFoldNestLevel(FDividerDrawConfig[t].MaxDrawDepth - 1,
|
||||
i + 1, [cfbtClass, cfbtRecord],
|
||||
cfbtAll - [cfbtVarType], c) then begin
|
||||
cfbtAll - [cfbtVarType, cfbtLocalVarType], c) then begin
|
||||
if c = 0
|
||||
then exit(FDividerDrawConfig[t].TopSetting)
|
||||
else exit(FDividerDrawConfig[t].NestSetting);
|
||||
@ -2648,14 +2680,14 @@ begin
|
||||
then exit(FDividerDrawConfig[pddlProcedure].TopSetting)
|
||||
else exit(FDividerDrawConfig[pddlProcedure].NestSetting);
|
||||
end;
|
||||
cfbtBeginEnd, cfbtRepeat:
|
||||
if CheckFoldNestLevel(FDividerDrawConfig[pddlBeginEnd].MaxDrawDepth - 1,
|
||||
i + 1, [cfbtBeginEnd, cfbtRepeat],
|
||||
cfbtAll - [cfbtProcedure], c) then begin
|
||||
if c = 0
|
||||
then exit(FDividerDrawConfig[pddlBeginEnd].TopSetting)
|
||||
else exit(FDividerDrawConfig[pddlBeginEnd].NestSetting);
|
||||
end;
|
||||
cfbtTopBeginEnd:
|
||||
if FDividerDrawConfig[pddlBeginEnd].MaxDrawDepth > 0 then
|
||||
exit(FDividerDrawConfig[pddlBeginEnd].TopSetting);
|
||||
cfbtBeginEnd, cfbtRepeat, cfbtCase, cfbtAsm:
|
||||
if CheckFoldNestLevel(FDividerDrawConfig[pddlBeginEnd].MaxDrawDepth - 2,
|
||||
i + 1, [cfbtBeginEnd, cfbtRepeat, cfbtCase, cfbtAsm],
|
||||
cfbtAll - [cfbtProcedure, cfbtTopBeginEnd], c) then
|
||||
exit(FDividerDrawConfig[pddlBeginEnd].NestSetting);
|
||||
cfbtTry:
|
||||
if CheckFoldNestLevel(FDividerDrawConfig[pddlTry].MaxDrawDepth - 1,
|
||||
i + 1, [cfbtTry], cfbtAll - [cfbtProcedure], c)
|
||||
@ -2698,6 +2730,40 @@ begin
|
||||
FreeAndNil(FDividerDrawConfig[i]);
|
||||
end;
|
||||
|
||||
procedure TSynPasSyn.InitFoldConfig;
|
||||
var
|
||||
i: TPascalCodeFoldBlockType;
|
||||
begin
|
||||
for i := low(TPascalCodeFoldBlockType) to high(TPascalCodeFoldBlockType) do
|
||||
FFoldConfig[i] := i in [cfbtBeginEnd, cfbtTopBeginEnd, cfbtNestedComment,
|
||||
cfbtProcedure, cfbtUses, cfbtLocalVarType, cfbtClass,
|
||||
cfbtClassSection, cfbtRecord, cfbtRepeat, cfbtCase,
|
||||
cfbtAsm];
|
||||
end;
|
||||
|
||||
function TSynPasSyn.GetFoldConfig(Index: Integer): Boolean;
|
||||
begin
|
||||
// + 1 as we skip cfbtNone;
|
||||
Result := FFoldConfig[TPascalCodeFoldBlockType(Index + 1)];
|
||||
end;
|
||||
|
||||
function TSynPasSyn.GetFoldConfigCount: Integer;
|
||||
begin
|
||||
// excluded cfbtNone;
|
||||
Result := ord(high(TPascalCodeFoldBlockType)) -
|
||||
ord(low(TPascalCodeFoldBlockType));
|
||||
end;
|
||||
|
||||
procedure TSynPasSyn.SetFoldConfig(Index: Integer; const AValue: Boolean);
|
||||
begin
|
||||
if FFoldConfig[TPascalCodeFoldBlockType(Index + 1)] = AValue then
|
||||
exit;
|
||||
FFoldConfig[TPascalCodeFoldBlockType(Index + 1)] := AValue;
|
||||
FAttributeChangeNeedScan := True;
|
||||
DefHighlightChange(self);
|
||||
// Todo: Since all synedits will rescan => delete all foldranges
|
||||
end;
|
||||
|
||||
function TSynPasSyn.GetDividerDrawConfig(Index: Integer): TSynDividerDrawConfig;
|
||||
begin
|
||||
Result := FDividerDrawConfig[TSynPasDividerDrawLocation(Index)];
|
||||
|
||||
@ -39,7 +39,7 @@ uses
|
||||
// LCL
|
||||
Controls, Graphics, LCLProc, FileUtil, LResources,
|
||||
// synedit
|
||||
SynEdit, SynEditAutoComplete, SynEditHighlighter, SynEditKeyCmds,
|
||||
SynEdit, SynEditAutoComplete, SynEditHighlighter, SynEditHighlighterFoldBase, SynEditKeyCmds,
|
||||
SynEditStrConst, SynEditMarkupBracket, SynEditMarkupHighAll, SynEditMarkupWordGroup,
|
||||
SynGutter, SynGutterBase, SynGutterCodeFolding, SynGutterLineNumber, SynGutterChanges,
|
||||
SynHighlighterCPP, SynHighlighterHTML, SynHighlighterJava, SynHighlighterLFM,
|
||||
@ -387,6 +387,85 @@ const
|
||||
(Count: 0; Info: nil) // jscript
|
||||
);
|
||||
|
||||
type
|
||||
|
||||
TEditorOptionsFoldInfo = record
|
||||
Name: String; // Name for display
|
||||
Xml: String; // Name for XML
|
||||
Index: Integer; // FHighlighter.FoldConf[index]
|
||||
Enabled: Boolean;
|
||||
end;
|
||||
TEditorOptionsFoldInfoList = Array [0..999] of TEditorOptionsFoldInfo;
|
||||
PEditorOptionsFoldInfoList = ^TEditorOptionsFoldInfoList;
|
||||
|
||||
TEditorOptionsFoldRecord = record
|
||||
Count: Integer;
|
||||
Info: PEditorOptionsFoldInfoList;
|
||||
end;
|
||||
|
||||
const
|
||||
|
||||
EditorOptionsFoldInfoPas: Array [0..17] of TEditorOptionsFoldInfo
|
||||
= (
|
||||
(Name: dlgFoldPasProcedure; Xml: 'Procedure';
|
||||
Index: ord(cfbtProcedure)-1; Enabled: True),
|
||||
(Name: dlgFoldLocalPasVarType; Xml: 'LocalVarType';
|
||||
Index: ord(cfbtLocalVarType)-1; Enabled: True),
|
||||
(Name: dlgFoldPasProcBeginEnd; Xml: 'ProcBeginEnd';
|
||||
Index: ord(cfbtTopBeginEnd)-1; Enabled: True),
|
||||
(Name: dlgFoldPasBeginEnd; Xml: 'BeginEnd';
|
||||
Index: ord(cfbtBeginEnd)-1; Enabled: True),
|
||||
(Name: dlgFoldPasRepeat; Xml: 'Repeat';
|
||||
Index: ord(cfbtRepeat)-1; Enabled: False),
|
||||
(Name: dlgFoldPasCase; Xml: 'Case';
|
||||
Index: ord(cfbtCase)-1; Enabled: False),
|
||||
(Name: dlgFoldPasTry; Xml: 'Try';
|
||||
Index: ord(cfbtTry)-1; Enabled: False),
|
||||
(Name: dlgFoldPasExcept; Xml: 'Except';
|
||||
Index: ord(cfbtExcept)-1; Enabled: False),
|
||||
(Name: dlgFoldPasAsm; Xml: 'Asm';
|
||||
Index: ord(cfbtAsm)-1; Enabled: True),
|
||||
|
||||
(Name: dlgFoldPasProgram; Xml: 'Program';
|
||||
Index: ord(cfbtProgram)-1; Enabled: False),
|
||||
(Name: dlgFoldPasUnit; Xml: 'Unit';
|
||||
Index: ord(cfbtUnit)-1; Enabled: False),
|
||||
(Name: dlgFoldPasUnitSection; Xml: 'UnitSection';
|
||||
Index: ord(cfbtUnitSection)-1; Enabled: False),
|
||||
(Name: dlgFoldPasUses; Xml: 'Uses';
|
||||
Index: ord(cfbtUses)-1; Enabled: True),
|
||||
|
||||
(Name: dlgFoldPasVarType; Xml: 'VarType';
|
||||
Index: ord(cfbtVarType)-1; Enabled: False),
|
||||
(Name: dlgFoldPasClass; Xml: 'Class';
|
||||
Index: ord(cfbtClass)-1; Enabled: True),
|
||||
(Name: dlgFoldPasClassSection; Xml: 'ClassSection';
|
||||
Index: ord(cfbtClassSection)-1; Enabled: True),
|
||||
(Name: dlgFoldPasRecord; Xml: 'Record';
|
||||
Index: ord(cfbtRecord)-1; Enabled: True),
|
||||
|
||||
(Name: dlgFoldPasNestedComment; Xml: 'NestedComment';
|
||||
Index: ord(cfbtNestedComment)-1;Enabled: True)
|
||||
);
|
||||
|
||||
EditorOptionsFoldDefaults: array[TLazSyntaxHighlighter] of
|
||||
TEditorOptionsFoldRecord =
|
||||
( (Count: 0; Info: nil), // none
|
||||
(Count: 0; Info: nil), // text
|
||||
(Count: 18; Info: {$IFDEF FPC}@{$ENDIF}EditorOptionsFoldInfoPas[0]), // Freepas
|
||||
(Count: 18; Info: {$IFDEF FPC}@{$ENDIF}EditorOptionsFoldInfoPas[0]), // pas
|
||||
(Count: 0; Info: nil), // lfm
|
||||
(Count: 0; Info: nil), // xml
|
||||
(Count: 0; Info: nil), // html
|
||||
(Count: 0; Info: nil), // cpp
|
||||
(Count: 0; Info: nil), // perl
|
||||
(Count: 0; Info: nil), // java
|
||||
(Count: 0; Info: nil), // shell
|
||||
(Count: 0; Info: nil), // python
|
||||
(Count: 0; Info: nil), // php
|
||||
(Count: 0; Info: nil), // sql
|
||||
(Count: 0; Info: nil) // jscript
|
||||
);
|
||||
|
||||
const
|
||||
EditorOptsFormatVersion = 4;
|
||||
@ -2317,11 +2396,12 @@ var
|
||||
Conf: TSynDividerDrawConfig;
|
||||
ConfName: String;
|
||||
Path: String;
|
||||
i: Integer;
|
||||
i, h: Integer;
|
||||
TheFoldInfo: TEditorOptionsFoldRecord;
|
||||
begin
|
||||
i := HighlighterList.FindByHighlighter(Syn);
|
||||
if i < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[i].TheType];
|
||||
h := HighlighterList.FindByHighlighter(Syn);
|
||||
if h < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[h].TheType];
|
||||
|
||||
ReadDefaultsForHighlighterFoldSettings(Syn);
|
||||
|
||||
@ -2338,35 +2418,56 @@ begin
|
||||
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
|
||||
ConfName := TheFoldInfo.Info^[i].Xml;
|
||||
Path := 'EditorOptions/FoldConfig/Lang' +
|
||||
StrToValidXMLName(Syn.LanguageName) + '/Type' + ConfName + '/' ;
|
||||
TSynCustomFoldHighlighter(Syn).FoldConfig[TheFoldInfo.Info^[i].Index] :=
|
||||
XMLConfig.GetValue(Path + 'Enabled/Value',
|
||||
TSynCustomFoldHighlighter(Syn).FoldConfig[TheFoldInfo.Info^[i].Index]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.ReadDefaultsForHighlighterFoldSettings(Syn: TSrcIDEHighlighter);
|
||||
var
|
||||
TheInfo: TEditorOptionsDividerRecord;
|
||||
i: Integer;
|
||||
i, h: Integer;
|
||||
TheFoldInfo: TEditorOptionsFoldRecord;
|
||||
begin
|
||||
i := HighlighterList.FindByHighlighter(Syn);
|
||||
if i < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[i].TheType];
|
||||
h := HighlighterList.FindByHighlighter(Syn);
|
||||
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
|
||||
TSynCustomFoldHighlighter(Syn).FoldConfig[TheFoldInfo.Info^[i].Index]
|
||||
:= TheFoldInfo.Info^[i].Enabled;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.WriteHighlighterFoldSettings(Syn: TSrcIDEHighlighter);
|
||||
var
|
||||
DefSyn: TSrcIDEHighlighter;
|
||||
i: Integer;
|
||||
i, h: Integer;
|
||||
Path: String;
|
||||
Conf, DefConf: TSynDividerDrawConfig;
|
||||
TheInfo: TEditorOptionsDividerRecord;
|
||||
ConfName: String;
|
||||
TheFoldInfo: TEditorOptionsFoldRecord;
|
||||
begin
|
||||
i := HighlighterList.FindByHighlighter(Syn);
|
||||
if i < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[i].TheType];
|
||||
h := HighlighterList.FindByHighlighter(Syn);
|
||||
if h < 0 then exit;
|
||||
TheInfo := EditorOptionsDividerDefaults[HighlighterList[h].TheType];
|
||||
|
||||
DefSyn := TCustomSynClass(Syn.ClassType).Create(Nil);
|
||||
try
|
||||
@ -2384,6 +2485,19 @@ begin
|
||||
XMLConfig.SetDeleteValue(Path + 'NestColor/Value', Conf.NestColor,
|
||||
DefConf.NestColor);
|
||||
end;
|
||||
|
||||
if (syn is TSynCustomFoldHighlighter) then begin
|
||||
TheFoldInfo := EditorOptionsFoldDefaults[HighlighterList[h].TheType];
|
||||
for i := 0 to TheFoldInfo.Count - 1 do begin
|
||||
ConfName := TheFoldInfo.Info^[i].Xml;
|
||||
Path := 'EditorOptions/FoldConfig/Lang' +
|
||||
StrToValidXMLName(Syn.LanguageName) + '/Type' + ConfName + '/' ;
|
||||
XMLConfig.SetDeleteValue(Path + 'Enabled/Value',
|
||||
TSynCustomFoldHighlighter(Syn).FoldConfig[TheFoldInfo.Info^[i].Index],
|
||||
TSynCustomFoldHighlighter(DefSyn).FoldConfig[TheFoldInfo.Info^[i].Index]);
|
||||
end;
|
||||
end;
|
||||
|
||||
finally
|
||||
DefSyn.Free;
|
||||
end;
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
Height = 334
|
||||
Width = 521
|
||||
Anchors = [akTop]
|
||||
ClientHeight = 334
|
||||
ClientWidth = 521
|
||||
Visible = False
|
||||
DesignLeft = 230
|
||||
DesignTop = 230
|
||||
DesignLeft = 115
|
||||
DesignTop = 115
|
||||
object Bevel1: TBevel[0]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = chkCodeFoldingEnabled
|
||||
@ -19,7 +20,25 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
end
|
||||
object LanguageLabel: TLabel[1]
|
||||
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 = 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
|
||||
@ -32,83 +51,21 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
Caption = 'LanguageLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object chkCodeFoldingEnabled: TCheckBox[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 0
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 136
|
||||
Caption = 'chkCodeFoldingEnabled'
|
||||
TabOrder = 0
|
||||
end
|
||||
object LanguageComboBox: TComboBox[3]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Bevel1
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 31
|
||||
Width = 200
|
||||
AutoComplete = False
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 13
|
||||
ItemWidth = 0
|
||||
OnChange = LanguageComboBoxChange
|
||||
OnExit = LanguageComboBoxExit
|
||||
OnKeyDown = LanguageComboBoxKeyDown
|
||||
TabOrder = 1
|
||||
Text = 'LanguageComboBox'
|
||||
end
|
||||
object FoldConfigListBox: TListBox[4]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = LanguageComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = LanguageComboBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 276
|
||||
Top = 58
|
||||
Width = 200
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 0
|
||||
OnClick = FoldConfigListBoxClick
|
||||
OnSelectionChange = FoldConfigListBoxSelectionChange
|
||||
TabOrder = 2
|
||||
end
|
||||
object DividerConfPanel: TPanel[5]
|
||||
AnchorSideLeft.Control = FoldConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = FoldConfigListBox
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 206
|
||||
Height = 276
|
||||
Top = 58
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 276
|
||||
ClientWidth = 315
|
||||
TabOrder = 3
|
||||
object DividerBoolPanel: TPanel
|
||||
AnchorSideLeft.Control = DividerConfPanel
|
||||
AnchorSideLeft.Control = DividerConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = DividerSpinPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Left = 206
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 23
|
||||
ClientWidth = 315
|
||||
@ -130,16 +87,18 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
end
|
||||
end
|
||||
object DividerSpinPanel: TPanel
|
||||
AnchorSideLeft.Control = DividerConfPanel
|
||||
AnchorSideLeft.Control = DividerConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Left = 206
|
||||
Height = 23
|
||||
Top = 0
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 23
|
||||
ClientWidth = 315
|
||||
@ -172,17 +131,19 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
end
|
||||
end
|
||||
object NestLvlPanel: TPanel
|
||||
AnchorSideLeft.Control = DividerConfPanel
|
||||
AnchorSideLeft.Control = DividerConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TopLvlPanel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Left = 206
|
||||
Height = 44
|
||||
Top = 80
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 44
|
||||
@ -232,16 +193,18 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
end
|
||||
end
|
||||
object TopLvlPanel: TPanel
|
||||
AnchorSideLeft.Control = DividerConfPanel
|
||||
AnchorSideLeft.Control = DividerConfigListBox
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = DividerConfPanel
|
||||
AnchorSideRight.Control = DividerConfPanel
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Left = 206
|
||||
Height = 44
|
||||
Top = 30
|
||||
Width = 315
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 30
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 44
|
||||
@ -289,5 +252,125 @@ inherited EditorCodefoldingOptionsFrame: TEditorCodefoldingOptionsFrame
|
||||
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
|
||||
end
|
||||
object chkCodeFoldingEnabled: TCheckBox[2]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 0
|
||||
Height = 19
|
||||
Top = 0
|
||||
Width = 136
|
||||
Caption = 'chkCodeFoldingEnabled'
|
||||
TabOrder = 0
|
||||
end
|
||||
object LanguageComboBox: TComboBox[3]
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Bevel1
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 31
|
||||
Width = 200
|
||||
AutoComplete = False
|
||||
BorderSpacing.Top = 6
|
||||
ItemHeight = 13
|
||||
ItemWidth = 0
|
||||
OnChange = LanguageComboBoxChange
|
||||
OnExit = LanguageComboBoxExit
|
||||
OnKeyDown = LanguageComboBoxKeyDown
|
||||
TabOrder = 1
|
||||
Text = 'LanguageComboBox'
|
||||
end
|
||||
object FoldConfPanel: TPanel[4]
|
||||
AnchorSideLeft.Control = Owner
|
||||
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 = 3
|
||||
object FoldConfigCheckListBox: TCheckListBox
|
||||
AnchorSideLeft.Control = FoldConfPanel
|
||||
AnchorSideTop.Control = FoldConfPanel
|
||||
AnchorSideBottom.Control = FoldConfPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 276
|
||||
Top = 0
|
||||
Width = 200
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
ExtendedSelect = False
|
||||
ItemHeight = 0
|
||||
OnClickCheck = FoldConfigCheckListBoxClickCheck
|
||||
OnExit = FoldConfigCheckListBoxClickCheck
|
||||
OnKeyUp = FoldConfigCheckListBoxKeyUp
|
||||
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'
|
||||
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
|
||||
|
||||
@ -1,111 +1,141 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TEditorCodefoldingOptionsFrame','FORMDATA',[
|
||||
'TPF0'#241#30'TEditorCodefoldingOptionsFrame'#29'EditorCodefoldingOptionsFram'
|
||||
+'e'#6'Height'#3'N'#1#5'Width'#3#9#2#12'ClientHeight'#3'N'#1#11'ClientWidth'#3
|
||||
+#9#2#7'Visible'#8#10'DesignLeft'#3#230#0#9'DesignTop'#3#230#0#0#242#2#0#6'TB'
|
||||
+'evel'#6'Bevel1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Cont'
|
||||
+'rol'#7#21'chkCodeFoldingEnabled'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'A'
|
||||
+'nchorSideRight.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'TLabel'#13'Lan'
|
||||
+'guageLabel'#22'AnchorSideLeft.Control'#7#16'LanguageComboBox'#19'AnchorSide'
|
||||
+'Left.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#16'LanguageComboBox'#4
|
||||
+'Left'#3#206#0#6'Height'#2#16#3'Top'#2#31#5'Width'#2'Q'#18'BorderSpacing.Lef'
|
||||
+'t'#2#6#19'BorderSpacing.Right'#2#6#7'Caption'#6#13'LanguageLabel'#11'Parent'
|
||||
+'Color'#8#0#0#242#2#2#9'TCheckBox'#21'chkCodeFoldingEnabled'#22'AnchorSideLe'
|
||||
+'ft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#0#6'H'
|
||||
+'eight'#2#19#3'Top'#2#0#5'Width'#3#136#0#7'Caption'#6#21'chkCodeFoldingEnabl'
|
||||
+'ed'#8'TabOrder'#2#0#0#0#242#2#3#9'TComboBox'#16'LanguageComboBox'#22'Anchor'
|
||||
+'SideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#6'Bevel1'#4'Left'#2
|
||||
+#0#6'Height'#2#21#3'Top'#2#31#5'Width'#3#200#0#12'AutoComplete'#8#17'BorderS'
|
||||
+'pacing.Top'#2#6#10'ItemHeight'#2#13#9'ItemWidth'#2#0#8'OnChange'#7#22'Langu'
|
||||
+'ageComboBoxChange'#6'OnExit'#7#20'LanguageComboBoxExit'#9'OnKeyDown'#7#23'L'
|
||||
+'anguageComboBoxKeyDown'#8'TabOrder'#2#1#4'Text'#6#16'LanguageComboBox'#0#0
|
||||
+#242#2#4#8'TListBox'#17'FoldConfigListBox'#22'AnchorSideLeft.Control'#7#5'Ow'
|
||||
+'ner'#21'AnchorSideTop.Control'#7#16'LanguageComboBox'#18'AnchorSideTop.Side'
|
||||
+#7#9'asrBottom'#23'AnchorSideRight.Control'#7#16'LanguageComboBox'#20'Anchor'
|
||||
+'SideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'A'
|
||||
+'nchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#3#20#1#3'Top'#2
|
||||
+':'#5'Width'#3#200#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'
|
||||
+#0#17'BorderSpacing.Top'#2#6#10'ItemHeight'#2#0#7'OnClick'#7#22'FoldConfigLi'
|
||||
+'stBoxClick'#17'OnSelectionChange'#7' FoldConfigListBoxSelectionChange'#8'Ta'
|
||||
+'bOrder'#2#2#0#0#242#2#5#6'TPanel'#16'DividerConfPanel'#22'AnchorSideLeft.Co'
|
||||
+'ntrol'#7#17'FoldConfigListBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'An'
|
||||
+'chorSideTop.Control'#7#17'FoldConfigListBox'#23'AnchorSideRight.Control'#7#5
|
||||
+'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'
|
||||
+#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#206#0#6'Heigh'
|
||||
+'t'#3#20#1#3'Top'#2':'#5'Width'#3';'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'ak'
|
||||
+'Right'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#10'BevelOuter'#7#6'bvNone'
|
||||
+#12'ClientHeight'#3#20#1#11'ClientWidth'#3';'#1#8'TabOrder'#2#3#0#6'TPanel'
|
||||
+#16'DividerBoolPanel'#22'AnchorSideLeft.Control'#7#16'DividerConfPanel'#21'A'
|
||||
+'nchorSideTop.Control'#7#16'DividerConfPanel'#23'AnchorSideRight.Control'#7
|
||||
+#16'DividerConfPanel'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideB'
|
||||
+'ottom.Control'#7#16'DividerSpinPanel'#21'AnchorSideBottom.Side'#7#9'asrBott'
|
||||
+'om'#4'Left'#2#0#6'Height'#2#23#3'Top'#2#0#5'Width'#3';'#1#7'Anchors'#11#5'a'
|
||||
+'kTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'AutoSize'#9#10'BevelOuter'#7#6'b'
|
||||
+'vNone'#12'ClientHeight'#2#23#11'ClientWidth'#3';'#1#8'TabOrder'#2#1#7'Visib'
|
||||
+'le'#8#0#9'TCheckBox'#20'DividerOnOffCheckBox'#22'AnchorSideLeft.Control'#7
|
||||
+#16'DividerBoolPanel'#21'AnchorSideTop.Control'#7#16'DividerBoolPanel'#23'An'
|
||||
+'chorSideRight.Control'#7#16'DividerBoolPanel'#20'AnchorSideRight.Side'#7#9
|
||||
+'asrBottom'#4'Left'#2#0#6'Height'#2#19#3'Top'#2#0#5'Width'#3';'#1#7'Anchors'
|
||||
+#11#5'akTop'#6'akLeft'#7'akRight'#0#7'Caption'#6#20'DividerOnOffCheckBox'#8
|
||||
+'OnChange'#7#26'DividerOnOffCheckBoxChange'#8'TabOrder'#2#0#0#0#0#6'TPanel'
|
||||
+#16'DividerSpinPanel'#22'AnchorSideLeft.Control'#7#16'DividerConfPanel'#21'A'
|
||||
+'nchorSideTop.Control'#7#16'DividerConfPanel'#23'AnchorSideRight.Control'#7
|
||||
+#16'DividerConfPanel'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#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#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2#23#11
|
||||
+'ClientWidth'#3';'#1#8'TabOrder'#2#0#0#6'TLabel'#16'DividerSpinLabel'#22'Anc'
|
||||
+'horSideLeft.Control'#7#15'DividerSpinEdit'#19'AnchorSideLeft.Side'#7#9'asrB'
|
||||
+'ottom'#21'AnchorSideTop.Control'#7#15'DividerSpinEdit'#18'AnchorSideTop.Sid'
|
||||
+'e'#7#9'asrCenter'#23'AnchorSideRight.Control'#7#16'DividerSpinPanel'#20'Anc'
|
||||
+'horSideRight.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'TSpinE'
|
||||
+'dit'#15'DividerSpinEdit'#22'AnchorSideLeft.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'OnChange'#7#21'DividerSpinEditChange'#8'TabOrder'
|
||||
+#2#0#0#0#0#6'TPanel'#12'NestLvlPanel'#22'AnchorSideLeft.Control'#7#16'Divide'
|
||||
+'rConfPanel'#21'AnchorSideTop.Control'#7#11'TopLvlPanel'#18'AnchorSideTop.Si'
|
||||
+'de'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#16'DividerConfPanel'#20'An'
|
||||
+'chorSideRight.Side'#7#9'asrBottom'#4'Left'#2#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#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'NestLvlColo'
|
||||
+'rLabel'#22'AnchorSideLeft.Control'#7#12'NestLvlPanel'#21'AnchorSideTop.Cont'
|
||||
+'rol'#7#12'NestLvlPanel'#4'Left'#2#0#6'Height'#2#16#3'Top'#2#0#5'Width'#2'a'
|
||||
+#7'Caption'#6#17'NestLvlColorLabel'#11'ParentColor'#8#0#0#9'TColorBox'#15'Ne'
|
||||
+'stLvlColorBox'#22'AnchorSideLeft.Control'#7#12'NestLvlPanel'#21'AnchorSideT'
|
||||
+'op.Control'#7#17'NestLvlColorLabel'#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'cbSystemC'
|
||||
+'olors'#16'cbIncludeDefault'#13'cbCustomColor'#13'cbPrettyNames'#0#12'AutoCo'
|
||||
+'mplete'#8#17'BorderSpacing.Top'#2#6#10'ItemHeight'#2#16#9'ItemWidth'#2#0#8
|
||||
+'OnChange'#7#21'NestLvlColorBoxChange'#8'TabOrder'#2#0#0#0#9'TCheckBox'#20'N'
|
||||
+'estLvlColorCheckBox'#22'AnchorSideLeft.Control'#7#15'NestLvlColorBox'#19'An'
|
||||
+'chorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#15'NestLvlCol'
|
||||
+'orBox'#18'AnchorSideTop.Side'#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'NestL'
|
||||
+'vlColorCheckBox'#8'OnChange'#7#26'NestLvlColorCheckBoxChange'#8'TabOrder'#2
|
||||
+#1#0#0#0#6'TPanel'#11'TopLvlPanel'#22'AnchorSideLeft.Control'#7#16'DividerCo'
|
||||
+'nfPanel'#21'AnchorSideTop.Control'#7#16'DividerConfPanel'#23'AnchorSideRigh'
|
||||
+'t.Control'#7#16'DividerConfPanel'#20'AnchorSideRight.Side'#7#9'asrBottom'#4
|
||||
+'Left'#2#0#6'Height'#2','#3'Top'#2#30#5'Width'#3';'#1#7'Anchors'#11#5'akTop'
|
||||
+#6'akLeft'#7'akRight'#0#8'AutoSize'#9#17'BorderSpacing.Top'#2#30#10'BevelOut'
|
||||
+'er'#7#6'bvNone'#12'ClientHeight'#2','#11'ClientWidth'#3';'#1#8'TabOrder'#2#3
|
||||
+#0#6'TLabel'#16'TopLvlColorLabel'#22'AnchorSideLeft.Control'#7#11'TopLvlPane'
|
||||
+'l'#21'AnchorSideTop.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'TColorBox'#14'TopLvlColorBox'#22'AnchorSideLeft.Control'#7#11'TopLvlPan'
|
||||
+'el'#21'AnchorSideTop.Control'#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'Defa'
|
||||
+'ultColorColor'#7#7'clWhite'#5'Style'#11#16'cbStandardColors'#16'cbExtendedC'
|
||||
+'olors'#14'cbSystemColors'#16'cbIncludeDefault'#13'cbCustomColor'#13'cbPrett'
|
||||
+'yNames'#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'TopLvlColorCheckBox'#22'AnchorSideLeft.Control'#7#14'TopLvlCo'
|
||||
+'lorBox'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7
|
||||
+#14'TopLvlColorBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2'j'#6'Hei'
|
||||
+'ght'#2#19#3'Top'#2#24#5'Width'#2'~'#18'BorderSpacing.Left'#2#6#7'Caption'#6
|
||||
+#19'TopLvlColorCheckBox'#8'OnChange'#7#25'TopLvlColorCheckBoxChange'#8'TabOr'
|
||||
+'der'#2#1#0#0#0#0#0
|
||||
+'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's'#9'DesignTop'#2
|
||||
+'s'#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'#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'W'
|
||||
+'idth'#2'F'#7'Caption'#6#7'Divider'#5'Color'#7#9'clBtnFace'#4'Down'#9#10'Gro'
|
||||
+'upIndex'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#23'DividerSpeedButtonClick'#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'Gr'
|
||||
+'oupIndex'#2#1#9'NumGlyphs'#2#0#7'OnClick'#7#20'FoldSpeedButtonClick'#0#0#0#0
|
||||
]);
|
||||
|
||||
@ -27,7 +27,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, StdCtrls, ExtCtrls, Graphics,
|
||||
LCLType, EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, Controls,
|
||||
SynEditHighlighter, Spin, ComCtrls, ColorBox;
|
||||
SynEditHighlighter, SynEditHighlighterFoldBase, Spin, ComCtrls, ColorBox, CheckLst, Buttons;
|
||||
|
||||
type
|
||||
|
||||
@ -35,6 +35,11 @@ type
|
||||
|
||||
TEditorCodefoldingOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
Bevel1: TBevel;
|
||||
FoldConfigCheckListBox: TCheckListBox;
|
||||
FoldConfPanel: TPanel;
|
||||
DividerSpeedButton: TSpeedButton;
|
||||
FoldSpeedButton: TSpeedButton;
|
||||
ToolBar1: TToolBar;
|
||||
TopLvlPanel: TPanel;
|
||||
TopLvlColorCheckBox: TCheckBox;
|
||||
NestLvlColorCheckBox: TCheckBox;
|
||||
@ -47,16 +52,20 @@ type
|
||||
NestLvlColorLabel: TLabel;
|
||||
LanguageComboBox: TComboBox;
|
||||
LanguageLabel: TLabel;
|
||||
FoldConfigListBox: TListBox;
|
||||
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 FoldConfigListBoxClick(Sender: TObject);
|
||||
procedure FoldConfigListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure DividerConfigListBoxClick(Sender: TObject);
|
||||
procedure DividerConfigListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
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);
|
||||
@ -69,7 +78,8 @@ type
|
||||
FHighlighters: array[TLazSyntaxHighlighter] of TSrcIDEHighlighter;
|
||||
FCurHighlighter: TSrcIDEHighlighter;
|
||||
FCurDividerConf: TSynDividerDrawConfig;
|
||||
FCurInfo: TEditorOptionsDividerRecord;
|
||||
FCurDivInfo: TEditorOptionsDividerRecord;
|
||||
FCurFoldInfo: TEditorOptionsFoldRecord;
|
||||
protected
|
||||
function GetHighlighter(SynType: TLazSyntaxHighlighter;
|
||||
CreateIfNotExists: Boolean): TSrcIDEHighlighter;
|
||||
@ -104,26 +114,80 @@ end;
|
||||
procedure TEditorCodefoldingOptionsFrame.LanguageComboBoxExit(Sender: TObject);
|
||||
var
|
||||
ComboBox: TComboBox absolute Sender;
|
||||
i: Integer;
|
||||
tp: TLazSyntaxHighlighter;
|
||||
begin
|
||||
tp := EditorOpts.HighlighterList
|
||||
[EditorOpts.HighlighterList.FindByName(ComboBox.Text)].TheType;
|
||||
FCurHighlighter := GetHighlighter(tp, True);
|
||||
FCurInfo := EditorOptionsDividerDefaults[tp];
|
||||
FoldConfigListBox.Clear;
|
||||
for i := 0 to FCurInfo.Count - 1 do
|
||||
FoldConfigListBox.Items.add(FCurInfo.Info^[i].Name);
|
||||
FoldConfigListBox.ItemIndex := 0;
|
||||
FoldConfigListBoxSelectionChange(Sender, 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.FoldConfigListBoxClick(Sender: TObject);
|
||||
procedure TEditorCodefoldingOptionsFrame.FoldSpeedButtonClick(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
FoldConfigListBoxSelectionChange(Sender, True);
|
||||
FoldConfPanel.Visible := true;
|
||||
DividerConfPanel.Visible := False;
|
||||
FoldConfigCheckListBox.Clear;
|
||||
if not (assigned(FCurHighlighter) and
|
||||
(FCurHighlighter is TSynCustomFoldHighlighter)) then exit;
|
||||
|
||||
for i := 0 to FCurFoldInfo.Count - 1 do begin
|
||||
FoldConfigCheckListBox.Items.add(FCurFoldInfo.Info^[i].Name);
|
||||
FoldConfigCheckListBox.Checked[i] :=
|
||||
TSynCustomFoldHighlighter(FCurHighlighter).FoldConfig[FCurFoldInfo.Info^[i].Index];
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.FoldConfigListBoxSelectionChange(Sender: TObject; User: boolean);
|
||||
procedure TEditorCodefoldingOptionsFrame.FoldConfigCheckListBoxClickCheck(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
if not (assigned(FCurHighlighter) and
|
||||
(FCurHighlighter is TSynCustomFoldHighlighter)) then exit;
|
||||
for i := 0 to FCurFoldInfo.Count - 1 do
|
||||
TSynCustomFoldHighlighter(FCurHighlighter).FoldConfig[FCurFoldInfo.Info^[i].Index]
|
||||
:= FoldConfigCheckListBox.Checked[i];
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.FoldConfigCheckListBoxKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
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;
|
||||
@ -132,11 +196,11 @@ var
|
||||
begin
|
||||
if not assigned(FCurHighlighter) then exit;
|
||||
i := ListBox.ItemIndex;
|
||||
if (i < 0) or (i >= FCurInfo.Count) then exit;
|
||||
if (i < 0) or (i >= FCurDivInfo.Count) then exit;
|
||||
NewDiv := FCurHighlighter.DividerDrawConfig[i];
|
||||
FCurDividerConf := nil;
|
||||
|
||||
b := FCurInfo.Info^[i].BoolOpt;
|
||||
b := FCurDivInfo.Info^[i].BoolOpt;
|
||||
DividerBoolPanel.Visible := b;
|
||||
DividerSpinPanel.Visible := not b;
|
||||
NestLvlPanel.Visible := not b;
|
||||
@ -228,7 +292,6 @@ function TEditorCodefoldingOptionsFrame.GetHighlighter(SynType: TLazSyntaxHighli
|
||||
CreateIfNotExists: Boolean): TSrcIDEHighlighter;
|
||||
var
|
||||
SynClass: TCustomSynClass;
|
||||
i: Integer;
|
||||
begin
|
||||
Result := FHighlighters[SynType];
|
||||
if (Result <> nil) or not(CreateIfNotExists) then exit;
|
||||
@ -268,13 +331,16 @@ begin
|
||||
TopLvlColorCheckBox.Caption := dlgDividerTopColorDefault;
|
||||
NestLvlColorLabel.Caption := dlgDividerNestColor;
|
||||
NestLvlColorCheckBox.Caption := dlgDividerNestColorDefault;
|
||||
DividerSpeedButton.Caption := dlgDividerConf;
|
||||
FoldSpeedButton.Caption := dlgfoldConf;
|
||||
end;
|
||||
|
||||
procedure TEditorCodefoldingOptionsFrame.ReadSettings(
|
||||
AOptions: TAbstractIDEOptions);
|
||||
var
|
||||
i: Integer;
|
||||
r: TEditorOptionsDividerRecord;
|
||||
rd: TEditorOptionsDividerRecord;
|
||||
rf: TEditorOptionsFoldRecord;
|
||||
begin
|
||||
with AOptions as TEditorOptions do
|
||||
begin
|
||||
@ -283,8 +349,9 @@ begin
|
||||
with LanguageComboBox.Items do begin
|
||||
BeginUpdate;
|
||||
for i := 0 to EditorOpts.HighlighterList.Count - 1 do begin
|
||||
r := EditorOptionsDividerDefaults[HighlighterList[i].TheType];
|
||||
if r.Count > 0 then
|
||||
rd := EditorOptionsDividerDefaults[HighlighterList[i].TheType];
|
||||
rf := EditorOptionsFoldDefaults[HighlighterList[i].TheType];
|
||||
if (rd.Count > 0) or (rf.Count > 0) then
|
||||
Add(HighlighterList[i].SynClass.GetLanguageName);
|
||||
end;
|
||||
EndUpdate;
|
||||
|
||||
@ -1220,6 +1220,9 @@ resourcestring
|
||||
dlgIndentCodeTo = 'Indent code to';
|
||||
//dlgCodeToolsTab = 'Code Tools';
|
||||
lisAutomaticFeatures = 'Automatic features';
|
||||
dlgDividerConf = 'Divider';
|
||||
dlgfoldConf = 'Folding';
|
||||
|
||||
dlgDividerOnOff = 'Draw divider';
|
||||
dlgDividerDrawDepth = 'Draw divider level';
|
||||
dlgDividerTopColor = 'Line color';
|
||||
@ -1237,6 +1240,25 @@ resourcestring
|
||||
dlgDivPasBeginEndName = 'Begin/End';
|
||||
dlgDivPasTryName = 'Try/Except';
|
||||
|
||||
dlgFoldPasBeginEnd = 'Begin/End (nested)';
|
||||
dlgFoldPasProcBeginEnd = 'Begin/End (procedure)';
|
||||
dlgFoldPasNestedComment = 'Nested Comment';
|
||||
dlgFoldPasProcedure = 'Procedure';
|
||||
dlgFoldPasUses = 'Uses';
|
||||
dlgFoldPasVarType = 'Var/Type (global)';
|
||||
dlgFoldLocalPasVarType = 'Var/Type (local)';
|
||||
dlgFoldPasClass = 'Class/Object';
|
||||
dlgFoldPasClassSection = 'public/private';
|
||||
dlgFoldPasUnitSection = 'Unit section';
|
||||
dlgFoldPasProgram = 'Program';
|
||||
dlgFoldPasUnit = 'Unit';
|
||||
dlgFoldPasRecord = 'Record';
|
||||
dlgFoldPasTry = 'Try';
|
||||
dlgFoldPasExcept = 'Except/Finally';
|
||||
dlgFoldPasRepeat = 'Repeat';
|
||||
dlgFoldPasCase = 'Case';
|
||||
dlgFoldPasAsm = 'Asm';
|
||||
|
||||
// CodeTools dialog
|
||||
dlgCodeToolsOpts = 'CodeTools Options';
|
||||
dlgCodeCreation = 'Code Creation';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user