Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
SoftWrap.h File Reference
#include <string_view>
#include <vector>
Include dependency graph for SoftWrap.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::editor::SoftWrapSegment
 One visual row produced from a logical source line. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

int donner::editor::ComputeXmlContinuationIndent (std::string_view line)
 Compute the visual continuation indent for XML-like source lines.
std::vector< SoftWrapSegmentdonner::editor::ComputeSoftWrapSegments (std::string_view line, int maxColumns)
 Compute soft-wrap rows for a single logical line.

Function Documentation

◆ ComputeSoftWrapSegments()

std::vector< SoftWrapSegment > donner::editor::ComputeSoftWrapSegments ( std::string_view line,
int maxColumns )
nodiscard

Compute soft-wrap rows for a single logical line.

Parameters
lineLogical line text.
maxColumnsMaximum visual columns available for each row.
Returns
One or more visual rows. Empty input still returns one empty row.

◆ ComputeXmlContinuationIndent()

int donner::editor::ComputeXmlContinuationIndent ( std::string_view line)
nodiscard

Compute the visual continuation indent for XML-like source lines.

Parameters
lineLogical line text.
Returns
Column used for wrapped continuations.