github bodil/vgtk vgtk-v0.2.0
0.2.0

latest releases: vgtk-v0.3.0, vgtk-macros-v0.3.0, vgtk-v0.2.1...
4 years ago

CHANGED

  • Callbacks can now have empty values (constructed by Default::default()), obviating the need to wrap them in Option<>. The coercion for Option<Callback<>> for functions has been replaced with one for just Callback<> as a consequence, which means you'll have to update your subcomponents: just replace any Option<Callback<A>> with Callback<A> in your properties, and remove the Some check on self.on_my_callback.send()—you can just call send() on an empty callback directly now, and it will quietly do nothing. If you'd rather not needlessly construct the value for send() when a callback is empty, you can use Callback::is_empty() as a predicate instead of the Some check.

ADDED

  • A macro gtk_if! has been added, to automate the common case of conditionally inserting a child widget.
  • Subcomponents will now accept signal handler syntax, rendering on signal=|| {} into on_signal=|| {}, for consistency.
  • Properties which want an Option<&A> will now accept an Option<A>. (#33)

Don't miss a new vgtk release

NewReleases is sending notifications on new releases.