- getGType
GType getGType()
- gType
GType gType [@property getter]
- self
View self()
Returns this, for use in with statements.
- autoIndent
bool autoIndent [@property getter]
- autoIndent
bool autoIndent [@property setter]
- backgroundPattern
gtksource.types.BackgroundPatternType backgroundPattern [@property getter]
Get backgroundPattern property.
- backgroundPattern
gtksource.types.BackgroundPatternType backgroundPattern [@property setter]
Set backgroundPattern property.
- completion
gtksource.completion.Completion completion [@property getter]
- enableSnippets
bool enableSnippets [@property getter]
Get enableSnippets property.
- enableSnippets
bool enableSnippets [@property setter]
Set enableSnippets property.
- highlightCurrentLine
bool highlightCurrentLine [@property getter]
- highlightCurrentLine
bool highlightCurrentLine [@property setter]
- indentOnTab
bool indentOnTab [@property getter]
- indentOnTab
bool indentOnTab [@property setter]
- indentWidth
int indentWidth [@property getter]
Get indentWidth property.
- indentWidth
int indentWidth [@property setter]
Set indentWidth property.
- indenter
gtksource.indenter.Indenter indenter [@property getter]
- indenter
gtksource.indenter.Indenter indenter [@property setter]
- insertSpacesInsteadOfTabs
bool insertSpacesInsteadOfTabs [@property getter]
- insertSpacesInsteadOfTabs
bool insertSpacesInsteadOfTabs [@property setter]
- rightMarginPosition
uint rightMarginPosition [@property getter]
Get rightMarginPosition property.
- rightMarginPosition
uint rightMarginPosition [@property setter]
Set rightMarginPosition property.
- showLineMarks
bool showLineMarks [@property getter]
Get showLineMarks property.
- showLineMarks
bool showLineMarks [@property setter]
Set showLineMarks property.
- showLineNumbers
bool showLineNumbers [@property getter]
Get showLineNumbers property.
- showLineNumbers
bool showLineNumbers [@property setter]
Set showLineNumbers property.
- showRightMargin
bool showRightMargin [@property getter]
Get showRightMargin property.
- showRightMargin
bool showRightMargin [@property setter]
Set showRightMargin property.
- smartBackspace
bool smartBackspace [@property getter]
Get smartBackspace property.
- smartBackspace
bool smartBackspace [@property setter]
Set smartBackspace property.
- smartHomeEnd
gtksource.types.SmartHomeEndType smartHomeEnd [@property getter]
Get smartHomeEnd property.
- smartHomeEnd
gtksource.types.SmartHomeEndType smartHomeEnd [@property setter]
Set smartHomeEnd property.
- spaceDrawer
gtksource.space_drawer.SpaceDrawer spaceDrawer [@property getter]
Get spaceDrawer property.
- tabWidth
uint tabWidth [@property getter]
- tabWidth
uint tabWidth [@property setter]
- newWithBuffer
gtksource.view.View newWithBuffer(gtksource.buffer.Buffer buffer)
Creates a new #GtkSourceView widget displaying the buffer buffer.
- getAutoIndent
bool getAutoIndent()
Returns whether auto-indentation of text is enabled.
- getBackgroundPattern
gtksource.types.BackgroundPatternType getBackgroundPattern()
Returns the #GtkSourceBackgroundPatternType specifying if and how
the background pattern should be displayed for this view.
- getCompletion
gtksource.completion.Completion getCompletion()
Gets the classCompletion associated with view.
- getEnableSnippets
bool getEnableSnippets()
Gets the propertyView:enable-snippets property.
- getGutter
gtksource.gutter.Gutter getGutter(gtk.types.TextWindowType windowType)
Returns the classGutter object associated with window_type for view.
- getHighlightCurrentLine
bool getHighlightCurrentLine()
Returns whether the current line is highlighted.
- getHover
gtksource.hover.Hover getHover()
Gets the classHover associated with view.
- 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.
- getIndenter
gtksource.indenter.Indenter getIndenter()
Gets the propertyView:indenter property.
- getInsertSpacesInsteadOfTabs
bool getInsertSpacesInsteadOfTabs()
Returns whether when inserting a tabulator character it should
be replaced by a group of space characters.
- getMarkAttributes
gtksource.mark_attributes.MarkAttributes 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
gtksource.types.SmartHomeEndType getSmartHomeEnd()
Returns a enumSmartHomeEndType end value specifying
how the cursor will move when HOME and END keys are pressed.
- getSpaceDrawer
gtksource.space_drawer.SpaceDrawer getSpaceDrawer()
Gets the classSpaceDrawer associated with view.
- getTabWidth
uint getTabWidth()
Returns the width of tabulation in characters.
- getVisualColumn
uint getVisualColumn(gtk.text_iter.TextIter iter)
Determines the visual column at iter taking into consideration the
propertyView:tab-width of view.
- indentLines
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.
- pushSnippet
void pushSnippet(gtksource.snippet.Snippet snippet, gtk.text_iter.TextIter location)
Inserts a new snippet at location
- setAutoIndent
void setAutoIndent(bool enable)
If true auto-indentation of text is enabled.
- setBackgroundPattern
void setBackgroundPattern(gtksource.types.BackgroundPatternType backgroundPattern)
Set if and how the background pattern should be displayed.
- setEnableSnippets
void setEnableSnippets(bool enableSnippets)
Sets the propertyView:enable-snippets property.
- 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.
- setIndenter
void setIndenter(gtksource.indenter.Indenter indenter)
Sets the indenter for view to indenter.
- setInsertSpacesInsteadOfTabs
void setInsertSpacesInsteadOfTabs(bool enable)
If true a tab key pressed is replaced by a group of space characters.
- setMarkAttributes
void setMarkAttributes(string category, gtksource.mark_attributes.MarkAttributes 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(gtksource.types.SmartHomeEndType 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.
- unindentLines
void unindentLines(gtk.text_iter.TextIter start, gtk.text_iter.TextIter end)
Removes one indentation level at the beginning of the
specified lines.
- connectChangeCase
ulong connectChangeCase(T callback, Flag!"After" after)
Connect to ChangeCase signal.
- connectChangeNumber
ulong connectChangeNumber(T callback, Flag!"After" after)
Connect to ChangeNumber signal.
- connectJoinLines
ulong connectJoinLines(T callback, Flag!"After" after)
Connect to JoinLines signal.
- connectLineMarkActivated
ulong connectLineMarkActivated(T callback, Flag!"After" after)
Connect to LineMarkActivated signal.
- connectMoveLines
ulong connectMoveLines(T callback, Flag!"After" after)
Connect to MoveLines signal.
- connectMoveToMatchingBracket
ulong connectMoveToMatchingBracket(T callback, Flag!"After" after)
Connect to MoveToMatchingBracket signal.
- connectMoveWords
ulong connectMoveWords(T callback, Flag!"After" after)
Connect to MoveWords signal.
- connectShowCompletion
ulong connectShowCompletion(T callback, Flag!"After" after)
Connect to ShowCompletion signal.
- connectSmartHomeEnd
ulong connectSmartHomeEnd(T callback, Flag!"After" after)
Connect to SmartHomeEnd signal.
Widget that displays a map for a specific class@View.
gtksource.map.Map is a widget that maps the content of a class@View into a smaller view so the user can have a quick overview of the whole document.
This works by connecting a class@View to to the gtksource.map.Map using the property@Map:view property or gtksource.map.Map.setView.
gtksource.map.Map is a class@View object. This means that you can add a class@GutterRenderer to a gutter in the same way you would for a class@View. One example might be a class@GutterRenderer that shows which lines have changed in the document.
Additionally, it is desirable to match the font of the gtksource.map.Map and the class@View used for editing. Therefore, property@Map:font-desc should be used to set the target font. You will need to adjust this to the desired font size for the map. A 1pt font generally seems to be an appropriate font size. "Monospace 1" is the default. See pango.font_description.FontDescription.setSize for how to alter the size of an existing pango.font_description.FontDescription.
When FontConfig is available, gtksource.map.Map will try to use a bundled "block" font to make the map more legible.