Documentation

Mg

Minimal UI library based on relm (GTK+), written in Rust.

mg mg mg rust documentation blue mg mg

Installation

Add the following line to the dependencies section of your Cargo.toml:

mg = "0.0.1"
relm = "0.9.6"
relm-attributes = "0.9.0"
relm-derive = "0.9.2"

Usage

In the view! macro, use the Mg widget:

view! {
    Mg<AppCommand, NoSettings>((MODES, "examples/main.conf", None)) {
        // Place your main widget here.
        gtk::Box {
        }
        // Connect a signal to react to commands entered by the user.
        CustomCommand(command) => Command(command),
    }
}