Skip to content

Commit

Permalink
Improve docstring of Ui::new_child
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Sep 19, 2024
1 parent 00cb50e commit 5cc35d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/egui/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,14 @@ impl Ui {
}

/// Create a child `Ui` with the properties of the given builder.
///
/// This is a very low-level function.
/// Usually you are better off using [`Self::scope_builder`].
///
/// Note that calling this does not allocate any space in the parent `Ui`,
/// so after adding widgets to the child `Ui` you probably want to allocate
/// the [`Ui::min_rect`] of the child in the parent `Ui` using e.g.
/// [`Ui::advance_cursor_after_rect`].
pub fn new_child(&mut self, ui_builder: UiBuilder) -> Self {
let UiBuilder {
id_salt,
Expand Down

0 comments on commit 5cc35d2

Please sign in to comment.