| 558 | } |
| 559 | |
| 560 | void recompui::ContextId::queue_set_text(Element* element, std::string&& text) { |
| 561 | // Ensure a context is currently opened by this thread. |
| 562 | if (opened_context_id == ContextId::null()) { |
| 563 | context_error(*this, ContextErrorType::SetTextElementWithoutContext); |
| 564 | } |
| 565 | |
| 566 | // Check that the context that was specified is the same one that's currently open. |
| 567 | if (*this != opened_context_id) { |
| 568 | context_error(*this, ContextErrorType::SetTextElementInWrongContext); |
| 569 | } |
| 570 | |
| 571 | opened_context->to_set_text.emplace_back(std::make_tuple(element, element->resource_id, std::move(text))); |
| 572 | } |
| 573 | |
| 574 | recompui::Style* recompui::ContextId::create_style() { |
| 575 | return add_resource_impl(std::make_unique<Style>()); |
no test coverage detected