pax_example/
website_desktop.rs1#![allow(unused_imports)]
2
3use pax_lang::api::*;
4use pax_lang::*;
5use pax_std::components::Stacker;
6use pax_std::primitives::{Frame, Group, Image, Rectangle, Scroller, Text};
7use pax_std::types::text::*;
8use pax_std::types::{Color, Fill, LinearGradient, StackerDirection};
9
10#[derive(Pax)]
11#[file("website_desktop.pax")]
12pub struct WebsiteDesktop {
13 pub ticks: Property<usize>,
14}
15
16impl WebsiteDesktop {
17 pub fn handle_did_mount(&mut self, _ctx: RuntimeContext) {}
18 pub fn handle_will_render(&mut self, ctx: RuntimeContext) {
19 self.ticks.set(ctx.frames_elapsed);
20 }
21}