mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-02-06 12:22:00 -05:00
31 lines
904 B
C++
31 lines
904 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "SpinBox.hpp"
|
|
#include "OptionWindow.hpp"
|
|
#include "Application.hpp"
|
|
|
|
#include <module-apps/options/type/OptionSetting.hpp>
|
|
|
|
namespace gui
|
|
{
|
|
class SpinBoxOptionSettings : public option::OptionSettings
|
|
{
|
|
public:
|
|
SpinBoxOptionSettings(UTF8 text,
|
|
uint8_t value,
|
|
uint8_t maxValue,
|
|
std::function<bool(uint8_t)> updateCallback,
|
|
std::function<bool(Item &)> focusChangedCallback = nullptr);
|
|
|
|
[[nodiscard]] auto build() const -> ListItem * override;
|
|
|
|
private:
|
|
std::function<bool(uint8_t)> updateCallback;
|
|
std::uint8_t maxValue;
|
|
std::uint8_t value;
|
|
};
|
|
} // namespace gui
|