FastLED 3.9.15
Loading...
Searching...
No Matches
number_field.cpp.hpp
Go to the documentation of this file.
3#include "fl/stl/noexcept.h"
4
7
8namespace fl {
9
10UINumberField::UINumberField(const char *name, double value, double min, double max) FL_NOEXCEPT
11 : mImpl(name, value, min, max), mListener(this), mLastFrameValue(0), mLastFrameValueValid(false) {
12 mListener.addToEngineEventsOnce();
13}
14
16
18 UINumberField &owner = *mOwner;
19 if (!owner.mLastFrameValueValid) {
20 owner.mLastFrameValue = owner.value();
21 owner.mLastFrameValueValid = true;
22 return;
23 }
24 double value = owner.value();
25 if (value != owner.mLastFrameValue) {
26 owner.mCallbacks.invoke(owner);
27 owner.mLastFrameValue = value;
28 }
29}
30
31} // namespace fl
32
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
Memory functions are available in fl:: namespace via fl/stl/cstring.h Using declarations cannot work ...
Definition math.h:71
constexpr common_type_t< T, U > max(T a, U b) FL_NOEXCEPT
Definition math.h:75
~UINumberField() FL_NOEXCEPT
UINumberField(const char *name, double value, double min=0, double max=100) FL_NOEXCEPT
constexpr int type_rank< T >::value
Base definition for an LED controller.
Definition crgb.hpp:179
#define FL_DISABLE_WARNING(warning)
#define FL_DISABLE_WARNING_PUSH
#define FL_DISABLE_WARNING_POP
#define FL_NOEXCEPT
void onBeginFrame() FL_NOEXCEPT override