Skip to content

Add Widget::Action associated type #664

Open
@PoignardAzur

Description

@PoignardAzur

During various passes, widgets that want to signal a semantically meaningful event from the UI (eg a button that was clicked) can emit actions.

Actions are a centralized queue of messages intended for the root application, mostly for the app driver (eg Xilem) to handle. They are inspired by Facebook's Flux architecture.

Actions are currently under-designed. Right now, they only store the emitter's id, plus a payload among a small set of types with Box<dyn Any> as a wildcard. Ideally, we'd want a way to connect the type of an action from the widget that sent it, so that each widget would have an associated action type. This associated type would only exist for sized Widgets so that the trait remains dyn-safe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions