Class CompletionCell

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

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

Widget for single cell of completion proposal.

The GtkSourceCompletionCell widget provides a container to display various types of information with the completion display.

Each proposal may consist of multiple cells depending on the complexity of the proposal. For example, programming language proposals may contain a cell for the "left-hand-side" of an operation along with the "typed-text" for a function name and "parameters". They may also optionally set an icon to signify the kind of result.

A CompletionProvider should implement the CompletionProvider.display(CompletionContext, CompletionProposal, CompletionCell) virtual function to control how to convert data from their CompletionProposal to content for the GtkSourceCompletionCell.

  • Constructor Details

    • CompletionCell

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

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

    • getType

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

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

      protected CompletionCell 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
    • getColumn

      public CompletionColumn getColumn()
    • getWidget

      public @Nullable Widget getWidget()
      Gets the child GtkWidget, if any.
      Returns:
      a GtkWidget or null
    • setGicon

      public void setGicon(Icon gicon)
    • setIconName

      public void setIconName(String iconName)
    • setMarkup

      public void setMarkup(String markup)
    • setPaintable

      public void setPaintable(Paintable paintable)
    • setText

      public void setText(@Nullable String text)
      Sets the text for the column cell. Use null to unset.
      Parameters:
      text - the text to set or null
    • setTextWithAttributes

      public void setTextWithAttributes(String text, AttrList attrs)
    • setWidget

      public void setWidget(Widget child)
    • builder

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