mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:45:06 +00:00

Input events have nothing to do with layout, so let's not send them to layout nodes. The job of Paintable starts to become clear. It represents a paintable item that can be rendered into the viewport, which means it can also be targeted by the mouse cursor.
26 lines
600 B
C++
26 lines
600 B
C++
/*
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/Painting/LabelablePaintable.h>
|
|
|
|
namespace Web::Painting {
|
|
|
|
Layout::LabelableNode const& LabelablePaintable::layout_box() const
|
|
{
|
|
return static_cast<Layout::LabelableNode const&>(PaintableBox::layout_box());
|
|
}
|
|
|
|
Layout::LabelableNode& LabelablePaintable::layout_box()
|
|
{
|
|
return static_cast<Layout::LabelableNode&>(PaintableBox::layout_box());
|
|
}
|
|
|
|
LabelablePaintable::LabelablePaintable(Layout::LabelableNode const& layout_node)
|
|
: PaintableBox(layout_node)
|
|
{
|
|
}
|
|
|
|
}
|