Skip to main content

RichLabel

#include "toolkit/rich_label.hpp"

A rich-text label: a thin, label-like wrapper around HtmlView for short inline Markdown/HTML content (as opposed to HtmlView used as a full scrollable document view). Inherits HtmlView.

RichLabel screenshot

Example​

auto label = std::make_unique<toolkit::RichLabel>();
label->set_markdown("Built with **SVision3** — see [docs](https://example.com).");

Construction​

RichLabel();
explicit RichLabel(std::string text);

API​

MemberDescription
set_text(std::string const&) / text()Plain/HTML text content
set_markdown(std::string const&)Set content as Markdown

All of HtmlView's API (set_css, on_link_click, set_content_margin, etc.) is also available.