Skip to main content

gtk/subclass/
cell_renderer_combo.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::object::IsA;
4use glib::subclass::prelude::*;
5
6use super::cell_renderer_text::CellRendererTextImpl;
7use crate::CellRendererCombo;
8
9pub trait CellRendererComboImpl:
10    CellRendererTextImpl + ObjectSubclass<Type: IsA<CellRendererCombo>>
11{
12}
13
14unsafe impl<T: CellRendererComboImpl> IsSubclassable<T> for CellRendererCombo {
15    fn class_init(class: &mut ::glib::Class<Self>) {
16        Self::parent_class_init::<T>(class);
17
18        if !crate::rt::is_initialized() {
19            panic!("GTK has to be initialized first");
20        }
21    }
22}