MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
TextEdit.hpp File Reference

Text editing operations: a mutable buffer plus a byte-offset cursor, and the operations that keep it correct. More...

#include "TypeSetter.hpp"
+ Include dependency graph for TextEdit.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MayaFlux::Portal::Text::EditableText
 Mutable UTF-8 text plus a byte-offset cursor. More...
 

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
 
namespace  MayaFlux::Portal
 
namespace  MayaFlux::Portal::Text
 

Functions

void MayaFlux::Portal::Text::erase (EditableText &s, int n)
 Erase n codepoints from the cursor.
 
void MayaFlux::Portal::Text::insert_codepoint (EditableText &s, uint32_t codepoint)
 Insert one codepoint at the cursor, advancing it past the insert.
 
void MayaFlux::Portal::Text::insert_literal (EditableText &s, char c)
 Insert one raw ASCII byte at the cursor, advancing it past the insert.
 
void MayaFlux::Portal::Text::move (EditableText &s, int n)
 Move the cursor by n codepoints.
 

Detailed Description

Text editing operations: a mutable buffer plus a byte-offset cursor, and the operations that keep it correct.

A mutable counterpart to copy()/x_at()/index_at() in TypeSetter.hpp: those query a fixed string at a byte position or range, these mutate one in place at a single byte-offset cursor. Built entirely from is_control(), encode_utf8(), and next_codepoint_offset()/ previous_codepoint_offset() - no atlas, no layout, no rendering dependency of any kind. Scoped to text editing generally, not tied to any one caller - room for word-boundary movement, selection ranges, Home/End, and similar to land here later.

Definition in file TextEdit.hpp.