Expand description
An idiomatic GUI library inspired by Elm and based on gtk4-rs
Re-exports
pub use util::widget_plus::WidgetPlus;pub use util::WidgetRef;pub use gtk;pub use adw;pub use panel;
Modules
- Action utility.
 - Utility to help drawing on a
gtk::DrawingAreain a Relm4 application. Create aDrawHandler, 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.
 
Macros
- A macro to create menus.
 - Create a new type that implements
ActionGroupName. - Create a new type that implements
ActionNamewith state and target type. - Create a new type that implements
ActionNamewithout state or target type. - A short macro for conveniently sending messages.
 - The
view!macro allows you to construct your UI easily and cleanly. 
Structs
- AsyncRelmWorker
tokio-rtAAsyncRelmWorkeris like aRelmWorkerbut runs theAsyncComponentUpdate::updatefunction in a tokioRuntime. - MicroComponent is a small component that lives in their parents model, can be modified from their parents model but at the same time have their own widgets and update function
 - The app that runs the main application. A
RelmAppconsists 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 aRelmMsgHandlerfor sending a HTTP request or for copying files.RelmWorkers are likeRelmComponents but they don’t have any widgets.- A
Senderthat can be used to send items to the corresponding main context receiver. 
Enums
- Errors which might get returned from
MicroComponent::update_viewmethod 
Traits
- Define the behavior to update the model of the main app.
 - AsyncComponentUpdate
tokio-rtComponentUpdatefor 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
RelmWorkerisn’t flexible enough. - Trait that defines the types associated with model used by
MicroComponent - Define behavior to turn the data of your
MicroModelinto widgets. - Trait that defines the types associated with the model.
 - Define behavior to turn the data of you model into widgets.
 
Functions
- 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
- async_trait
tokio-rtRe-export ofasync_trait::async_trait - Macro that implements
relm4::factory::FactoryPrototypeand generates the corresponding widget struct. - Macro that implements
relm4::MicrosWidgetsand generates the corresponding struct. - Macro that implements
relm4::Widgetsand generates the corresponding struct.