GtkSource.Mark¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
The mark category |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class GtkSource.Mark(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Mark object for [class`Buffer`].
A
GtkSourceMarkmarks a position in the text where you want to display additional info. It is based on [class`Gtk`.TextMark] and thus is still valid after the text has changed though its position may change.``GtkSourceMark``s are organized in categories which you have to set when you create the mark. Each category can have a priority, a pixbuf and other associated attributes. See [method`View`.set_mark_attributes]. The pixbuf will be displayed in the margin at the line where the mark residents if the [property`View`:py:data::show-line-marks<GtkSource.Mark.props.show_line_marks>] property is set to
True. If there are multiple marks in the same line, the pixbufs will be drawn on top of each other. The mark with the highest priority will be drawn on top.- classmethod new(name, category)¶
- Parameters:
name (
strorNone) – Name of theGtkSource.MarkorNonecategory (
str) – is used to classify marks according to common characteristics (e.g. all the marks representing a bookmark could belong to the “bookmark” category, or all the marks representing a compilation error could belong to “error” category).
- Returns:
a new
GtkSource.Markthat can be added using [method`Gtk`.TextBuffer.add_mark].- Return type:
Creates a text mark.
Add it to a buffer using [method`Gtk`.TextBuffer.add_mark]. If name is
None, the mark is anonymous; otherwise, the mark can be retrieved by name using [method`Gtk`.TextBuffer.get_mark]. Normally marks are created using the utility function [method`Buffer`.create_source_mark].
- get_category()¶
- Returns:
the category of the
GtkSource.Mark.- Return type:
Returns the mark category.
- next(category)¶
- Parameters:
category (
strorNone) – a string specifying the mark category, orNone.- Returns:
the next
GtkSource.Mark, orNone.- Return type:
Returns the next
GtkSourceMarkin the buffer orNoneif the mark was not added to a buffer.If there is no next mark,
Nonewill be returned.If category is
None, looks for marks of any category.
- prev(category)¶
- Parameters:
category (
strorNone) – a string specifying the mark category, orNone.- Returns:
the previous
GtkSource.Mark, orNone.- Return type:
Returns the previous
GtkSourceMarkin the buffer orNoneif the mark was not added to a buffer.If there is no previous mark,
Noneis returned.If category is
None, looks for marks of any category