MCPcopy Create free account
hub / github.com/MyGUI/mygui / commandPaste

Method commandPaste

MyGUIEngine/src/MyGUI_EditBox.cpp:1531–1547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1529 }
1530
1531 void EditBox::commandPaste()
1532 {
1533 std::string clipboard = ClipboardManager::getInstance().getClipboardData(EDIT_CLIPBOARD_TYPE_TEXT);
1534 if ((!mModeReadOnly) && (!clipboard.empty()))
1535 {
1536 // попытка объединения двух комманд
1537 size_t size = mVectorUndoChangeInfo.size();
1538 // непосредственно операции
1539 deleteTextSelect(true);
1540 insertText(clipboard, mCursorPosition, true);
1541 // проверяем на возможность объединения
1542 if ((size + 2) == mVectorUndoChangeInfo.size())
1543 commandMerge();
1544 // отсылаем событие о изменении
1545 eventEditTextChange(this);
1546 }
1547 }
1548
1549 const UString& EditBox::getRealString() const
1550 {

Callers

nothing calls this directly

Calls 3

getClipboardDataMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected