fixed bad doc aliases

some in misc were labeled just "doc" instead of "doc(alias".
This commit is contained in:
Jonathan Spira 2021-04-03 10:55:37 -07:00
parent 80ae0bd7ed
commit 326ebbc164
2 changed files with 11 additions and 11 deletions

View File

@ -28,7 +28,7 @@ impl<'ui> Ui<'ui> {
/// with `size` set to `[0.0, 0.0]`, which will size the button to the /// with `size` set to `[0.0, 0.0]`, which will size the button to the
/// label's width in the current style. /// label's width in the current style.
/// the current style. /// the current style.
#[doc("Button")] #[doc(alias = "Button")]
pub fn button(&self, label: &ImStr) -> bool { pub fn button(&self, label: &ImStr) -> bool {
self.button_with_size(label, [0.0, 0.0]) self.button_with_size(label, [0.0, 0.0])
} }
@ -39,42 +39,42 @@ impl<'ui> Ui<'ui> {
/// ///
/// Setting `size` as `[0.0, 0.0]` will size the button to the label's width in /// Setting `size` as `[0.0, 0.0]` will size the button to the label's width in
/// the current style. /// the current style.
#[doc("Button")] #[doc(alias = "Button")]
pub fn button_with_size(&self, label: &ImStr, size: [f32; 2]) -> bool { pub fn button_with_size(&self, label: &ImStr, size: [f32; 2]) -> bool {
unsafe { sys::igButton(label.as_ptr(), size.into()) } unsafe { sys::igButton(label.as_ptr(), size.into()) }
} }
/// Renders a small clickable button that is easy to embed in text. /// Renders a small clickable button that is easy to embed in text.
/// ///
/// Returns true if this button was clicked. /// Returns true if this button was clicked.
#[doc("SmallButton")] #[doc(alias = "SmallButton")]
pub fn small_button(&self, label: &ImStr) -> bool { pub fn small_button(&self, label: &ImStr) -> bool {
unsafe { sys::igSmallButton(label.as_ptr()) } unsafe { sys::igSmallButton(label.as_ptr()) }
} }
/// Renders a widget with button behaviour without the visual look. /// Renders a widget with button behaviour without the visual look.
/// ///
/// Returns true if this button was clicked. /// Returns true if this button was clicked.
#[doc("InvisibleButton")] #[doc(alias = "InvisibleButton")]
pub fn invisible_button(&self, id: &ImStr, size: [f32; 2]) -> bool { pub fn invisible_button(&self, id: &ImStr, size: [f32; 2]) -> bool {
unsafe { sys::igInvisibleButton(id.as_ptr(), size.into(), 0) } unsafe { sys::igInvisibleButton(id.as_ptr(), size.into(), 0) }
} }
/// Renders a widget with button behaviour without the visual look. /// Renders a widget with button behaviour without the visual look.
/// ///
/// Returns true if this button was clicked. /// Returns true if this button was clicked.
#[doc("InvisibleButton")] #[doc(alias = "InvisibleButton")]
pub fn invisible_button_flags(&self, id: &ImStr, size: [f32; 2], flags: ButtonFlags) -> bool { pub fn invisible_button_flags(&self, id: &ImStr, size: [f32; 2], flags: ButtonFlags) -> bool {
unsafe { sys::igInvisibleButton(id.as_ptr(), size.into(), flags.bits() as i32) } unsafe { sys::igInvisibleButton(id.as_ptr(), size.into(), flags.bits() as i32) }
} }
/// Renders a square button with an arrow shape. /// Renders a square button with an arrow shape.
/// ///
/// Returns true if this button was clicked. /// Returns true if this button was clicked.
#[doc("ArrowButton")] #[doc(alias = "ArrowButton")]
pub fn arrow_button(&self, id: &ImStr, direction: Direction) -> bool { pub fn arrow_button(&self, id: &ImStr, direction: Direction) -> bool {
unsafe { sys::igArrowButton(id.as_ptr(), direction as i32) } unsafe { sys::igArrowButton(id.as_ptr(), direction as i32) }
} }
/// Renders a simple checkbox. /// Renders a simple checkbox.
/// ///
/// Returns true if this checkbox was clicked. /// Returns true if this checkbox was clicked.
#[doc("Checkbox")] #[doc(alias = "Checkbox")]
pub fn checkbox(&self, label: &ImStr, value: &mut bool) -> bool { pub fn checkbox(&self, label: &ImStr, value: &mut bool) -> bool {
unsafe { sys::igCheckbox(label.as_ptr(), value as *mut bool) } unsafe { sys::igCheckbox(label.as_ptr(), value as *mut bool) }
} }
@ -99,14 +99,14 @@ impl<'ui> Ui<'ui> {
/// Renders a simple radio button. /// Renders a simple radio button.
/// ///
/// Returns true if this radio button was clicked. /// Returns true if this radio button was clicked.
#[doc("RadioButtonBool")] #[doc(alias = "RadioButtonBool")]
pub fn radio_button_bool(&self, label: &ImStr, active: bool) -> bool { pub fn radio_button_bool(&self, label: &ImStr, active: bool) -> bool {
unsafe { sys::igRadioButtonBool(label.as_ptr(), active) } unsafe { sys::igRadioButtonBool(label.as_ptr(), active) }
} }
/// Renders a radio button suitable for choosing an arbitrary value. /// Renders a radio button suitable for choosing an arbitrary value.
/// ///
/// Returns true if this radio button was clicked. /// Returns true if this radio button was clicked.
#[doc("RadioButtonBool")] #[doc(alias = "RadioButtonBool")]
pub fn radio_button<T>(&self, label: &ImStr, value: &mut T, button_value: T) -> bool pub fn radio_button<T>(&self, label: &ImStr, value: &mut T, button_value: T) -> bool
where where
T: Copy + PartialEq, T: Copy + PartialEq,
@ -118,7 +118,7 @@ impl<'ui> Ui<'ui> {
pressed pressed
} }
/// Renders a small circle and keeps the cursor on the same line /// Renders a small circle and keeps the cursor on the same line
#[doc("Bullet")] #[doc(alias = "Bullet")]
pub fn bullet(&self) { pub fn bullet(&self) {
unsafe { sys::igBullet() }; unsafe { sys::igBullet() };
} }

View File

@ -20,7 +20,7 @@ pub struct ChildWindow<'a> {
impl<'a> ChildWindow<'a> { impl<'a> ChildWindow<'a> {
/// Creates a new child window builder with the given ID /// Creates a new child window builder with the given ID
#[doc(alas = "BeginChildID")] #[doc(alias = "BeginChildID")]
pub fn new<T: Into<Id<'a>>>(id: T) -> ChildWindow<'a> { pub fn new<T: Into<Id<'a>>>(id: T) -> ChildWindow<'a> {
ChildWindow { ChildWindow {
id: id.into(), id: id.into(),