// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #pragma once #include "BoxLayout.hpp" #include "Image.hpp" #include namespace gui { class CheckBox : public HBox { Image *image = nullptr; std::function bottomBarTemporaryMode = nullptr; std::function bottomBarRestoreFromTemporaryMode = nullptr; bool textOnLeft = true; void applyCallbacks(); public: CheckBox(Item *parent, const uint32_t &x, const uint32_t &y, const uint32_t &w, const uint32_t &h, std::function bottomBarTemporaryMode = nullptr, std::function bottomBarRestoreFromTemporaryMode = nullptr, bool textOnLeft = true); void setImageVisible(bool state); bool isChecked(); }; } /* namespace gui */