~aleteoryx/muditaos

ref: 0823d82e5141f44812c54debf07245d0ca746124 muditaos/module-apps/application-desktop/windows/PinLockBaseWindow.hpp -rw-r--r-- 1.2 KiB
0823d82e — Radoslaw Wicik [EGD-3743] Update copyrights in fies - add empty line after license 5 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
#pragma once

#include "AppWindow.hpp"
#include "Text.hpp"

namespace gui
{
    class PinLock;
}

namespace gui
{
    class PinLockBaseWindow : public AppWindow
    {
      public:
        PinLockBaseWindow(app::Application *app, std::string name, PinLock &lock) : AppWindow(app, name), lock(lock)
        {}
        void build();
        void buildInfoText(unsigned int textHight);
        void buildPinLabels(gui::Label *labelBox, unsigned int pinSize, unsigned int singleLabelWidth);
        void buildImages(const std::string &lockImg, const std::string &infoImg);
        void setBottomBarWidgetsActive(bool left, bool center, bool right);
        void setImagesVisible(bool lockImg, bool infoImg);
        void setBottomBarWidgetText(BottomBar::Side side, const UTF8 &txt);
        void clearPinLabels();

        gui::Label *titleLabel = nullptr;
        gui::Text *infoText    = nullptr;
        gui::Label *pinLabel   = nullptr;
        std::vector<gui::Label *> pinLabels;
        gui::Image *lockImage = nullptr;
        gui::Image *infoImage = nullptr;

        PinLock &lock;

      private:
        void buildBottomBar();
        void buildTopBar();
        void buildTitleLabel();
    };
} // namespace gui