There is
property TopView: integer
It returns the top-line of the editor, counting only visible lines.
It is protected, so you need to subclass SynEdit.
- IIRC, OnStatusChange triggers if that changes
The visible count, is private: CurrentMaxTopView
But there is protected FoldedTextBuffer, which has the visible lines count (you need to add, in case of scrollpastEol), see CurrentMaxTopView
- Not sure what event triggers, if that changes.
Unfortunately there is not yet an interface defined for all of this.
And this may still take a bit, fold-view is not correctly integrated into synedit yet. Several places have hardcoded access to it. But SynEdit is meant to be modal.