libcosmic/examples/launcher/search_result_row/imp.rs

27 lines
679 B
Rust
Raw Normal View History

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-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>>,
}
#[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-12-28 11:19:55 -05:00
impl ObjectImpl for SearchResultRow {}
2021-12-28 11:19:55 -05:00
impl WidgetImpl for SearchResultRow {}
2021-12-28 11:19:55 -05:00
impl BoxImpl for SearchResultRow {}