pub struct WindowOptions {
pub visible: bool,
pub position: WindowPosition,
pub width: f32,
pub height: f32,
pub title_bar: bool,
pub background: bool,
pub title_bar_background: bool,
pub resize: bool,
pub auto_resize: bool,
pub scroll: bool,
pub scroll_bar: bool,
pub hotkey: WindowHotkey,
}Expand description
Window options.
Fields§
§visible: boolWhether the window is (currently) visible.
position: WindowPositionPosition of the window.
width: f32Width of the window in pixels.
height: f32Height of the window in pixels.
title_bar: boolWhether to show the window titlebar.
background: boolWhether to show the window body background.
title_bar_background: boolWhether to show the window titlebar background.
resize: boolWhether to allow manually resizing the window.
auto_resize: boolWhether to automatically resize the window according to contents.
scroll: boolWhether to allow scrolling.
scroll_bar: boolWhether to show the scrollbar.
hotkey: WindowHotkeyHotkey to open the window with.
Implementations§
Source§impl WindowOptions
impl WindowOptions
Source§impl WindowOptions
impl WindowOptions
Sourcepub fn render_window<'ui>(
&mut self,
ui: &'ui Ui<'_>,
name: &str,
) -> Option<WindowToken<'ui>>
pub fn render_window<'ui>( &mut self, ui: &'ui Ui<'_>, name: &str, ) -> Option<WindowToken<'ui>>
Renders the window according to the options.
Trait Implementations§
Source§impl Clone for WindowOptions
impl Clone for WindowOptions
Source§fn clone(&self) -> WindowOptions
fn clone(&self) -> WindowOptions
Returns a copy 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 Debug for WindowOptions
impl Debug for WindowOptions
Source§impl Default for WindowOptions
impl Default for WindowOptions
Source§impl Hideable for WindowOptions
impl Hideable for WindowOptions
Source§fn is_visible(&self) -> bool
fn is_visible(&self) -> bool
Returns whether the component is currently visible.
Source§fn visible_mut(&mut self) -> &mut bool
fn visible_mut(&mut self) -> &mut bool
Returns a mutable reference to the component’s visibility state.
Source§fn toggle_visibility(&mut self)
fn toggle_visibility(&mut self)
Toggles the component’s visibility.
Source§fn set_visibility(&mut self, visible: bool)
fn set_visibility(&mut self, visible: bool)
Sets the component’s visibility state.
Auto Trait Implementations§
impl Freeze for WindowOptions
impl RefUnwindSafe for WindowOptions
impl Send for WindowOptions
impl Sync for WindowOptions
impl Unpin for WindowOptions
impl UnwindSafe for WindowOptions
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