MCPcopy Create free account
hub / github.com/FastLED/FastLED / JsonDropdownImpl

Method JsonDropdownImpl

src/platforms/shared/ui/json/dropdown.cpp.hpp:65–77  ·  view source on GitHub ↗

Constructor with array of options and count

Source from the content-addressed store, hash-verified

63
64// Constructor with array of options and count
65JsonDropdownImpl::JsonDropdownImpl(const fl::string &name, const fl::string* options, size_t count) FL_NOEXCEPT {
66 // Convert options to fl::vector
67 fl::vector<fl::string> optionsVector;
68 for (size_t i = 0; i < count; ++i) {
69 optionsVector.push_back(options[i]);
70 }
71
72 // Create an instance of the new internal class
73 mInternal = fl::make_shared<JsonUiDropdownInternal>(name, optionsVector, 0);
74
75 // Register the component with the JsonUiManager
76 addJsonUiComponent(mInternal);
77}
78
79// Constructor with fl::span<fl::string>
80JsonDropdownImpl::JsonDropdownImpl(const fl::string &name, fl::span<fl::string> options) FL_NOEXCEPT {

Callers

nothing calls this directly

Calls 2

addJsonUiComponentFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected