mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-05-01 20:35:42 -04:00
[EGD-3572] Application has an instance of Settings - removed from derived apps [EGD-3572] Application is the owner of Settings handling for its windows/widgets [EGD-3572] Settings header moved to service-db public section
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#ifndef MODULE_APPS_APPLICATION_SETTINGS_WINDOWS_LANGUAGEWINDOW_HPP_
|
|
#define MODULE_APPS_APPLICATION_SETTINGS_WINDOWS_LANGUAGEWINDOW_HPP_
|
|
|
|
#include <string>
|
|
#include <functional>
|
|
|
|
#include "AppWindow.hpp"
|
|
#include "gui/widgets/Label.hpp"
|
|
#include "gui/widgets/Image.hpp"
|
|
#include "gui/widgets/Window.hpp"
|
|
#include "gui/widgets/BottomBar.hpp"
|
|
#include "gui/widgets/TopBar.hpp"
|
|
|
|
namespace app
|
|
{
|
|
class LanguageSetter;
|
|
}
|
|
|
|
namespace gui
|
|
{
|
|
|
|
class LanguageWindow : public AppWindow
|
|
{
|
|
protected:
|
|
std::vector<gui::Item *> options;
|
|
|
|
gui::Item *addOptionLabel(const std::string &text, std::function<bool(Item &)> activatedCallback);
|
|
app::LanguageSetter *setter;
|
|
|
|
public:
|
|
LanguageWindow(app::Application *app, app::LanguageSetter *setter);
|
|
|
|
void onBeforeShow(ShowMode mode, SwitchData *data) override;
|
|
void rebuild() override;
|
|
void buildInterface() override;
|
|
void destroyInterface() override;
|
|
|
|
private:
|
|
utils::LangLoader loader;
|
|
void invalidate() noexcept;
|
|
};
|
|
} /* namespace gui */
|
|
|
|
#endif /* MODULE_APPS_APPLICATION_SETTINGS_WINDOWS_LANGUAGEWINDOW_HPP_ */
|