The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Merge fns
DrawCx::text_effects
andtext
(#458) - Remove feature
min_spec
(#458) - Use
proc-macro-error2
(#459)
Most significant is the addition of the Collection
trait representing a list or tuple of widgets.
- Bump MSRV to 1.80 (#457)
- Add struct
kas::config::Config
to house event/theme/font config (#449) - Make
PRIMARY
backend default and fix transparency (#452) - Add
kas::decorations
module (#452) - Rename
Application
→Runner
andkas::app
→kas::runner
(#456)
- Add
fn EventState::send
andsend_erased
to allow sending a message to any widget (#429) - Assume
Action::UPDATE
from some handlers instead of requiring this explicitly (#432) - Remove event stealing and revise handling of disabled events (#453)
- Add trait
Collection
and macrokas::collection!
(#431) - Add trait
CellCollection
and macrokas::cell_collection!
(#443) - Replace trait
AutoLayout
withLayoutVisitor
using RPITIT (#434) - Replace
align!(spec DSL, child)
,pack!(spec DSL, child)
andmargins!(spec DSL, child)
with.align(hints)
,.pack(hints)
,.margins(dirs, style)
widget/layout adapters; more uniform support for adapters within and without layout macros (#438) - Pass
AlignHints
tofn set_rect
notsize_rules
(#447)
- Make
kas::widgets::ImageError
public (#428) - Make
AdaptEvents
a thin wrapper withoutId
(#430) - Use RPITIT in traits
ListData
,MatrixData
(#433) - Remove widget aliases
StrLabel
,StringLabel
,StrText
,StringText
(#438)
- Add
kas-widgets::edit::InstantParseGuard
(#427) - Fix doc builds for kas-widgets, kas-view, kas-resvg, kas-dylib (#427)
The focus of this version is input data: widgets now have a Data
associated type, passed by reference
to event handlers and to a new update
method. The key advantages of this change are:
- Declarative specification of trees with changeable widgets. For example, before this change a
counter
must construct a label displaying the initial count and explicitly update this label when the count changes; now the displayed label is effectively a function of the count. - As a direct result of the above, it is no longer necessary for parent nodes to refer to children by name, thus it is no longer necessary to use structs with named fields (at least in the common cases).
- "View widgets" are now much more tightly integrated with other widgets, making the
SingleView
widget redundant.
For more on input data, read the design document.
- New layout syntax:
row![a, b, c]
instead ofrow: [a, b, c]
(#390) - Support debugging of
#[widget]
macro viaKAS_DEBUG_WIDGET=WidgetName
(#410)
- Merge
WidgetCore
intoLayout
(#398) - Remove
Debug
bound on widgets (#389) - Add
Event::is_reusable
, removeWidget::handle_unused
, callhandle_event
instead but only for reusable events (#389) - Add new
trait Events: Sized
, used to implementWidget
(#391, #392)
- Add fns
Widget::_configure
,_send
,_replay
,_nav_next
,_broadcast
as new dyn-safe API (#391, #392) - Implement
Widget
for&mut T
andBox<T>
whereT: Widget + ?Sized
(#392) - Add associated type
Widget::Data
andEvents::Data
(#395) - Add
Node
type pairing a&mut dyn Widget<Data = A>
with input data&A
(#395, #396,#398) - Add
trait AppData
for root-level shared data (#395, #396?) - Add
Events::update
(#396) - Rename
Events::handle_message
→Events::handle_messages
(#396) - Rename
WidgetExt
→LayoutExt
(#398) - Replace
Events::pre_handle_event
withEvents::mouse_hover
(#401) - Remove
ConfigCx::restrict_recursion_to
, replacing withEvents::configure_recurse
andupdate_recurse
(#405, #410) - Do not require configuration of hidden widgets (#405)
- Remove
Events::pre_configure
; callEvents::configure
andupdate
before recursion (#410) - Add widget state tracking to catch invalid method call order (#410)
- Rename
Action::SET_SIZE
→SET_RECT
(#386) next_nav_focus
is now always handled as a pending action (#386)- Add
Event::CursorMove
for motion without a grab press (#389) - Add
EventState::request_update
(#386, #396) - Add
Action::EVENT_CONFIG
,UPDATE
; removeAction::EMPTY
(#396) - Add
EventState::change_config
(#396) - Replace
Event::ReceivedCharacter
withKey
over Winit's new keyboard-input API (#400, #404) - Revise
enum Command
(#400) - Revise
enum Event
: removeNone
, change field style ofNavFocus
(#401) - Rename
EventState::request_char_focus
→request_key_focus
(#404) - Add
enum FocusSource
, used byEvent::NavFocus
(#404) - Add
fn EventState::depress_with_key
(#405) - Rename
enum Response
→IsUsed
and re-export{Used, Unused}
(#406) - Send
Event::PressMove
immediately instead of batching (#412) - Change behaviour when
Press::grab
is used twice in a row (#412) - Replace
*cx |= action
withEventState::action(id, action)
(#413) - Apply
Action::RECONFIGURE
andAction::UPDATE
to sub-trees (#413) - Rename
EventState::request_update
torequest_timer
and removefirst
paramameter (#421)
- Use Winit's window suspend/resume cycle (#403)
- Adjust shell construction: replace custom constructors with
ShellBuilder
; tweakWgpuBuilder
(#416) - Use "logical pixel" window sizing on all platforms and improve initial window sizing (#417)
- Rename
Shell
→Application
(#422) - Remove usage of WGPU's "wgsl" feature (#425)
- Add
kas::messages
module (#385) - Add
Command::Debug
to print widget heirarchy to log, temporarily activated via F8 (#389) - Remove
Window
trait; renameRootWidget
→Window
(#393) - Rename
ConfigMgr
,DrawMgr
,EventMgr
,SizeMgr
→ConfigCx
, ... (#399) - Support dragging and drag-resizing of windows via border (#400)
- Add
enum WindowCommand
(#400) - Add
Popup
widget as root of all popups (#405) - Rename
AccelLabel
/AccelString
/... →AccessLabel
/AccessString
/... (#405) - Remove
dark-light
from being a default dependency (#411) - Rename
struct WidgetId
→Id
(#413) - Event config: adjust serialization formats and support TOML (#416)
- Change font size unit from
Point / Em
toPixel / Em
(#419) - Rename
mod kas::class
→classes
(#424)
- Add
FrameStyle::None
,FrameStyle::Tab
(#399)
- Remove
MapMessage
adapter (#389) Slider
,Spinner
now have a default step size (#389)EditField
: set selection on focus; change behaviour of left/right arrow keys given a selection without shift key pressed (#389)- Revise
EditGuard
to use input data (#396) - Revise
EditField
constructors and providedEditGuard
implementations (#396) - Add widget
Adapt
to store local data and handle messages (#396, #400) - Add fns
AdaptWidget::map
,map_any
,on_update
,on_configure
(#396, #397, #400) - Revise
Stack
,TabStack
widget constructors; add aTab
widget (#399, #410) - Replace
TextButton
withButton::label
,label_msg
constructors (#399) - Add
Text
widget (?) - Add
ScrollText
widget (#419) - Add
AdaptEventCx
,AdaptConfigCx
(#421, #423)
- Move fns
make_id
,reconstruct_key
to traitDataKey
(#389) - Move all of
kas::model
tokas-view
crate and revise to use input data (#396, #421) - Revise filter-list (#397)
ListView
andMatrixView
no longer use a default (unconfigured) view-widget for sizing. They may now have an initial size of zero and grow. (#410)
- Fix animation of
RadioBox
(#385) - Fix calling of
handle_scroll
(#386) - Improved handling of pending actions (#386, #412, #413)
- Fix calls to prepare
EditField
text before setting bounds (#399) - Fix Mandlebrot example's
shader64
feature (#400) - Fix drag-opening of a
ComboBox
(#412) - Fix infinite loop in
ListView::_nav_next
andMatrixView::_nav_next
(#421)
Alpha release; changelog omitted.
Canvas
uses async rendering (#376)Svg
uses async rendering (#378)- Improved momentum scrolling (#381)
- Support primary buffer (middle-click clipboard) on Linux (#383)
- Add
EventMgr::push_async
,push_spawn
(#376) - Support transparent windows (#380)
- Support borderless windows and basic toolkit-drawn titlebar (#380)
- New
GrabMode::Click
(#383) - Add
PressSource::is_secondary
,is_tertiary
(#383) - Add
EventMgr::get_primary
,set_primary
(#383)
- Move theme traits,
SimpleTheme
andFlatTheme
to kas-core (#374) - Move
ShadedTheme
to kas-wgpu (#374) - Move
Shell
to kas-core. AddWindowSurface
,GraphicalShell
,ShellAssoc
traits for better abstraction of shell implementation. Addkas::shell::DefaultShell
. (#375) - Rename
ToolkitProxy
→Proxy
,TkAction
→Action
(#375) Widget::handle_message
is now called on the widget submitting a message (#376)- Update to Winit 0.28, Wgpu 0.15, dark-light 1.0 (#379)
- Switch from window_clipboard to arboard + smithay-clipboard (#383)
- Cancel existing mouse grab when requesting a new one (#383)
- Change data structure of
Event::PressStart
,PressMove
,PressEnd
(#383) - Replace
EventMgr::grab_press
withPress::grab
builder pattern (#383)
- Translate pop-up menus inside scroll regions (#373)
- Use
PresentMode::Fifo
, improving compatibility with older Intel graphics, at the cost of some hangs with multiple windows on X11 (#369) - Fix mouse highlighting for
Spinner
widget (#369) - Show mnemonic (
AccelLabel
) hints with Alt key when edit field has focus (#369)
Stabilise support for Generic Associated Types (GATs). This requires Rust 1.65.0,
removes the gat
feature flag, revises the SharedData{,Mut}
, ListData
and
MatrixData
traits. #357
- Forbid usage of non-
#[widget]
fields in a widget'slayout
(#356) - Rename
{Text,}Button::on_push
toon_press
(#356) - Adjust
Driver::set
method; addDriver::set_mo
(#357) impl_singleton!
macro: remove impliedWidget
bound on fields usingimpl Trait
syntax, allow usage of_
andimpl Trait
within types (#359)- Rename
impl_singleton!
tosingleton!
, moving impl toimpl-tools-lib
(#360) - Re-export macros from
kas{,_core}
root instead ofmacros
module (#364) - Bump dependencies:
tiny-skia
v0.8.2,resvg
andusvg
v0.28.0 (#362, #366) - Bump depencency:
wgpu
v0.14 (#362)
- Fix tab navigation to loop when first result is
None
(#356) - Fix input state for view widgets with changed data binding by fully resetting the widget (#365)
- Add
SingleDataMut
trait (#357) - Add
DrawMgr::draw_iface
(#366) - Bump dependency:
impl-tools-lib
v0.7.0 (#357, #360, #366) - Bump dependencies:
env_logger
v0.10 (#366),kas-text
v0.6.0 (#366) - New dependency:
maybe-owned
v0.3.4 - Move Clippy lint configuration to CI runner (#359)
- Adjust code formatting (#361)
With a year since the previous release, KAS v0.11 sees a lot of changes. In the interest of brevity, the list below is incomplete.
One of the major nuisances with KAS v0.10 and earlier was the that dyn Widget
was not a valid type since the associated Handler::Msg
type must be specified.
KAS v0.11 removes this associated type (#309), replacing it with a variadic
message stack, thus making dyn Widget
a valid (unsized) type.
- Add
fn WidgetCore::identify
, returning a printable type (example result:TextButton#01
) (#266) - New trait
WidgetExt: Widget
(#286) - Add
Widget::handle_message
; renameHandler::handle
→handle_event
(#309) - Merge
Handler
andWidgetConfig
traits intoWidget
(#312) - Replace
#[widget_core] core: CoreData
field withcore: widget_core!()
(#314) - Remove bound
Widget: Any
(and thus'static
) (#316) Window
trait simplified; newRootWidget
struct handles pop-ups (#318)- Add
Widget::steal_event
(#319) andWidget::pre_handle_event
(#324) - Trait
Scrollable: Widget
is now a core trait; new traitHasScrollBars
(#324)
This cycle saw the development of the #[autoimpl]
and impl_scope!
macros
which were split out into a new impl-tools
crate in #300.
#[derive(Widget)]
becomeswidget!
(#258) becomes#[widget]
(#300)- Auto-detect which traits have manual impls (#258) and merge generated methods into manual impls (#312, #335)
impl Self
syntax (#258, #300)- New
#[autoimpl]
macro as a more capable version of#[derive]
(#258, #272, #293, #294) - Revise
make_widget!
intoimpl_singleton!
(#272, #317) - New
widget_index!
macro (#291)
Widgets may now have complex internal layout, defined by a domain-specific macro language (#259, #282, #304, #306, #314, #316, #322, #345, #348, #350).
- Better text,
EditBox
margins (#283) - Menu entries use interior margins (#283)
- Fix initial window size on Wayland (#298)
- New struct
PixmapScaling
used byImage
andSvg
(#303, #321) - Add
float
layout (#322) - Revise
FrameRules
; addMarginStyle
(#348) - Add alignment hints to
AxisInfo
, removing fromset_rect
(#350)
Partial (localised) widget configuration is now possible (#276, #299).
The WidgetId
type is now a path (#264, #265).
As a result, WidgetId
is no longer Copy
but persistent identifiers for
view widgets over a specific content are possible (#282).
Further, it is possible to determine whether one widget is the ancestor of
another purely by comparing WidgetId
s.
- Breaking:
Ord for WidgetId
now considers a parent to come before its children - Add
WidgetChildren::make_child_id
(#313, #330)
The widget trait revision (#309) introduced a variadic message stack
(EventMgr::push_msg
and EventMgr::try_pop_msg
methods), and allowed the
implementation of a generic EventMgr::send
routing method replacing the
SendEvent
trait, as well as removal of VoidMsg
.
Momentum (flick) scrolling is now supported (#268).
- Rename
Manager
→EventMgr
,ManagerState
→EventState
(#266) - Disabled status is now a property of
EventState
, not of the widget (#292, #323) Response
enum loses most variants; newScroll
enum (#264, #309)- Add
Event::activate_on_press
, replacing `EventMgr::handle_generic (#311) - Replace
kas::event::Event::Activate
withkas::event::Command::Activate
(#323) - Replace
Manager::handle_generic
withWidget::pre_handle_event
(#324) - Add
Event::MouseHover
,Event::LostMouseHover
,Event::LostNavFocus
(#324) - New
ConfigMgr
type (introduced asSetRectMgr
in #266, renamed in #330) - Add
EventMgr::next_nav_focus_from
(#347)
Support animations, driven by the theme or the widget (#269, #270, #271, #321).
- New
SizeMgr
,DrawMgr
types wrapping theme size/draw interface (#266) - Rename
DrawHandle
→ThemeDraw
,SizeHandle
→ThemeSize
(#327) - Merge most methods of
SizeMgr
into newfeature
,align_feature
methods over akas::theme::Feature
enum (#327) - Add
SimpleTheme
as base theme (#332) SizeMgr
: add methodsdpem
,min_scroll_size
; removepixels_from_*
(#334)- Clip text to widget rect (#336, #337)
- Auto-detect dark theme via
dark-light
crate (#337) - Rename
SizeMgr::text_bound
withtext_rules
and revise (#338)
Visual tweaks include a "tick" mark for CheckBox
(#298) and removal of "glow shadows" (#327).
Data changes are now notified via broadcast (#323), using a version number to check whether a view is current (#266, #289).
Driver
trait impls are now also responsible for handling messages from view
widgets via the new Driver::on_message
method (#334).
- New filters
ContainsString
,ContainsCaseInsensitive
(#248) - Add
SharedRc
methodsborrow
,try_borrow
,update_mut
(#334) - Add
SharedData
trait as common base of all data model traits (#334) - Rename
DefaultView
→View
,DefaultNav
→NavView
(#335) - New
kas_view
crate for view widgets (#335)
- New widgets
Mark
(#305, #316) andMarkButton
(#319) - New widget
dialog::TextEdit
(#318) - New widget
Spinner
(#319, #334) - New widget
TabStack
(#321) - Invisible scroll bars (#324)
- Renames:
CheckBox
,CheckButton
,RadioBox
,RadioButton
,RadioGroup
(#330) CheckButton
andRadioButton
infer layout direction from text direction (#332)- New
kas::widgets::edit
public module (#334) - Rename
DragHandle
→GripPart
(#339)
- The minimum supported Rust version (MSRV) is now 1.62.0 (#256, #335).
- Use (some) Clippy lints (#256)
#[must_use]
annotations were added to methods returning a modification of self (#264, #266)- Use
easy-cast
traits for conversions onkas::geom
types (#284) - Handle window focus gain/loss (#292)
- Make
&EventState
available to (theme)DrawHandle
(#292) - Do not panic when attempting to draw un-prepared text (#312)
- Merge example
filter-list
intogallery
(#323) - Remove
stack_dst
dependency, which wasunsafe
and used only as a premature optimisation (#335) - Update to WGPU 0.13 (#340) and winit to 0.27 (#351)
- Bump
easy-cast
dep (re-export askas::cast
) to 0.5.0, addingcast_approx
functionality (easy-cast#21)
This is a small patch:
- Fix button stretch and alignment, especially in the calculator example (#246)
- Fix loading the font DB before parsing Markdown (#246)
- Support
#[widget(align = stretch)]
(#246)
This release responds to three key criticisms of KAS: (1) slow compile times, (2) non-standard keyboard navigation, (3) ugly themes. While these issues are not fully solved, they are significantly improved. Additionally, the latest version of WGPU now gives us a working OpenGL backend.
The crate structure was significantly changed (#233):
- most of the old
kas
moved tokas-core
- the new
kas
is a wrapper around other crates, includingkas-core
,kas-theme
andkas-wgpu
kas::widget
is renamed tokas::widgets
- examples moved to
kas
(top level) kas-dylib
added to support dynamic linking- Move
Svg
andCanvas
widgets to newkas-resvg
crate (#240)
In response to issue #231, event handling (especially regarding Tab focus) changed to be more in line with traditional UIs:
- Esc does not clear focus; Enter is not required to gain text-input focus; Tab can navigate away from text-input focus (#234)
- Ctrl+C works on widgets with only selection focus
(e.g.
ScrollLabel
) (#234) next_nav_focus
wraps at end instead of clearing focus (#234)- Breaking:
EditGuard::focus_gained
can no longer send a messege (#234) - Tab cannot focus menus (#235)
- Restore nav focus after closing menus (#234)
- Click/touch events set nav focus (#234, #240)
- Clicking on a non-nav widget does not clear or set nav focus (#236)
- Fixes for menus (#235, 236)
- Partially fix Tab navigation of
ListView
widget (#243) - Add move-distance threshold before switching from selection to panning mode
in
ListView
andMatrixView
(#244)
The FlatTheme
was reworked to have shadows (i.e. less "flat"), inspired by
some proposals by @hummingly:
- The gallery now defaults to
FlatTheme
(#237) - Redesign buttons, check-/radio-boxes, and text-edit boxes (#237)
- Use borders to indicate navigation focus (#237)
- Revise colour schemes (#237, #244)
- Introduce shadow/glow effects for widgets; better shadows for menus (#239)
- Fix drawing of text inputs with disabled state (#244)
- Remove
read_only
state ofManager
(#234) - Update WGPU to 0.10.0, fixing OpenGL support (#241)
Read
andReadWrite
config modes now tolerate missing files (#241)- Scale
Image
according to the scale factor (#241) - Update README regarding OpenGL and WGPU (#241)
- Use
proc-macro-error
crate for macro error reporting (#242) - Support WGPU's API tracing (#242)
- Update README regarding lld and mold linkers with some benchmarks (#242)
- Enable text in SVGs using KAS's font config (#244)
- Make
InputState
abitflags
struct (#244) - Apply scale factor to pan theshold (#244)
Add kas/macros_log
feature, disabled by default.
Version 0.8 added image support without much thought to the API, leaving image
management methods in SizeHandle
. Version 0.9 takes the opportunity to revise
the draw API, culminating in a new unified Draw
trait and DrawIface
implementation accessible via DrawHandle::draw_device
. This simplifies usage
of mid-level draw APIs, e.g. in themes and the clock
example.
Also in this release is SVG support, a Canvas
widget, image buttons, and
fixed sub-pixel positioning (clearer rendering for small text).
- Image loading split into allocate and upload steps, with immediate uploads avoiding the need for image storage in the graphics pipeline (#204)
- Image resource management moved into
kas::draw
(#204) - Draw trait revision (#204, #206, #207, #221, #223, #224)
- Add unified draw interface,
DrawIface
(#206, #221, #224) - Remove image management methods from
SizeHandle
(#207) - Simplify
DrawHandle::size_handle
; removeSizeHandle::draw_shared
(#223) - Support custom button colours (#227)
- Add
kas::draw::color::Rgb
and some methods over colour types (#227)
- Move
DrawShaded
trait tokas-theme
(#223) - Support large allocations in texture atlases (#212)
- Initial WGPU-over-OpenGL support and docs (#220)
- Apply draw offsets in vertex shaders; this reduces the maximum scroll offset to approx 2^24 pixels (#221)
- Make
kas_theme::dim
module public, as helper for custom themes (#223) - Autogenerate colour variants for depressed/highlighted/disabled features (#227)
- Allow
derive(Widget)
macro to forward impls to a field, allowing "thin wrappers" over widgets (#210) - Add
Svg
widget using the resvg library (#212) - More flexible margins for
Image
widget (#212) - Add generic
Button
, supporting images (#213, #227) - Add
Canvas
widget (#215) - Add
Grid
widget as alternative toderive(Widget)
's grid layout (#217) - Test and fix reversed
List
andListView
lists via a reverse-direction button indata-list
examples (#221) - Fix menu opening on mouse movement (#225)
- Tweak text underlines; use 10pt font by default (#213)
- Text-drawing optimisations (#215)
- Fix text scrolling in
EditBox
/EditField
(#221) - Fix sub-pixel positioning for text (#225)
- Fix clippy warnings (#208, #209, #214, #218)
- Add build artifacts (#219)
- Add
Directional::Reversed
assoc. type andreversed
method (#221) - Add
TryFormat
wrapper for debugging over generic types (#227) - Support window icons (#228)
- Fix KAS-wgpu docs build (#205)
This release sees basic support for images, improved text rendering, replacements for all non-Rust dependencies, and theme configuration support.
- Support theme configuration (#196, #198)
- Support write-on-exit for updated configuration files (#196, #197)
- Revise colour types: replace
Colour
withRgba
andRgba8Srgb
(#198)
- Use rustybuzz for text shaping, enabled by default (#199)
- Allow custom font aliases in config (#199)
- Allow assigning a custom font per text class; new
TextClass::MenuLabel
, use (by default) serif fonts for edit fields (#200) - Vertically-align text lines (#201)
- Configuration for text rastering (#201)
- Support raster images loaded from the file-system (#185)
- Use dynamic image atlases (#186) created on demand (#187)
- Replace
wgpu_glyph
andglyph_brush
with our own glyph caching (#190) - Add transparent shadows to pop-up layers (#194)
- Support
fontdue
for glyph rastering (#201) - Move glyph raster code to KAS-text (#202)
Details:
- Use push constants (#184)
- Remove depth-buffer (#185)
- Use common bind group for graphics pipes (#187)
- Use a staging belt for vertex uploads (#189)
- Significant code revision (#184 - #190)
- Update
wgpu-rs
to 0.8 (#193)
- Fix (or work-around) hang-on-exit with multiple windows open (#184)
- Better scrolling for widgets not receiving the initial event (#192)
- Avoid unnecessary redraws on mouse-movement while a mouse-grab is in effect (#196)
- Fix for spans in grids (landed in master in #184)
The major focus of this release is "view widgets": the ability to construct a synchronised view over shared data.
The new view widgets allow completion of the "CRUD" (Create, Read, Update,
Delete) 7GUIs challenge app. The use of
view widgets allows data-UI separation and scaling to larger data sets (mainly
limited by the O(n)
filter in this example). Work also started on the Cells
challenge (mini-spreadsheet), though many details of the app and of the
MatrixView
widget still need addressing, especially drawing, multi-cell
selection and keyboard handling.
Additionally, this version saw development of a new mini-library, kas::conv
,
which spun off into its own lib easy-cast.
-
Use platform-specific shortcuts, especially for MacOS (#154)
-
Add support for reading and writing config files, controlled by env vars (#155)
-
Additional configuration items (#171):
- menu-open delay
- text selection via touch delay
- distance moved before touch events pan text
- when mouse click-and-drag can pan text and other objects
- Add
kas::conv::Conv
trait and use to replace various casts (#152) - Add
Cast
andCastFloat
traits (#154) - Switch to
easy-cast
library and export askas::cast
(#182)
- Add
filter-list
(#146, #148, #149) - Simplify
sync-counter
via use of a view widget (#146) - Add
async-event
demonstrating "computation" in a background thread (#169) - Add
cursors
showing a gallery of mouse cursors (#169) - Rename
dynamic
todata-list
(#176); adddata-list-view
, a scalable (indirect data) variant (#170)
- Add a progress bar widget (#143)
- Replace
EditBoxVoid = EditBox<EditVoid>
withEditBox = EditBox<()>
(#146) - Frame widgets now implement
Deref
andDerefMut
(#147) - Add
ScrollBars
wrapper andScrollable
trait (#149, #170) - Rename
WidgetChildren
methods to be more distinctive (#157, #169) - Separate
EditBox
intoEditField
with frame wrapperEditBox
(#158) - Move core widget traits into
kas::core
private module (#172) - Add
NavFrame
wrapper widget (#174) - Add
WidgetExt
extension trait over anyWidget
(#175) - Add
kas::adapter
module (#175) - Add
kas::adapter::WithLabel
andWidgetExt::with_label
(#182) - Add
draw
optional parameter tolayout
attribute ofderive(Widget)
macro (#182)
- Add
Accessor
,SharedRc
as an abstraction over shared data (#146); revise intoSingleData
,ListData
(#164); addupdate
method (#170); more revision, addingSharedData
andSharedDataRec
(#172); addUpdatableHandler
(#176) - Add
FilterAccessor
FilteredList
(#148, #157, #164, #70)) - Add
ViewWidget
trait andDefaultView
for view widgets (#146); revise intoView
with associatedWidget
type (#170); renameView
toDriver
and addDefaultNav
(#174); simplify and addDriver::Msg
(#176) - Add
ListView
widget (#146-148, #162-163) - Add
SingleView
widget (#146) - Support item selection in
ListView
(#162, #163, #167) - Support updating a data set through a view widget (#170)
- Support recursive updates of datasets (allowing
FilteredList
to update when the underlying dataset updates) (#172) - Add
MatrixView
(#175, #176)
- Add
EditGuard::update
and pass&mut Manager
to guards (#148) - Revise handlers:
TextButton
,CheckBox
,RadioBox
now all optional closures to generate an optional message (#160) - Reduce redraws by explicitly specifying which widgets highlight on hover (#167)
- Remove payload from
Response::Unhandled
(#170) - Add
u64
payload toEvent::TimerUpdate
(#171) - Revise
ComboBox
handler (#171) - Add
Response::Select
(#174) - Add
WidgetExt::map_msg
,map_msg_discard
andmap_response
for convenient adjustment of widget messages (#175) - Support arrow-key and tab navigation for
ListView
andMatrixView
(#177) - Replace
Layout::spatial_range
withspatial_nav
, allowing correct child navigation order forListView
andMatrixView
(#177)
- Add
size_handle
manager
parameter toset_rect
(#147, #150) - Generic support for space reservations (#147, #175)
- Add
FrameRules
type for consistent/simpler frame sizing; use inSizeHandle
(#161) - New
text_margin
property for themes (#161) - Scroll regions have a drawable margin (#162)
- Rename
StretchPolicy
toStretch
and revise entries (#173) - Add
SizeHandle::pixels_from_virtual
,pixels_from_points
,pixels_from_em
convenience methods (#175)
- Impl
Sub<Size> for Coord
andMul<i32> for Coord
(#148) - Use
i32
instead ofu32
forSize
; addOffset
(#152) - Add
set_component
method toSize
,Coord
andOffset
(#162)
- Terminology: replace 'toolkit' with 'shell' (#144)
- Add
ScrollComponent
abstraction (#148) - Make
TkAction
into a bitflags struct (from an enum) (#150) - Make grab handles use the "grab" cursor icon (#151)
- Direction types
Left, Right, Down, Up
moved into newkas::dir
module (#154) - Push
derive(Widget)
before its attributes (#164) - Move
ThemeAction
andThemeApi
intokas::draw
(#172) - Allow calling
set_text_and_prepare
,set_string_and_prepare
before UI is initialised (#176) - Update README and ROADMAP (#171, #174)
- Update MSRV to 1.52.0 (currently beta) (#179)
- Update dependencies:
winit
,wgpu
,wgpu_glyph
,env_logger
(#156) - Update dependencies:
kas-text
,smallvec
,bitflags
,bytemuck
(#180) - Replace
clipboard
dependency withwindow_clipboard
(#180) - Use const generics to clean up layout solver storage types (#182)
This release covers significant revisions to the KAS-text API along with initial support for rich text. It also includes several fixes and quality-of-life improvements.
- Updates for new KAS-text API (#126, #131-133)
- Fix drawing of edit cursor in right-hand margin (#122)
- Add
markdown
example (#125, #139) - Remove
LabelString
; makeAccelString
implementkas-text::parser::Parser
(#126) - Support underline and strikethrough (#129, #133)
- New
SelectionHelper
struct to abstract over text-selection logic (#137)
- Update to wgpu v0.6 (#121)
- Use pre-compiled GLSL shaders; add simple opt-in build system. This removes
the depencency on
shaderc
. (#124) - Fix shader precision (#128)
- Add draw performance metrics (#131)
Improve space allocation for grid spans (#134) Fix size of slider handle when slider is over-sized (#134) Remove the unwanted right-hand margin in the Mandlebrot example (#134)
- Update winit to 0.23 (#129)
- Add
Window::on_drop
method returning a future which can be used to retrieve state from a dialog window on closure. This replaces window callbacks. (#130) - New
LostSelFocus
event to delay focus-clearing until another widget supporting selection receives focus (#137) - Use
LinearMap
for cleaner code in the event manager (#140) - Fix: avoid clearing
time_updates
,handle_updates
andpending
fields of event manager during reconfigure (#140)
- Remove broken
CloneTo
helper trait (#126) - Add
min_spec
feature for optional usage ofmin_specialization
. (#132) - Let parent widgets store identifier range for descendents, allowing O(1)
is_ancestor_of
check. (#132) - Use binary-search in
WidgetChildren::find
andfind_mut
forO(log n)
performance. (#133) - Add builder-style methods to
Theme
andToolkit
(#139) - Switch to US-English spellings in API (#141)
This release largely concerns text formatting, with the new kas-text
library.
It also saw the addition of the CONTRIBUTING and ROADMAP documents and, as usual, several doc improvements.
This is a new library written for use with KAS and integrated from #110 onwards, supporting glyph shaping, bidirectional text and much better line-wrapping (faster, line metrics and direct support for coord/glyph-position translation). For more on this library, see kas-text.
- Initial integration (#110)
- Move
Align
tokas-text
and re-export (#110) - Remove
CowString
(#111) - Support shaping via HarfBuzz (#113)
- Add
PreparedTextExt
extension trait (#116) - Initial (hacky) support for text effects (#119)
- Draw a real text edit marker (#106)
- Use
unicode-segmentation
for prev/next grapheme (#106) - Keyboard and mouse text navigation (#106, #113, #115, #119)
- Enable text selection (#108, #113, #118)
- Enable double-click and triple-click selection modes (#117)
- Draw text selection (#108, #110, #112)
- Support scrolling within
EditBox
(#116, #118) - PageUp/Down distance depends on view size (#119)
- Widgets may now handle the Escape key (#118)
- Initial support for shortcuts (hard-coded) (#116)
ModifiersState
is no longer passed withEventControl
but accessed viaManager
(#113)Manager
now tracks double-clicks (and triple-, etc.)- Rename
event::NavKey
→event::ControlKey
(#106)
- Setting a string no longer automatically resizes the UI (#116)
- Separate inner and outer margins (#114, #115)
- Various style tweaks (#105, #114)
ShadedTheme
now re-uses parts ofFlatTheme
(#109)- New
DrawHandleExt
extension trait (#108) - Add
DrawHandleExt::size_handle
andManager::size_handle
(#107, #108)
- Add
WidgetCore::with_disabled
(#104) - Adjust
SliderType
trait requirements (#105) Slider
: round to nearest int instead of rounding down (#114)- Extend
ComboBox
API (#104)
- Update for Rust 1.45:
proc_macro_hygiene
is obsolete (#113) - Revise class traits regarding text (#110, #111)
- Align type now has
Default
,TL
,BR
,Centre
andStretch
values (#110) - Update
wgpu_glyph
andfont-kit
dependencies (#106, #110) - Force window size to be at least 1×1 to avoid crash (#109)
- Remove screenshots from package
- Document main breaking changes below
Another fairly large release, with a lot of changes to input handling, a revision to the trait model, support for pop-up widgets, and (limited) support for stable rustc.
The most likely changes needed to update 0.3 → 0.4:
- Replace
Label::from
withLabel::new
- Replace
layout(horizontal)
withlayout(row)
,layout(vertical)
withlayout(column)
- For several methods like
set_text
, replacew.set_text(mgr, text)
with*mgr |= w.set_text(text)
The Widget
trait model has seen significant revision (#75, #74, #85):
WidgetChildren
added (split out fromWidgetCore
)WidgetConfig
added (taking all methods fromWidget
)event::Handler
split intoHandler
andSendEvent
Widget
is now just a trait bound over all others- All
Widget
traits are impl'd byderive(Widget)
on an opt-out basis
Widgets should now return a TkAction
from methods modifying self and not
take a Manager
reference, if possible (#79).
Widgets can now be downcast with std::any::Any
(#97).
Pop-up widgets are supported as a layer over an existing window (similar to a
borderless window, but without requiring windowing support, which winit lacks).
These are used for ComboBox
and for (recursive) menus.
Added in #76, #85, #87, #93.
- Add
EditGuard
allowing user hooks onEditBox
updates (#68) - Add pan grabs — two-finger resize/rotate (#70)
- Use standard events for timer and handle updates (#74)
- Add reverse key navigation with Shift+Tab (#77)
- Allow
Slider
to respond to arrow keys (#77) - Various small fixes (#73)
- Add error and disabled states (#84, #85)
- Merge
Action
andEvent
(#85) - Allow
ScrollRegion
(andMandlebrot
) to respond to navigation keys without focus (#90) - Let widgets request
Focus
when responding to events (#90) - Menu navigation with Tab key (#92) and arrows (#93, #97)
- Allow accelerator keys to be derived from labels (e.g. "&File"),
to use a separate layer for each pop-up,
to be visually indicated when Alt is held,
and to be activated with Alt held or
alt_bypass
set (#100)
- Allow some wgpu state to be shared between windows (#69)
- Tracks for sliders and scrollbars (#76)
- Use floating-point types for mid-level draw API (#76)
- Add a depth buffer (#94)
- Fix: do not use
noperspective
in shaders (#99)
- Add
DragHandle
component (#71) - Add
Slider
widget (#71) - Add
Frame
widget (#72) - Add
ComboBox
widget (#76, #85) - Add
Splitter
widget (#80) - Add
MenuBar
,SubMenu
(#86) - Add
MenuEntry
,MenuToggle
(#89)
- Calculate window size before creation (#69)
- Add (real) margins (#72, #79)
- Replace
Horizontal
andVertical
withRight
,Left
,Up
,Down
, allowing reversed layouts and better pop-up placement (#78) - Do not pass
SizeHandle
toLayout::set_rect
(#79) - Rewrite
SizeRules::solve_seq
to respect previous widths/heights and only modify minimally for validity (#79) - Reduce calls to
Layout::size_rules
(#79)
- Move
Vec2
tokas::geom
; addDVec2
(#70) - Add
CowString
andCowStringL
as aliases overstd
types (#74) - Add
prelude
module (#75, #102) - Let
TkAction
supportAdd<Output = Self>
andManager
supportAddAssign<TkAction>
(#79) - Update to wgpu 0.5, font-kit 0.6 and smallvec 1.4 (#94)
- Support stable rustc, for a few examples only (#101)
- New
unsize
feature flag (#101) - Revise documentation (#102)
Bump version of kas-wgpu
to fix build on docs.rs.
This is a decent sized release, focussing primarily on drawing, themes and
layouts. Highlights include a new FlatTheme
, many small visual improvements,
access to medium-level and low-level drawing APIs for custom widgets,
window size limits, and switchable themes and colour schemes.
- Readme for examples (#61, #62)
- Clock example now draws an analogue clock face (#63)
- New Mandlebrot example with a custom draw pipe (#64)
- Update
winit
to 0.21 (#51)
- Add
ThemeApi
,ThemeAction
for run-time adjustment (#53) Layout::draw
methods now receive&ManagerState
, not&Manager
(#57)- Replace
WidgetCore::find_coord_mut
withLayout::find_id
(#51)
- Tweak margins; buttons now (temporarily) have an external margin (#53)
- Allow parents to influence child aliginment (#52)
- Non-parent widgets may now have frames (#52)
layout_data
is no longer required forsingle
layout (#52)- Add
StretchPolicy
toSizeRules
; adjustAxisInfo
(#52) - Move
Align
,Direction
and friends tokas::data
;Direction
is now an enum (#52)
- Allow setting a custom cursor for a mouse grab (#54)
- Removal of
kas::event::Address
: all events are now addressed byWidgetId
(#51) - Update handles gained a
u64
payload (#51) PressEnd
no longer sent without a press grab (#51)
- Support substitution of generics in handler impls (#51)
- New
Filler
widget (#52) - New
RadioBox
widget (#51) - Add
CheckBoxBare
(#51)
- Support custom draw pipes (#64, #65)
- New
FlatRound
pipe (#53) - Use multisampling in
FlatRound
andShadedRound
pipes (#53) - Move
Draw
* traits tokas::draw
(#58, #60) Draw
: addrect
,frame
methods; removedraw_quad
(#50)- New
DrawRounded
,DrawShaded
traits (#50, #60) rounded_frame
method supportsinner_radius
(#58)- Use higher-level API in
DrawText
(#58, #63)
- New
kas-theme
crate, encapsulating content fromkas
andkas-wgpu
(#60, #57) - New
FlatTheme
(#53) - Prettier navigation highlights and (some) frames (#58)
- New
MultiTheme
for run-time switching (#53) - Add
stack_dst
feature,ThemeDst
trait; use forMultiTheme
(#54, #61) - Experimental, feature-gated use of Generic Associated Types to avoid
unsafe
usage (#57, #61) - Add
DrawHandle::draw_device
to get lower-level draw API (#63) - Add
Theme::update_window
method (#53) - Remove
Theme::light_direction
,get_fonts
methods; addinit
(#63) - New
ThemeColours
struct; colour themes (#53) - New
Dimensions
struct and friends forTheme::Window
impl (#53) - Themes now use integer arithmetic internally (#50)
- Read
KAS_BACKENDS
,KAS_POWER_PREFERENCE
env vars (#50) - Additional parameters to
Toolkit::new_custom
(#50, )
- Continuous Integration via Travis (#61)
kas::geom
: addCoord::uniform
,Rect::shrink
(#50)- Window sizes may now have upper/lower limits (#51)
- New
sync-counter
example (#46)
- Add a
ScrollBar
widget; add scroll bars toScrollRegion
- Re-added separate
Layout
trait (#42) - Widget configure now happens on init and may run user-defined code (#36)
- Widgets can now directly schedule updates on timer (#42)
- Widgets updates can now be triggered via an
UpdateHandle
(#46) - Rename
WidgetCore::get_by_id
→find
and addfind_mut
(#42) - Add
WidgetCore::find_coord_mut
(#47)
Manager
renamed toManagerState
; newManager
wrapper type added (#39)- Event handlers take a
&mut Manager
parameter instead of&mut dyn TkWindow
(#39) Manager::set_char_focus
renamed torequest_char_focus
- Remove
Event::Identify
(#47) - Several fixes for subtle event-handling issues
make_widget!
macro now uses attributes instead oflayout => Msg
parameter (#42)- Support generics within
make_widget!
macro (#46)
- Add
kas::WindowId
type - Add
TkAction::RegionMoved
to updateManagerState
after scroll region move (#47)
- Use
log
crate for logging; improved log messages - Use
shaderc
to compile shaders - Use
smallvec
for some optimisations - Update to
winit
version 0.20.0 (from pre-release version)
- Support creation of new windows from event handlers (#34)
- Add
ToolkitProxy
, allowing some control from other threads (#36) - Add
kas_wgpu::shared
private module - Rename
event
module toevent_loop
; refactor code (#36, #42, #46)
- Add install/testing section to README
kas_wgpu::Toolkit::new
now returns aResult
- Optimise drawing and event handling for long list widgets
- Rename "dynamic" widgets to
List
,BoxList
,Row
, etc. and extend API
This is a massive release in terms of the number of changes since 0.0.2. Most parts of the project have seen revision (perhaps least of all the macros). To summarise:
kas-gtk
has been replaced withkas-rgx
which was then replaced withkas-wgpu
.- Drawing and theming traits have been introduced in preliminary form.
- Event handling has changed significantly.
Class
has been removed, allowing fully custom widget types.
- Add trait references to
Class
enum as alternative to widget downcast - Generalise callbacks: new module, additional
Condition
codes - Replace
event::ignore
witherr_unhandler
anderr_num
fns - Add
Text::new()
andEntry::new_on_activate(text, handler)
- Tweak
make_widget
syntax tocontainer(vertical) => ...
- Move macro doc to main crate and improve examples
- Allow
kas
crate self reference to simplify proc macros and allow in doc tests
The initial release.