~aleteoryx/muditaos

1520a9a8ecdc68a4e29dfad38eabca6af4ab4e12 — PrzeBrudny 5 years ago 4aef4d8
[EGD-4687] Text enum names cleanup. (#1142)

Change enum names to CamelCase.
40 files changed, 208 insertions(+), 206 deletions(-)

M module-apps/application-calculator/windows/CalculatorMainWindow.cpp
M module-apps/application-calendar/widgets/EventDateItem.cpp
M module-apps/application-calendar/widgets/EventDetailDescriptionItem.cpp
M module-apps/application-calendar/widgets/EventTimeItem.cpp
M module-apps/application-calendar/widgets/TextWithLabelItem.cpp
M module-apps/application-desktop/widgets/DesktopInputWidget.cpp
M module-apps/application-desktop/windows/MmiPullWindow.cpp
M module-apps/application-desktop/windows/MmiPushWindow.cpp
M module-apps/application-meditation/widgets/MeditationTimer.cpp
M module-apps/application-messages/widgets/SMSInputWidget.cpp
M module-apps/application-messages/widgets/SMSOutputWidget.cpp
M module-apps/application-messages/windows/NewMessage.cpp
M module-apps/application-music-player/widgets/SongItem.cpp
M module-apps/application-music-player/windows/MusicPlayerEmptyWindow.cpp
M module-apps/application-notes/widgets/NotesItem.cpp
M module-apps/application-notes/windows/NoteEditWindow.cpp
M module-apps/application-notes/windows/NotePreviewWindow.cpp
M module-apps/application-phonebook/widgets/InformationWidget.cpp
M module-apps/application-phonebook/widgets/InputLinesWithLabelIWidget.cpp
M module-apps/application-phonebook/widgets/NumberWithIconsWidget.cpp
M module-apps/application-phonebook/widgets/OutputLinesTextWithLabelWidget.cpp
M module-apps/application-settings/windows/SettingsChange.cpp
M module-apps/application-settings/windows/UITestWindow.cpp
M module-apps/application-settings/windows/USSDWindow.cpp
M module-apps/widgets/InputBox.cpp
M module-apps/windows/Dialog.cpp
M module-apps/windows/Options.cpp
M module-gui/gui/widgets/Icon.cpp
M module-gui/gui/widgets/Lines.cpp
M module-gui/gui/widgets/Lines.hpp
M module-gui/gui/widgets/Text.cpp
M module-gui/gui/widgets/Text.hpp
M module-gui/gui/widgets/TextBubble.cpp
M module-gui/gui/widgets/TextConstants.hpp
M module-gui/gui/widgets/TextCursor.cpp
M module-gui/gui/widgets/TextCursor.hpp
M module-gui/gui/widgets/TextFixedSize.cpp
M module-gui/gui/widgets/TextLineCursor.cpp
M module-gui/test/test-catch-text/test-gui-Text.cpp
M module-gui/test/test-catch-text/test-gui-TextLineCursor.cpp
M module-apps/application-calculator/windows/CalculatorMainWindow.cpp => module-apps/application-calculator/windows/CalculatorMainWindow.cpp +1 -1
@@ 40,7 40,7 @@ namespace gui
        mathOperationInput->setInputMode(new InputMode({InputMode::digit}));
        mathOperationInput->setPenFocusWidth(style::window::default_border_focus_w);
        mathOperationInput->setPenWidth(style::window::default_border_rect_no_focus);
        mathOperationInput->setEditMode(gui::EditMode::EDIT);
        mathOperationInput->setEditMode(gui::EditMode::Edit);

        mathBox = new gui::MathOperationsBox(this,
                                             style::calculator::window::math_box_offset_top,

M module-apps/application-calendar/widgets/EventDateItem.cpp => module-apps/application-calendar/widgets/EventDateItem.cpp +1 -1
@@ 93,7 93,7 @@ namespace gui
        item->setInputMode(new InputMode({InputMode::digit}));
        item->setPenFocusWidth(style::window::default_border_focus_w);
        item->setPenWidth(style::window::default_border_rect_no_focus);
        item->setEditMode(gui::EditMode::EDIT);
        item->setEditMode(gui::EditMode::Edit);
    }

    void EventDateItem::applyCallbacks()

M module-apps/application-calendar/widgets/EventDetailDescriptionItem.cpp => module-apps/application-calendar/widgets/EventDetailDescriptionItem.cpp +1 -1
@@ 57,7 57,7 @@ namespace gui
                                    2 * style::window::calendar::item::eventDetail::label_h);
        description->setFont(style::window::font::big);
        description->setAlignment(gui::Alignment{gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Center});
        description->setEditMode(EditMode::BROWSE);
        description->setEditMode(EditMode::Browse);

        focusChangedCallback = [&](Item &item) {
            setFocusItem(focus ? vBox : nullptr);

M module-apps/application-calendar/widgets/EventTimeItem.cpp => module-apps/application-calendar/widgets/EventTimeItem.cpp +2 -2
@@ 49,7 49,7 @@ namespace gui
        hourInput->setInputMode(new InputMode({InputMode::digit}));
        hourInput->setPenFocusWidth(style::window::default_border_focus_w);
        hourInput->setPenWidth(style::window::default_border_rect_no_focus);
        hourInput->setEditMode(gui::EditMode::EDIT);
        hourInput->setEditMode(gui::EditMode::Edit);

        colonLabel = new gui::Label(hBox, 0, 0, 0, 0);
        colonLabel->setMinimumSize(style::window::calendar::item::eventTime::separator,


@@ 68,7 68,7 @@ namespace gui
        minuteInput->setInputMode(new InputMode({InputMode::digit}));
        minuteInput->setPenFocusWidth(style::window::default_border_focus_w);
        minuteInput->setPenWidth(style::window::default_border_rect_no_focus);
        minuteInput->setEditMode(gui::EditMode::EDIT);
        minuteInput->setEditMode(gui::EditMode::Edit);

        descriptionLabel->setText(description);


M module-apps/application-calendar/widgets/TextWithLabelItem.cpp => module-apps/application-calendar/widgets/TextWithLabelItem.cpp +1 -1
@@ 46,7 46,7 @@ namespace gui
            [=]() { selectSpecialCharacter(); }));
        textInput->setPenFocusWidth(style::window::default_border_focus_w);
        textInput->setPenWidth(style::window::default_border_rect_no_focus);
        textInput->setEditMode(gui::EditMode::EDIT);
        textInput->setEditMode(gui::EditMode::Edit);

        focusChangedCallback = [&](Item &item) {
            setFocusItem(focus ? vBox : nullptr);

M module-apps/application-desktop/widgets/DesktopInputWidget.cpp => module-apps/application-desktop/widgets/DesktopInputWidget.cpp +2 -2
@@ 49,7 49,7 @@ namespace gui
        body = new HBox(this, 0, 0, 0, 0);
        body->setEdges(RectangleEdge::Bottom);
        body->setMaximumSize(style::window::default_body_width, style::desktop::body::body_height);
        inputText = new gui::Text(body, 0, 0, 0, 0, "", ExpandMode::EXPAND_NONE);
        inputText = new gui::Text(body, 0, 0, 0, 0, "", ExpandMode::None);
        inputText->setMaximumSize(style::desktop::inputText::default_input_w, style::desktop::inputText::max_input_h);
        inputText->setMinimumSize(style::desktop::inputText::default_input_w,
                                  style::desktop::inputText::default_input_h);


@@ 59,7 59,7 @@ namespace gui
        inputText->setPenFocusWidth(style::window::default_border_focus_w);
        inputText->setPenWidth(style::window::default_border_focus_w);
        inputText->setEdges(gui::RectangleEdge::None);
        inputText->setEditMode(EditMode::EDIT);
        inputText->setEditMode(EditMode::Edit);
        setFocusItem(inputText);

        inputText->activatedCallback = [=](gui::Item &) {

M module-apps/application-desktop/windows/MmiPullWindow.cpp => module-apps/application-desktop/windows/MmiPullWindow.cpp +2 -2
@@ 43,8 43,8 @@ MmiPullWindow::MmiPullWindow(app::Application *app, const std::string &name) : g
    bottomBar->setText(BottomBar::Side::RIGHT, utils::localize.get(style::strings::common::back));
    text = new Text(
        this, style::desktop::text::x, style::desktop::text::y, style::desktop::text::w, style::desktop::text::h);
    text->setTextType(TextType::MULTI_LINE);
    text->setEditMode(EditMode::BROWSE);
    text->setTextType(TextType::MultiLine);
    text->setEditMode(EditMode::Browse);
    text->setEdges(RectangleEdge::None);
    text->setFont(style::window::font::medium);
    text->setAlignment(gui::Alignment(gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Top));

M module-apps/application-desktop/windows/MmiPushWindow.cpp => module-apps/application-desktop/windows/MmiPushWindow.cpp +2 -2
@@ 38,8 38,8 @@ MmiPushWindow::MmiPushWindow(app::Application *app, const std::string &name) : g
    icon->set("info_big_circle_W_G");
    text = new Text(
        this, style::desktop::text::x, style::desktop::text::y, style::desktop::text::w, style::desktop::text::h);
    text->setTextType(TextType::MULTI_LINE);
    text->setEditMode(EditMode::BROWSE);
    text->setTextType(TextType::MultiLine);
    text->setEditMode(EditMode::Browse);
    text->setEdges(RectangleEdge::None);
    text->setFont(style::window::font::medium);
    text->setAlignment(gui::Alignment(gui::Alignment::Horizontal::Center, gui::Alignment::Vertical::Center));

M module-apps/application-meditation/widgets/MeditationTimer.cpp => module-apps/application-meditation/widgets/MeditationTimer.cpp +1 -1
@@ 48,7 48,7 @@ namespace gui
        timer->setEdges(RectangleEdge::None);
        timer->setFont(style::window::font::supersizemelight);
        timer->setAlignment(Alignment(gui::Alignment::Horizontal::Center, gui::Alignment::Vertical::Center));
        timer->setEditMode(EditMode::BROWSE);
        timer->setEditMode(EditMode::Browse);

        onReset();
    }

M module-apps/application-messages/widgets/SMSInputWidget.cpp => module-apps/application-messages/widgets/SMSInputWidget.cpp +1 -1
@@ 29,7 29,7 @@ namespace gui

        deleteByList = false;

        inputText = new gui::Text(body, 0, 0, 0, 0, "", ExpandMode::EXPAND_UP);
        inputText = new gui::Text(body, 0, 0, 0, 0, "", ExpandMode::Up);
        inputText->setMaximumSize(style::messages::smsInput::default_input_w, style::messages::smsInput::max_input_h);
        inputText->setMinimumSize(style::messages::smsInput::default_input_w,
                                  style::messages::smsInput::default_input_h);

M module-apps/application-messages/widgets/SMSOutputWidget.cpp => module-apps/application-messages/widgets/SMSOutputWidget.cpp +1 -1
@@ 28,7 28,7 @@ namespace gui
        smsBubble->setMaximumSize(style::messages::smsOutput::sms_max_width,
                                  style::messages::smsOutput::sms_max_height);
        smsBubble->setAlignment(Alignment(Alignment::Vertical::Center));
        smsBubble->setTextType(TextType::MULTI_LINE);
        smsBubble->setTextType(TextType::MultiLine);
        smsBubble->setRadius(style::messages::smsOutput::sms_radius);
        smsBubble->setFont(style::window::font::medium);
        smsBubble->setPenFocusWidth(style::window::default_border_focus_w);

M module-apps/application-messages/windows/NewMessage.cpp => module-apps/application-messages/windows/NewMessage.cpp +2 -2
@@ 216,7 216,7 @@ namespace gui
                                  body->getWidth() - msgStyle::recipientImg::w,
                                  msgStyle::text::h,
                                  "",
                                  ExpandMode::EXPAND_NONE);
                                  ExpandMode::None);
        recipient->setEdges(gui::RectangleEdge::None);
        recipient->setInputMode(new InputMode({InputMode::phone}));
        recipient->setFont(style::window::font::mediumbold);


