gtksource.view

Module for [View] class

Types 3

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
View self() nothrowReturns `this`, for use in `with` statements.
ViewGidBuilder builder() static nothrowGet builder for [gtksource.view.View] Returns: New builder object
bool autoIndent() @property nothrow
void autoIndent(bool propval) @property nothrow
gtksource.types.BackgroundPatternType backgroundPattern() @property nothrowGet `backgroundPattern` property. Returns: Draw a specific background pattern on the view.
void backgroundPattern(gtksource.types.BackgroundPatternType propval) @property nothrowSet `backgroundPattern` property. Params: propval = Draw a specific background pattern on the view.
gtksource.completion.Completion completion() @property nothrowGet `completion` property. Returns: The completion object associated with the view
bool highlightCurrentLine() @property nothrow
void highlightCurrentLine(bool propval) @property nothrow
bool indentOnTab() @property nothrow
void indentOnTab(bool propval) @property nothrow
int indentWidth() @property nothrowGet `indentWidth` property. Returns: Width of an indentation step expressed in number of spaces.
void indentWidth(int propval) @property nothrowSet `indentWidth` property. Params: propval = Width of an indentation step expressed in number of spaces.
bool insertSpacesInsteadOfTabs() @property nothrow
void insertSpacesInsteadOfTabs(bool propval) @property nothrow
uint rightMarginPosition() @property nothrowGet `rightMarginPosition` property. Returns: Position of the right margin.
void rightMarginPosition(uint propval) @property nothrowSet `rightMarginPosition` property. Params: propval = Position of the right margin.
bool showLineMarks() @property nothrowGet `showLineMarks` property. Returns: Whether to display line mark pixbufs
void showLineMarks(bool propval) @property nothrowSet `showLineMarks` property. Params: propval = Whether to display line mark pixbufs
bool showLineNumbers() @property nothrowGet `showLineNumbers` property. Returns: Whether to display line numbers
void showLineNumbers(bool propval) @property nothrowSet `showLineNumbers` property. Params: propval = Whether to display line numbers
bool showRightMargin() @property nothrowGet `showRightMargin` property. Returns: Whether to display the right margin.
void showRightMargin(bool propval) @property nothrowSet `showRightMargin` property. Params: propval = Whether to display the right margin.
bool smartBackspace() @property nothrowGet `smartBackspace` property. Returns: Whether smart Backspace should be used.
void smartBackspace(bool propval) @property nothrowSet `smartBackspace` property. Params: propval = Whether smart Backspace should be used.
gtksource.types.SmartHomeEndType smartHomeEnd() @property nothrowGet `smartHomeEnd` property. Returns: Set the behavior of the HOME and END keys.
void smartHomeEnd(gtksource.types.SmartHomeEndType propval) @property nothrowSet `smartHomeEnd` property. Params: propval = Set the behavior of the HOME and END keys.
gtksource.space_drawer.SpaceDrawer spaceDrawer() @property nothrowGet `spaceDrawer` property. Returns: The #GtkSourceSpaceDrawer object associated with the view.
uint tabWidth() @property nothrowGet `tabWidth` property. Returns: Width of a tab character expressed in number of spaces.
void tabWidth(uint propval) @property nothrowSet `tabWidth` property. Params: propval = Width of a tab character expressed in number of spaces.
gtksource.view.View newWithBuffer(gtksource.buffer.Buffer buffer) static nothrowCreates a new #GtkSourceView widget displaying the buffer buffer. One buffer can be shared among many widgets.
bool getAutoIndent() nothrowReturns whether auto-indentation of text is enabled. Returns: true if auto indentation is enabled.
gtksource.types.BackgroundPatternType getBackgroundPattern() nothrowReturns the #GtkSourceBackgroundPatternType specifying if and how the background pattern should be displayed for this view. Returns: the #GtkSourceBackgroundPatternType.
gtksource.completion.Completion getCompletion() nothrowGets 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) nothrowReturns the #GtkSourceGutter object associated with window_type for view. Only GTK_TEXT_WINDOW_LEFT and GTK_TEXT_WINDOW_RIGHT are supported, respectively corresponding to the left and right gutter....
bool getHighlightCurrentLine() nothrowReturns whether the current line is highlighted. Returns: true if the current line is highlighted.
bool getIndentOnTab() nothrowReturns 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() nothrowReturns the number of spaces to use for each step of indent. See [gtksource.view.View.setIndentWidth] for details. Returns: indent width.
bool getInsertSpacesInsteadOfTabs() nothrowReturns 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) nothrowGets attributes and priority for the category.
uint getRightMarginPosition() nothrowGets the position of the right margin in the given view. Returns: the position of the right margin.
bool getShowLineMarks() nothrowReturns whether line marks are displayed beside the text. Returns: true if the line marks are displayed.
bool getShowLineNumbers() nothrowReturns whether line numbers are displayed beside the text. Returns: true if the line numbers are displayed.
bool getShowRightMargin() nothrowReturns whether a right margin is displayed. Returns: true if the right margin is shown.
bool getSmartBackspace() nothrowReturns 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() nothrowReturns 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() nothrowGets 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() nothrowReturns the width of tabulation in characters. Returns: width of tab.
uint getVisualColumn(gtk.text_iter.TextIter iter) nothrowDetermines 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) nothrowInserts one indentation level at the beginning of the specified lines. The empty lines are not indented.
void setAutoIndent(bool enable) nothrowIf true auto-indentation of text is enabled.
void setBackgroundPattern(gtksource.types.BackgroundPatternType backgroundPattern) nothrowSet if and how the background pattern should be displayed.
void setHighlightCurrentLine(bool highlight) nothrowIf highlight is true the current line will be highlighted.
void setIndentOnTab(bool enable) nothrowIf 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) nothrowSets 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) nothrowIf 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) nothrowSets attributes and priority for the category.
void setRightMarginPosition(uint pos) nothrowSets the position of the right margin in the given view.
void setShowLineMarks(bool show) nothrowIf true line marks will be displayed beside the text.
void setShowLineNumbers(bool show) nothrowIf true line numbers will be displayed beside the text.
void setShowRightMargin(bool show) nothrowIf true a right margin is displayed.
void setSmartBackspace(bool smartBackspace) nothrowWhen set to true, pressing the Backspace key will try to delete spaces up to the previous tab stop.
void setSmartHomeEnd(gtksource.types.SmartHomeEndType smartHomeEnd) nothrowSet the desired movement of the cursor when HOME and END keys are pressed.
void setTabWidth(uint width) nothrowSets 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) nothrowRemoves 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect to `Undo` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkSourceView.

