Class: Gtk::EventControllerFocus

Inherits:
EventController show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from EventController

#current_event, #current_event_device, #current_event_state, #current_event_time, #name, #name=, #propagation_limit, #propagation_limit=, #propagation_phase, #propagation_phase=, #reset, #static_name=, #widget, #widget=

Constructor Details

#initializeGtk::EventController

Creates a new event controller that will handle focus events.

Instance Method Details

#contains_focusBoolean

Returns true if focus is within self or one of its children.

Returns:

  • (Boolean)

    true if focus is within self or one of its children

#contains_focus=(contains_focus) ⇒ Boolean

true if focus is contained in the controllers widget.

See [propertyGtk.EventControllerFocus:is-focus] for whether the focus is in the widget itself or inside a descendent.

When handling focus events, this property is updated before [signalGtk.EventControllerFocus::enter] or [signalGtk.EventControllerFocus::leave] are emitted.

Parameters:

  • contains_focus (Boolean)

Returns:

  • (Boolean)

    contains-focus

  • (Boolean)

    contains-focus

#contains_focus?Boolean

true if focus is contained in the controllers widget.

See [propertyGtk.EventControllerFocus:is-focus] for whether the focus is in the widget itself or inside a descendent.

When handling focus events, this property is updated before [signalGtk.EventControllerFocus::enter] or [signalGtk.EventControllerFocus::leave] are emitted.

Returns:

  • (Boolean)

    contains-focus

#is_focusBoolean

Returns true if focus is within self, but not one of its children.

Returns:

  • (Boolean)

    true if focus is within self, but not one of its children

#is_focus=(is_focus) ⇒ Boolean

true if focus is in the controllers widget itself, as opposed to in a descendent widget.

See also [propertyGtk.EventControllerFocus:contains-focus].

When handling focus events, this property is updated before [signalGtk.EventControllerFocus::enter] or [signalGtk.EventControllerFocus::leave] are emitted.

Parameters:

  • is_focus (Boolean)

Returns:

  • (Boolean)

    is-focus

  • (Boolean)

    is-focus

#is_focus?Boolean

true if focus is in the controllers widget itself, as opposed to in a descendent widget.

See also [propertyGtk.EventControllerFocus:contains-focus].

When handling focus events, this property is updated before [signalGtk.EventControllerFocus::enter] or [signalGtk.EventControllerFocus::leave] are emitted.

Returns:

  • (Boolean)

    is-focus