Gtk.Root¶
- Implementations:
Methods¶
|
|
|
|
|
Virtual Methods¶
None
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class Gtk.Root¶
- Bases:
- Structure:
An interface for widgets that can act as the root of a widget hierarchy.
The root widget takes care of providing the connection to the windowing system and manages layout, drawing and event delivery for its widget hierarchy.
The obvious example of a
GtkRootisGtkWindow.To get the display to which a
GtkRootbelongs, use [method`Gtk`.Root.get_display].GtkRootalso maintains the location of keyboard focus inside its widget hierarchy, with [method`Gtk`.Root.set_focus] and [method`Gtk`.Root.get_focus].- get_display()[source]¶
- Returns:
the display of root
- Return type:
Returns the display that this
GtkRootis on.
- get_focus()[source]¶
- Returns:
the currently focused widget
- Return type:
Gtk.WidgetorNone
Retrieves the current focused widget within the root.
Note that this is the widget that would have the focus if the root is active; if the root is not focused then
gtk_widget_has_focus (widget)will beFalsefor the widget.
- set_focus(focus)[source]¶
- Parameters:
focus (
Gtk.WidgetorNone) – widget to be the new focus widget, orNoneto unset the focus widget
If focus is not the current focus widget, and is focusable, sets it as the focus widget for the root.
If focus is
None, unsets the focus widget for the root.To set the focus to a particular widget in the root, it is usually more convenient to use [method`Gtk`.Widget.grab_focus] instead of this function.