FastLED 3.10.8
Loading...
Searching...
No Matches
help.h
Go to the documentation of this file.
1#pragma once
2
3#include "fl/stl/string.h"
4#include "fl/stl/compiler_control.h" // IWYU pragma: keep
5#include "fl/stl/noexcept.h"
6#include "fl/ui/element.h"
7#include "platforms/ui_defs.h"
8
9#ifndef FASTLED_HAS_UI_HELP
10#define FASTLED_HAS_UI_HELP 0
11#endif
12
13namespace fl {
14
15#if !FASTLED_HAS_UI_HELP
17 public:
20
21 // Stub method for group setting (does nothing on non-WASM platforms)
22 void setGroup(const fl::string& groupName) { FASTLED_UNUSED(groupName); }
23
24 // Stub method for accessing markdown content
25 const fl::string& markdownContent() const { return mContent; }
26
27 private:
29};
30#endif
31
32class UIHelp : public UIElement {
33 public:
37
38 // Override setGroup to also update the implementation
39 void setGroup(const fl::string& groupName) FL_NO_EXCEPT override {
40 UIElement::setGroup(groupName);
41 // Update the implementation's group if it has the method (WASM platforms)
42 mImpl.setGroup(groupName);
43 }
44
45 // Access to the markdown content
46 const fl::string& markdownContent() const FL_NO_EXCEPT { return mImpl.markdownContent(); }
47
48 protected:
50};
51
52} // namespace fl
virtual void setGroup(const fl::string &groupName) FL_NO_EXCEPT
Definition element.h:31
UIElement() FL_NO_EXCEPT
FL_NO_COPY(UIHelp)
UIHelpImpl mImpl
Definition help.h:49
const fl::string & markdownContent() const FL_NO_EXCEPT
Definition help.h:46
UIHelp(const char *markdownContent) FL_NO_EXCEPT
Definition help.cpp.hpp:6
void setGroup(const fl::string &groupName) FL_NO_EXCEPT override
Definition help.h:39
~UIHelp() FL_NO_EXCEPT
Definition help.cpp.hpp:7
void setGroup(const fl::string &groupName)
Definition help.h:22
const fl::string & markdownContent() const
Definition help.h:25
UIHelpImpl(const char *markdownContent)
Definition help.h:18
fl::string mContent
Definition help.h:28
~UIHelpImpl() FL_NO_EXCEPT
Definition help.h:19
#define FASTLED_UNUSED(x)
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
Base definition for an LED controller.
Definition crgb.hpp:179