pub struct FloatingViewConfig {
pub title: String,
pub bounds: Rect,
pub min_size: Size,
pub visible: bool,
pub closable: bool,
}Fields§
§title: String§bounds: Rect§min_size: Size§visible: bool§closable: boolWhether the view has a close button in its title bar, and closes on Escape. Closing hides the view.
Implementations§
Source§impl FloatingViewConfig
impl FloatingViewConfig
pub fn new(title: impl Into<String>, bounds: Rect) -> Self
Sourcepub fn closable(self, closable: bool) -> Self
pub fn closable(self, closable: bool) -> Self
Give the view a close button, and close it on Escape. Closing hides
the view; show it again with FloatingWorkspaceState::set_view_visible.
Sourcepub fn min_size(self, min_size: Size) -> Self
pub fn min_size(self, min_size: Size) -> Self
The smallest the view can be resized to; the workspace keeps it at least 120 by 120.
pub fn visible(self, visible: bool) -> Self
Trait Implementations§
Source§impl Clone for FloatingViewConfig
impl Clone for FloatingViewConfig
Source§impl Debug for FloatingViewConfig
impl Debug for FloatingViewConfig
Source§impl Default for FloatingViewConfig
impl Default for FloatingViewConfig
Source§impl PartialEq for FloatingViewConfig
impl PartialEq for FloatingViewConfig
impl StructuralPartialEq for FloatingViewConfig
Auto Trait Implementations§
impl Forget for FloatingViewConfig
impl Freeze for FloatingViewConfig
impl Move for FloatingViewConfig
impl RefUnwindSafe for FloatingViewConfig
impl Send for FloatingViewConfig
impl Sync for FloatingViewConfig
impl Unpin for FloatingViewConfig
impl UnsafeUnpin for FloatingViewConfig
impl UnwindSafe for FloatingViewConfig
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