pub struct Window { /* private fields */ }
Expand description
A window
Implementations§
Source§impl Window
impl Window
Sourcepub fn new_flags(
x: i32,
y: i32,
w: u32,
h: u32,
title: &str,
flags: &[WindowFlag],
) -> Option<Self>
pub fn new_flags( x: i32, y: i32, w: u32, h: u32, title: &str, flags: &[WindowFlag], ) -> Option<Self>
Create a new window with flags
pub fn event_sender(&self) -> EventSender
pub fn clipboard(&self) -> String
pub fn set_clipboard(&mut self, text: &str)
Sourcepub fn pop_drop_content(&self) -> Option<String>
pub fn pop_drop_content(&self) -> Option<String>
Pops the content of the last drop event from the window.
pub fn sync_path(&mut self)
Sourcepub fn set_mouse_cursor(&mut self, visible: bool)
pub fn set_mouse_cursor(&mut self, visible: bool)
Set cursor visibility
Sourcepub fn set_mouse_grab(&mut self, grab: bool)
pub fn set_mouse_grab(&mut self, grab: bool)
Set mouse grabbing
Sourcepub fn set_mouse_relative(&mut self, relative: bool)
pub fn set_mouse_relative(&mut self, relative: bool)
Set mouse relative mode
Trait Implementations§
Source§impl Renderer for Window
impl Renderer for Window
Source§fn arc(&mut self, x0: i32, y0: i32, radius: i32, parts: u8, color: Color)
fn arc(&mut self, x0: i32, y0: i32, radius: i32, parts: u8, color: Color)
Draw a piece of an arc. Negative radius will fill in the inside
Source§fn circle(&mut self, x0: i32, y0: i32, radius: i32, color: Color)
fn circle(&mut self, x0: i32, y0: i32, radius: i32, color: Color)
Draw a circle. Negative radius will fill in the inside
fn line4points(&mut self, x0: i32, y0: i32, x: i32, y: i32, color: Color)
fn lines(&mut self, points: &[[i32; 2]], color: Color)
Source§fn draw_path_stroke(&mut self, graphicspath: GraphicsPath, color: Color)
fn draw_path_stroke(&mut self, graphicspath: GraphicsPath, color: Color)
Draw a path (GraphicsPath)
Source§fn char(&mut self, x: i32, y: i32, c: char, color: Color)
fn char(&mut self, x: i32, y: i32, c: char, color: Color)
Draw a character, using the loaded font
fn rect(&mut self, x: i32, y: i32, w: u32, h: u32, color: Color)
fn box_blur(&mut self, x: i32, y: i32, w: u32, h: u32, r: i32)
fn box_shadow( &mut self, x: i32, y: i32, w: u32, h: u32, offset_x: i32, offset_y: i32, r: i32, color: Color, )
Source§fn image(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, data: &[Color])
fn image(&mut self, start_x: i32, start_y: i32, w: u32, h: u32, data: &[Color])
Display an image
fn image_legacy( &mut self, start_x: i32, start_y: i32, w: u32, h: u32, data: &[Color], )
Source§fn image_over(&mut self, start: i32, image_data: &[Color])
fn image_over(&mut self, start: i32, image_data: &[Color])
Display an image overwriting a portion of window starting at given line : very quick!!
Source§fn image_opaque(
&mut self,
start_x: i32,
start_y: i32,
w: u32,
h: u32,
image_data: &[Color],
)
fn image_opaque( &mut self, start_x: i32, start_y: i32, w: u32, h: u32, image_data: &[Color], )
Display an image using non transparent method
fn image_fast( &mut self, start_x: i32, start_y: i32, w: u32, h: u32, image_data: &[Color], )
Source§fn linear_gradient(
&mut self,
rect_x: i32,
rect_y: i32,
rect_width: u32,
rect_height: u32,
start_x: i32,
start_y: i32,
end_x: i32,
end_y: i32,
start_color: Color,
end_color: Color,
)
fn linear_gradient( &mut self, rect_x: i32, rect_y: i32, rect_width: u32, rect_height: u32, start_x: i32, start_y: i32, end_x: i32, end_y: i32, start_color: Color, end_color: Color, )
Draw a linear gradient in a rectangular region
Source§fn rounded_rect(
&mut self,
x: i32,
y: i32,
w: u32,
h: u32,
radius: u32,
filled: bool,
color: Color,
)
fn rounded_rect( &mut self, x: i32, y: i32, w: u32, h: u32, radius: u32, filled: bool, color: Color, )
Draw a rect with rounded corners
Auto Trait Implementations§
impl !Freeze for Window
impl !RefUnwindSafe for Window
impl !Send for Window
impl !Sync for Window
impl Unpin for Window
impl UnwindSafe for Window
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