@@ 243,7 243,7 @@ namespace gui
        labelMessage->setFont(style::window::font::small);
        labelMessage->setAlignment(Alignment(gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Bottom));

        message = new gui::Text(nullptr, 0, 0, body->getWidth(), msgStyle::text::h, "", ExpandMode::EXPAND_UP);
        message = new gui::Text(nullptr, 0, 0, body->getWidth(), msgStyle::text::h, "", ExpandMode::Up);
        message->setMaximumSize(body->getWidth(), body->getHeight());
        message->setEdges(gui::RectangleEdge::Bottom);
        message->setInputMode(new InputMode(

M module-apps/application-music-player/widgets/SongItem.cpp => module-apps/application-music-player/widgets/SongItem.cpp +3 -3
@@ 35,7 35,7 @@ namespace gui
        durationText->setUnderline(false);
        durationText->setFont(style::window::font::verysmall);
        durationText->setAlignment(Alignment(gui::Alignment::Horizontal::Right, gui::Alignment::Vertical::Center));
        durationText->setEditMode(EditMode::BROWSE);
        durationText->setEditMode(EditMode::Browse);
        durationText->setText(duration);

        songText = new TextFixedSize(firstHBox, 0, 0, 0, 0);


@@ 46,7 46,7 @@ namespace gui
        songText->setUnderline(false);
        songText->setFont(style::window::font::verysmallbold);
        songText->setAlignment(Alignment(gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Center));
        songText->setEditMode(EditMode::BROWSE);
        songText->setEditMode(EditMode::Browse);
        songText->setText(songName);

        playedSong = new ImageBox(secondHBox, 0, 0, 0, 0, new Image("messages_error_W_M"));


@@ 61,7 61,7 @@ namespace gui
        authorText->setUnderline(false);
        authorText->setFont(style::window::font::verysmall);
        authorText->setAlignment(Alignment(gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Center));
        authorText->setEditMode(EditMode::BROWSE);
        authorText->setEditMode(EditMode::Browse);
        authorText->setText(authorName);
    }


M module-apps/application-music-player/windows/MusicPlayerEmptyWindow.cpp => module-apps/application-music-player/windows/MusicPlayerEmptyWindow.cpp +2 -2
@@ 39,8 39,8 @@ namespace gui

        text = new Text(this, infoText::x, infoText::y, infoText::w, infoText::h);
        text->setText(utils::localize.get("app_music_player_music_empty_window_notification"));
        text->setTextType(TextType::MULTI_LINE);
        text->setEditMode(EditMode::BROWSE);
        text->setTextType(TextType::MultiLine);
        text->setEditMode(EditMode::Browse);
        text->setEdges(RectangleEdge::None);
        text->setFont(style::window::font::medium);
        text->setAlignment(gui::Alignment(gui::Alignment::Horizontal::Center, gui::Alignment::Vertical::Center));

M module-apps/application-notes/widgets/NotesItem.cpp => module-apps/application-notes/widgets/NotesItem.cpp +2 -2
@@ 42,8 42,8 @@ namespace gui
        item->setAlignment(gui::Alignment{gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Top});
        item->setPenFocusWidth(::style::window::default_border_focus_w);
        item->setPenWidth(::style::window::default_border_rect_no_focus);
        item->setEditMode(gui::EditMode::BROWSE);
        item->setCursorStartPosition(CursorStartPosition::DOCUMENT_BEGIN);
        item->setEditMode(gui::EditMode::Browse);
        item->setCursorStartPosition(CursorStartPosition::DocumentBegin);
        item->setUnderline(false);
        return item;
    }

M module-apps/application-notes/windows/NoteEditWindow.cpp => module-apps/application-notes/windows/NoteEditWindow.cpp +1 -1
@@ 74,7 74,7 @@ namespace app::notes
            [=]() { bottomBarRestoreFromTemporaryMode(); },
            [=]() { selectSpecialCharacter(); }));
        edit->setTextChangedCallback([this](Item &, const UTF8 &text) { setCharactersCount(text.length()); });
        edit->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, MaxCharactersCount);
        edit->setTextLimitType(gui::TextLimitType::MaxSignsCount, MaxCharactersCount);

        bottomBar->setActive(gui::BottomBar::Side::LEFT, true);
        bottomBar->setText(gui::BottomBar::Side::LEFT, utils::localize.get(::style::strings::common::options));

