summaryrefslogtreecommitdiff
path: root/src/layout/tree.rs
AgeCommit message (Collapse)Author
2021-10-23Introduce page / block / inline levelsLaurenz
2021-10-23Revise block node contractLaurenz
Frames produced by block nodes are now always treated as exactly one per given region and a frame must not be larger than its respective region. Any overflow must be handled internally. This means that stack and grid don't need to search for fitting regions anymore, since the child has already does that for them. This commit further moves stack spacing into a new `SpacingNode`.
2021-10-23New `ShapeNode`Laurenz
Replaces `BackgroundNode` and `FixedNode`
2021-09-27More useful incremental checksLaurenz
Co-Authored-By: Martin <mhaug@live.de>
2021-09-26More useful `Debug` implsLaurenz
2021-09-15Bugfix and tidyingLaurenz
2021-09-10Reimplement `Debug` for layout nodesLaurenz
2021-08-21Shorter/clearer field name for geometry typesLaurenz
Size { width, height } => Size { w, h } Spec { horizontal, vertical } => Spec { x, y } Gen { cross, main } => Gen { inline, block }
2021-08-21Prune derivesLaurenz
2021-08-19Refactor layouting a bitLaurenz
Notably: - Handle aspect ratio in fixed node - Inline constraint inflation into pad node
2021-07-26No more excessive region cloningLaurenz
2021-07-26Move incremental test into separate functionLaurenz
2021-07-25Move and refactorLaurenz
2020-10-07Evaluation and node-based layouting ๐Ÿš€Laurenz
2020-10-06Rename secondary/primary to main/cross โœLaurenz
2020-10-05Remove @ syntax in diagnostics macros ๐Ÿ—‘Laurenz
2020-10-05Simplify shaping ๐ŸŒฑLaurenz
2020-10-05Move align out of BoxLayout ๐ŸซLaurenz
2020-10-04Small improvements ๐ŸชLaurenz
2020-10-04Shorten some names โ†”Laurenz
2020-10-04Expression evaluation with Eval trait ๐ŸงฎLaurenz
2020-10-04Remove unncessary wrappers and typedefs ๐Ÿ›‘Laurenz
2020-10-04Separate state and constraints ๐ŸงถLaurenz
2020-10-04Remove Typesetter in favor of typeset function ๐ŸŽฏLaurenz
2020-10-04Refactor and move shaping out of the layout module โ›ณLaurenz
2020-10-03Int, Float, Relative and Linear values ๐Ÿ‰Laurenz
2020-10-03Port to kurbo ๐ŸŽ‹Laurenz
2020-10-03Rename bold/italic to strong/emph โœLaurenz
2020-10-03Rename text layouting to shaping โœLaurenz
2020-10-02Refactor parser ๐ŸžLaurenz
2020-10-01Generalize layouting primitives ๐Ÿ›คLaurenz
2020-10-01Reorganize ast types ๐Ÿ•Laurenz
2020-09-30Refactor raw blocks ๐Ÿ’ฑLaurenz
2020-09-30SpanWith trait โ†”Laurenz
2020-09-30Streamline font handling a bit ๐Ÿ“œLaurenz
2020-09-30Reorganize syntax types into two modules ๐Ÿ“ฆLaurenz
2020-09-27Fix for updated fontdock โœ”Laurenz
2020-09-01Add section headings ๐Ÿ‘จโ€๐ŸฆฒMartin Haug
Co-authored-by: Laurenz Mรคdje <laurmaedje@gmail.com>
2020-08-30Format everything with rustfmt! ๐Ÿ’šLaurenz
2020-08-29Newlines are complicated, y'all ๐Ÿ˜ฑMartin Haug
Co-authored-by: laurmaedje@outlook.de <laurmaedje@outlook.de>
2020-08-29Merge branch 'master' into code-blocksMartin
2020-08-29Added code blocks ๐ŸšŸMartin Haug
2020-08-29Remove par nodes in favor of parbreaks ๐Ÿ”„Laurenz
This basically reverts the earlier change from parbreaks to par nodes because: - It is simpler and less nested - It works way better with functions that layout their body inline like `font`, which where buggy before, previously The original reasons for changing to par nodes were: - the envisioned design of the layouter at that time (based on dynamic nodes etc.), which is not relevant anymore - possibly existing benefits with regards to incremental compilation, which are unsure and outweighed by the immediate benefits of the parbreak-representation
2020-08-19Make compute functions possible ๐Ÿ’ปLaurenz
Ships with the amazing new `rgb` function!
2020-08-17Tidy up library functions ๐ŸงบLaurenz
2020-08-17Parse braced expressions and bracketed calls in headers ๐Ÿ—ณLaurenz
- Refactors the tokenizer to be lazy: It does not emit pre-parsed function tokens, but instead allows it's mode to be changed. The modes are tracked on a stack to allow nested compute/typesetting (pop/push). - Introduces delimited groups into the parser, which make it easy to parse delimited expressions without handling the delimiters in the parsing code for the group's content. A group is started with `start_group`. When reaching the group's end (matching delimiter) the eat and peek methods will simply return `None` instead of the delimiter, stopping the content parser and bubbling up the call stack until `end_group` is called to clear up the situation.
2020-08-16Add Value type and replace dyn-nodes with call-exprs ๐Ÿ—Laurenz
- In addition to syntax trees there are now `Value`s, which syntax trees can be evaluated into (e.g. the tree is `5+5` and the value is `10`) - Parsing is completely pure, function calls are not parsed into nodes, but into simple call expressions, which are resolved later - Functions aren't dynamic nodes anymore, but simply functions which receive their arguments as a table and the layouting context - Functions may return any `Value` - Layouting is powered by functions which return the new `Commands` value, which informs the layouting engine what to do - When a function returns a non-`Commands` value, the layouter simply dumps the value into the document in monospace
2020-08-04Par nodes ๐ŸงณLaurenz
2020-08-03Formatting, documentation and small improvements ๐ŸงฝLaurenz
2020-08-02Refactor model into tree ๐Ÿ›’Laurenz