SourceMap

Constructors

this
this(GtkSourceMap* gtkSourceMap, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new #GtkSourceMap.

Members

Functions

getSourceMapStruct
GtkSourceMap* getSourceMapStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getView
SourceView getView()

Gets the #GtkSourceMap:view property, which is the view this widget is mapping.

setView
void setView(SourceView view)

Sets the view that @map will be doing the mapping to.

Static functions

getType
GType getType()

Variables

gtkSourceMap
GtkSourceMap* gtkSourceMap;

the main Gtk struct

Inherited Members

From SourceView

gtkSourceView
GtkSourceView* gtkSourceView;

the main Gtk struct

getSourceViewStruct
GtkSourceView* getSourceViewStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getBuffer
SourceBuffer getBuffer()

Returns the GtkSourceBuffer being displayed by this source view. The reference count on the buffer is not incremented; the caller of this function won't own a new reference.

getType
GType getType()
getAutoIndent
bool getAutoIndent()

Returns whether auto-indentation of text is enabled.

getBackgroundPattern
GtkSourceBackgroundPatternType getBackgroundPattern()

Returns the #GtkSourceBackgroundPatternType specifying if and how the background pattern should be displayed for this @view.

getCompletion
SourceCompletion 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.

getDrawSpaces
GtkSourceDrawSpacesFlags getDrawSpaces()

Returns the #GtkSourceDrawSpacesFlags specifying if and how spaces should be displayed for this @view.

getGutter
SourceGutter getGutter(GtkTextWindowType windowType)

Returns 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. The line numbers and mark category icons are rendered in the left gutter.

getHighlightCurrentLine
bool getHighlightCurrentLine()

Returns whether the current line is highlighted.

getIndentOnTab
bool getIndentOnTab()

Returns whether when the tab key is pressed the current selection should get indented instead of replaced with the \t character.

getIndentWidth
int getIndentWidth()

Returns the number of spaces to use for each step of indent. See gtk_source_view_set_indent_width() for details.

getInsertSpacesInsteadOfTabs
bool getInsertSpacesInsteadOfTabs()

Returns whether when inserting a tabulator character it should be replaced by a group of space characters.

getMarkAttributes
SourceMarkAttributes getMarkAttributes(string category, int* priority)

Gets attributes and priority for the @category.

getRightMarginPosition
uint getRightMarginPosition()

Gets the position of the right margin in the given @view.

getShowLineMarks
bool getShowLineMarks()

Returns whether line marks are displayed beside the text.

getShowLineNumbers
bool getShowLineNumbers()

Returns whether line numbers are displayed beside the text.

getShowRightMargin
bool getShowRightMargin()

Returns whether a right margin is displayed.

getSmartBackspace
bool getSmartBackspace()

Returns %TRUE if pressing the Backspace key will try to delete spaces up to the previous tab stop.

getSmartHomeEnd
GtkSourceSmartHomeEndType getSmartHomeEnd()

Returns a #GtkSourceSmartHomeEndType end value specifying how the cursor will move when HOME and END keys are pressed.

getSpaceDrawer
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.

getTabWidth
uint getTabWidth()

Returns the width of tabulation in characters.

getVisualColumn
uint getVisualColumn(TextIter iter)

Determines the visual column at @iter taking into consideration the #GtkSourceView:tab-width of @view.

indentLines
void indentLines(TextIter start, TextIter end)

Inserts one indentation level at the beginning of the specified lines. The empty lines are not indented.

setAutoIndent
void setAutoIndent(bool enable)

If %TRUE auto-indentation of text is enabled.

setBackgroundPattern
void setBackgroundPattern(GtkSourceBackgroundPatternType backgroundPattern)

Set if and how the background pattern should be displayed.

setDrawSpaces
void setDrawSpaces(GtkSourceDrawSpacesFlags flags)

Set if and how the spaces should be visualized. Specifying @flags as 0 will disable display of spaces.

setHighlightCurrentLine
void setHighlightCurrentLine(bool highlight)

If @highlight is %TRUE the current line will be highlighted.

setIndentOnTab
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.

setIndentWidth
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.

setInsertSpacesInsteadOfTabs
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.

setMarkAttributes
void setMarkAttributes(string category, SourceMarkAttributes attributes, int priority)

Sets attributes and priority for the @category.

setRightMarginPosition
void setRightMarginPosition(uint pos)

Sets the position of the right margin in the given @view.

setShowLineMarks
void setShowLineMarks(bool show)

If %TRUE line marks will be displayed beside the text.

setShowLineNumbers
void setShowLineNumbers(bool show)

If %TRUE line numbers will be displayed beside the text.

setShowRightMargin
void setShowRightMargin(bool show)

If %TRUE a right margin is displayed.

setSmartBackspace
void setSmartBackspace(bool smartBackspace)

When set to %TRUE, pressing the Backspace key will try to delete spaces up to the previous tab stop.

setSmartHomeEnd
void setSmartHomeEnd(GtkSourceSmartHomeEndType smartHomeEnd)

Set the desired movement of the cursor when HOME and END keys are pressed.

setTabWidth
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.

unindentLines
void unindentLines(TextIter start, TextIter end)

Removes one indentation level at the beginning of the specified lines.

addOnChangeCase
gulong addOnChangeCase(void delegate(GtkSourceChangeCaseType, SourceView) dlg, ConnectFlags connectFlags)

Keybinding signal to change case of the text at the current cursor position.

addOnChangeNumber
gulong addOnChangeNumber(void delegate(int, SourceView) dlg, ConnectFlags connectFlags)

Keybinding signal to edit a number at the current cursor position.

addOnJoinLines
gulong addOnJoinLines(void delegate(SourceView) dlg, ConnectFlags connectFlags)

Keybinding signal to join the lines currently selected.

addOnLineMarkActivated
gulong addOnLineMarkActivated(void delegate(TextIter, Event, SourceView) dlg, ConnectFlags connectFlags)

Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter). You can use @iter to determine on which line the activation took place.