M module-apps/application-notes/windows/NotePreviewWindow.cpp => module-apps/application-notes/windows/NotePreviewWindow.cpp +2 -2
@@ 67,8 67,8 @@ namespace app::notes
        note->setAlignment(gui::Alignment{gui::Alignment::Vertical::Top});
        note->setPenFocusWidth(::style::window::default_border_focus_w);
        note->setPenWidth(::style::window::default_border_rect_no_focus);
        note->setEditMode(gui::EditMode::SCROLL);
        note->setCursorStartPosition(gui::CursorStartPosition::DOCUMENT_BEGIN);
        note->setEditMode(gui::EditMode::Scroll);
        note->setCursorStartPosition(gui::CursorStartPosition::DocumentBegin);

        bottomBar->setActive(gui::BottomBar::Side::LEFT, true);
        bottomBar->setText(gui::BottomBar::Side::LEFT, utils::localize.get(::style::strings::common::options));

M module-apps/application-phonebook/widgets/InformationWidget.cpp => module-apps/application-phonebook/widgets/InformationWidget.cpp +1 -1
@@ 64,7 64,7 @@ namespace gui
                                          phonebookStyle::informationWidget::email_text_h);
                emailText->setMargins(Margins(0, style::margins::very_big, 0, 0));
                emailText->setFont(style::window::font::medium);
                emailText->setEditMode(EditMode::BROWSE);
                emailText->setEditMode(EditMode::Browse);
                emailText->setEdges(RectangleEdge::None);
                emailText->setAlignment(Alignment(gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Center));
                emailText->setText(contact->mail);

M module-apps/application-phonebook/widgets/InputLinesWithLabelIWidget.cpp => module-apps/application-phonebook/widgets/InputLinesWithLabelIWidget.cpp +8 -8
@@ 53,7 53,7 @@ namespace gui
            [=]() { selectSpecialCharacter(); }));
        inputText->setPenFocusWidth(style::window::default_border_focus_w);
        inputText->setPenWidth(style::window::default_border_no_focus_w);
        inputText->setEditMode(EditMode::EDIT);
        inputText->setEditMode(EditMode::Edit);

        applyItemNameSpecificSettings();



