Expand description
An idiomatic GUI library inspired by Elm and based on gtk4-rs.
Docs of related crates: relm4 | relm4-macros | relm4-components | relm4-css | gtk4-rs | gtk-rs-core | libadwaita-rs | libpanel-rs
Re-exports§
pub use component::worker::Worker;
pub use component::worker::WorkerController;
pub use component::worker::WorkerHandle;
pub use component::Component;
pub use component::ComponentBuilder;
pub use component::ComponentController;
pub use component::ComponentParts;
pub use component::Controller;
pub use component::MessageBroker;
pub use component::SimpleComponent;
pub use shared_state::Reducer;
pub use shared_state::Reducible;
pub use gtk;
pub use relm4_css as css;
css
pub use adw;
libadwaita
pub use panel;
libpanel
pub use once_cell;
pub use tokio;
Modules§
- A module for convenient abstractions over gtk-rs.
- Action utility.
- Easy data bindings between objects.
- Components are smaller mostly independent parts of your application.
- 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.
- Typed views.
Macros§
- menu
macros
A macro to create menus. - Create a new type that implements
ActionGroupName
. - Create a new type that implements
ActionName
with state and target type. - Create a new type that implements
ActionName
without state or target type. - view
macros
Theview!
macro allows you to construct your UI easily and cleanly.
Structs§
- Contains senders to send and receive messages from a
Component
. - Contains senders to send and receive messages from a
Component
. - Contains senders to send and receive messages from a
Component
. - Contains senders to send and receive messages from a
Component
. - An owned permission to join on a task (await its termination).
- A Relm4 receiver receives messages from a component or worker.
- An app that runs the main application.
- A Relm4 sender sends messages to a component or worker.
- 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§
- Additional methods for
gtk::builders::ApplicationBuilder
- Type of children inside a container.
- Widget types which can have widgets attached to them.
- Widget types which allow iteration over their children.
- Additional methods for
gtk::ListBox
. - Trait that extends
gtk::prelude::ObjectExt
. - Widget types that allow removal of all their children.
- Widget types which can have widgets removed from them.
- Widget types which allow to set or unset their child.
- Trait that extends
gtk::prelude::WidgetExt
. - Get a reference to a widget.
- A trait that describes a widget template.
Functions§
- Create an unbounded channel to send messages between different parts of you application.
- main_
adw_ application libadwaita
Returns the globaladw::Application
that’s used internally byRelmApp
if thelibadwaita
feature is enabled. - Returns the global
gtk::Application
that’s used internally byRelmApp
. - Sets a custom global stylesheet.
- Sets a custom global stylesheet from a file.
- Sets a custom global stylesheet from a file, with the given priority.
- Sets a custom global stylesheet, with the given priority.
- Spawns a
Send
-able future to the shared component runtime. - Spawns a blocking task in a background thread pool.
- Spawns a thread-local future on GLib’s executor, for non-
Send
futures. - Spawns a thread-local future on GLib’s executor, for non-
Send
futures.
Attribute Macros§
- component
macros
Macro that implementsrelm4::Component
orrelm4::SimpleComponent
and generates the corresponding widgets struct. - factory
macros
Macro that implementsrelm4::factory::FactoryComponent
and generates the corresponding widgets struct. - widget_
template macros
A macro to generate widget templates.