Files
MuditaOS/module-gui/gui/widgets/CheckBox.hpp
Adam 64db7d8327 EDG-3585 Small fixup for refresh & cleanup in buildDrawLists (#916)
* EGD-3585 Minor refresh fixup&  Normalised buildDrawList everywhere
2020-10-30 10:13:47 +01:00

35 lines
1.2 KiB
C++

// 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 <utf8/UTF8.hpp>
namespace gui
{
class CheckBox : public HBox
{
Image *image = nullptr;
std::function<void(const UTF8 &text)> bottomBarTemporaryMode = nullptr;
std::function<void()> 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<void(const UTF8 &text)> bottomBarTemporaryMode = nullptr,
std::function<void()> bottomBarRestoreFromTemporaryMode = nullptr,
bool textOnLeft = true);
void setImageVisible(bool state);
bool isChecked();
};
} /* namespace gui */