Class HoverDisplay

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") public class HoverDisplay extends Widget implements Accessible, Buildable, ConstraintTarget

Display for interactive tooltips.

GtkSourceHoverDisplay is a Widget that may be populated with widgets to be displayed to the user in interactive tooltips. The children widgets are packed vertically using a Box.

Implement the HoverProvider interface to be notified of when to populate a GtkSourceHoverDisplay on behalf of the user.

  • Constructor Details

    • HoverDisplay

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

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

    • getType

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

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

      protected HoverDisplay 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 Widget
      Returns:
      the instance as if it were its parent type
    • append

      public void append(Widget child)
    • insertAfter

      public void insertAfter(Widget child, Widget sibling)
      Description copied from class: Widget

      Sets the parent widget of the widget.

      In contrast to Widget.setParent(Widget), this function inserts this Widget at a specific position into the list of children of the parent widget.

      It will be placed after previousSibling, or at the beginning if previousSibling is NULL.

      After calling this function, gtk_widget_get_prev_sibling (widget) will return previousSibling.

      If parent is already set as the parent widget of widget, this function can also be used to reorder this Widget in the child widget list of parent.

      This function is primarily meant for widget implementations; if you are just using a widget, you must use its own API for adding children.

      Overrides:
      insertAfter in class Widget
      Parameters:
      child - the parent widget to insert this Widget into
      sibling - the new previous sibling of this Widget
    • prepend

      public void prepend(Widget child)
    • remove

      public void remove(Widget child)
    • builder

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