Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::SelectableText Class Referenceabstract

A widget whose painted text can join a document-level selection. More...

#include <selectable_text.hpp>

Public Member Functions

virtual ~SelectableText ()=default
virtual std::string_view selectable_text () const =0
 The widget's text, in UTF-8.
virtual SelectableLayout selectable_layout () const =0
 Where the glyphs landed at the last paint. See SelectableLayout.
virtual void set_selection_highlight (int start_utf8, int end_utf8)=0
 Paint this byte range as selected. start >= end clears the highlight.
virtual bool selection_highlight (int &start_utf8, int &end_utf8) const =0
 The current highlight. Returns false when nothing is highlighted.
virtual View * selectable_view ()=0
 The View this capability is mixed into. Never null.
const View * selectable_view () const

Detailed Description

A widget whose painted text can join a document-level selection.

Constructor & Destructor Documentation

◆ ~SelectableText()

virtual pulp::view::SelectableText::~SelectableText ( )
virtualdefault

Member Function Documentation

◆ selectable_layout()

virtual SelectableLayout pulp::view::SelectableText::selectable_layout ( ) const
pure virtual

Where the glyphs landed at the last paint. See SelectableLayout.

Implemented in pulp::view::Label, and pulp::view::TextEditor.

◆ selectable_text()

virtual std::string_view pulp::view::SelectableText::selectable_text ( ) const
pure virtual

The widget's text, in UTF-8.

This is the SOURCE string — what a copy should yield — not the transformed string the widget paints. A Label under text-transform: uppercase reports its original casing.

Implemented in pulp::view::Label, and pulp::view::TextEditor.

◆ selectable_view() [1/2]

const View * pulp::view::SelectableText::selectable_view ( ) const
inline

◆ selectable_view() [2/2]

virtual View * pulp::view::SelectableText::selectable_view ( )
pure virtual

The View this capability is mixed into. Never null.

Implemented in pulp::view::Label, and pulp::view::TextEditor.

◆ selection_highlight()

virtual bool pulp::view::SelectableText::selection_highlight ( int & start_utf8,
int & end_utf8 ) const
pure virtual

The current highlight. Returns false when nothing is highlighted.

Implemented in pulp::view::Label, and pulp::view::TextEditor.

◆ set_selection_highlight()

virtual void pulp::view::SelectableText::set_selection_highlight ( int start_utf8,
int end_utf8 )
pure virtual

Paint this byte range as selected. start >= end clears the highlight.

Implemented in pulp::view::Label, and pulp::view::TextEditor.


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