* Allow taking the content of a dialog without destroying it by replacing it with another view.
* Add getters for all three ways of mutating padding (`Margins` struct, LRTB tuple, and individual fields)
* Allow setting focus
* Add a getter for the title of the dialog
* Add getter for title position
* Add immutable button iterator for `Dialog`
* Rename `buttons_mut` to fit with `iter_buttons_mut`.
* Add getter for horizontal alignment property
* Remove `replace_content` and replace it with just having `set_content` return the previous view.
* Actually clamp dialog focus rather than forcibly unclamping it
* Use the existing convention for button iterators rather than the `iter`/`iter_mut` convention
* Remove extraneous padding getters
* Remove import of `std::mem::replace`
This patch implements FromIterator<SpannedString<T>> for
SpannedString<T> to make it easier to create strings programatically.
We could also use fold directly without extracting the first element,
but that would require an additional allocation.
The method names stack_horizontal and stack_vertical don’t make it clear
whether the methods modify self or return the modified version.
Therefore, it is easy to use them wrong if you don’t look at the
documentation. This patch adds the must_use attribute to both methods
to make it easier to spot such mistakes.
This patch implements FromIterator<&Style> and FromIterator<T:
Into<Style>> for Style to make it easier to programatically create
styles. Style already has a merge method, but it takes a slice instead
of an iterator.
Before commit f9c9e56518, this match
interpreted the key code 10 as the Enter key. Since it now uses the
Key::Enter variant instead, the comment explaining the magic number is
no longer needed.