Skip to content

ui::Paragraph

Header: winui/ui/text/Inlines.hpp.

Inlines that flow together as one block, with a margin around it.

The blocks of a RichText (RichTextControl::set_blocks(), ui::RichText::blocks).

Example:

window.set_content(ui::RichText{
    .blocks = {
        {.inlines = {{.text = "First paragraph."}}},
        {.inlines = {{.text = "Second, "}, {.text = "emphasized", .italic = true}},
         .margin  = ui::Edges{.top = 12.0f}},
    },
});

Field Type Default
inlines std::vector<Inline> The paragraph's runs, in order.
margin Thickness The margin around the paragraph, DIPs.