Routes translated browser events into a live View tree.
More...
#include <web_event_translate.hpp>
Routes translated browser events into a live View tree.
Every coordinate passes through css_to_root() exactly once, at the top of each handler — the single chokepoint that keeps hit-testing aligned with paint under a design viewport.
◆ WebInputRouter()
| pulp::view::web::WebInputRouter::WebInputRouter |
( |
View & | root | ) |
|
|
inlineexplicit |
◆ drag_target()
| View * pulp::view::web::WebInputRouter::drag_target |
( |
| ) |
const |
|
inline |
◆ focused_view()
| View * pulp::view::web::WebInputRouter::focused_view |
( |
| ) |
const |
|
inline |
◆ handle_key()
| bool pulp::view::web::WebInputRouter::handle_key |
( |
const BrowserKeyEvent & | event | ) |
|
|
inline |
◆ handle_pointer()
◆ handle_text()
| bool pulp::view::web::WebInputRouter::handle_text |
( |
const std::string & | text | ) |
|
|
inline |
Composed text from a DOM input / IME commit.
NOT DRIVEN BY THE BROWSER YET. web_input.cpp exports the C entry point (pulp_web_on_text) but installs no input / compositionend listener, so nothing in-tree feeds this. The only text that reaches a focused view today is handle_key()'s printable-key fallback above, which cannot express an IME composition. This is the seam an IME implementation plugs into (attach a hidden contenteditable / <input>, forward its committed text to pulp_web_on_text); until then it is exercised only by test_window_host_web.cpp.
◆ handle_wheel()
| bool pulp::view::web::WebInputRouter::handle_wheel |
( |
const BrowserWheelEvent & | event | ) |
|
|
inline |
◆ invalidate()
| void pulp::view::web::WebInputRouter::invalidate |
( |
| ) |
|
|
inline |
Forget cached drag / hover / focus targets.
The host calls this when the view tree is rebuilt and the raw pointers may dangle.
◆ mapping()
◆ set_dirty_callback()
| void pulp::view::web::WebInputRouter::set_dirty_callback |
( |
std::function< void()> | cb | ) |
|
|
inline |
Called after any handler that changed view state, so the host can mark the surface dirty.
◆ set_mapping()
| void pulp::view::web::WebInputRouter::set_mapping |
( |
const ViewportMapping & | mapping | ) |
|
|
inline |
The documentation for this class was generated from the following file: