mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-06-27 01:36:59 -04:00
* Moved ApplicationLauncher to separate files - declutering * WindowsStore renamed to WindowsFactory - Store needs to be splitted toavoid antipattern * Options window build dynamically onBeforeShow * Dialog windows dynamically built
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "../Application.hpp"
|
|
#include "AppWindow.hpp"
|
|
#include "PageLayout.hpp"
|
|
#include <functional>
|
|
#include "OptionsWindowOption.hpp"
|
|
|
|
namespace gui
|
|
{
|
|
class OptionWindow : public AppWindow
|
|
{
|
|
|
|
protected:
|
|
PageLayout *body = nullptr;
|
|
std::list<Option> options;
|
|
void addOptions(std::list<Option> &options);
|
|
void addOptions(std::list<Option> &&options);
|
|
|
|
public:
|
|
OptionWindow(app::Application *app, const std::string &name);
|
|
OptionWindow(app::Application *app, const std::string &name, std::list<Option> options);
|
|
~OptionWindow() override;
|
|
|
|
void addOptionLabel(const UTF8 &text, std::function<bool(Item &)> activatedCallback, Arrow arrow);
|
|
void setOptions(std::list<Option> options)
|
|
{
|
|
this->options = std::move(options);
|
|
}
|
|
void clearOptions();
|
|
|
|
void onBeforeShow(ShowMode mode, SwitchData *data) override;
|
|
void rebuild() override;
|
|
void buildInterface() override;
|
|
void destroyInterface() override;
|
|
};
|
|
}; // namespace gui
|