@@ 130,7 130,7 @@ namespace gui
    void InputLinesWithLabelIWidget::firstNameHandler()
    {
        titleLabel->setText(utils::localize.get("app_phonebook_new_contact_first_name"));
        inputText->setTextType(TextType::SINGLE_LINE);
        inputText->setTextType(TextType::SingleLine);

        onSaveCallback = [&](std::shared_ptr<ContactRecord> contact) { contact->primaryName = inputText->getText(); };
        onLoadCallback = [&](std::shared_ptr<ContactRecord> contact) { inputText->setText(contact->primaryName); };


@@ 139,7 139,7 @@ namespace gui
    void InputLinesWithLabelIWidget::secondNameHandler()
    {
        titleLabel->setText(utils::localize.get("app_phonebook_new_contact_second_name"));
        inputText->setTextType(TextType::SINGLE_LINE);
        inputText->setTextType(TextType::SingleLine);

        onSaveCallback = [&](std::shared_ptr<ContactRecord> contact) {
            contact->alternativeName = inputText->getText();


@@ 150,7 150,7 @@ namespace gui
    void InputLinesWithLabelIWidget::numberHandler()
    {
        titleLabel->setText(utils::localize.get("app_phonebook_new_contact_number"));
        inputText->setTextType(TextType::SINGLE_LINE);
        inputText->setTextType(TextType::SingleLine);
        inputText->setInputMode(new InputMode({InputMode::phone}));

        onSaveCallback = [&](std::shared_ptr<ContactRecord> contact) {


@@ 169,7 169,7 @@ namespace gui
    void InputLinesWithLabelIWidget::secondNumberHandler()
    {
        titleLabel->setText(utils::localize.get("app_phonebook_new_contact_second_number"));
        inputText->setTextType(TextType::SINGLE_LINE);
        inputText->setTextType(TextType::SingleLine);
        inputText->setInputMode(new InputMode({InputMode::phone}));

        onSaveCallback = [&](std::shared_ptr<ContactRecord> contact) {


@@ 188,7 188,7 @@ namespace gui
    void InputLinesWithLabelIWidget::emailHandler()
    {
        titleLabel->setText(utils::localize.get("app_phonebook_new_contact_email"));
        inputText->setTextType(TextType::SINGLE_LINE);
        inputText->setTextType(TextType::SingleLine);

        onSaveCallback = [&](std::shared_ptr<ContactRecord> contact) { contact->mail = inputText->getText(); };
        onLoadCallback = [&](std::shared_ptr<ContactRecord> contact) { inputText->setText(contact->mail); };


@@ 197,7 197,7 @@ namespace gui
    void InputLinesWithLabelIWidget::addressHandler()
    {
        titleLabel->setText(utils::localize.get("app_phonebook_new_contact_address"));
        inputText->setTextType(TextType::SINGLE_LINE);
        inputText->setTextType(TextType::SingleLine);

        onSaveCallback = [&](std::shared_ptr<ContactRecord> contact) { contact->address = inputText->getText(); };
        onLoadCallback = [&](std::shared_ptr<ContactRecord> contact) { inputText->setText(contact->address); };


@@ 205,7 205,7 @@ namespace gui
    void InputLinesWithLabelIWidget::noteHandler()
    {
        titleLabel->setText(utils::localize.get("app_phonebook_new_contact_note"));
        inputText->setTextType(TextType::SINGLE_LINE);
        inputText->setTextType(TextType::SingleLine);

        onSaveCallback = [&](std::shared_ptr<ContactRecord> contact) { contact->note = inputText->getText(); };
        onLoadCallback = [&](std::shared_ptr<ContactRecord> contact) { inputText->setText(contact->note); };

M module-apps/application-phonebook/widgets/NumberWithIconsWidget.cpp => module-apps/application-phonebook/widgets/NumberWithIconsWidget.cpp +1 -1
@@ 70,7 70,7 @@ namespace gui
                                   phonebookStyle::numbersWithIconsWidget::number_text_h);
        numberText->setFont(font);
        numberText->setEdges(gui::RectangleEdge::None);
        numberText->setEditMode(EditMode::BROWSE);
        numberText->setEditMode(EditMode::Browse);
        numberText->setAlignment(Alignment(gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Center));
        numberText->setText(number.getFormatted());
        numberText->activeItem = false;

M module-apps/application-phonebook/widgets/OutputLinesTextWithLabelWidget.cpp => module-apps/application-phonebook/widgets/OutputLinesTextWithLabelWidget.cpp +1 -1
@@ 37,7 37,7 @@ namespace gui
        multilineText->setEdges(RectangleEdge::None);
        multilineText->setAlignment(Alignment(gui::Alignment::Horizontal::Left, gui::Alignment::Vertical::Bottom));
        multilineText->setFont(style::window::font::medium);
        multilineText->setEditMode(EditMode::BROWSE);
        multilineText->setEditMode(EditMode::Browse);

        applyItemNameSpecificSettings();


M module-apps/application-settings/windows/SettingsChange.cpp => module-apps/application-settings/windows/SettingsChange.cpp +2 -2
@@ 63,7 63,7 @@ namespace gui::option
            auto text = new TextFixedSize(nullptr, style::option::text_left_padding, 0, 0, 0);
            text->setMaximumSize(rect->getWidth(), rect->getHeight());
            text->setUnderline(false);
            text->setEditMode(EditMode::BROWSE);
            text->setEditMode(EditMode::Browse);
            text->setFont(font_bold);
            text->setText("Change PIN");
            text->setAlignment(Alignment(Alignment::Vertical::Center));


@@ 76,7 76,7 @@ namespace gui::option
            pin_text->setMinimumSize(60, rect->getHeight());
            pin_text->setMaximumSize(200, rect->getHeight());
            pin_text->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Center));
            pin_text->setEditMode(EditMode::EDIT);
            pin_text->setEditMode(EditMode::Edit);
            pin_text->setFont(font);
            pin_text->setText(std::to_string(lockHash));
            pin_text->setPenWidth(0);

M module-apps/application-settings/windows/UITestWindow.cpp => module-apps/application-settings/windows/UITestWindow.cpp +1 -1
@@ 30,7 30,7 @@ namespace gui
        setTitle("UI TEST");
        text = new gui::Text(
            this, style::window::default_left_margin, title->offset_h(), style::window::default_body_width, 300);
        text->setEditMode(EditMode::EDIT);
        text->setEditMode(EditMode::Edit);
        text->setFont(style::window::font::medium);
        LOG_DEBUG(
            "----------------------------------------------------------------------------------------------------");

M module-apps/application-settings/windows/USSDWindow.cpp => module-apps/application-settings/windows/USSDWindow.cpp +1 -1
@@ 62,7 62,7 @@ namespace gui
                this->application, CellularUSSDMessage::RequestType::pullSesionRequest, data);
            return true;
        };
        pullToSend->setEditMode(EditMode::EDIT);
        pullToSend->setEditMode(EditMode::Edit);
        pullToSend->setInputMode(new InputMode(
            {InputMode::digit},
            [=](const UTF8 &text) { bottomBarTemporaryMode(text); },

M module-apps/widgets/InputBox.cpp => module-apps/widgets/InputBox.cpp +2 -2
@@ 53,8 53,8 @@ namespace gui
                                   horizontalBox::inputField::y,
                                   horizontalBox::inputField::w,
                                   horizontalBox::inputField::h);
        inputField->setTextType(TextType::SINGLE_LINE);
        inputField->setEditMode(EditMode::EDIT);
        inputField->setTextType(TextType::SingleLine);
        inputField->setEditMode(EditMode::Edit);
        inputField->setEdges(RectangleEdge::None);
        inputField->setInputMode(new InputMode({InputMode::ABC, InputMode::abc}));
        inputField->setFont(style::window::font::mediumbold);

M module-apps/windows/Dialog.cpp => module-apps/windows/Dialog.cpp +4 -4
@@ 59,8 59,8 @@ Dialog::Dialog(app::Application *app, const std::string &name) : gui::AppWindow(

    text = new Text(this, style::text::x, style::text::y, style::text::w, style::text::h);
    text->setRichText("lol");
    text->setTextType(TextType::MULTI_LINE);
    text->setEditMode(EditMode::BROWSE);
    text->setTextType(TextType::MultiLine);
    text->setEditMode(EditMode::Browse);
    text->setEdges(RectangleEdge::None);
    text->setFont(style::window::font::medium);
    text->setAlignment(gui::Alignment(gui::Alignment::Horizontal::Center, gui::Alignment::Vertical::Center));


@@ 156,8 156,8 @@ DialogYesNoIconTxt::DialogYesNoIconTxt(app::Application *app, const std::string 
{
    iconText = new Text(this, style::icontext::x, style::icontext::y, style::icontext::w, style::icontext::h);
    iconText->setText("");
    iconText->setTextType(TextType::SINGLE_LINE);
    iconText->setEditMode(EditMode::BROWSE);
    iconText->setTextType(TextType::SingleLine);
    iconText->setEditMode(EditMode::Browse);
    iconText->setEdges(RectangleEdge::None);
    iconText->setFont(style::window::font::largelight);
    iconText->setAlignment(gui::Alignment(gui::Alignment::Horizontal::Center, gui::Alignment::Vertical::None));

M module-apps/windows/Options.cpp => module-apps/windows/Options.cpp +1 -1
@@ 43,7 43,7 @@ namespace gui::option
            auto font_bold = FontManager::getInstance().getFont(style::window::font::mediumbold);
            auto text      = new Text(nullptr, style::option::text_left_padding, 0, 0, 0);
            text->setMaximumSize(rect->getWidth(), rect->getHeight());
            text->setEditMode(EditMode::BROWSE);
            text->setEditMode(EditMode::Browse);
            text->setText(std::make_unique<TextDocument>(std::list<TextBlock>(
                {{utils::localize.get("sms_call_text"), font}, {contact.getFormattedName(), font_bold}})));
            style::window::decorate(rect);

M module-gui/gui/widgets/Icon.cpp => module-gui/gui/widgets/Icon.cpp +2 -2
@@ 41,8 41,8 @@ Icon::Icon(Item *parent,

    new Image(this, style::img::x, style::img::y, imageName);
    text = new Text(this, style::text::x, style::text::y, style::text::w, style::text::h);
    text->setTextType(TextType::MULTI_LINE);
    text->setEditMode(EditMode::BROWSE);
    text->setTextType(TextType::MultiLine);
    text->setEditMode(EditMode::Browse);
    text->setEdges(RectangleEdge::None);
    text->setAlignment(gui::Alignment(gui::Alignment::Horizontal::Center, gui::Alignment::Vertical::Center));


M module-gui/gui/widgets/Lines.cpp => module-gui/gui/widgets/Lines.cpp +4 -4
@@ 43,7 43,7 @@ namespace gui

            if (textLine.length() == 0 && textLine.getLineEnd()) {
                debug_text_lines("cant show more text from this document");
                stopCondition = LinesDrawStop::OUT_OF_TEXT;
                stopCondition = LinesDrawStop::OutOfText;
                break;
            }



@@ 52,7 52,7 @@ namespace gui
                                 lineYPosition,
                                 textLine.height(),
                                 h);
                stopCondition = LinesDrawStop::OUT_OF_SPACE;
                stopCondition = LinesDrawStop::OutOfSpace;
                addToInvisibleLines(std::move(textLine));
                break;
            }


@@ 85,13 85,13 @@ namespace gui
            }

            if (lineYPosition + initHeight > h) {
                stopCondition = LinesDrawStop::OUT_OF_SPACE;
                stopCondition = LinesDrawStop::OutOfSpace;
                addToInvisibleLines(std::move(textLine));
                break;
            }

            if (lines.size() >= linesCount) {
                stopCondition = LinesDrawStop::OUT_OF_SPACE;
                stopCondition = LinesDrawStop::OutOfSpace;
                addToInvisibleLines(std::move(textLine));
                break;
            }

M module-gui/gui/widgets/Lines.hpp => module-gui/gui/widgets/Lines.hpp +2 -2
@@ 36,7 36,7 @@ namespace gui

        ~Lines() = default;

        LinesDrawStop stopCondition                = LinesDrawStop::NONE;
        LinesDrawStop stopCondition                = LinesDrawStop::None;
        TextLineStartContition drawStartConditions = {0, 0};
        std::list<TextLineStartContition> previousLinesStart;



@@ 44,7 44,7 @@ namespace gui
        {
            erase();

            stopCondition = LinesDrawStop::NONE;
            stopCondition = LinesDrawStop::None;
            previousLinesStart.clear();
            drawStartConditions = {0, 0};
        }

M module-gui/gui/widgets/Text.cpp => module-gui/gui/widgets/Text.cpp +47 -47
@@ 446,7 446,7 @@ namespace gui

    void Text::showCursor(bool focus)
    {
        cursor->setVisible(focus && isMode(EditMode::EDIT));
        cursor->setVisible(focus && isMode(EditMode::Edit));
    }

    auto Text::handleRotateInputMode(const InputEvent &inputEvent) -> bool


@@ 486,7 486,7 @@ namespace gui
            return false;
        }

        if (isMode(EditMode::SCROLL)) {
        if (isMode(EditMode::Scroll)) {

            debug_text("Text in scroll mode ignores left/right navigation");
            if (inputEvent.is(KeyCode::KEY_LEFT) || inputEvent.is(KeyCode::KEY_RIGHT)) {


@@ 504,7 504,7 @@ namespace gui

        if (inputToNavigation(inputEvent) != NavigationDirection::NONE) {

            setCursorStartPosition(CursorStartPosition::OFFSET);
            setCursorStartPosition(CursorStartPosition::Offset);

            auto ret = cursor->moveCursor(inputToNavigation(inputEvent));
            debug_text("moveCursor: %s", c_str(ret));


@@ 523,12 523,12 @@ namespace gui

    bool Text::handleRemovalChar(const InputEvent &inputEvent)
    {
        if (!isMode(EditMode::EDIT)) {
        if (!isMode(EditMode::Edit)) {
            return false;
        }
        if (inputEvent.isShortPress() && inputEvent.is(key_signs_remove)) {

            setCursorStartPosition(CursorStartPosition::OFFSET);
            setCursorStartPosition(CursorStartPosition::Offset);

            if (!document->isEmpty() && removeChar()) {
                onTextChanged();


@@ 540,15 540,15 @@ namespace gui

    bool Text::handleAddChar(const InputEvent &inputEvent)
    {
        if (!inputEvent.isShortPress() || !isMode(EditMode::EDIT)) {
        if (!inputEvent.isShortPress() || !isMode(EditMode::Edit)) {
            return false;
        }

        auto code = translator.handle(inputEvent.key, mode ? mode->get() : "");

        if (code != KeyProfile::none_key && checkAdditionBounds(code) == InputBound::CAN_ADD) {
        if (code != KeyProfile::none_key && checkAdditionBounds(code) == AdditionBound::CanAddAll) {

            setCursorStartPosition(CursorStartPosition::OFFSET);
            setCursorStartPosition(CursorStartPosition::Offset);

            debug_text("handleAddChar %d -> Begin", code);
            debug_text("%s times: %" PRIu32, inputEvent.str().c_str(), translator.getTimes());


@@ 576,9 576,9 @@ namespace gui

        auto val = toNumeric(inputEvent.keyCode);

        if (val != InvalidNumericKeyCode && checkAdditionBounds(val) == InputBound::CAN_ADD) {
        if (val != InvalidNumericKeyCode && checkAdditionBounds(val) == AdditionBound::CanAddAll) {

            setCursorStartPosition(CursorStartPosition::OFFSET);
            setCursorStartPosition(CursorStartPosition::Offset);
            addChar(intToAscii(val));
            onTextChanged();
            return true;


@@ 622,23 622,23 @@ namespace gui
        return preDrawLines;
    }

    auto Text::checkMaxSignsLimit(unsigned int limitVal) -> InputBound
    auto Text::checkMaxSignsLimit(unsigned int limitVal) -> AdditionBound
    {
        if (getText().length() >= limitVal) {
            debug_text("Text at max signs count can't add more");
            return InputBound::HIT_BOUND;
            return AdditionBound::CantAdd;
        }
        else {
            return InputBound::CAN_ADD;
            return AdditionBound::CanAddAll;
        }
    }

    auto Text::checkMaxSignsLimit(const TextBlock &textBlock, unsigned int limitVal)
        -> std::tuple<InputBound, TextBlock>
        -> std::tuple<AdditionBound, TextBlock>
    {
        if (getText().length() >= limitVal) {
            debug_text("Text at max signs count can't add more.");
            return {InputBound::HIT_BOUND, textBlock};
            return {AdditionBound::CantAdd, textBlock};
        }
        else if (getText().length() + textBlock.length() >= limitVal) {



@@ 651,16 651,16 @@ namespace gui
                       textBlock.getText().c_str(),
                       partBlockText.c_str());

            return {InputBound::CAN_ADD_PART, TextBlock(partBlockText, std::make_unique<TextFormat>(*blockFormat))};
            return {AdditionBound::CanAddPart, TextBlock(partBlockText, std::make_unique<TextFormat>(*blockFormat))};
        }
        else {
            return {InputBound::CAN_ADD, textBlock};
            return {AdditionBound::CanAddAll, textBlock};
        }
    }

    auto Text::checkMaxSizeLimit(uint32_t utfVal) -> InputBound
    auto Text::checkMaxSizeLimit(uint32_t utfVal) -> AdditionBound
    {
        auto returnValue = InputBound::CAN_ADD;
        auto returnValue = AdditionBound::CanAddAll;

        auto preDrawLines = makePreDrawLines(utfVal);



@@ 674,14 674,14 @@ namespace gui

            debug_text("Text at max size can't add more");
            preDrawLines->erase();
            returnValue = InputBound::HIT_BOUND;
            returnValue = AdditionBound::CantAdd;
        }

        preDrawLines->erase();
        return returnValue;
    }

    auto Text::checkMaxSizeLimit(const TextBlock &textBlock) -> std::tuple<InputBound, TextBlock>
    auto Text::checkMaxSizeLimit(const TextBlock &textBlock) -> std::tuple<AdditionBound, TextBlock>
    {
        auto preDrawLines = makePreDrawLines(textBlock);



@@ 692,7 692,7 @@ namespace gui

        if (preDrawLines->maxWidth() == 0) {
            preDrawLines->erase();
            return {InputBound::HIT_BOUND, textBlock};
            return {AdditionBound::CantAdd, textBlock};
        }

        if (preDrawLines->linesHeight() + getPadding().getSumInAxis(Axis::Y) > area(Area::Max).h) {


@@ 721,23 721,23 @@ namespace gui
                               textBlock.getText().c_str(),
                               partBlockText.c_str());

                    return {InputBound::CAN_ADD_PART,
                    return {AdditionBound::CanAddPart,
                            TextBlock(partBlockText, std::make_unique<TextFormat>(*blockFormat))};
                }
            }

            preDrawLines->erase();
            // If not a part of block can fit return hit bound.
            return {InputBound::HIT_BOUND, textBlock};
            return {AdditionBound::CantAdd, textBlock};
        }

        preDrawLines->erase();
        return {InputBound::CAN_ADD, textBlock};
        return {AdditionBound::CanAddAll, textBlock};
    }

    auto Text::checkMaxLinesLimit(uint32_t utfVal, unsigned int limitVal) -> InputBound
    auto Text::checkMaxLinesLimit(uint32_t utfVal, unsigned int limitVal) -> AdditionBound
    {
        auto returnValue = InputBound::CAN_ADD;
        auto returnValue = AdditionBound::CanAddAll;

        auto preDrawLines = makePreDrawLines(utfVal);



@@ 750,7 750,7 @@ namespace gui

            debug_text("Text at max size can't add more");
            preDrawLines->erase();
            returnValue = InputBound::HIT_BOUND;
            returnValue = AdditionBound::CantAdd;
        }

        preDrawLines->erase();


@@ 758,7 758,7 @@ namespace gui
    }

    auto Text::checkMaxLinesLimit(const TextBlock &textBlock, unsigned int limitVal)
        -> std::tuple<InputBound, TextBlock>
        -> std::tuple<AdditionBound, TextBlock>
    {
        auto preDrawLines = makePreDrawLines(textBlock);



@@ 769,7 769,7 @@ namespace gui

        if (preDrawLines->maxWidth() == 0) {
            preDrawLines->erase();
            return {InputBound::HIT_BOUND, textBlock};
            return {AdditionBound::CantAdd, textBlock};
        }

        if (preDrawLines->size() > limitVal) {


@@ 798,75 798,75 @@ namespace gui
                               textBlock.getText().c_str(),
                               partBlockText.c_str());

                    return {InputBound::CAN_ADD_PART,
                    return {AdditionBound::CanAddPart,
                            TextBlock(partBlockText, std::make_unique<TextFormat>(*blockFormat))};
                }
            }

            preDrawLines->erase();
            // If not a part of block can fit return hit bound.
            return {InputBound::HIT_BOUND, textBlock};
            return {AdditionBound::CantAdd, textBlock};
        }

        preDrawLines->erase();
        return {InputBound::CAN_ADD, textBlock};
        return {AdditionBound::CanAddAll, textBlock};
    }

    auto Text::checkAdditionBounds(const uint32_t utfVal) -> InputBound
    auto Text::checkAdditionBounds(const uint32_t utfVal) -> AdditionBound
    {
        auto returnValue = InputBound::CAN_ADD;
        auto returnValue = AdditionBound::CanAddAll;

        for (auto limit : limitsList) {

            switch (limit.limitType) {
            case TextLimitType::MAX_SIGNS_COUNT:
            case TextLimitType::MaxSignsCount:
                returnValue = checkMaxSignsLimit(limit.limitValue);
                break;
            case TextLimitType::MAX_LINES:
            case TextLimitType::MaxLines:
                returnValue = checkMaxLinesLimit(utfVal, limit.limitValue);
                break;
            case TextLimitType::MAX_SIZE:
            case TextLimitType::MaxSize:
                returnValue = checkMaxSizeLimit(utfVal);
                break;
            default:
                break;
            }

            if (returnValue == InputBound::HIT_BOUND) {
            if (returnValue == AdditionBound::CantAdd) {
                return returnValue;
            }
        }
        return returnValue;
    }

    auto Text::checkAdditionBounds(const TextBlock &textBlock) -> std::tuple<InputBound, TextBlock>
    auto Text::checkAdditionBounds(const TextBlock &textBlock) -> std::tuple<AdditionBound, TextBlock>
    {
        std::tuple<InputBound, TextBlock> returnValue = {InputBound::CAN_ADD, textBlock};
        auto shortestProcessedBlock                   = textBlock;
        std::tuple<AdditionBound, TextBlock> returnValue = {AdditionBound::CanAddAll, textBlock};
        auto shortestProcessedBlock                      = textBlock;

        for (auto limit : limitsList) {

            switch (limit.limitType) {
            case TextLimitType::MAX_SIGNS_COUNT:
            case TextLimitType::MaxSignsCount:
                returnValue = checkMaxSignsLimit(textBlock, limit.limitValue);
                break;
            case TextLimitType::MAX_LINES:
            case TextLimitType::MaxLines:
                returnValue = checkMaxLinesLimit(textBlock, limit.limitValue);
                break;
            case TextLimitType::MAX_SIZE:
            case TextLimitType::MaxSize:
                returnValue = checkMaxSizeLimit(textBlock);
                break;
            default:
                break;
            }

            if (std::get<0>(returnValue) == InputBound::CAN_ADD_PART) {
            if (std::get<0>(returnValue) == AdditionBound::CanAddPart) {
                if (std::get<1>(returnValue).length() < shortestProcessedBlock.length()) {
                    shortestProcessedBlock = std::get<1>(returnValue);
                }
            }

            if (std::get<0>(returnValue) == InputBound::HIT_BOUND) {
            if (std::get<0>(returnValue) == AdditionBound::CantAdd) {
                return returnValue;
            }
        }

M module-gui/gui/widgets/Text.hpp => module-gui/gui/widgets/Text.hpp +16 -14
@@ 52,7 52,7 @@ namespace gui
        // holds list of labels for displaying currently visible text lines.

        TextLineCursor *cursor                  = nullptr;
        CursorStartPosition cursorStartPosition = CursorStartPosition::DOCUMENT_END;
        CursorStartPosition cursorStartPosition = CursorStartPosition::DocumentEnd;
        std::unique_ptr<TextDocument> document  = std::make_unique<TextDocument>(std::list<TextBlock>());
        InputMode *mode                         = nullptr;
        std::unique_ptr<Lines> lines            = nullptr;


@@ 64,8 64,8 @@ namespace gui
        void showCursor(bool focus);

      public:
        ExpandMode expandMode    = ExpandMode::EXPAND_NONE;
        EditMode editMode        = EditMode::EDIT;
        ExpandMode expandMode    = ExpandMode::None;
        EditMode editMode        = EditMode::Edit;
        KeyCode key_signs_remove = KeyCode::KEY_PND;

        [[nodiscard]] bool isMode(EditMode edit) const


@@ 74,7 74,7 @@ namespace gui
        }

      protected:
        TextType textType = TextType::MULTI_LINE;
        TextType textType = TextType::MultiLine;
        std::list<TextLimit> limitsList;

        /// points to default text font to use


@@ 95,12 95,14 @@ namespace gui
        auto makePreDrawLines(uint32_t utfVal) -> std::unique_ptr<Lines>;
        auto makePreDrawLines(const TextBlock &textBlock) -> std::unique_ptr<Lines>;

        auto checkMaxSignsLimit(unsigned int limitVal) -> InputBound;
        auto checkMaxSignsLimit(const TextBlock &textBlock, unsigned int limitVal) -> std::tuple<InputBound, TextBlock>;
        auto checkMaxSizeLimit(uint32_t utfVal) -> InputBound;
        auto checkMaxSizeLimit(const TextBlock &textBlock) -> std::tuple<InputBound, TextBlock>;
        auto checkMaxLinesLimit(uint32_t utfVal, unsigned int limitVal) -> InputBound;
        auto checkMaxLinesLimit(const TextBlock &textBlock, unsigned int limitVal) -> std::tuple<InputBound, TextBlock>;
        auto checkMaxSignsLimit(unsigned int limitVal) -> AdditionBound;
        auto checkMaxSignsLimit(const TextBlock &textBlock, unsigned int limitVal)
            -> std::tuple<AdditionBound, TextBlock>;
        auto checkMaxSizeLimit(uint32_t utfVal) -> AdditionBound;
        auto checkMaxSizeLimit(const TextBlock &textBlock) -> std::tuple<AdditionBound, TextBlock>;
        auto checkMaxLinesLimit(uint32_t utfVal, unsigned int limitVal) -> AdditionBound;
        auto checkMaxLinesLimit(const TextBlock &textBlock, unsigned int limitVal)
            -> std::tuple<AdditionBound, TextBlock>;

        void preBuildDrawListHookImplementation(std::list<Command> &commands);
        /// redrawing lines


@@ 122,8 124,8 @@ namespace gui
             const uint32_t &w,
             const uint32_t &h,
             const UTF8 &text      = "",
             ExpandMode expandMode = ExpandMode::EXPAND_NONE,
             TextType textType     = TextType::MULTI_LINE);
             ExpandMode expandMode = ExpandMode::None,
             TextType textType     = TextType::MultiLine);
        ~Text() override;

        void setEditMode(EditMode mode);


@@ 182,8 184,8 @@ namespace gui
      public:
        TextChangedCallback textChangedCallback;

        auto checkAdditionBounds(uint32_t utfVal) -> InputBound;
        auto checkAdditionBounds(const TextBlock &textBlock) -> std::tuple<InputBound, TextBlock>;
        auto checkAdditionBounds(uint32_t utfVal) -> AdditionBound;
        auto checkAdditionBounds(const TextBlock &textBlock) -> std::tuple<AdditionBound, TextBlock>;

        auto setCursorStartPosition(CursorStartPosition val) -> void;


M module-gui/gui/widgets/TextBubble.cpp => module-gui/gui/widgets/TextBubble.cpp +2 -2
@@ 8,9 8,9 @@ namespace gui

    TextBubble::TextBubble(Item *parent, Position x, Position y, Length w, Length h) : Text(parent, x, y, w, h)
    {
        setEditMode(EditMode::SCROLL);
        setEditMode(EditMode::Scroll);
        setEdges(RectangleEdge::All);
        setCursorStartPosition(CursorStartPosition::DOCUMENT_BEGIN);
        setCursorStartPosition(CursorStartPosition::DocumentBegin);
    }

    void TextBubble::setYaps(RectangleYap yaps)

M module-gui/gui/widgets/TextConstants.hpp => module-gui/gui/widgets/TextConstants.hpp +21 -21
@@ 15,9 15,9 @@ namespace gui

    enum class TextLimitType
    {
        MAX_SIZE,
        MAX_LINES,
        MAX_SIGNS_COUNT
        MaxSize,
        MaxLines,
        MaxSignsCount
    };

    struct TextLimit


@@ 28,43 28,43 @@ namespace gui

    enum class CursorStartPosition
    {
        DOCUMENT_BEGIN,
        OFFSET,
        DOCUMENT_END
        DocumentBegin,
        Offset,
        DocumentEnd
    };

    enum class LinesDrawStop
    {
        NONE,
        OUT_OF_TEXT,
        OUT_OF_SPACE
        None,
        OutOfText,
        OutOfSpace
    };

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

    enum class EditMode
    {
        BROWSE,
        EDIT,
        SCROLL,
        Browse,
        Edit,
        Scroll,
    };

    enum class TextType
    {
        SINGLE_LINE = 1,
        MULTI_LINE
        SingleLine = 1,
        MultiLine
    };

    enum class InputBound
    enum class AdditionBound
    {
        CAN_ADD,
        CAN_ADD_PART,
        HIT_BOUND
        CanAddAll,
        CanAddPart,
        CantAdd
    };

} // namespace gui

M module-gui/gui/widgets/TextCursor.cpp => module-gui/gui/widgets/TextCursor.cpp +4 -4
@@ 167,7 167,7 @@ namespace gui
        // lines need to be drawn before cursor move in case we have scrolling
        text->drawLines();

        if (cursorStartPosition != CursorStartPosition::DOCUMENT_BEGIN) {
        if (cursorStartPosition != CursorStartPosition::DocumentBegin) {
            moveCursor(NavigationDirection::RIGHT);
        }
    }


@@ 175,7 175,7 @@ namespace gui
    TextCursor &TextCursor::operator<<(const UTF8 &textString)
    {
        for (unsigned int i = 0; i < textString.length(); ++i) {
            if (text->checkAdditionBounds(textString[i]) == InputBound::CAN_ADD) {
            if (text->checkAdditionBounds(textString[i]) == AdditionBound::CanAddAll) {
                addChar(textString[i]);
            }
            else {


@@ 189,7 189,7 @@ namespace gui
    {
        auto [addBoundResult, processedTextBlock] = text->checkAdditionBounds(textBlock);

        if (addBoundResult == InputBound::CAN_ADD || addBoundResult == InputBound::CAN_ADD_PART) {
        if (addBoundResult == AdditionBound::CanAddAll || addBoundResult == AdditionBound::CanAddPart) {

            auto len = processedTextBlock.length();
            BlockCursor::addTextBlock(std::move(processedTextBlock));


@@ 198,7 198,7 @@ namespace gui
            text->drawLines();

            // +1 is for block barrier
            if (cursorStartPosition != CursorStartPosition::DOCUMENT_BEGIN) {
            if (cursorStartPosition != CursorStartPosition::DocumentBegin) {
                moveCursor(NavigationDirection::RIGHT, len + 1);
            }
        }

M module-gui/gui/widgets/TextCursor.hpp => module-gui/gui/widgets/TextCursor.hpp +1 -1
@@ 21,7 21,7 @@ namespace gui
    {
      protected:
        Text *text                              = nullptr;
        CursorStartPosition cursorStartPosition = CursorStartPosition::DOCUMENT_END;
        CursorStartPosition cursorStartPosition = CursorStartPosition::DocumentEnd;
        unsigned int onScreenPosition           = 0;

      public:

M module-gui/gui/widgets/TextFixedSize.cpp => module-gui/gui/widgets/TextFixedSize.cpp +1 -1
@@ 9,7 9,7 @@ namespace gui
{
    TextFixedSize::TextFixedSize(Item *parent, Position x, Position y, Length w, Length h) : Text(parent, x, y, w, h)
    {
        setEditMode(EditMode::EDIT);
        setEditMode(EditMode::Edit);
        lines->setUnderLine(true);
    }


M module-gui/gui/widgets/TextLineCursor.cpp => module-gui/gui/widgets/TextLineCursor.cpp +3 -3
@@ 83,7 83,7 @@ namespace gui

    auto TextLineCursor::displayNextLine() -> bool
    {
        if (text->lines->stopCondition != LinesDrawStop::OUT_OF_TEXT) {
        if (text->lines->stopCondition != LinesDrawStop::OutOfText) {

            text->lines->addToPreviousLinesStartList(text->lines->first().getLineStartBlockNumber(),
                                                     text->lines->first().getLineStartBlockPosition());


@@ 146,7 146,7 @@ namespace gui
        /// down - corner case
        if ((checkNpos() || (direction == NavigationDirection::DOWN && selectedLineNumber == lastVisibleLineNumber))) {

            if (text->lines->stopCondition != LinesDrawStop::OUT_OF_TEXT) {
            if (text->lines->stopCondition != LinesDrawStop::OutOfText) {

                if (checkNextLineDocumentEnd(selectedLineNumber)) {
                    return TextCursor::Move::End;


@@ 180,7 180,7 @@ namespace gui
        /// right - corner case
        if ((checkNpos() || (direction == NavigationDirection::RIGHT && selectedLineNumber == lastVisibleLineNumber))) {

            if (text->lines->stopCondition != LinesDrawStop::OUT_OF_TEXT &&
            if (text->lines->stopCondition != LinesDrawStop::OutOfText &&
                (selectedLineCursorPosition ==
                 (text->lines->getLine(lastVisibleLineNumber)->length() -
                  (text->lines->getLine(lastVisibleLineNumber)->getEnd() == TextBlock::End::Newline ? 1 : 0)))) {

M module-gui/test/test-catch-text/test-gui-Text.cpp => module-gui/test/test-catch-text/test-gui-Text.cpp +50 -50
@@ 327,7 327,7 @@ TEST_CASE("Text addition bounds - text sings count restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, 0);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, 0);

        text->addText(testStringOneLine);



@@ 339,7 339,7 @@ TEST_CASE("Text addition bounds - text sings count restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, 1);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, 1);

        text->addText(testStringOneLine);



@@ 351,7 351,7 @@ TEST_CASE("Text addition bounds - text sings count restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, testStringOneLine.length());
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, testStringOneLine.length());

        text->addText(testStringTwoLines);



@@ 363,7 363,7 @@ TEST_CASE("Text addition bounds - text sings count restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, testStringTwoLines.length());
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, testStringTwoLines.length());

        text->addText(testStringTwoLines);



@@ 375,7 375,7 @@ TEST_CASE("Text addition bounds - text sings count restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, testStringOneLine.length());
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, testStringOneLine.length());

        text->addText(TextBlock(testStringTwoLines, Font(27).raw(), TextBlock::End::None));



@@ 391,7 391,7 @@ TEST_CASE("Text addition bounds - text sings count restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, textLimit);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, textLimit);

        text->addText(TextBlock(testStringOneLine, Font(27).raw(), TextBlock::End::None));



@@ 410,7 410,7 @@ TEST_CASE("Text addition bounds - text sings count restricted")
        using namespace gui;
        auto text = new gui::TestText();

        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, signCountRestricted);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, signCountRestricted);

        text->addRichText(richTextTwoLines);



@@ 429,7 429,7 @@ TEST_CASE("Text addition bounds - text sings count restricted")
        auto parsedRichText = gui::text::RichTextParser().parse(richTextTwoLines, &format);
        auto textLimit      = parsedRichText->getText().length() + additionalSpace;

        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, textLimit);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, textLimit);

        text->addRichText(richTextTwoLines);



@@ 458,7 458,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(0, 0);

        text->addText(testStringOneLine);


@@ 471,7 471,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        BoxLayout layout = BoxLayout(nullptr, 0, 0, 0, 0);
        layout.setMaximumSize(10, 10);
        layout.addWidget(text);


@@ 486,7 486,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(200, 30);

        text->addText(testStringTwoLines);


@@ 501,7 501,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(200, 60);

        text->addText(testStringTwoLines);


@@ 516,7 516,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(200, 60);
        BoxLayout layout = BoxLayout(nullptr, 0, 0, 0, 0);
        layout.setMaximumSize(200, 30);


@@ 534,7 534,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(0, 0);

        text->addText(TextBlock(testStringOneLine, Font(27).raw(), TextBlock::End::None));


@@ 547,7 547,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        BoxLayout layout = BoxLayout(nullptr, 0, 0, 0, 0);
        layout.setMaximumSize(10, 10);
        layout.addWidget(text);


@@ 562,7 562,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(150, 30);

        text->addText(TextBlock(testStringFirstLine, Font(27).raw(), TextBlock::End::Newline));


@@ 578,7 578,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(200, 60);

        text->addText(TextBlock(testStringFirstLine, Font(27).raw(), TextBlock::End::Newline));


@@ 594,7 594,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(200, 60);
        BoxLayout layout = BoxLayout(nullptr, 0, 0, 0, 0);
        layout.setMaximumSize(150, 30);


@@ 613,7 613,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(0, 0);

        text->addRichText(richTextTwoLines);


@@ 626,7 626,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        BoxLayout layout = BoxLayout(nullptr, 0, 0, 0, 0);
        layout.setMaximumSize(10, 10);
        layout.addWidget(text);


@@ 641,7 641,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(160, 40);

        text->addRichText(richTextTwoLines);


@@ 656,7 656,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(200, 80);

        text->addRichText(richTextTwoLines);


@@ 671,7 671,7 @@ TEST_CASE("Text addition bounds - text widget size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(200, 80);
        BoxLayout layout = BoxLayout(nullptr, 0, 0, 0, 0);
        layout.setMaximumSize(160, 40);


@@ 702,7 702,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 0);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 0);
        text->setMaximumSize(150, 100);

        text->addText(testStringOneLine);


@@ 715,7 715,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 1);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 1);
        text->setMaximumSize(150, 100);

        text->addText(testStringTwoLines);


@@ 730,7 730,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 2);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 2);
        text->setMaximumSize(150, 100);

        text->addText(testStringTwoLines);


@@ 745,7 745,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 0);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 0);
        text->setMaximumSize(150, 100);

        text->addText(TextBlock(testStringOneLine, Font(27).raw(), TextBlock::End::None));


@@ 758,7 758,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 1);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 1);
        text->setMaximumSize(150, 100);

        text->addText(TextBlock(testStringFirstLine, Font(27).raw(), TextBlock::End::Newline));


@@ 774,7 774,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 2);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 2);
        text->setMaximumSize(150, 100);

        text->addText(TextBlock(testStringFirstLine, Font(27).raw(), TextBlock::End::Newline));


@@ 790,7 790,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 0);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 0);
        text->setMaximumSize(150, 100);

        text->addRichText(richTextTwoLines);


@@ 803,7 803,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 1);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 1);
        text->setMaximumSize(160, 100);

        text->addRichText(richTextTwoLines);


@@ 818,7 818,7 @@ TEST_CASE("Text addition bounds - text widget line size restricted")
        mockup::fontManager();
        using namespace gui;
        auto text = new gui::TestText();
        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 2);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 2);
        text->setMaximumSize(160, 100);

        text->addRichText(richTextTwoLines);


@@ 844,9 844,9 @@ TEST_CASE("Text addition bounds - multiple limits tests")
        using namespace gui;
        auto text = new gui::TestText();

        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 2);
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, testStringOneLine.length());
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 2);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, testStringOneLine.length());
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(150, 100);

        text->addText(testStringTwoLines);


@@ 864,9 864,9 @@ TEST_CASE("Text addition bounds - multiple limits tests")

        unsigned int signsLimit = 100;

        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 1);
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, signsLimit);
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 1);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, signsLimit);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(150, 100);

        text->addText(testStringOneLine);


@@ 885,9 885,9 @@ TEST_CASE("Text addition bounds - multiple limits tests")

        unsigned int signsLimit = 100;

        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 3);
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, signsLimit);
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 3);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, signsLimit);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(140, 30);

        text->addText(testStringOneLine);


@@ 908,9 908,9 @@ TEST_CASE("Text addition bounds - multiple limits tests")
        auto format         = text->getTextFormat();
        auto parsedRichText = gui::text::RichTextParser().parse(richTextTwoLines, &format);

        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 4);
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, parsedRichText->getText().length());
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 4);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, parsedRichText->getText().length());
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(300, 100);

        text->addRichText(richTextTwoLines);


