fn make_focus_taker(inner: Rc<Cell<Option<bool>>>) -> impl Widget<bool> {
        ModularWidget::new(inner)
            .event_fn(|_, ctx, event, _data, _env| {
                if let Event::Command(cmd) = event {
                    if cmd.is(TAKE_FOCUS) {
                        ctx.request_focus();
                    }
                }
            })
            .lifecycle_fn(|is_focused, _, event, _data, _env| {
                if let LifeCycle::FocusChanged(focus) = event {
                    is_focused.set(Some(*focus));
                }
            })
    }
/// A widget that takes focus when sent a particular command.
/// The widget records focus change events into the inner cell.
A widget that takes focus when sent a particular command.
The widget records focus change events into the inner cell.
A widget that takes focus when sent a particular command . The widget records focus change events into the inner cell .
fn make_focus_taker(inner: Rc<Cell<Option<bool>>>) -> impl Widget<bool> {
        ModularWidget::new(inner)
            .event_fn(|_, ctx, event, _data, _env| {
                if let Event::Command(cmd) = event {
                    if cmd.is(TAKE_FOCUS) {
                        ctx.request_focus();
                    }
                }
            })
            .lifecycle_fn(|is_focused, _, event, _data, _env| {
                if let LifeCycle::FocusChanged(focus) = event {
                    is_focused.set(Some(*focus));
                }
            })
    }
fn make_focus_taker ( inner : Rc < Cell < Option < bool > > > ) -> impl Widget < bool > { ModularWidget :: new ( inner ) . event_fn ( | _ , ctx , event , _data , _env | { if let Event :: Command ( cmd ) = event { if cmd . is ( TAKE_FOCUS ) { ctx . request_focus ( ) ; } } } ) . lifecycle_fn ( | is_focused , _ , event , _data , _env | { if let LifeCycle :: FocusChanged ( focus ) = event { is_focused . set ( Some ( * focus ) ) ; } } ) }
A widget that takes focus when sent a particular command.
A widget that takes focus when sent a particular command .
inner
Rc<Cell<Option<bool>>>
inner
Rc<Cell<Option<bool>>>