[Tickit-dev] Window truncation/clipping behaviour

Paul LeoNerd Evans leonerd at leonerd.org.uk
Wed Aug 8 22:42:34 BST 2012


On Mon, Aug 06, 2012 at 01:34:59PM +0100, Paul LeoNerd Evans wrote:
> I'd like to expand this logic, and allow ->goto to take any window
> co-ordinate, and make use of the existing logic that applies clipping
> when a window overlaps its parent anyway. This would suppress output
> entirely when on a line out of range, and keep track of the "virtual"
> cursor position when off the lefthand edge, ensuring the output is
> eventually printed when the virtual cursor comes into view and becomes
> physical.

Have now implemented this, turned out to be quite simple.

> This I think can simplify some render methods, that otherwise have to
> implement too much of their own clipping logic.

Seems useful in Tickit::Widget::Tabbed

> As perhaps an extension, the goto method could return some state similar
> to the Window's internal method to check visibility of a position; it
> can claim any of "visible for the next $n columns", "hidden for the next
> $n columns" or "hidden forever more". Perhaps this part needs some more
> work...

Not done this one yet, as it's largely an optimisation for Widget
->render methods. Might go in later, when we've more of an idea what
they'll look like.

-- 
Paul "LeoNerd" Evans

leonerd at leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <http://mail.leonerd.org.uk/pipermail/tickit-dev/attachments/20120808/ae3522a9/attachment.sig>


More information about the Tickit-dev mailing list