2021-12-30 16:54:35 -05:00
|
|
|
use gtk4::glib;
|
|
|
|
|
use gtk4::subclass::prelude::*;
|
2021-12-31 14:58:26 -05:00
|
|
|
use std::cell::RefCell;
|
|
|
|
|
use std::rc::Rc;
|
2021-11-28 21:11:02 -05:00
|
|
|
|
2021-12-31 14:58:26 -05:00
|
|
|
#[derive(Debug, Default)]
|
2021-12-28 11:19:55 -05:00
|
|
|
pub struct SearchResultRow {
|
2021-12-31 14:58:26 -05:00
|
|
|
pub name: Rc<RefCell<gtk4::Label>>,
|
|
|
|
|
pub description: Rc<RefCell<gtk4::Label>>,
|
|
|
|
|
pub shortcut: Rc<RefCell<gtk4::Label>>,
|
|
|
|
|
pub image: Rc<RefCell<gtk4::Image>>,
|
|
|
|
|
pub category_image: Rc<RefCell<gtk4::Image>>,
|
2021-11-28 21:11:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[glib::object_subclass]
|
2021-12-28 11:19:55 -05:00
|
|
|
impl ObjectSubclass for SearchResultRow {
|
|
|
|
|
const NAME: &'static str = "SearchResultRow";
|
|
|
|
|
type Type = super::SearchResultRow;
|
2021-12-30 16:54:35 -05:00
|
|
|
type ParentType = gtk4::Box;
|
2021-11-28 21:11:02 -05:00
|
|
|
}
|
|
|
|
|
|
2021-12-28 11:19:55 -05:00
|
|
|
impl ObjectImpl for SearchResultRow {}
|
2021-12-29 17:31:01 -05:00
|
|
|
|
2021-12-28 11:19:55 -05:00
|
|
|
impl WidgetImpl for SearchResultRow {}
|
2021-12-29 17:31:01 -05:00
|
|
|
|
2021-12-28 11:19:55 -05:00
|
|
|
impl BoxImpl for SearchResultRow {}
|