Fluent builder implementation template for gtksource.view.View

Methods
T autoIndent(bool propval) nothrow
T backgroundPattern(gtksource.types.BackgroundPatternType propval) nothrowSet `backgroundPattern` property. Params: propval = Draw a specific background pattern on the view. Returns: Builder instance for fluent chaining
T highlightCurrentLine(bool propval) nothrow
T indentOnTab(bool propval) nothrow
T indentWidth(int propval) nothrowSet `indentWidth` property. Params: propval = Width of an indentation step expressed in number of spaces. Returns: Builder instance for fluent chaining
T insertSpacesInsteadOfTabs(bool propval) nothrow
T rightMarginPosition(uint propval) nothrowSet `rightMarginPosition` property. Params: propval = Position of the right margin. Returns: Builder instance for fluent chaining
T showLineMarks(bool propval) nothrowSet `showLineMarks` property. Params: propval = Whether to display line mark pixbufs Returns: Builder instance for fluent chaining
T showLineNumbers(bool propval) nothrowSet `showLineNumbers` property. Params: propval = Whether to display line numbers Returns: Builder instance for fluent chaining
T showRightMargin(bool propval) nothrowSet `showRightMargin` property. Params: propval = Whether to display the right margin. Returns: Builder instance for fluent chaining
T smartBackspace(bool propval) nothrowSet `smartBackspace` property. Params: propval = Whether smart Backspace should be used. Returns: Builder instance for fluent chaining
T smartHomeEnd(gtksource.types.SmartHomeEndType propval) nothrowSet `smartHomeEnd` property. Params: propval = Set the behavior of the HOME and END keys. Returns: Builder instance for fluent chaining
T tabWidth(uint propval) nothrowSet `tabWidth` property. Params: propval = Width of a tab character expressed in number of spaces. Returns: Builder instance for fluent chaining

Fluent builder for gtksource.view.View

Methods
View build() nothrowCreate object from builder. Returns: New object