| 549 | } |
| 550 | |
| 551 | bool RmlImModeLayout::button_callback(const std::string& label, nb::object callback, |
| 552 | std::tuple<float, float> size) { |
| 553 | bool clicked = button(label, size); |
| 554 | if (clicked && !callback.is_none()) { |
| 555 | try { |
| 556 | callback(); |
| 557 | } catch (const std::exception& e) { |
| 558 | LOG_ERROR("button_callback error: {}", e.what()); |
| 559 | } |
| 560 | } |
| 561 | return clicked; |
| 562 | } |
| 563 | |
| 564 | bool RmlImModeLayout::small_button(const std::string& label) { |
| 565 | if (!doc_) |