--------------------------------------------------------------------------
| 974 | |
| 975 | //-------------------------------------------------------------------------- |
| 976 | void GuiMLTextCtrl::copyToClipboard(const U32 rangeStart, const U32 rangeEnd) |
| 977 | { |
| 978 | AssertFatal(rangeStart < mTextBuffer.length() && rangeEnd < mTextBuffer.length(), |
| 979 | avar("GuiMLTextCtrl::copyToClipboard: can't copy outside of current text (%d, %d, %d)", |
| 980 | rangeStart, rangeEnd, mTextBuffer.length())); |
| 981 | AssertFatal(rangeStart <= rangeEnd, "GuiMLTextCtrl::copyToClipboard: invalid copy range"); |
| 982 | |
| 983 | //copy the selection to the clipboard |
| 984 | |
| 985 | UTF8* selection = mTextBuffer.createSubstring8(rangeStart, rangeEnd-rangeStart+1); |
| 986 | Platform::setClipboard(selection); |
| 987 | delete[] selection; |
| 988 | } |
| 989 | |
| 990 | //-------------------------------------------------------------------------- |
| 991 | bool GuiMLTextCtrl::isSelectionActive() const |
nothing calls this directly
no test coverage detected