ttx 0.1.0
Loading...
Searching...
No Matches
osc_66.h
Go to the documentation of this file.
1#pragma once
2
3#include "di/container/string/prelude.h"
4#include "di/reflect/prelude.h"
6
7namespace ttx::terminal {
12struct OSC66 {
13 constexpr static auto max_text_size = usize(4096);
14
16 di::StringView text;
17
18 static auto parse(di::StringView data) -> di::Optional<OSC66>;
19
20 auto serialize() const -> di::String;
21
22 auto operator==(OSC66 const& other) const -> bool = default;
23
24 constexpr friend auto tag_invoke(di::Tag<di::reflect>, di::InPlaceType<OSC66>) {
25 return di::make_fields<"OSC66">(di::field<"info", &OSC66::info>, di::field<"text", &OSC66::text>);
26 }
27};
28}
Definition capability.h:8
Shared information for cells linked via text sizing protocol (OSC 66) or double width characters.
Definition multi_cell_info.h:8
Represents text annotated using the text sizing protocol.
Definition osc_66.h:12
static auto parse(di::StringView data) -> di::Optional< OSC66 >
Definition osc_66.cpp:24
di::StringView text
Described text. Notice this is a reference and so does not own the underlying data.
Definition osc_66.h:16
constexpr friend auto tag_invoke(di::Tag< di::reflect >, di::InPlaceType< OSC66 >)
Definition osc_66.h:24
auto serialize() const -> di::String
Definition osc_66.cpp:72
MultiCellInfo info
Metadata associated with the text.
Definition osc_66.h:15
static constexpr auto max_text_size
Definition osc_66.h:13