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 |
A widget whose painted text can join a document-level selection.
|
virtualdefault |
|
pure virtual |
Where the glyphs landed at the last paint. See SelectableLayout.
Implemented in pulp::view::Label, and pulp::view::TextEditor.
|
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.
|
inline |
|
pure virtual |
The View this capability is mixed into. Never null.
Implemented in pulp::view::Label, and pulp::view::TextEditor.
|
pure virtual |
The current highlight. Returns false when nothing is highlighted.
Implemented in pulp::view::Label, and pulp::view::TextEditor.
|
pure virtual |
Paint this byte range as selected. start >= end clears the highlight.
Implemented in pulp::view::Label, and pulp::view::TextEditor.