Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
widgets.hpp File Reference
#include <algorithm>
#include <array>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <pulp/canvas/attributed_string.hpp>
#include <pulp/canvas/text_shaper.hpp>
#include <pulp/view/accessibility.hpp>
#include <pulp/view/animation.hpp>
#include <pulp/view/text_line_metrics.hpp>
#include <pulp/view/inspector_facts.hpp>
#include <pulp/view/data_display.hpp>
#include <pulp/view/caret.hpp>
#include <pulp/view/custom_shader_host.hpp>
#include <pulp/view/frame_clock.hpp>
#include <pulp/view/hit_metrics.hpp>
#include <pulp/view/selectable_text.hpp>
#include <pulp/view/slider_core.hpp>
#include <pulp/view/sprite_strip.hpp>
#include <pulp/view/value_source.hpp>
#include <pulp/view/view.hpp>
#include <pulp/view/widget_painter.hpp>
#include <string>
#include <string_view>
#include <vector>

Go to the source code of this file.

Classes

class  pulp::view::Label
struct  pulp::view::Label::PaintedTextExtents
 The extents of the glyphs this Label will actually paint, given the content width it has been laid out at. More...
struct  pulp::view::Label::CachedLineBox
 One captured line of text: where it sits in this Label's box, and which slice of the text it holds (UTF-16 code units, as the capture indexes). More...
struct  pulp::view::Label::LineBreakPathCounts
 How many Labels took each line-breaking path since the last reset. More...
struct  pulp::view::Label::TextEditMetrics
 WYSIWYG text-edit metrics — the geometry an inspector edit overlay needs to draw a caret + selection band that EXACTLY matches the glyphs paint() renders. More...
class  pulp::view::Knob
struct  pulp::view::Knob::ModulationRing
class  pulp::view::Fader
class  pulp::view::RangeSlider
struct  pulp::view::RangeSlider::ChromiumRefreshParts
 Everything the chromium_refresh skin paints, in local coordinates. More...
class  pulp::view::Toggle
class  pulp::view::Checkbox
struct  pulp::view::Checkbox::ChromiumRefreshParts
 Everything the chromium_refresh skin paints, in local coordinates, in paint order: lighten (disabled only), background, border (absent for a checked or indeterminate checkbox), accent_fill (checked or indeterminate checkbox), then the mark: the check stroke, the dash or the radio dot. More...
class  pulp::view::ButtonSurface
struct  pulp::view::ButtonSurface::ChromiumRefreshParts
 Everything the skin paints, in local coordinates, in paint order: the lighten layer (disabled only) and fill on surface, the border stroke on surface, then, when focus-visible, the outer ring and the inner ring over it. More...
class  pulp::view::ToggleButton
class  pulp::view::Icon
class  pulp::view::ImageView
class  pulp::view::XYPad
class  pulp::view::Panel
class  pulp::view::GroupBox
class  pulp::view::DualRangeSlider
class  pulp::view::InlineValueEditor
class  pulp::view::WaveformRecorder

Namespaces

namespace  pulp
namespace  pulp::view
 Hover-cursor tracking for platform window hosts.

Enumerations

enum class  pulp::view::LabelAlign {
  pulp::view::left , pulp::view::center , pulp::view::right , pulp::view::auto_ ,
  pulp::view::justify , pulp::view::match_parent
}
 Text alignment for Label. More...
enum class  pulp::view::UaSkin { pulp::view::platform , pulp::view::chromium_refresh }
 Which skin a form-control widget paints with. More...
enum class  pulp::view::UaColorScheme { pulp::view::light , pulp::view::dark }
 The CSS color-scheme a chromium_refresh palette resolves against. More...
enum class  pulp::view::UaControlState { pulp::view::normal , pulp::view::hovered , pulp::view::pressed , pulp::view::disabled }
 Interaction state a chromium_refresh palette is keyed on. More...

Functions

std::optional< canvas::Canvas::SDFShape > pulp::view::widget_chart_shape (const View &view)
 The SDF shape a widget's chart shader is drawn on: flat_arc for a Knob's value arc, stadium for a Fader's track (a vertical Fader turns it a quarter counter-clockwise, so t runs from the bottom up).
float pulp::view::fader_chart_track_thickness (float cross_extent)
 Height of the stadium a Fader's chart is drawn in, given the fader's extent across its track: half of it, kept between 8 and 24 units.
UaColorScheme pulp::view::ua_scheme_for_accent (canvas::Color accent, UaColorScheme scheme, canvas::Color contrast_light, canvas::Color contrast_dark)
 The scheme Chromium actually paints a control in when an author accent is set: it flips scheme to the other one when the accent's WCAG contrast with contrast_light (the part's light-scheme colour adjacent to the accent) is under 3:1 and lower than with contrast_dark; symmetrically from dark.