Virtual Method
GtkSourceIndenterindent
Declaration [src]
void
indent (
GtkSourceIndenter* self,
GtkSourceView* view,
GtkTextIter* iter
)
Description [src]
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 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
view
-
Type:
GtkSourceView
A
GtkSourceView
.The data is owned by the caller of the function. iter
-
Type:
GtkTextIter
The location of the indentation request.
The argument will be modified by the function. The called function takes ownership of the data, and is responsible for freeing it.