Class GutterRendererText

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

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

Renders text in the gutter.

A GtkSourceGutterRendererText can be used to render text in a cell of Gutter.

  • Constructor Details

    • GutterRendererText

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

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

    • getType

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

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

      protected GutterRendererText 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 GutterRenderer
      Returns:
      the instance as if it were its parent type
    • measure

      public void measure(String text, @Nullable Out<Integer> width, @Nullable Out<Integer> height)
      Measures the text provided using the pango layout used by the GtkSourceGutterRendererText.
      Parameters:
      text - the text to measure.
      width - location to store the width of the text in pixels, or null.
      height - location to store the height of the text in pixels, or null.
    • measureMarkup

      public void measureMarkup(String markup, @Nullable Out<Integer> width, @Nullable Out<Integer> height)
      Measures the pango markup provided using the pango layout used by the GtkSourceGutterRendererText.
      Parameters:
      markup - the pango markup to measure.
      width - location to store the width of the text in pixels, or null.
      height - location to store the height of the text in pixels, or null.
    • setMarkup

      public void setMarkup(String markup, int length)
    • setText

      public void setText(String text, int length)
    • builder

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