pub trait GtkWindowExt:
IsA<Window>
+ Sealed
+ 'static {
Show 94 methods
// Provided methods
fn close(&self) { ... }
fn destroy(&self) { ... }
fn fullscreen(&self) { ... }
fn fullscreen_on_monitor(&self, monitor: &Monitor) { ... }
fn application(&self) -> Option<Application> { ... }
fn child(&self) -> Option<Widget> { ... }
fn is_decorated(&self) -> bool { ... }
fn default_size(&self) -> (i32, i32) { ... }
fn default_widget(&self) -> Option<Widget> { ... }
fn is_deletable(&self) -> bool { ... }
fn must_destroy_with_parent(&self) -> bool { ... }
fn focus(&self) -> Option<Widget> { ... }
fn gets_focus_visible(&self) -> bool { ... }
fn group(&self) -> WindowGroup { ... }
fn is_handle_menubar_accel(&self) -> bool { ... }
fn hides_on_close(&self) -> bool { ... }
fn icon_name(&self) -> Option<GString> { ... }
fn is_mnemonics_visible(&self) -> bool { ... }
fn is_modal(&self) -> bool { ... }
fn is_resizable(&self) -> bool { ... }
fn title(&self) -> Option<GString> { ... }
fn titlebar(&self) -> Option<Widget> { ... }
fn transient_for(&self) -> Option<Window> { ... }
fn has_group(&self) -> bool { ... }
fn is_active(&self) -> bool { ... }
fn is_fullscreen(&self) -> bool { ... }
fn is_maximized(&self) -> bool { ... }
fn is_suspended(&self) -> bool { ... }
fn maximize(&self) { ... }
fn minimize(&self) { ... }
fn present(&self) { ... }
fn present_with_time(&self, timestamp: u32) { ... }
fn set_application(&self, application: Option<&impl IsA<Application>>) { ... }
fn set_child(&self, child: Option<&impl IsA<Widget>>) { ... }
fn set_decorated(&self, setting: bool) { ... }
fn set_default_size(&self, width: i32, height: i32) { ... }
fn set_default_widget(&self, default_widget: Option<&impl IsA<Widget>>) { ... }
fn set_deletable(&self, setting: bool) { ... }
fn set_destroy_with_parent(&self, setting: bool) { ... }
fn set_display(&self, display: &impl IsA<Display>) { ... }
fn set_focus(&self, focus: Option<&impl IsA<Widget>>) { ... }
fn set_focus_visible(&self, setting: bool) { ... }
fn set_handle_menubar_accel(&self, handle_menubar_accel: bool) { ... }
fn set_hide_on_close(&self, setting: bool) { ... }
fn set_icon_name(&self, name: Option<&str>) { ... }
fn set_mnemonics_visible(&self, setting: bool) { ... }
fn set_modal(&self, modal: bool) { ... }
fn set_resizable(&self, resizable: bool) { ... }
fn set_startup_id(&self, startup_id: &str) { ... }
fn set_title(&self, title: Option<&str>) { ... }
fn set_titlebar(&self, titlebar: Option<&impl IsA<Widget>>) { ... }
fn set_transient_for(&self, parent: Option<&impl IsA<Window>>) { ... }
fn unfullscreen(&self) { ... }
fn unmaximize(&self) { ... }
fn unminimize(&self) { ... }
fn default_height(&self) -> i32 { ... }
fn set_default_height(&self, default_height: i32) { ... }
fn default_width(&self) -> i32 { ... }
fn set_default_width(&self, default_width: i32) { ... }
fn set_fullscreened(&self, fullscreened: bool) { ... }
fn set_maximized(&self, maximized: bool) { ... }
fn connect_activate_default<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn emit_activate_default(&self) { ... }
fn connect_activate_focus<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn emit_activate_focus(&self) { ... }
fn connect_close_request<F: Fn(&Self) -> Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_enable_debugging<F: Fn(&Self, bool) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn emit_enable_debugging(&self, toggle: bool) -> bool { ... }
fn connect_keys_changed<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_application_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_decorated_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_default_height_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_default_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_default_width_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_deletable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_destroy_with_parent_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_display_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_focus_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_focus_widget_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_fullscreened_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_handle_menubar_accel_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_hide_on_close_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_is_active_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_maximized_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_mnemonics_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_modal_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_resizable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_startup_id_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_suspended_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_title_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_titlebar_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_transient_for_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Trait containing all Window
methods.
§Implementors
AboutDialog
, ApplicationWindow
, Assistant
, Dialog
, ShortcutsWindow
, Window
Provided Methods§
Sourcefn close(&self)
fn close(&self)
Requests that the window is closed.
This is similar to what happens when a window manager close button is clicked.
This function can be used with close buttons in custom titlebars.
fn destroy(&self)
Sourcefn fullscreen(&self)
fn fullscreen(&self)
Asks to place @self in the fullscreen state.
Note that you shouldn’t assume the window is definitely fullscreen afterward, because other entities (e.g. the user or window manager) unfullscreen it again, and not all window managers honor requests to fullscreen windows.
You can track the result of this operation via the
[state
][struct@crate::Gdk::Toplevel#state] property, or by listening to
notifications of the fullscreened
property.
Sourcefn fullscreen_on_monitor(&self, monitor: &Monitor)
fn fullscreen_on_monitor(&self, monitor: &Monitor)
Asks to place @self in the fullscreen state on the given @monitor.
Note that you shouldn’t assume the window is definitely fullscreen afterward, or that the windowing system allows fullscreen windows on any given monitor.
You can track the result of this operation via the
[state
][struct@crate::Gdk::Toplevel#state] property, or by listening to
notifications of the fullscreened
property.
§monitor
which monitor to go fullscreen on
Sourcefn application(&self) -> Option<Application>
fn application(&self) -> Option<Application>
Sourcefn is_decorated(&self) -> bool
fn is_decorated(&self) -> bool
Sourcefn default_size(&self) -> (i32, i32)
fn default_size(&self) -> (i32, i32)
Gets the default size of the window.
A value of 0 for the width or height indicates that a default size has not been explicitly set for that dimension, so the “natural” size of the window will be used.
This function is the recommended way for saving window state across restarts of applications.
§Returns
§width
location to store the default width
§height
location to store the default height
Sourcefn default_widget(&self) -> Option<Widget>
fn default_widget(&self) -> Option<Widget>
Sourcefn is_deletable(&self) -> bool
fn is_deletable(&self) -> bool
Sourcefn must_destroy_with_parent(&self) -> bool
fn must_destroy_with_parent(&self) -> bool
Sourcefn gets_focus_visible(&self) -> bool
fn gets_focus_visible(&self) -> bool
Sourcefn group(&self) -> WindowGroup
fn group(&self) -> WindowGroup
Returns the group for @self.
If the window has no group, then the default group is returned.
§Returns
the WindowGroup
for a window
or the default group
Available on crate feature v4_2
only.
v4_2
only.Sourcefn hides_on_close(&self) -> bool
fn hides_on_close(&self) -> bool
Sourcefn is_mnemonics_visible(&self) -> bool
fn is_mnemonics_visible(&self) -> bool
Sourcefn is_resizable(&self) -> bool
fn is_resizable(&self) -> bool
Sourcefn titlebar(&self) -> Option<Widget>
fn titlebar(&self) -> Option<Widget>
Returns the custom titlebar that has been set with gtk_window_set_titlebar().
§Returns
the custom titlebar
Sourcefn transient_for(&self) -> Option<Window>
fn transient_for(&self) -> Option<Window>
Sourcefn is_active(&self) -> bool
fn is_active(&self) -> bool
Returns whether the window is part of the current active toplevel.
The active toplevel is the window receiving keystrokes.
The return value is true
if the window is active toplevel itself.
You might use this function if you wanted to draw a widget
differently in an active window from a widget in an inactive window.
§Returns
true
if the window part of the current active window.
Sourcefn is_fullscreen(&self) -> bool
fn is_fullscreen(&self) -> bool
Retrieves the current fullscreen state of @self.
Note that since fullscreening is ultimately handled by the window
manager and happens asynchronously to an application request, you
shouldn’t assume the return value of this function changing
immediately (or at all), as an effect of calling
fullscreen()
or unfullscreen()
.
If the window isn’t yet mapped, the value returned will whether the initial requested state is fullscreen.
§Returns
whether the window has a fullscreen state.
Sourcefn is_maximized(&self) -> bool
fn is_maximized(&self) -> bool
Retrieves the current maximized state of @self.
Note that since maximization is ultimately handled by the window
manager and happens asynchronously to an application request, you
shouldn’t assume the return value of this function changing
immediately (or at all), as an effect of calling
maximize()
or unmaximize()
.
If the window isn’t yet mapped, the value returned will whether the initial requested state is maximized.
§Returns
whether the window has a maximized state.
Sourcefn is_suspended(&self) -> bool
Available on crate feature v4_12
only.
fn is_suspended(&self) -> bool
v4_12
only.Retrieves the current suspended state of @self.
A window being suspended means it’s currently not visible to the user, for example by being on a inactive workspace, minimized, obstructed.
§Returns
whether the window is suspended.
Sourcefn maximize(&self)
fn maximize(&self)
Asks to maximize @self, so that it fills the screen.
Note that you shouldn’t assume the window is definitely maximized afterward, because other entities (e.g. the user or window manager) could unmaximize it again, and not all window managers support maximization.
It’s permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially.
You can track the result of this operation via the
[state
][struct@crate::Gdk::Toplevel#state] property, or by listening to
notifications on the maximized
property.
Sourcefn minimize(&self)
fn minimize(&self)
Asks to minimize the specified @self.
Note that you shouldn’t assume the window is definitely minimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could unminimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.
It’s permitted to call this function before showing a window, in which case the window will be minimized before it ever appears onscreen.
You can track result of this operation via the
[state
][struct@crate::Gdk::Toplevel#state] property.
Sourcefn present(&self)
fn present(&self)
Presents a window to the user.
This may mean raising the window in the stacking order, unminimizing it, moving it to the current desktop and/or giving it the keyboard focus (possibly dependent on the user’s platform, window manager and preferences).
If @self is hidden, this function also makes it visible.
Sourcefn present_with_time(&self, timestamp: u32)
👎Deprecated: Since 4.14
fn present_with_time(&self, timestamp: u32)
Presents a window to the user in response to an user interaction.
See present()
for more details.
The timestamp should be gathered when the window was requested to be shown (when clicking a link for example), rather than once the window is ready to be shown.
§Deprecated since 4.14
Use gtk_window_present()
§timestamp
the timestamp of the user interaction (typically a button or key press event) which triggered this call
Sourcefn set_application(&self, application: Option<&impl IsA<Application>>)
fn set_application(&self, application: Option<&impl IsA<Application>>)
Sets or unsets the Application
associated with the window.
The application will be kept alive for at least as long as it has any windows associated with it (see g_application_hold() for a way to keep it alive without windows).
Normally, the connection between the application and the window will
remain until the window is destroyed, but you can explicitly remove
it by setting the @application to None
.
This is equivalent to calling GtkApplicationExt::remove_window()
and/or GtkApplicationExt::add_window()
on the old/new applications
as relevant.
§application
a Application
, or None
to unset
Sourcefn set_decorated(&self, setting: bool)
fn set_decorated(&self, setting: bool)
Sets whether the window should be decorated.
By default, windows are decorated with a title bar, resize
controls, etc. Some window managers allow GTK to disable these
decorations, creating a borderless window. If you set the decorated
property to false
using this function, GTK will do its best to
convince the window manager not to decorate the window. Depending on
the system, this function may not have any effect when called on a
window that is already visible, so you should call it before calling
WidgetExt::show()
.
On Windows, this function always works, since there’s no window manager policy involved.
§setting
true
to decorate the window
Sourcefn set_default_size(&self, width: i32, height: i32)
fn set_default_size(&self, width: i32, height: i32)
Sets the default size of a window.
The default size of a window is the size that will be used if no other constraints apply.
The default size will be updated whenever the window is resized to reflect the new size, unless the window is forced to a size, like when it is maximized or fullscreened.
If the window’s minimum size request is larger than the default, the default will be ignored.
Setting the default size to a value <= 0 will cause it to be ignored and the natural size request will be used instead. It is possible to do this while the window is showing to “reset” it to its initial size.
Unlike WidgetExt::set_size_request()
, which sets a size
request for a widget and thus would keep users from shrinking
the window, this function only sets the initial size, just as
if the user had resized the window themselves. Users can still
shrink the window again as they normally would. Setting a default
size of -1 means to use the “natural” default size (the size request
of the window).
If you use this function to reestablish a previously saved window size,
note that the appropriate size to save is the one returned by
default_size()
. Using the window allocation
directly will not work in all circumstances and can lead to growing
or shrinking windows.
§width
width in pixels, or -1 to unset the default width
§height
height in pixels, or -1 to unset the default height
Sourcefn set_default_widget(&self, default_widget: Option<&impl IsA<Widget>>)
fn set_default_widget(&self, default_widget: Option<&impl IsA<Widget>>)
Sets the default widget.
The default widget is the widget that is activated when the user presses Enter in a dialog (for example).
§default_widget
widget to be the default to unset the default widget for the toplevel
Sourcefn set_deletable(&self, setting: bool)
fn set_deletable(&self, setting: bool)
Sets whether the window should be deletable.
By default, windows have a close button in the window frame.
Some window managers allow GTK to disable this button. If you
set the deletable property to false
using this function, GTK
will do its best to convince the window manager not to show a
close button. Depending on the system, this function may not
have any effect when called on a window that is already visible,
so you should call it before calling WidgetExt::show()
.
On Windows, this function always works, since there’s no window manager policy involved.
§setting
true
to decorate the window as deletable
Sourcefn set_destroy_with_parent(&self, setting: bool)
fn set_destroy_with_parent(&self, setting: bool)
Sourcefn set_display(&self, display: &impl IsA<Display>)
fn set_display(&self, display: &impl IsA<Display>)
Sets the gdk::Display
where the @self is displayed.
If the window is already mapped, it will be unmapped, and then remapped on the new display.
§display
Sourcefn set_focus(&self, focus: Option<&impl IsA<Widget>>)
fn set_focus(&self, focus: Option<&impl IsA<Widget>>)
Sets the focus widget.
If @focus is not the current focus widget, and is focusable,
sets it as the focus widget for the window. If @focus is None
,
unsets the focus widget for this window. To set the focus to a
particular widget in the toplevel, it is usually more convenient
to use WidgetExt::grab_focus()
instead of this function.
§focus
widget to be the new focus widget, or None
to unset
any focus widget for the toplevel window.
Sourcefn set_focus_visible(&self, setting: bool)
fn set_focus_visible(&self, setting: bool)
Sets whether “focus rectangles” are supposed to be visible.
This property is maintained by GTK based on user input, and should not be set by applications.
§setting
the new value
Available on crate feature v4_2
only.
v4_2
only.Sourcefn set_hide_on_close(&self, setting: bool)
fn set_hide_on_close(&self, setting: bool)
Sourcefn set_icon_name(&self, name: Option<&str>)
fn set_icon_name(&self, name: Option<&str>)
Sourcefn set_mnemonics_visible(&self, setting: bool)
fn set_mnemonics_visible(&self, setting: bool)
Sets whether mnemonics are supposed to be visible.
This property is maintained by GTK based on user input, and should not be set by applications.
§setting
the new value
Sourcefn set_modal(&self, modal: bool)
fn set_modal(&self, modal: bool)
Sets a window modal or non-modal.
Modal windows prevent interaction with other windows in the same
application. To keep modal dialogs on top of main application windows,
use set_transient_for()
to make the dialog transient
for the parent; most window managers will then disallow lowering the
dialog below the parent.
§modal
whether the window is modal
Sourcefn set_resizable(&self, resizable: bool)
fn set_resizable(&self, resizable: bool)
Sourcefn set_startup_id(&self, startup_id: &str)
fn set_startup_id(&self, startup_id: &str)
Sets the startup notification ID.
Startup notification identifiers are used by desktop environment
to track application startup, to provide user feedback and other
features. This function changes the corresponding property on the
underlying gdk::Surface
.
Normally, startup identifier is managed automatically and you should
only use this function in special cases like transferring focus from
other processes. You should use this function before calling
present()
or any equivalent function generating
a window map event.
This function is only useful on X11, not with other GTK targets.
§startup_id
a string with startup-notification identifier
Sourcefn set_title(&self, title: Option<&str>)
fn set_title(&self, title: Option<&str>)
Sets the title of the Window
.
The title of a window will be displayed in its title bar; on the X Window System, the title bar is rendered by the window manager so exactly how the title appears to users may vary according to a user’s exact configuration. The title should help a user distinguish this window from other windows they may have open. A good title might include the application name and current document filename, for example.
Passing None
does the same as setting the title to an empty string.
§title
title of the window
Sourcefn set_titlebar(&self, titlebar: Option<&impl IsA<Widget>>)
fn set_titlebar(&self, titlebar: Option<&impl IsA<Widget>>)
Sets a custom titlebar for @self.
A typical widget used here is HeaderBar
, as it
provides various features expected of a titlebar while allowing
the addition of child widgets to it.
If you set a custom titlebar, GTK will do its best to convince
the window manager not to put its own titlebar on the window.
Depending on the system, this function may not work for a window
that is already visible, so you set the titlebar before calling
WidgetExt::show()
.
§titlebar
the widget to use as titlebar
Sourcefn set_transient_for(&self, parent: Option<&impl IsA<Window>>)
fn set_transient_for(&self, parent: Option<&impl IsA<Window>>)
Dialog windows should be set transient for the main application
window they were spawned from. This allows window managers to e.g.
keep the dialog on top of the main window, or center the dialog
over the main window. Dialog::with_buttons()
and other
convenience functions in GTK will sometimes call
gtk_window_set_transient_for() on your behalf.
Passing None
for @parent unsets the current transient window.
On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.
§parent
parent window
Sourcefn unfullscreen(&self)
fn unfullscreen(&self)
Asks to remove the fullscreen state for @self, and return to its previous state.
Note that you shouldn’t assume the window is definitely not fullscreen afterward, because other entities (e.g. the user or window manager) could fullscreen it again, and not all window managers honor requests to unfullscreen windows; normally the window will end up restored to its normal state. Just don’t write code that crashes if not.
You can track the result of this operation via the
[state
][struct@crate::Gdk::Toplevel#state] property, or by listening to
notifications of the fullscreened
property.
Sourcefn unmaximize(&self)
fn unmaximize(&self)
Asks to unmaximize @self.
Note that you shouldn’t assume the window is definitely unmaximized afterward, because other entities (e.g. the user or window manager) maximize it again, and not all window managers honor requests to unmaximize.
You can track the result of this operation via the
[state
][struct@crate::Gdk::Toplevel#state] property, or by listening to
notifications on the maximized
property.
Sourcefn unminimize(&self)
fn unminimize(&self)
Asks to unminimize the specified @self.
Note that you shouldn’t assume the window is definitely unminimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could minimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.
You can track result of this operation via the
[state
][struct@crate::Gdk::Toplevel#state] property.
Sourcefn default_height(&self) -> i32
fn default_height(&self) -> i32
The default height of the window.
Sourcefn set_default_height(&self, default_height: i32)
fn set_default_height(&self, default_height: i32)
The default height of the window.
Sourcefn default_width(&self) -> i32
fn default_width(&self) -> i32
The default width of the window.
Sourcefn set_default_width(&self, default_width: i32)
fn set_default_width(&self, default_width: i32)
The default width of the window.
Sourcefn set_fullscreened(&self, fullscreened: bool)
fn set_fullscreened(&self, fullscreened: bool)
Whether the window is fullscreen.
Setting this property is the equivalent of calling
fullscreen()
or unfullscreen()
;
either operation is asynchronous, which means you will need to
connect to the ::notify signal in order to know whether the
operation was successful.
Sourcefn set_maximized(&self, maximized: bool)
fn set_maximized(&self, maximized: bool)
Whether the window is maximized.
Setting this property is the equivalent of calling
maximize()
or unmaximize()
;
either operation is asynchronous, which means you will need to
connect to the ::notify signal in order to know whether the
operation was successful.
Sourcefn connect_activate_default<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_activate_default<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Emitted when the user activates the default widget of @window.
This is a keybinding signal.
The keybindings for this signal are all forms of the Enter key.
fn emit_activate_default(&self)
Sourcefn connect_activate_focus<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_activate_focus<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Emitted when the user activates the currently focused widget of @window.
This is a keybinding signal.
The default binding for this signal is ␣.
fn emit_activate_focus(&self)
Sourcefn connect_close_request<F: Fn(&Self) -> Propagation + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_close_request<F: Fn(&Self) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_enable_debugging<F: Fn(&Self, bool) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_enable_debugging<F: Fn(&Self, bool) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
Emitted when the user enables or disables interactive debugging.
When @toggle is true
, interactive debugging is toggled on or off,
when it is false
, the debugger will be pointed at the widget
under the pointer.
This is a keybinding signal.
The default bindings for this signal are Ctrl+Shift+I and Ctrl+Shift+D.
§toggle
toggle the debugger
§Returns
true
if the key binding was handled
fn emit_enable_debugging(&self, toggle: bool) -> bool
Sourcefn connect_keys_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
👎Deprecated: Since 4.10
fn connect_keys_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
emitted when the set of accelerators or mnemonics that are associated with @window changes.
§Deprecated since 4.10
Use Shortcut
and EventController
to implement keyboard shortcuts
fn connect_application_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_decorated_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_default_height_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_default_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_default_width_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_deletable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_destroy_with_parent_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_display_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_focus_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_focus_widget_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_fullscreened_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v4_2
only.fn connect_hide_on_close_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_icon_name_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_is_active_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_maximized_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_mnemonics_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_modal_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_resizable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_startup_id_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_suspended_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v4_12
only.fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_titlebar_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v4_6
only.fn connect_transient_for_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.