~aleteoryx/muditaos

ref: 7933bd0fef39007dcd22f90cfa8656db56912a54 muditaos/module-apps/application-phonebook/widgets/OutputLinesTextWithLabelWidget.hpp -rw-r--r-- 1.1 KiB
7933bd0f — Przemyslaw Brudny [EGD-7065] Phonebook Edit Contact small style update 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
36
// 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 "application-phonebook/data/PhonebookInternals.hpp"
#include "application-phonebook/data/PhonebookItemData.hpp"
#include "application-phonebook/widgets/ContactListItem.hpp"

#include <ListItem.hpp>
#include <Text.hpp>

namespace gui
{
    class OutputLinesTextWithLabelWidget : public ContactListItem
    {
        phonebookInternals::ListItemName listItemName;

      public:
        OutputLinesTextWithLabelWidget(phonebookInternals::ListItemName listItemName);

        ~OutputLinesTextWithLabelWidget() override = default;
        VBox *vBox                                 = nullptr;
        Label *titleLabel                          = nullptr;
        Text *multilineText                        = nullptr;

        auto handleRequestResize(const Item *, Length request_w, Length request_h) -> Size override;

      private:
        void applyItemNameSpecificSettings();

        void addressHandler();
        void noteHandler();
    };

} /* namespace gui */