[Tickit-dev] Released: Tickit 0.39
Paul LeoNerd Evans
leonerd at leonerd.org.uk
Sun Sep 1 21:54:12 BST 2013
I really should remember to write these things more often ;)
Here's a summary of the bigger changes since 0.30, the last time I
wrote one of these:
* Widget subclassing with Style (0.31)
Better defined behaviours when widgets with style are subclassed.
(Though upcoming version 0.40 will further expand on this).
* Automatic reshape and redraw with Style changes (0.32, 0.35)
Style keys can now automatically cause reshape or redraw to happen
when they are changed.
* Mouse drag and drop events (0.32)
Some support for handling drag and drop events between windows. A
window starting a drag operation will keep receiving events for it
even if the cursor moves outside of that window.
* Mouse and key event structures (0.32)
To support more flexible arguments in mouse and keyboard events,
they are now passed as structures, as well as positional parameters.
This works via an overload, allowing the first parameter to be the
event object or stringify to the event type name as it used to.
Eventually this may be removed, so widgets should be updated to use
the new event structure methods directly.
* Tickit::RenderBuffer (0.33) and rendering via it (0.35)
A whole new way of rendering widgets, where an in-memory buffer is
filled with the required content, then it is flushed to the terminal
in an efficient manner. As well as simplifying many types of
rendering method code, this allows such abilities as using Unicode
line-drawing characters, placing corners and junctions correctly.
Currently the widgets on CPAN are in somewhat of a transition, but
eventually when every class is using the new ->render_to_rb model,
the old version will be removed, along with most of the drawing
methods on Windows. Instead, RenderBuffers will be constructed right
from the root window upwards, and flushed directly to the terminal.
(At this point, RenderBuffer will move from its current XS
implementation to being native to libtickit itself).
* Timer API (0.34)
The main Tickit object now supports a simple API for registering
timer callbacks to run things at some future time. This is
integrated with the event-loop subclasses (Tickit::Async and
POEx::Tickit) as well. So far not much is using it, asides from the
recent Tickit::Widget::Spinner, to display a spinning
progress animation.
* Automatic focus-chain management (0.35)
Container widgets now automatically handle the "focus chain", the
ordering of which widgets to move to next in the focusing order. The
<Tab> and <Shift-Tab> keys are now handled at the main Widget level,
automatically cycling between focusable widgets. There are still
some rough edges around such cornercases as the Tabbed container
widget, but it mostly works.
* Keybindings from Style (0.35)
Widgets can now handle keypress events as actions by simply creating
methods named after the actions they wish to perform, and supplying
style information to bind these keys. Because it works via the Style
system applications or users can easily override the bindings to
provide their own.
* Experiment to defer Window child list changes (0.37)
Work on Tickit::Widget::Menu demonstrated that having new child
windows appear or old ones disappear in the window order immediately
during event processing can cause bugs where windows receive events
multiple times, or skip them entirely. 0.37 adds a non-default
experiment to defer all these changes until the next 'later' phase,
ensuring that new or deleted windows don't upset the round of event
processing that caused them.
Eventually this option will be enabled by default, so any widget
classes or applications doing nontrivial things with child windows
during event handlers can test their behaviour in preparation for
this by using an environment variable:
$ TICKIT_CHILD_WINDOWS_LATER=1 perl ...
Since 0.37 it's mostly been minor bugfixes and API changes, nothing too
groundbreaking.
--
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: 230 bytes
Desc: not available
URL: <http://mail.leonerd.org.uk/pipermail/tickit-dev/attachments/20130901/980a0697/attachment.sig>
More information about the Tickit-dev
mailing list