pub struct Window<T> {
pub name: String,
pub inner: T,
pub options: WindowOptions,
}
Expand description
Window component.
Fields§
§name: String
The name (title) of the window.
inner: T
Inner Component
responsible for rendering content.
options: WindowOptions
Current window options state.
Implementations§
source§impl<T> Window<T>
impl<T> Window<T>
sourcepub fn new<P>(name: impl Into<String>, inner: T, options: WindowOptions) -> Selfwhere
T: Windowable<P>,
pub fn new<P>(name: impl Into<String>, inner: T, options: WindowOptions) -> Selfwhere
T: Windowable<P>,
Creates a new window with WindowOptions
and the passed Windowable
component.
sourcepub fn with_default<P>(name: impl Into<String>, options: WindowOptions) -> Selfwhere
T: Default + Windowable<P>,
pub fn with_default<P>(name: impl Into<String>, options: WindowOptions) -> Selfwhere
T: Default + Windowable<P>,
Creates a new window with WindowOptions
and a default Windowable
component.
Trait Implementations§
source§impl<T, P> Component<P> for Window<T>where
T: Windowable<P>,
impl<T, P> Component<P> for Window<T>where
T: Windowable<P>,
source§impl<T> HasSettings for Window<T>where
T: HasSettings,
impl<T> HasSettings for Window<T>where
T: HasSettings,
type Settings = WindowSettings<T>
source§const SETTINGS_ID: &'static str = T::SETTINGS_ID
const SETTINGS_ID: &'static str = T::SETTINGS_ID
The component’s settings id.
source§fn current_settings(&self) -> Self::Settings
fn current_settings(&self) -> Self::Settings
Returns the component’s current settings state.
source§fn load_settings(&mut self, loaded: Self::Settings)
fn load_settings(&mut self, loaded: Self::Settings)
Loads the component’s settings from a loaded state.
source§impl<T> Hideable for Window<T>
impl<T> Hideable for Window<T>
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<T> Freeze for Window<T>where
T: Freeze,
impl<T> RefUnwindSafe for Window<T>where
T: RefUnwindSafe,
impl<T> Send for Window<T>where
T: Send,
impl<T> Sync for Window<T>where
T: Sync,
impl<T> Unpin for Window<T>where
T: Unpin,
impl<T> UnwindSafe for Window<T>where
T: UnwindSafe,
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