struct mola::gui::Label

Overview

A read-only text label whose content is updated from any thread via LiveString::set().

nanogui : nanogui::Label; caption refreshed in spinOnce via poll(). ImGui : ImGui::TextUnformatted(liveStr->display.c_str()) each frame, preceded by liveStr->pollIntoDisplay().

font_size == 0 → use toolkit default.

#include <GuiWidgetDescription.h>

struct Label
{
    // fields

    LiveString::Ptr text;
    int font_size = 0;
    int fixed_width = 0;
};

Fields

LiveString::Ptr text

Shared with the module; never null.

int fixed_width = 0

0 = auto (nanogui: setFixedWidth)