Add program::Preset and emulator::Mode

This commit is contained in:
Héctor Ramón Jiménez 2025-06-04 19:17:11 +02:00
parent 927d5b7cba
commit 73f5569f28
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
17 changed files with 305 additions and 39 deletions

View file

@ -4,6 +4,12 @@ pub use iced_runtime as runtime;
pub use iced_runtime::core;
pub use iced_runtime::futures;
#[cfg(feature = "test")]
mod preset;
#[cfg(feature = "test")]
pub use preset::Preset;
use crate::core::renderer;
use crate::core::text;
use crate::core::theme;
@ -100,6 +106,11 @@ pub trait Program: Sized {
fn scale_factor(&self, _state: &Self::State, _window: window::Id) -> f64 {
1.0
}
#[cfg(feature = "test")]
fn presets(&self) -> &[Preset<Self::State, Self::Message>] {
&[]
}
}
/// Decorates a [`Program`] with the given title function.