pub struct OverlayWindow { /* private fields */ }
Expand description
Creates an overlay (buffered) window widget
Implementations§
Source§impl OverlayWindow
impl OverlayWindow
Sourcepub unsafe fn find_by_handle(handle: RawHandle) -> Option<impl WindowExt>
pub unsafe fn find_by_handle(handle: RawHandle) -> Option<impl WindowExt>
Find an Fl_Window
through a raw handle. The window must have been instantiated by the app.
void *
to: (Windows: HWND
, X11: Xid
(u64
), macOS: NSWindow
)
§Safety
The data must be valid and is OS-dependent.
Sourcepub fn show_with_env_args(&mut self)
pub fn show_with_env_args(&mut self)
Use FLTK specific arguments for the application: More info here. The options are:
-bg2 color
-bg color
-di[splay] host:n.n
-dn[d]
-fg color
-g[eometry] WxH+X+Y
-i[conic]
-k[bd]
-na[me] classname
-nod[nd]
-nok[bd]
-not[ooltips]
-s[cheme] scheme
-ti[tle] windowtitle
-to[oltips]
Sourcepub fn show_with_args(&mut self, args: &[&str])
pub fn show_with_args(&mut self, args: &[&str])
Use FLTK specific arguments for the application: More info here. The options are:
-bg2 color
-bg color
-di[splay] host:n.n
-dn[d]
-fg color
-g[eometry] WxH+X+Y
-i[conic]
-k[bd]
-na[me] classname
-nod[nd]
-nok[bd]
-not[ooltips]
-s[cheme] scheme
-ti[tle] windowtitle
-to[oltips]
Sourcepub fn set_on_top(&mut self)
pub fn set_on_top(&mut self)
Set the window to be on top of other windows. Must only be called after the window has been shown.
Sourcepub fn un_maximize(&mut self)
pub fn un_maximize(&mut self)
Unmaximize the window
Sourcepub fn maximize_active(&self) -> bool
pub fn maximize_active(&self) -> bool
Checks whether the window is maximized
Sourcepub fn default_xclass() -> Option<String>
pub fn default_xclass() -> Option<String>
Get the default XA_WM_CLASS
property for all windows of your application
Sourcepub fn set_default_xclass(s: &str)
pub fn set_default_xclass(s: &str)
Set the default XA_WM_CLASS
property for all windows of your application.
This should be called before showing with window
Source§impl OverlayWindow
impl OverlayWindow
Source§impl OverlayWindow
impl OverlayWindow
Sourcepub fn new<'a, T: Into<Option<&'a str>>>(
x: i32,
y: i32,
w: i32,
h: i32,
title: T,
) -> Self
pub fn new<'a, T: Into<Option<&'a str>>>( x: i32, y: i32, w: i32, h: i32, title: T, ) -> Self
Creates a new window, with title as its window title if the window is decorated
Sourcepub fn flush(&mut self)
pub fn flush(&mut self)
Forces the window to be drawn, this window is also made current and calls draw()
Sourcepub fn draw_overlay<F: FnMut(&mut Self) + 'static>(&mut self, cb: F)
pub fn draw_overlay<F: FnMut(&mut Self) + 'static>(&mut self, cb: F)
Draw overlay
Sourcepub fn redraw_overlay(&self)
pub fn redraw_overlay(&self)
Redraw overlay
Sourcepub fn can_do_overlay(&self) -> bool
pub fn can_do_overlay(&self) -> bool
Returns whether the overlay window can do hardware backed overlay
Trait Implementations§
Source§impl Clone for OverlayWindow
impl Clone for OverlayWindow
Source§fn clone(&self) -> OverlayWindow
fn clone(&self) -> OverlayWindow
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OverlayWindow
impl Debug for OverlayWindow
Source§impl Default for OverlayWindow
impl Default for OverlayWindow
Source§impl GroupExt for OverlayWindow
impl GroupExt for OverlayWindow
Source§fn find<W: WidgetExt>(&self, widget: &W) -> i32
fn find<W: WidgetExt>(&self, widget: &W) -> i32
Source§fn insert<W: WidgetExt>(&mut self, widget: &W, index: i32)
fn insert<W: WidgetExt>(&mut self, widget: &W, index: i32)
Source§fn remove<W: WidgetExt>(&mut self, widget: &W)
fn remove<W: WidgetExt>(&mut self, widget: &W)
Source§fn remove_by_index(&mut self, idx: i32)
fn remove_by_index(&mut self, idx: i32)
Source§fn resizable<W: WidgetExt>(&self, widget: &W)
fn resizable<W: WidgetExt>(&self, widget: &W)
Source§fn make_resizable(&mut self, val: bool)
fn make_resizable(&mut self, val: bool)
Source§fn add_resizable<W: WidgetExt>(&mut self, widget: &W)
fn add_resizable<W: WidgetExt>(&mut self, widget: &W)
Source§fn set_clip_children(&mut self, flag: bool)
fn set_clip_children(&mut self, flag: bool)
Source§fn clip_children(&self) -> bool
fn clip_children(&self) -> bool
clip_children
is setSource§fn draw_child<W: WidgetExt>(&self, w: &mut W)
fn draw_child<W: WidgetExt>(&self, w: &mut W)
WidgetBase::draw
methodSource§fn update_child<W: WidgetExt>(&self, w: &mut W)
fn update_child<W: WidgetExt>(&self, w: &mut W)
WidgetBase::draw
methodSource§fn draw_outside_label<W: WidgetExt>(&self, w: &mut W)
fn draw_outside_label<W: WidgetExt>(&self, w: &mut W)
WidgetBase::draw
methodSource§fn draw_children(&mut self)
fn draw_children(&mut self)
WidgetBase::draw
methodSource§fn init_sizes(&mut self)
fn init_sizes(&mut self)
Source§impl IntoIterator for OverlayWindow
impl IntoIterator for OverlayWindow
Source§impl PartialEq for OverlayWindow
impl PartialEq for OverlayWindow
Source§impl WidgetBase for OverlayWindow
impl WidgetBase for OverlayWindow
Source§unsafe fn from_widget_ptr(ptr: *mut Fl_Widget) -> Self
unsafe fn from_widget_ptr(ptr: *mut Fl_Widget) -> Self
Source§unsafe fn from_widget<W: WidgetExt>(w: W) -> Self
unsafe fn from_widget<W: WidgetExt>(w: W) -> Self
Source§fn handle<F: FnMut(&mut Self, Event) -> bool + 'static>(&mut self, cb: F)
fn handle<F: FnMut(&mut Self, Event) -> bool + 'static>(&mut self, cb: F)
Fl_Widget::handle(int)
.
Handled or ignored events should return true, unhandled events should return false.
takes the widget as a closure argument.
The ability to handle an event might depend on handling other events, as explained hereSource§fn draw<F: FnMut(&mut Self) + 'static>(&mut self, cb: F)
fn draw<F: FnMut(&mut Self) + 'static>(&mut self, cb: F)
WidgetBase::draw
actually calls drawing functionsSource§fn resize_callback<F: FnMut(&mut Self, i32, i32, i32, i32) + 'static>(
&mut self,
cb: F,
)
fn resize_callback<F: FnMut(&mut Self, i32, i32, i32, i32) + 'static>( &mut self, cb: F, )
Source§unsafe fn assume_derived(&mut self)
unsafe fn assume_derived(&mut self)
Source§impl WidgetExt for OverlayWindow
impl WidgetExt for OverlayWindow
Source§fn set_label(&mut self, title: &str)
fn set_label(&mut self, title: &str)
@
sign.
and for the associated formatting.Source§fn unset_label(&mut self)
fn unset_label(&mut self)
Source§fn measure_label(&self) -> (i32, i32)
fn measure_label(&self) -> (i32, i32)
Source§fn as_widget_ptr(&self) -> *mut Fl_Widget
fn as_widget_ptr(&self) -> *mut Fl_Widget
Fl_Widget
, for internal useSource§fn deactivate(&mut self)
fn deactivate(&mut self)
Source§fn redraw_label(&mut self)
fn redraw_label(&mut self)
Source§fn resize(&mut self, x: i32, y: i32, width: i32, height: i32)
fn resize(&mut self, x: i32, y: i32, width: i32, height: i32)
Source§fn widget_resize(&mut self, x: i32, y: i32, width: i32, height: i32)
fn widget_resize(&mut self, x: i32, y: i32, width: i32, height: i32)
Source§fn set_tooltip(&mut self, txt: &str)
fn set_tooltip(&mut self, txt: &str)
Source§fn label_color(&self) -> Color
fn label_color(&self) -> Color
Source§fn set_label_color(&mut self, color: Color)
fn set_label_color(&mut self, color: Color)
Source§fn label_font(&self) -> Font
fn label_font(&self) -> Font
Source§fn set_label_font(&mut self, font: Font)
fn set_label_font(&mut self, font: Font)
Source§fn label_size(&self) -> i32
fn label_size(&self) -> i32
Source§fn set_label_size(&mut self, sz: i32)
fn set_label_size(&mut self, sz: i32)
Source§fn label_type(&self) -> LabelType
fn label_type(&self) -> LabelType
Source§fn set_label_type(&mut self, typ: LabelType)
fn set_label_type(&mut self, typ: LabelType)
Source§fn set_changed(&mut self)
fn set_changed(&mut self)
Source§fn clear_changed(&mut self)
fn clear_changed(&mut self)
Source§fn set_when(&mut self, trigger: When)
fn set_when(&mut self, trigger: When)
when()
Source§fn selection_color(&self) -> Color
fn selection_color(&self) -> Color
Source§fn set_selection_color(&mut self, color: Color)
fn set_selection_color(&mut self, color: Color)
Source§fn do_callback(&mut self)
fn do_callback(&mut self)
Source§fn top_window(&self) -> Option<Box<dyn WindowExt>>
fn top_window(&self) -> Option<Box<dyn WindowExt>>
Source§fn takes_events(&self) -> bool
fn takes_events(&self) -> bool
Source§fn set_visible_focus(&mut self)
fn set_visible_focus(&mut self)
Source§fn clear_visible_focus(&mut self)
fn clear_visible_focus(&mut self)
Source§fn visible_focus(&mut self, v: bool)
fn visible_focus(&mut self, v: bool)
Source§fn has_visible_focus(&self) -> bool
fn has_visible_focus(&self) -> bool
Source§fn was_deleted(&self) -> bool
fn was_deleted(&self) -> bool
Source§fn set_damage(&mut self, flag: bool)
fn set_damage(&mut self, flag: bool)
Source§fn damage_type(&self) -> Damage
fn damage_type(&self) -> Damage
Source§fn set_damage_type(&mut self, mask: Damage)
fn set_damage_type(&mut self, mask: Damage)
Source§fn set_damage_area(&mut self, mask: Damage, x: i32, y: i32, w: i32, h: i32)
fn set_damage_area(&mut self, mask: Damage, x: i32, y: i32, w: i32, h: i32)
Source§fn clear_damage(&mut self)
fn clear_damage(&mut self)
Source§fn as_window(&self) -> Option<Box<dyn WindowExt>>
fn as_window(&self) -> Option<Box<dyn WindowExt>>
Source§fn as_group(&self) -> Option<Group>
fn as_group(&self) -> Option<Group>
Source§fn inside<W: WidgetExt>(&self, wid: &W) -> bool
fn inside<W: WidgetExt>(&self, wid: &W) -> bool
Source§fn get_type<T: WidgetType>(&self) -> T
fn get_type<T: WidgetType>(&self) -> T
Source§fn set_type<T: WidgetType>(&mut self, typ: T)
fn set_type<T: WidgetType>(&mut self, typ: T)
Source§fn set_image_scaled<I: ImageExt>(&mut self, image: Option<I>)
fn set_image_scaled<I: ImageExt>(&mut self, image: Option<I>)
Source§fn set_deimage<I: ImageExt>(&mut self, image: Option<I>)
fn set_deimage<I: ImageExt>(&mut self, image: Option<I>)
Source§fn set_deimage_scaled<I: ImageExt>(&mut self, image: Option<I>)
fn set_deimage_scaled<I: ImageExt>(&mut self, image: Option<I>)
Source§fn deimage(&self) -> Option<Box<dyn ImageExt>>
fn deimage(&self) -> Option<Box<dyn ImageExt>>
Source§fn set_callback<F: FnMut(&mut Self) + 'static>(&mut self, cb: F)
fn set_callback<F: FnMut(&mut Self) + 'static>(&mut self, cb: F)
Source§fn emit<T: 'static + Clone + Send + Sync>(&mut self, sender: Sender<T>, msg: T)
fn emit<T: 'static + Clone + Send + Sync>(&mut self, sender: Sender<T>, msg: T)
Source§unsafe fn as_widget<W: WidgetBase>(&self) -> W
unsafe fn as_widget<W: WidgetBase>(&self) -> W
WidgetExt
to some widget type Read moreSource§fn visible_r(&self) -> bool
fn visible_r(&self) -> bool
Source§fn is_same<W: WidgetExt>(&self, other: &W) -> bool
fn is_same<W: WidgetExt>(&self, other: &W) -> bool
Source§fn active_r(&self) -> bool
fn active_r(&self) -> bool
Source§fn handle_event(&mut self, event: Event) -> bool
fn handle_event(&mut self, event: Event) -> bool
Source§fn is_derived(&self) -> bool
fn is_derived(&self) -> bool
Source§fn as_base_widget(&self) -> Widgetwhere
Self: Sized,
fn as_base_widget(&self) -> Widgetwhere
Self: Sized,
WidgetExt
to a WidgetSource§impl WidgetProps for OverlayWindow
impl WidgetProps for OverlayWindow
Source§fn with_label(self, title: &str) -> Self
fn with_label(self, title: &str) -> Self
Initialize with a label
Source§fn with_align(self, align: Align) -> Self
fn with_align(self, align: Align) -> Self
Initialize with alignment
Source§fn with_type<T: WidgetType>(self, typ: T) -> Self
fn with_type<T: WidgetType>(self, typ: T) -> Self
Initialize with type
Source§fn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
fn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize at bottom of another widget
Source§fn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
fn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize above of another widget
Source§fn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
fn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize right of another widget
Source§fn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
fn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize left of another widget
Source§fn center_x<W: WidgetExt>(self, w: &W) -> Self
fn center_x<W: WidgetExt>(self, w: &W) -> Self
Initialize center of another widget on the x axis
Source§fn center_y<W: WidgetExt>(self, w: &W) -> Self
fn center_y<W: WidgetExt>(self, w: &W) -> Self
Initialize center of another widget on the y axis
Source§fn center_of_parent(self) -> Self
fn center_of_parent(self) -> Self
Initialize center of parent
Source§fn size_of_parent(self) -> Self
fn size_of_parent(self) -> Self
Initialize to the size of the parent
Source§impl WindowExt for OverlayWindow
impl WindowExt for OverlayWindow
Source§fn set_center_screen(&mut self)
fn set_center_screen(&mut self)
Source§fn make_modal(&mut self, val: bool)
fn make_modal(&mut self, val: bool)
show
Source§fn fullscreen(&mut self, val: bool)
fn fullscreen(&mut self, val: bool)
Source§fn make_current(&mut self)
fn make_current(&mut self)
Source§fn set_icon(&mut self, image: Option<RgbImage>)
fn set_icon(&mut self, image: Option<RgbImage>)
Source§fn set_cursor(&mut self, cursor: Cursor)
fn set_cursor(&mut self, cursor: Cursor)
Source§fn set_border(&mut self, flag: bool)
fn set_border(&mut self, flag: bool)
Source§fn free_position(&mut self)
fn free_position(&mut self)
Source§fn raw_handle(&self) -> RawHandle
fn raw_handle(&self) -> RawHandle
Source§unsafe fn set_region(&mut self, region: Region)
unsafe fn set_region(&mut self, region: Region)
Source§fn iconize(&mut self)
fn iconize(&mut self)
Source§fn fullscreen_active(&self) -> bool
fn fullscreen_active(&self) -> bool
Source§fn decorated_w(&self) -> i32
fn decorated_w(&self) -> i32
Source§fn decorated_h(&self) -> i32
fn decorated_h(&self) -> i32
Source§fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
fn size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
max_w
and max_h
to allow unlimited upward resize of the window.Source§fn set_shape(&mut self, image: Option<RgbImage>)
fn set_shape(&mut self, image: Option<RgbImage>)
Source§fn default_cursor(&mut self, cursor: Cursor)
fn default_cursor(&mut self, cursor: Cursor)
Source§fn screen_num(&self) -> i32
fn screen_num(&self) -> i32
Source§fn set_screen_num(&mut self, n: i32)
fn set_screen_num(&mut self, n: i32)
Source§fn wait_for_expose(&self)
fn wait_for_expose(&self)
show()
.
More info hereSource§fn set_opacity(&mut self, val: f64)
fn set_opacity(&mut self, val: f64)
Source§fn set_xclass(&mut self, s: &str)
fn set_xclass(&mut self, s: &str)
XA_WM_CLASS
property.
This should be called before showing the windowSource§fn clear_modal_states(&mut self)
fn clear_modal_states(&mut self)
Source§fn force_position(&mut self, flag: bool)
fn force_position(&mut self, flag: bool)
Source§fn set_override(&mut self)
fn set_override(&mut self)
Source§fn is_override(&self) -> bool
fn is_override(&self) -> bool
Source§fn set_icon_label(&mut self, label: &str)
fn set_icon_label(&mut self, label: &str)
Source§fn icon_label(&self) -> Option<String>
fn icon_label(&self) -> Option<String>
impl Eq for OverlayWindow
impl Send for OverlayWindow
single-threaded
only.impl Sync for OverlayWindow
single-threaded
only.