pax_properties_coproduct/
lib.rs

1use std::cell::RefCell;
2use std::ops::Range;
3use std::rc::Rc;
4
5pub enum PropertiesCoproduct {
6    //core
7    None,
8    RepeatList(Vec<Rc<RefCell<PropertiesCoproduct>>>),
9    RepeatItem(Rc<PropertiesCoproduct>, usize),
10    #[allow(non_camel_case_types)]
11    usize(usize),//used by Repeat + numeric ranges, e.g. `for i in 0..5`
12    #[allow(non_camel_case_types)]
13    isize(isize),//used by Repeat + numeric ranges, e.g. `for i in 0..5`
14
15    //generated
16}
17
18//used namely for return types of expressions — may have other purposes
19
20pub enum TypesCoproduct {
21    //core: primitives
22    #[allow(non_camel_case_types)]
23    f64(f64),
24    #[allow(non_camel_case_types)]
25    bool(bool),
26    #[allow(non_camel_case_types)]
27    isize(isize),
28    #[allow(non_camel_case_types)]
29    usize(usize), //used by Slot for index
30
31    #[allow(non_camel_case_types)]
32    stdCOCOvecCOCOVecLABRstdCOCOrcCOCORcLABRPropertiesCoproductRABRRABR(Vec<Rc<PropertiesCoproduct>>),
33    #[allow(non_camel_case_types)]
34    stdCOCOopsCOCORangeLABRisizeRABR(Range<isize>),
35    String(String),
36    Transform2D(pax_runtime_api::Transform2D),
37    SizePixels(pax_runtime_api::SizePixels),
38    Size(pax_runtime_api::Size),
39    Rotation(pax_runtime_api::Rotation),
40    Numeric(pax_runtime_api::Numeric),
41    StringBox(pax_runtime_api::StringBox)
42    //generated / userland
43}
44
45
46//
47// pub enum PatchCoproduct {
48//
49//     // Rectangle(pax_example::exports::pax_std::primitives::rectangle::Rectangle),
50//     // Group(pax_example::exports::pax_std::primitives::group::Group),
51//     RootPatch(pax_example::RootPatch),
52// }