why is this private in normal releases ?
It will be public in 1.6 release. I didnt make it public when I first implemented it, in case it would still change. Then I forgot.
Q1: what the caret really are in SynEdit ? text blinking cursor as written on wiki ?
or can we say simply this is a method for specifying a point on TSynEdith ?
if its just for cursor position so can we say this is not related to our MarkUp class ?
Normally it refers to the blinking line. Put the term is often used for variables that hold a XY coordinate.
Actually those variable are misnamed. "LogCaret" in this case should be "LogXY", since it is not a caret. (You got me there)
it seems enough for drawing vertical lines but what about coloring the keywords on each depth ?
it will be unlimited keywords (tokens) that can be related to each other (on the same depth)...
similar to below code
I suggest to get back to this when you done:
- getting to know TSynEditMarkup
- highlight keywords on each line
But as I wrote in my 3rd point TextView.FoldProvider.NestedFoldsList; / TLazSynEditNestedFoldsList will do help you.
This list, if created for a line will find ALL blocks that are open at the begin of that line.
Actually with
List.IncludeOpeningOnLine := False;
it might help for the current line too.
This should include those, that open on the current line.
You still need those that close at the current line.
procedure TIDESynEditor.SrcSynCaretChanged(Sender: TObject);
function RealTopLine: Integer;
begin
Result := TopLine - TSourceLazSynSurfaceManager(FPaintArea).TopLineCount;
end;
var
NodeFoldType: TPascalCodeFoldBlockType;
List: TLazSynEditNestedFoldsList;
begin
if (not FShowTopInfo) or (not HandleAllocated) or (TextView.HighLighter = nil) then exit;
if FSrcSynCaretChangedLock or not(TextView.HighLighter is TSynPasSyn) then exit;
if TextView.HighLighter.NeedScan then begin
FSrcSynCaretChangedNeeded := True;
// USING TLazSynEditNestedFoldsList for this line
will give you:
* from line 1 procedure
* from line 9 begin
* from line 13 begin
I am not sure it includes the "then". But that is covered by the begin in that line.
that are the ones for which you need a vertical line on this text line.
Doing so for every line over and over again. (And that is where caching may be needed. / I do not remember, maybe TLazSynEditNestedFoldsList actually does that already)
Q3: how we want to draw that vertical lines ? using GetMarkupAttributeAtRowCol ? if son i think this will not be a continuous line ...
Set the left frame side. If testing shows that is not enough then we need a new attribute on MarkupInfo : TSynSelectedColor.
Drawing directly on the canvas would not support the priority and alpha info on TSynSelectedColor.
Having said that, the drawer will need a fix for continuous dotted lines, but I suggest to discuss that at the end.
as i seen there is no such a thing in SynEditMarkupWordGroup even in svn ...
Are you sure ?
As I wrote:
look at ide/sourcesyneditor
TIDESynEditor.SrcSynCaretChanged
if we draw the vertical line from (x,y1) to (x,y2) ? what about y ?
sorry not sure what you mean.