Top |
GtkSourceMapGtkSourceMap — Widget that displays a map for a specific GtkSourceView |
GtkWidget * | gtk_source_map_new () |
void | gtk_source_map_set_view () |
GtkSourceView * | gtk_source_map_get_view () |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkTextView ╰── GtkSourceView ╰── GtkSourceMap
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 “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, “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.
GtkWidget *
gtk_source_map_new (void
);
Creates a new GtkSourceMap.
Since: 3.18
void gtk_source_map_set_view (GtkSourceMap *map
,GtkSourceView *view
);
Sets the view that map
will be doing the mapping to.
Since: 3.18
GtkSourceView *
gtk_source_map_get_view (GtkSourceMap *map
);
Gets the “view” property, which is the view this widget is mapping.
Since: 3.18