Añade funcionalidades en bundles de componentes

This commit is contained in:
Manuel Cillero 2023-06-11 03:29:25 +02:00
parent a455488044
commit 4ae6580357
11 changed files with 114 additions and 15 deletions

View file

@ -164,6 +164,12 @@ impl Container {
self
}
#[fn_builder]
pub fn alter_bundle(&mut self, op: BundleOp, component: impl ComponentTrait) -> &mut Self {
self.components.alter_bundle(op, component);
self
}
#[fn_builder]
pub fn alter_template(&mut self, template: &str) -> &mut Self {
self.template = template.to_owned();

View file

@ -130,6 +130,12 @@ impl Form {
self
}
#[fn_builder]
pub fn alter_bundle(&mut self, op: BundleOp, element: impl ComponentTrait) -> &mut Self {
self.elements.alter_bundle(op, element);
self
}
#[fn_builder]
pub fn alter_template(&mut self, template: &str) -> &mut Self {
self.template = template.to_owned();

View file

@ -145,6 +145,12 @@ impl Column {
self
}
#[fn_builder]
pub fn alter_bundle(&mut self, op: BundleOp, component: impl ComponentTrait) -> &mut Self {
self.components.alter_bundle(op, component);
self
}
#[fn_builder]
pub fn alter_template(&mut self, template: &str) -> &mut Self {
self.template = template.to_owned();

View file

@ -92,6 +92,12 @@ impl Row {
self
}
#[fn_builder]
pub fn alter_bundle(&mut self, op: BundleOp, column: grid::Column) -> &mut Self {
self.columns.alter_bundle(op, column);
self
}
#[fn_builder]
pub fn alter_template(&mut self, template: &str) -> &mut Self {
self.template = template.to_owned();

View file

@ -103,6 +103,12 @@ impl Paragraph {
self
}
#[fn_builder]
pub fn alter_bundle(&mut self, op: BundleOp, component: impl ComponentTrait) -> &mut Self {
self.components.alter_bundle(op, component);
self
}
#[rustfmt::skip]
#[fn_builder]
pub fn alter_display(&mut self, display: ParagraphDisplay) -> &mut Self {