48 : cfg_(cfg), current_(negotiate_static_(cfg, cfg.initial_size)) {}
std::vector< uint8_t > serialize() const
Serialize the saved size to 8 bytes (little-endian u32 w, h).
const ResizableShellConfig & config() const
Definition resizable_shell.hpp:61
Size apply(Size requested)
Commit the new size. Returns the clamped size actually applied.
Definition resizable_shell.hpp:55
Size negotiate(Size requested) const
Intended size → clamped to [min, max] and (when aspect is locked) snapped to the nearest aspect-corre...
bool deserialize(std::span< const uint8_t > blob)
Restore from a blob produced by serialize().
Size current() const
Definition resizable_shell.hpp:60
ResizableShell(ResizableShellConfig cfg={})
Construct with a config.
Definition resizable_shell.hpp:47
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
@ o
Definition input_events.hpp:40
Definition resizable_shell.hpp:31
Size max_size
Definition resizable_shell.hpp:33
double aspect_ratio
When > 0, aspect ratio = width / height is held during resize.
Definition resizable_shell.hpp:37
Size initial_size
Definition resizable_shell.hpp:34
Size min_size
Definition resizable_shell.hpp:32
Definition geometry.hpp:28
bool operator==(const Size &o) const
Definition resizable_shell.hpp:26
float height
Definition geometry.hpp:29
float width
Definition geometry.hpp:29