GtkSource.Mark

g GObject.Object GObject.Object Gtk.TextMark Gtk.TextMark GObject.Object->Gtk.TextMark GtkSource.Mark GtkSource.Mark Gtk.TextMark->GtkSource.Mark

Subclasses:None

Methods

Inherited:Gtk.TextMark (7), GObject.Object (37)
Structs:GObject.ObjectClass (5)
class new (name, category)
  get_category ()
  next (category)
  prev (category)

Virtual Methods

Inherited:GObject.Object (7)

Properties

Inherited:Gtk.TextMark (2)
Name Type Flags Short Description
category str r/w/co The mark category

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent_instance Gtk.TextMark r  

Class Details

class GtkSource.Mark(**kwargs)
Bases:Gtk.TextMark
Abstract:No
Structure:GtkSource.MarkClass
classmethod new(name, category)
Parameters:
  • name (str) – Name of the GtkSource.Mark, can be None when not using a name
  • category (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.Mark that can be added using Gtk.TextBuffer.add_mark().

Return type:

GtkSource.Mark

Creates a text mark. Add it to a buffer using Gtk.TextBuffer.add_mark(). If name is None, the mark is anonymous; otherwise, the mark can be retrieved by name using Gtk.TextBuffer.get_mark(). Normally marks are created using the utility function GtkSource.Buffer.create_source_mark().

New in version 2.2.

get_category()
Returns:the category of the GtkSource.Mark.
Return type:str

Returns the mark category.

New in version 2.2.

next(category)
Parameters:category (str or None) – a string specifying the mark category, or None.
Returns:the next GtkSource.Mark, or None.
Return type:GtkSource.Mark or None

Returns the next GtkSource.Mark in the buffer or None if the mark was not added to a buffer. If there is no next mark, None will be returned.

If category is None, looks for marks of any category.

New in version 2.2.

prev(category)
Parameters:category (str) – a string specifying the mark category, or None.
Returns:the previous GtkSource.Mark, or None.
Return type:GtkSource.Mark or None

Returns the previous GtkSource.Mark in the buffer or None if the mark was not added to a buffer. If there is no previous mark, None is returned.

If category is None, looks for marks of any category

New in version 2.2.

Property Details

GtkSource.Mark.props.category
Name:category
Type:str
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The category of the GtkSource.Mark, classifies the mark and controls which pixbuf is used and with which priority it is drawn.