Some documentation improvements
This commit is contained in:
parent
cb797a489a
commit
5e46bd404c
3 changed files with 10 additions and 2 deletions
|
@ -60,6 +60,10 @@ impl Ui {
|
|||
// ------------------------------------------------------------------------
|
||||
// Creation:
|
||||
|
||||
/// Create a new `Ui`.
|
||||
///
|
||||
/// Normally you would not use this directly, but instead use
|
||||
/// [`SidePanel`], [`TopPanel`], [`CentralPanel`], [`Window`] or [`Area`].
|
||||
pub fn new(ctx: CtxRef, layer_id: LayerId, id: Id, max_rect: Rect, clip_rect: Rect) -> Self {
|
||||
let style = ctx.style();
|
||||
Ui {
|
||||
|
@ -72,6 +76,7 @@ impl Ui {
|
|||
}
|
||||
}
|
||||
|
||||
/// Create a new `Ui` at a specific region.
|
||||
pub fn child_ui(&mut self, max_rect: Rect, layout: Layout) -> Self {
|
||||
debug_assert!(!max_rect.any_nan());
|
||||
let next_auto_id_source = Id::new(self.next_auto_id_source).with("child").value();
|
||||
|
|
|
@ -145,9 +145,9 @@ impl Label {
|
|||
self
|
||||
}
|
||||
|
||||
/// Make the label response to clicks and/or drags.
|
||||
/// Make the label respond to clicks and/or drags.
|
||||
///
|
||||
/// By default, a label is inert and does not response to click or drags.
|
||||
/// By default, a label is inert and does not respond to click or drags.
|
||||
/// By calling this you can turn the label into a button of sorts.
|
||||
/// This will also give the label the hover-effect of a button, but without the frame.
|
||||
///
|
||||
|
|
|
@ -215,6 +215,9 @@ impl Curve {
|
|||
}
|
||||
|
||||
/// Name of this curve.
|
||||
///
|
||||
/// If a curve is given a name it will show up in the plot legend
|
||||
/// (if legends are turned on).
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
pub fn name(mut self, name: impl ToString) -> Self {
|
||||
self.name = name.to_string();
|
||||
|
|
Loading…
Reference in a new issue