pub struct ZoomControl { /* private fields */ }Expand description
Fit, 1:1, the current percentage and the buttons that zoom in and out, for a ZoomView.
It works from a toolbar of its own or inside a
FloatingToolbar.
use ravenrs_reactive::State;
use ravenrs_widgets::{ZoomControl, ZoomView};
let view = State::new(ZoomView::fit());
let control = ZoomControl::new(view.binding()).range(0.1, 8.0);Implementations§
Source§impl ZoomControl
impl ZoomControl
Sourcepub fn range(self, least: f32, most: f32) -> Self
pub fn range(self, least: f32, most: f32) -> Self
The least and the most its buttons reach, as a scale where 1 is 100%. Match it to
the range of the ZoomPanView that shares the view.
Sourcepub fn size(self, size: ButtonSize) -> Self
pub fn size(self, size: ButtonSize) -> Self
The size of its buttons.
Trait Implementations§
Source§impl Debug for ZoomControl
impl Debug for ZoomControl
Auto Trait Implementations§
impl !RefUnwindSafe for ZoomControl
impl !Send for ZoomControl
impl !Sync for ZoomControl
impl !UnwindSafe for ZoomControl
impl Freeze for ZoomControl
impl Unpin for ZoomControl
impl UnsafeUnpin for ZoomControl
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.