GtkSource.Gutter¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Gtk.Widget (25), GObject.Object (7), Gtk.Accessible (6), Gtk.Buildable (9)
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|||
r/w/co |
The gutters’ text window type |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GtkSource.Gutter(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Gutter object for [class`View`].
The
GtkSourceGutter
object represents the left or right gutter of the text view. It is used by [class`View`] to draw the line numbers and [class`Mark`]s that might be present on a line. By packing additional [class`GutterRenderer`] objects in the gutter, you can extend the gutter with your own custom drawings.To get a
GtkSourceGutter
, use the [method`View`.get_gutter] function.The gutter works very much the same way as cells rendered in a [class`Gtk`.TreeView]. The concept is similar, with the exception that the gutter does not have an underlying [iface`Gtk`.TreeModel]. The builtin line number renderer is at position
GtkSource.ViewGutterPosition.LINES
(-30) and the marks renderer is atGtkSource.ViewGutterPosition.MARKS
(-20). The gutter sorts the renderers in ascending order, from left to right. So the marks are displayed on the right of the line numbers.- get_view()¶
- Returns:
the associated
GtkSource.View
.- Return type:
- insert(renderer, position)¶
- Parameters:
renderer (
GtkSource.GutterRenderer
) – a gutter renderer (must inherit fromGtkSource.GutterRenderer
).position (
int
) – the renderer position.
- Returns:
- Return type:
Insert renderer into the gutter. If renderer is yet unowned then gutter claims its ownership. Otherwise just increases renderer’s reference count. renderer cannot be already inserted to another gutter.
- remove(renderer)¶
- Parameters:
renderer (
GtkSource.GutterRenderer
) –
- reorder(renderer, position)¶
- Parameters:
renderer (
GtkSource.GutterRenderer
) – aGtk.CellRenderer
.position (
int
) – the new renderer position.
Reorders renderer in self to new position.
Property Details¶
- GtkSource.Gutter.props.view¶
- Name:
view
- Type:
- Default Value:
- Flags:
The
GtkSource.View
of the gutter.
- GtkSource.Gutter.props.window_type¶
- Name:
window-type
- Type:
- Default Value:
- Flags:
The text window type on which the window is placed.