Schnittstelle Widget.OnQueryTooltip

Umschließende Klasse:
Widget
Funktionsschnittstelle:
Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.

@FunctionalInterface public static interface Widget.OnQueryTooltip
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
    onQueryTooltip(int x, int y, boolean keyboard_mode, Tooltip tooltip)
    Emitted when the widget’s tooltip is about to be shown.
  • Methodendetails

    • onQueryTooltip

      boolean onQueryTooltip(int x, int y, boolean keyboard_mode, @Nonnull Tooltip tooltip)
      Emitted when the widget’s tooltip is about to be shown.

      This happens when the [property@Gtk.Widget:has-tooltip] property
      is true and the hover timeout has expired with the cursor hovering
      above @widget; or emitted when @widget got focus in keyboard mode.

      Using the given coordinates, the signal handler should determine
      whether a tooltip should be shown for @widget. If this is the case
      true should be returned, false otherwise. Note that if @keyboard_mode
      is true, the values of @x and @y are undefined and should not be used.

      The signal handler is free to manipulate @tooltip with the therefore
      destined function calls.
      Parameter:
      x - the x coordinate of the cursor position in widget coordinates
      y - the y coordinate of the cursor position in widget coordinates
      keyboard_mode - true if the tooltip was triggered using the keyboard
      tooltip - a `GtkTooltip`
      Gibt zurück:
      true if @tooltip should be shown right now, false otherwise