tk 0.1.10

Rust bindings for Tk GUI library
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use tk::*;
use tk::cmd::*;

fn main() -> TkResult<()> {
    let tk = make_tk!()?;
    let root = tk.root();

    let check = root
        .add_ttk_checkbutton( "check" -text("Use Metric") -command( "metricChanged" )
            -variable("measuresystem") -onvalue("metric") -offvalue("imperial") )?
        .pack(())?;

    assert!( check.instate( TtkState::Alternate )? );

    Ok( main_loop() )
}