Type Alias Window
pub type Window = DoubleWindow;
dep_fltk
only.Expand description
Creates a window widget
Aliased Type§
struct Window { /* private fields */ }
Implementations
§impl DoubleWindow
impl DoubleWindow
pub unsafe fn find_by_handle(handle: u64) -> Option<impl WindowExt> ⓘ
pub unsafe fn find_by_handle(handle: u64) -> 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.
pub 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]
pub 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]
pub 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.
pub fn maximize(&mut self)
pub fn maximize(&mut self)
Maximize the window
pub fn un_maximize(&mut self)
pub fn un_maximize(&mut self)
Unmaximize the window
pub fn maximize_active(&self) -> bool
pub fn maximize_active(&self) -> bool
Checks whether the window is maximized
pub fn default_xclass() -> Option<String> ⓘ
pub fn default_xclass() -> Option<String> ⓘ
Get the default XA_WM_CLASS property for all windows of your application
pub 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
§impl DoubleWindow
impl DoubleWindow
pub fn flush(&mut self)
pub fn flush(&mut self)
Forces the window to be drawn, this window is also made current and calls draw()
pub fn platform_show(&self)
pub fn platform_show(&self)
Show a window after it had been hidden. Works on Windows and X11 systems
pub fn platform_hide(&self)
pub fn platform_hide(&self)
Hide a window using the platforms hide call. Works on Windows and X11 systems
§impl DoubleWindow
impl DoubleWindow
Trait Implementations
§impl Clone for DoubleWindow
impl Clone for DoubleWindow
§fn clone(&self) -> DoubleWindow
fn clone(&self) -> DoubleWindow
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for DoubleWindow
impl Debug for DoubleWindow
§impl Default for DoubleWindow
impl Default for DoubleWindow
§fn default() -> DoubleWindow
fn default() -> DoubleWindow
§impl GroupExt for DoubleWindow
impl GroupExt for DoubleWindow
§fn find<W>(&self, widget: &W) -> i32where
W: WidgetExt,
fn find<W>(&self, widget: &W) -> i32where
W: WidgetExt,
§fn insert<W>(&mut self, widget: &W, index: i32)where
W: WidgetExt,
fn insert<W>(&mut self, widget: &W, index: i32)where
W: WidgetExt,
§fn remove<W>(&mut self, widget: &W)where
W: WidgetExt,
fn remove<W>(&mut self, widget: &W)where
W: WidgetExt,
§fn remove_by_index(&mut self, idx: i32)
fn remove_by_index(&mut self, idx: i32)
§fn resizable<W>(&self, widget: &W)where
W: WidgetExt,
fn resizable<W>(&self, widget: &W)where
W: WidgetExt,
§fn make_resizable(&mut self, val: bool)
fn make_resizable(&mut self, val: bool)
§fn add_resizable<W>(&mut self, widget: &W)where
W: WidgetExt,
fn add_resizable<W>(&mut self, widget: &W)where
W: WidgetExt,
§fn set_clip_children(&mut self, flag: bool)
fn set_clip_children(&mut self, flag: bool)
§fn clip_children(&self) -> bool
fn clip_children(&self) -> bool
clip_children
is set§fn draw_child<W>(&self, w: &mut W)where
W: WidgetExt,
fn draw_child<W>(&self, w: &mut W)where
W: WidgetExt,
WidgetBase::draw
method§fn update_child<W>(&self, w: &mut W)where
W: WidgetExt,
fn update_child<W>(&self, w: &mut W)where
W: WidgetExt,
WidgetBase::draw
method§fn draw_outside_label<W>(&self, w: &mut W)where
W: WidgetExt,
fn draw_outside_label<W>(&self, w: &mut W)where
W: WidgetExt,
WidgetBase::draw
method§fn draw_children(&mut self)
fn draw_children(&mut self)
WidgetBase::draw
method§fn init_sizes(&mut self)
fn init_sizes(&mut self)
§fn bounds(&self) -> Vec<(i32, i32, i32, i32)> ⓘ
fn bounds(&self) -> Vec<(i32, i32, i32, i32)> ⓘ
§unsafe fn into_group(&self) -> Group
unsafe fn into_group(&self) -> Group
§impl IntoIterator for DoubleWindow
impl IntoIterator for DoubleWindow
§type IntoIter = IntoIter<<DoubleWindow as IntoIterator>::Item>
type IntoIter = IntoIter<<DoubleWindow as IntoIterator>::Item>
§fn into_iter(self) -> <DoubleWindow as IntoIterator>::IntoIter
fn into_iter(self) -> <DoubleWindow as IntoIterator>::IntoIter
§impl PartialEq for DoubleWindow
impl PartialEq for DoubleWindow
§impl WidgetBase for DoubleWindow
impl WidgetBase for DoubleWindow
§fn new<'a, T>(x: i32, y: i32, width: i32, height: i32, title: T) -> DoubleWindow
fn new<'a, T>(x: i32, y: i32, width: i32, height: i32, title: T) -> DoubleWindow
§fn default_fill() -> DoubleWindow
fn default_fill() -> DoubleWindow
§fn delete(wid: DoubleWindow)
fn delete(wid: DoubleWindow)
§unsafe fn from_widget_ptr(ptr: *mut Fl_Widget) -> DoubleWindow
unsafe fn from_widget_ptr(ptr: *mut Fl_Widget) -> DoubleWindow
§unsafe fn from_widget<W>(w: W) -> DoubleWindowwhere
W: WidgetExt,
unsafe fn from_widget<W>(w: W) -> DoubleWindowwhere
W: WidgetExt,
§fn handle<F>(&mut self, cb: F)
fn handle<F>(&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 here§fn draw<F>(&mut self, cb: F)where
F: FnMut(&mut DoubleWindow) + 'static,
fn draw<F>(&mut self, cb: F)where
F: FnMut(&mut DoubleWindow) + 'static,
WidgetBase::draw
actually calls drawing functions§fn resize_callback<F>(&mut self, cb: F)
fn resize_callback<F>(&mut self, cb: F)
§unsafe fn assume_derived(&mut self)
unsafe fn assume_derived(&mut self)
§fn from_dyn_widget<W>(w: &W) -> Option<DoubleWindow> ⓘwhere
W: WidgetExt,
fn from_dyn_widget<W>(w: &W) -> Option<DoubleWindow> ⓘwhere
W: WidgetExt,
§fn from_dyn_widget_ptr(w: *mut Fl_Widget) -> Option<DoubleWindow> ⓘ
fn from_dyn_widget_ptr(w: *mut Fl_Widget) -> Option<DoubleWindow> ⓘ
§impl WidgetExt for DoubleWindow
impl WidgetExt for DoubleWindow
§fn center_x<W>(self, w: &W) -> DoubleWindowwhere
W: WidgetExt,
fn center_x<W>(self, w: &W) -> DoubleWindowwhere
W: WidgetExt,
Initialize center of another widget
§fn center_y<W>(self, w: &W) -> DoubleWindowwhere
W: WidgetExt,
fn center_y<W>(self, w: &W) -> DoubleWindowwhere
W: WidgetExt,
Initialize center of another widget
§fn with_pos(self, x: i32, y: i32) -> DoubleWindow
fn with_pos(self, x: i32, y: i32) -> DoubleWindow
§fn with_size(self, width: i32, height: i32) -> DoubleWindow
fn with_size(self, width: i32, height: i32) -> DoubleWindow
§fn with_label(self, title: &str) -> DoubleWindow
fn with_label(self, title: &str) -> DoubleWindow
§fn with_align(self, align: Align) -> DoubleWindow
fn with_align(self, align: Align) -> DoubleWindow
§fn with_type<T>(self, typ: T) -> DoubleWindowwhere
T: WidgetType,
fn with_type<T>(self, typ: T) -> DoubleWindowwhere
T: WidgetType,
§fn below_of<W>(self, wid: &W, padding: i32) -> DoubleWindowwhere
W: WidgetExt,
fn below_of<W>(self, wid: &W, padding: i32) -> DoubleWindowwhere
W: WidgetExt,
§fn above_of<W>(self, wid: &W, padding: i32) -> DoubleWindowwhere
W: WidgetExt,
fn above_of<W>(self, wid: &W, padding: i32) -> DoubleWindowwhere
W: WidgetExt,
§fn right_of<W>(self, wid: &W, padding: i32) -> DoubleWindowwhere
W: WidgetExt,
fn right_of<W>(self, wid: &W, padding: i32) -> DoubleWindowwhere
W: WidgetExt,
§fn left_of<W>(self, wid: &W, padding: i32) -> DoubleWindowwhere
W: WidgetExt,
fn left_of<W>(self, wid: &W, padding: i32) -> DoubleWindowwhere
W: WidgetExt,
§fn center_of<W>(self, w: &W) -> DoubleWindowwhere
W: WidgetExt,
fn center_of<W>(self, w: &W) -> DoubleWindowwhere
W: WidgetExt,
§fn center_of_parent(self) -> DoubleWindow
fn center_of_parent(self) -> DoubleWindow
§fn size_of<W>(self, w: &W) -> DoubleWindowwhere
W: WidgetExt,
fn size_of<W>(self, w: &W) -> DoubleWindowwhere
W: WidgetExt,
§fn size_of_parent(self) -> DoubleWindow
fn size_of_parent(self) -> DoubleWindow
§fn set_label(&mut self, title: &str)
fn set_label(&mut self, title: &str)
@
sign.
and for the associated formatting.§fn measure_label(&self) -> (i32, i32) ⓘ
fn measure_label(&self) -> (i32, i32) ⓘ
§fn as_widget_ptr(&self) -> *mut Fl_Widget
fn as_widget_ptr(&self) -> *mut Fl_Widget
Fl_Widget
, for internal use§fn deactivate(&mut self)
fn deactivate(&mut self)
§fn redraw_label(&mut self)
fn redraw_label(&mut self)
§fn resize(&mut self, x: i32, y: i32, width: i32, height: i32)
fn resize(&mut self, x: i32, y: i32, width: i32, height: i32)
§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)
§fn set_tooltip(&mut self, txt: &str)
fn set_tooltip(&mut self, txt: &str)
§fn label_color(&self) -> Color
fn label_color(&self) -> Color
§fn set_label_color(&mut self, color: Color)
fn set_label_color(&mut self, color: Color)
§fn label_font(&self) -> Font
fn label_font(&self) -> Font
§fn set_label_font(&mut self, font: Font)
fn set_label_font(&mut self, font: Font)
§fn label_size(&self) -> i32
fn label_size(&self) -> i32
§fn set_label_size(&mut self, sz: i32)
fn set_label_size(&mut self, sz: i32)
§fn label_type(&self) -> LabelType
fn label_type(&self) -> LabelType
§fn set_label_type(&mut self, typ: LabelType)
fn set_label_type(&mut self, typ: LabelType)
§fn set_changed(&mut self)
fn set_changed(&mut self)
§fn clear_changed(&mut self)
fn clear_changed(&mut self)
§fn set_trigger(&mut self, trigger: CallbackTrigger)
fn set_trigger(&mut self, trigger: CallbackTrigger)
when()
§fn trigger(&self) -> CallbackTrigger
fn trigger(&self) -> CallbackTrigger
when()
§fn selection_color(&self) -> Color
fn selection_color(&self) -> Color
§fn set_selection_color(&mut self, color: Color)
fn set_selection_color(&mut self, color: Color)
§fn do_callback(&mut self)
fn do_callback(&mut self)
§fn takes_events(&self) -> bool
fn takes_events(&self) -> bool
§fn set_visible_focus(&mut self)
fn set_visible_focus(&mut self)
§fn clear_visible_focus(&mut self)
fn clear_visible_focus(&mut self)
§fn visible_focus(&mut self, v: bool)
fn visible_focus(&mut self, v: bool)
§fn has_visible_focus(&self) -> bool
fn has_visible_focus(&self) -> bool
§fn was_deleted(&self) -> bool
fn was_deleted(&self) -> bool
§fn set_damage(&mut self, flag: bool)
fn set_damage(&mut self, flag: bool)
§fn damage_type(&self) -> Damage
fn damage_type(&self) -> Damage
§fn set_damage_type(&mut self, mask: Damage)
fn set_damage_type(&mut self, mask: Damage)
§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)
§fn clear_damage(&mut self)
fn clear_damage(&mut self)
§fn inside<W>(&self, wid: &W) -> boolwhere
W: WidgetExt,
fn inside<W>(&self, wid: &W) -> boolwhere
W: WidgetExt,
§fn get_type<T>(&self) -> Twhere
T: WidgetType,
fn get_type<T>(&self) -> Twhere
T: WidgetType,
§fn set_type<T>(&mut self, typ: T)where
T: WidgetType,
fn set_type<T>(&mut self, typ: T)where
T: WidgetType,
§fn set_image_scaled<I>(&mut self, image: Option<I>)where
I: ImageExt,
fn set_image_scaled<I>(&mut self, image: Option<I>)where
I: ImageExt,
§unsafe fn image_mut(&self) -> Option<&mut Image> ⓘ
unsafe fn image_mut(&self) -> Option<&mut Image> ⓘ
§fn set_deimage<I>(&mut self, image: Option<I>)where
I: ImageExt,
fn set_deimage<I>(&mut self, image: Option<I>)where
I: ImageExt,
§fn set_deimage_scaled<I>(&mut self, image: Option<I>)where
I: ImageExt,
fn set_deimage_scaled<I>(&mut self, image: Option<I>)where
I: ImageExt,
§fn deimage(&self) -> Option<Box<dyn ImageExt>> ⓘ
fn deimage(&self) -> Option<Box<dyn ImageExt>> ⓘ
§unsafe fn deimage_mut(&self) -> Option<&mut Image> ⓘ
unsafe fn deimage_mut(&self) -> Option<&mut Image> ⓘ
§fn set_callback<F>(&mut self, cb: F)where
F: FnMut(&mut DoubleWindow) + 'static,
fn set_callback<F>(&mut self, cb: F)where
F: FnMut(&mut DoubleWindow) + 'static,
§unsafe fn into_widget<W>(&self) -> Wwhere
W: WidgetBase,
unsafe fn into_widget<W>(&self) -> Wwhere
W: WidgetBase,
WidgetExt
to some widget type Read more§fn visible_r(&self) -> bool
fn visible_r(&self) -> bool
§fn is_same<W>(&self, other: &W) -> boolwhere
W: WidgetExt,
fn is_same<W>(&self, other: &W) -> boolwhere
W: WidgetExt,
§fn handle_event(&mut self, event: Event) -> bool
fn handle_event(&mut self, event: Event) -> bool
§fn is_derived(&self) -> bool
fn is_derived(&self) -> bool
§fn as_base_widget(&self) -> Widgetwhere
Self: Sized,
fn as_base_widget(&self) -> Widgetwhere
Self: Sized,
WidgetExt
to a Widget§impl WindowExt for DoubleWindow
impl WindowExt for DoubleWindow
§fn center_screen(self) -> DoubleWindow
fn center_screen(self) -> DoubleWindow
§fn make_modal(&mut self, val: bool)
fn make_modal(&mut self, val: bool)
show
§fn fullscreen(&mut self, val: bool)
fn fullscreen(&mut self, val: bool)
§fn make_current(&mut self)
fn make_current(&mut self)
§fn set_icon<T>(&mut self, image: Option<T>)where
T: ImageExt,
fn set_icon<T>(&mut self, image: Option<T>)where
T: ImageExt,
§fn set_cursor(&mut self, cursor: Cursor)
fn set_cursor(&mut self, cursor: Cursor)
§fn set_border(&mut self, flag: bool)
fn set_border(&mut self, flag: bool)
§fn free_position(&mut self)
fn free_position(&mut self)
§fn raw_handle(&self) -> u64
fn raw_handle(&self) -> u64
§unsafe fn set_region(&mut self, region: Region)
unsafe fn set_region(&mut self, region: Region)
§fn iconize(&mut self)
fn iconize(&mut self)
§fn fullscreen_active(&self) -> bool
fn fullscreen_active(&self) -> bool
§fn decorated_w(&self) -> i32
fn decorated_w(&self) -> i32
§fn decorated_h(&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 size_range(&mut self, min_w: i32, min_h: i32, max_w: i32, max_h: i32)
§fn set_shape<I>(&mut self, image: Option<I>)where
I: ImageExt,
fn set_shape<I>(&mut self, image: Option<I>)where
I: ImageExt,
§fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32)
fn set_cursor_image(&mut self, image: RgbImage, hot_x: i32, hot_y: i32)
§fn default_cursor(&mut self, cursor: Cursor)
fn default_cursor(&mut self, cursor: Cursor)
§fn screen_num(&self) -> i32
fn screen_num(&self) -> i32
§fn set_screen_num(&mut self, n: i32)
fn set_screen_num(&mut self, n: i32)
§fn wait_for_expose(&self)
fn wait_for_expose(&self)
show()
.
More info here