-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathlabel.rs
34 lines (26 loc) · 926 Bytes
/
label.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#[macro_use]
extern crate iup;
use iup::prelude::*;
use iup::layout::VBox;
use iup::control::Label;
fn main () {
iup::with_iup(|| {
let phrase = "The quick brown fox jumps over the lazy dog";
Dialog::new(
VBox::new(elements![
Label::with_title(phrase),
Label::new_separator(Orientation::Horizontal),
Label::with_title(phrase)
.set_attrib("FONT", "COURIER_NORMAL_14"),
Label::new_separator(Orientation::Horizontal),
VBox::new(elements![
Label::with_title(phrase),
Label::with_title(phrase),
]).set_attrib("FONT", "COURIER_ITALIC_14"),
]).set_attrib("GAP", "5x")
.set_attrib("MARGIN", "10x10")
).set_attrib("TITLE", "Label")
.set_attrib("RESIZE", "NO")
.show()
}).unwrap();
}