Interface

GtkSource-5GtkSourceIndenterInterface

Interface for implementing Indenter. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_indent(view: GtkSource.View, iter: Gtk.TextIter): Gtk.TextIter;
    vfunc_is_trigger(
        view: GtkSource.View,
        location: Gtk.TextIter,
        state: Gdk.ModifierType,
        keyval: number,
    ): boolean;
}

Hierarchy (View Summary)

Index

Methods

  • This function should be implemented to alter the indentation of text within the view.

    view is provided so that the indenter may retrieve settings such as indentation and tab widths.

    iter is the location where the indentation was requested. This typically is after having just inserted a newline (\n) character but can be other situations such as a manually requested indentation or reformatting.

    See GtkSource.Indenter.is_trigger for how to trigger indentation on various characters inserted into the buffer.

    The implementor of this function is expected to keep iter valid across calls to the function and should contain the location of the insert mark after calling this function.

    The default implementation for this virtual function will copy the indentation of the previous line.

    Parameters

    Returns Gtk.TextIter