Creates a new element builder for configuring and adding an element. Finalize with `.children(|ui| {...})` or `.empty()`.
(&mut self)
| 481 | /// Creates a new element builder for configuring and adding an element. |
| 482 | /// Finalize with `.children(|ui| {...})` or `.empty()`. |
| 483 | pub fn element(&mut self) -> ElementBuilder<'_, CustomElementData> { |
| 484 | ElementBuilder { |
| 485 | ply: &mut *self.ply, |
| 486 | inner: engine::ElementDeclaration::default(), |
| 487 | id: None, |
| 488 | on_hover_fn: None, |
| 489 | on_press_fn: None, |
| 490 | on_release_fn: None, |
| 491 | on_focus_fn: None, |
| 492 | on_unfocus_fn: None, |
| 493 | text_input_on_changed_fn: None, |
| 494 | text_input_on_submit_fn: None, |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | /// Adds a text element to the current open element or to the root layout. |
| 499 | pub fn text(&mut self, text: &str, config_fn: impl FnOnce(&mut TextConfig) -> &mut TextConfig) { |
no outgoing calls