Josh McKinney 96d097ef76
feat: implement Rect ops for moving (#1596)
feat: implement Rect ops for moving

Implemented `Add`, `AddAssign`, `Sub`, and `SubAssign` on `Rect` for
`Offset`. This makes it possible to move rects

```rust
let rect = Rect::new(1, 2, 3, 4);
let moved = rect + Offset(1, 2);
let moved = rect - Offset(1, 2);
let moved = rect + Offset(-1, -2);
```

Additionally Rect, Size, Offset, and Position now all have MIN and MAX
consts.
2025-11-30 11:57:08 -08:00
..

Input Form example

This example demonstrates how to handle input across several form fields (2 strings and an number). It uses an enum to track the focused field, and sends keyboard events to one which is current.

Run this example with:

cargo run -p input-form

This example does not handle things like cursor movement within the line (just keys and backspace). Most apps would benefit from using the following crates for text input rather than directly using strings:

Some more ideas for handling focus can be found in: