| 243 | } |
| 244 | |
| 245 | std::pair<bool, bool> commitAll(CustomEvents::InputTextBoxID tId, const std::shared_ptr<RichText::TextBox>& t, const std::shared_ptr<RichText::TextBox::Cursor>& c) { |
| 246 | std::scoped_lock a{textboxMutex}; |
| 247 | |
| 248 | if(tId == textboxID) { |
| 249 | bool oldTextChanged = textChanged; |
| 250 | bool oldCursorChanged = cursorChanged; |
| 251 | |
| 252 | if (textChanged) { |
| 253 | t->set_rich_text_data(textBox->get_rich_text_data()); |
| 254 | textChanged = false; |
| 255 | } |
| 256 | if (cursorChanged) { |
| 257 | *c = *cursor; |
| 258 | cursorChanged = false; |
| 259 | } |
| 260 | return {oldTextChanged, oldCursorChanged}; |
| 261 | } |
| 262 | else |
| 263 | return {false, false}; |
| 264 | } |
| 265 | |
| 266 | |
| 267 | struct TextInputData { |
no test coverage detected