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

A linear control (fader / slider / scroll thumb). More...

#include <widget_painter.hpp>

Public Attributes

bool horizontal = true
float thumb_pos = 0.0f
float track_min = 0.0f
float track_max = 0.0f
float thumb_size = 0.0f
 thumb extent along the travel axis, pixels
double value = 0.0
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 linear control (fader / slider / scroll thumb).

All three positions are in PIXELS along the travel axis: track_min is the coordinate of proportion 0, track_max of proportion 1, and thumb_pos of the current proportion. For a vertical control the travel axis is y and track_min is the BOTTOM (proportion 0), so track_min > track_max there — a skin must not assume the pair is sorted.

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

◆ focused

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

control holds keyboard focus

◆ horizontal

bool pulp::view::LinearPaintState::horizontal = true

◆ hovered

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

pointer is over the control

◆ pressed

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

pointer is down on the control

◆ thumb_pos

float pulp::view::LinearPaintState::thumb_pos = 0.0f

◆ thumb_size

float pulp::view::LinearPaintState::thumb_size = 0.0f

thumb extent along the travel axis, pixels

◆ track_max

float pulp::view::LinearPaintState::track_max = 0.0f

◆ track_min

float pulp::view::LinearPaintState::track_min = 0.0f

◆ value

double pulp::view::LinearPaintState::value = 0.0

◆ value_max

double pulp::view::LinearPaintState::value_max = 1.0

◆ value_min

double pulp::view::LinearPaintState::value_min = 0.0

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