pub struct NodeLayoutArea<'a, F> { /* private fields */ }Expand description
Node layout area widget
Implementations§
Source§impl<'a, F> NodeLayoutArea<'a, F>
impl<'a, F> NodeLayoutArea<'a, F>
Sourcepub fn new(layout: &'a mut NodeLayout, content_fn: F) -> Self
pub fn new(layout: &'a mut NodeLayout, content_fn: F) -> Self
Create a new node layout area
Show/hide the menu bar
Set menu bar height
Sourcepub fn lock_level(self, level: LockLevel) -> Self
pub fn lock_level(self, level: LockLevel) -> Self
Set lock level (controls what operations are allowed)
Sourcepub fn title_height(self, height: f32) -> Self
pub fn title_height(self, height: f32) -> Self
Set title bar height
Sourcepub fn content_padding(self, padding: f32) -> Self
pub fn content_padding(self, padding: f32) -> Self
Set content padding (defaults to theme.spacing_sm)
Sourcepub fn grid_alpha(self, alpha: u8) -> Self
pub fn grid_alpha(self, alpha: u8) -> Self
Set grid line alpha (0-255)
Sourcepub fn zoom_range(self, min: f32, max: f32) -> Self
pub fn zoom_range(self, min: f32, max: f32) -> Self
Set zoom range (min, max scale)
Sourcepub fn show(self, ui: &mut Ui) -> Vec<NodeLayoutEvent>
pub fn show(self, ui: &mut Ui) -> Vec<NodeLayoutEvent>
Show the layout
Auto Trait Implementations§
impl<'a, F> Freeze for NodeLayoutArea<'a, F>where
F: Freeze,
impl<'a, F> RefUnwindSafe for NodeLayoutArea<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for NodeLayoutArea<'a, F>where
F: Send,
impl<'a, F> Sync for NodeLayoutArea<'a, F>where
F: Sync,
impl<'a, F> Unpin for NodeLayoutArea<'a, F>where
F: Unpin,
impl<'a, F> UnsafeUnpin for NodeLayoutArea<'a, F>where
F: UnsafeUnpin,
impl<'a, F> !UnwindSafe for NodeLayoutArea<'a, F>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.