~aleteoryx/muditaos

ref: 890e4e8215a9f5137386893c2376429c78c974a7 muditaos/module-gui/gui/widgets/text/TextConstants.hpp -rw-r--r-- 1.2 KiB
890e4e82 — Adam Dobrowolski [EGD-7975] Added more cores and general ccache 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
// 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
    };

} // namespace gui