12#include "platforms/ui_defs.h"
14#ifndef FASTLED_HAS_UI_SLIDER
15#define FASTLED_HAS_UI_SLIDER 0
18#ifndef FASTLED_HAS_UI_BUTTON
19#define FASTLED_HAS_UI_BUTTON 0
22#ifndef FASTLED_HAS_UI_CHECKBOX
23#define FASTLED_HAS_UI_CHECKBOX 0
26#ifndef FASTLED_HAS_UI_NUMBER_FIELD
27#define FASTLED_HAS_UI_NUMBER_FIELD 0
30#ifndef FASTLED_HAS_UI_TITLE
31#define FASTLED_HAS_UI_TITLE 0
34#ifndef FASTLED_HAS_UI_DESCRIPTION
35#define FASTLED_HAS_UI_DESCRIPTION 0
38#ifndef FASTLED_HAS_UI_AUDIO
39#define FASTLED_HAS_UI_AUDIO 0
46#if !FASTLED_HAS_UI_SLIDER
52 float max = 255,
float step = -1.f)
68 operator float()
const {
return mValue; }
69 operator uint8_t()
const {
return static_cast<uint8_t
>(
mValue); }
70 operator uint16_t()
const {
return static_cast<uint16_t
>(
mValue); }
71 operator int()
const {
return static_cast<int>(
mValue); }
72 template <
typename T> T
as()
const {
return static_cast<T
>(
mValue); }
95#if !FASTLED_HAS_UI_BUTTON
104 operator bool()
const {
return false; }
114#if !FASTLED_HAS_UI_CHECKBOX
123 explicit operator int()
const {
return mValue ? 1 : 0; }
141#if !FASTLED_HAS_UI_NUMBER_FIELD
153 operator double()
const {
return mValue; }
154 operator int()
const {
return static_cast<int>(
mValue); }
172#if !FASTLED_HAS_UI_TITLE
182#if !FASTLED_HAS_UI_DESCRIPTION
192#if !FASTLED_HAS_UI_AUDIO
UIAudioImpl(const char *name)
void setValue(bool value)
UICheckboxImpl & operator=(int value)
UICheckboxImpl(const char *name, bool value=false)
UICheckboxImpl & operator=(bool value)
UIDescriptionImpl(const char *name)
UINumberFieldImpl & operator=(int value)
UINumberFieldImpl & operator=(double value)
UINumberFieldImpl(const char *name, double value, double min=0, double max=100)
void setValue(double value)
UISliderImpl & operator=(int value)
void setValue(float value)
UISliderImpl & operator=(float value)
UISliderImpl(const char *name, float value=128.0f, float min=1, float max=255, float step=-1.f)
UITitleImpl(const char *name)
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.
#define FASTLED_UNUSED(x)