summaryrefslogtreecommitdiff
path: root/src/types/mod.rs
diff options
context:
space:
mode:
authorpml68 <contact@pml68.me>2024-08-30 00:06:33 +0200
committerpml68 <contact@pml68.me>2024-08-30 01:05:13 +0200
commitefb9dbd8072becbf3d34e74e737287b982432164 (patch)
tree183bbc5a1c7ba7b558542843a58f1d60e6ce5267 /src/types/mod.rs
parentfeat: initial commit (diff)
downloadiced-builder-efb9dbd8072becbf3d34e74e737287b982432164.tar.gz
feat: add usable state logic
Diffstat (limited to 'src/types/mod.rs')
-rw-r--r--src/types/mod.rs28
1 files changed, 28 insertions, 0 deletions
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<RenderedElement>,
+ pub designer_page: DesignerPage,
+}
+
+pub struct RenderedElement {
+ pub id: String,
+ pub children: Vec<RenderedElement>,
+ pub name: ElementName,
+ pub props: Vec<Prop>,
+}
+
+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,
+}