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-14 11:53:18 -05:00
|
|
|
|
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>>,
|
2021-12-14 11:53:18 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[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 22:23:17 -05:00
|
|
|
type ParentType = gtk4::Button;
|
2021-12-14 11:53:18 -05:00
|
|
|
}
|
|
|
|
|
|
2021-12-15 11:37:28 -05:00
|
|
|
impl ObjectImpl for DockItem {}
|
2021-12-29 17:31:01 -05:00
|
|
|
|
2021-12-15 11:37:28 -05:00
|
|
|
impl WidgetImpl for DockItem {}
|
2021-12-29 17:31:01 -05:00
|
|
|
|
2021-12-30 22:23:17 -05:00
|
|
|
impl ButtonImpl for DockItem {}
|