use gtk::{glib, subclass::prelude::*};
#[derive(Debug, Default, gtk::CompositeTemplate)]
#[template(resource = "/io/github/plrigaux/sysd-manager/grid_cell.ui")]
pub struct GridCell {
#[template_child]
pub name: TemplateChild<gtk::Inscription>,
}
#[glib::object_subclass]
impl ObjectSubclass for GridCell {
const NAME: &'static str = "GridCell";
type Type = super::GridCell;
type ParentType = gtk::Widget;
fn class_init(klass: &mut Self::Class) {
klass.set_layout_manager_type::<gtk::BinLayout>();
klass.bind_template();
}
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
obj.init_template();
}
}
impl ObjectImpl for GridCell {
fn dispose(&self) {
self.dispose_template();
}
}
impl WidgetImpl for GridCell {}