42 lines
1.1 KiB
Rust
42 lines
1.1 KiB
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
use gtk::prelude::*;
|
|
use gtk::subclass::prelude::*;
|
|
use gtk::CompositeTemplate;
|
|
|
|
#[derive(Debug, Default, CompositeTemplate)]
|
|
#[template(file = "./window.ui")]
|
|
pub struct EchidnaWindow {
|
|
#[template_child]
|
|
pub notebook: TemplateChild<gtk::Notebook>,
|
|
#[template_child]
|
|
pub sidebar: TemplateChild<super::super::sidebar::EchidnaSidebar>,
|
|
}
|
|
|
|
#[glib::object_subclass]
|
|
impl ObjectSubclass for EchidnaWindow {
|
|
const NAME: &'static str = "EchidnaWindow";
|
|
type Type = super::EchidnaWindow;
|
|
type ParentType = gtk::ApplicationWindow;
|
|
|
|
fn class_init(class: &mut Self::Class) {
|
|
Self::bind_template(class);
|
|
}
|
|
|
|
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
|
|
obj.init_template();
|
|
}
|
|
}
|
|
|
|
impl ObjectImpl for EchidnaWindow {}
|
|
|
|
impl WidgetImpl for EchidnaWindow {}
|
|
|
|
impl WindowImpl for EchidnaWindow {}
|
|
|
|
impl ApplicationWindowImpl for EchidnaWindow {}
|
|
|
|
impl BuildableImpl for EchidnaWindow {}
|