Class
GtkSourceMap
Description [src]
class GtkSource.Map : GtkSource.View {
parent_instance: GtkSourceView
}
Widget that displays a map for a specific GtkSourceView.
GtkSourceMap is a widget that maps the content of a GtkSourceView into
a smaller view so the user can have a quick overview of the whole document.
This works by connecting a GtkSourceView to to the GtkSourceMap using
the GtkSourceMap:view property or gtk_source_map_set_view().
GtkSourceMap is a GtkSourceView object. This means that you can add a
GtkSourceGutterRenderer to a gutter in the same way you would for a
GtkSourceView. One example might be a GtkSourceGutterRenderer that shows
which lines have changed in the document.
Additionally, it is desirable to match the font of the GtkSourceMap and
the GtkSourceView used for editing. Therefore, GtkSourceMap: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_set_size() for how to alter the size of an existing
PangoFontDescription.
When FontConfig is available, GtkSourceMap will try to use a bundled
“block” font to make the map more legible.
Ancestors
- GtkSourceView
- GtkTextView
- GtkWidget
- GInitiallyUnowned
- GObject
Constructors
gtk_source_map_new
Creates a new GtkSourceMap.
Instance methods
gtk_source_map_get_view
Gets the GtkSourceMap:view property, which is the view this widget is mapping.
gtk_source_map_set_view
Sets the view that map will be doing the mapping to.
Methods inherited from GtkSourceView (40)
gtk_source_view_get_auto_indent
Returns whether auto-indentation of text is enabled.
gtk_source_view_get_background_pattern
Returns the GtkSourceBackgroundPatternType specifying if and how
the background pattern should be displayed for this view.
gtk_source_view_get_completion
Gets the GtkSourceCompletion associated with view.
gtk_source_view_get_enable_snippets
Gets the GtkSourceView:enable-snippets property.
gtk_source_view_get_gutter
Returns the GtkSourceGutter object associated with window_type for view.
gtk_source_view_get_highlight_current_line
Returns whether the current line is highlighted.
gtk_source_view_get_hover
Gets the GtkSourceHover associated with view.
gtk_source_view_get_indent_on_tab
Returns whether when the tab key is pressed the current selection
should get indented instead of replaced with the \t character.
gtk_source_view_get_indent_width
Returns the number of spaces to use for each step of indent.
gtk_source_view_get_indenter
Gets the GtkSourceView:indenter property.
gtk_source_view_get_insert_spaces_instead_of_tabs
Returns whether when inserting a tabulator character it should be replaced by a group of space characters.
gtk_source_view_get_mark_attributes
Gets attributes and priority for the category.
gtk_source_view_get_right_margin_position
Gets the position of the right margin in the given view.
gtk_source_view_get_show_line_marks
Returns whether line marks are displayed beside the text.
gtk_source_view_get_show_line_numbers
Returns whether line numbers are displayed beside the text.
gtk_source_view_get_show_right_margin
Returns whether a right margin is displayed.
gtk_source_view_get_smart_backspace
Returns TRUE if pressing the Backspace key will try to delete spaces
up to the previous tab stop.
gtk_source_view_get_smart_home_end
Returns a GtkSourceSmartHomeEndType end value specifying
how the cursor will move when HOME and END keys are pressed.
gtk_source_view_get_space_drawer
Gets the GtkSourceSpaceDrawer associated with view.
gtk_source_view_get_tab_width
Returns the width of tabulation in characters.
gtk_source_view_get_visual_column
Determines the visual column at iter taking into consideration the
GtkSourceView:tab-width of view.
gtk_source_view_indent_lines
Inserts one indentation level at the beginning of the specified lines. The empty lines are not indented.
gtk_source_view_push_snippet
Inserts a new snippet at location.
Properties
GtkSource.Map:font-desc
GtkSource.Map:view
Properties inherited from GtkSourceView (17)
GtkSource.View:auto-indent
GtkSource.View:background-pattern
Draw a specific background pattern on the view.
GtkSource.View:completion
The completion object associated with the view.
GtkSource.View:enable-snippets
The property denotes if snippets should be
expanded when the user presses Tab after having typed a word
matching the snippets found in GtkSourceSnippetManager.
GtkSource.View:highlight-current-line
GtkSource.View:indent-on-tab
GtkSource.View:indent-width
Width of an indentation step expressed in number of spaces.
GtkSource.View:indenter
The property is a GtkSourceIndenter to use to indent
as the user types into the GtkSourceView.
GtkSource.View:insert-spaces-instead-of-tabs
GtkSource.View:right-margin-position
Position of the right margin.
GtkSource.View:show-line-marks
Whether to display line mark pixbufs.
GtkSource.View:show-line-numbers
Whether to display line numbers.
GtkSource.View:show-right-margin
Whether to display the right margin.
GtkSource.View:smart-backspace
Whether smart Backspace should be used.
GtkSource.View:smart-home-end
Set the behavior of the HOME and END keys.
GtkSource.View:space-drawer
The GtkSourceSpaceDrawer object associated with the view.4
GtkSource.View:tab-width
Width of a tab character expressed in number of spaces.