Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::editor::FormatBarState Struct Reference

Snapshot of the current text formatting context, driving the bar's controls. More...

#include "donner/editor/TextFormatBarPresenter.h"

Public Attributes

bool visible = false
 Whether the bar should render at all: true when text is selected or a text editing session is active.
std::string fontFamily
 Current font-family value shown in the picker. May name a family the editor lacks; preserved verbatim as free text.
float fontSize = 0.0f
 Current font-size value (document units) shown in the size combo.
bool hasFontSize = false
 True when a numeric font-size was resolved for the current element.
bool bold = false
 Current font-weight: bold state.
bool italic = false
 Current font-style: italic state.
bool underline = false
 Current text-decoration: underline state.
ImFont * boldToggleFont = nullptr
 Face used to render the Bold ("B") toggle glyph, or null for the default.
std::vector< FormatBarFontFamilyfamilies
 Families offered in the picker dropdown, each with its preview face.

Detailed Description

Snapshot of the current text formatting context, driving the bar's controls.

The shell fills visible and families; the attribute-derived fields (fontFamily, fontSize, bold, italic, underline) come from ReadTextFormatState against the single selected/edited <text>.

Member Data Documentation

◆ bold

bool donner::editor::FormatBarState::bold = false

Current font-weight: bold state.

◆ boldToggleFont

ImFont* donner::editor::FormatBarState::boldToggleFont = nullptr

Face used to render the Bold ("B") toggle glyph, or null for the default.

◆ families

std::vector<FormatBarFontFamily> donner::editor::FormatBarState::families

Families offered in the picker dropdown, each with its preview face.

◆ fontFamily

std::string donner::editor::FormatBarState::fontFamily

Current font-family value shown in the picker. May name a family the editor lacks; preserved verbatim as free text.

◆ fontSize

float donner::editor::FormatBarState::fontSize = 0.0f

Current font-size value (document units) shown in the size combo.

◆ hasFontSize

bool donner::editor::FormatBarState::hasFontSize = false

True when a numeric font-size was resolved for the current element.

◆ italic

bool donner::editor::FormatBarState::italic = false

Current font-style: italic state.

◆ underline

bool donner::editor::FormatBarState::underline = false

Current text-decoration: underline state.

◆ visible

bool donner::editor::FormatBarState::visible = false

Whether the bar should render at all: true when text is selected or a text editing session is active.


The documentation for this struct was generated from the following file: