Class: GtkSource::Mark

Inherits:
Gtk::TextMark show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from Gtk::TextMark

#buffer, #deleted, #left_gravity, #left_gravity=, #left_gravity?, #name, #name=, #visible, #visible=

Constructor Details

#initialize(name, category) ⇒ GtkSource::Mark

Creates a text mark.

Add it to a buffer using [methodGtk.TextBuffer.add_mark]. If name is NULL, the mark is anonymous; otherwise, the mark can be retrieved by name using [methodGtk.TextBuffer.get_mark]. Normally marks are created using the utility function [methodBuffer.create_source_mark].

Parameters:

  • name (String)

    Name of the Gtk::SourceMark or nil

  • category (String)

    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).

Instance Method Details

#categoryString

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

Returns:

  • (String)

    category

#category=(category) ⇒ String

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

Parameters:

  • category (String)

Returns:

  • (String)

    category

  • (String)

    category

#next(category) ⇒ GtkSource::Mark

Returns the next GtkSourceMark in the buffer or nil if the mark was not added to a buffer.

If there is no next mark, nil will be returned.

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

Parameters:

  • category (String)

    a string specifying the mark category, or nil.

Returns:

#prev(category) ⇒ GtkSource::Mark

Returns the previous GtkSourceMark in the buffer or nil if the mark was not added to a buffer.

If there is no previous mark, nil is returned.

If category is nil, looks for marks of any category

Parameters:

  • category (String)

    a string specifying the mark category, or nil.

Returns: