Page 1 of 1

Gutter question

Posted: 17.10.2025 17:44
by bungeeboomerang
To the left of the addow for the bookmark in the gutter is a column that shows me, when the caret is inside curly braces, which lines those curly braces are on. I'm not sure what this is called, i don't think it is named in the wiki. It is related to, but not the same as the code folding column.

What can I search for in the code to see where this is done ... how it is writing to that column? Also, is this column standard if I just drop a new TATSynedit on a for, or do I have to do some work to set it up? (I mean the code about writing to it, not determining what to write where). If that isn't dropped-on-the-form behavior, where in CudaText source can I see how it is being created and added to the gutter?

Are there any other FOSS projects that use the ATSynedit component heavily that could be used as a reference for how to accomplish things?

Re: Gutter question

Posted: 25.10.2025 11:57
by main Alexey
this folding column is 'gutter decor'.
it has symbols chars to show curly braces.
e.g. if code needs to show {} braces, code needs to add 2 items to decor-list:
{ in 1st line
} in last line
source code file: atsynedit_gutter_decor.pas .
struct for decor items:

Code: Select all


  TATGutterDecorData = packed record
  private const
    cHintSeparator = #1;
  private
    function GetTextAll: string;
    function GetTextCaption: string;
    function GetTextHint: string;
    procedure SetTextAll(const AValue: string);
  public
    Tag: Int64;
    TextBuffer: PChar;
    LineNum: integer;
    ImageIndex: integer;
    TextColor: TColor;
    TextBold: boolean;
    TextItalic: boolean;
    DeleteOnDelLine: boolean;
    property TextAll: string read GetTextAll write SetTextAll;
    property TextCaption: string read GetTextCaption;
    property TextHint: string read GetTextHint;
  end;