use gtk::{ glib::{ self, subclass::{ object::{ObjectImpl, ObjectImplExt}, types::ObjectSubclass, InitializingObject, }, Object, }, subclass::{ box_::BoxImpl, widget::{CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetImpl}, }, }; glib::wrapper! { pub struct SchistBalancesView(ObjectSubclass) @extends gtk::Box, gtk::Widget, @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Orientable; } impl SchistBalancesView { pub fn new() -> Self { Object::builder().build() } } #[derive(gtk::CompositeTemplate, Default)] #[template(resource = "/net/joeac/schist/ui/balances_view.ui")] pub struct SchistBalancesViewImpl {} #[glib::object_subclass] impl ObjectSubclass for SchistBalancesViewImpl { const NAME: &'static str = "SchistBalancesView"; type Type = SchistBalancesView; type ParentType = gtk::Box; fn class_init(klass: &mut Self::Class) { klass.bind_template(); } fn instance_init(obj: &InitializingObject) { obj.init_template(); } } impl ObjectImpl for SchistBalancesViewImpl { fn constructed(&self) { self.parent_constructed(); } } impl WidgetImpl for SchistBalancesViewImpl {} impl BoxImpl for SchistBalancesViewImpl {}