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

A single accessible text node — the minimum a screen reader needs to describe a piece of painted text. More...

#include <text_accessibility.hpp>

Public Attributes

std::string id
 Caller-stable identifier. Used as the registration key.
std::string text
 UTF-8 content of the node.
TextAccessibilityRole role = TextAccessibilityRole::Label
 Semantic role hint.
std::vector< std::size_t > cluster_boundaries_utf8
 Cluster boundaries in UTF-8 byte offsets.
std::vector< std::size_t > cluster_boundaries_utf16
 Cluster boundaries in UTF-16 code units.
std::size_t selection_start_utf8 = 0
 Active selection range in UTF-8 byte offsets.
std::size_t selection_end_utf8 = 0

Detailed Description

A single accessible text node — the minimum a screen reader needs to describe a piece of painted text.

All offsets are byte offsets into text (UTF-8) or code-unit offsets when expressed in UTF-16.

Member Data Documentation

◆ cluster_boundaries_utf16

std::vector<std::size_t> pulp::view::TextAccessibilityNode::cluster_boundaries_utf16

Cluster boundaries in UTF-16 code units.

Mirrors the UTF-8 vector but expressed in the encoding most platform a11y APIs (NSAccessibility, UIA) expose.

◆ cluster_boundaries_utf8

std::vector<std::size_t> pulp::view::TextAccessibilityNode::cluster_boundaries_utf8

Cluster boundaries in UTF-8 byte offsets.

Each entry is the starting byte index of a grapheme cluster; the vector should typically include 0 and text.size() as bookends.

◆ id

std::string pulp::view::TextAccessibilityNode::id

Caller-stable identifier. Used as the registration key.

◆ role

TextAccessibilityRole pulp::view::TextAccessibilityNode::role = TextAccessibilityRole::Label

Semantic role hint.

◆ selection_end_utf8

std::size_t pulp::view::TextAccessibilityNode::selection_end_utf8 = 0

◆ selection_start_utf8

std::size_t pulp::view::TextAccessibilityNode::selection_start_utf8 = 0

Active selection range in UTF-8 byte offsets.

Both fields == 0 means "no selection" (i.e. the node has no caret).

◆ text

std::string pulp::view::TextAccessibilityNode::text

UTF-8 content of the node.


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