diff --git a/imgui/src/lib.rs b/imgui/src/lib.rs index c4d4fe7..124e005 100644 --- a/imgui/src/lib.rs +++ b/imgui/src/lib.rs @@ -456,6 +456,7 @@ impl Ui { // Widgets: Input impl<'ui> Ui { + /// Edits text in a single line input widget #[doc(alias = "InputText", alias = "InputTextWithHint")] pub fn input_text<'p, L: AsRef>( &'ui self, @@ -464,6 +465,8 @@ impl<'ui> Ui { ) -> InputText<'ui, 'p, L> { InputText::new(self, label, buf) } + + /// Edits text in a multi line widget #[doc(alias = "InputText", alias = "InputTextMultiline")] pub fn input_text_multiline<'p, L: AsRef>( &'ui self, @@ -473,6 +476,8 @@ impl<'ui> Ui { ) -> InputTextMultiline<'ui, 'p, L> { InputTextMultiline::new(self, label, buf, size) } + + /// Simple floating point number widget #[doc(alias = "InputFloat2")] pub fn input_float<'p, L: AsRef>( &'ui self, @@ -793,6 +798,7 @@ impl Ui { } impl<'ui> Ui { + /// Plot a list of floats as a "sparkline" style plot #[doc(alias = "PlotLines")] pub fn plot_lines<'p, Label: AsRef>( &'ui self, @@ -802,6 +808,7 @@ impl<'ui> Ui { PlotLines::new(self, label, values) } + /// Plot a list of floats as a histogram #[doc(alias = "PlotHistogram")] pub fn plot_histogram<'p, Label: AsRef>( &'ui self, @@ -854,7 +861,11 @@ impl<'ui> Ui { /// # Draw list for custom drawing impl Ui { - /// Get access to drawing API + /// Get access to drawing API. + /// + /// The window draw list draws within the current + /// window. Coordinates are within the current window coordinates, + /// so `[0.0, 0.0]` would be at beginning of window /// /// # Examples /// @@ -889,12 +900,24 @@ impl Ui { DrawListMut::window(self) } + /// Get draw list to draw behind all windows + /// + /// Coordinates are in window coordinates, so `[0.0, 0.0]` is at + /// top left of the Dear ImGui window + /// + /// See [`Self::get_window_draw_list`] for more details #[must_use] #[doc(alias = "GetBackgroundDrawList")] pub fn get_background_draw_list(&self) -> DrawListMut<'_> { DrawListMut::background(self) } + /// Get draw list instance to draw above all window content + /// + /// Coordinates are in window coordinates, so `[0.0, 0.0]` is at + /// top left of the Dear ImGui window + /// + /// See [`Self::get_window_draw_list`] for more details #[must_use] #[doc(alias = "GetForegroundDrawList")] pub fn get_foreground_draw_list(&self) -> DrawListMut<'_> {