Trait fltk::prelude::WindowExt [−][src]
pub unsafe trait WindowExt: GroupExt {}Show methods
fn center_screen(self) -> Self
where
Self: Sized; fn make_modal(&mut self, val: bool); fn fullscreen(&mut self, val: bool); fn make_current(&mut self); fn icon(&self) -> Option<Box<dyn ImageExt>>; fn set_icon<T: ImageExt>(&mut self, image: Option<T>)
where
Self: Sized; fn set_cursor(&mut self, cursor: Cursor); fn shown(&self) -> bool; fn set_border(&mut self, flag: bool); fn border(&self) -> bool; fn free_position(&mut self); fn raw_handle(&self) -> RawHandle; unsafe fn set_raw_handle(&mut self, handle: RawHandle); fn region(&self) -> Region; unsafe fn set_region(&mut self, region: Region); fn iconize(&mut self); fn fullscreen_active(&self) -> bool; fn decorated_w(&self) -> i32; fn decorated_h(&self) -> i32; fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32); fn hotspot<W: WidgetExt>(&mut self, w: &W)
where
Self: Sized; fn set_shape<I: ImageExt>(&mut self, image: Option<I>)
where
Self: Sized; fn shape(&self) -> Option<Box<dyn ImageExt>>; fn x_root(&self) -> i32; fn y_root(&self) -> i32; fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32); fn default_cursor(&mut self, cursor: Cursor);
Expand description
Defines the methods implemented by all window widgets
Required methods
fn center_screen(self) -> Self where
Self: Sized,
[src]
Self: Sized,
Expand description
Positions the window to the center of the screen
fn make_modal(&mut self, val: bool)
[src]
Expand description
Makes a window modal, should be called before show
fn fullscreen(&mut self, val: bool)
[src]
Expand description
Makes a window fullscreen
fn make_current(&mut self)
[src]
Expand description
Makes the window current
fn icon(&self) -> Option<Box<dyn ImageExt>>
[src]
Expand description
Returns the icon of the window
fn set_icon<T: ImageExt>(&mut self, image: Option<T>) where
Self: Sized,
[src]
Self: Sized,
Expand description
Sets the windows icon. Supported formats are bmp, jpeg, png and rgb.
fn set_cursor(&mut self, cursor: Cursor)
[src]
Expand description
Sets the cursor style within the window. Needs to be called after the window is shown
fn shown(&self) -> bool
[src]
Expand description
Returns whether a window is shown
fn set_border(&mut self, flag: bool)
[src]
Expand description
Sets whether the window has a border
fn border(&self) -> bool
[src]
Expand description
Returns whether a window has a border
fn free_position(&mut self)
[src]
Expand description
Frees the position of the window
fn raw_handle(&self) -> RawHandle
[src]
Expand description
Get the raw system handle of the window
unsafe fn set_raw_handle(&mut self, handle: RawHandle)
[src]
Expand description
Set the window associated with a raw handle.
RawHandle
is a void pointer to: (Windows: HWND
, X11: Xid
(u64
), macOS: NSWindow
)
Safety
The data must be valid and is OS-dependent. The window must be shown.
fn region(&self) -> Region
[src]
Expand description
Get the graphical draw region of the window
unsafe fn set_region(&mut self, region: Region)
[src]
Expand description
fn iconize(&mut self)
[src]
Expand description
Iconifies the window. You can tell that the window is iconized by checking that it’s shown and not visible
fn fullscreen_active(&self) -> bool
[src]
Expand description
Returns whether the window is fullscreen or not
fn decorated_w(&self) -> i32
[src]
Expand description
Returns the decorated width
fn decorated_h(&self) -> i32
[src]
Expand description
Returns the decorated height
fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
[src]
Expand description
Set the window’s minimum width, minimum height, max width and max height
fn hotspot<W: WidgetExt>(&mut self, w: &W) where
Self: Sized,
[src]
Self: Sized,
Expand description
Set the hotspot widget of the window
fn set_shape<I: ImageExt>(&mut self, image: Option<I>) where
Self: Sized,
[src]
Self: Sized,
Expand description
Set the shape of the window. Supported image formats are BMP, RGB and Pixmap. The window covers non-transparent/non-black shape of the image. The image must not be scaled(resized) beforehand. The size will be adapted to the window’s size
fn shape(&self) -> Option<Box<dyn ImageExt>>
[src]
Expand description
Get the shape of the window
fn x_root(&self) -> i32
[src]
Expand description
Get the window’s x coord from the screen
fn y_root(&self) -> i32
[src]
Expand description
Get the window’s y coord from the screen
fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32)
[src]
Expand description
Set the cursor image
fn default_cursor(&mut self, cursor: Cursor)
[src]
Expand description
Set the window’s default cursor
Implementors
impl WindowExt for DoubleWindow
[src]
impl WindowExt for DoubleWindow
[src]fn center_screen(self) -> Self
[src]
fn make_modal(&mut self, val: bool)
[src]
fn fullscreen(&mut self, val: bool)
[src]
fn make_current(&mut self)
[src]
fn icon(&self) -> Option<Box<dyn ImageExt>>
[src]
fn set_icon<T: ImageExt>(&mut self, image: Option<T>)
[src]
fn set_cursor(&mut self, cursor: Cursor)
[src]
fn shown(&self) -> bool
[src]
fn set_border(&mut self, flag: bool)
[src]
fn border(&self) -> bool
[src]
fn free_position(&mut self)
[src]
fn raw_handle(&self) -> RawHandle
[src]
unsafe fn set_raw_handle(&mut self, handle: RawHandle)
[src]
fn region(&self) -> Region
[src]
unsafe fn set_region(&mut self, region: Region)
[src]
fn iconize(&mut self)
[src]
fn fullscreen_active(&self) -> bool
[src]
fn decorated_w(&self) -> i32
[src]
fn decorated_h(&self) -> i32
[src]
fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
[src]
fn hotspot<W: WidgetExt>(&mut self, w: &W)
[src]
fn set_shape<I: ImageExt>(&mut self, image: Option<I>)
[src]
fn shape(&self) -> Option<Box<dyn ImageExt>>
[src]
fn x_root(&self) -> i32
[src]
fn y_root(&self) -> i32
[src]
fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32)
[src]
fn default_cursor(&mut self, cursor: Cursor)
[src]
impl WindowExt for GlWindow
[src]
impl WindowExt for GlWindow
[src]fn center_screen(self) -> Self
[src]
fn make_modal(&mut self, val: bool)
[src]
fn fullscreen(&mut self, val: bool)
[src]
fn make_current(&mut self)
[src]
fn icon(&self) -> Option<Box<dyn ImageExt>>
[src]
fn set_icon<T: ImageExt>(&mut self, image: Option<T>)
[src]
fn set_cursor(&mut self, cursor: Cursor)
[src]
fn shown(&self) -> bool
[src]
fn set_border(&mut self, flag: bool)
[src]
fn border(&self) -> bool
[src]
fn free_position(&mut self)
[src]
fn raw_handle(&self) -> RawHandle
[src]
unsafe fn set_raw_handle(&mut self, handle: RawHandle)
[src]
fn region(&self) -> Region
[src]
unsafe fn set_region(&mut self, region: Region)
[src]
fn iconize(&mut self)
[src]
fn fullscreen_active(&self) -> bool
[src]
fn decorated_w(&self) -> i32
[src]
fn decorated_h(&self) -> i32
[src]
fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
[src]
fn hotspot<W: WidgetExt>(&mut self, w: &W)
[src]
fn set_shape<I: ImageExt>(&mut self, image: Option<I>)
[src]
fn shape(&self) -> Option<Box<dyn ImageExt>>
[src]
fn x_root(&self) -> i32
[src]
fn y_root(&self) -> i32
[src]
fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32)
[src]
fn default_cursor(&mut self, cursor: Cursor)
[src]
impl WindowExt for GlutWindow
[src]
impl WindowExt for GlutWindow
[src]fn center_screen(self) -> Self
[src]
fn make_modal(&mut self, val: bool)
[src]
fn fullscreen(&mut self, val: bool)
[src]
fn make_current(&mut self)
[src]
fn icon(&self) -> Option<Box<dyn ImageExt>>
[src]
fn set_icon<T: ImageExt>(&mut self, image: Option<T>)
[src]
fn set_cursor(&mut self, cursor: Cursor)
[src]
fn shown(&self) -> bool
[src]
fn set_border(&mut self, flag: bool)
[src]
fn border(&self) -> bool
[src]
fn free_position(&mut self)
[src]
fn raw_handle(&self) -> RawHandle
[src]
unsafe fn set_raw_handle(&mut self, handle: RawHandle)
[src]
fn region(&self) -> Region
[src]
unsafe fn set_region(&mut self, region: Region)
[src]
fn iconize(&mut self)
[src]
fn fullscreen_active(&self) -> bool
[src]
fn decorated_w(&self) -> i32
[src]
fn decorated_h(&self) -> i32
[src]
fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
[src]
fn hotspot<W: WidgetExt>(&mut self, w: &W)
[src]
fn set_shape<I: ImageExt>(&mut self, image: Option<I>)
[src]
fn shape(&self) -> Option<Box<dyn ImageExt>>
[src]
fn x_root(&self) -> i32
[src]
fn y_root(&self) -> i32
[src]
fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32)
[src]
fn default_cursor(&mut self, cursor: Cursor)
[src]
impl WindowExt for MenuWindow
[src]
impl WindowExt for MenuWindow
[src]fn center_screen(self) -> Self
[src]
fn make_modal(&mut self, val: bool)
[src]
fn fullscreen(&mut self, val: bool)
[src]
fn make_current(&mut self)
[src]
fn icon(&self) -> Option<Box<dyn ImageExt>>
[src]
fn set_icon<T: ImageExt>(&mut self, image: Option<T>)
[src]
fn set_cursor(&mut self, cursor: Cursor)
[src]
fn shown(&self) -> bool
[src]
fn set_border(&mut self, flag: bool)
[src]
fn border(&self) -> bool
[src]
fn free_position(&mut self)
[src]
fn raw_handle(&self) -> RawHandle
[src]
unsafe fn set_raw_handle(&mut self, handle: RawHandle)
[src]
fn region(&self) -> Region
[src]
unsafe fn set_region(&mut self, region: Region)
[src]
fn iconize(&mut self)
[src]
fn fullscreen_active(&self) -> bool
[src]
fn decorated_w(&self) -> i32
[src]
fn decorated_h(&self) -> i32
[src]
fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
[src]
fn hotspot<W: WidgetExt>(&mut self, w: &W)
[src]
fn set_shape<I: ImageExt>(&mut self, image: Option<I>)
[src]
fn shape(&self) -> Option<Box<dyn ImageExt>>
[src]
fn x_root(&self) -> i32
[src]
fn y_root(&self) -> i32
[src]
fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32)
[src]
fn default_cursor(&mut self, cursor: Cursor)
[src]
impl WindowExt for OverlayWindow
[src]
impl WindowExt for OverlayWindow
[src]fn center_screen(self) -> Self
[src]
fn make_modal(&mut self, val: bool)
[src]
fn fullscreen(&mut self, val: bool)
[src]
fn make_current(&mut self)
[src]
fn icon(&self) -> Option<Box<dyn ImageExt>>
[src]
fn set_icon<T: ImageExt>(&mut self, image: Option<T>)
[src]
fn set_cursor(&mut self, cursor: Cursor)
[src]
fn shown(&self) -> bool
[src]
fn set_border(&mut self, flag: bool)
[src]
fn border(&self) -> bool
[src]
fn free_position(&mut self)
[src]
fn raw_handle(&self) -> RawHandle
[src]
unsafe fn set_raw_handle(&mut self, handle: RawHandle)
[src]
fn region(&self) -> Region
[src]
unsafe fn set_region(&mut self, region: Region)
[src]
fn iconize(&mut self)
[src]
fn fullscreen_active(&self) -> bool
[src]
fn decorated_w(&self) -> i32
[src]
fn decorated_h(&self) -> i32
[src]
fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
[src]
fn hotspot<W: WidgetExt>(&mut self, w: &W)
[src]
fn set_shape<I: ImageExt>(&mut self, image: Option<I>)
[src]
fn shape(&self) -> Option<Box<dyn ImageExt>>
[src]
fn x_root(&self) -> i32
[src]
fn y_root(&self) -> i32
[src]
fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32)
[src]
fn default_cursor(&mut self, cursor: Cursor)
[src]
impl WindowExt for SingleWindow
[src]
impl WindowExt for SingleWindow
[src]