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::TextFormatBarPresenter Class Reference

Contextual text-formatting bar shown as a floating canvas toolbar. More...

#include "donner/editor/TextFormatBarPresenter.h"

Public Member Functions

FormatBarActions render (const FormatBarState &state, const ImVec2 &topLeft, float width)
 Render the bar and report the actions requested this frame.

Static Public Member Functions

static constexpr float PreferredWidth ()
 Preferred width of the compact single-row toolbar.
static float BarHeight ()
 Toolbar height for the current ImGui frame metrics.

Detailed Description

Contextual text-formatting bar shown as a floating canvas toolbar.

Member Function Documentation

◆ render()

FormatBarActions donner::editor::TextFormatBarPresenter::render ( const FormatBarState & state,
const ImVec2 & topLeft,
float width )
nodiscard

Render the bar and report the actions requested this frame.

Draws nothing and returns an empty result when state.visible is false. The bar is a floating rounded container at topLeft with a stable width.

Parameters
stateCurrent formatting context (visibility, values, families).
topLeftTop-left edge in screen coordinates.
widthBar width in pixels, normally PreferredWidth().
Returns
Edge-triggered actions to route to the styling commands.

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