Examples are listed below in alphabetical order.
If learning KAS, the Hello, Counter, Calculator, and perhaps Filter-list examples may be the most accessible. Also see the tutorials.
Demonstrates updating the UI in response to events from a background thread.
A simple calculator show-casing the grid layout and keyboard support.
A simple clock. An example of a custom widget using mid-level draw routines and timer updates.
(Almost) the simplest interactive example possible: a counter with push-buttons.
Variant: sync-counter
opens two windows with a synchronised counter.
Curious what each mouse cursor available on your desktop (via winit) looks like?
This example demonstrates an interface over a list data structure of user-defined length. It has two implementations, both with (approximately) the same UI, but different internals:
data-list
directly allocates a widget for each data entry and stores data within the widgets; it can scale to hundreds of entries or potentially tens of thousands when using release optimisations and tolerating some delaysdata-list-view
uses a dynamic view over a lazily-allocated data structure; performance is thus independent of the number of entries (though length is still limited by the maximum possible scroll offset; see issue #222)
A testbed demoing most widgets, animations, data models, canvas and configuration.
A message box.
Demonstration of complex layout and multi-paragraph text.
GPU-accelerated fractals via a custom embedded WGPU graphics pipeline.
Demonstrates resizable panes.
Ready? Set! Go!
A variant of Counter, demonstrating multiple windows and the
SingleView
widget (the simplest shared data widget).
A simple demonstration of the MatrixView
widget.
The 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 file or on the following webpage: https://www.apache.org/licenses/LICENSE-2.0