// SPDX-License-Identifier: EUPL-1.2+ // SPDX-FileCopyrightText: 2025 Johannes Süllner use iced::{Subscription, Task}; mod completion; mod confirmation; mod disk_selection; mod installation; mod layout; mod welcome; pub const WINDOW_WIDTH: f32 = 750.0; pub const WINDOW_HEIGHT: f32 = 650.0; pub const MARGIN_VERTICAL: f32 = 25.0; pub const MARGIN_LR: f32 = 15.0; pub const BUTTON_TEXT_SIZE: u16 = 20; pub const TITLE_TEXT_SIZE: u16 = 24; type UpdateResult = (Option>, Task); type InstallResult = Result; pub trait Page { fn update(&mut self, event: Event) -> UpdateResult; fn view(&self) -> iced::Element<'_, Event>; fn subscription(&self) -> Subscription { Subscription::none() } } #[derive(Clone, Debug)] pub enum Event { /* Pages are ordered as they appear during the installation. */ PageWelcome(welcome::PageWelcomeEvent), PageDiskSelection(disk_selection::PageDiskSelectionEvent), PageConfirmation(confirmation::PageConfirmationEvent), PageInstallation(installation::PageInstallationEvent), PageCompletion(completion::PageCompletionEvent), } pub const INITAL_PAGE: welcome::PageWelcome = welcome::PageWelcome {};