Crate relm [] [src]

Asynchronous GUI library based on GTK+ and futures/tokio.

This library provides a Widget trait that you can use to create asynchronous GUI components. This is the trait you will need to implement for your application. It helps you to implement MVC (Model, View, Controller) in an elegant way.

Installation

Add this to your Cargo.toml:

[dependencies]
gtk = "^0.1.2"
relm = "^0.4.0"
relm-derive = "^0.1.2"

More info can be found in the readme.

Modules

gtk_ext

This module contains methods to set the child properties of a gtk::Box.

Macros

connect

Connect events to sending a message.

impl_widget

Dummy macro to be used with #[derive(Widget)].

relm_widget

Macro to be used as a stable alternative to the #[widget] attribute.

Structs

Component

Widget that was added by the ContainerWidget::add_widget() method.

Relm

Handle connection of futures to send messages to the update() and update_command() methods.

RemoteRelm

Handle to the tokio event loop, to be used from the GTK+ thread.

Traits

ContainerWidget

Extension trait for GTK+ containers to add and remove relm Widgets.

DisplayVariant

Format trait for enum variants.

Widget

Trait to implement to manage widget's events.

Functions

init_test

Initialize a widget for a test.

run

Create the specified relm Widget and run the main event loops.