Class Hover

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Hover extends GObject

Interactive tooltips.

GtkSourceHover allows a View to provide contextual information. When enabled, if the user hovers over a word in the text editor, a series of registered HoverProvider can populate a HoverDisplay with useful information.

To enable call View.getHover() and add HoverProvider using addProvider(HoverProvider). To disable, remove all registered providers with removeProvider(HoverProvider).

You can change how long to wait to display the interactive tooltip by setting the Hover:hover-delay property in milliseconds.

  • Constructor Details

    • Hover

      public Hover(MemorySegment address)
      Create a Hover instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Hover

      public Hover()
      Create a new Hover.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Hover class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Hover asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • addProvider

      public void addProvider(HoverProvider provider)
    • removeProvider

      public void removeProvider(HoverProvider provider)
    • builder

      public static Hover.Builder<? extends Hover.Builder> builder()
      A Hover.Builder object constructs a Hover with the specified properties. Use the various set...() methods to set properties, and finish construction with Hover.Builder.build().
      Returns:
      the builder object