ReSet/src/wifi/wifiBox.rs
tranfelix 9e20da3bd5 add searchable sidebar
add example flowbox with wifi children
2023-10-16 15:53:39 +02:00

44 lines
971 B
Rust

use gtk::{CompositeTemplate, glib, ListBox};
use gtk::prelude::*;
use gtk::subclass::prelude::*;
use crate::wifi::WifiEntry;
#[allow(non_snake_case)]
#[derive(Default, CompositeTemplate)]
#[template(resource = "/org/xetibo/reset/resetWiFi.ui")]
pub struct WifiBox {
#[template_child]
pub resetWifiList: TemplateChild<ListBox>,
}
#[glib::object_subclass]
impl ObjectSubclass for WifiBox {
const NAME: &'static str = "resetWifi";
type Type = super::WifiBox;
type ParentType = gtk::Box;
fn class_init(klass: &mut Self::Class) {
WifiEntry::ensure_type();
klass.bind_template();
}
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
obj.init_template();
}
}
impl ObjectImpl for WifiBox {
fn constructed(&self) {
self.parent_constructed();
}
}
impl BoxImpl for WifiBox {}
impl WidgetImpl for WifiBox {}
impl WindowImpl for WifiBox {}
impl ApplicationWindowImpl for WifiBox {}