diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/arc/src/main.rs | 2 | ||||
-rw-r--r-- | examples/bezier_tool/src/main.rs | 2 | ||||
-rw-r--r-- | examples/checkbox/src/main.rs | 2 | ||||
-rw-r--r-- | examples/clock/src/main.rs | 2 | ||||
-rw-r--r-- | examples/color_palette/src/main.rs | 2 | ||||
-rw-r--r-- | examples/custom_shader/src/main.rs | 10 | ||||
-rw-r--r-- | examples/download_progress/src/main.rs | 10 | ||||
-rw-r--r-- | examples/geometry/src/main.rs | 2 | ||||
-rw-r--r-- | examples/layout/src/main.rs | 2 | ||||
-rw-r--r-- | examples/loading_spinners/src/main.rs | 2 | ||||
-rw-r--r-- | examples/multitouch/src/main.rs | 2 | ||||
-rw-r--r-- | examples/pane_grid/src/main.rs | 2 | ||||
-rw-r--r-- | examples/qr_code/src/main.rs | 2 | ||||
-rw-r--r-- | examples/sierpinski_triangle/src/main.rs | 2 | ||||
-rw-r--r-- | examples/solar_system/src/main.rs | 2 | ||||
-rw-r--r-- | examples/stopwatch/src/main.rs | 2 | ||||
-rw-r--r-- | examples/styling/src/main.rs | 2 | ||||
-rw-r--r-- | examples/tour/src/main.rs | 2 | ||||
-rw-r--r-- | examples/url_handler/src/main.rs | 2 | ||||
-rw-r--r-- | examples/vectorial_text/src/main.rs | 2 |
20 files changed, 32 insertions, 24 deletions
diff --git a/examples/arc/src/main.rs b/examples/arc/src/main.rs index 12f34838..cd62ac17 100644 --- a/examples/arc/src/main.rs +++ b/examples/arc/src/main.rs @@ -7,7 +7,7 @@ use iced::widget::canvas::{ use iced::{Element, Length, Point, Rectangle, Renderer, Subscription, Theme}; pub fn main() -> iced::Result { - iced::sandbox("Arc - Iced", Arc::update, Arc::view) + iced::application("Arc - Iced", Arc::update, Arc::view) .subscription(Arc::subscription) .theme(|_| Theme::Dark) .antialiased() diff --git a/examples/bezier_tool/src/main.rs b/examples/bezier_tool/src/main.rs index 9f21508b..1d9f7ddb 100644 --- a/examples/bezier_tool/src/main.rs +++ b/examples/bezier_tool/src/main.rs @@ -3,7 +3,7 @@ use iced::widget::{button, column, text}; use iced::{Alignment, Element, Length}; pub fn main() -> iced::Result { - iced::sandbox("Bezier Tool - Iced", Example::update, Example::view) + iced::application("Bezier Tool - Iced", Example::update, Example::view) .antialiased() .run() } diff --git a/examples/checkbox/src/main.rs b/examples/checkbox/src/main.rs index 8d18cb81..6a3b9464 100644 --- a/examples/checkbox/src/main.rs +++ b/examples/checkbox/src/main.rs @@ -4,7 +4,7 @@ use iced::{Element, Font, Length}; const ICON_FONT: Font = Font::with_name("icons"); pub fn main() -> iced::Result { - iced::sandbox("Checkbox - Iced", Example::update, Example::view) + iced::application("Checkbox - Iced", Example::update, Example::view) .font(include_bytes!("../fonts/icons.ttf").as_slice()) .run() } diff --git a/examples/clock/src/main.rs b/examples/clock/src/main.rs index 5110c78e..318ca74c 100644 --- a/examples/clock/src/main.rs +++ b/examples/clock/src/main.rs @@ -8,7 +8,7 @@ use iced::{ }; pub fn main() -> iced::Result { - iced::sandbox("Clock - Iced", Clock::update, Clock::view) + iced::application("Clock - Iced", Clock::update, Clock::view) .subscription(Clock::subscription) .theme(Clock::theme) .antialiased() diff --git a/examples/color_palette/src/main.rs b/examples/color_palette/src/main.rs index 46fb3b49..b997563f 100644 --- a/examples/color_palette/src/main.rs +++ b/examples/color_palette/src/main.rs @@ -13,7 +13,7 @@ use std::marker::PhantomData; use std::ops::RangeInclusive; pub fn main() -> iced::Result { - iced::sandbox( + iced::application( "Color Palette - Iced", ColorPalette::update, ColorPalette::view, diff --git a/examples/custom_shader/src/main.rs b/examples/custom_shader/src/main.rs index 341b77b6..4457a15a 100644 --- a/examples/custom_shader/src/main.rs +++ b/examples/custom_shader/src/main.rs @@ -9,9 +9,13 @@ use iced::window; use iced::{Alignment, Color, Element, Length, Subscription}; fn main() -> iced::Result { - iced::sandbox("Custom Shader - Iced", IcedCubes::update, IcedCubes::view) - .subscription(IcedCubes::subscription) - .run() + iced::application( + "Custom Shader - Iced", + IcedCubes::update, + IcedCubes::view, + ) + .subscription(IcedCubes::subscription) + .run() } struct IcedCubes { diff --git a/examples/download_progress/src/main.rs b/examples/download_progress/src/main.rs index 06ebb9c6..8d7994c8 100644 --- a/examples/download_progress/src/main.rs +++ b/examples/download_progress/src/main.rs @@ -4,9 +4,13 @@ use iced::widget::{button, column, container, progress_bar, text, Column}; use iced::{Alignment, Element, Length, Subscription}; pub fn main() -> iced::Result { - iced::sandbox("Download Progress - Iced", Example::update, Example::view) - .subscription(Example::subscription) - .run() + iced::application( + "Download Progress - Iced", + Example::update, + Example::view, + ) + .subscription(Example::subscription) + .run() } #[derive(Debug)] diff --git a/examples/geometry/src/main.rs b/examples/geometry/src/main.rs index 52c10c33..63efcbdd 100644 --- a/examples/geometry/src/main.rs +++ b/examples/geometry/src/main.rs @@ -151,7 +151,7 @@ use iced::{Element, Length}; use rainbow::rainbow; pub fn main() -> iced::Result { - iced::run("Custom 2D Geometry - Iced", |_, _| {}, view) + iced::run("Custom 2D Geometry - Iced", |_: &mut _, _| {}, view) } fn view(_state: &()) -> Element<'_, ()> { diff --git a/examples/layout/src/main.rs b/examples/layout/src/main.rs index 371f2ae2..e6b521b2 100644 --- a/examples/layout/src/main.rs +++ b/examples/layout/src/main.rs @@ -10,7 +10,7 @@ use iced::{ }; pub fn main() -> iced::Result { - iced::sandbox(Layout::title, Layout::update, Layout::view) + iced::application(Layout::title, Layout::update, Layout::view) .subscription(Layout::subscription) .theme(Layout::theme) .run() diff --git a/examples/loading_spinners/src/main.rs b/examples/loading_spinners/src/main.rs index e50cd04c..c3308134 100644 --- a/examples/loading_spinners/src/main.rs +++ b/examples/loading_spinners/src/main.rs @@ -11,7 +11,7 @@ use circular::Circular; use linear::Linear; pub fn main() -> iced::Result { - iced::sandbox( + iced::application( "Loading Spinners - Iced", LoadingSpinners::update, LoadingSpinners::view, diff --git a/examples/multitouch/src/main.rs b/examples/multitouch/src/main.rs index f3413964..985c0ab9 100644 --- a/examples/multitouch/src/main.rs +++ b/examples/multitouch/src/main.rs @@ -13,7 +13,7 @@ use std::collections::HashMap; pub fn main() -> iced::Result { tracing_subscriber::fmt::init(); - iced::sandbox("Multitouch - Iced", Multitouch::update, Multitouch::view) + iced::application("Multitouch - Iced", Multitouch::update, Multitouch::view) .antialiased() .centered() .run() diff --git a/examples/pane_grid/src/main.rs b/examples/pane_grid/src/main.rs index 4c46f550..439e9ee5 100644 --- a/examples/pane_grid/src/main.rs +++ b/examples/pane_grid/src/main.rs @@ -7,7 +7,7 @@ use iced::widget::{ use iced::{Color, Element, Length, Size, Subscription}; pub fn main() -> iced::Result { - iced::sandbox("Pane Grid - Iced", Example::update, Example::view) + iced::application("Pane Grid - Iced", Example::update, Example::view) .subscription(Example::subscription) .run() } diff --git a/examples/qr_code/src/main.rs b/examples/qr_code/src/main.rs index a980bfd7..1a23331d 100644 --- a/examples/qr_code/src/main.rs +++ b/examples/qr_code/src/main.rs @@ -4,7 +4,7 @@ use iced::widget::{ use iced::{Alignment, Element, Length, Theme}; pub fn main() -> iced::Result { - iced::sandbox( + iced::application( "QR Code Generator - Iced", QRGenerator::update, QRGenerator::view, diff --git a/examples/sierpinski_triangle/src/main.rs b/examples/sierpinski_triangle/src/main.rs index 82406e62..ee3039d8 100644 --- a/examples/sierpinski_triangle/src/main.rs +++ b/examples/sierpinski_triangle/src/main.rs @@ -8,7 +8,7 @@ use rand::Rng; use std::fmt::Debug; fn main() -> iced::Result { - iced::sandbox( + iced::application( "Sierpinski Triangle - Iced", SierpinskiEmulator::update, SierpinskiEmulator::view, diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs index 06098a7c..40fd6b12 100644 --- a/examples/solar_system/src/main.rs +++ b/examples/solar_system/src/main.rs @@ -22,7 +22,7 @@ use std::time::Instant; pub fn main() -> iced::Result { tracing_subscriber::fmt::init(); - iced::sandbox( + iced::application( "Solar System - Iced", SolarSystem::update, SolarSystem::view, diff --git a/examples/stopwatch/src/main.rs b/examples/stopwatch/src/main.rs index 854cc084..2496b85b 100644 --- a/examples/stopwatch/src/main.rs +++ b/examples/stopwatch/src/main.rs @@ -7,7 +7,7 @@ use iced::{Alignment, Element, Length, Subscription, Theme}; use std::time::{Duration, Instant}; pub fn main() -> iced::Result { - iced::sandbox("Stopwatch - Iced", Stopwatch::update, Stopwatch::view) + iced::application("Stopwatch - Iced", Stopwatch::update, Stopwatch::view) .subscription(Stopwatch::subscription) .theme(Stopwatch::theme) .run() diff --git a/examples/styling/src/main.rs b/examples/styling/src/main.rs index 110bd3b8..ce14aacb 100644 --- a/examples/styling/src/main.rs +++ b/examples/styling/src/main.rs @@ -6,7 +6,7 @@ use iced::widget::{ use iced::{Alignment, Element, Length, Theme}; pub fn main() -> iced::Result { - iced::sandbox("Styling - Iced", Styling::update, Styling::view) + iced::application("Styling - Iced", Styling::update, Styling::view) .theme(Styling::theme) .run() } diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs index 23c4040d..97ce761c 100644 --- a/examples/tour/src/main.rs +++ b/examples/tour/src/main.rs @@ -16,7 +16,7 @@ pub fn main() -> iced::Result { #[cfg(not(target_arch = "wasm32"))] tracing_subscriber::fmt::init(); - iced::sandbox(Tour::title, Tour::update, Tour::view) + iced::application(Tour::title, Tour::update, Tour::view) .centered() .run() } diff --git a/examples/url_handler/src/main.rs b/examples/url_handler/src/main.rs index f16b9051..540d927e 100644 --- a/examples/url_handler/src/main.rs +++ b/examples/url_handler/src/main.rs @@ -3,7 +3,7 @@ use iced::widget::{container, text}; use iced::{Element, Length, Subscription}; pub fn main() -> iced::Result { - iced::sandbox("URL Handler - Iced", App::update, App::view) + iced::application("URL Handler - Iced", App::update, App::view) .subscription(App::subscription) .run() } diff --git a/examples/vectorial_text/src/main.rs b/examples/vectorial_text/src/main.rs index 84347203..37961635 100644 --- a/examples/vectorial_text/src/main.rs +++ b/examples/vectorial_text/src/main.rs @@ -6,7 +6,7 @@ use iced::widget::{ use iced::{Element, Length, Point, Rectangle, Renderer, Theme, Vector}; pub fn main() -> iced::Result { - iced::sandbox( + iced::application( "Vectorial Text - Iced", VectorialText::update, VectorialText::view, |