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

A rotary control. More...

#include <widget_painter.hpp>

Public Attributes

float position = 0.0f
float start_angle = 0.0f
float end_angle = 0.0f
double value = 0.0
 Real-world value and range, for skins that print the value.
double value_min = 0.0
double value_max = 1.0
Rect bounds {}
 paint area, LOCAL to the widget (origin 0,0)
bool enabled = true
bool hovered = false
 pointer is over the control
bool pressed = false
 pointer is down on the control
bool focused = false
 control holds keyboard focus

Detailed Description

A rotary control.

position is the normalized travel proportion in [0,1] AFTER the response curve has been applied — i.e. it is what the pointer angle should be derived from, not the raw value. start_angle / end_angle are in radians in Pulp's screen convention (y-down, 0 = the +x axis, clockwise positive — the same convention painters::KnobStyle documents); the pointer angle is start_angle + position * (end_angle - start_angle).

Member Data Documentation

◆ bounds

Rect pulp::view::ControlPaintState::bounds {}
inherited

paint area, LOCAL to the widget (origin 0,0)

◆ enabled

bool pulp::view::ControlPaintState::enabled = true
inherited

◆ end_angle

float pulp::view::RotaryPaintState::end_angle = 0.0f

◆ focused

bool pulp::view::ControlPaintState::focused = false
inherited

control holds keyboard focus

◆ hovered

bool pulp::view::ControlPaintState::hovered = false
inherited

pointer is over the control

◆ position

float pulp::view::RotaryPaintState::position = 0.0f

◆ pressed

bool pulp::view::ControlPaintState::pressed = false
inherited

pointer is down on the control

◆ start_angle

float pulp::view::RotaryPaintState::start_angle = 0.0f

◆ value

double pulp::view::RotaryPaintState::value = 0.0

Real-world value and range, for skins that print the value.

◆ value_max

double pulp::view::RotaryPaintState::value_max = 1.0

◆ value_min

double pulp::view::RotaryPaintState::value_min = 0.0

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