Package: gtk

Class gtk:event-controller-focus

Superclasses

gtk:event-controller, gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

contains-focus
The contains-focus property of type :boolean (Read)
True if focus is contained in the controllers widget. See the is-focus property for whether the focus is in the widget itself or inside a descendent. When handling focus events, this property is updated before the "enter" or "leave" signals are emitted.
Default value: false
is-focus
The is-focus property of type :boolean (Read)
True if focus is contained in the controllers widget, as opposed to in a descendent widget. When handling focus events, this property is updated before the "enter" or "leave" signals are emitted.
Default value: false

Details

The gtk:event-controller-focus class is an event controller to keep track of keyboard focus.

The event controller offers the "enter" and "leave" signals, as well as the is-focus and contains-focus properties which are updated to reflect focus changes inside the widget hierarchy that is rooted at the controllers widget.

Signal Details

The "enter" signal
lambda (controller)    :run-last      
controller
The gtk:event-controller-focus object which received the signal.
The signal is emitted whenever the focus enters into the widget or one of its descendents. Note that this means you may not get an "enter" signal even though the widget becomes the focus location, in certain cases, such as when the focus moves from a descendent of the widget to the widget itself. If you are interested in these cases, you can monitor the is-focus property for changes.
The "leave" signal
lambda (controller)    :run-last      
controller
The gtk:event-controller-focus object which received the signal.
The signal is emitted whenever the focus leaves the widget hierarchy that is rooted at the widget that the controller is attached to. Note that this means you may not get a "leave" signal even though the focus moves away from the widget, in certain cases, such as when the focus moves from the widget to a descendent. If you are interested in these cases, you can monitor the is-focus property for changes.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

See also

2024-7-26