From efb9dbd8072becbf3d34e74e737287b982432164 Mon Sep 17 00:00:00 2001 From: pml68 Date: Fri, 30 Aug 2024 00:06:33 +0200 Subject: feat: add usable state logic --- src/types/mod.rs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/types/mod.rs (limited to 'src/types') diff --git a/src/types/mod.rs b/src/types/mod.rs new file mode 100644 index 0000000..69df615 --- /dev/null +++ b/src/types/mod.rs @@ -0,0 +1,28 @@ +use iced::{Font, Length}; + +pub struct DesignerState { + pub designer_content: Vec, + pub designer_page: DesignerPage, +} + +pub struct RenderedElement { + pub id: String, + pub children: Vec, + pub name: ElementName, + pub props: Vec, +} + +pub enum ElementName {} + +pub enum Prop { + String(String, String), + Decimal(String, i32), + Float(String, f32), + Font(String, Font), + Length(String, Length), +} + +pub enum DesignerPage { + Designer, + CodeView, +} -- cgit v1.2.3