#pragma once #include "Widget.hpp" class IconWidget : public Widget { public: explicit IconWidget(const WidgetConfig& config); lv_obj_t* create(lv_obj_t* parent) override; void applyStyle() override; // KNX updates (can change icon color based on state) void onKnxSwitch(bool value) override; private: lv_obj_t* iconLabel_ = nullptr; // Helper to encode unicode codepoint to UTF-8 static int encodeUtf8(uint32_t codepoint, char* buf); };