Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
StyleSourceAnnotations.h File Reference
#include <cstddef>
#include <string>
#include <string_view>
#include <vector>
#include "donner/editor/FlashDecorations.h"
#include "donner/svg/SVGDocument.h"
#include "donner/svg/SVGElement.h"
Include dependency graph for StyleSourceAnnotations.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::editor::StyleSourceContribution
 One source-backed style contribution and its source-editor annotation metadata. More...
struct  donner::editor::StyleSourceAnnotations
 Source annotations derived from CSS cascade analysis. More...

Namespaces

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

Enumerations

enum class  donner::editor::StyleContributionKind {
  StylesheetDeclaration ,
  InlineStyleDeclaration ,
  PresentationAttribute ,
  ReferenceResourceElement
}
 Source contribution kind for editor-side cascade annotations. More...

Functions

StyleSourceAnnotations donner::editor::ComputeStyleSourceAnnotations (svg::SVGDocument &document, std::string_view source)
 Compute source-editor style annotations for document.

Enumeration Type Documentation

◆ StyleContributionKind

Source contribution kind for editor-side cascade annotations.

Enumerator
StylesheetDeclaration 

Declaration inside an authored <style> rule.

InlineStyleDeclaration 

Declaration inside an element style="" attribute.

PresentationAttribute 

SVG presentation attribute on an element.

ReferenceResourceElement 

Non-rendered resource element such as a gradient or filter.

Function Documentation

◆ ComputeStyleSourceAnnotations()

StyleSourceAnnotations donner::editor::ComputeStyleSourceAnnotations ( svg::SVGDocument & document,
std::string_view source )
nodiscard

Compute source-editor style annotations for document.

This is intentionally read-only: it describes which source style contributions are selected by the cascade but does not modify rendering, CSS state, or DOM state.

Parameters
documentSource-backed SVG document to inspect.
sourceSource text currently synchronized with document.
Returns
Style contribution annotations for the text editor.