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,
Source§const SETTINGS_ID: &'static str = T::SETTINGS_ID
const SETTINGS_ID: &'static str = T::SETTINGS_ID
The component’s settings id.
type Settings = WindowSettings<T>
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§fn reset_settings(&mut self)
fn reset_settings(&mut self)
Resets the component’s settings to the defaults.
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