Map

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.

Constructors

this
this()

Creates a new gtksource.map.Map.

Members

Functions

getView
gtksource.view.View getView()

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

setView
void setView(gtksource.view.View view)

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

Inherited Members

From View

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.