pub struct AngleSlider<Label, Format = &'static str> { /* private fields */ }
Expand description
Builder for an angle slider widget.
Implementations§
Source§impl<Label> AngleSlider<Label>
impl<Label> AngleSlider<Label>
Sourcepub fn new(label: Label) -> AngleSlider<Label>
pub fn new(label: Label) -> AngleSlider<Label>
Constructs a new angle slider builder, where its minimum defaults to -360.0 and maximum defaults to 360.0
Source§impl<Label, Format> AngleSlider<Label, Format>
impl<Label, Format> AngleSlider<Label, Format>
Sourcepub fn range_degrees(
self,
min_degrees: f32,
max_degrees: f32,
) -> AngleSlider<Label, Format>
pub fn range_degrees( self, min_degrees: f32, max_degrees: f32, ) -> AngleSlider<Label, Format>
Sets the range in degrees (inclusive)
imgui::AngleSlider::new("Example")
.range_degrees(-20.0, 20.0)
// Remember to call .build(&ui)
;
It is safe, though up to C++ Dear ImGui, on how to handle when
min > max
.
Sourcepub fn min_degrees(self, min_degrees: f32) -> AngleSlider<Label, Format>
pub fn min_degrees(self, min_degrees: f32) -> AngleSlider<Label, Format>
Sets the minimum value (in degrees)
Sourcepub fn max_degrees(self, max_degrees: f32) -> AngleSlider<Label, Format>
pub fn max_degrees(self, max_degrees: f32) -> AngleSlider<Label, Format>
Sets the maximum value (in degrees)
Sourcepub fn display_format<Format2>(
self,
display_format: Format2,
) -> AngleSlider<Label, Format2>
pub fn display_format<Format2>( self, display_format: Format2, ) -> AngleSlider<Label, Format2>
Sets the display format using a C-style printf string
Sourcepub fn flags(self, flags: SliderFlags) -> AngleSlider<Label, Format>
pub fn flags(self, flags: SliderFlags) -> AngleSlider<Label, Format>
Replaces all current settings with the given flags
Trait Implementations§
Source§impl<Label, Format> Clone for AngleSlider<Label, Format>
impl<Label, Format> Clone for AngleSlider<Label, Format>
Source§fn clone(&self) -> AngleSlider<Label, Format>
fn clone(&self) -> AngleSlider<Label, Format>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Label, Format> Debug for AngleSlider<Label, Format>
impl<Label, Format> Debug for AngleSlider<Label, Format>
impl<Label, Format> Copy for AngleSlider<Label, Format>
Auto Trait Implementations§
impl<Label, Format> Freeze for AngleSlider<Label, Format>
impl<Label, Format> RefUnwindSafe for AngleSlider<Label, Format>where
Label: RefUnwindSafe,
Format: RefUnwindSafe,
impl<Label, Format> Send for AngleSlider<Label, Format>
impl<Label, Format> Sync for AngleSlider<Label, Format>
impl<Label, Format> Unpin for AngleSlider<Label, Format>
impl<Label, Format> UnwindSafe for AngleSlider<Label, Format>where
Label: UnwindSafe,
Format: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more