On the more complex end, custom widgets can be fairly complex; check the Kas
widget library (including source code) for examples.
Capabilities
Fully keyboard-accessible
Screen reader support (partial: kas-gui/kas#509)
IME support (partial: kas-gui/kas#508)
Integrated i18n support (not yet started; kas-gui/kas#7)
Complex text support: use system fonts with glyph fallbacks, BiDi, common text effects (kas-gui/kas#13)
Automatic margins and layout with pixel-perfect scaling
Support for custom themes including theme-driven animations and sizing
Virtual scrolling (list or grid), including support for async data access
Goals
Kas is designed to:
Support stateful user-defined widgets with high-ish level of code
Support the best user-interaction possible
Support automatic layout and pixel-perfect scaling at any scale factor (i.e. margins and element sizes should be consistent, raster icons should have pixel-perfect rendering; layout is allowed to change as content is scaled).
Support extremely fast, monolithic Rust binaries
Limitations
Every approach has its limitations. Ours are:
Stateful widgets imply invalid-state bugs are possible. There are some (dev-mode) guards against bad-initialisation order, but fundamentally this class of bugs cannot be prevented.
Custom widgets have a lot of flexibility over management of child widgets; this comes with some expectations. Violating these expectations will result in a panic in debug builds.
Custom widget definitions use macro-enhanced Rust (not a custom DSL), allowing the full power of Rust code but running the risk of confusing other tooling (both rustfmt and rust-analyzer have some issues here).
Status
In development. Interfaces are not currently stable.
Enough functionality should be present to develop complex GUIs, however some features are still missing (see the Roadmap.
The kas crate enables a selection of important features by default while attempting to support most platforms. Other crates do not enable any features by default.
See documentation in Cargo.toml.
Copyright and Licence
The COPYRIGHT file includes a list of contributors who claim
copyright on this project. This list may be incomplete; new contributors may
optionally add themselves to this list.
The KAS library is published under the terms of the Apache License, Version 2.0.
You may obtain a copy of this licence from the LICENSE file or on
the following webpage: