~aleteoryx/muditaos

ref: 7597d388526c3f1d3c666964514db33bfcd6cf4d muditaos/module-apps/apps-common/windows/OptionWindow.hpp -rw-r--r-- 1.2 KiB
7597d388 — Przemyslaw Brudny [EGD-7857] Renamed BottomBar to NavBar 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include "ApplicationCommon.hpp"
#include "AppWindow.hpp"
#include "OptionsList.hpp"
#include "OptionWindowName.hpp"

namespace gui
{
    ///  @brief Options window generating various options based on provided Option list.
    ///
    ///  Options GUI window with ListView populated accordingly to provided options in window constructor.
    ///

    class OptionWindow : public AppWindow, protected OptionsList<ListView>
    {
      private:
        const std::string windowTitle;

      public:
        OptionWindow(app::ApplicationCommon *app, const std::string &name, const std::string &windowTitle = "");
        OptionWindow(app::ApplicationCommon *app,
                     const std::string &name,
                     std::list<Option> options,
                     const std::string &windowTitle = "");

        void onBeforeShow(ShowMode mode, SwitchData *data) override;
        void onClose(CloseReason reason) override;
        void rebuild() override;
        void buildInterface() override;
    };
}; // namespace gui