Indenter


Object Hierarchy:

GtkSource.Indenter GtkSource.Indenter GtkSource.Indenter GLib.Object GLib.Object GLib.Object->GtkSource.Indenter

Description:

[ CCode ( type_cname = "GtkSourceIndenterInterface" , type_id = "gtk_source_indenter_get_type ()" ) ]
public interface Indenter : Object

Auto-indentation interface.

By default, [class@View] can auto-indent as you type when [property@View:auto-indent] is enabled. The indentation simply copies the previous lines indentation.

This can be changed by implementing `GtkSourceIndenter` and setting the [property@View:indenter] property.

Implementors of this interface should implement both [[email protected]_trigger] and [[email protected]].

[[email protected]_trigger] is called upon key-press to determine of the key press should trigger an indentation. The default implementation of the interface checks to see if the key was [[email protected]_Return] or [[email protected]_KP_Enter] without gdk_shift_mask set.

[[email protected]] is called after text has been inserted into [class@Buffer] when [[email protected]_trigger] returned true. The [[email protected]] is placed directly after the inserted character or characters.

It may be beneficial to move the insertion mark using [[email protected]_range] depending on how the indenter changes the indentation.

All changes are encapsulated within a single user action so that the user may undo them using standard undo/redo accelerators.


Namespace: GtkSource
Package: gtksourceview-5

Content:

Methods:

Inherited Members:

All known members inherited from class GLib.Object



2022 vala-language.org