gtksource.view
Module for [View] class
Types 3
classView : gtk.text_view.TextView
Methods
ViewGidBuilder builder()Get builder for [gtksource.view.View] Returns: New builder objectbool autoIndent() @propertyvoid autoIndent(bool propval) @propertygtksource.types.BackgroundPatternType backgroundPattern() @propertyGet `backgroundPattern` property. Returns: Draw a specific background pattern on the view.void backgroundPattern(gtksource.types.BackgroundPatternType propval) @propertySet `backgroundPattern` property. Params: propval = Draw a specific background pattern on the view.gtksource.completion.Completion completion() @propertyGet `completion` property. Returns: The completion object associated with the viewbool highlightCurrentLine() @propertyvoid highlightCurrentLine(bool propval) @propertybool indentOnTab() @propertyvoid indentOnTab(bool propval) @propertyint indentWidth() @propertyGet `indentWidth` property. Returns: Width of an indentation step expressed in number of spaces.void indentWidth(int propval) @propertySet `indentWidth` property. Params: propval = Width of an indentation step expressed in number of spaces.bool insertSpacesInsteadOfTabs() @propertyvoid insertSpacesInsteadOfTabs(bool propval) @propertyuint rightMarginPosition() @propertyGet `rightMarginPosition` property. Returns: Position of the right margin.void rightMarginPosition(uint propval) @propertySet `rightMarginPosition` property. Params: propval = Position of the right margin.bool showLineMarks() @propertyGet `showLineMarks` property. Returns: Whether to display line mark pixbufsvoid showLineMarks(bool propval) @propertySet `showLineMarks` property. Params: propval = Whether to display line mark pixbufsbool showLineNumbers() @propertyGet `showLineNumbers` property. Returns: Whether to display line numbersvoid showLineNumbers(bool propval) @propertySet `showLineNumbers` property. Params: propval = Whether to display line numbersbool showRightMargin() @propertyGet `showRightMargin` property. Returns: Whether to display the right margin.void showRightMargin(bool propval) @propertySet `showRightMargin` property. Params: propval = Whether to display the right margin.bool smartBackspace() @propertyGet `smartBackspace` property. Returns: Whether smart Backspace should be used.void smartBackspace(bool propval) @propertySet `smartBackspace` property. Params: propval = Whether smart Backspace should be used.gtksource.types.SmartHomeEndType smartHomeEnd() @propertyGet `smartHomeEnd` property. Returns: Set the behavior of the HOME and END keys.void smartHomeEnd(gtksource.types.SmartHomeEndType propval) @propertySet `smartHomeEnd` property. Params: propval = Set the behavior of the HOME and END keys.gtksource.space_drawer.SpaceDrawer spaceDrawer() @propertyGet `spaceDrawer` property. Returns: The #GtkSourceSpaceDrawer object associated with the view.uint tabWidth() @propertyGet `tabWidth` property. Returns: Width of a tab character expressed in number of spaces.void tabWidth(uint propval) @propertySet `tabWidth` property. Params: propval = Width of a tab character expressed in number of spaces.gtksource.view.View newWithBuffer(gtksource.buffer.Buffer buffer)Creates a new #GtkSourceView widget displaying the buffer buffer. One buffer can be shared among many widgets.bool getAutoIndent()Returns whether auto-indentation of text is enabled. Returns: true if auto indentation is enabled.gtksource.types.BackgroundPatternType getBackgroundPattern()Returns the #GtkSourceBackgroundPatternType specifying if and how the background pattern should be displayed for this view. Returns: the #GtkSourceBackgroundPatternType.gtksource.completion.Completion getCompletion()Gets the #GtkSourceCompletion associated with view. The returned object is guaranteed to be the same for the lifetime of view. Each #GtkSourceView object has a different #GtkSourceCompletion. Retur...gtksource.gutter.Gutter getGutter(gtk.types.TextWindowType windowType)Returns the #GtkSourceGutter object associated with windowtype for view. Only GTKTEXTWINDOWLEFT and GTKTEXTWINDOW_RIGHT are supported, respectively corresponding to the left and right gutter. The l...bool getHighlightCurrentLine()Returns whether the current line is highlighted. Returns: true if the current line is highlighted.bool getIndentOnTab()Returns whether when the tab key is pressed the current selection should get indented instead of replaced with the \t character. Returns: true if the selection is indented when tab is pressed.int getIndentWidth()Returns the number of spaces to use for each step of indent. See [gtksource.view.View.setIndentWidth] for details. Returns: indent width.bool getInsertSpacesInsteadOfTabs()Returns whether when inserting a tabulator character it should be replaced by a group of space characters. Returns: true if spaces are inserted instead of tabs.gtksource.mark_attributes.MarkAttributes getMarkAttributes(string category, out int priority)Gets attributes and priority for the category.uint getRightMarginPosition()Gets the position of the right margin in the given view. Returns: the position of the right margin.bool getShowLineMarks()Returns whether line marks are displayed beside the text. Returns: true if the line marks are displayed.bool getShowLineNumbers()Returns whether line numbers are displayed beside the text. Returns: true if the line numbers are displayed.bool getShowRightMargin()Returns whether a right margin is displayed. Returns: true if the right margin is shown.bool getSmartBackspace()Returns true if pressing the Backspace key will try to delete spaces up to the previous tab stop. Returns: true if smart Backspace handling is enabled.gtksource.types.SmartHomeEndType getSmartHomeEnd()Returns a #GtkSourceSmartHomeEndType end value specifying how the cursor will move when HOME and END keys are pressed. Returns: a #GtkSourceSmartHomeEndType value.gtksource.space_drawer.SpaceDrawer getSpaceDrawer()Gets the #GtkSourceSpaceDrawer associated with view. The returned object is guaranteed to be the same for the lifetime of view. Each #GtkSourceView object has a different #GtkSourceSpaceDrawer. Ret...uint getTabWidth()Returns the width of tabulation in characters. Returns: width of tab.uint getVisualColumn(gtk.text_iter.TextIter iter)Determines the visual column at iter taking into consideration the #GtkSourceView:tab-width of view.void indentLines(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)Inserts one indentation level at the beginning of the specified lines. The empty lines are not indented.void setAutoIndent(bool enable)If true auto-indentation of text is enabled.void setBackgroundPattern(gtksource.types.BackgroundPatternType backgroundPattern)Set if and how the background pattern should be displayed.void setHighlightCurrentLine(bool highlight)If highlight is true the current line will be highlighted.void setIndentOnTab(bool enable)If true, when the tab key is pressed when several lines are selected, the selected lines are indented of one level instead of being replaced with a \t character. Shift+Tab unindents the selection.void setIndentWidth(int width)Sets the number of spaces to use for each step of indent when the tab key is pressed. If width is -1, the value of the #GtkSourceView:tab-width property will be used.void setInsertSpacesInsteadOfTabs(bool enable)If true a tab key pressed is replaced by a group of space characters. Of course it is still possible to insert a real \t programmatically with the #GtkTextBuffer API.void setMarkAttributes(string category, gtksource.mark_attributes.MarkAttributes attributes, int priority)Sets attributes and priority for the category.void setRightMarginPosition(uint pos)Sets the position of the right margin in the given view.void setShowLineMarks(bool show)If true line marks will be displayed beside the text.void setShowLineNumbers(bool show)If true line numbers will be displayed beside the text.void setShowRightMargin(bool show)If true a right margin is displayed.void setSmartBackspace(bool smartBackspace)When set to true, pressing the Backspace key will try to delete spaces up to the previous tab stop.void setSmartHomeEnd(gtksource.types.SmartHomeEndType smartHomeEnd)Set the desired movement of the cursor when HOME and END keys are pressed.void setTabWidth(uint width)Sets the width of tabulation in characters. The #GtkTextBuffer still contains \t characters, but they can take a different visual width in a #GtkSourceView widget.void unindentLines(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)Removes one indentation level at the beginning of the specified lines.gulong connectChangeCase(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gtksource.types.ChangeCaseType)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.view.View)))
&& Parameters!T.length < 3)Connect to `ChangeCase` signal.gulong connectChangeNumber(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == int)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.view.View)))
&& Parameters!T.length < 3)Connect to `ChangeNumber` signal.gulong connectJoinLines(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.view.View)))
&& Parameters!T.length < 2)Connect to `JoinLines` signal.gulong connectLineMarkActivated(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gtk.text_iter.TextIter)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == gdk.event.Event)))
&& (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gtksource.view.View)))
&& Parameters!T.length < 4)Connect to `LineMarkActivated` signal.gulong connectMoveLines(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == bool)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.view.View)))
&& Parameters!T.length < 3)Connect to `MoveLines` signal.gulong connectMoveToMatchingBracket(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == bool)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.view.View)))
&& Parameters!T.length < 3)Connect to `MoveToMatchingBracket` signal.gulong connectMoveWords(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == int)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtksource.view.View)))
&& Parameters!T.length < 3)Connect to `MoveWords` signal.gulong connectRedo(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.view.View)))
&& Parameters!T.length < 2)Connect to `Redo` signal.gulong connectShowCompletion(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.view.View)))
&& Parameters!T.length < 2)Connect to `ShowCompletion` signal.gulong connectSmartHomeEnd(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == gtk.text_iter.TextIter)))
&& (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] == int)))
&& (Parameters!T.length < 3 || (ParameterStorageClassTuple!T[2] == ParameterStorageClass.none && is(Parameters!T[2] : gtksource.view.View)))
&& Parameters!T.length < 4)Connect to `SmartHomeEnd` signal.gulong connectUndo(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtksource.view.View)))
&& Parameters!T.length < 2)Connect to `Undo` signal.Methods
T autoIndent(bool propval)T backgroundPattern(gtksource.types.BackgroundPatternType propval)Set `backgroundPattern` property. Params: propval = Draw a specific background pattern on the view. Returns: Builder instance for fluent chainingT highlightCurrentLine(bool propval)T indentOnTab(bool propval)T indentWidth(int propval)Set `indentWidth` property. Params: propval = Width of an indentation step expressed in number of spaces. Returns: Builder instance for fluent chainingT insertSpacesInsteadOfTabs(bool propval)T rightMarginPosition(uint propval)Set `rightMarginPosition` property. Params: propval = Position of the right margin. Returns: Builder instance for fluent chainingT showLineMarks(bool propval)Set `showLineMarks` property. Params: propval = Whether to display line mark pixbufs Returns: Builder instance for fluent chainingT showLineNumbers(bool propval)Set `showLineNumbers` property. Params: propval = Whether to display line numbers Returns: Builder instance for fluent chainingT showRightMargin(bool propval)Set `showRightMargin` property. Params: propval = Whether to display the right margin. Returns: Builder instance for fluent chainingT smartBackspace(bool propval)Set `smartBackspace` property. Params: propval = Whether smart Backspace should be used. Returns: Builder instance for fluent chainingT smartHomeEnd(gtksource.types.SmartHomeEndType propval)Set `smartHomeEnd` property. Params: propval = Set the behavior of the HOME and END keys. Returns: Builder instance for fluent chainingT tabWidth(uint propval)Set `tabWidth` property. Params: propval = Width of a tab character expressed in number of spaces. Returns: Builder instance for fluent chaining