Crate relm4

source ·
Expand description

An idiomatic GUI library inspired by Elm and based on gtk4-rs.

The docs are available in two versions. Use the stable docs if you want get information about a version that was already published. Visit the nightly docs if are trying out the newest but possibly unstable version of the crate.

Docs of related crates: relm4 | relm4-macros | relm4-components | gtk4-rs | gtk-rs-core | libadwaita-rs | libpanel-rs

GitHub | Website | Book | Blog

Re-exports

Modules

  • Action utility.
  • Components are smaller mostly independent parts of your application.
  • Utility to help drawing on a gtk::DrawingArea in a Relm4 application. Create a DrawHandler, initialize it, and get its context when handling a message (that could be sent from the draw signal).
  • Defines traits and data types to generate widgets from collections efficiently.
  • Utilities for removing temporary widgets from async factories or components.
  • Commonly-imported traits and types.
  • Shared state that can be accessed by many components.
  • Cancellation mechanism used by Relm4.

Macros

Structs

  • Contains senders to send and receive messages from a Component.
  • Contains senders to send and receive messages from a Component.
  • A component that is ready for docking and launch.
  • Contains the initial model and widgets being docked into a component.
  • Contains senders to send and receive messages from a Component.
  • Controls the component from afar.
  • Contains senders to send and receive messages from a Component.
  • An owned permission to join on a task (await its termination).
  • A type that can be used in static variables to pass messages to components.
  • A Relm4 receiver receives messages from a component or worker.
  • A type that allows you to share information across your application easily.
  • An app that runs the main application.
  • A Relm4 sender sends messages to a component or worker.
  • A type that allows you to share information across your application easily. Get immutable and mutable access to the data and subscribe to changes.
  • Listens to shutdown signals and constructs shutdown futures.

Statics

  • Defines the maximum number of background threads to spawn for handling blocking tasks.
  • Defines how many threads that Relm4 should use for background tasks.

Traits

Functions

Attribute Macros

  • Macro that implements relm4::Component or relm4::SimpleComponent and generates the corresponding widgets struct.
  • Macro that implements relm4::factory::FactoryComponent and generates the corresponding widgets struct.
  • A macro to generate widget templates.