2021-04-03 09:07:45 -04:00
|
|
|
/*
|
2022-01-31 13:07:22 -05:00
|
|
|
* Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
|
2022-03-10 14:02:25 +01:00
|
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
2021-04-03 09:07:45 -04:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-04-03 09:07:45 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibGUI/Event.h>
|
2021-04-03 20:33:10 -04:00
|
|
|
#include <LibWeb/DOM/Document.h>
|
2021-04-03 21:50:53 -04:00
|
|
|
#include <LibWeb/Layout/Label.h>
|
2021-04-03 09:07:45 -04:00
|
|
|
#include <LibWeb/Layout/RadioButton.h>
|
2022-03-10 14:02:25 +01:00
|
|
|
#include <LibWeb/Painting/RadioButtonPaintable.h>
|
2021-04-03 09:07:45 -04:00
|
|
|
|
|
|
|
namespace Web::Layout {
|
|
|
|
|
|
|
|
RadioButton::RadioButton(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
2021-04-03 21:50:53 -04:00
|
|
|
: LabelableNode(document, element, move(style))
|
2021-04-03 09:07:45 -04:00
|
|
|
{
|
|
|
|
set_intrinsic_width(12);
|
|
|
|
set_intrinsic_height(12);
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton::~RadioButton()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-03-10 22:38:08 +01:00
|
|
|
RefPtr<Painting::Paintable> RadioButton::create_paintable() const
|
2022-03-10 14:02:25 +01:00
|
|
|
{
|
|
|
|
return Painting::RadioButtonPaintable::create(*this);
|
|
|
|
}
|
|
|
|
|
2021-04-03 09:07:45 -04:00
|
|
|
}
|