CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
MarkdownModel.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5
6namespace cdc::ui {
7
14namespace mdfont {
15enum : uint8_t {
21};
22} // namespace mdfont
23
35
43struct StyledLine {
44 const char* text = nullptr;
45 uint16_t len = 0;
48 uint8_t indent = 0;
49 bool inverted = false;
50};
51
54 virtual void emit(const StyledLine& line) = 0;
55 virtual ~StyledLineSink() = default;
56};
57
58} // namespace cdc::ui
Font ids used by the styled-line model.
Centralized key-code constants for cdc_views.
Definition IModule.h:8
MdLineKind
Block role of a styled line, used by the view to apply layout/markers.
Sink the parser emits styled lines to (decouples model from storage).
virtual ~StyledLineSink()=default
virtual void emit(const StyledLine &line)=0
One rendered logical line produced by the Markdown parser.
uint16_t len
Span length in bytes.
uint8_t font
One of mdfont.
uint8_t indent
Nesting depth (view multiplies by columns).
const char * text
Span into source (not null-terminated).
bool inverted
Inverse background (code).