Crate relm4[][src]

Expand description

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


pub use util::widget_plus::WidgetPlus;
pub use gtk;


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 used to efficiently generating widgets from collections.

Utility traits for working with GTK widgets.


Send a message with a sender.


A AsyncRelmWorker is like a RelmWorker but runs the AsyncComponentUpdate::update function in a tokio Runtime.

The app that runs the main application. A RelmApp consists of a model that stores the application state and widgets that represent the UI.

A component that can be part of the main application or other components.

RelmMsgHandlers are usually used to run expansive tasks on different threads and report back when they are finished so that their parent components can keep handling UI events in the meantime. For example you could use a RelmMsgHandler for sending a HTTP request or for copying files.

RelmWorkers are like RelmComponents but they don’t have any widgets.

A Sender that can be used to send items to the corresponding main context receiver.


Define the behavior to update the model of the main app.

ComponentUpdate for asynchronous workers and components.

Define the behavior to initialize and update a component or worker.

Define how to initialize one or more components.

A message handler that can be used in situations where a RelmWorker isn’t flexible enough.

Trait that defines the types associated with the model.

Define behavior to turn the data of you model into widgets.


Returns the application created by RelmApp::new.

Sets a custom global stylesheet.

Sets a custom global stylesheet from a file.

Spawns a future on the main thread in the main event loop.

Attribute Macros