aboutsummaryrefslogtreecommitdiff
path: root/server/protocol/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-11-18 19:17:52 +0100
committermetamuffin <metamuffin@disroot.org>2024-11-18 19:17:59 +0100
commit3519e5669313ae4fa28774e81168c142954034c1 (patch)
tree32c69e7d22477546ea2895da086ef515b7d9e90c /server/protocol/src/lib.rs
parent942bc6d2157fefa6ea3adefb54ef8aa0bf949b9d (diff)
downloadhurrycurry-3519e5669313ae4fa28774e81168c142954034c1.tar
hurrycurry-3519e5669313ae4fa28774e81168c142954034c1.tar.bz2
hurrycurry-3519e5669313ae4fa28774e81168c142954034c1.tar.zst
many more document elements
Diffstat (limited to 'server/protocol/src/lib.rs')
-rw-r--r--server/protocol/src/lib.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs
index ca6e7c8c..2ef07015 100644
--- a/server/protocol/src/lib.rs
+++ b/server/protocol/src/lib.rs
@@ -359,6 +359,10 @@ pub enum DocumentElement {
background: Option<String>,
es: Vec<DocumentElement>,
},
+ /// Implicit element layouting
+ Container {
+ es: Vec<DocumentElement>,
+ },
List {
/// Should only contain par or text elements
es: Vec<DocumentElement>,
@@ -387,4 +391,25 @@ pub enum DocumentElement {
value: bool,
e: Box<DocumentElement>,
},
+ /// Makes the child element clickable that jumps to the label with the same id
+ Ref {
+ id: String,
+ e: Box<DocumentElement>,
+ },
+ /// Declares a label
+ Label {
+ id: String,
+ e: Box<DocumentElement>,
+ },
+ Align {
+ dir: DocumentAlign,
+ e: Box<DocumentElement>,
+ },
+}
+
+#[derive(Debug, Clone, Serialize, Deserialize, Encode, Decode)]
+#[serde(rename_all = "snake_case")]
+pub enum DocumentAlign {
+ FlowEnd,
+ Bottom,
}