rotulus-layout 0.1.0

The layout engine behind the Rotulus chat view: message model, wrapping, height index, scroll anchoring
Documentation
  • Coverage
  • 67.55%
    229 out of 339 items documented0 out of 193 items with examples
  • Size
  • Source code size: 371.0 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.8 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mishan/rotulus
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mishan

rotulus-layout

The layout engine behind Rotulus, a GTK4 scrollback view for text-stream chat.

It covers everything between "a message arrives" and "the view knows which pixels go where":

  • the message model, with styled text, links and blocks
  • markdown and link detection
  • wrapping, and a height index that answers pixel-to-row lookups over rows of different heights
  • a scroll anchor that keeps the reader's place through resizes, history backfill and trimming
  • hit testing, selection and search

It has no dependencies: no GTK, no GLib, no Pango. Text measurement sits behind the TextMeasure trait, which the rotulus widget implements with Pango and the tests implement with a fixed-width font, so the whole engine runs under a plain cargo test. A front end other than GTK can supply its own.

Most applications want the widget, rotulus, rather than this crate. How the two fit together is in the repository's design notes.

License: LGPL-2.1-or-later.