Class Tag

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class Tag extends TextTag

A tag that can be applied to text in a Buffer.

GtkSourceTag is a subclass of TextTag that adds properties useful for the GtkSourceView library.

If, for a certain tag, TextTag is sufficient, it's better that you create a TextTag, not a Tag.

  • Constructor Details

    • Tag

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

      public Tag(@Nullable String name)

      Creates a GtkSourceTag.

      Configure the tag using object arguments, i.e. using GObject#set.

      For usual cases, Buffer.createSourceTag(String, String, Object...) is more convenient to use.

      Parameters:
      name - tag name, or null.
    • Tag

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

    • getType

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

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

      protected Tag 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 TextTag
      Returns:
      the instance as if it were its parent type
    • builder

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