@@ 927,9 927,9 @@ TEST_CASE("Text addition bounds - multiple limits tests")

        unsigned int signsLimit = 100;

        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 1);
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, signsLimit);
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 1);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, signsLimit);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(300, 100);

        text->addRichText(richTextTwoLines);


@@ 946,9 946,9 @@ TEST_CASE("Text addition bounds - multiple limits tests")

        unsigned int signsLimit = 100;

        text->setTextLimitType(gui::TextLimitType::MAX_LINES, 3);
        text->setTextLimitType(gui::TextLimitType::MAX_SIGNS_COUNT, signsLimit);
        text->setTextLimitType(gui::TextLimitType::MAX_SIZE);
        text->setTextLimitType(gui::TextLimitType::MaxLines, 3);
        text->setTextLimitType(gui::TextLimitType::MaxSignsCount, signsLimit);
        text->setTextLimitType(gui::TextLimitType::MaxSize);
        text->setMaximumSize(140, 30);

        text->addRichText(richTextTwoLines);

M module-gui/test/test-catch-text/test-gui-TextLineCursor.cpp => module-gui/test/test-catch-text/test-gui-TextLineCursor.cpp +6 -6
@@ 224,7 224,7 @@ TEST_CASE("TextLineCursor - navigation with scroll")
        mockup::fontManager();
        auto text = new gui::TestText();
        text->setMaximumSize(400, 40);
        text->setCursorStartPosition(gui::CursorStartPosition::DOCUMENT_BEGIN);
        text->setCursorStartPosition(gui::CursorStartPosition::DocumentBegin);

        std::tuple<const TextLine *, unsigned int, unsigned int> selectedLine;



