Propagate key event to parent if the item don't handle it

Does not work for C++ because binary compatibility issue
This commit is contained in:
Olivier Goffart 2021-01-26 12:54:24 +01:00
parent c2982d9ab3
commit 802383cd6b
8 changed files with 133 additions and 15 deletions

View file

@ -25,10 +25,11 @@ inline void send_mouse_click(const ComponentHandle<Component> *component, float
}
template<typename Component>
inline void send_keyboard_string_sequence(const Component &component,
const sixtyfps::SharedString &str)
inline void send_keyboard_string_sequence(const Component *component,
const sixtyfps::SharedString &str,
KeyboardModifiers modifiers = {})
{
cbindgen_private::send_keyboard_string_sequence(&str, {}, &component.window);
cbindgen_private::send_keyboard_string_sequence(&str, modifiers, &component->window);
}
#define assert_eq(A, B) \