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
//! Label use super::WgtProxy; use crate::cql; #[cql::derive::Wgt] pub struct Lbl; impl Lbl { pub fn make(s: &str) -> Self { Self { proxy: WgtProxy::from_h(unsafe { cql::lbl_make(cql::to_cstring(s).as_ptr()) }), } } pub fn text(&self) -> String { cql::to_string(unsafe { cql::lbl_text(self.proxy.ch()) }) } pub fn set_text(&mut self, s: &str) { unsafe { cql::lbl_setText(self.proxy.ch(), cql::to_cstring(s).as_ptr()); } } } // eof