Map

open class Map(pointer: <Error class: unknown class><<Error class: unknown class>>) : View

Widget that displays a map for a specific class@View.

GtkSourceMap 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 GtkSourceMap using the property@Map:view property or method@Map.set_view.

GtkSourceMap 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 GtkSourceMap 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 method@Pango.FontDescription.set_size for how to alter the size of an existing struct@Pango.FontDescription.

When FontConfig is available, GtkSourceMap will try to use a bundled "block" font to make the map more legible.

Skipped during bindings generation

  • method font-desc: Property has no getter nor setter

  • method view: Property TypeInfo of getter and setter do not match

Constructors

Link copied to clipboard
constructor()

Creates a new GtkSourceMap.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Draw a specific background pattern on the view.

Link copied to clipboard

The completion object associated with the view

Link copied to clipboard

The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found in class@SnippetManager.

Link copied to clipboard
open override val gtkAccessiblePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkAccessibleTextPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkBuildablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkConstraintTargetPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkScrollablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gtksourceMapPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
val gtksourceViewPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
Link copied to clipboard
open var indenter: Indenter?

The property is a iface@Indenter to use to indent as the user types into the class@View.

Link copied to clipboard
Link copied to clipboard
open var indentWidth: Int

Width of an indentation step expressed in number of spaces.

Link copied to clipboard
Link copied to clipboard
open var rightMarginPosition: <Error class: unknown class>

Position of the right margin.

Link copied to clipboard

Whether to display line mark pixbufs

Link copied to clipboard

Whether to display line numbers

Link copied to clipboard

Whether to display the right margin.

Link copied to clipboard

Whether smart Backspace should be used.

Link copied to clipboard

Set the behavior of the HOME and END keys.

Link copied to clipboard

The class@SpaceDrawer object associated with the view.4

Link copied to clipboard
open var tabWidth: <Error class: unknown class>

Width of a tab character expressed in number of spaces.

Functions

Link copied to clipboard
fun connectChangeCase(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (caseType: ChangeCaseType) -> Unit): <Error class: unknown class>

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

Link copied to clipboard
fun connectChangeNumber(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (count: Int) -> Unit): <Error class: unknown class>

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

Link copied to clipboard
fun connectJoinLines(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Keybinding signal to join the lines currently selected.

Link copied to clipboard
fun connectLineMarkActivated(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>, <Error class: unknown class>, <Error class: unknown class>, nPresses: Int) -> Unit): <Error class: unknown class>

Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter).

Link copied to clipboard
fun connectMoveLines(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (down: Boolean) -> Unit): <Error class: unknown class>

The signal is a keybinding which gets emitted when the user initiates moving a line.

Link copied to clipboard
fun connectMoveToMatchingBracket(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (extendSelection: Boolean) -> Unit): <Error class: unknown class>

Keybinding signal to move the cursor to the matching bracket.

Link copied to clipboard
fun connectMoveWords(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (count: Int) -> Unit): <Error class: unknown class>

The signal is a keybinding which gets emitted when the user initiates moving a word.

Link copied to clipboard
fun connectShowCompletion(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

The signal is a key binding signal which gets emitted when the user requests a completion, by pressing Controlspace.

Link copied to clipboard
fun connectSmartHomeEnd(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>, count: Int) -> Unit): <Error class: unknown class>

Emitted when a the cursor was moved according to the smart home end setting.

Link copied to clipboard

Returns whether auto-indentation of text is enabled.

Link copied to clipboard

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

Link copied to clipboard

Gets the class@Completion associated with @view.

Link copied to clipboard

Gets the property@View:enable-snippets property.

Link copied to clipboard

Returns whether the current line is highlighted.

Link copied to clipboard
open fun getHover(): Hover

Gets the class@Hover associated with @view.

Link copied to clipboard
open fun getIndenter(): Indenter?

Gets the property@View:indenter property.

Link copied to clipboard

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

Link copied to clipboard
open fun getIndentWidth(): Int

Returns the number of spaces to use for each step of indent.

Link copied to clipboard

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

Link copied to clipboard
open fun getRightMarginPosition(): <Error class: unknown class>

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

Link copied to clipboard

Returns whether line marks are displayed beside the text.

Link copied to clipboard

Returns whether line numbers are displayed beside the text.

Link copied to clipboard

Returns whether a right margin is displayed.

Link copied to clipboard

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

Link copied to clipboard

Returns a enum@SmartHomeEndType end value specifying how the cursor will move when HOME and END keys are pressed.

Link copied to clipboard

Gets the class@SpaceDrawer associated with @view.

Link copied to clipboard
open fun getTabWidth(): <Error class: unknown class>

Returns the width of tabulation in characters.

Link copied to clipboard
open fun getView(): View?

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

Link copied to clipboard
open fun getVisualColumn(iter: <Error class: unknown class>): <Error class: unknown class>

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

Link copied to clipboard
open fun indentLines(start: <Error class: unknown class>, end: <Error class: unknown class>)

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

Link copied to clipboard
open fun pushSnippet(snippet: Snippet, location: <Error class: unknown class>? = null)

Inserts a new snippet at @location

Link copied to clipboard
open fun setAutoIndent(enable: Boolean)

If true auto-indentation of text is enabled.

Link copied to clipboard
open fun setBackgroundPattern(backgroundPattern: BackgroundPatternType)

Set if and how the background pattern should be displayed.

Link copied to clipboard
open fun setEnableSnippets(enableSnippets: Boolean)

Sets the property@View:enable-snippets property.

Link copied to clipboard
open fun setHighlightCurrentLine(highlight: Boolean)

If @highlight is true the current line will be highlighted.

Link copied to clipboard
open fun setIndenter(indenter: Indenter? = null)

Sets the indenter for @view to @indenter.

Link copied to clipboard
open fun setIndentOnTab(enable: Boolean)

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.

Link copied to clipboard
open fun setIndentWidth(width: Int)

Sets the number of spaces to use for each step of indent when the tab key is pressed.

Link copied to clipboard

If true a tab key pressed is replaced by a group of space characters.

Link copied to clipboard
open fun setMarkAttributes(category: String, attributes: MarkAttributes, priority: Int)

Sets attributes and priority for the @category.

Link copied to clipboard
open fun setRightMarginPosition(pos: <Error class: unknown class>)

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

Link copied to clipboard
open fun setShowLineMarks(show: Boolean)

If true line marks will be displayed beside the text.

Link copied to clipboard
open fun setShowLineNumbers(show: Boolean)

If true line numbers will be displayed beside the text.

Link copied to clipboard
open fun setShowRightMargin(show: Boolean)

If true a right margin is displayed.

Link copied to clipboard
open fun setSmartBackspace(smartBackspace: Boolean)

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

Link copied to clipboard
open fun setSmartHomeEnd(smartHomeEnd: SmartHomeEndType)

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

Link copied to clipboard
open fun setTabWidth(width: <Error class: unknown class>)

Sets the width of tabulation in characters.

Link copied to clipboard
open fun setView(view: View)

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

Link copied to clipboard
open fun unindentLines(start: <Error class: unknown class>, end: <Error class: unknown class>)

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