mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 06:37:52 +00:00
LibWeb: Allow layout nodes to receive and track mouse events
To implement form controls internally in LibWeb (necessary for multi process forms), we'll need the ability to handle events since we can't rely on LibGUI widgets anymore. A LayoutNode can now override wants_mouse_events() and if it returns true, it will now receive mousedown, mousemove and mouseup events. :^)
This commit is contained in:
@@ -254,4 +254,16 @@ void LayoutNodeWithStyle::apply_style(const CSS::StyleProperties& specified_styl
|
||||
style.border_bottom().color = specified_style.color_or_fallback(CSS::PropertyID::BorderBottomColor, document(), Color::Transparent);
|
||||
}
|
||||
|
||||
void LayoutNode::handle_mousedown(Badge<EventHandler>, const Gfx::IntPoint&, unsigned, unsigned)
|
||||
{
|
||||
}
|
||||
|
||||
void LayoutNode::handle_mouseup(Badge<EventHandler>, const Gfx::IntPoint&, unsigned, unsigned)
|
||||
{
|
||||
}
|
||||
|
||||
void LayoutNode::handle_mousemove(Badge<EventHandler>, const Gfx::IntPoint&, unsigned, unsigned)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user