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
35
36
37
38
39
40
// Copyright 2013-2015, The Gtk-rs Project Developers.
// See the COPYRIGHT file at the top-level directory of this distribution.
// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
use glib::translate::ToGlibPtr;
use ffi;
/*
* # Available signals:
* * `activate-current-link` : Action
* * `activate-link` : Run Last
* * `copy-clipboard` : Action
* * `move-cursor` : Action
* * `populate-popup` : Run Last
*/
struct_Widget!(Label);
impl Label {
pub fn new(text: &str) -> Option<Label> {
assert_initialized_main_thread!();
let tmp_pointer = unsafe {
ffi::gtk_label_new(text.to_glib_none().0)
};
check_pointer!(tmp_pointer, Label)
}
pub fn new_with_mnemonic(text: &str) -> Option<Label> {
assert_initialized_main_thread!();
let tmp_pointer = unsafe {
ffi::gtk_label_new_with_mnemonic(text.to_glib_none().0)
};
check_pointer!(tmp_pointer, Label)
}
}
impl_drop!(Label);
impl_TraitWidget!(Label);
impl ::MiscTrait for Label {}
impl ::LabelTrait for Label {}