All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
vgtk
now usesgtk
version 0.9, along with the matching versions of its dependencies. This will affect your code, as many method names have changed, most notably the names of specialised widget constructors. You should consult the gtk-rs blog for details on the changes.
- New child properties
action_widget_start
andaction_widget_end
forNotebook
let you add children as action widgets to notebooks. (#47) - There's a new function
vgtk::run_dialog_props()
for launching a dialog component with a given set of properties, wherevgtk::run_dialog()
would useDefault::default()
to construct a properties object for you. (#43) - A new child property
custom_title
onHeaderBar
lets you set a widget as a custom title, emulating theset_custom_title()
method. (#38)
- A new function
vgtk::start()
has been added to initialise anApplication
component without starting the GTK event loop. It has the added benefit of returning aScope
which you can use to communicate with your component from async jobs other than the standardUpdateAction::defer()
mechanism. UpdateAction
now has aFrom
implementation forFuture<Output = Component::Message>
, allowing you to returnasync {...}.into()
from your update function instead of the slightly more verboseUpdateAction::defer(async {...})
.
Callback
s can now have empty values (constructed byDefault::default()
), obviating the need to wrap them inOption<>
. The coercion forOption<Callback<>>
for functions has been replaced with one for justCallback<>
as a consequence, which means you'll have to update your subcomponents: just replace anyOption<Callback<A>>
withCallback<A>
in your properties, and remove theSome
check onself.on_my_callback.send()
—you can just callsend()
on an empty callback directly now, and it will quietly do nothing. If you'd rather not needlessly construct the value forsend()
when a callback is empty, you can useCallback::is_empty()
as a predicate instead of theSome
check.
- 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=|| {}
intoon_signal=|| {}
, for consistency. - Properties which want an
Option<&A>
will now accept anOption<A>
. (#33)
Initial release.