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

One painted line of selectable text, in the widget's LOCAL coordinates. More...

#include <selectable_text.hpp>

Public Attributes

int start_utf8 = 0
 First byte of this line in selectable_text().
int end_utf8 = 0
 One past this line's last byte.
float top = 0.0f
float height = 0.0f
std::vector< float > x_offsets
std::vector< int > byte_offsets

Detailed Description

One painted line of selectable text, in the widget's LOCAL coordinates.

x_offsets[i] is the x of the cluster boundary at byte_offsets[i], measured from the widget's local origin (the line's own indent is already folded in). The two vectors are always the same length, and both are non-empty for a line that reports any geometry at all: a zero-length line still carries the single boundary that is its caret position.

Member Data Documentation

◆ byte_offsets

std::vector<int> pulp::view::SelectableLine::byte_offsets

◆ end_utf8

int pulp::view::SelectableLine::end_utf8 = 0

One past this line's last byte.

◆ height

float pulp::view::SelectableLine::height = 0.0f

◆ start_utf8

int pulp::view::SelectableLine::start_utf8 = 0

First byte of this line in selectable_text().

◆ top

float pulp::view::SelectableLine::top = 0.0f

◆ x_offsets

std::vector<float> pulp::view::SelectableLine::x_offsets

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