Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::format::ViewSize Struct Reference

Editor size hints (in logical pixels). More...

#include <plugin_descriptor.hpp>

Public Attributes

uint32_t preferred_width = 400
uint32_t preferred_height = 300
uint32_t min_width = 0
uint32_t min_height = 0
uint32_t max_width = 0
 0 = unbounded
uint32_t max_height = 0
 0 = unbounded
double aspect_ratio = 0.0
 When > 0, the host should hold this aspect ratio (width/height) during interactive resize.
uint32_t design_width = 0
 Optional authored coordinate space.
uint32_t design_height = 0
ViewportPolicy viewport_policy = ViewportPolicy::Automatic
 The viewport/layout policy is independent of aspect_ratio: a responsive editor may still ask the host to preserve a fixed aspect.

Detailed Description

Editor size hints (in logical pixels).

preferred is used for the initial window size; min/max bound interactive resizing. A zero max dimension means unbounded in that axis.

Member Data Documentation

◆ aspect_ratio

double pulp::format::ViewSize::aspect_ratio = 0.0

When > 0, the host should hold this aspect ratio (width/height) during interactive resize.

pulp::view::ResizableShell owns the clamp + snap arithmetic. 0 means "any ratio"; hosts then let the user drag freely within [min, max]. Typical values: 16.0/9.0, 4.0/3.0, preferred_width/preferred_height.

◆ design_height

uint32_t pulp::format::ViewSize::design_height = 0

◆ design_width

uint32_t pulp::format::ViewSize::design_width = 0

Optional authored coordinate space.

This is distinct from preferred: an imported 1320x860 design may intentionally open in a 990x645 host while retaining its captured layout coordinates and scaling uniformly. Zero preserves the historical preferred-size viewport behavior.

◆ max_height

uint32_t pulp::format::ViewSize::max_height = 0

0 = unbounded

◆ max_width

uint32_t pulp::format::ViewSize::max_width = 0

0 = unbounded

◆ min_height

uint32_t pulp::format::ViewSize::min_height = 0

◆ min_width

uint32_t pulp::format::ViewSize::min_width = 0

◆ preferred_height

uint32_t pulp::format::ViewSize::preferred_height = 300

◆ preferred_width

uint32_t pulp::format::ViewSize::preferred_width = 400

◆ viewport_policy

ViewportPolicy pulp::format::ViewSize::viewport_policy = ViewportPolicy::Automatic

The viewport/layout policy is independent of aspect_ratio: a responsive editor may still ask the host to preserve a fixed aspect.


The documentation for this struct was generated from the following file: