diff options
author | metamuffin <metamuffin@disroot.org> | 2024-11-18 19:17:52 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-11-18 19:17:59 +0100 |
commit | 3519e5669313ae4fa28774e81168c142954034c1 (patch) | |
tree | 32c69e7d22477546ea2895da086ef515b7d9e90c /server | |
parent | 942bc6d2157fefa6ea3adefb54ef8aa0bf949b9d (diff) | |
download | hurrycurry-3519e5669313ae4fa28774e81168c142954034c1.tar hurrycurry-3519e5669313ae4fa28774e81168c142954034c1.tar.bz2 hurrycurry-3519e5669313ae4fa28774e81168c142954034c1.tar.zst |
many more document elements
Diffstat (limited to 'server')
-rw-r--r-- | server/protocol/src/lib.rs | 25 |
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, } |