ribir-v0.2.0-beta.1
Pre-releaseFeatures
-
Support the overlay (@wjian23).
This enhancement simplifies the creation of overlay widgets. It streamlines the addition of any widget to an overlay and offers a more user-friendly API for overlay management
-
macros: Generates documentation for the builder methods of members in
#[derive(Declare)]
, thus improving IDE support.(#538 @M-Adoo) -
core: All built-in widget abilities are now exported on
FatObj
. (#535 @M-Adoo)
You can directly useFatObj
to configure built-in widget abilities such ason_click
,on_key_down
, etc.let _ = FatObj::new(Void) .margin(EdgeInsets::all(1.0)) .on_click(|_, _| { println!("click"); });
-
macros:
#[derive(Decalre)]
now generates aFatObj<State<T>>
instead ofState<T>
, and supports initialization of all built-in widgets on its ObjBuilder. (#535 @M-Adoo)
All pipes used to initialize the field will be unsubscribed when the FatObj is disposed.let row = Row::builder() .margin(...) .on_click(...) .finish(ctx);
-
macros: Introduced
simple_declare
macro for types that don't usePipe
for initialization. (#535 @M-Adoo)
Changed
-
core: StateReader now automatically unsubscribes when no writer is present (#532 @wjian23)
-
core: Consolidated all listener and
FocusNode
into aMixBuiltin
widget (#534 @M-Adoo)- The
MixBuiltin
widget reduces memory usage and allows users to utilize allon_xxx
event handlers, not only during the build declaration but also after the widget has been built.
- The
-
core: removed
MixBuiltinDeclarer
, which is no longer needed. (#538 @M-Adoo) -
macros: removed crate
ribir_builtin
that is no longer needed. (#535 @M-Adoo)
Documented
-
ribir: We no longer auto-generate the built-in list document, as
FatObj
lists all. Its API documentation is sufficient. (#540 @M-Adoo) -
Ribir: Added guide "Using Ribir without 'DSL'" (#545 @M-Adoo)
Breaking
While these are public APIs, they are typically not required for direct use in user code.
-
core: removed
Stateful::on_state_drop
andStateful::unsubscribe_on_drop
(#539 @M-Adoo) -
core: removed
AppCtx::add_trigger_task
andAppCtx::trigger_task
(#539 @M-Adoo) -
core: removed
FatObj::unzip
andFatObj::from_host
(#535 @M-Adoo) -
core:
FatObj::new(host: T, builtin: BuiltinObj)
->FatObj::new(host: T)
-
core: rename
DeclareBuilder::build_declare
toObjDeclarer::finish
(#547 @M-Adoo)
_ core: renameDeclare::declare_builder
toDeclare::declarer
(#547 @M-Adoo) -
core: Renamed the
widget_build
method tobuild
for brevity, given its frequent usage. (#549 @M-Adoo)