Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-engine

Source of release 0.6.1

0.6.1 / src / web / layout / radio_button.lucb

#==============================================================================================
#
#   radio_button - Layout::RadioButton: the box of <input type=radio>
#
#   DESCRIPTION:
#       Port of LibWeb/Layout/RadioButton.cpp (lines 1-29) and RadioButton.h: a 12x12 replaced
#       box painted by RadioButtonPaintable.
#
#       Copyright (c) 2021, Tim Flynn <trflynn89@serenityos.org>
#       SPDX-License-Identifier: BSD-2-Clause
#
#==============================================================================================

## Ported from Libraries/LibWeb/Layout/RadioButton.cpp:17 Web::Layout::RadioButton::RadioButton.
pub func layout_radio_button_construct(this: LayoutRadioButton*, document: DomDocument*, element: HtmlInputElement*, style: CssComputedProperties*):
    layout_replaced_box_construct(this.layout_replaced_box(), document, element.dom_element(), style)

## Ported from Libraries/LibWeb/Layout/RadioButton.h:23 Web::Layout::RadioButton::compute_auto_content_box_size (override).
pub func layout_radio_button_compute_auto_content_box_size_impl(base: LayoutBox*) -> CssSizeWithAspectRatio:
    _ = base
    return CssSizeWithAspectRatio(width = gfx.CssPixels.from_int(12), height = gfx.CssPixels.from_int(12), aspect_ratio = none)

## Ported from Libraries/LibWeb/Layout/RadioButton.cpp:24 Web::Layout::RadioButton::create_paintable (override).
pub func layout_radio_button_create_paintable_impl(base: LayoutNode*) -> PaintPaintable*?:
    return paint_radio_button_paintable_create((LayoutRadioButton*)base).paint_paintable()