30 lines
802 B
Rust
30 lines
802 B
Rust
mod imp;
|
|
|
|
use glib::Object;
|
|
use gtk::{
|
|
gio,
|
|
glib::{self, subclass::types::ObjectSubclassIsExt},
|
|
Application, Button,
|
|
};
|
|
|
|
glib::wrapper! {
|
|
pub struct GuessingSetupScene(ObjectSubclass<imp::GuessingSetupScene>)
|
|
@extends gtk::ApplicationWindow, gtk::Window, gtk::Widget,
|
|
@implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable,
|
|
gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager;
|
|
}
|
|
|
|
impl GuessingSetupScene {
|
|
pub fn new(app: &Application) -> Self {
|
|
Object::builder().property("application", app).build()
|
|
}
|
|
|
|
pub fn get_start_button(&self) -> &Button {
|
|
self.imp().start_button.as_ref()
|
|
}
|
|
|
|
pub fn get_back_button(&self) -> &Button {
|
|
self.imp().back_button.as_ref()
|
|
}
|
|
}
|