pub struct Protractor { /* private fields */ }Expand description
A band of ticks along an arc that sets an angle, by a drag from anywhere on it. A double click goes back to zero. The arrows change it by a step (with Shift, ten), Home and End go to the ends, and Delete goes back to zero.
use ravenrs_reactive::State;
use ravenrs_widgets::Protractor;
let angle = State::new(0.0_f32);
let straighten = Protractor::new(angle.binding()).range(-45.0, 45.0).label("Straighten");Implementations§
Source§impl Protractor
impl Protractor
Sourcepub fn new(value: Binding<f32>) -> Self
pub fn new(value: Binding<f32>) -> Self
A band bound to value, in degrees, from -45 to 45 in steps of 0.1.
Sourcepub fn range(self, least: f32, most: f32) -> Self
pub fn range(self, least: f32, most: f32) -> Self
The least and the most it reaches, in degrees.
Trait Implementations§
Source§impl Debug for Protractor
impl Debug for Protractor
Auto Trait Implementations§
impl !RefUnwindSafe for Protractor
impl !Send for Protractor
impl !Sync for Protractor
impl !UnwindSafe for Protractor
impl Freeze for Protractor
impl Unpin for Protractor
impl UnsafeUnpin for Protractor
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<V> ViewExt for Vwhere
V: View,
impl<V> ViewExt for Vwhere
V: View,
Source§fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
fn padding(self, padding: impl Into<Insets>) -> Styled<Self>
Adds padding inside the box, in logical pixels.
Source§fn background(self, fill: impl Into<Fill>) -> Styled<Self>
fn background(self, fill: impl Into<Fill>) -> Styled<Self>
Paints a background behind the content.
Source§fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
fn frame(self, width: Option<f32>, height: Option<f32>) -> Styled<Self>
Fixes the width and/or height in logical pixels;
None keeps the content size.