diff options
| author | Joe Carstairs <me@joeac.net> | 2025-02-23 15:45:10 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2025-02-23 15:45:10 +0000 |
| commit | bfa9ba1f680bb9a7c2c9555d89e57a76c02f47b8 (patch) | |
| tree | 8e0e23b9ee597c1462bdf4a35041ec0c10b948cf /schist_gtk4_gui/src/window.rs | |
| parent | 10759bb88331141b1586c9e6fa6cf6ce1683b964 (diff) | |
Remove gtk-rs front end
Diffstat (limited to 'schist_gtk4_gui/src/window.rs')
| -rw-r--r-- | schist_gtk4_gui/src/window.rs | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/schist_gtk4_gui/src/window.rs b/schist_gtk4_gui/src/window.rs deleted file mode 100644 index b3cea35..0000000 --- a/schist_gtk4_gui/src/window.rs +++ /dev/null @@ -1,82 +0,0 @@ -use gtk::{ - gio, - glib::{ - self, - object::IsA, - subclass::{ - object::{ObjectImpl, ObjectImplExt}, - types::ObjectSubclass, - InitializingObject, - }, - }, - subclass::{ - application_window::ApplicationWindowImpl, - widget::{ - CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetClassExt, WidgetImpl, - }, - window::WindowImpl, - }, - TemplateChild, -}; - -use crate::{ - balances_view::SchistBalancesView, categories_view::SchistCategoriesView, - category_transfers_view::SchistCategoryTransfersView, - transactions_view::SchistTransactionsView, -}; - -gtk::glib::wrapper! { - pub struct SchistWindow(ObjectSubclass<SchistWindowSubclass>) - @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 SchistWindow { - pub fn new<A: IsA<gtk::Application>>(app: &A) -> Self { - glib::Object::builder().property("application", app).build() - } -} - -#[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/ui/window.ui")] -pub struct SchistWindowSubclass { - #[template_child] - pub balances_view: TemplateChild<SchistBalancesView>, - - #[template_child] - pub categories_view: TemplateChild<SchistCategoriesView>, - - #[template_child] - pub category_transfers_view: TemplateChild<SchistCategoryTransfersView>, - - #[template_child] - pub transactions_view: TemplateChild<SchistTransactionsView>, -} - -#[glib::object_subclass] -impl ObjectSubclass for SchistWindowSubclass { - const NAME: &'static str = "SchistWindow"; - type Type = SchistWindow; - type ParentType = gtk::ApplicationWindow; - - fn class_init(klass: &mut Self::Class) { - klass.bind_template(); - } - - fn instance_init(obj: &InitializingObject<Self>) { - obj.init_template(); - } -} - -impl ObjectImpl for SchistWindowSubclass { - fn constructed(&self) { - self.parent_constructed(); - } -} - -impl WidgetImpl for SchistWindowSubclass {} - -impl WindowImpl for SchistWindowSubclass {} - -impl ApplicationWindowImpl for SchistWindowSubclass {} |
