[−][src]Struct neutrino::Window
A window containing the widgets
Fields
title: String
width: i32
height: i32
resizable: bool
debug: bool
theme: Theme
style: String
child: Option<Box<dyn Widget>>
menubar: Option<MenuBar>
listener: Option<Box<dyn WindowListener>>
timer: Option<u32>;
Default values
title: "Untitled".to_string(),
width: 640
height: 480
resizable: false
debug: false
theme: Theme::Default
style: "".to_string()
child: None
menubar: None
listener: None
timer: None
Example
use neutrino::{Window, App}; fn main() { let mut my_window = Window::new(); my_window.set_title("Title"); my_window.set_size(800, 600); my_window.set_resizable(); // App::run(window); }
Methods
impl Window
[src]
pub fn new() -> Self
[src]
Create a Window
pub fn set_child(&mut self, widget: Box<dyn Widget>)
[src]
Set the child
pub fn set_menubar(&mut self, menubar: MenuBar)
[src]
Set the menubar
pub fn set_title(&mut self, title: &str)
[src]
Set the title
pub fn set_size(&mut self, width: i32, height: i32)
[src]
Set the size (width and height)
pub fn set_resizable(&mut self)
[src]
Set the resizable flag to true
pub fn set_debug(&mut self)
[src]
Set the debug flag to true
pub fn set_theme(&mut self, theme: Theme)
[src]
Set the theme
pub fn set_style(&mut self, style: &str)
[src]
Set the style
pub fn set_listener(&mut self, listener: Box<dyn WindowListener>)
[src]
Set the listener
pub fn set_timer(&mut self, period: u32)
[src]
Set the timer
The app will send a Tick event with a defined period
Auto Trait Implementations
impl !Send for Window
impl Unpin for Window
impl !Sync for Window
impl !UnwindSafe for Window
impl !RefUnwindSafe for Window
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,