Files
MuditaOS/module-apps/windows/Dialog.hpp
Alek-Mudita 8c39cf8d20 Egd-2546 display contact details (#216)
* [EGD-2546] added contact details/addition per contact type

* [EGD-2546] gui::Option - controlability of displaying arrow

* [EGD-2546] rewritten calllof options window to OptionsWindon framework

* [EGD-2546] minor clean up

* [EGD-2546] clean up

* [EGD-2546] PR fixes

* [EGD-2546] new namespace for gui options

* [EGD-2546] PR fixes

* [EGD-2546] PR fix
2020-03-12 12:35:01 +01:00

37 lines
788 B
C++

#pragma once
#include "AppWindow.hpp"
#include <Text.hpp>
#include <functional>
namespace gui
{
class Dialog : public AppWindow
{
Label *yes = nullptr, *no = nullptr;
Text *text = nullptr;
Image *icon = nullptr;
public:
struct Meta
{
std::string title;
UTF8 icon;
UTF8 text;
std::function<bool()> action;
} meta;
Dialog(app::Application *app, const std::string &name, const Meta &meta);
~Dialog() override = default;
bool onInput(const InputEvent &inputEvent) override;
void buildInterface() override;
void onBeforeShow(ShowMode mode, SwitchData *data) override;
void update(const Meta &meta);
};
}; // namespace gui