elcritch / figuro

Experimental UI Library for Nim
64 stars 1 forks source link

Widgets macro #22

Closed elcritch closed 1 year ago

elcritch commented 1 year ago

Hmmmm, tried a bit of everything:

The simplest solution (for now) appears to be a template which exports a macro for each widget. While this will slow compilation down, it's only one per widget.

It'd be possible to rework this to have a macro / compile process which spits out templates that work the same but with type overloads for all the default cases.