mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-23 15:59:11 +02:00
SynEdit Fold: align tree-end marker with drawn divider-line
git-svn-id: trunk@18042 -
This commit is contained in:
parent
e066a0006d
commit
542163b6b9
@ -183,6 +183,7 @@ type
|
|||||||
|
|
||||||
function GetCount : integer;
|
function GetCount : integer;
|
||||||
function GetDrawDivider(Index : integer) : Boolean;
|
function GetDrawDivider(Index : integer) : Boolean;
|
||||||
|
function GetFoldNestLevel(index : Integer): integer;
|
||||||
function GetLines(index : Integer) : String;
|
function GetLines(index : Integer) : String;
|
||||||
function GetDisplayNumber(index : Integer) : Integer;
|
function GetDisplayNumber(index : Integer) : Integer;
|
||||||
function GetRange(Index : integer) : TSynEditRange;
|
function GetRange(Index : integer) : TSynEditRange;
|
||||||
@ -231,6 +232,8 @@ type
|
|||||||
read GetDisplayNumber;
|
read GetDisplayNumber;
|
||||||
property FoldType[index : Integer] : TSynEditCodeFoldType (* FoldIcon / State *)
|
property FoldType[index : Integer] : TSynEditCodeFoldType (* FoldIcon / State *)
|
||||||
read GetFoldType;
|
read GetFoldType;
|
||||||
|
property FoldNestLvl[index : Integer] : integer (* FoldIcon / Deep/Level of nesting; 1 for top-lvl *)
|
||||||
|
read GetFoldNestLevel;
|
||||||
property DrawDivider[Index: integer]: Boolean
|
property DrawDivider[Index: integer]: Boolean
|
||||||
read GetDrawDivider;
|
read GetDrawDivider;
|
||||||
property TextIndex[index : Integer] : Integer (* Position in SynTextBuffer / result is 0-based *)
|
property TextIndex[index : Integer] : Integer (* Position in SynTextBuffer / result is 0-based *)
|
||||||
@ -1536,6 +1539,15 @@ begin
|
|||||||
and (fLines.FoldEndLevel[TextIndex[index]] < CFDividerDrawLevel);
|
and (fLines.FoldEndLevel[TextIndex[index]] < CFDividerDrawLevel);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TSynEditFoldedView.GetFoldNestLevel(index : Integer): integer;
|
||||||
|
begin
|
||||||
|
if (index < 0) or (index > fLinesInWindow) then exit(-1);
|
||||||
|
if (fFoldTypeList[index] = cfEnd) and (fTextIndexList[index] > 0) then
|
||||||
|
Result := fLines.FoldEndLevel[fTextIndexList[index]-1]
|
||||||
|
else
|
||||||
|
Result := fLines.FoldEndLevel[fTextIndexList[index]];
|
||||||
|
end;
|
||||||
|
|
||||||
(* Topline *)
|
(* Topline *)
|
||||||
procedure TSynEditFoldedView.SetTopLine(const ALine : integer);
|
procedure TSynEditFoldedView.SetTopLine(const ALine : integer);
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user