21 lines
413 B
C++
21 lines
413 B
C++
#pragma once
|
|
|
|
#include "Widget.hpp"
|
|
|
|
class ButtonWidget : public Widget {
|
|
public:
|
|
explicit ButtonWidget(const WidgetConfig& config);
|
|
~ButtonWidget() override;
|
|
|
|
lv_obj_t* create(lv_obj_t* parent) override;
|
|
void applyStyle() override;
|
|
|
|
// Check if button is in checked state
|
|
bool isChecked() const;
|
|
|
|
private:
|
|
lv_obj_t* label_ = nullptr;
|
|
|
|
static void clickCallback(lv_event_t* e);
|
|
};
|