TLF - Leader dots


I’m developing leader dots for TLF engine (see:

The InsertTextOperation requires the SelectionState parameter (the location in the textFlow to insert a string.
I would to insert a dote " . " at the end of the current cursor line.

I can get the current line (TextFlowLine and from that, the current TextLine).
I can also get the current cursor position from the begining of the line but I can’t get the current position from the very begining of the textFlow in the other words what I need is the cursor position of the end of the current line.

If someone could point me the right direction, would me a major help.

PS: After I get this working well, I will donate the final source to Apache Flex.

Thank you,

Meanwhile, I found the solution myself with textFlow.flowComposer.findLineIndexAtPosition.
I sum the characters of all lines before the current one.
It works.

Implemented, tested and shared:

So, does this tab leader feature also works with other characters than dot?

Yes, it does.
It comes with 3 constants (enums) for dot, dash and underscore but it’s easly to add any other character type.