GtkSource.Map¶
- Subclasses:
None
Methods¶
- Inherited:
GtkSource.View (42), Gtk.TextView (73), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1), Gtk.Scrollable (9)
- Structs:
class |
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
GtkSource.View (17), Gtk.TextView (21), Gtk.Widget (34), Gtk.Accessible (1), Gtk.Scrollable (4)
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The Pango font description to use. |
||
r/w |
The view this widget is mapping. |
Signals¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class GtkSource.Map(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
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`:py:data::view<GtkSource.Map.props.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`:py:data::font-desc<GtkSource.Map.props.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.- classmethod new()¶
- Returns:
a new
GtkSource.Map
.- Return type:
Creates a new
GtkSourceMap
.
- get_view()¶
- Returns:
a
GtkSource.View
orNone
.- Return type:
Gets the [property`Map`:py:data::view<GtkSource.Map.props.view>] property, which is the view this widget is mapping.
- set_view(view)¶
- Parameters:
view (
GtkSource.View
) – aGtkSource.View
Sets the view that self will be doing the mapping to.
Property Details¶
- GtkSource.Map.props.font_desc¶
- Name:
font-desc
- Type:
- Default Value:
- Flags:
The Pango font description to use.
- GtkSource.Map.props.view¶
- Name:
view
- Type:
- Default Value:
- Flags:
The view this widget is mapping.