class ffw::GuiProgressBar
Class List > ffw :: GuiProgressBar
Create a progress bar widget. More...
Inherits the following classes: ffw::GuiWidget
Classes
Type | Name |
---|---|
struct | Style |
Protected Attributes
Type | Name |
---|---|
const GuiWidget::Style * | innerStyle |
Public Functions
Type | Name |
---|---|
GuiProgressBar (GuiWindow * context) | |
virtual | ~GuiProgressBar () = default |
virtual ffw::Pointf | getMinimumWrapSize () override |
void | setValue (const float value) |
float | getValue () const |
void | setInnerStyleGroup (const GuiWidget::Style * style) |
const GuiWidget::Style * | getInnerStyleGroup () const |
void | setStyle (const GuiProgressBar::Style * style, bool defaults = false) |
Detailed Description
auto gui = ffw::GuiWindowNanoVG(nvg);
auto root = gui.getLayout();
auto progress = new ffw::GuiProgressBar(&gui);
progress->setSize(ffw::guiPercent(100.0f), ffw::guiPixels(25.0f));
progress->setValue(75.0f);
auto percent = progress->getValue(); // Programatically get value
root->addWidget(progress);
// Do not free the created widgets! They will be deleted by the gui window!
while(true){
// Render the gui
}
Protected Attributes Documentation
variable innerStyle
const GuiWidget::Style* ffw::GuiProgressBar::innerStyle;
Public Functions Documentation
function GuiProgressBar
ffw::GuiProgressBar::GuiProgressBar (
GuiWindow * context
)
function ~GuiProgressBar
virtual ffw::GuiProgressBar::~GuiProgressBar () = default
function getMinimumWrapSize
virtual ffw::Pointf ffw::GuiProgressBar::getMinimumWrapSize ()
Implements GuiWidget::getMinimumWrapSize
function setValue
void ffw::GuiProgressBar::setValue (
const float value
)
function getValue
float ffw::GuiProgressBar::getValue () const
function setInnerStyleGroup
void ffw::GuiProgressBar::setInnerStyleGroup (
const GuiWidget::Style * style
)
function getInnerStyleGroup
const GuiWidget::Style * ffw::GuiProgressBar::getInnerStyleGroup () const
function setStyle
void ffw::GuiProgressBar::setStyle (
const GuiProgressBar::Style * style,
bool defaults = false
)
The documentation for this class was generated from the following file: include/ffw/gui/guiprogressbar.h