libcosmic/examples/dock/dock_item/imp.rs

24 lines
489 B
Rust
Raw Normal View History

2021-12-30 16:54:35 -05:00
use gtk4::glib;
use gtk4::subclass::prelude::*;
2021-12-30 17:53:06 -05:00
use std::cell::RefCell;
use std::rc::Rc;
2021-12-30 17:53:06 -05:00
#[derive(Debug, Default)]
2021-12-15 11:37:28 -05:00
pub struct DockItem {
2021-12-30 17:53:06 -05:00
pub image: Rc<RefCell<gtk4::Image>>,
pub dots: Rc<RefCell<gtk4::Label>>,
}
#[glib::object_subclass]
2021-12-15 11:37:28 -05:00
impl ObjectSubclass for DockItem {
const NAME: &'static str = "DockItem";
type Type = super::DockItem;
2021-12-30 16:54:35 -05:00
type ParentType = gtk4::Box;
}
2021-12-15 11:37:28 -05:00
impl ObjectImpl for DockItem {}
2021-12-15 11:37:28 -05:00
impl WidgetImpl for DockItem {}
2021-12-15 11:37:28 -05:00
impl BoxImpl for DockItem {}