anchor.diff:    NPos:= 1;
     Node:= nil;
     NodeParent:= nil;
  +  NLevelPrev:= 1;
   
     while NPos<=Length(Str) do
     begin
  
positive.code:   end;
    //
  var
    NX1, NY1, NX2, NY2, NLevel, NIcon: integer;
    STitle: string;
    Tree: TTreeView;
    Node, NodeParent: TTreeNode;
    i: integer;
  begin
    //Str = '[ ((x1, y1, x2, y2), level, 'title', icon), ... ]'
  
negative.code:     NIcon:= GetInt;
      //ShowMessage(Str+#10+Format('%d,%d,%d,%d, lev %d, "%s", icon %d', [NX1, NY1, NX2, NY2, NLevel, STitle, NIcon]));
  
      if (Node=nil) or (NLevel<=1) then
        NodeParent:= nil
      else
      begin
        NodeParent:= Node;
        for i:= NLevel to NLevelPrev do
          if Assigned(NodeParent) then
            NodeParent:= NodeParent.Parent;
      end;
  
      Range:= TATRangeInCodeTree.Create;
      Range.PosBegin:= Point(NX1, NY1);
      Range.PosEnd:= Point(NX2, NY2);
  
      Node:= Tree.Items.AddChildObject(NodeParent, STitle, Range);
      Node.ImageIndex:= NIcon;
      Node.SelectedIndex:= NIcon;
  
      NLevelPrev:= NLevel;
    end;
  
    Tree.EndUpdate;
  