pyscripter / SynEdit

SynEdit is a syntax highlighting edit control, not based on the Windows common controls.
36 stars 11 forks source link

Paint flow control symbos #105

Open pyscripter opened 3 hours ago

pyscripter commented 3 hours ago

As in Delphi and the picture below:

image

pyscripter commented 3 hours ago

Implemented in the multicaret branch.

New TSynEdit published property: DisplayFlowControl of the following type:

 TSynDisplayFlowControl = class(TPersistent)
 published
   property Enabled: Boolean read FEnabled write FEnabled default True;
   property Color: TColor read FColor write FColor default $0045FF; //clWebOrangeRed
 end;
TCustomHighligher has a new vitrual method:

    function FlowControlAtLine(Lines: TStrings; Line: Integer): TSynFlowControl; virtual;

type
  TSynFlowControl = (fcNone, fcContinue, fcBreak, fcExit);

Highlighters need to override this method to support this feature. Currently the Pascal, DWS and python highlighters do that.

You can customize the choice of symbols displayed be changing this array variable declared in SynUnicode.pas;

var
  FlowControlChars: array[TSynFlowControl] of Char =
    (WideNull, #$2BAD, #$2BAF, #$27A5);