~aleteoryx/muditaos

ref: 5398907b6f137be5c1a35a622c7d51bc8a3595c0 muditaos/module-gui/gui/widgets/text/TextConstants.hpp -rw-r--r-- 1.3 KiB
5398907b — Przemyslaw Brudny [EGD-7158] Added text paste into Phonebook 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// 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 <limits>

namespace gui
{
    namespace text
    {
        constexpr auto npos                     = std::numeric_limits<unsigned int>::max();
        const char newline                      = '\n';
        const unsigned int word_detection_range = 10;
    }; // namespace text

    enum class TextLimitType
    {
        MaxSize,
        MaxLines,
        MaxSignsCount
    };

    struct TextLimit
    {
        TextLimitType limitType;
        unsigned int limitValue;
    };

    enum class CursorStartPosition
    {
        DocumentBegin,
        Offset,
        DocumentEnd
    };

    enum class LinesDrawStop
    {
        None,
        OutOfText,
        OutOfSpace
    };

    enum class ExpandMode
    {
        Up,
        Down,
        None // default
    };

    enum class EditMode
    {
        Browse,
        Edit,
        Scroll,
    };

    enum class TextType
    {
        SingleLine = 1,
        MultiLine
    };

    enum class AdditionBound
    {
        CanAddAll,
        CanAddPart,
        CantAdd
    };

    enum class AdditionType
    {
        perChar,
        perBlock
    };

} // namespace gui