AdaptEventCx now includes input data. Motivation: reduce the parameter count to various closures. Caveats:
AdaptEventCx must be templated over the input data type. Since users often don't need to explicitly type closure parameters this seems acceptable (at least, more so than it would be for EventCx).
This data is orthogonal to the needs of EventCx, hence (in large part) why EventCx does not embed input data.
AdaptConfigCx cannot do the same since it is used by on_configure which does not have access to input data.
Edit: the above provide sufficient motivation not to do this. Instead, data is passed separately with a few exceptions (namely Adapt::on_message which is frequently used, (so far) never wants input data, and can be replaced by the lower-level Adapt::on_messages method where data is needed).
These types are now used by AdaptWidget, Grid and List.
Add fns map_message and on_message to Grid and List.
AdaptEventCx
now includes input data. Motivation: reduce the parameter count to various closures. Caveats:AdaptEventCx
must be templated over the input data type. Since users often don't need to explicitly type closure parameters this seems acceptable (at least, more so than it would be forEventCx
).EventCx
, hence (in large part) whyEventCx
does not embed input data.AdaptConfigCx
cannot do the same since it is used byon_configure
which does not have access to input data.Edit: the above provide sufficient motivation not to do this. Instead, data is passed separately with a few exceptions (namely
Adapt::on_message
which is frequently used, (so far) never wants input data, and can be replaced by the lower-levelAdapt::on_messages
method where data is needed).These types are now used by
AdaptWidget
,Grid
andList
.Add fns
map_message
andon_message
toGrid
andList
.Rename
OnUpdate
→AdaptEvents
.