2017-07-14 15:23:42 +00:00
|
|
|
#![allow(missing_docs)]
|
|
|
|
|
2017-06-26 07:08:37 +00:00
|
|
|
#[macro_export]
|
|
|
|
macro_rules! create_builder_item {
|
|
|
|
($sname:ident, $($element: ident: $ty: ty),+) => {
|
|
|
|
pub struct $sname {
|
|
|
|
$(
|
|
|
|
pub $element: $ty
|
|
|
|
),+
|
|
|
|
}
|
|
|
|
|
|
|
|
impl $sname {
|
|
|
|
pub fn new(builder: gtk::Builder) -> $sname {
|
|
|
|
return $sname {
|
|
|
|
$(
|
|
|
|
$element: builder.get_object(stringify!($element)).unwrap()
|
|
|
|
),+
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|