WindowResizability.swift 926 B

1234567891011121314151617
  1. /// Controls how a window's resizing bounds relate to the resizability of the
  2. /// window's content.
  3. ///
  4. /// If you want to disable window resizing entirely, use ``View/windowResizeBehavior(_:)``
  5. /// which controls whether the enclosing window is user resizable.
  6. public enum WindowResizability: Sendable {
  7. /// SwiftCrossUI decides whether to use `contentSize` or `contentMinSize` depending
  8. /// on the type of scene. This currently means it'll just default to `contentMinSize`.
  9. case automatic
  10. /// The window cannot be resized smaller than its content's minimum size or larger
  11. /// than its content's maximum size.
  12. case contentSize
  13. /// The window cannot be resized smaller than its content's minimum size, but can
  14. /// be resized larger than its content's maximum size. If the window is bigger than
  15. /// its content, then its content remains centered within the window.
  16. case contentMinSize
  17. }