Skip to content

api/ui.h

Namespaces

Name
cvedia
cvedia::rt
API for controlling the server and lifecycle management of runtime instances.
cvedia::rt::iface
cvedia::rt::api
cvedia::rt::api::ui

Functions

Name
bool startConfigTable(std::string const & label, bool showHeader, int headerFlags)
bool configSliderInt(std::string const & label, iface::Instance * inst, std::string const & keyPath, int minValue, int maxValue, int defaultValue, int * retValue =nullptr)
bool configSliderFloat(std::string const & label, iface::Instance * inst, std::string const & keyPath, float minValue, float maxValue, float defaultValue, float * retValue =nullptr)
bool configCheckbox(std::string const & label, iface::Instance * inst, std::string const & keyPath, bool defaultValue, bool * retValue =nullptr)
bool configComboBox(std::string const & label, iface::Instance * inst, std::string const & keyPath, std::vector< std::pair< std::string, std::string > > const & items, std::string defaultValue, std::string * retValue =nullptr)
bool configText(std::string const & label, iface::Instance * inst, std::string const & keyPath, std::string defaultValue, std::string * retValue =nullptr)
bool configColor(std::string const & label, iface::Instance * inst, std::string const & keyPath, std::vector< float > const & defaultValue, std::vector< float > * retValue =nullptr)
void configEmptyLine(std::string const & text)
void endConfigTable()
bool setLoadingBar(std::string title, int value)
std::pair< std::string, int > getLoadingBar()
void setupNotificationSystem(std::function< bool(char const *, char const *, char const *, int)> && notifier)
bool showNotification(char const * type, char const * title, char const * message, char const * messageArg, int durationMs)

Functions Documentation

function startConfigTable

bool startConfigTable(
    std::string const & label,
    bool showHeader,
    int headerFlags
)

function configSliderInt

bool configSliderInt(
    std::string const & label,
    iface::Instance * inst,
    std::string const & keyPath,
    int minValue,
    int maxValue,
    int defaultValue,
    int * retValue =nullptr
)

function configSliderFloat

bool configSliderFloat(
    std::string const & label,
    iface::Instance * inst,
    std::string const & keyPath,
    float minValue,
    float maxValue,
    float defaultValue,
    float * retValue =nullptr
)

function configCheckbox

bool configCheckbox(
    std::string const & label,
    iface::Instance * inst,
    std::string const & keyPath,
    bool defaultValue,
    bool * retValue =nullptr
)

function configComboBox

bool configComboBox(
    std::string const & label,
    iface::Instance * inst,
    std::string const & keyPath,
    std::vector< std::pair< std::string, std::string > > const & items,
    std::string defaultValue,
    std::string * retValue =nullptr
)

function configText

bool configText(
    std::string const & label,
    iface::Instance * inst,
    std::string const & keyPath,
    std::string defaultValue,
    std::string * retValue =nullptr
)

function configColor

bool configColor(
    std::string const & label,
    iface::Instance * inst,
    std::string const & keyPath,
    std::vector< float > const & defaultValue,
    std::vector< float > * retValue =nullptr
)

function configEmptyLine

void configEmptyLine(
    std::string const & text
)

function endConfigTable

void endConfigTable()

function setLoadingBar

bool setLoadingBar(
    std::string title,
    int value
)

function getLoadingBar

std::pair< std::string, int > getLoadingBar()

function setupNotificationSystem

void setupNotificationSystem(
    std::function< bool(char const *, char const *, char const *, int)> && notifier
)

function showNotification

bool showNotification(
    char const * type,
    char const * title,
    char const * message,
    char const * messageArg,
    int durationMs
)