pub struct ResizeHint {
pub can_resize: bool,
pub can_resize_horizontally: bool,
pub can_resize_vertically: bool,
pub preserve_aspect_ratio: bool,
pub aspect_ratio_width: u32,
pub aspect_ratio_height: u32,
}Expand description
Describes whether and how a host may resize an Editor, returned from
Editor::resize_hint().
The default is non-resizable (can_resize: false), matching the previous
fixed-size behavior. To make an editor resizable, return a hint with
can_resize: true; the per-axis flags and aspect-ratio fields refine how.
Fields§
§can_resize: boolWhether the host may resize the editor at all. Drives CLAP’s
gui.can_resize and VST3’s canResize. When false, the other fields
are ignored.
can_resize_horizontally: boolWhether the width may change. Only meaningful when can_resize is true.
can_resize_vertically: boolWhether the height may change. Only meaningful when can_resize is true.
preserve_aspect_ratio: boolIf true, the host should keep the editor’s aspect ratio fixed at
aspect_ratio_width : aspect_ratio_height while resizing.
aspect_ratio_width: u32Aspect-ratio numerator (only used when preserve_aspect_ratio is true).
aspect_ratio_height: u32Aspect-ratio denominator (only used when preserve_aspect_ratio is true).
Implementations§
Source§impl ResizeHint
impl ResizeHint
Trait Implementations§
Source§impl Clone for ResizeHint
impl Clone for ResizeHint
Source§fn clone(&self) -> ResizeHint
fn clone(&self) -> ResizeHint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ResizeHint
Source§impl Debug for ResizeHint
impl Debug for ResizeHint
Source§impl Default for ResizeHint
impl Default for ResizeHint
impl Eq for ResizeHint
Source§impl PartialEq for ResizeHint
impl PartialEq for ResizeHint
Source§fn eq(&self, other: &ResizeHint) -> bool
fn eq(&self, other: &ResizeHint) -> bool
self and other values to be equal, and is used by ==.