Files
wayvr/wgui/src/parser/component_radio_group.rs
galister e6e1764b36 fmt
2026-01-09 11:48:44 +09:00

24 lines
685 B
Rust

use crate::{
components::{Component, radio_group},
layout::WidgetID,
parser::{AttribPair, ParserContext, ParserFile, parse_children, process_component, style::parse_style},
};
pub fn parse_component_radio_group<'a>(
file: &'a ParserFile,
ctx: &mut ParserContext,
node: roxmltree::Node<'a, 'a>,
parent_id: WidgetID,
attribs: &[AttribPair],
tag_name: &str,
) -> anyhow::Result<WidgetID> {
let style = parse_style(ctx, attribs, tag_name);
let (widget, component) = radio_group::construct(&mut ctx.get_construct_essentials(parent_id), style)?;
process_component(ctx, Component(component), widget.id, attribs);
parse_children(file, ctx, node, widget.id)?;
Ok(widget.id)
}