addOnMoveLines
gulong addOnMoveLines(void delegate(bool, int, SourceView) dlg, ConnectFlags connectFlags)

The ::move-lines signal is a keybinding which gets emitted when the user initiates moving a line. The default binding key is Alt+Up/Down arrow. And moves the currently selected lines, or the current line by @count. For the moment, only @count of -1 or 1 is valid.

addOnMoveToMatchingBracket
gulong addOnMoveToMatchingBracket(void delegate(bool, SourceView) dlg, ConnectFlags connectFlags)

Keybinding signal to move the cursor to the matching bracket.

addOnMoveWords
gulong addOnMoveWords(void delegate(int, SourceView) dlg, ConnectFlags connectFlags)

The ::move-words signal is a keybinding which gets emitted when the user initiates moving a word. The default binding key is Alt+Left/Right Arrow and moves the current selection, or the current word by one word.

addOnRedo
gulong addOnRedo(void delegate(SourceView) dlg, ConnectFlags connectFlags)
addOnShowCompletion
gulong addOnShowCompletion(void delegate(SourceView) dlg, ConnectFlags connectFlags)

The ::show-completion signal is a key binding signal which gets emitted when the user requests a completion, by pressing <keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.

addOnSmartHomeEnd
gulong addOnSmartHomeEnd(void delegate(TextIter, int, SourceView) dlg, ConnectFlags connectFlags)

Emitted when a the cursor was moved according to the smart home end setting. The signal is emitted after the cursor is moved, but during the GtkTextView::move-cursor action. This can be used to find out whether the cursor was moved by a normal home/end or by a smart home/end.

addOnUndo
gulong addOnUndo(void delegate(SourceView) dlg, ConnectFlags connectFlags)

Meta