Hmmm... and another thought:

One pattern I've ended up embracing in Fidgetty has been Nim's "enlightened 
procedural style". Essentially just using proc's that when called modify the 
current environment, whatever that is. With Nim's templates you can make this 
work with functional or object-oriented style backends. :)

This works **very well** for themes where it's literally just "set this color". 
It could be feasible to create a common theming library to be shared across 
multiple UI projects sort of like Julia's `plots` project. Though of course 
there's limits and you can only do the final 10% using UI specific details.

Unlike with events, there's usually a one-way mapping of "set widget color to 
blue" and "center button" to most any UI system. Providing custom user 
behaviour is harder to translate -- I think this sort of aligns with @cblake's 
mention of user proc's to define behaviours vs the data. 

Reply via email to