Crate relm [−] [src]
Asynchronous GUI library based on GTK+.
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.3.0"
relm = "^0.11.0"
relm-derive = "^0.11.0"
More info can be found in the readme.
Macros
connect |
Connect events to sending a message. |
connect_async |
Connect an asynchronous method call to send a message.
The variants with |
connect_async_full |
Like |
connect_async_func |
Connect an asynchronous function call to send a message.
The variants with |
connect_async_func_full |
Like |
connect_stream |
Connect events to sending a message.
Similar to |
impl_widget |
Dummy macro to be used with |
relm_widget |
Macro to be used as a stable alternative to the |
Structs
Component |
Widget that was added by the |
ContainerComponent |
Struct for relm containers to add GTK+ and relm |
Relm |
Handle event stream to send messages to the |
Traits
Container |
Trait to implement relm container widget. |
ContainerWidget |
Extension trait for GTK+ containers to add and remove relm |
DisplayVariant |
Format trait for enum variants. |
Update |
Trait for a basic (non-widget) component.
A component has a model (data) associated with it and can mutate it when it receives a message
(in the |
UpdateNew |
Trait for an |
Widget |
Trait to implement to manage widget's events. |
Functions
create_component |
Create a new relm widget without adding it to an existing widget. This is useful when a relm widget is at the root of another relm widget. |
create_container |
Create a new relm container widget without adding it to an existing widget. This is useful when a relm widget is at the root of another relm widget. |
execute |
Create a bare component, i.e. a component only implementing the Update trait, not the Widget trait. |
g_object_new_with_properties⚠ | |
init |
Initialize a widget. |
init_test |
Initialize a widget for a test. |
interval |
Emit the |
run |
Create the specified relm |
timeout |
After |