~aleteoryx/muditaos

ref: 72b06448e1c9ecbbc415f7b63cbfe49400e48d2c muditaos/module-apps/apps-common/windows/BrightnessWindow.hpp -rw-r--r-- 1.1 KiB
72b06448 — Lefucjusz [MOS-647][MOS-671] BT volume control fixes 3 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
36
37
38
39
40
41
42
43
// 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 <apps-common/ApplicationCommon.hpp>
#include "AppWindow.hpp"
#include "apps-common/widgets/BarGraph.hpp"
#include "apps-common/widgets/BightnessBox.hpp"
#include <functional>

namespace gui
{
    class BrightnessWindow : public AppWindow
    {

      protected:
        Rect *border                  = nullptr;
        BrightnessBox *brightnessText = nullptr;
        HBarGraph *brightnessBar      = nullptr;

      public:
        BrightnessWindow(app::ApplicationCommon *app, const std::string &name);

        ~BrightnessWindow() override;

        void addBox();

        void addBrightnessText();

        void addBrightnessBar();

        void onBeforeShow(ShowMode mode, SwitchData *data) override;

        void rebuild() override;

        void buildInterface() override;

        void destroyInterface() override;

        bool onInput(const gui::InputEvent &inputEvent) override;
    };
}; // namespace gui