|
MUSX Document Model
|
A text chunk with the Enigma styles active for that chunk. More...
#include <EnigmaString.h>
Public Member Functions | |
| EnigmaResolvedTextChunk | resolve () const |
| Creates a document-independent snapshot of the chunk. (See EnigmaStyles::resolve.) | |
Public Attributes | |
| std::string | text |
| The chunk as valid UTF-8. | |
| EnigmaStyles | styles |
| std::optional< EnigmaTextInsert > | insert |
| The insert the chunk was substituted for, when it was. | |
A text chunk with the Enigma styles active for that chunk.
| std::optional<EnigmaTextInsert> musx::util::EnigmaTextChunk::insert |
The insert the chunk was substituted for, when it was.
The substituted text of an insert is always its own chunk, never merged with the text around it, so a consumer can replace it as a whole. Text that a recursively parsed insert (such as ^partname) produces carries that insert. Style commands are not inserts.
| EnigmaStyles musx::util::EnigmaTextChunk::styles |
the styles active for the chunk
| std::string musx::util::EnigmaTextChunk::text |
The chunk as valid UTF-8.
With a symbol font, each Unicode code point is a raw glyph index; call dom::FontInfo::calcIsSymbolFont on the font in styles to identify those chunks.