class ffw::GuiLabel

Class List > ffw :: GuiLabel

Label widget with no functionality. More...

Inherits the following classes: ffw::GuiWidget

Classes

Type Name
struct Style

Public Functions

Type Name
GuiLabel (GuiWindow * context, const std::string & label)
virtual ~GuiLabel () = default
void setLabel (const std::string & label)
const std::string & getLabel () const
virtual ffw::Pointf getMinimumWrapSize () override
void setStyle (const GuiLabel::Style * style, bool defaults = false)

Detailed Description

// Example creating a label
auto gui = ffw::GuiWindowNanoVG(nvg);
auto root = gui.getLayout();

auto label = new ffw::GuiLabel(&gui, "Hello World");
label->setLabel("Hello World!"); // Overwrite label
label->setSize(ffw::guiPercent(100.0f), ffw::guiPixels(25.0f));

root->addWidget(label);
// Do not free the created widgets! They will be deleted by window itself!

while(true){
    // Render the gui
}

Public Functions Documentation

function GuiLabel

ffw::GuiLabel::GuiLabel (
    GuiWindow * context,
    const std::string & label
)

function ~GuiLabel

virtual ffw::GuiLabel::~GuiLabel () = default

function setLabel

void ffw::GuiLabel::setLabel (
    const std::string & label
)

function getLabel

const std::string & ffw::GuiLabel::getLabel () const

function getMinimumWrapSize

virtual ffw::Pointf ffw::GuiLabel::getMinimumWrapSize ()

Implements GuiWidget::getMinimumWrapSize

function setStyle

void ffw::GuiLabel::setStyle (
    const GuiLabel::Style * style,
    bool defaults = false
)

The documentation for this class was generated from the following file: include/ffw/gui/guilabel.h