@@ 328,7 328,7 @@ TEST_CASE("TextLineCursor - navigation with scroll")
        mockup::fontManager();
        auto text = new gui::TestText();
        text->setMaximumSize(400, 40);
        text->setCursorStartPosition(gui::CursorStartPosition::DOCUMENT_END);
        text->setCursorStartPosition(gui::CursorStartPosition::DocumentEnd);

        std::tuple<const TextLine *, unsigned int, unsigned int> selectedLine;



@@ 381,7 381,7 @@ TEST_CASE("TextLineCursor - navigation with scroll")
        mockup::fontManager();
        auto text = new gui::TestText();
        text->setMaximumSize(400, 90);
        text->setCursorStartPosition(gui::CursorStartPosition::DOCUMENT_BEGIN);
        text->setCursorStartPosition(gui::CursorStartPosition::DocumentBegin);

        std::tuple<const TextLine *, unsigned int, unsigned int> selectedLine;



@@ 457,7 457,7 @@ TEST_CASE("TextLineCursor - navigation with scroll")
        mockup::fontManager();
        auto text = new gui::TestText();
        text->setMaximumSize(400, 90);
        text->setCursorStartPosition(gui::CursorStartPosition::DOCUMENT_END);
        text->setCursorStartPosition(gui::CursorStartPosition::DocumentEnd);

        std::tuple<const TextLine *, unsigned int, unsigned int> selectedLine;



@@ 537,7 537,7 @@ TEST_CASE("TextLineCursor - addition and deletion with scroll")
        mockup::fontManager();
        auto text = new gui::TestText();
        text->setMaximumSize(600, 40);
        text->setCursorStartPosition(gui::CursorStartPosition::DOCUMENT_BEGIN);
        text->setCursorStartPosition(gui::CursorStartPosition::DocumentBegin);

        std::tuple<const TextLine *, unsigned int, unsigned int> selectedLine;



@@ 599,7 599,7 @@ TEST_CASE("TextLineCursor - addition and deletion with scroll")
        mockup::fontManager();
        auto text = new gui::TestText();
        text->setMaximumSize(400, 90);
        text->setCursorStartPosition(gui::CursorStartPosition::DOCUMENT_END);
        text->setCursorStartPosition(gui::CursorStartPosition::DocumentEnd);

        std::tuple<const TextLine *, unsigned int, unsigned int> selectedLine;