reworked when to hide widgets, now that double buffering is enabled and no flickering occurs,
I can go less specific. Therefore widgets simply hide when they have changed (immutability is great!)
this fixes a bug where widgets are updated and need to redraw completly
enabled double buffering via Capra, which flips at the end of the swap-widgets!, removing basically
all flickering (who ever invented double buffering and who ever made it so easy usable in awt should get a noble prize)
fixed the export/import of the current state to/from an edn file
hiding based on background color by using capra/clear-rect
fixed text appearing outside the widgets
almost all previous stateful interactions are replaced by functions taking a
widget map and returning a widget map -> changed button! to add-button, input! -> add-input.
Removed functions like update! etc. ...
From now on swap-widgets! should be used, which takes a function where the argument is the map of widgets.
Basically its a function that is expected to transform the current map of widgets to a new map of widgets.
Events can now be attached with attach-event, this function (as the above) expects a map of widgets and
returns a map of widgets.
removed register! unregister! replace!
reworked internal event functions to use swap-widgets!
removed canvas from widget-global-event
input fields can now be marked as password fields via args :password?
added before-drawing function to the widget protocol, which is called each time before a widget is drawn